A nightstand noise generator based on M5Stack Atom Echo and integrating with Home Assistant
1//! Compile-time configuration ingested from `firmware/cfg.toml` via `toml-cfg`.
2//!
3//! Real values live in `cfg.toml` (gitignored); a `cfg.toml.example` shows the
4//! shape. Defaults are empty strings on purpose — the firmware asserts
5//! non-empty at boot so we panic loudly instead of silently trying to connect
6//! to nothing.
7//!
8//! `mqtt_url` is a full URL so adding TLS later (`mqtts://host:8883`) is a
9//! config-only change.
10
11#[toml_cfg::toml_config]
12pub struct Config {
13 #[default("")]
14 pub wifi_ssid: &'static str,
15 #[default("")]
16 pub wifi_password: &'static str,
17 #[default("")]
18 pub mqtt_url: &'static str,
19 /// Base URL the device fetches OTA images from. The full image URL is
20 /// `<ota_url_base>/sound-machine-<version>.bin`. Trailing slash is
21 /// stripped at use-time so either form works.
22 #[default("")]
23 pub ota_url_base: &'static str,
24}