# HG changeset patch # User Marco Filippi iz3gme.marco@gmail.com # Date 1352100940 -3600 # Node ID b37eebb2372414a37bd2180f72932b77719434c9 # Parent 17c395df835a5e2fa88574cbeab7df2431237e06 [KG-UVD1P KG-UV6] Add experimental warning for freq ranges write Feature #285
diff --git a/chirp/wouxun.py b/chirp/wouxun.py --- a/chirp/wouxun.py +++ b/chirp/wouxun.py @@ -25,10 +25,6 @@
FREQ_ENCODE_TABLE = [ 0x7, 0xa, 0x0, 0x9, 0xb, 0x2, 0xe, 0x1, 0x3, 0xf ]
-# writing bad frequency ranges on the radio can brick it -# the encode function here has not been tested -# it has been included for documentation purpouse only as I never call it -# you have been warned, use at your own risk def encode_freq(freq): """Convert frequency (4 decimal digits) to wouxun format (2 bytes)""" enc = 0 @@ -51,7 +47,8 @@ return freq
@directory.register -class KGUVD1PRadio(chirp_common.CloneModeRadio): +class KGUVD1PRadio(chirp_common.CloneModeRadio, + chirp_common.ExperimentalRadio): """Wouxun KG-UVD1P,UV2,UV3""" VENDOR = "Wouxun" MODEL = "KG-UVD1P" @@ -112,6 +109,15 @@ } names[199]; """
+ @classmethod + def get_experimental_warning(cls): + return ('This version of the Wouxun driver allows you to modify the ' + 'frequency range settings of your radio. This has been tested ' + 'and reports from other users indicate that it is a safe ' + 'thing to do. However, modifications to this value may have ' + 'unintended consequences, including damage to your device. ' + 'You have been warned. Proceed at your own risk!') + def _identify(self): """Do the original wouxun identification dance""" for _i in range(0, 5):