> 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.
OK. That should work for STEP because it changed with BFB291. But other menus that need attention, like VOICE, changed at BFB251. That will probably require a different type of check. For pre-BFB251 the selection is OFF or ON, which is what CHIRP currently supports. But for BFB251 and later the selection is OFF, ENGlish or CHInese. Fortunately most want OFF or ENG so the existing code probably works fine for most users. I'd still like to see it support the menu fully though.
> 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.
I'll study this a bit before I do anything. I'll probably have questions.
Thanks Jim!
Thank you. I appreciate the guidance and the willingness to let me help out.
Jim