[chirp_devel] [PATCH] [UV-B5] Fix for Out-of-Range Error Messages
Jim Unroe
Sun Jan 26 13:50:19 PST 2014
# HG changeset patch
# User Jim Unroe <rock.unroe at gmail.com>
# Date 1390770962 18000
# Node ID c9768c64333e38a96b69afde08f8f744987529c9
# Parent d3be34229ec9102037aad4b211d06425adc83349
[UV-B5] Fix for Out-of-Range Error Messages
In addition to the regular OFF setting value, the OEM software
sometimes allows and uses the next higher value outside the range of
valid settings to indicate OFF.
This patch accomodates this behavior for both the TX Tone setting and
Time Out Timer settings.
#1405
diff -r d3be34229ec9 -r c9768c64333e chirp/uvb5.py
--- a/chirp/uvb5.py Sat Jan 11 10:13:38 2014 -0600
+++ b/chirp/uvb5.py Sun Jan 26 16:16:02 2014 -0500
@@ -76,7 +76,8 @@
voice_prompt:1,
fm:1,
pttid:2;
- u8 timeout;
+ u8 unknown_0:5,
+ timeout:3;
u8 mdf_b:2,
mdf_a:2,
unknown_1:2,
@@ -320,7 +321,9 @@
return repr(self._memobj.channels[number - 1])
def _decode_tone(self, value, flag):
- if value > 50:
+ if value > 155:
+ mode = val = pol = None
+ elif value > 50:
mode = 'DTCS'
val = chirp_common.DTCS_CODES[value - 51]
pol = flag and 'R' or 'N'
More information about the chirp_devel
mailing list