# HG changeset patch # User Marco Filippi iz3gme.marco@gmail.com # Date 1349967134 -7200 # Node ID c03ed75f179a183ce8f1ae537bcc690ca4de3c71 # Parent 3d07647800a1c88409265904d02232dcfded3722 [KG-UVD1P KG-UV6D KG-UV6X] Change match_model to avoid wrong model identification Removed KG-UV6X as is the same radio as KG-UV6D but with different freq range which will be managed as side effect of Feature #285, now there's only KG-UV6 Fix Bug #312
diff -r 3d07647800a1 -r c03ed75f179a chirp/wouxun.py --- a/chirp/wouxun.py sab ott 06 07:18:48 2012 -0700 +++ b/chirp/wouxun.py gio ott 11 16:52:14 2012 +0200 @@ -466,9 +466,7 @@ # New-style image (CHIRP 0.1.12) if len(filedata) == 8192 and \ filedata[0x60:0x64] != "2009" and \ - filedata[0xf00:0xf05] != "KGUV6": - # TODO Must find an == test to avoid - # collision with future supported radios + filedata[0x1f77:0x1f7d] == "\xff\xff\xff\xff\xff\xff": # that area is (seems to be) unused return True # Old-style image (CHIRP 0.1.11) if len(filedata) == 8200 and \ @@ -478,7 +476,7 @@
@directory.register class KGUV6DRadio(KGUVD1PRadio): - MODEL = "KG-UV6D" + MODEL = "KG-UV6"
def get_features(self): rf = KGUVD1PRadio.get_features(self) @@ -535,27 +533,10 @@ @classmethod def match_model(cls, filedata, filename): if len(filedata) == 8192 and \ - filedata[0xf00:0xf06] == "KGUV6D": + filedata[0x1f77:0x1f7d] == "WELCOM": return True return False
-@directory.register -class KGUV6XRadio(KGUV6DRadio): - MODEL = "KG-UV6X" - - def get_features(self): - rf = KGUV6DRadio.get_features(self) - rf.valid_bands = [(136000000, 175000000), (375000000, 512000000)] - return rf - - @classmethod - def match_model(cls, filedata, filename): - if len(filedata) == 8192 and \ - filedata[0xf00:0xf06] == "KGUV6X": - return True - return False - - def _puxing_prep(radio): radio.pipe.write("\x02PROGRA") ack = radio.pipe.read(1) diff -r 3d07647800a1 -r c03ed75f179a tests/images/Wouxun_KG-UV6.img Binary file tests/images/Wouxun_KG-UV6.img has changed diff -r 3d07647800a1 -r c03ed75f179a tests/images/Wouxun_KG-UV6D.img Binary file tests/images/Wouxun_KG-UV6D.img has changed diff -r 3d07647800a1 -r c03ed75f179a tests/images/Wouxun_KG-UV6X.img Binary file tests/images/Wouxun_KG-UV6X.img has changed