# HG changeset patch # User Brad Schuler <brad@schuler.wsmailto:brad@schuler.ws> # Date 1604816852 25200 # Sat Nov 07 23:27:32 2020 -0700 # Node ID f13da43b1125af02a6dbc129a6e9e33760adc9a7 # Parent af9c114dd8c5d13c0a1031103900d7db5262bc62 [AnyTone 5888UV] Add limited squelch mode & fix file identifier
Set the radio's squelch mode to CTCSS/DCS Tones instead of Carrier when the receive tone mode is set. Recognize a file image from this radio when no metadata is present.
Related to issues 2989, 3653, 6633
diff -r af9c114dd8c5 -r f13da43b1125 chirp/drivers/anytone.py --- a/chirp/drivers/anytone.py Mon Nov 02 16:12:36 2020 -0700 +++ b/chirp/drivers/anytone.py Sat Nov 07 23:27:32 2020 -0700 @@ -68,7 +68,9 @@ u8 txcode; u8 rxcode; u8 unknown7[2]; - u8 unknown2[5]; + u8 unknown9:5, + sqlMode:3; // [Carrier, CTCSS/DCS Tones, Opt Sig Only, Tones & Opt Sig, Tones or Opt Sig] + u8 unknown2[4]; char name[7]; u8 unknownZ[2]; }; @@ -324,6 +326,7 @@ chirp_common.PowerLevel("Mid1", watts=25), chirp_common.PowerLevel("Mid2", watts=10), chirp_common.PowerLevel("Low", watts=5)] +SQL_MODES = ["Carrier", "CTCSS/DCS", "Opt Sig Only", "Tones AND Sig", "Tones OR Sig"]
@directory.register @@ -333,7 +336,7 @@ VENDOR = "AnyTone" MODEL = "5888UV" BAUD_RATE = 9600 - _file_ident = "QX588UV" + _file_ident = "588UVN" # May try to mirror the OEM behavior later _ranges = [ @@ -424,6 +427,8 @@ rxtone = txtone = None rxmode = TMODES[_mem.rxtmode] + if _mem.sqlMode == 0 or _mem.sqlMode == 2: + rxmode = TMODES.index('') txmode = TMODES[_mem.txtmode] if txmode == "Tone": txtone = TONES[_mem.txtone] @@ -472,6 +477,10 @@ _mem.txtmode = TMODES.index(txmode) _mem.rxtmode = TMODES.index(rxmode) + if rxmode != '': + _mem.sqlMode = SQL_MODES.index("CTCSS/DCS") + else: + _mem.sqlMode = SQL_MODES.index("Carrier") if txmode == "Tone": _mem.txtone = TONES.index(txtone) elif txmode == "DTCS":