[chirp_devel] [PATCH] [IC-W32E] support for E version of IC-W32

Marco Filippi IZ3GME
Thu Jan 7 03:20:16 PST 2016


# HG changeset patch
# User Marco Filippi <iz3gme.marco at gmail.com>
# Date 1452163645 -3600
#      Thu Jan 07 11:47:25 2016 +0100
# Node ID 8c70a47e3b6878fb84478299c5ca9acbc45ae068
# Parent  0f495ecad3d1121eb4b5d60ebb9b79cccf78f57a
[IC-W32E] support for E version of IC-W32

The only real difference from IC-W32A is _model id but to distinguish the
images an extra byte at the end is added

implement #280

diff --git a/chirp/drivers/icw32.py b/chirp/drivers/icw32.py
--- a/chirp/drivers/icw32.py
+++ b/chirp/drivers/icw32.py
@@ -206,3 +206,46 @@
     VARIANT = "UHF"
     _limits = (400000000, 470000000)
     _mem_positions = (0x06E0, 0x0E2E)
+
+
+# IC-W32E are the very same as IC-W32A but have a different _model
+ at directory.register
+class ICW32ERadio(ICW32ARadio):
+    """Icom IC-W32E"""
+    MODEL = "IC-W32E"
+
+    _model = "\x18\x82\x00\x02"
+
+    # an extra byte is added to distinguish file images from IC-W32A
+    # it will be allocated and initialized to 0x00 in _clone_from_radio
+    # (icf.py) but radio will not send it
+    # That byte is not sent to radio because the _clone_to_radio use _ranges
+    # for the send cycle
+    _memsize = ICW32ARadio._memsize + 1
+
+    def get_sub_devices(self):
+        # this is needed because sub devices must be of a child class
+        return [ICW32ERadioVHF(self._mmap), ICW32ERadioUHF(self._mmap)]
+
+    @classmethod
+    def match_model(cls, filedata, filename):
+        if not len(filedata) == cls._memsize:
+            return False
+        return filedata[-16 - 1: -1] == "IcomCloneFormat3" and \
+            filedata[-1] == chr(0x00)
+
+
+# this is the very same as ICW32ARadioVHF but have ICW32ERadio as parent class
+class ICW32ERadioVHF(ICW32ERadio):
+    """ICW32 VHF subdevice"""
+    VARIANT = "VHF"
+    _limits = (118000000, 174000000)
+    _mem_positions = (0x0000, 0x0DC0)
+
+
+# this is the very same as ICW32ARadioUHF but have ICW32ERadio as parent class
+class ICW32ERadioUHF(ICW32ERadio):
+    """ICW32 UHF subdevice"""
+    VARIANT = "UHF"
+    _limits = (400000000, 470000000)
+    _mem_positions = (0x06E0, 0x0E2E)
diff --git a/tests/images/Icom_IC-W32E.img b/tests/images/Icom_IC-W32E.img
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..32bee84e69f736de85c24e508bebdbda2d98cbbc
GIT binary patch
literal 4065
zc%1E*O;6h}7{{NaRLZ2T;>C!oFO at hj=F~|`B at QhKjA}FsZKhsRtvMh8-B5bZWtw*5
z!hvtOZ@~PLxFprks=-!GeJWM?>2E(TcH&1y<826GXUDV}mT6;*#zZkCoR1Y-LJt);
zgg#Z=6#A{=7T2S4#x~)4gavzV2Hl>|+0OKRo7#+hHQpBUBgWM#=Z2V{DE&a_cZyqF
z|19I5zVk3?G5#Xs4Qa<Y#f)!i+~1~0y?&Q-%=0r0(`s5GzZj?SnpU0rk8Pz>q5B!{
zTP#5oM at kp@#ff5(Uwo%n<TqW<*fzO7ttqYx{c9HAKHxkM at m>$<dsY$SfbWk19u0;8
zXCH$w?*sNaz2hQpf0X$^(NcZIe~)3w^7$Vbg&f%Xz9jj)c)f1EUNmUu*@u_qHfZbY
ze0 at j_C3)T|><4n@=I1$CZ2!;^esa8vp$veKN6&)uw|(pqpRs|4^vGq1UB4!Dr*C3z
zuJ5N at PkEX$m3$5<TPbJrZOLI8uM?c%LC<$X>Ca;Qjj(><hSM3dhUtz#u}PQ??egP#
zSV1{<3c6d+#quq|`>!p at _p#y?ulUzoJU{+*K7Yy%$)Ar7!38dyrzCuuL7vZ9KVtz)
zkC}+zv+?)$-(ZpTbiOC~c(?ide%n8{N at Z^bySvFVnPFs4hkK&Qare*Ve9mUB4=bQ;
zB(nbUs~;NZpv(JQbrUKZ8ms|i>!YVP9NB-_`WXD*Fi>0GXG>7hxIQ<2DDHz>Wf%)R
zDd;Ga_cisMaAU4?ZA}i)OYEm<*{W9`^0p|$g4P>dT;r3A%Lq&Bewti4my_%0WO8#g
HiYfdAjbW9=




More information about the chirp_devel mailing list