billmania / roboquest_core

The backend functionality for the RoboQuest project
1 stars 0 forks source link

Configure servos at run-time #31

Closed billmania closed 11 months ago

billmania commented 1 year ago

Support the implementation via rq_ui of the ability to configure the servos. To do this the servo configuration must be maintained in a persisten and human-readable configuration file.

The Use Cases for rq_core are:

  1. at startup retrieve latest servo configuration from a persistent file
  2. at startup install a default servo configuration if the persistent file doesn't exist

NB. rq_core doesn't make any run-time changes to the servo configuration.

To effect any servo configuration changes made via the UI, a restart of rq_core is required.

This supports roboquest_ui Issue 66

billmania commented 1 year ago

The expected changes to satisfy the Use Cases are:

  1. a ConfigFile method to retrieve the servo config, and a means to setup the persistent version of the config

The ConfigFile mentioned here is separate from, but very similar to, the ConfigFile JavaScript class in roboquest_ui. It will use the same /opt/persist/ directory and the filename "servos_config.json".

billmania commented 11 months ago

Test cases for rq_core:

  1. default servo config file created :heavy_check_mark:
  2. rq_core always reads persistent servo config file :heavy_check_mark:
  3. manual edits of persistent servo config file are read at rq_core startup :heavy_check_mark: All other Use Cases involving the servo config file are implemented and tested in rq_ui
billmania commented 11 months ago

Update updater.py to version 9 and mount /opt/persist onto the rq_core container.