From 6c7f9d556574bb0fdb398d5ebdccef348d7e44c5 Mon Sep 17 00:00:00 2001 From: Giuliano <3684609+GMagician@users.noreply.github.com> Date: Tue, 13 Jan 2026 14:05:12 +0000 Subject: [PATCH] Save some ram in esp8266 (#24340) * Save some ram in esp8266 This will exclude the mutex variable not used by esp8266, saving some ram bytes. Also removed a double initializzation variable is initialized ad the beginning of the function but it's also reinitialized inside if and else branches * as suggested --- tasmota/tasmota.ino | 2 ++ tasmota/tasmota_support/support_wifi.ino | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tasmota/tasmota.ino b/tasmota/tasmota.ino index e32e490bb..a2c7da19c 100644 --- a/tasmota/tasmota.ino +++ b/tasmota/tasmota.ino @@ -268,7 +268,9 @@ struct TasmotaGlobal_t { uint32_t zc_code_offset; // Zero cross moment offset due to executing power code (microseconds) uint32_t zc_interval; // Zero cross interval around 8333 (60Hz) or 10000 (50Hz) (microseconds) GpioOptionABits gpio_optiona; // GPIO Option_A flags +#ifdef ESP32 void *log_buffer_mutex; // Control access to log buffer +#endif power_t power; // Current copy of Settings->power power_t power_latching; // Current state of single pin latching power diff --git a/tasmota/tasmota_support/support_wifi.ino b/tasmota/tasmota_support/support_wifi.ino index fbdde65b3..b987e7cc2 100644 --- a/tasmota/tasmota_support/support_wifi.ino +++ b/tasmota/tasmota_support/support_wifi.ino @@ -1100,7 +1100,6 @@ void WifiCheckIp(void) { if ((WL_CONNECTED == WiFi.status()) && WifiHasIP()) { WifiSetState(1); - Wifi.counter = WIFI_CHECK_SEC; Wifi.retry = Wifi.retry_init; Wifi.max_retry = 0; if (Wifi.status != WL_CONNECTED) {