<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>This is my first patch submission. Please let me know if I did int right.<br><br><div><span style="font-size: 13pt;">-- wireless <<a href="mailto:Joseph.P.Scanlan@n7xsd.us">Joseph.P.Scanlan@n7xsd.us</a>> +1-702-896-0507</span></div>-- work <<a href="mailto:Joseph.P.Scanlan@clarkcountynv.gov">Joseph.P.Scanlan@ClarkCountyNV.gov</a>> +1-702-455-3679<br><div>-- </div><div>These mechanics</div><div>and mathematics</div><div>they give me comfort</div><div>when I'm afraid.</div><div> —Venus Hum</div></div><div><br>On Dec 10, 2015, at 10:13 AM, Joseph.P.Scanlan--- via chirp_devel <<a href="mailto:chirp_devel@intrepid.danplanet.com">chirp_devel@intrepid.danplanet.com</a>> wrote:<br><br></div><blockquote type="cite"><div><span></span><br><span># HG changeset patch</span><br><span># User <<a href="mailto:Joseph.P.Scanlan@n7xsd.us">Joseph.P.Scanlan@n7xsd.us</a>></span><br><span># Date 1449768806 28800</span><br><span># Thu Dec 10 09:33:26 2015 -0800</span><br><span># Node ID 5041a82f811b692759ce75b4520ad34b553cc572</span><br><span># Parent 95684405e6c32047c1d9e61a0e152cb198cbaf27</span><br><span>[ic7000]Digital Code Squelch for IC-7000 channels. Fixes bug #3047</span><br><span>Corrected reading of DCS from memory.</span><br><span>Added writing of DCS to memory.</span><br><span>Added reading and writing DCS polarity to memory.</span><br><span></span><br><span>diff -r 95684405e6c3 -r 5041a82f811b chirp/drivers/icomciv.py</span><br><span>--- a/chirp/drivers/icomciv.py Mon Nov 30 10:15:59 2015 -0800</span><br><span>+++ b/chirp/drivers/icomciv.py Thu Dec 10 09:33:26 2015 -0800</span><br><span>@@ -30,8 +30,8 @@</span><br><span> bbcd rtone[2];</span><br><span> u8 unknown5;</span><br><span> bbcd ctone[2];</span><br><span>-u8 unknown6[2];</span><br><span>-bbcd dtcs;</span><br><span>+u8 dtcs_polarity;</span><br><span>+bbcd dtcs[2];</span><br><span> u8 unknown[17];</span><br><span> char name[9];</span><br><span> """</span><br><span>@@ -50,8 +50,8 @@</span><br><span> bbcd rtone[2];</span><br><span> u8 unknown5;</span><br><span> bbcd ctone[2];</span><br><span>-u8 unknown6[2];</span><br><span>-bbcd dtcs;</span><br><span>+u8 dtcs_polarity;</span><br><span>+bbcd dtcs[2];</span><br><span> u8 unknown[11];</span><br><span> char name[9];</span><br><span> """</span><br><span>@@ -265,9 +265,18 @@</span><br><span> if self._rf.valid_tmodes:</span><br><span> mem.tmode = self._rf.valid_tmodes[memobj.tmode]</span><br><span></span><br><span>+ if self._rf.has_dtcs_polarity:</span><br><span>+ if memobj.dtcs_polarity == 0x11:</span><br><span>+ mem.dtcs_polarity = "RR"</span><br><span>+ elif memobj.dtcs_polarity == 0x10:</span><br><span>+ mem.dtcs_polarity = "RN"</span><br><span>+ elif memobj.dtcs_polarity == 0x01:</span><br><span>+ mem.dtcs_polarity = "NR"</span><br><span>+ else:</span><br><span>+ mem.dtcs_polarity = "NN"</span><br><span>+</span><br><span> if self._rf.has_dtcs:</span><br><span>- # FIXME</span><br><span>- mem.dtcs = bitwise.bcd_to_int([memobj.dtcs])</span><br><span>+ mem.dtcs = bitwise.bcd_to_int(memobj.dtcs)</span><br><span></span><br><span> if "Tone" in self._rf.valid_tmodes:</span><br><span> mem.rtone = int(memobj.rtone) / 10.0</span><br><span>@@ -308,6 +317,19 @@</span><br><span> memobj.ctone = int(mem.ctone * 10)</span><br><span> memobj.rtone = int(mem.rtone * 10)</span><br><span></span><br><span>+ if self._rf.has_dtcs_polarity:</span><br><span>+ if mem.dtcs_polarity == "RR":</span><br><span>+ memobj.dtcs_polarity = 0x11</span><br><span>+ elif mem.dtcs_polarity == "RN":</span><br><span>+ memobj.dtcs_polarity = 0x10</span><br><span>+ elif mem.dtcs_polarity == "NR":</span><br><span>+ memobj.dtcs_polarity = 0x01</span><br><span>+ else:</span><br><span>+ memobj.dtcs_polarity = 0x00</span><br><span>+</span><br><span>+ if self._rf.has_dtcs:</span><br><span>+ bitwise.int_to_bcd(memobj.dtcs, mem.dtcs)</span><br><span>+</span><br><span> LOG.debug(repr(memobj))</span><br><span> self._send_frame(f)</span><br><span>_______________________________________________</span><br><span>chirp_devel mailing list</span><br><span><a href="mailto:chirp_devel@intrepid.danplanet.com">chirp_devel@intrepid.danplanet.com</a></span><br><span><a href="http://intrepid.danplanet.com/mailman/listinfo/chirp_devel">http://intrepid.danplanet.com/mailman/listinfo/chirp_devel</a></span><br><span>Developer docs: <a href="http://chirp.danplanet.com/projects/chirp/wiki/Developers">http://chirp.danplanet.com/projects/chirp/wiki/Developers</a></span><br></div></blockquote></body></html>