[chirp_devel] [ic7000]Digital Code Squelch for IC-7000 channels. Fixes bug #3047
Joseph scanlan
Thu Dec 10 10:19:01 PST 2015
This is my first patch submission. Please let me know if I did int right.
-- wireless <Joseph.P.Scanlan at n7xsd.us> +1-702-896-0507
-- work <Joseph.P.Scanlan at ClarkCountyNV.gov> +1-702-455-3679
--
These mechanics
and mathematics
they give me comfort
when I'm afraid.
—Venus Hum
> On Dec 10, 2015, at 10:13 AM, Joseph.P.Scanlan--- via chirp_devel <chirp_devel at intrepid.danplanet.com> wrote:
>
>
> # HG changeset patch
> # User <Joseph.P.Scanlan at 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)
> _______________________________________________
> chirp_devel mailing list
> chirp_devel at intrepid.danplanet.com
> http://intrepid.danplanet.com/mailman/listinfo/chirp_devel
> Developer docs: http://chirp.danplanet.com/projects/chirp/wiki/Developers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://intrepid.danplanet.com/pipermail/chirp_devel/attachments/20151210/0d951ebb/attachment-0001.html
More information about the chirp_devel
mailing list