[chirp_devel] [PATCH] [tg_uv2p] Add support for vfo mode setting Fixes third issue in #9939
Ran Katz
Wed Aug 3 03:55:00 PDT 2022
# HG changeset patch
# User Ran Katz <rankatz at gmail.com>
# Date 1659524069 -10800
# Wed Aug 03 13:54:29 2022 +0300
# Node ID 5dbf582fbc464805b2e5322920f04d78a28a8947
# Parent 6ee649b0382a7f4a6f6b6a1794a4e15b515f5009
[tg_uv2p] Add support for vfo mode setting Fixes third issue in #9939
VFO mode setting controls whether the user can use vfo or only memory channels
diff --git a/chirp/drivers/tg_uv2p.py b/chirp/drivers/tg_uv2p.py
--- a/chirp/drivers/tg_uv2p.py
+++ b/chirp/drivers/tg_uv2p.py
@@ -534,6 +534,20 @@
_settings.not_end_tone_elim))
cfg_grp.append(rs)
+ # VFO mode
+
+ if _settings.vfo_mode >= 1:
+ _vfo_mode = 0xFF
+ else:
+ _vfo_mode = _settings.vfo_mode
+ mem_vals = [0xFF, 0]
+ user_options = ["VFO Mode Enabled", "VFO Mode Disabled"]
+ options_map = zip(user_options, mem_vals)
+
+ rs = RadioSetting("vfo_mode", "VFO (CH only) mode",
+ RadioSettingValueMap(options_map, _vfo_mode))
+ cfg_grp.append(rs)
+
#
# VFO Settings
#
@@ -671,7 +685,9 @@
continue
else:
try:
- if "vfo" in element.get_name():
+ if "vfoa" in element.get_name():
+ continue
+ if "vfob" in element.get_name():
continue
elif "." in element.get_name():
bits = element.get_name().split(".")
More information about the chirp_devel
mailing list