[chirp_devel] [PATCH] [ft2900] Adds support for odd splits. Fixes #2423
Chris Fosnight
Sat Mar 14 17:16:42 PDT 2015
# HG changeset patch
# User Chris Fosnight <chris.fosnight at gmail.com>
# Date 1426378382 25200
# Node ID ca02f98b35e5c597d017e78843c6ac3987523692
# Parent c9c9128ca29ea21f54249788a9c0e47c9d5fbdc4
[ft2900] Adds support for odd splits. Fixes #2423
This patch adds support for odd splits. I have used it to download odd splits
from a Yaesu 1900R, add another odd split via UI, and upload to radio. Passes
tests.
Adjusted memory map for offset to 3 bytes and added odd split components.
Used chirp_common.fix_rounded_step when getting offset memory. Adjusted
unknown bytes in memory map and references in code.
#2423
diff -r c9c9128ca29e -r ca02f98b35e5 chirp/drivers/ft2900.py
--- a/chirp/drivers/ft2900.py Thu Mar 12 09:49:32 2015 +0100
+++ b/chirp/drivers/ft2900.py Sat Mar 14 17:13:02 2015 -0700
@@ -204,11 +204,10 @@
unknown4:3,
tmode:3;
u8 name[6];
- u8 unknown5;
- bbcd offset[2];
+ bbcd offset[3];
u8 tone;
u8 dtcs;
- u8 unknown6;
+ u8 unknown5;
u8 tone2;
u8 dtcs2;
} memory[200];
@@ -217,7 +216,7 @@
MODES = ["FM", "NFM"]
TMODES = ["", "Tone", "TSQL", "DTCS", "TSQL-R"]
-DUPLEX = ["", "-", "+", ""]
+DUPLEX = ["", "-", "+", "split"]
POWER_LEVELS = [chirp_common.PowerLevel("Hi", watts=75),
chirp_common.PowerLevel("Low3", watts=30),
chirp_common.PowerLevel("Low2", watts=10),
@@ -275,6 +274,7 @@
rf.memory_bounds = (0, 199)
+ rf.can_odd_split = True
rf.has_ctone = False
rf.has_dtcs_polarity = False
rf.has_bank = False
@@ -346,7 +346,7 @@
if (lastdigit == 2 or lastdigit == 7):
mem.freq += 500
- mem.offset = int(_mem.offset) * 1000
+ mem.offset = chirp_common.fix_rounded_step(int(_mem.offset) * 1000)
mem.duplex = DUPLEX[_mem.duplex]
mem.tmode = TMODES[_mem.tmode]
mem.rtone = chirp_common.TONES[_mem.tone]
@@ -409,7 +409,6 @@
_mem.unknown3 = 0
_mem.unknown4 = 0
_mem.unknown5 = 0
- _mem.unknown6 = 0
LOG.debug("encoded mem\n%s\n" % (util.hexprint(_mem.get_raw()[0:20])))
More information about the chirp_devel
mailing list