Project

General

Profile

Feature #48 ยป ft8900-narow.patch

patch - Michal D, 01/25/2012 12:34 PM

View differences:

./chirp/ft7800.py 2012-01-25 21:32:09.866343059 +0100
duplex:3;
bbcd freq[3];
u8 mode_am:1,
unknown3:1,
is_fm_narrow:1,
nameused:1,
unknown4:1,
power:2,
......
#seekto 0x7B48;
u8 checksum;
"""
class FT8900Radio(FT8800Radio):
MODEL = "FT-8900"
......
def get_features(self):
rf = FT8800Radio.get_features(self)
rf.has_sub_devices = False
rf.valid_modes = ["FM", "NFM", "AM"]
rf.valid_bands = [( 28000000, 29700000),
( 50000000, 54000000),
(108000000, 180000000),
......
def _set_mem_skip(self, mem, _mem):
_mem.skip = SKIPS.index(mem.skip)
def get_memory(self, number):
mem = FT8800Radio.get_memory(self, number)
_mem = self._memobj.memory[number - 1]
if mem.mode == "FM":
if _mem.is_fm_narrow == 1:
mem.mode = "NFM"
return mem
def set_memory(self, mem):
FT8800Radio.set_memory(self, mem)
......
_mem.sub_used = 0;
else:
_mem.sub_used = 1
if mem.mode[0] == "N": # is it narrow?
_mem.is_fm_narrow = 1
    (1-1/1)