Skip to content

Commit

Permalink
Move System init above WiFi init
Browse files Browse the repository at this point in the history
  • Loading branch information
eandersson committed Oct 8, 2024
1 parent 2c13f23 commit 6b63ffd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ void app_main(void)
sizeof(GLOBAL_STATE.SYSTEM_MODULE.ssid));
GLOBAL_STATE.SYSTEM_MODULE.ssid[sizeof(GLOBAL_STATE.SYSTEM_MODULE.ssid)-1] = 0;

SYSTEM_init_system(&GLOBAL_STATE);

// init and connect to wifi
wifi_init(wifi_ssid, wifi_pass, hostname);
start_rest_server((void *) &GLOBAL_STATE);
Expand Down Expand Up @@ -195,8 +197,6 @@ void app_main(void)
free(wifi_pass);
free(hostname);

SYSTEM_init_system(&GLOBAL_STATE);

xTaskCreate(SYSTEM_task, "SYSTEM_task", 4096, (void *) &GLOBAL_STATE, 3, NULL);
xTaskCreate(POWER_MANAGEMENT_task, "power mangement", 8192, (void *) &GLOBAL_STATE, 10, NULL);

Expand Down

0 comments on commit 6b63ffd

Please sign in to comment.