ft857: Fix incorrect DTCS handling

This driver has been broken forever in how it handles DTCS tone mode.
It was always using the rx_dtcs field, which should only be honored
in a ->DTCS cross mode. The new GUI, being in hide-unused-fields mode
always made this clear, as it appeared to be snapping back to 023
always when the user selected a different value.

Note that the test is *also* broken, which I will fix at the end of
this series.

Related to #11506
This commit is contained in:
Dan Smith 2024-08-29 17:09:52 -07:00 committed by Dan Smith
parent 4c6379e81e
commit f949fb7ed0

View File

@ -514,7 +514,7 @@ class FT857Radio(ft817.FT817Radio):
# this code has already been tested
_mem.dcs = _mem.rxdcs = chirp_common.DTCS_CODES.index(mem.dtcs)
elif mem.tmode == "DTCS":
_mem.dcs = _mem.rxdcs = chirp_common.DTCS_CODES.index(mem.rx_dtcs)
_mem.dcs = _mem.rxdcs = chirp_common.DTCS_CODES.index(mem.dtcs)
elif mem.tmode == "Cross":
_mem.tone = chirp_common.TONES.index(mem.rtone)
_mem.rxtone = chirp_common.TONES.index(mem.ctone)