modified: main/src/wifi.c

This commit is contained in:
Sven Luethi committed 2024-09-11 20:16:50 +02:00
1 parent b693e31141
commit 4561dc410f
1 file changed
+3
+3
View File
@@ -5,6 +5,7 @@
//#include <esp_http_client.h> //#include <esp_http_client.h>
#include "functions.h" #include "functions.h"
#include "wifi.h" #include "wifi.h"
#include "leds.h"
static const char * TAG = "wifi.c"; static const char * TAG = "wifi.c";
@@ -43,6 +44,7 @@ void wifi_on() {
ESP_LOGI(TAG, "WiFi is ON and connecting..."); ESP_LOGI(TAG, "WiFi is ON and connecting...");
ESP_ERROR_CHECK(esp_wifi_connect()); ESP_ERROR_CHECK(esp_wifi_connect());
ESP_LOGI(TAG, "WiFi is ON and connected to AP."); ESP_LOGI(TAG, "WiFi is ON and connected to AP.");
led1_on();
} }
// Function to turn off WiFi // Function to turn off WiFi
@@ -52,4 +54,5 @@ void wifi_off() {
ESP_LOGI(TAG, "WiFi disconnected. Turning WiFi OFF..."); ESP_LOGI(TAG, "WiFi disconnected. Turning WiFi OFF...");
esp_wifi_stop(); // Stop WiFi esp_wifi_stop(); // Stop WiFi
ESP_LOGI(TAG, "WiFi is OFF."); ESP_LOGI(TAG, "WiFi is OFF.");
led1_off();
} }