Skip to content

Commit

Permalink
Final polishing for now
Browse files Browse the repository at this point in the history
  • Loading branch information
Cabooman committed Jan 8, 2024
1 parent 8e00040 commit c96ca5f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
10 changes: 4 additions & 6 deletions Software/src/devboard/wifi/wifi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,19 +76,17 @@ void init_wireless(void) {
xTaskCreate(wifi_taskfunction, "Wifi task", 1024 * 8, NULL, 1, NULL);
}

bool wifi_is_connected(void) {
return WiFi.status() == WL_CONNECTED;
}

void wifi_taskfunction(void* pvParameters) {
init_wifi();
init_webserver();
init_mqtt();

while (true) {
wifi_reconnect();
webserver_loop();
mqtt_loop();
if(WiFi.status() == WL_CONNECTED) {
webserver_loop();
mqtt_loop();
}
delay(1);
}
}
9 changes: 0 additions & 9 deletions Software/src/devboard/wifi/wifi.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,6 @@ extern const char* passwordAP;
*/
void init_wireless(void);

/**
* @brief Returns the WiFi connections status
*
* @param[in] void
*
* @return bool: true = connected, false = disconnected
*/
bool wifi_is_connected(void);

/**
* @brief FreeRTOS taskfunction
*
Expand Down

0 comments on commit c96ca5f

Please sign in to comment.