Skip to content

Commit

Permalink
Anytone settings extension (#339)
Browse files Browse the repository at this point in the history
Implemented settings extension for all supported AnyTone devices.
  • Loading branch information
hmatuschek authored Jun 1, 2023
1 parent c85aa8a commit 5b66246
Show file tree
Hide file tree
Showing 111 changed files with 20,255 additions and 3,357 deletions.
7 changes: 4 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.0.0)
project(qdmr VERSION 0.11.2)
project(qdmr VERSION 0.11.3)

set(RELEASE_SUFFIX "")

Expand Down Expand Up @@ -37,7 +37,8 @@ endif(${BUILD_TESTS})
ADD_DEFINITIONS(${Qt5Widgets_DEFINITIONS})
#add_definitions("-DQT_EVENT_DISPATCHER_CORE_FOUNDATION=1")

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_C_STANDARD 99)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

INCLUDE_DIRECTORIES(${Qt5Core_INCLUDE_DIRS})
Expand Down Expand Up @@ -74,7 +75,7 @@ message(STATUS "Build version ${PROJECT_VERSION}")
# Set compiler flags
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS} -Wall -Wsign-compare")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -ggdb -fstack-protector -Wextra")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -Wextra")


# Get default install directories under Linux
Expand Down
45 changes: 26 additions & 19 deletions cli/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -159,26 +159,33 @@ int main(int argc, char *argv[])
if (parser.isSet("verbose"))
handler->setMinLevel(LogMessage::DEBUG);

int res = -1;
QString command = parser.positionalArguments().at(0);

if ("detect" == command)
return detect(parser, app);
if ("verify" == command)
return verify(parser, app);
if ("read" == command)
return readCodeplug(parser, app);
if ("write" == command)
return writeCodeplug(parser, app);
if ("write-db" == command)
return writeCallsignDB(parser, app);
if ("encode" == command)
return encodeCodeplug(parser, app);
if ("encode-db" == command)
return encodeCallsignDB(parser, app);
if ("decode" == command)
return decodeCodeplug(parser, app);
if ("info" == command)
return infoFile(parser, app);
res = detect(parser, app);
else if ("verify" == command)
res = verify(parser, app);
else if ("read" == command)
res = readCodeplug(parser, app);
else if ("write" == command)
res = writeCodeplug(parser, app);
else if ("write-db" == command)
res = writeCallsignDB(parser, app);
else if ("encode" == command)
res = encodeCodeplug(parser, app);
else if ("encode-db" == command)
res = encodeCallsignDB(parser, app);
else if ("decode" == command)
res = decodeCodeplug(parser, app);
else if ("info" == command)
res = infoFile(parser, app);
else
parser.showHelp(-1);

// Allow some pending events to be processed (e.g., deleteLater())
QEventLoop loop;
while(loop.processEvents()) {}

parser.showHelp(-1);
return -1;
return res;
}
16 changes: 16 additions & 0 deletions doc/code/anytone_5tonefunctionlist.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
0000 | Five-tone function 0 ...
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
001c ... |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
0020 | Five-tone function 1 ...
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
003c ... |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
... ...
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
01e0 | Five-tone function 15 ...
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
01fc ... |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
16 changes: 16 additions & 0 deletions doc/code/anytone_5toneidlist.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
0000 | Five-tone ID 0 ...
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
001c ... |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
0020 | Five-tone ID 1 ...
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
003c ... |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
... ...
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
0c60 | Five-tone ID 99 ...
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
0c7c ... |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
10 changes: 10 additions & 0 deletions doc/code/anytone_analogquickcalls.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
0000 | Quick call 0 | Quick call 1 |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
0004 | Quick call 2 | Quick call 3 |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
0008 | Unused, filled with 0x00 ...
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
00fc ... |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
6 changes: 5 additions & 1 deletion doc/code/anytone_bootsettings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
1c ... |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
20 | Password, 16 x ASCII, 0-terminated and padded ...
20 | Boot password, 8 x ASCII, only number chars, 0-terminated and padded ...
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
24 ... |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
28 | Unused, filled with 0x00 ...
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
2c ... |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
2 changes: 1 addition & 1 deletion doc/code/anytone_dtmfcontact.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
8 | Name, 15 x ASCII, 0-padded ...
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
20 ... | 0x00 pad |
14 ... | 0x00 pad |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
16 changes: 16 additions & 0 deletions doc/code/anytone_dtmfidlist.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
0000 | DTMF number 0 ...
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
000c ... |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
0010 | DTMF number 1 ...
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
001c ... |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
... ...
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
00f0 | DTMF number 15 ...
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
00fc ... |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
10 changes: 6 additions & 4 deletions doc/code/anytone_generalsettings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
54 | | Enable enhanced audio |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
58 | VFO Scan UHF minimum frequency in 10Hz, 8-digit BCD, big endian |
58 | VFO Scan UHF minimum frequency in 10Hz, 32bit uint, little endian |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
5c | VFO Scan UHF maximum frequency in 10Hz, 8-digit BCD, big endian |
5c | VFO Scan UHF maximum frequency in 10Hz, 32bit uint, little endian |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
60 | VFO Scan VHF minimum frequency in 10Hz, 8-digit BCD, big endian |
60 | VFO Scan VHF minimum frequency in 10Hz, 32bit uint, little endian |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
64 | VFO Scan VHF maximum frequency in 10Hz, 8-digit BCD, big endian |
64 | VFO Scan VHF maximum frequency in 10Hz, 32bit uint, little endian |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
68 | Auto rep. offset index UHF | Auto rep. offset index VHF | Unknown ...
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
Expand Down Expand Up @@ -93,3 +93,5 @@ b0 | Device specific settings
cc ... |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+

Where:
- GPS time zone: 00h=UTC-12, ..., 0Ch=UTC, ..., 19h=UTC+13
16 changes: 16 additions & 0 deletions doc/code/anytone_hotkeysettings.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
0000 | Hotkey setting 0 ...
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
002c ... |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
0030 | Hotkey setting 1 ...
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
005c ... |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
... ...
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
0330 | Hotkey setting 17 ...
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
035c ... |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
14 changes: 14 additions & 0 deletions doc/code/anytone_repeateroffsetfrequencies.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
0000 | Offset frequency 0 |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
0004 | Offset frequency 1 |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
... ...
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
03e4 | Offset frequency 249 |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
03e8 | Unused, filled with 0 ...
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
03ec ... |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
Loading

0 comments on commit 5b66246

Please sign in to comment.