Greetings,
A new daily build of CHIRP is available. This includes changes made directly to the tree yesterday, and may include additional features, bug fixes, and/or bugs. If you are interested in trying it, grab it from the following location:
http://trac.chirp.danplanet.com/chirp_daily/daily-20180809
A list of the changes included in this build (since the last daily) follows:
Changes for Build #532 [Dan Smith dsmith@danplanet.com] Fix some style regressions that snuck in
Related to #5997 and #3425
[Dan Smith dsmith@danplanet.com] Add mock to the unit test environment
Fixes the tests for #5995
[Dan Smith dsmith@danplanet.com] Add metadata blob trailer transparently to image files
This makes FileBackedRadio transparently save image files with an extra blob of metadata tacked onto the end of the file. The metadata region begins with a magic string followed by a base64-encoded json blob. I figure we can call all images created up until now "version zero" format, since they really aren't formatted at all. Any major format changes after this can increment the counter in the magic (although it's unlikely we would need to).
The metadata currently saved includes the radio model details and the class used at the time the file was created. All existing images will still load, but when they are saved, will be augmented with metadata. Note that this will mean images saved from newer versions of chirp will not be readable by older versions which will be confused by the metadata.
One major feature this brings is the ability to make radio aliases (and other weak subclasses) be "sticky" across save/load cycles. Right now if you download with an alias (such as the Arcshell AR-6 alias of the BF-888), the file will be detected and reported as a BF-888 from that point forward. With metadata in the image, we can properly select the alias on load to provide better UX.
This includes some low-effort tweaking of the directory and clone code to select the right radio class based on metadata if present, and to properly return a radio class for the alias, if one matches. We might want to re-structure the alias class arrangement after this to make them properly-registered and fully-functional subclasses so that the hacky DynamicRadioAlias subclassing done here isn't necessary.
Also note that the generic saving code will not append metadata for filenames not ending in .img, to preserve behavor for .vx5 files, etc. If a filename forces a non-standard file extension, the metadata will not be added and the result will be effectively the same as the older format (which then may not be loaded properly if it is mis-detected as a different model).
Closes #5995
[Dan Smith dsmith@danplanet.com] Add some convenience features to the module loader:
- Mark the background of the main window red once a module has been loaded - Allow loading a module from the command line for easier testing - Allow a .mod suffix
#5997