[chirp_devel] [PATCH 0 of 1 ] RFC IC-W32E implementation
This patch pass all tests but I'd like to have someone (Dan?) review it before I send it to user for test If some one have an IC-W32E please test it, tnx
73 de IZ3GME Marco
# HG changeset patch # User Marco Filippi iz3gme.marco@gmail.com # Date 1444980207 -7200 # Fri Oct 16 09:23:27 2015 +0200 # Node ID 821f51d2de460ab6e2f9dbb1569da50955f32f59 # Parent c4c8e16eb73978221db153e56beb71d2785be146 [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 +@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@hj=F~|`B@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@kp@#ff5(Uwo%n<TqW*fzO7ttqYx{c9HAKHxkM@m$<dsY$SfbWk19u0;8 zXCH$w?*sNaz2hQpf0X$^(NcZIe~)3w^7$Vbg&f%Xz9jj)c)f1EUNmUu*@u_qHfZbY ze0@j_C3)T|><4n@=I1$CZ2!;^esa8vp$veKN6&)uw|(pqpRs|4^vGq1UB4!Dr*C3z zuJ5N@PkEX$m3$5<TPbJrZOLI8uM?c%LC<$X>Ca;Qjj(><hSM3dhUtz#u}PQ??egP# zSV1{<3c6d+#quq|`>!p@_p#y?ulUzoJU{+*K7Yy%$)Ar7!38dyrzCuuL7vZ9KVtz) zkC}+zv+?)$-(ZpTbiOC~c(?ide%n8{N@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=
# HG changeset patch # User Marco Filippi iz3gme.marco@gmail.com # Date 1444980207 -7200 # Fri Oct 16 09:23:27 2015 +0200 # Node ID 821f51d2de460ab6e2f9dbb1569da50955f32f59 # Parent c4c8e16eb73978221db153e56beb71d2785be146 [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
I guess I'm surprised that it's indeed any different, most of the -E models are not. But, if this fixes the problem it looks okay to me otherwise.
Thanks!
--Dan
Tnx, I'll send the patched file to user for testing
73 de IZ3GME Marco
On 16/10/2015 17:43, Dan Smith wrote:
# HG changeset patch # User Marco Filippi iz3gme.marco@gmail.com # Date 1444980207 -7200 # Fri Oct 16 09:23:27 2015 +0200 # Node ID 821f51d2de460ab6e2f9dbb1569da50955f32f59 # Parent c4c8e16eb73978221db153e56beb71d2785be146 [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
I guess I'm surprised that it's indeed any different, most of the -E models are not. But, if this fixes the problem it looks okay to me otherwise.
Thanks!
--Dan
participants (3)
-
Dan Smith
-
IZ3GME Marco
-
Marco Filippi IZ3GME