[chirp_devel] [PATCH] [thd72] Resolve some test failures. #81
Tom Hayward
Mon Jan 7 21:53:06 PST 2013
# HG changeset patch
# User Tom Hayward <tom at tomh.us>
# Date 1357624364 28800
# Node ID 5f8ff112c757bf0001345a267660991d1fc22826
# Parent 636a832a8d5afc85109f92d73381e1b713cd109f
[thd72] Resolve some test failures. #81
diff -r 636a832a8d5a -r 5f8ff112c757 chirp/thd72.py
--- a/chirp/thd72.py Mon Jan 07 21:50:56 2013 -0800
+++ b/chirp/thd72.py Mon Jan 07 21:52:44 2013 -0800
@@ -177,6 +177,8 @@
def get_features(self):
rf = chirp_common.RadioFeatures()
rf.memory_bounds = (0, 1031)
+ rf.valid_bands = [(118000000, 174000000),
+ (320000000, 524000000)]
rf.has_cross = True
rf.can_odd_split = True
rf.has_dtcs_polarity = False
@@ -198,7 +200,10 @@
def _detect_baud(self):
for baud in [9600, 19200, 38400, 57600]:
self.pipe.setBaudrate(baud)
- self.pipe.write("\r\r")
+ try:
+ self.pipe.write("\r\r")
+ except:
+ break
self.pipe.read(32)
try:
id = self.get_id()
diff -r 636a832a8d5a -r 5f8ff112c757 tests/run_tests
--- a/tests/run_tests Mon Jan 07 21:50:56 2013 -0800
+++ b/tests/run_tests Mon Jan 07 21:52:44 2013 -0800
@@ -696,6 +696,8 @@
return ""
def write(self, data):
pass
+ def setBaudrate(self, rate):
+ pass
def setTimeout(self, timeout):
pass
def setParity(self, parity):
More information about the chirp_devel
mailing list