[chirp_devel] [ic7000]Digital Code Squelch for IC-7000 channels. Fixes bug #3047

# HG changeset patch # User Joseph.P.Scanlan@n7xsd.us # Date 1449768806 28800 # Thu Dec 10 09:33:26 2015 -0800 # Node ID 5041a82f811b692759ce75b4520ad34b553cc572 # Parent 95684405e6c32047c1d9e61a0e152cb198cbaf27 [ic7000]Digital Code Squelch for IC-7000 channels. Fixes bug #3047 Corrected reading of DCS from memory. Added writing of DCS to memory. Added reading and writing DCS polarity to memory.
diff -r 95684405e6c3 -r 5041a82f811b chirp/drivers/icomciv.py --- a/chirp/drivers/icomciv.py Mon Nov 30 10:15:59 2015 -0800 +++ b/chirp/drivers/icomciv.py Thu Dec 10 09:33:26 2015 -0800 @@ -30,8 +30,8 @@ bbcd rtone[2]; u8 unknown5; bbcd ctone[2]; -u8 unknown6[2]; -bbcd dtcs; +u8 dtcs_polarity; +bbcd dtcs[2]; u8 unknown[17]; char name[9]; """ @@ -50,8 +50,8 @@ bbcd rtone[2]; u8 unknown5; bbcd ctone[2]; -u8 unknown6[2]; -bbcd dtcs; +u8 dtcs_polarity; +bbcd dtcs[2]; u8 unknown[11]; char name[9]; """ @@ -265,9 +265,18 @@ if self._rf.valid_tmodes: mem.tmode = self._rf.valid_tmodes[memobj.tmode]
+ if self._rf.has_dtcs_polarity: + if memobj.dtcs_polarity == 0x11: + mem.dtcs_polarity = "RR" + elif memobj.dtcs_polarity == 0x10: + mem.dtcs_polarity = "RN" + elif memobj.dtcs_polarity == 0x01: + mem.dtcs_polarity = "NR" + else: + mem.dtcs_polarity = "NN" + if self._rf.has_dtcs: - # FIXME - mem.dtcs = bitwise.bcd_to_int([memobj.dtcs]) + mem.dtcs = bitwise.bcd_to_int(memobj.dtcs)
if "Tone" in self._rf.valid_tmodes: mem.rtone = int(memobj.rtone) / 10.0 @@ -308,6 +317,19 @@ memobj.ctone = int(mem.ctone * 10) memobj.rtone = int(mem.rtone * 10)
+ if self._rf.has_dtcs_polarity: + if mem.dtcs_polarity == "RR": + memobj.dtcs_polarity = 0x11 + elif mem.dtcs_polarity == "RN": + memobj.dtcs_polarity = 0x10 + elif mem.dtcs_polarity == "NR": + memobj.dtcs_polarity = 0x01 + else: + memobj.dtcs_polarity = 0x00 + + if self._rf.has_dtcs: + bitwise.int_to_bcd(memobj.dtcs, mem.dtcs) + LOG.debug(repr(memobj)) self._send_frame(f)

This is my first patch submission. Please let me know if I did int right.
-- wireless Joseph.P.Scanlan@n7xsd.us +1-702-896-0507 -- work Joseph.P.Scanlan@ClarkCountyNV.gov +1-702-455-3679

Hi Joesph,
This is my first patch submission. Please let me know if I did int right.
Did you copy and paste your patch into webmail? It's failing to apply, so I think that's probably the problem.
Can you attach it as a file instead and see if that helps?
Thanks!
--Dan

On Thu, Dec 10, 2015, at 11:57, Dan Smith via chirp_devel wrote:
Did you copy and paste your patch into webmail? It's failing to apply, so I think that's probably the problem.
Yes
Can you attach it as a file instead and see if that helps?
Attached and thanks.

Attached and thanks.
Sorry, forgot to come back to this yesterday. This one worked, so that's one option, but your second patch from today from patchbomb is *perfect*, if that works in the future.
Thanks!
--Dan

So... Both the DTCS and WFM patches are good and accepted into CHIRP. This morning's submission (WFM) is the better way to submit a patch.
I sound unsure of myself because I am. Still learning Python, Mercurial, and the CHIRP code base. Now I get to learn how banks work in CHIRP. Wish me luck! :-)
-- wireless Joseph.P.Scanlan@n7xsd.us +1-702-896-0507 -- work Joseph.P.Scanlan@ClarkCountyNV.gov +1-702-455-3679
participants (3)
-
Dan Smith
-
Joseph scanlan
-
Joseph.P.Scanlan@n7xsd.us