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
This commit is contained in:
Giuliano
2026-01-13 14:05:12 +00:00
committed by GitHub
parent bcf4dfe494
commit 6c7f9d5565
2 changed files with 2 additions and 1 deletions

View File

@@ -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

View File

@@ -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) {