From f01a5d733848075ea9c184530bda606e1ddc1dd5 Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Mon, 30 Oct 2023 14:38:10 -0700 Subject: [PATCH 1/3] uvk5: Fix invalid return when firmware probe fails This needs to raise an exception instead of returning a boolean, as the latter just causes failures later trying to treat the boolean as a memmap object. Related to bug 10921 --- chirp/drivers/uvk5.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chirp/drivers/uvk5.py b/chirp/drivers/uvk5.py index 0dd125a47..c227f7a29 100644 --- a/chirp/drivers/uvk5.py +++ b/chirp/drivers/uvk5.py @@ -568,7 +568,7 @@ def do_download(radio): if f: radio.FIRMWARE_VERSION = f else: - return False + raise errors.RadioError('Unable to determine firmware version') addr = 0 while addr < MEM_SIZE: From bd659cf3b1babf868b5e8bae09ca940a3033d673 Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Mon, 30 Oct 2023 14:38:15 -0700 Subject: [PATCH 2/3] th9000: Fix program mode negotiation This makes us break out of the loop once we have received a positive response to program mode. Fixes #10922 --- chirp/drivers/th9000.py | 1 + 1 file changed, 1 insertion(+) diff --git a/chirp/drivers/th9000.py b/chirp/drivers/th9000.py index 655670695..004b6eade 100644 --- a/chirp/drivers/th9000.py +++ b/chirp/drivers/th9000.py @@ -405,6 +405,7 @@ def _ident(radio): if response == b"QX\06": exito = True + break # check if we had EXITO if exito is False: From bf80d7d8054d824f065588e89be41eca66c33f55 Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Sat, 28 Oct 2023 21:39:55 -0700 Subject: [PATCH 3/3] Fix bitwise grammar for bitfield Long ago, an error in the bitwise grammar allowed bitfields to be defined without the comma delimiter between fields. This fixes that error to make the grammar correct and also fixes the *many* errors in bitwise definitions in a lot of drivers. --- chirp/bitwise.py | 11 ++- chirp/bitwise_grammar.py | 4 +- chirp/drivers/anytone_iii.py | 4 +- chirp/drivers/baofeng_wp970i.py | 2 +- chirp/drivers/bj9900.py | 4 +- chirp/drivers/ft1d.py | 6 +- chirp/drivers/ft2900.py | 2 +- chirp/drivers/ft450d.py | 10 +-- chirp/drivers/ft60.py | 4 +- chirp/drivers/ft7100.py | 2 +- chirp/drivers/ft7800.py | 66 ++++++++-------- chirp/drivers/ft857.py | 2 +- chirp/drivers/ft90.py | 2 +- chirp/drivers/gmrsuv1.py | 2 +- chirp/drivers/gmrsv2.py | 2 +- chirp/drivers/ic2730.py | 14 ++-- chirp/drivers/icq7.py | 2 +- chirp/drivers/icv80.py | 2 +- chirp/drivers/iradio_uv_5118.py | 2 +- chirp/drivers/kguv8d.py | 4 +- chirp/drivers/kguv8dplus.py | 4 +- chirp/drivers/kguv8e.py | 4 +- chirp/drivers/kguv920pa.py | 12 +-- chirp/drivers/kguv980p.py | 2 +- chirp/drivers/kyd_IP620.py | 8 +- chirp/drivers/leixen.py | 2 +- chirp/drivers/lt725uv.py | 4 +- chirp/drivers/puxing_px888k.py | 8 +- chirp/drivers/retevis_rt21.py | 2 +- chirp/drivers/retevis_rt87.py | 2 +- chirp/drivers/th7800.py | 2 +- chirp/drivers/th9800.py | 4 +- chirp/drivers/th_uv8000.py | 128 ++++++++++++++++---------------- chirp/drivers/th_uv88.py | 56 +++++++------- chirp/drivers/tk760g.py | 2 +- chirp/drivers/tk8102.py | 2 +- chirp/drivers/uv5r.py | 4 +- chirp/drivers/vx3.py | 2 +- chirp/drivers/vx8.py | 4 +- 39 files changed, 201 insertions(+), 198 deletions(-) diff --git a/chirp/bitwise.py b/chirp/bitwise.py index f0044499e..b22bc6fc2 100644 --- a/chirp/bitwise.py +++ b/chirp/bitwise.py @@ -817,6 +817,7 @@ def items(self): class Processor: + strict = False _types = { "u8": u8DataElement, @@ -962,6 +963,11 @@ def parse_directive(self, directive): name = directive[0][0] value = directive[0][1][0][1] if name == "seekto": + if self._offset == int(value, 0): + if self.strict: + raise SyntaxError('Unnecessary #seekto %s' % value) + else: + LOG.warning('Unnecessary #seekto %s' % value) self._offset = int(value, 0) elif name == "seek": self._offset += int(value, 0) @@ -992,10 +998,11 @@ def parse(spec, data, offset=0): if __name__ == "__main__": defn = """ +// comment struct mytype { u8 foo; }; struct mytype bar; struct { - u8 foo; + u8 foo; // inline u8 highbit:1, sixzeros:6, lowbit:1; @@ -1003,7 +1010,7 @@ def parse(spec, data, offset=0): bbcd fourdigits[2]; } mystruct; """ - data = "\xab\x7F\x81abc\x12\x34" + data = b"\xab\x7F\x81abc\x12\x34" tree = parse(defn, data) print(repr(tree)) diff --git a/chirp/bitwise_grammar.py b/chirp/bitwise_grammar.py index c61eda29c..fd49b24d2 100644 --- a/chirp/bitwise_grammar.py +++ b/chirp/bitwise_grammar.py @@ -35,7 +35,7 @@ def count(): def bitdef(): - return symbol, ":", count, -1 + return symbol, ":", count def _bitdeflist(): @@ -43,7 +43,7 @@ def _bitdeflist(): def bitfield(): - return -2, _bitdeflist + return _bitdeflist def array(): diff --git a/chirp/drivers/anytone_iii.py b/chirp/drivers/anytone_iii.py index 48a74a134..8b4f4bef8 100644 --- a/chirp/drivers/anytone_iii.py +++ b/chirp/drivers/anytone_iii.py @@ -154,7 +154,7 @@ def get_memory_mappings(self, memory): pttid:2, // [Off, Begin, End, Begin&End] unknown6:2, bclo:2; // [Off, Repeater, Busy] - u8 unknown7:6 + u8 unknown7:6, band:2; // [2m, 1-1/4m, 350+ MHz, 70cm] u8 unknown8:5, sql_mode:3; // [Carrier, CTCSS/DCS Tones, Opt Sig Only, @@ -238,7 +238,7 @@ def get_memory_mappings(self, memory): clk_shift:1, // CLK Shift: 0=off 1=on ext_spk_on:1, // Enable the external speaker alt_key_mode:1, // Use Alt Keypad Mode: 0=off 1=on - beep_on:1 // Enable beep + beep_on:1, // Enable beep no_tone_elim_tail:1, // Elim squelch tail when no CTCSS/DCS signaling sql_key_mode:1; // SQL Key Function: [Momentary, Toggle] u8 unknown16:5, diff --git a/chirp/drivers/baofeng_wp970i.py b/chirp/drivers/baofeng_wp970i.py index 4a29c1832..e2318a2a0 100644 --- a/chirp/drivers/baofeng_wp970i.py +++ b/chirp/drivers/baofeng_wp970i.py @@ -237,7 +237,7 @@ class WP970I(baofeng_common.BaofengCommonHT): sftd:2, scode:4; u8 unknown4; - u8 unused3:1 + u8 unused3:1, step:3, unused4:4; u8 unused5:1, diff --git a/chirp/drivers/bj9900.py b/chirp/drivers/bj9900.py index 4c278e4c5..4f6476c2d 100644 --- a/chirp/drivers/bj9900.py +++ b/chirp/drivers/bj9900.py @@ -84,11 +84,11 @@ class BJ9900Radio(chirp_common.CloneModeRadio, u16 is_txdigtone:1, txdtcs_pol:1, txtone:14; - u8 txdtmf:4 + u8 txdtmf:4, pttid:4; u8 power:1, wide:1, - compandor:1 + compandor:1, unknown3:5; u8 namelen; u8 name[7]; diff --git a/chirp/drivers/ft1d.py b/chirp/drivers/ft1d.py index 1cd77c68b..d034d9773 100644 --- a/chirp/drivers/ft1d.py +++ b/chirp/drivers/ft1d.py @@ -49,7 +49,7 @@ u8 lcd_dimmer; // 14 DIMMER u8 dtmf_delay; // 18 DT DLY u8 unknown0[3]; - u8 unknown1:4 + u8 unknown1:4, lcd_contrast:4; u8 lamp; // 28 LAMP u8 lock; // 30 LOCK @@ -76,7 +76,7 @@ u8 busy_led:1, unknown9:2, bclo:1, // 03 BCLO - beep_edge:1 // 06 BEP.EDG + beep_edge:1, // 06 BEP.EDG unknown9_1:3; u8 unknown10:5, password:1, @@ -248,7 +248,7 @@ u8 unknown7:1, aprs_units_wind_mph:1, aprs_units_rain_inch:1, - aprs_units_temperature_f:1 + aprs_units_temperature_f:1, aprs_units_altitude_ft:1, unknown8:1, aprs_units_distance_m:1, diff --git a/chirp/drivers/ft2900.py b/chirp/drivers/ft2900.py index 5ef6a6728..a1a667e2b 100644 --- a/chirp/drivers/ft2900.py +++ b/chirp/drivers/ft2900.py @@ -212,7 +212,7 @@ def _upload(radio): unk:2, dtmf_mode:1; u8 unk:1, - ts_mut:1 + ts_mut:1, wires_auto:1, busy_lockout:1, edge_beep:1, diff --git a/chirp/drivers/ft450d.py b/chirp/drivers/ft450d.py index 9f3fa056e..442ead6be 100644 --- a/chirp/drivers/ft450d.py +++ b/chirp/drivers/ft450d.py @@ -92,7 +92,7 @@ class FT450DRadio(yaesu_clone.YaesuCloneModeRadio): u8 tunerok:1, // @ Byte 4 ?? Poss tuned ok cnturon:1, unk4b:1, - dnr_on:1 + dnr_on:1, notch:1, unk4c:1, tmode:2; // Tone/Cross/etc as Off/Enc/Enc+Dec @@ -146,7 +146,7 @@ class FT450DRadio(yaesu_clone.YaesuCloneModeRadio): set0ea:1, amfmdial:1, // 0= Enabled. 1 = Disabled cwpitch:3; // 0-based index - u8 sql_rfg:1 + u8 sql_rfg:1, set0F:2, cwweigt:5; // Index 1:2.5=0 -> 1:4.5=20 u8 cw_dly; // @x10 ms = val * 10 @@ -157,8 +157,8 @@ class FT450DRadio(yaesu_clone.YaesuCloneModeRadio): emergen:1, vox_dly:5; // ms = val * 100 u8 set15a:1, - stby_beep:1 - set15b:1 + stby_beep:1, + set15b:1, mem_grp:1, apo:4; u8 tot; // Byte x16, 1:1 @@ -190,7 +190,7 @@ class FT450DRadio(yaesu_clone.YaesuCloneModeRadio): cat_tot:2; // Index 0-3 u8 set2CA:2, rtyrpol:1, - rtytpol:1 + rtytpol:1, rty_sft:2, rty_ton:1, set2CC:1; diff --git a/chirp/drivers/ft60.py b/chirp/drivers/ft60.py index a1bc2ee05..4e4c9bbec 100644 --- a/chirp/drivers/ft60.py +++ b/chirp/drivers/ft60.py @@ -194,7 +194,7 @@ def _encode_name(mem): x3B_6:2; u8 x3C_0:2, rev_hm:1, - mt_cl:1 + mt_cl:1, resume:2, txsave:1, pag_abk:1; @@ -235,7 +235,7 @@ def _encode_name(mem): u8 unknown4:1, dtcs:7; u8 unknown5; - u16 unknown5_1:1 + u16 unknown5_1:1, offset:15; u8 unknown6[3]; }; diff --git a/chirp/drivers/ft7100.py b/chirp/drivers/ft7100.py index 9336138b2..faa7ae337 100644 --- a/chirp/drivers/ft7100.py +++ b/chirp/drivers/ft7100.py @@ -178,7 +178,7 @@ def _upload(radio): u8 dtcs_index; u8 is_mode_am:1, unknown71:2, - is_packet96:1 + is_packet96:1, unknown72:2, power_index:2; u8 unknown81:2, diff --git a/chirp/drivers/ft7800.py b/chirp/drivers/ft7800.py index 87db2784e..2a8b1c476 100644 --- a/chirp/drivers/ft7800.py +++ b/chirp/drivers/ft7800.py @@ -30,6 +30,27 @@ ACK = b'\x06' MEM_FORMAT = """ +struct mem_struct { + u8 used:1, + unknown1:1, + mode:2, + unknown2:1, + duplex:3; + bbcd freq[3]; + u8 clockshift:1, + tune_step:3, + unknown5:1, // TODO: tmode has extended settings, at least 4 bits + tmode:3; + bbcd split[3]; + u8 power:2, + tone:6; + u8 unknown6:1, + dtcs:7; + u8 unknown7[2]; + u8 offset; + u8 unknown9[3]; +}; + #seekto 0x002A; u8 banks_unk2; u8 current_channel; @@ -37,14 +58,6 @@ u8 unk4; u8 current_menu; -#seekto 0x0035; -u8 banks_unk1; - -#seekto 0x00C8; -struct { - u8 memory[16]; -} dtmf[16]; - #seekto 0x003A; struct { u8 apo; @@ -86,30 +99,14 @@ u8 unk6; } settings; -struct mem_struct { - u8 used:1, - unknown1:1, - mode:2, - unknown2:1, - duplex:3; - bbcd freq[3]; - u8 clockshift:1, - tune_step:3, - unknown5:1, // TODO: tmode has extended settings, at least 4 bits - tmode:3; - bbcd split[3]; - u8 power:2, - tone:6; - u8 unknown6:1, - dtcs:7; - u8 unknown7[2]; - u8 offset; - u8 unknown9[3]; -}; - #seekto 0x0048; struct mem_struct vfos[5]; +#seekto 0x00C8; +struct { + u8 memory[16]; +} dtmf[16]; + #seekto 0x01C8; struct mem_struct homes[5]; @@ -793,6 +790,11 @@ def set_settings(self, uisettings): u8 name[6]; } memory[500]; +#seekto 0x%X; +struct { + u32 bitmap[16]; +} bank_channels[10]; + #seekto 0x51C8; struct { u8 skip0:2, @@ -801,12 +803,6 @@ def set_settings(self, uisettings): skip3:2; } flags[250]; -#seekto 0x%X; -struct { - u32 bitmap[16]; -} bank_channels[10]; - - #seekto 0x7B48; u8 checksum; """ diff --git a/chirp/drivers/ft857.py b/chirp/drivers/ft857.py index 7b6a96c23..24a2b57a4 100644 --- a/chirp/drivers/ft857.py +++ b/chirp/drivers/ft857.py @@ -160,7 +160,7 @@ class FT857Radio(ft817.FT817Radio): ars_430:1, cw_weight:5; u8 cw_delay; - u8 cw_delay_hi:1 + u8 cw_delay_hi:1, cw_sidetone:7; u8 unknown10:2, cw_speed:6; diff --git a/chirp/drivers/ft90.py b/chirp/drivers/ft90.py index 00f73922f..5aed9ff39 100644 --- a/chirp/drivers/ft90.py +++ b/chirp/drivers/ft90.py @@ -135,7 +135,7 @@ class FT90Radio(yaesu_clone.YaesuCloneModeRadio): step:3; u8 artsmode:2, unknown2:1, - isUhf2:1 + isUhf2:1, power:2, shift:2; u8 skip:1, diff --git a/chirp/drivers/gmrsuv1.py b/chirp/drivers/gmrsuv1.py index 32f72feff..e9aba0a2d 100644 --- a/chirp/drivers/gmrsuv1.py +++ b/chirp/drivers/gmrsuv1.py @@ -314,7 +314,7 @@ def get_features(self): sftd:2, scode:4; u8 unknown4; - u8 unused3:1 + u8 unused3:1, step:3, unused4:4; u8 txpower:1, diff --git a/chirp/drivers/gmrsv2.py b/chirp/drivers/gmrsv2.py index 71a4e4340..a83f493ca 100644 --- a/chirp/drivers/gmrsv2.py +++ b/chirp/drivers/gmrsv2.py @@ -286,7 +286,7 @@ def get_features(self): sftd:2, unused5:4; u8 unknown4; - u8 unused3:1 + u8 unused3:1, step:3, unused4:4; u8 txpower:1, diff --git a/chirp/drivers/ic2730.py b/chirp/drivers/ic2730.py index 16036c3c4..cf97abc7f 100644 --- a/chirp/drivers/ic2730.py +++ b/chirp/drivers/ic2730.py @@ -37,7 +37,7 @@ MEM_FORMAT = """ struct { - u24 freq_flags:6 + u24 freq_flags:6, freq:18; u16 offset; u8 tune_step:4, @@ -90,11 +90,11 @@ #seekto 0x4e80; struct { -u24 loflags:6 +u24 loflags:6, lofreq:18; -u24 hiflags:6 +u24 hiflags:6, hifreq:18; -u8 flag:4 +u8 flag:4, mode:4; u8 tstp; char name[6]; @@ -122,7 +122,7 @@ u8 civtcvr; u8 sqlatt; u8 sqldly; -u8 unk5014a:4 +u8 unk5014a:4, fanspeed:4; u8 unk5015; u8 bthvox; @@ -193,8 +193,8 @@ u8 unk505b; u8 unk505c; u8 unk505d; -u8 unk505e:6 - rpthangup:1 +u8 unk505e:6, + rpthangup:1, unk505e2:1; u8 unk505f; } settings; diff --git a/chirp/drivers/icq7.py b/chirp/drivers/icq7.py index 1917655f3..9dd7ce2f1 100644 --- a/chirp/drivers/icq7.py +++ b/chirp/drivers/icq7.py @@ -31,7 +31,7 @@ u8 fractional:1, unknown:7; bbcd offset[2]; - u16 ctone:6 + u16 ctone:6, rtone:6, tune_step:4; } memory[200]; diff --git a/chirp/drivers/icv80.py b/chirp/drivers/icv80.py index d12024751..97477116b 100644 --- a/chirp/drivers/icv80.py +++ b/chirp/drivers/icv80.py @@ -101,7 +101,7 @@ vox_gain:4; u8 unknown20:6, mic_gain:2; - u8 unknown21:5 + u8 unknown21:5, vox_delay:3; u8 unknown22:4, vox_tot:4; diff --git a/chirp/drivers/iradio_uv_5118.py b/chirp/drivers/iradio_uv_5118.py index 85b961fa7..a2afe380f 100644 --- a/chirp/drivers/iradio_uv_5118.py +++ b/chirp/drivers/iradio_uv_5118.py @@ -100,7 +100,7 @@ save:3; // Power Save u8 dispmode:1, // 0x0042 Display Mode dstandby:1, // Dual Standby - unknown_1:1 + unknown_1:1, standby:1, // Radio Standby squelch:4; // Squelch Level u8 vox_level:4, // 0x0043 VOX Level diff --git a/chirp/drivers/kguv8d.py b/chirp/drivers/kguv8d.py index 490b814aa..8902d69ff 100644 --- a/chirp/drivers/kguv8d.py +++ b/chirp/drivers/kguv8d.py @@ -201,7 +201,7 @@ power:1, unknown2:1; u8 unknown3:1, - shift_dir:2 + shift_dir:2, unknown4:2, mute_mode:2, iswide:1; @@ -219,7 +219,7 @@ power:1, unknown2:1; u8 unknown3:1, - shift_dir:2 + shift_dir:2, unknown4:2, mute_mode:2, iswide:1; diff --git a/chirp/drivers/kguv8dplus.py b/chirp/drivers/kguv8dplus.py index b80b3589f..03b521852 100644 --- a/chirp/drivers/kguv8dplus.py +++ b/chirp/drivers/kguv8dplus.py @@ -215,7 +215,7 @@ power:1, unknown2:1; u8 unknown3:1, - shift_dir:2 + shift_dir:2, unknown4:1, compander:1, mute_mode:2, @@ -235,7 +235,7 @@ power:1, unknown2:1; u8 unknown3:1, - shift_dir:2 + shift_dir:2, unknown4:1, compander:1, mute_mode:2, diff --git a/chirp/drivers/kguv8e.py b/chirp/drivers/kguv8e.py index b290af7ff..e3422595b 100644 --- a/chirp/drivers/kguv8e.py +++ b/chirp/drivers/kguv8e.py @@ -217,7 +217,7 @@ power:1, unknown2:1; u8 unknown3:1, - shift_dir:2 + shift_dir:2, unknown4:1, compander:1, mute_mode:2, @@ -237,7 +237,7 @@ power:1, unknown2:1; u8 unknown3:1, - shift_dir:2 + shift_dir:2, unknown4:1, compander:1, mute_mode:2, diff --git a/chirp/drivers/kguv920pa.py b/chirp/drivers/kguv920pa.py index 903ec1761..d9ab95fbf 100644 --- a/chirp/drivers/kguv920pa.py +++ b/chirp/drivers/kguv920pa.py @@ -147,14 +147,14 @@ mute_mode:2, unknown1_3downto0:3; u8 named:1, - scan_add:1 + scan_add:1, power:2, unknown2_32:2, isnarrow:2; u8 unknown3_7downto2:6, duplex:2; u8 unknown4:3, - compander:1 + compander:1, scrambler:4; } vfoa; @@ -168,14 +168,14 @@ mute_mode:2, unknown1_3downto0:3; u8 named:1, - scan_add:1 + scan_add:1, power:2, unknown2_3downto2:2, isnarrow:2; u8 unknown3_7downto2:6, duplex:2; u8 unknown4:3, - compander:1 + compander:1, scrambler:4; } vfob; @@ -311,14 +311,14 @@ mute_mode:2, unknown1_3downto0:3; u8 named:1, - scan_add:1 + scan_add:1, power:2, unknown2_32:2, isnarrow:2; u8 unknown3_7downto2:6, shift_dir:2; u8 unknown4:3, - compander:1 + compander:1, scrambler:4; } memory[999]; diff --git a/chirp/drivers/kguv980p.py b/chirp/drivers/kguv980p.py index 5b2394757..f171d35f1 100644 --- a/chirp/drivers/kguv980p.py +++ b/chirp/drivers/kguv980p.py @@ -556,7 +556,7 @@ u8 unknown3:6, Unknown4_shft_dir:2; u8 unknown5:3, - compander:1 + compander:1, scrambler:4; } memory[1000]; diff --git a/chirp/drivers/kyd_IP620.py b/chirp/drivers/kyd_IP620.py index 01aad3624..162249c6b 100644 --- a/chirp/drivers/kyd_IP620.py +++ b/chirp/drivers/kyd_IP620.py @@ -36,10 +36,10 @@ lbcd tx_freq[4]; // TX frequency ul16 rx_tone; // RX tone ul16 tx_tone; // TX tone - u8 unknown_1:4 // n-a + u8 unknown_1:4, // n-a busy_loc:2, // NO-00, Crrier wave-01, SM-10 n_a:2; // n-a - u8 unknown_2:1 // n-a + u8 unknown_2:1, // n-a scan_add:1, // Scan add n_a:1, // n-a w_n:1, // Narrow-0 Wide-1 @@ -62,10 +62,10 @@ lbcd freq_a_tx[4]; ul16 freq_a_rx_tone; // RX tone ul16 freq_a_tx_tone; // TX tone - u8 unknown_1_5:4 + u8 unknown_1_5:4, freq_a_busy_loc:2, n_a:2; - u8 unknown_1_6:3 + u8 unknown_1_6:3, freq_a_w_n:1, n_a:1, na:1, diff --git a/chirp/drivers/leixen.py b/chirp/drivers/leixen.py index 093e860f6..e84a25004 100644 --- a/chirp/drivers/leixen.py +++ b/chirp/drivers/leixen.py @@ -77,7 +77,7 @@ u8 unknown0x0194; u8 menuen:1, // menu enable absel:1, // a/b select - unknown:2 + unknown:2, keymshort:4; // m key short press u8 unknown:4, dtmfst:1, // dtmf sidetone diff --git a/chirp/drivers/lt725uv.py b/chirp/drivers/lt725uv.py index 45804c895..e6eec6e2e 100644 --- a/chirp/drivers/lt725uv.py +++ b/chirp/drivers/lt725uv.py @@ -178,8 +178,8 @@ // BJ-318 band power overrides any // individual channel power setting wide:1, - compander:1 - scrambler:1 + compander:1, + scrambler:1, unknown:4; u8 namelen; u8 name[7]; diff --git a/chirp/drivers/puxing_px888k.py b/chirp/drivers/puxing_px888k.py index e4b66d796..a94095838 100644 --- a/chirp/drivers/puxing_px888k.py +++ b/chirp/drivers/puxing_px888k.py @@ -174,7 +174,7 @@ // 5 u8 allow_keypad:1, - relay_without_disable_tail:1 + relay_without_disable_tail:1, _unknown_0C65:1, call_channel_active:1, vox_gain:4; @@ -242,8 +242,8 @@ // 1 u8 _unknown_0C91_1:3, channel_stepping:1, - unknown_0C91_2:1 - receive_range:2 + unknown_0C91_2:1, + receive_range:2, unknown_0C91_3:1; // 2-3 @@ -291,7 +291,7 @@ compander:1, txpower:1, modulation_width:1, - txrx_reverse:1 + txrx_reverse:1, bcl:2; // D diff --git a/chirp/drivers/retevis_rt21.py b/chirp/drivers/retevis_rt21.py index 68205f79c..9d25efdbe 100644 --- a/chirp/drivers/retevis_rt21.py +++ b/chirp/drivers/retevis_rt21.py @@ -338,7 +338,7 @@ u8 unknown_7[2]; // 005E-005F u8 channel_7[13]; // 0060-006C u8 voicel:4, // Voice Level 006D - unknown_9:3 // + unknown_9:3, // warn:1; // Warn Mode } settings; diff --git a/chirp/drivers/retevis_rt87.py b/chirp/drivers/retevis_rt87.py index 10ff7f88b..fe6746b77 100644 --- a/chirp/drivers/retevis_rt87.py +++ b/chirp/drivers/retevis_rt87.py @@ -81,7 +81,7 @@ unknown_08311:1, chnameshow:1, // Display Channel Names (Off, On) [25] voice:1, // Voice Prompt (Off, On) [19] - beep:1 // Beep (Off, On) [09] + beep:1, // Beep (Off, On) [09] batterysave:1; // Battery Save aka Receiver Saver (Off, On) [16] u8 unknown_0832:3, manual:1, // Manual (Disabled, Enabled) diff --git a/chirp/drivers/th7800.py b/chirp/drivers/th7800.py index 58dfd0192..c375ba0fe 100644 --- a/chirp/drivers/th7800.py +++ b/chirp/drivers/th7800.py @@ -42,7 +42,7 @@ u8 fmdev:2, // wide=00, mid=01, narrow=10 scramb:1, compand:1, - emphasis:1 + emphasis:1, unknown1a:2, sqlmode:1; // carrier, tone u8 rptmod:2, // off, -, + diff --git a/chirp/drivers/th9800.py b/chirp/drivers/th9800.py index 0ea022a4a..e9c2b344f 100644 --- a/chirp/drivers/th9800.py +++ b/chirp/drivers/th9800.py @@ -41,7 +41,7 @@ u8 fmdev:2, // wide=00, mid=01, narrow=10 scramb:1, compand:1, - emphasis:1 + emphasis:1, unknown1a:2, sqlmode:1; // carrier, tone u8 rptmod:2, // off, -, + @@ -87,7 +87,7 @@ right_func_key:1; u8 tbst_freq:2, ani_display:1, - unk0xdc25_4:1 + unk0xdc25_4:1, mute_mode:2, unk0xdc25_10:2; u8 auto_xfer:1, diff --git a/chirp/drivers/th_uv8000.py b/chirp/drivers/th_uv8000.py index 220e06e86..36d75982b 100644 --- a/chirp/drivers/th_uv8000.py +++ b/chirp/drivers/th_uv8000.py @@ -36,17 +36,17 @@ ul32 txfreq; u8 rxtone[2]; u8 txtone[2]; - u8 wide:1 // 0x0c - vox_on:1 - chunk01:1 - bcl:1 // inv bool - epilogue:1 - power:1 - chunk02:1 + u8 wide:1, // 0x0c + vox_on:1, + chunk01:1, + bcl:1, // inv bool + epilogue:1, + power:1, + chunk02:1, chunk03:1; - u8 ani:1 // 0x0d inv - chunk08:1 - ptt:2 + u8 ani:1, // 0x0d inv + chunk08:1, + ptt:2, chpad04:4; u8 chunk05; // 0x0e u16 id_code; // 0x0f, 10 @@ -64,22 +64,22 @@ struct frqx { ul32 rxfreq; ul24 ofst; - u8 fqunk01:4 // 0x07 - funk10:2 + u8 fqunk01:4, // 0x07 + funk10:2, duplx:2; u8 rxtone[2]; // 0x08, 9 u8 txtone[2]; // 0x0a, b - u8 wide:1 // 0x0c - vox_on:1 - funk11:1 - bcl:1 // inv bool - epilogue:1 - power:1 + u8 wide:1, // 0x0c + vox_on:1, + funk11:1, + bcl:1, // inv bool + epilogue:1, + power:1, fqunk02:2; - u8 ani:1 // 0x0d inv bool - fqunk03:1 - ptt:2 - fqunk12:1 + u8 ani:1, // 0x0d inv bool + fqunk03:1, + ptt:2, + fqunk12:1, fqunk04:3; u8 fqunk07; // 0x0e u16 id_code; // 0x0f, 0x10 @@ -121,42 +121,42 @@ struct { u8 setunk01[4]; u8 setunk02[3]; - u8 chs_name:1 // 0x11bb - txsel:1 - dbw:1 - setunk05:1 - ponfmchs:2 + u8 chs_name:1, // 0x11bb + txsel:1, + dbw:1, + setunk05:1, + ponfmchs:2, ponchs:2; - u8 voltx:2 // 0x11bc - setunk04:1 - keylok:1 - setunk07:1 + u8 voltx:2, // 0x11bc + setunk04:1, + keylok:1, + setunk07:1, batsav:3; - u8 setunk09:1 // 0x11bd - rxinhib:1 - rgrbeep:1 // inv bool - lampon:2 - voice:2 + u8 setunk09:1, // 0x11bd + rxinhib:1, + rgrbeep:1, // inv bool + lampon:2, + voice:2, beepon:1; - u8 setunk11:1 // 0x11be - manualset:1 - xbandon:1 // inv - xbandenable:1 - openmsg:2 + u8 setunk11:1, // 0x11be + manualset:1, + xbandon:1, // inv + xbandenable:1, + openmsg:2, ledclr:2; - u8 tot:4 // 0x11bf + u8 tot:4, // 0x11bf sql:4; - u8 setunk27:1 // 0x11c0 - voxdelay:2 - setunk28:1 + u8 setunk27:1, // 0x11c0 + voxdelay:2, + setunk28:1, voxgain:4; - u8 fmstep:4 // 0x11c1 + u8 fmstep:4, // 0x11c1 freqstep:4; - u8 scanspeed:4 // 0x11c2 + u8 scanspeed:4, // 0x11c2 scanmode:4; u8 scantmo; // 0x11c3 u8 prichan; // 0x11c4 - u8 setunk12:4 // 0x11c5 + u8 setunk12:4, // 0x11c5 supersave:4; u8 setunk13; u8 fmsclo; // 0x11c7 ??? placeholder @@ -164,26 +164,26 @@ u8 fmschi; // ??? placeholder u8 setunk14[3]; // 0x11d0 u8 setunk17[2]; // 0x011d3, 4 - u8 setunk18:4 + u8 setunk18:4, dtmfspd:4; - u8 dtmfdig1dly:4 // 0x11d6 + u8 dtmfdig1dly:4, // 0x11d6 dtmfdig1time:4; - u8 stuntype:1 - setunk19:1 - dtmfspms:2 + u8 stuntype:1, + setunk19:1, + dtmfspms:2, grpcode:4; - u8 setunk20:1 // 0x11d8 - txdecode:1 - codeabcd:1 - idedit:1 - pttidon:2 + u8 setunk20:1, // 0x11d8 + txdecode:1, + codeabcd:1, + idedit:1, + pttidon:2, setunk40:1, dtmfside:1; u8 setunk50:4, autoresettmo:4; u8 codespctim:4, // 0x11da decodetmo:4; - u8 pttecnt:4 // 0x11db + u8 pttecnt:4, // 0x11db pttbcnt:4; lbcd dtmfdecode[3]; u8 setunk22; @@ -199,11 +199,11 @@ u8 setunk65; u8 setunk66; u8 manfrqyn; // 0x11fd - u8 setunk27:3 - frqr3:1 - setunk28:1 - frqr2:1 - setunk29:1 + u8 setunk27:3, + frqr3:1, + setunk28:1, + frqr2:1, + setunk29:1, frqr1:1; u8 setunk25; ul32 frqr1lo; // 0x1200 diff --git a/chirp/drivers/th_uv88.py b/chirp/drivers/th_uv88.py index 3f83f2d3d..c6ffa0a57 100644 --- a/chirp/drivers/th_uv88.py +++ b/chirp/drivers/th_uv88.py @@ -32,24 +32,24 @@ struct chns { ul32 rxfreq; ul32 txfreq; - ul16 scramble:4 + ul16 scramble:4, rxtone:12; //decode:12 - ul16 decodeDSCI:1 - encodeDSCI:1 - unk1:1 - unk2:1 + ul16 decodeDSCI:1, + encodeDSCI:1, + unk1:1, + unk2:1, txtone:12; //encode:12 - u8 power:2 - wide:2 - b_lock:2 + u8 power:2, + wide:2, + b_lock:2, unk3:2; - u8 unk4:3 - signal:2 - displayName:1 + u8 unk4:3, + signal:2, + displayName:1, unk5:2; - u8 unk6:2 - pttid:2 - unk7:1 + u8 unk6:2, + pttid:2, + unk7:1, step:3; // not required u8 name[6]; }; @@ -57,23 +57,23 @@ struct vfo { ul32 rxfreq; ul32 txfreq; // displayed as an offset - ul16 scramble:4 + ul16 scramble:4, rxtone:12; //decode:12 - ul16 decodeDSCI:1 - encodeDSCI:1 - unk1:1 - unk2:1 + ul16 decodeDSCI:1, + encodeDSCI:1, + unk1:1, + unk2:1, txtone:12; //encode:12 - u8 power:2 - wide:2 - b_lock:2 + u8 power:2, + wide:2, + b_lock:2, unk3:2; - u8 unk4:3 - signal:2 - displayName:1 + u8 unk4:3, + signal:2, + displayName:1, unk5:2; - u8 unk6:2 - pttid:2 + u8 unk6:2, + pttid:2, step:4; u8 name[6]; }; @@ -120,7 +120,7 @@ // screen unk_bit4 : 1, // sqlLevel : 4; // [05] *OFF, 1-9 - u8 beep : 1 // 0x116D [09] *OFF, On + u8 beep : 1, // 0x116D [09] *OFF, On callKind : 2, // code says 1750,2100,1000,1450 as options // not on screen introScreen: 2, // [20] *OFF, Voltage, Char String diff --git a/chirp/drivers/tk760g.py b/chirp/drivers/tk760g.py index 858010beb..fd03cf3b6 100644 --- a/chirp/drivers/tk760g.py +++ b/chirp/drivers/tk760g.py @@ -216,7 +216,7 @@ // -- u8 ptt_id:2, // ??? BOT = 0, EOT = 1, Both = 2, NONE = 3 beat_shift:1, // 1 = off - unknown26:2 // ??? + unknown26:2, // ??? power:1, // power: 0 low / 1 high compander:1, // 1 = off wide:1; // wide 1 / 0 narrow diff --git a/chirp/drivers/tk8102.py b/chirp/drivers/tk8102.py index d4434e3e4..3371bf5bc 100644 --- a/chirp/drivers/tk8102.py +++ b/chirp/drivers/tk8102.py @@ -39,7 +39,7 @@ beatshift:1; u8 pttid:2, highpower:1, - scan:1 + scan:1, unknown2:4; u8 unknown3[2]; } memory[8]; diff --git a/chirp/drivers/uv5r.py b/chirp/drivers/uv5r.py index 4e1601fc2..9c16d7709 100644 --- a/chirp/drivers/uv5r.py +++ b/chirp/drivers/uv5r.py @@ -162,7 +162,7 @@ sftd:2, scode:4; u8 unknown4; - u8 unused3:1 + u8 unused3:1, step:3, unused4:4; u8 txpower:1, @@ -184,7 +184,7 @@ sftd:2, scode:4; u8 unknown4; - u8 unused3:1 + u8 unused3:1, step:3, unused4:4; u8 txpower:1, diff --git a/chirp/drivers/vx3.py b/chirp/drivers/vx3.py index fcbbd05ad..6cff08381 100644 --- a/chirp/drivers/vx3.py +++ b/chirp/drivers/vx3.py @@ -39,7 +39,7 @@ u8 unk01_1:3, att_broadcast:1, att_marine:1, - unk01_2:2 + unk01_2:2, att_wx:1; u8 unk02; u8 apo; diff --git a/chirp/drivers/vx8.py b/chirp/drivers/vx8.py index 2f6e571cf..91608472c 100644 --- a/chirp/drivers/vx8.py +++ b/chirp/drivers/vx8.py @@ -50,7 +50,7 @@ u8 lcd_dimmer; u8 dtmf_delay; u8 unknown0[3]; - u8 unknown1:4 + u8 unknown1:4, lcd_contrast:4; u8 lamp; u8 unknown2[7]; @@ -201,7 +201,7 @@ u8 unknown7:1, aprs_units_wind_mph:1, aprs_units_rain_inch:1, - aprs_units_temperature_f:1 + aprs_units_temperature_f:1, aprs_units_altitude_ft:1, unknown8:1, aprs_units_distance_m:1,