From 1e63c8924e3bd5ad0a9d06d52b3da1edecc4e54e Mon Sep 17 00:00:00 2001
From: Jason2866 <24528715+Jason2866@users.noreply.github.com>
Date: Sat, 4 May 2024 15:34:11 +0200
Subject: [PATCH] use "minimal" instead of "safeboot" (#21346)
---
tasmota/tasmota_support/support_button_v4.ino | 4 ++--
tasmota/tasmota_support/support_command.ino | 12 ++++++------
tasmota/tasmota_support/support_crash_recorder.ino | 4 ++--
tasmota/tasmota_support/support_tasmota.ino | 4 ++--
tasmota/tasmota_support/support_wifi.ino | 4 ++--
tasmota/tasmota_xdrv_driver/xdrv_01_9_webserver.ino | 2 --
tasmota/tasmota_xdrv_driver/xdrv_02_9_mqtt.ino | 4 ++--
tasmota/tasmota_xsns_sensor/xsns_02_analog.ino | 4 ++--
8 files changed, 18 insertions(+), 20 deletions(-)
diff --git a/tasmota/tasmota_support/support_button_v4.ino b/tasmota/tasmota_support/support_button_v4.ino
index 00fbfd2f9..7766eadd7 100644
--- a/tasmota/tasmota_support/support_button_v4.ino
+++ b/tasmota/tasmota_support/support_button_v4.ino
@@ -407,14 +407,14 @@ void ButtonHandler(void) {
}
#ifdef USE_ADC
-#ifndef FIRMWARE_SAFEBOOT
+#ifndef FIRMWARE_MINIMAL
else if (PinUsed(GPIO_ADC_BUTTON, button_index)) {
button = AdcGetButton(Pin(GPIO_ADC_BUTTON, button_index));
}
else if (PinUsed(GPIO_ADC_BUTTON_INV, button_index)) {
button = AdcGetButton(Pin(GPIO_ADC_BUTTON_INV, button_index));
}
-#endif // FIRMWARE_SAFEBOOT
+#endif // FIRMWARE_MINIMAL
#endif // USE_ADC
XdrvMailbox.index = button_index;
diff --git a/tasmota/tasmota_support/support_command.ino b/tasmota/tasmota_support/support_command.ino
index 9616c885d..3b6fcf5da 100644
--- a/tasmota/tasmota_support/support_command.ino
+++ b/tasmota/tasmota_support/support_command.ino
@@ -812,9 +812,9 @@ void CmndStatus(void)
if (payload > MAX_STATUS) { return; } // {"Command":"Error"}
if (!Settings->flag.mqtt_enabled && (6 == payload)) { return; } // SetOption3 - Enable MQTT
if (!TasmotaGlobal.energy_driver && (9 == payload)) { return; }
- #ifndef FIRMWARE_SAFEBOOT
+ #ifndef FIRMWARE_MINIMAL
if (!CrashFlag() && (12 == payload)) { return; }
- #endif // FIRMWARE_SAFEBOOT
+ #endif // FIRMWARE_MINIMAL
if (!Settings->flag3.shutter_mode && (13 == payload)) { return; }
char stemp[200];
@@ -1044,7 +1044,7 @@ void CmndStatus(void)
CmndStatusResponse(11);
}
-#ifndef FIRMWARE_SAFEBOOT
+#ifndef FIRMWARE_MINIMAL
if (CrashFlag()) {
if ((0 == payload) || (12 == payload)) {
Response_P(PSTR("{\"" D_CMND_STATUS D_STATUS12_STATUS "\":"));
@@ -1053,7 +1053,7 @@ void CmndStatus(void)
CmndStatusResponse(12);
}
}
-#endif // FIRMWARE_SAFEBOOT
+#endif // FIRMWARE_MINIMAL
#ifdef USE_SHUTTER
if ((0 == payload) || (13 == payload)) {
@@ -1256,7 +1256,7 @@ void CmndRestart(void)
TasmotaGlobal.restart_deepsleep = true;
ResponseCmndChar(PSTR("Go to sleep"));
break;
-#ifndef FIRMWARE_SAFEBOOT
+#ifndef FIRMWARE_MINIMAL
case -1:
CmndCrash(); // force a crash
break;
@@ -1266,7 +1266,7 @@ void CmndRestart(void)
case -3:
CmndBlockedLoop();
break;
-#endif // FIRMWARE_SAFEBOOT
+#endif // FIRMWARE_MINIMAL
case 99:
AddLog(LOG_LEVEL_INFO, PSTR(D_LOG_APPLICATION D_RESTARTING));
EspRestart();
diff --git a/tasmota/tasmota_support/support_crash_recorder.ino b/tasmota/tasmota_support/support_crash_recorder.ino
index 9e41f938f..325f10075 100644
--- a/tasmota/tasmota_support/support_crash_recorder.ino
+++ b/tasmota/tasmota_support/support_crash_recorder.ino
@@ -17,7 +17,7 @@
along with this program. If not, see