Module stabilizer::settings

source ·
Expand description

Stabilizer Settings Management

§Design

Stabilizer supports two types of settings:

  1. Static Device Configuration
  2. Dynamic Run-time Settings

Static device configuration settings are loaded and used only at device power-up. These include things like the MQTT broker address and the MQTT identifier. Conversely, the dynamic run-time settings can be changed and take effect immediately during device operation.

This settings management interface is currently targeted at the static device configuration settings. Settings are persisted into the unused 1MB flash bank of Stabilizer for future recall. They can be modified via the USB interface to facilitate device configuration.

Settings are stored in flash using a key-value pair mapping, where the key is the name of the entry in the settings structure. This has a number of benefits:

  1. The Settings structure can have new entries added to it in the future without losing old settings values, as each entry of the Settings struct is stored separately as its own key-value pair.
  2. The Settings can be used among multiple Stabilizer firmware versions that need the same settings values
  3. Unknown/unneeded settings values in flash can be actively ignored, facilitating simple flash storage sharing.

Structs§

Enums§

Traits§

Functions§