New Model #1469 » ftm400.patch
/dev/null Thu Jan 01 00:00:00 1970 +0000 → chirp/ftm400.py Fri Mar 14 10:22:17 2014 -0700 | ||
---|---|---|
# Copyright 2014 Tom Hayward <tom@tomh.us>
|
||
#
|
||
# This program is free software: you can redistribute it and/or modify
|
||
# it under the terms of the GNU General Public License as published by
|
||
# the Free Software Foundation, either version 3 of the License, or
|
||
# (at your option) any later version.
|
||
#
|
||
# This program is distributed in the hope that it will be useful,
|
||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
# GNU General Public License for more details.
|
||
#
|
||
# You should have received a copy of the GNU General Public License
|
||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||
from chirp import bitwise, directory, ftm350
|
||
mem_format = """
|
||
struct mem {
|
||
u8 used:1,
|
||
skip:2,
|
||
unknown1:5;
|
||
u8 unknown2:1,
|
||
mode:3,
|
||
unknown8:1,
|
||
oddsplit:1,
|
||
duplex:2;
|
||
bbcd freq[3];
|
||
u8 unknownA:1,
|
||
tmode:3,
|
||
unknownB:4;
|
||
bbcd split[3];
|
||
u8 power:2,
|
||
tone:6;
|
||
u8 unknownC:1,
|
||
dtcs:7;
|
||
u8 showalpha:1,
|
||
unknown5:7;
|
||
u8 unknown6;
|
||
u8 offset;
|
||
u8 unknown7[2];
|
||
};
|
||
struct lab {
|
||
u8 string[8];
|
||
};
|
||
#seekto 0x0508;
|
||
struct {
|
||
char call[6];
|
||
u8 ssid;
|
||
} aprs_my_callsign;
|
||
#seekto 0x0480;
|
||
struct mem left_memory_zero;
|
||
#seekto 0x04A0;
|
||
struct lab left_label_zero;
|
||
#seekto 0x04C0;
|
||
struct mem right_memory_zero;
|
||
#seekto 0x04E0;
|
||
struct lab right_label_zero;
|
||
#seekto 0x080;
|
||
struct mem left_memory[500];
|
||
#seekto 0x7c00;
|
||
struct mem right_memory[500];
|
||
#seekto 0x48C0;
|
||
struct lab left_label[518];
|
||
struct lab right_label[518];
|
||
"""
|
||
@directory.register
|
||
class FTM400Radio(ftm350.FTM350Radio):
|
||
"""Yaesu FTM-400"""
|
||
BAUD_RATE = 48000
|
||
VENDOR = "Yaesu"
|
||
MODEL = "FTM-400"
|
||
def get_sub_devices(self):
|
||
return [FTM400RadioLeft(self._mmap), FTM400RadioRight(self._mmap)]
|
||
def process_mmap(self):
|
||
self._memobj = bitwise.parse(mem_format, self._mmap)
|
||
@classmethod
|
||
def match_model(self, filedata, filename):
|
||
return filedata.startswith("AH034$")
|
||
class FTM400RadioLeft(FTM400Radio):
|
||
VARIANT = "Left"
|
||
_vfo = "left"
|
||
class FTM400RadioRight(FTM400Radio):
|
||
VARIANT = "Right"
|
||
_vfo = "right"
|
chirpui/mainapp.py Sun Mar 02 19:37:13 2014 -0500 → chirpui/mainapp.py Fri Mar 14 10:22:17 2014 -0700 | ||
---|---|---|
types = [(_("CHIRP Radio Images") + " (*.img)", "*.img"),
|
||
(_("CHIRP Files") + " (*.chirp)", "*.chirp"),
|
||
(_("CSV Files") + " (*.csv)", "*.csv"),
|
||
(_("FTM-400 Files") + " (*.dat)", "*.dat"),
|
||
(_("EVE Files (VX5)") + " (*.eve)", "*.eve"),
|
||
(_("ICF Files") + " (*.icf)", "*.icf"),
|
||
(_("VX5 Commander Files") + " (*.vx5)", "*.vx5"),
|
||
... | ... | |
types = [(_("CHIRP Files") + " (*.chirp)", "*.chirp"),
|
||
(_("CHIRP Radio Images") + " (*.img)", "*.img"),
|
||
(_("CSV Files") + " (*.csv)", "*.csv"),
|
||
(_("FTM-400 Files") + " (*.dat)", "*.dat"),
|
||
(_("EVE Files (VX5)") + " (*.eve)", "*.eve"),
|
||
(_("ICF Files") + " (*.icf)", "*.icf"),
|
||
(_("Kenwood HMK Files") + " (*.hmk)", "*.hmk"),
|