Skip to content

Commit

Permalink
View and state updating simplified
Browse files Browse the repository at this point in the history
  • Loading branch information
KenVanHoeylandt committed Jan 17, 2024
1 parent aa6f05e commit c830c66
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ static void wifi_connect_event_callback(const void* message, void* context) {
default:
break;
}
wifi_connect_request_view_update(wifi);
}

static void app_show(App app, lv_obj_t* parent) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
#include "wifi_connect_state_updating.h"

#include "esp_lvgl_port.h"

void wifi_connect_state_set_radio_state(WifiConnect* wifi, WifiRadioState state) {
wifi_connect_lock(wifi);
wifi->state.radio_state = state;
wifi_connect_unlock(wifi);

wifi_connect_request_view_update(wifi);
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
extern "C" {
#endif

void wifi_connect_state_set_scanning(WifiConnect* wifi, bool is_scanning);
void wifi_connect_state_set_radio_state(WifiConnect* wifi, WifiRadioState state);

#ifdef __cplusplus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ static void wifi_manage_event_callback(const void* message, void* context) {
default:
break;
}

wifi_manage_request_view_update(wifi);
}

static void app_show(App app, lv_obj_t* parent) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
#include "wifi_manage.h"
#include "esp_lvgl_port.h"

void wifi_manage_state_set_scanning(WifiManage* wifi, bool is_scanning) {
wifi_manage_lock(wifi);
wifi->state.scanning = is_scanning;
wifi_manage_unlock(wifi);

wifi_manage_request_view_update(wifi);
}

void wifi_manage_state_set_radio_state(WifiManage* wifi, WifiRadioState state) {
wifi_manage_lock(wifi);
wifi->state.radio_state = state;
wifi_manage_unlock(wifi);

wifi_manage_request_view_update(wifi);
}

void wifi_manage_state_update_scanned_records(WifiManage* wifi) {
Expand All @@ -25,6 +20,4 @@ void wifi_manage_state_update_scanned_records(WifiManage* wifi) {
&wifi->state.ap_records_count
);
wifi_manage_unlock(wifi);

wifi_manage_request_view_update(wifi);
}

0 comments on commit c830c66

Please sign in to comment.