[chirp_devel] [PATCH 0 of 3 ] uv-b5 vs iz3gme saga - new episode
Hope these will end my fight with the uv-b5 split implementation ;)
On the go I discovered also that we were providing a tx freq of 600000 (0.6MHz) during split brute force test and then complain if radio deosn't validate it ...
73 de IZ3GME Marco
# HG changeset patch # User Marco Filippi iz3gme.marco@gmail.com # Date 1380363907 -7200 # Node ID d3d1557f76dda8f060d5b4b306b333a2514c7b89 # Parent ac65038940f227d46ba28186627b42108dae6447 [uv-b5] Add validation for max offset Noticed while implementing #1149
diff -r ac65038940f2 -r d3d1557f76dd chirp/uvb5.py --- a/chirp/uvb5.py Thu Sep 26 11:39:51 2013 +0200 +++ b/chirp/uvb5.py Sat Sep 28 12:25:07 2013 +0200 @@ -420,7 +420,8 @@ def validate_memory(self, mem): msgs = chirp_common.CloneModeRadio.validate_memory(self, mem)
- if mem.duplex == "split" and abs(mem.freq - mem.offset)>69995000: + if (mem.duplex == "split" and abs(mem.freq - mem.offset) > 69995000) or \ + (mem.duplex in ["+", "-"] and mem.offset > 69995000) : msgs.append(chirp_common.ValidationError( "Max split is 69.995MHz")) return msgs
# HG changeset patch # User Marco Filippi iz3gme.marco@gmail.com # Date 1380363913 -7200 # Node ID 2666a638f5265b9ae4b0701683a19361e14e5752 # Parent d3d1557f76dda8f060d5b4b306b333a2514c7b89 [uv-b5] Now we have to say it can odd_split Implement feature #1149
diff -r d3d1557f76dd -r 2666a638f526 chirp/uvb5.py --- a/chirp/uvb5.py Sat Sep 28 12:25:07 2013 +0200 +++ b/chirp/uvb5.py Sat Sep 28 12:25:13 2013 +0200 @@ -241,6 +241,7 @@ rf.valid_cross_modes = ["Tone->Tone", "Tone->DTCS", "DTCS->Tone", "->Tone", "->DTCS", "DTCS->", "DTCS->DTCS"] rf.valid_duplexes = DUPLEX + rf.can_odd_split = True rf.valid_skips = ["", "S"] rf.valid_characters = CHARSET rf.valid_name_length = 5
# HG changeset patch # User Marco Filippi iz3gme.marco@gmail.com # Date 1380364020 -7200 # Node ID 14064cca9c49bc4000809b77b90bfcbfa46c2631 # Parent 2666a638f5265b9ae4b0701683a19361e14e5752 [brute_force test] Provide credible frequencies in all cases Discovered while implementing #1149
diff -r 2666a638f526 -r 14064cca9c49 tests/run_tests --- a/tests/run_tests Sat Sep 28 12:25:13 2013 +0200 +++ b/tests/run_tests Sat Sep 28 12:27:00 2013 +0200 @@ -358,6 +358,8 @@ continue if duplex == "split" and not rf.can_odd_split: raise TestFailedError("Forgot to set rf.can_odd_split!") + if duplex == "split": + m.offset = rf.valid_bands[0][1] - 100000 m.duplex = duplex self.set_and_compare(m)
@@ -414,7 +416,7 @@ if rf.valid_bands: m.freq = rf.valid_bands[0][0] + 100000 else: - m.freq = 146.52 + m.freq = 146520000 if m.freq < 30000000 and "AM" in rf.valid_modes: m.mode = "AM" return m @@ -429,7 +431,10 @@ if 12.5 in rf.valid_tuning_steps and \ "split" in rf.valid_duplexes: m = clean_mem() - m.offset = 151137500 + if rf.valid_bands: + m.offset = rf.valid_bands[0][1] - 12500 + else: + m.offset = 151137500 m.duplex = "split" self.set_and_compare(m)
participants (1)
-
Marco Filippi IZ3GME