Project

General

Profile

Bug #1733 » ic2100_enable_anm_display.patch

Jim Unroe, 07/05/2014 06:21 AM

View differences:

chirp/ic2100.py Sun Jun 22 08:10:06 2014 -0400 → chirp/ic2100.py Sat Jul 05 09:09:54 2014 -0400
from chirp import chirp_common, icf, util, directory
from chirp import bitwise, memmap
from chirp.settings import RadioSetting, RadioSettingGroup, \
RadioSettingValueInteger, RadioSettingValueList, \
RadioSettingValueBoolean, RadioSettingValueString, \
RadioSettingValueFloat, InvalidValueError
MEM_FORMAT = """
struct {
......
u8 unknown1;
bbcd offset[2];
u8 is_12_5:1,
unknownbits:3,
unknownbit1:1,
anm:1,
unknownbit2:1,
duplex:2,
tmode:2;
u8 ctone;
......
u8 unknown1;
bbcd offset[2];
u8 is_12_5:1,
unknownbits:3,
unknownbit1:1,
anm:1,
unknownbit2:1,
duplex:2,
tmode:2;
u8 ctone;
......
u8 unknown1;
bbcd offset[2];
u8 is_12_5:1,
unknownbits:3,
unknownbit1:1,
anm:1,
unknownbit2:1,
duplex:2,
tmode:2;
u8 ctone;
......
mem.tmode = TMODES[_mem.tmode]
mem.duplex = DUPLEX[_mem.duplex]
mem.extra = RadioSettingGroup("Extra", "extra")
rs = RadioSetting("anm", "Alphanumeric Name",
RadioSettingValueBoolean(_mem.anm))
mem.extra.append(rs)
return mem
def set_memory(self, mem):
......
_mem.tmode = TMODES.index(mem.tmode)
_mem.duplex = DUPLEX.index(mem.duplex)
for setting in mem.extra:
setattr(_mem, setting.get_name(), setting.value)
def get_raw_memory(self, number):
return repr(self._memobj.memory[number])
(4-4/4)