[chirp_devel] [PATCH] [UV-5R] Improve Out-of-Range Value Handling for Alarm-Mode Setting
Jim Unroe
Tue Oct 14 17:37:04 PDT 2014
# HG changeset patch
# User Jim Unroe <rock.unroe at gmail.com>
# Date 1413333059 14400
# Node ID 9ecc6f8a0a813763d159e6582d61a9f15c076c2a
# Parent 3438820c4164b9495ce13c9787d328c683025c71
[UV-5R] Improve Out-of-Range Value Handling for Alarm-Mode Setting
Current Out-of-Range Value Handling for Alarm-Mode Only Partially Works
Remove "_unknown_" value from ALMOD_LIST
Force CHIRP to show "TONE" for out-of-range values (which matches the
radio's behavior when this setting has an out-of range value)
Bug #1967
diff -r 3438820c4164 -r 9ecc6f8a0a81 chirp/uv5r.py
--- a/chirp/uv5r.py Mon Sep 29 10:20:22 2014 +0100
+++ b/chirp/uv5r.py Tue Oct 14 20:30:59 2014 -0400
@@ -264,7 +264,7 @@
BASETYPE_F8HP
AB_LIST = ["A", "B"]
-ALMOD_LIST = ["Site", "Tone", "Code", "_unknown_"]
+ALMOD_LIST = ["Site", "Tone", "Code"]
BANDWIDTH_LIST = ["Wide", "Narrow"]
COLOR_LIST = ["Off", "Blue", "Orange", "Purple"]
DTMFSPEED_LIST = ["%s ms" % x for x in range(50, 2010, 10)]
@@ -1006,9 +1006,13 @@
RadioSettingValueBoolean(_settings.alarm))
advanced.append(rs)
+ if _settings.almod > 0x02:
+ val = 0x01
+ else:
+ val = _settings.almod
rs = RadioSetting("almod", "Alarm Mode",
RadioSettingValueList(ALMOD_LIST,
- ALMOD_LIST[_settings.almod]))
+ ALMOD_LIST[val]))
advanced.append(rs)
rs = RadioSetting("beep", "Beep",
More information about the chirp_devel
mailing list