[chirp_devel] [PATCH] [LT-580] Add Support for Luiton LT-580 Mobile Radios

Jim Unroe
Sat May 6 15:18:56 PDT 2017


# HG changeset patch
# User Jim Unroe <rock.unroe at gmail.com>
# Date 1494108983 14400
# Node ID 1032d003d8eac7b38bee5bf7ef47441866f11064
# Parent  55efac8845ad21bd404ecd9c94e8dfcb787c47c1
[LT-580] Add Support for Luiton LT-580 Mobile Radios

This patch adds the Luition LT-580 VHF and LT-580 UHF mobile radios to
the TYT TH-9000 driver.

#4231

diff -r 55efac8845ad -r 1032d003d8ea chirp/drivers/th9000.py
--- a/chirp/drivers/th9000.py	Sat Apr 08 20:02:48 2017 -0400
+++ b/chirp/drivers/th9000.py	Sat May 06 18:16:23 2017 -0400
@@ -434,7 +434,8 @@
     endframe = "\x45\x4E\x44"
     _echo_write(radio, endframe)
     result = radio.pipe.read(1)
-    if result != "\x06":
+    # TYT radios acknowledge the "endframe" command, Luiton radios do not.
+    if result != "" and result != "\x06":  
         LOG.error( "Got:\n%s" % util.hexprint(result))
         raise errors.RadioError("Radio did not finish cleanly")
 
@@ -813,6 +814,17 @@
 
         return False
 
+# Declaring Aliases (Clones of the real radios)
+class LT580VHF(chirp_common.Alias):
+    VENDOR = "LUITON"
+    MODEL = "LT-580_VHF"
+
+
+class LT580UHF(chirp_common.Alias):
+    VENDOR = "LUITON"
+    MODEL = "LT-580_UHF"
+
+
 @directory.register
 class Th9000220Radio(Th9000Radio):
     """TYT TH-9000 220"""
@@ -828,6 +840,7 @@
     MODEL = "TH9000_144" 
     BAUD_RATE = 9600 
     valid_freq = [(136000000, 174000000)]
+    ALIASES = [LT580VHF, ]
 
 @directory.register
 class Th9000440Radio(Th9000220Radio):
@@ -836,3 +849,4 @@
     MODEL = "TH9000_440" 
     BAUD_RATE = 9600 
     valid_freq = [(400000000, 490000000)]
+    ALIASES = [LT580UHF, ]



More information about the chirp_devel mailing list