[chirp_devel] Mods for the UV-5R
Dan Smith
Sat Dec 22 14:00:28 PST 2012
Since this is new-plans stuff, I'm going to drag you over to the devel
mailing list. Let's continue the discussion there.
> Unfortunately Baofeng didn't just tack new settings on the end. They
> inserted 20.0K in between 12.5K and 25.0K. I can easily change it by
> adding the 2 additional selections, but I'm afraid someone selecting
> 20.0K on an older firmware will actually get 25.0K. I would need help
> knowing how to make two lists and then selecting the correct one based
> on the firmware version being used.
Right, so there's a method on the driver called "_is_orig()" that will
return True if it is the "original" style of firmware, or False if it's
the newer kind. So, you can do something like this:
tuning_steps = list(STEP_LIST) # Make a copy of the main list
if not self._is_orig():
tuning_steps.insert(5, 20.0) # Insert 20.0 at index 5
tuning_steps.insert(...)
Then just change the initialization of the setting to use the
tuning_steps list instead of the global constant one.
> I would like to add most of the rest of the settings that would go on
> the Settings tabs. That should be fairly easy for me to do. I believe
> that, with your excellent guidence, I have a good start on that.
Yep, sounds like you've got a good handle on that part.
> Then what I would like to do is tackle some of the 'per channel'
> settings like Busy Channel Lockout, S-CODE, PTT-ID (if that is even
> possible).
Yep, that's good. Anything that the Memory class has in it should be
supported that way (i.e. the Memory class in chirp_common.py). However,
features not supported there can be added to the "extra" field in
Memory. This field lets you stuff settings (just like you've been doing
for the radio-wide settings) that are specific to a memory channel in
there, which are exposed to the user via the Right-click->Edit dialog
box. See the ft817.py driver for an example. Look in get_memory() and
set_memory() for where mem.extra is manipulated.
Thanks Jim!
--
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: OpenPGP digital signature
Url : http://intrepid.danplanet.com/pipermail/chirp_devel/attachments/20121222/d17cf908/attachment-0001.bin
More information about the chirp_devel
mailing list