Merge branch 'main' into ls-hmac-signing

This commit is contained in:
DJ2LS 2023-08-07 19:38:18 +02:00 committed by GitHub
commit 467c6af913
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 69 additions and 38 deletions

View file

@ -14,28 +14,28 @@ jobs:
include:
- os: ubuntu-20.04
libcodec2_name: libcodec2.so.1.1
libcodec2_name: libcodec2.so.1.2
libcodec2_os_name: libcodec2_ubuntu-2004
libcodec2_filetype: so
generator: Unix Makefiles
shell: bash
- os: ubuntu-22.04
libcodec2_name: libcodec2.so.1.1
libcodec2_name: libcodec2.so.1.2
libcodec2_os_name: libcodec2_ubuntu-2204
libcodec2_filetype: so
generator: Unix Makefiles
shell: bash
- os: macos-11
libcodec2_name: libcodec2.1.1.dylib
libcodec2_name: libcodec2.1.2.dylib
libcodec2_os_name: libcodec2_macos-11
libcodec2_filetype: dylib
generator: Unix Makefiles
shell: bash
- os: macos-12
libcodec2_name: libcodec2.1.1.dylib
libcodec2_name: libcodec2.1.2.dylib
libcodec2_os_name: libcodec2_macos-12
libcodec2_filetype: dylib
generator: Unix Makefiles
@ -51,7 +51,7 @@ jobs:
mkdir build
mkdir tempfiles
cd build
cmake ../
cmake -DCMAKE_BUILD_TYPE=Release ../
make
mv src/${{ matrix.libcodec2_name }} ../tempfiles/libcodec2_${{ matrix.os }}_${{ matrix.platform.name }}.${{ matrix.libcodec2_filetype }}
@ -84,7 +84,7 @@ jobs:
echo 'set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)' >> toolchain-ubuntu-mingw32.cmake
echo 'set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)' >> toolchain-ubuntu-mingw32.cmake
echo 'set(CMAKE_SHARED_LINKER_FLAGS "-static-libgcc -static-libstdc++ -static")' >> toolchain-ubuntu-mingw32.cmake
cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=toolchain-ubuntu-mingw32.cmake ..
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=toolchain-ubuntu-mingw32.cmake ..
make
mv src/libcodec2.${{ matrix.platform.file }} ../tempfiles/libcodec2_${{ matrix.platform.name }}_${{ matrix.architecture }}.${{ matrix.platform.file }}
@ -169,12 +169,12 @@ jobs:
git clone https://github.com/drowe67/codec2.git
cd codec2
git checkout master
git checkout main
mkdir build
cd build
cmake ../
make
mv ./src/libcodec2.so.1.1 /artifacts/${artifact_name}
mv ./src/libcodec2.so.1.2 /artifacts/${artifact_name}
- name: Show recursive PWD/artifacts
# Items placed in /artifacts in the container will be in
@ -222,15 +222,15 @@ jobs:
with:
repository: DJ2LS/FreeDATA
- name: Set up Python 3.10
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.11"
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 18.17
- name: Create tnc/dist
working-directory: tnc
@ -363,10 +363,11 @@ jobs:
find . -type d -o -name ".git" -delete
- name: Build/release Electron app
uses: samuelmeuli/action-electron-builder@v1
uses: coparse-inc/action-electron-builder@v1.0.0
env:
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
with:
package_root: "./gui/"
github_token: ${{ secrets.github_token }}

View file

