1. Dossiers concernés
assets/station_s/
+- include/app/settings/
¦ +- obb_settings_profiles.h
+- src/app/settings/
+- obb_settings_profiles.cpp
Ces fichiers sont inclus par le menu principal : un clic sur « Profil Crise » appelle simplement apply_profile(Profile::kCrisis).
2. Structure des profils
enum class Profile : uint8_t {
kTownHall,
kNightWatch,
kCrisis,
};
struct RuntimeSettings {
Profile profile = Profile::kTownHall;
bool wifi_enabled = true;
bool hf_link_enabled = false;
bool scroll_lock = false;
bool telemetry_public = false;
};
On retrouve les mêmes paramètres que dans la page concept (Wi-Fi, HF, scroll button, bannière publique/privée).
3. Application instantanée
void apply_profile(Profile profile) {
if (s_runtime.profile == profile) return;
s_runtime.profile = profile;
sync_flags();
}
La fonction sync_flags() met à jour toutes les sorties (radio HF, bannière sécurité, LED Scroll). Cela correspond aux actions listées dans Travaux en cours.
4. Exemple : mode « Veille »
case Profile::kNightWatch:
s_runtime.wifi_enabled = false;
s_runtime.hf_link_enabled = true;
s_runtime.scroll_lock = true;
s_runtime.telemetry_public = false;
break;
Ce profil correspond à un bâtiment fermé : Wi-Fi OFF, HF ON (patrouille), Scroll Button bloqué pour éviter les clics involontaires.