On Sat, May 4, 2013 at 4:51 PM, Dan Smith dsmith@danplanet.com wrote:
No. This makes no sense because it won't work. Once an image is uploaded from another model, these first bytes will be replaced. :(
You mean if someone takes a VHF/UHF image and blows it into a VHF/220 radio?
Yes
Sounds like we should always read the first chunk of data from the radio before we push an image out to it and fail if it doesn't match what we want. We do this now for the firmware version, right? (see do_upload() and _get_radio_firmware_version().
Yes. I believe this is already done when downloading or uploading. I see the "Ident:" in the command window. It displays the data that I think we can match against.
I think the right thing to do is subclass the main radio driver for the 220, and stash the byte that we expect to see for each in their respective classes, so we can compare the driver being used to what the radio returns.
I think this may be getting in over my head. 'Subclass' is what you did for the F-11, right? I will definitely need help with this.
Also, we'd need to modify match_model() so that it would load files with the correct driver.
Now that the main features of the UV-B5 are in place and the UV-5R 'hidden' firmware version as been addressed, I am in a better position to mess with something like this.
Jim