WiFi improvements (#102)

This commit is contained in:
Ken Van Hoeylandt
2024-12-03 22:22:45 +01:00
committed by GitHub
parent 505befef42
commit c7314546fe
27 changed files with 581 additions and 454 deletions
@@ -0,0 +1,18 @@
#include "Preferences.h"
#define WIFI_PREFERENCES_NAMESPACE "wifi"
#define WIFI_PREFERENCES_KEY_ENABLE_ON_BOOT "enable_on_boot"
namespace tt::service::wifi::settings {
void setEnableOnBoot(bool enable) {
Preferences(WIFI_PREFERENCES_NAMESPACE).putBool(WIFI_PREFERENCES_KEY_ENABLE_ON_BOOT, enable);
}
bool shouldEnableOnBoot() {
bool enable = false;
Preferences(WIFI_PREFERENCES_NAMESPACE).optBool(WIFI_PREFERENCES_KEY_ENABLE_ON_BOOT, enable);
return enable;
}
} // namespace