[chirp_devel] [PATCH] [px777] fix no-tone identifier. Fixes #363
Tom Hayward
Fri Dec 28 20:39:07 PST 2012
On Fri, Dec 28, 2012 at 3:24 PM, Tom Hayward <esarfl at gmail.com> wrote:
> On Fri, Dec 28, 2012 at 3:10 PM, Dan Smith <dsmith at danplanet.com> wrote:
>>> - return field[0].get_raw() == "\xFF"
>>> + return int(field) in [0, 16665]
>>
>> Hmm, can you explain this?
>
> No, I can't explain it. 16665 is the magic number used in the PX-777
> to indicate no tone. Here's an example:
>
> struct {
> rx_freq: 4:[(15390000)]
> tx_freq: 4:[(15390000)]
> rx_tone: 2:[(16665)]
> tx_tone: 2:[(16665)]
...and that would be because lbcd 0xFF 0xFF == 16665d.
Should I add a get_raw() method to arrayDataElement? Then do this:
return field.get_raw() in [0, 0xFFFF]
The only reason I'm using int for the comparison is because that's the
coercion that's available in arrayDataElement.
Tom KD7LXL
More information about the chirp_devel
mailing list