[chirp_devel] [PATCH] [UV-B5] Fix for Beep Prompt Setting
Jim Unroe
Tue Jan 21 16:21:48 PST 2014
# HG changeset patch
# User Jim Unroe <rock.unroe at gmail.com>
# Date 1390348914 18000
# Node ID b1b3a5e7255462ac5a00ceea154ee97d1123b0e1
# Parent d3be34229ec9102037aad4b211d06425adc83349
[UV-B5] Fix for Beep Prompt Setting
This patch corrects a problem where editing the "Beep Prompt" always
resulted in the value being set to False (enabled in the radio).
The setting "beep_tone" was renamed "beep_tone_disabled" to make it easier
to follow the logic of the setting.
beep_tone_disabled = True = OFF in radio
beep_tone_disabled = False = ON in radio
#1381
diff -r d3be34229ec9 -r b1b3a5e72554 chirp/uvb5.py
--- a/chirp/uvb5.py Sat Jan 11 10:13:38 2014 -0600
+++ b/chirp/uvb5.py Tue Jan 21 19:01:54 2014 -0500
@@ -65,7 +65,7 @@
u8 freqmode_ab:1,
save_funct:1,
backlight:1,
- beep_tone:1,
+ beep_tone_disabled:1,
roger:1,
tdr:1,
scantype:2;
@@ -592,8 +592,9 @@
RadioSettingValueBoolean(_settings.fm))
basic.append(rs)
- rs = RadioSetting("beep_tone", "Beep Prompt",
- RadioSettingValueBoolean(not _settings.beep_tone))
+ rs = RadioSetting("beep_tone_disabled", "Beep Prompt",
+ RadioSettingValueBoolean(
+ not _settings.beep_tone_disabled))
basic.append(rs)
rs = RadioSetting("voice_prompt", "Voice Prompt",
@@ -726,9 +727,10 @@
if element.has_apply_callback():
print "Using apply callback"
element.run_apply_callback()
- elif setting == "beep_tone":
- print "Setting %s = %s" % (setting, not element.value)
- setattr(obj, setting, not element.value)
+ elif setting == "beep_tone_disabled":
+ val = not _settings.beep_tone_disabled
+ print "Setting %s = %s" % (setting, val)
+ setattr(obj, setting, val)
else:
print "Setting %s = %s" % (setting, element.value)
setattr(obj, setting, element.value)
More information about the chirp_devel
mailing list