- WiFi Connect app is now hidden by default, but accessible at the bottom of the WiFi Manage app when WiFi is turned on. - WiFi service now turns on WiFi when calling connect() and WiFi is not on. - Removed `blocking` option for `service::loader::startApp()`. This feature was unused and complex. - Various apps: Moved private headers into Private/ folder. - Various apps: created start() function for easy starting. - Added documentation to all TactilityC APIs - Refactored various `enum` into `class enum` - Refactor M5Stack `initBoot()` (but VBus is still 0V for some reason)
32 lines
719 B
C++
32 lines
719 B
C++
#pragma once
|
|
|
|
#include "WifiGlobals.h"
|
|
|
|
namespace tt::service::wifi::settings {
|
|
|
|
/**
|
|
* This struct is stored as-is into NVS flash.
|
|
*
|
|
* The SSID and secret are increased by 1 byte to facilitate string null termination.
|
|
* This makes it easier to use the char array as a string in various places.
|
|
*/
|
|
struct WifiApSettings {
|
|
char ssid[TT_WIFI_SSID_LIMIT + 1] = { 0 };
|
|
char password[TT_WIFI_CREDENTIALS_PASSWORD_LIMIT + 1] = { 0 };
|
|
bool auto_connect = true;
|
|
};
|
|
|
|
bool contains(const char* ssid);
|
|
|
|
bool load(const char* ssid, WifiApSettings* settings);
|
|
|
|
bool save(const WifiApSettings* settings);
|
|
|
|
bool remove(const char* ssid);
|
|
|
|
void setEnableOnBoot(bool enable);
|
|
|
|
bool shouldEnableOnBoot();
|
|
|
|
} // namespace
|