[chirp_devel] [PATCH 0 of 2 ] kenwood_live untested changes
Even though I cannot test the code bug fix (and changed code) is pretty obvious.
I think an "eyes review" it's enought if no developer have a THD7 handy
73 de IZ3GME Marco
# HG changeset patch # User Marco Filippi iz3gme.marco@gmail.com # Date 1425894684 -3600 # Mon Mar 09 10:51:24 2015 +0100 # Node ID 2208e480a5f255be20399d2e39d8e5910ea1ffdc # Parent 2501735ee4385f8ccd772d9e2f2c6e39f48b0e5e [THD7] Fix settings support
Even though I cannot test it the bug, introduced with r1594, is pretty obvious
Fix #2401
diff --git a/chirp/drivers/kenwood_live.py b/chirp/drivers/kenwood_live.py --- a/chirp/drivers/kenwood_live.py +++ b/chirp/drivers/kenwood_live.py @@ -406,9 +406,9 @@ ("BCN", aprs, "Beacon"), ("CH", radio, "Channel Mode Display"), # ("DIG", aprs, "APRS Digipeater"), - ("DL", all, "Dual"), - ("LK", all, "Lock"), - ("LMP", all, "Lamp"), + ("DL", top, "Dual"), + ("LK", top, "Lock"), + ("LMP", top, "Lamp"), ("TSP", dtmf, "DTMF Fast Transmission"), ("TXH", dtmf, "TX Hold"), ] @@ -419,7 +419,7 @@ RadioSettingValueBoolean(value)) group.append(rs)
- lists = [("BAL", all, "Balance"), + lists = [("BAL", top, "Balance"), ("BEP", aux, "Beep"), ("BEPT", aprs, "APRS Beep"), ("DS", tnc, "Data Sense"), @@ -427,7 +427,7 @@ ("DTBA", aprs, "APRS Data Band"), ("DTX", aprs, "APRS Data TX"), # ("ICO", aprs, "APRS Icon"), - ("MNF", all, "Memory Display Mode"), + ("MNF", top, "Memory Display Mode"), ("PKSA", aprs, "APRS Packet Speed"), ("POSC", aprs, "APRS Position Comment"), ("PT", dtmf, "DTMF Speed"),
# HG changeset patch # User Marco Filippi iz3gme.marco@gmail.com # Date 1425895354 -3600 # Mon Mar 09 11:02:34 2015 +0100 # Node ID 6f09ff82562904605293bdfc05f8b3e0c09c60fa # Parent 2208e480a5f255be20399d2e39d8e5910ea1ffdc [kenwood_live module] Remove unnecessary duplicated function
There was a duplicated function definition, I removed both as they are old test functions
Seen while working on #2401
diff --git a/chirp/drivers/kenwood_live.py b/chirp/drivers/kenwood_live.py --- a/chirp/drivers/kenwood_live.py +++ b/chirp/drivers/kenwood_live.py @@ -1177,42 +1177,6 @@ # seems that this is a perfect clone of TM271 with just a different model
-def do_test(): - """Dev test""" - mem = chirp_common.Memory() - mem.number = 1 - mem.freq = 144000000 - mem.duplex = "split" - mem.offset = 146000000 - - tc = THF6ARadio - - class FakeSerial: - """Faked serial line""" - buf = "" - - def write(self, buf): - """Write""" - self.buf = buf - - def read(self, count): - """Read""" - if self.buf[:2] == "ID": - return "ID %s\r" % tc.MODEL - return self.buf - - def setTimeout(self, foo): - """Set Timeout""" - pass - - def setBaudrate(self, foo): - """Set Baudrate""" - pass - - radio = tc(FakeSerial()) - radio.set_memory(mem) - - @directory.register class TM471Radio(THK2Radio): """Kenwood TM-471""" @@ -1246,43 +1210,3 @@
def _cmd_set_memory_name(self, number, name): return "MN", "%03i,%s" % (number, name) - - -def do_test(): - """Dev test""" - mem = chirp_common.Memory() - mem.number = 1 - mem.freq = 440000000 - mem.duplex = "split" - mem.offset = 442000000 - - tc = THF6ARadio - - class FakeSerial: - """Faked serial line""" - buf = "" - - def write(self, buf): - """Write""" - self.buf = buf - - def read(self, count): - """Read""" - if self.buf[:2] == "ID": - return "ID %s\r" % tc.MODEL - return self.buf - - def setTimeout(self, foo): - """Set Timeout""" - pass - - def setBaudrate(self, foo): - """Set Baudrate""" - pass - - radio = tc(FakeSerial()) - radio.set_memory(mem) - - -if __name__ == "__main__": - do_test()
participants (1)
-
Marco Filippi IZ3GME