This driver is very similar to the TH9800 driver. The memory map is slightly different, the features differ a bit, and the upload/download sequence is slightly different.
I started discussing a refactor with the TH9800 authors. They seem like a good bunch of guys. Unfortunately I don't have access to a TH7800 radio anymore and I don't have a TH9800. I didn't want to destabilize the TH9800 or break what I had for the TH7800 by refactoring much at this point.
> Hmm, why is this copied into the driver?
>
> > + add_radio_setting(basic, "apo", "Auto Power off (Hours)",
> > + [("Off", 0), ("0.5", 5), ("1.0", 10), ("1.5", 15), ("2.0", 20)],
> > + _settings.apo)
I'm sorry, I don't understand your question. FWIW, APO is a feature that was broken in the TH9800 and I've fixed it in the TH7800. I planned to show the TH7800 authors how I've fixed it.
There are probably a few things we could discuss about the driver. I almost forgot about the comments I added about "common code" that could potentially be moved to a different module for all to use. You're probably the right person to talk to about that.
I can run the pep8 tester - hadn't done that. I'm sure I can break the lines before 80 columns.
The tests pass with the driver.
Regards,
Nathan