[chirp_devel] [PATCH 1 of 2] [BF-A58S] baofeng_w970i.py driver cleanup
# HG changeset patch # User Jim Unroe rock.unroe@gmail.com # Date 1594652731 14400 # Mon Jul 13 11:05:31 2020 -0400 # Node ID a832fc7ae354baa666c902ce96f93327622dfa5d # Parent 061e53a8a2cc1699bda1df5464be505ca32d572f [BF-A58S] baofeng_w970i.py driver cleanup
This patch cleans up the current tri-band radio model suppport in preperation for fixing the band limit support in the following patch.
Related to these and similar Baofeng tri-band models: BF-A58S UV-82III BF-UVF10
related to #8063
diff -r 061e53a8a2cc -r a832fc7ae354 chirp/drivers/baofeng_wp970i.py --- a/chirp/drivers/baofeng_wp970i.py Fri Jul 10 07:24:21 2020 -0700 +++ b/chirp/drivers/baofeng_wp970i.py Mon Jul 13 11:05:31 2020 -0400 @@ -109,6 +109,7 @@ chirp_common.PowerLevel("Med", watts=3.00), chirp_common.PowerLevel("Low", watts=1.00)] _vhf_range = (130000000, 180000000) + _vhf2_range = (200000000, 260000000) _uhf_range = (400000000, 521000000) VALID_BANDS = [_vhf_range, _uhf_range] @@ -899,7 +900,7 @@ def get_features(self): rf = WP970I.get_features(self) rf.valid_bands = [self._vhf_range, - (200000000, 260000000), + self._vhf2_range, self._uhf_range] return rf
# HG changeset patch # User Jim Unroe rock.unroe@gmail.com # Date 1594659292 14400 # Mon Jul 13 12:54:52 2020 -0400 # Node ID 76f7067b0c5062bf55273a64cab6822c18cafeaa # Parent a832fc7ae354baa666c902ce96f93327622dfa5d [BF-A58S] baofeng_w970i.py driver update support for band limts
This patch updates the current tri-band radio model suppport to fully implement the available band limit settings.
Related to these and similar Baofeng tri-band models: BF-A58S UV-82III BF-UVF10
related to #8063
diff -r a832fc7ae354 -r 76f7067b0c50 chirp/drivers/baofeng_wp970i.py --- a/chirp/drivers/baofeng_wp970i.py Mon Jul 13 11:05:31 2020 -0400 +++ b/chirp/drivers/baofeng_wp970i.py Mon Jul 13 12:54:52 2020 -0400 @@ -83,6 +83,7 @@ VENDOR = "Baofeng" MODEL = "WP970I"
+ _tri_band = False _fileid = [] _magic = [MSTRING_WP970I, ] _magic_response_length = 8 @@ -303,6 +304,7 @@ struct { struct limit vhf; struct limit uhf; + struct limit vhf2; } limits;
""" @@ -592,6 +594,19 @@ lower, upper, _mem.limits.vhf.upper)) other.append(rs)
+ if self._tri_band: + lower = 200 + upper = 260 + rs = RadioSetting("limits.vhf2.lower", "VHF2 Lower Limit (MHz)", + RadioSettingValueInteger( + lower, upper, _mem.limits.vhf2.lower)) + other.append(rs) + + rs = RadioSetting("limits.vhf2.upper", "VHF2 Upper Limit (MHz)", + RadioSettingValueInteger( + lower, upper, _mem.limits.vhf2.upper)) + other.append(rs) + lower = 400 upper = 520 rs = RadioSetting("limits.uhf.lower", "UHF Lower Limit (MHz)", @@ -896,6 +911,7 @@ VENDOR = "Baofeng" MODEL = "BF-A58S" ALIASES = [UV82IIIAlias] + _tri_band = True
def get_features(self): rf = WP970I.get_features(self)
participants (1)
-
Jim Unroe