# HG changeset patch # User Dan Smith dsmith@danplanet.com # Date 1302106741 25200 # Node ID 1dad3b1387f43306f46416af90f0979d55a5ce07 # Parent f51cc15cd52dfce7a958af5b1708178e7c73adcb Add stubs for VX7 mods
diff -r f51cc15cd52d -r 1dad3b1387f4 chirp/vx7.py --- a/chirp/vx7.py Wed Apr 06 09:18:49 2011 -0700 +++ b/chirp/vx7.py Wed Apr 06 09:19:01 2011 -0700 @@ -120,6 +120,7 @@ rf.memory_bounds = (1, 450) rf.can_odd_split = True rf.has_ctone = False + rf.has_mods = True return rf
def get_raw_memory(self, number): @@ -219,3 +220,26 @@ @classmethod def match_model(cls, filedata): return len(filedata) == cls._memsize + + def get_mods(self): + band = chirp_common.RadioModOpt("Band Mode", "Unmodified") + band.set_options(["Unmodified", "MARS/CAP", "Freeband"]) + + cpu = chirp_common.RadioModInt("CPU Version", 0x0100) + cpu.set_range(0x0000, 0xFFFF) + cpu.set_display_format("%04X") + + return [band, cpu] + + def set_mod(self, mod): + if mod.get_name() == "Band Mode": + val = mod.get_new_value() + # val is now one of the three options, bang the bits + # accordingly + print "Band mode is now: %s" % val + elif mod.get_name() == "CPU Version": + val = mod.get_new_value() + byte1 = (val & 0xFF00) >> 8 + byte2 = (val & 0x00FF) + # byte1 and byte2 can now be set in place + print "CPU version is now %02x,%02x" % (byte1, byte2)