[chirp_devel] [FT-90] add initial support for FT-90R. #1087
Dan Smith
Sun Aug 25 13:19:57 PDT 2013
> Initial support for Yaesu FT-90R. Probably a bit buggy. #1087
Do you want this to go into the tree, or are you just floating it for
comments?
> +# Copyright 2011 Dan Smith <dsmith at danplanet.com>
Be sure to add your copyright here.
> + STEPS = [5, 10, 12.5, 15, 20, 25, 50]
Steps are floats, so these will cause issues during import from
something else, I think.
> + MODES = ["AM", "FM", "Auto"]
> + TMODES = ["", "Tone", "TSQL", "Bell", "DTCS"]
Auto and Bell aren't allowed, so memories that resolve to these are
going to break, right?
> + TONES = [ 67.0, 69.3, 71.9, 74.4, 77.0, 79.7, 82.5,
> + 85.4, 88.5, 91.5, 94.8, 97.4, 100.0, 103.5,
> + 107.2, 110.9, 114.8, 118.8, 123.0, 127.3,
> + 131.8, 136.5, 141.3, 146.2, 151.4, 156.7,
> + 159.8, 162.2, 167.9, 173.8, 179.9, 183.5,
> + 186.2, 189.9, 192.8, 196.6, 199.5, 203.5,
> + 206.5, 210.7, 218.1, 225.7, 229.1, 233.6,
> + 241.8, 250.3, 254.1,
> + ]
Is this list different than the main one in chirp_common? While it's a
little messy, I think it would be better to stick with the convention
of copying the main list and adding/removing tones to get to the
supported list. At the very least, it makes it easyier to come back
and figure out what the deltas are.
> + POWER_LEVELS = ["Hi","Mid1","Mid2","Low"]
Need spaces after the commas
> + #DUPLEX = ["", "-", "+", "split", "Auto"]
> + DUPLEX = ["", "-", "+", "split"]
I like to avoid commented-out code whenever possible. Perhaps just a
comment above that says "Duplex index 4 is auto mode". Will memories
with auto set create an IndexError trying to look their value up in
this list?
> + def get_memory(self, number):
> + _mem = self._memobj.memory[number-1]
> +
> + mem = chirp_common.Memory()
> + mem.number = number
> + mem.freq = _mem.rxfreq * 10
> + mem.offset = _mem.txfreqoffset * 10
> + if not _mem.tmode < len(self.TMODES):
> + _mem.tmode = 0
> + mem.tmode = self.TMODES[_mem.tmode]
> + mem.rtone = self.TONES[_mem.tone]
> + mem.mode = self.MODES[_mem.mode]
> +
> + '''
> + # ars mode note yet working...
> + # ARS mode:
> + if _mem.ars and _mem.shift == 0:
> + mem.duplex = self.DUPLEX[4]
This will fail, right?
> + else:
> + mem.duplex = self.DUPLEX[_mem.shift]
> + '''
> + mem.duplex = self.DUPLEX[_mem.shift]
> + mem.power = self.POWER_LEVELS[_mem.power]
> + # radio has a known bug with 5khz step and squelch
> + if _mem.step == 0:
> + _mem.step = 2
> + mem.tuning_step = self.STEPS[_mem.step]
> + mem.skip = _mem.skip and "S" or ""
> + mem.name = _mem.name
> + return mem
I don't see the DCS code being decoded anywhere. IIRC, that was the
thing I could never figure out.
Thanks!
--
Dan Smith
www.danplanet.com
KK7DS
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
Url : http://intrepid.danplanet.com/pipermail/chirp_devel/attachments/20130825/f593f32d/attachment-0001.bin
More information about the chirp_devel
mailing list