[chirp_devel] [PATCH] [uv-b5] Band Limit Settings
Jim Unroe
Mon Jun 3 18:34:36 PDT 2013
# HG changeset patch
# User Jim Unroe <rock.unroe at gmail.com>
# Date 1370306030 14400
# Node ID a0d56d430894ccadf19b644c3696dd2e9abd20b6
# Parent 73600ecef8e8a9a6ae24066e330503d1fbeaf607
[uv-b5] Band Limit Settings
Add settings for changing VHF and UHF lower and upper band limits
#905
diff -r 73600ecef8e8 -r a0d56d430894 chirp/uvb5.py
--- a/chirp/uvb5.py Wed May 29 10:53:01 2013 -0700
+++ b/chirp/uvb5.py Mon Jun 03 20:33:50 2013 -0400
@@ -83,6 +83,14 @@
struct {
u8 code[6];
} pttid;
+
+#seekto 0x0F30;
+struct {
+ lbcd lower_vhf[2];
+ lbcd upper_vhf[2];
+ lbcd lower_uhf[2];
+ lbcd upper_uhf[2];
+} limits;
"""
def do_ident(radio):
@@ -465,6 +473,42 @@
RadioSettingValueBoolean(self._memobj.settings.sidetone))
basic.append(rs)
+ _limit = int(self._memobj.limits.lower_vhf) / 10
+ rs = RadioSetting("limits.lower_vhf", "VHF Lower Limit (MHz)",
+ RadioSettingValueInteger(136, 174, _limit))
+ def apply_limit(setting, obj):
+ value = int(setting.value) * 10
+ obj.lower_vhf = value
+ rs.set_apply_callback(apply_limit, self._memobj.limits)
+ basic.append(rs)
+
+ _limit = int(self._memobj.limits.upper_vhf) / 10
+ rs = RadioSetting("limits.upper_vhf", "VHF Upper Limit (MHz)",
+ RadioSettingValueInteger(136, 174, _limit))
+ def apply_limit(setting, obj):
+ value = int(setting.value) * 10
+ obj.upper_vhf = value
+ rs.set_apply_callback(apply_limit, self._memobj.limits)
+ basic.append(rs)
+
+ _limit = int(self._memobj.limits.lower_uhf) / 10
+ rs = RadioSetting("limits.lower_uhf", "UHF Lower Limit (MHz)",
+ RadioSettingValueInteger(400, 520, _limit))
+ def apply_limit(setting, obj):
+ value = int(setting.value) * 10
+ obj.lower_uhf = value
+ rs.set_apply_callback(apply_limit, self._memobj.limits)
+ basic.append(rs)
+
+ _limit = int(self._memobj.limits.upper_uhf) / 10
+ rs = RadioSetting("limits.upper_uhf", "UHF Upper Limit (MHz)",
+ RadioSettingValueInteger(400, 520, _limit))
+ def apply_limit(setting, obj):
+ value = int(setting.value) * 10
+ obj.upper_uhf = value
+ rs.set_apply_callback(apply_limit, self._memobj.limits)
+ basic.append(rs)
+
return group
def set_settings(self, settings):
More information about the chirp_devel
mailing list