Skip to main content

Module config

Module config 

Source
Expand description

Configuration data model for the DMX interface.

Uses heapless fixed-size types for no_std compatibility. The JSON shape (field names, numeric enums, string-keyed index maps) mirrors web/src/types/config.d.ts โ€” the WebSocket API is the contract between firmware and web UI; NVS keeps storing the same model via postcard.

Modulesยง

index_map ๐Ÿ”’
serde adapter: index maps as JSON objects with decimal string keys.

Structsยง

Config
Complete device configuration (web: Config).
ConfigPatch
Partial configuration (web: DeepPartial<Config>).
DmxPortConfig
DMX port configuration (web: DmxPort).
DmxPortPatch
One DmxPortConfig entry as it arrives in a patch (web: DeepPartial).
InvalidValue
Error for invalid enum discriminants arriving over the wire.
WifiConfig
WiFi credentials for one interface (web: WifiConfig).
WifiConfigPatch
One WifiConfig entry as it arrives in a patch (web: DeepPartial).

Enumsยง

ButtonAction
Action bound to a button event (web: ButtonAction).
ConnectionType
Network connection type (web: ConnectionType).
DmxDirection
DMX data direction (web: direction on DmxPort).
IpMethod
IP assignment method (web: IpMethod); applied to station mode.

Constantsยง

MAX_BUTTON_ACTIONS ๐Ÿ”’
Maximum number of button actions addressed by the config maps.
MAX_CONFIG_BYTES ๐Ÿ”’
Maximum size of the postcard-encoded config blob in NVS.
MAX_DMX_PORTS ๐Ÿ”’
Maximum number of DMX ports addressed by the config maps.
MAX_STR_LEN ๐Ÿ”’
Maximum length for string configuration fields.