[chirp_devel] Before I commit my improvements to anytone.py (wrt Powerwerx DB-750X)
Dan Smith
Sun May 14 21:20:46 PDT 2023
> 1. Add my powerwerx_db750x.py to the drivers and remove the DB-750X registration from anytone.py. I'd include copious comments in both files pointing to each other.
I'm really not interested in duplicating the bulk of the driver, so this is a non-starter for me. We have too much of that already.
> 2. Merge my changes back into anytone.py, and work out the logic to make my changes conditional between the models.
This. You're welcome to still add a new file and inherit from the class in anytone to base yours on. Ideally, just refactor the base classes so that you can override what you need cleanly in the other. I have the original radio in that module and could do some targeted testing if needed.
> Since I don't have access to the 3 other radios, I can't personally test that my changes are benign for them. So, adding powerwerx_db750x.py as a separate driver is the safest route. But that would unnecessarily duplicate 700 lines of code. Also, it would be a shame if the new features I added (banks, settings) would be useful for those other models but only appeared in the DB-750X driver.
Implement it in a way that will allow us to promote the common stuff up to the higher classes if it turns out they're useful. Asking for volunteers to test on the users list and then taking discussion to a bug where you can provide modules they can load would be the ideal route.
There are a number of other drivers that do this (see the ft817, ft857, ft1, ft2, ft3 drivers for examples).
Thanks for asking - it's much better to know now than to have me object to the duplicated code later.
--Dan
More information about the chirp_devel
mailing list