- Create `Include/` folder for all main projects - Fix some issues here and there (found while moving things) - All includes are now in `Tactility/` subfolder and must be included with that prefix. This fixes issues with clashing POSIX headers (e.g. `<semaphore.h>` versus Tactility's `Semaphore.h`)
19 lines
506 B
C++
19 lines
506 B
C++
#include "Tactility/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
|