@ -1055,13 +1055,16 @@ function downloadJsonUrlToFile(url, callsignPath) {
https
.get(url, (res) => {
console.log("statusCode:", res.statusCode);
console.log("headers:", res.headers);
//console.log("statusCode:", res.statusCode);
//console.log("headers:", res.headers);
res.on("data", (d) => {
console.log(d);
//console.log(d);
let json = JSON.parse(d);
fs.writeFileSync(callsignPath, JSON.stringify(json, null, 2));
sysInfo.info(
"Download " + url + " return statuscode: " + res.statusCode,
);
});
})
.on("error", (e) => {
@ -1069,6 +1072,7 @@ function downloadJsonUrlToFile(url, callsignPath) {
});
}
function downloadCallsignReverseLookupData() {
sysInfo.info("Downloading callsigns.json");
var callsignPath = path.join(configFolder, "callsigns.json");
downloadJsonUrlToFile(
"https://api.freedata.app/callsign_lookup.php",

View file

@ -1,6 +1,6 @@
{
"name": "FreeDATA",
"version": "0.10.1-alpha.6",
"version": "0.10.2-alpha.1",
"description": "FreeDATA ",
"main": "main.js",
"scripts": {
@ -8,7 +8,7 @@
"test": "echo \"Error: no test specified\" && exit 1"
},
"engines": {
"node": ">=16.0.0",
"node": ">=18.17.0",
"npm": ">=9.0.0"
},
"repository": {
@ -28,20 +28,20 @@
},
"homepage": "https://freedata.app",
"dependencies": {
"@electron/asar": "^3.2.3",
"@electron/asar": "^3.2.4",
"@electron/osx-sign": "^1.0.4",
"@popperjs/core": "^2.11.6",
"@popperjs/core": "^2.11.8",
"blob-util": "^2.0.2",
"bootstrap": "^5.3.0",
"bootstrap": "^5.3.1",
"bootstrap-icons": "^1.10.5",
"bootswatch": "^5.2.3",
"browser-image-compression": "^2.0.0",
"chart.js": "^4.2.1",
"chartjs-plugin-annotation": "^2.1.2",
"bootswatch": "^5.3.1",
"browser-image-compression": "^2.0.2",
"chart.js": "^4.3.3",
"chartjs-plugin-annotation": "^3.0.1",
"electron-log": "^4.4.8",
"electron-updater": "^5.3.0",
"emoji-picker-element": "^1.15.1",
"emoji-picker-element-data": "^1.3.0",
"electron-updater": "^6.1.1",
"emoji-picker-element": "^1.18.3",
"emoji-picker-element-data": "^1.4.0",
"express-pouchdb": "^4.2.0",
"mime": "^3.0.0",
"pouchdb": "^8.0.1",
@ -55,9 +55,9 @@
"uuid": "^9.0.0"
},
"devDependencies": {
"@electron/notarize": "^1.2.3",
"electron": "^23.0.0",
"electron-builder": "^23.6.0",
"@electron/notarize": "^2.1.0",
"electron": "^25.4.0",
"electron-builder": "^24.6.3",
"electron-builder-notarize": "^1.5.1"
},
"build": {

View file

@ -145,10 +145,9 @@ var chatFilter = [
//{ type: "response" },
];
updateAllChat(false);
// WINDOW LISTENER
window.addEventListener("DOMContentLoaded", () => {
updateAllChat(false);
// theme selector
changeGuiDesign(config.theme);
@ -218,7 +217,12 @@ window.addEventListener("DOMContentLoaded", () => {
chatFilter.length = 0;
if (document.getElementById("chkMessage").checked == true) {
chatFilter = [{ type: "newchat" }];
chatFilter.push({ type: "received" }, { type: "transmit" });
chatFilter.push(
{ type: "received" },
{ type: "transmit" },
{ type: "broadcast_received" },
{ type: "broadcast_transmit" },
);
}
if (document.getElementById("chkPing").checked == true)
chatFilter.push({ type: "ping" });
@ -682,7 +686,7 @@ ipcRenderer.on("action-update-transmission-status", (event, arg) => {
var data = arg["data"][0];
document.getElementById("txtConnectedWithChat").textContent = data.dxcallsign;
if (data.status == "opening") return;
if (typeof data.uuid === undefined) return;
//console.log(data.status);
@ -1071,6 +1075,26 @@ update_chat = function (obj) {
obj.status = "failed";
}
}
// check if in transmitting status and @ 100%
if (
obj.status == "transmitting" &&
obj.type == "transmit" &&
obj.percent == 100
) {
var TimeDifference = new Date().getTime() / 1000 - obj.timestamp;
if (TimeDifference > 21600) {
//Six hours
console.log(
"Resetting message to transmitted since in transmit state and at 100%:",
);
console.log(obj);
db.upsert(obj._id, function (doc) {
doc.status = "transmitted";
return doc;
});
obj.status = "transmitted";
}
}
if (typeof obj.new == "undefined") {
obj.new = 0;
}
@ -2255,7 +2279,8 @@ async function updateAllChat(clear) {
function getSetUserSharedFolder(selected_callsign) {
// TODO: This is a dirty hotfix for avoiding, this function is canceld too fast.
console.log("get set user information:" + selected_callsign);
//Should be fixed
//console.log("get set user information:" + selected_callsign);
if (
selected_callsign == "" ||
@ -2391,7 +2416,7 @@ function getSetUserSharedFolder(selected_callsign) {
function getSetUserInformation(selected_callsign) {
//Get user information
console.log("get set user information:" + selected_callsign);
//console.log("get set user information:" + selected_callsign);
if (
selected_callsign == "" ||

View file

@ -1003,6 +1003,7 @@ class DATA:
return True
def arq_calculate_speed_level(self, snr):
current_speed_level = self.speed_level
self.frame_received_counter += 1
# try increasing speed level only if we had two successful decodes
if self.frame_received_counter >= 2:
@ -1023,7 +1024,7 @@ class DATA:
# calculate if speed level fits to busy condition
if not self.check_if_mode_fits_to_busy_slot():
self.speed_level = 0
self.speed_level = current_speed_level
ARQ.arq_speed_level = self.speed_level

View file

@ -129,7 +129,7 @@ class TCIParam:
@dataclass
class TNC:
version = "0.10.1-alpha.6"
version = "0.10.2-alpha.1"
host: str = "0.0.0.0"
port: int = 3000
SOCKET_TIMEOUT: int = 1 # seconds