[chirp_devel] [PATCH] [ft60] Fix fractional step frequency encoding. #1273
# HG changeset patch # User Tom Hayward tom@tomh.us # Date 1387319285 28800 # Node ID 890d775adfcac4acc8e552b2c65329e15f825e51 # Parent 5405a514d7d7f7d5f3baae988d734e8c0385879d [ft60] Fix fractional step frequency encoding. #1273
diff -r 5405a514d7d7 -r 890d775adfca chirp/ft60.py --- a/chirp/ft60.py Tue Dec 10 18:16:04 2013 -0800 +++ b/chirp/ft60.py Tue Dec 17 14:28:05 2013 -0800 @@ -97,11 +97,12 @@
def _encode_freq(freq): freqraw = freq / 10000 - if ((freq / 1000) % 10) == 5: - freqraw += 800000 + flags = 0x00 + if ((freq / 1000) % 10) >= 5: + flags += 0x80 if chirp_common.is_fractional_step(freq): - freqraw += 400000 - return freqraw + flags += 0x40 + return freqraw, flags
MEM_FORMAT = """ @@ -290,9 +291,11 @@ _mem.used = 1 print "Wiped"
- _mem.freq = _encode_freq(mem.freq) + _mem.freq, flags = _encode_freq(mem.freq) + _mem.freq[0].set_bits(flags) if mem.duplex == "split": - _mem.tx_freq = _encode_freq(mem.offset) + _mem.tx_freq, flags = _encode_freq(mem.offset) + _mem.tx_freq[0].set_bits(flags) _mem.offset = 0 else: _mem.tx_freq = 0
participants (1)
-
Tom Hayward