From 285edfc5ec2ceb1ebca160ea2dbf0d111fccc508 Mon Sep 17 00:00:00 2001 From: pulipakaa24 Date: Wed, 17 Dec 2025 13:53:42 -0600 Subject: [PATCH] wifi object moved --- include/WiFi.cpp | 2 ++ include/WiFi.hpp | 2 ++ src/main.cpp | 1 - 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/WiFi.cpp b/include/WiFi.cpp index b653e7b..fb1c126 100644 --- a/include/WiFi.cpp +++ b/include/WiFi.cpp @@ -11,6 +11,8 @@ esp_event_handler_instance_t WiFi::instance_got_ip = NULL; #define WIFI_CONNECTED_BIT BIT0 +WiFi bmWiFi; + // The Event Handler (The engine room) void WiFi::event_handler(void* arg, esp_event_base_t event_base, int32_t event_id, void* event_data) { diff --git a/include/WiFi.hpp b/include/WiFi.hpp index 0d2bb4d..06826ec 100644 --- a/include/WiFi.hpp +++ b/include/WiFi.hpp @@ -4,6 +4,8 @@ #include "esp_wifi.h" #include +extern WiFi bmWiFi; + class WiFi { public: static void init(); diff --git a/src/main.cpp b/src/main.cpp index 7974aef..c6fc3f5 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -16,7 +16,6 @@ extern "C" void app_main() { } ESP_ERROR_CHECK(ret); - WiFi bmWiFi; bmWiFi.init(); nvs_handle_t WiFiHandle;