Boot splash and more (#98)

* Boot splash and more

- Added developer sdkconfig
- Refactored the way FreeRTOS includes are included
- Improved Gui/Loader logic
- Implemented boot app with splash screen

* Updated naming for Gui and Loader services

* Renamed Screenshot service methods

* Renames

* Service renames
This commit is contained in:
Ken Van Hoeylandt
2024-11-30 15:37:16 +01:00
committed by GitHub
parent 3f62ec2efa
commit 0188ce721c
60 changed files with 726 additions and 307 deletions
+8 -8
View File
@@ -74,9 +74,9 @@ typedef struct {
* @brief Get wifi pubsub
* @return PubSub*
*/
PubSub* get_pubsub();
PubSub* getPubsub();
WifiRadioState get_radio_state();
WifiRadioState getRadioState();
/**
* @brief Request scanning update. Returns immediately. Results are through pubsub.
*/
@@ -85,26 +85,26 @@ void scan();
/**
* @return true if wifi is actively scanning
*/
bool is_scanning();
bool isScanning();
/**
* @brief Returns the access points from the last scan (if any). It only contains public APs.
* @param records the allocated buffer to store the records in
* @param limit the maximum amount of records to store
*/
void get_scan_results(WifiApRecord records[], uint16_t limit, uint16_t* result_count);
void getScanResults(WifiApRecord records[], uint16_t limit, uint16_t* result_count);
/**
* @brief Overrides the default scan result size of 16.
* @param records the record limit for the scan result (84 bytes per record!)
*/
void set_scan_records(uint16_t records);
void setScanRecords(uint16_t records);
/**
* @brief Enable/disable the radio. Ignores input if desired state matches current state.
* @param enabled
*/
void set_enabled(bool enabled);
void setEnabled(bool enabled);
/**
* @brief Connect to a network. Disconnects any existing connection.
@@ -121,11 +121,11 @@ void disconnect();
/**
* Return true if the connection isn't unencrypted.
*/
bool is_connection_secure();
bool isConnectionSecure();
/**
* Returns the RSSI value (negative number) or return 1 when not connected
*/
int get_rssi();
int getRssi();
} // namespace
@@ -99,12 +99,12 @@ Wifi::~Wifi() {
// region Public functions
PubSub* get_pubsub() {
PubSub* getPubsub() {
tt_assert(wifi_singleton);
return wifi_singleton->pubsub;
}
WifiRadioState get_radio_state() {
WifiRadioState getRadioState() {
tt_assert(wifi_singleton);
lock(wifi_singleton);
WifiRadioState state = wifi_singleton->radio_state;
@@ -121,7 +121,7 @@ void scan() {
unlock(wifi_singleton);
}
bool is_scanning() {
bool isScanning() {
tt_assert(wifi_singleton);
lock(wifi_singleton);
bool is_scanning = wifi_singleton->scan_active;
@@ -152,7 +152,7 @@ void disconnect() {
unlock(wifi_singleton);
}
void set_scan_records(uint16_t records) {
void setScanRecords(uint16_t records) {
tt_assert(wifi_singleton);
lock(wifi_singleton);
if (records != wifi_singleton->scan_list_limit) {
@@ -162,7 +162,7 @@ void set_scan_records(uint16_t records) {
unlock(wifi_singleton);
}
void get_scan_results(WifiApRecord records[], uint16_t limit, uint16_t* result_count) {
void getScanResults(WifiApRecord records[], uint16_t limit, uint16_t* result_count) {
tt_assert(wifi_singleton);
tt_assert(result_count);
@@ -185,7 +185,7 @@ void get_scan_results(WifiApRecord records[], uint16_t limit, uint16_t* result_c
unlock(wifi_singleton);
}
void set_enabled(bool enabled) {
void setEnabled(bool enabled) {
tt_assert(wifi_singleton);
lock(wifi_singleton);
if (enabled) {
@@ -200,7 +200,7 @@ void set_enabled(bool enabled) {
unlock(wifi_singleton);
}
bool is_connection_secure() {
bool isConnectionSecure() {
tt_assert(wifi_singleton);
lock(wifi_singleton);
bool is_secure = wifi_singleton->secure_connection;
@@ -208,7 +208,7 @@ bool is_connection_secure() {
return is_secure;
}
int get_rssi() {
int getRssi() {
tt_assert(wifi_singleton);
static int rssi = 0;
if (esp_wifi_sta_get_rssi(&rssi) == ESP_OK) {
@@ -67,12 +67,12 @@ static void wifi_free(Wifi* instance) {
// region Public functions
PubSub* get_pubsub() {
PubSub* getPubsub() {
tt_assert(wifi);
return wifi->pubsub;
}
WifiRadioState get_radio_state() {
WifiRadioState getRadioState() {
return wifi->radio_state;
}
@@ -81,7 +81,7 @@ void scan() {
wifi->scan_active = false; // TODO: enable and then later disable automatically
}
bool is_scanning() {
bool isScanning() {
tt_assert(wifi);
return wifi->scan_active;
}
@@ -95,12 +95,12 @@ void disconnect() {
tt_assert(wifi);
}
void set_scan_records(uint16_t records) {
void setScanRecords(uint16_t records) {
tt_assert(wifi);
// TODO: implement
}
void get_scan_results(WifiApRecord records[], uint16_t limit, uint16_t* result_count) {
void getScanResults(WifiApRecord records[], uint16_t limit, uint16_t* result_count) {
tt_check(wifi);
tt_check(result_count);
@@ -126,7 +126,7 @@ void get_scan_results(WifiApRecord records[], uint16_t limit, uint16_t* result_c
}
}
void set_enabled(bool enabled) {
void setEnabled(bool enabled) {
tt_assert(wifi != NULL);
if (enabled) {
wifi->radio_state = WIFI_RADIO_ON;
@@ -136,11 +136,11 @@ void set_enabled(bool enabled) {
}
}
bool is_connection_secure() {
bool isConnectionSecure() {
return wifi->secure_connection;
}
int get_rssi() {
int getRssi() {
if (wifi->radio_state == WIFI_RADIO_CONNECTION_ACTIVE) {
return -30;
} else {