[chirp_devel] [PATCH 4 of 4] Make test more smart on tone and dtcs usage
Marco Filippi IZ3GME
Sat May 26 02:22:00 PDT 2012
# HG changeset patch
# User Marco Filippi <iz3gme.marco at gmail.com>
# Date 1337946960 -7200
# Node ID a5fa9ba1f9b68db0f9ecae1a9500cdcc7e650739
# Parent 29fa7ff1a8d8deac2cfa50811e71b808614bd997
Make test more smart on tone and dtcs usage
needed to follow improvement from Feature #100
diff -r 29fa7ff1a8d8 -r a5fa9ba1f9b6 tests/run_tests
--- a/tests/run_tests sab mag 26 10:43:35 2012 +0200
+++ b/tests/run_tests ven mag 25 13:56:00 2012 +0200
@@ -148,6 +148,9 @@
def compare_mem(self, a, b):
rf = self._wrapper.do("get_features")
+
+ if a.tmode == "Cross":
+ tx_mode, rx_mode = a.cross_mode.split("->")
for k, v in a.__dict__.items():
if k == "power":
@@ -160,15 +163,34 @@
else:
# Name mismatch fair if filter_name() is right
v = self._wrapper.do("filter_name", v).rstrip()
- elif k == "ctone" and not rf.has_ctone:
- continue
elif k == "tuning_step" and not rf.has_tuning_step:
continue
- elif k == "rtone" and a.tmode != "Tone":
+ elif k == "rtone" and not (
+ a.tmode == "Tone" or
+ (a.tmode == "TSQL" and not rf.has_ctone) or
+ (a.tmode == "Cross" and tx_mode == "Tone") or
+ (a.tmode == "Cross" and rx_mode == "Tone" and not rf.has_ctone)
+ ):
continue
- elif k == "ctone" and a.tmode != "TSQL":
+ elif k == "ctone" and (not rf.has_ctone or
+ not (
+ a.tmode == "TSQL" or
+ (a.tmode == "Cross" and rx_mode == "Tone")
+ )
+ ):
continue
- elif k == "dtcs" and a.tmode != "DTCS":
+ elif k == "dtcs" and not (
+ (a.tmode == "DTCS" and not rf.has_rx_dtcs) or
+ (a.tmode == "Cross" and tx_mode == "DTCS") or
+ (a.tmode == "Cross" and rx_mode == "DTCS" and not rf.has_rx_dtcs)
+ ):
+ continue
+ elif k == "rx_dtcs" and (not rf.has_rx_dtcs or
+ not (
+ a.tmode == "DTCS" or
+ (a.tmode == "Cross" and rx_mode == "DTCS")
+ )
+ ):
continue
elif k == "offset" and not a.duplex:
continue
@@ -323,6 +345,8 @@
# of TSQL
m.rtone = 100.0
m.ctone = 107.2
+ m.dtcs = 506
+ m.rx_dtcs = 516
for cross_mode in rf.valid_cross_modes:
m.cross_mode = cross_mode
self.set_and_compare(m)
More information about the chirp_devel
mailing list