Skip to content

Companion for Horus blueprint

Max Paperno edited this page Mar 24, 2017 · 1 revision

Use cases

New

Open new modellist window the main control will be tree view. Default values applied to radio settings, categories and models list empty.

Read Models and Settings from Radio

Use existing method to find where the RADIO and MODELS directories reside (where the SD card from the radio is mounted). The only method used to get the data from the radio is mass-storage access to the SD card - ie file interface. Other interfaces are not supported. The returned path is used to read:

  • radio settings are read from /RADIO/radio.bin
  • model list read from /RADIO/models.txt
  • models are read from /MODELS/*.bin, all files are read and stored, regardless if they are referenced in models.txt or not

Write Models and Settings to Radio

Use existing method to find where the RADIO and MODELS directories reside (where the SD card from the radio is mounted). The returned path is used to write:

  • radio settings are written to /RADIO/radio.bin
  • model list is written to /RADIO/models.txt
  • models are written to /MODELS/*.bin, (open question is here: how to handle unused models, more on this below)

Open

User navigates to the file with the new extension (perhaps .eepe2). This file contains all settings and models in one file. Details on the file storage fromat below. The new modellist is recounstructed from the contents of the file.

Save

User gives the new filename and path to save to. Companion construct the new .eepe2 file from the new model-list window and writes the file.

Simulation

Create full radio directory structure from the current model-list in a temporary directory and use that path as an argument to the simulator. We will need to modify the simpgmspace file functions to open radio/model settings file from this location and other files (like sounds) from the normal location (user defined SD card image).

Storage model

disk storage format

  • new extension to easily differentiate (but this extension is not used for file type detection) Proposals for the new extension needed. Some ideas (".eepe2", ".otx")

  • The new file is a (compressed) archive capable of storing files and directories. We should use some opensource format like gzip/tar or zip or rar (something that is simple to use from Qt, while still retaining the compatibility with existing tools, so that the file itself could be opened with existing tools).

  • Contents and structure of the archive: basically just follow the layout that is used on the radio. Optionally we could add one additional file for the version if needed).

Candidate libraries for working with archives:

New model-list window

  • new class/file in Companion. This way we do not interfere with the existing functionality. Which model-list is used is determined from the radio selected in the current profile (when user uses New) or by the input file type determination (used when user uses Open).

  • The tree view control is the base control. Main items in tree view:

  • radio settings (at the top of the tree)

  • folders for model categories

  • models as tree leaves (can be in a category folder or in tree root)

Open questions

  • what to do with unused bin files (when read from/write to the radio)
Clone this wiki locally