From 9168f7b198a40bfa5ad18aad4070c309f1b5ee2b Mon Sep 17 00:00:00 2001 From: Jason2866 <24528715+Jason2866@users.noreply.github.com> Date: Fri, 3 May 2024 15:01:31 +0200 Subject: [PATCH] More shrink of safeboot (#21333) * remove crash recorder from safeboot * small refactor * safeboot more shrink --- tasmota/tasmota_support/support_button_v4.ino | 2 ++ tasmota/tasmota_xsns_sensor/xsns_02_analog.ino | 3 +++ 2 files changed, 5 insertions(+) diff --git a/tasmota/tasmota_support/support_button_v4.ino b/tasmota/tasmota_support/support_button_v4.ino index a55471b8e..00fbfd2f9 100644 --- a/tasmota/tasmota_support/support_button_v4.ino +++ b/tasmota/tasmota_support/support_button_v4.ino @@ -407,12 +407,14 @@ void ButtonHandler(void) { } #ifdef USE_ADC +#ifndef FIRMWARE_SAFEBOOT 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 // USE_ADC XdrvMailbox.index = button_index; diff --git a/tasmota/tasmota_xsns_sensor/xsns_02_analog.ino b/tasmota/tasmota_xsns_sensor/xsns_02_analog.ino index c60b4e885..a4dac9104 100644 --- a/tasmota/tasmota_xsns_sensor/xsns_02_analog.ino +++ b/tasmota/tasmota_xsns_sensor/xsns_02_analog.ino @@ -17,6 +17,8 @@ along with this program. If not, see . */ +#ifndef FIRMWARE_SAFEBOOT + #ifdef USE_ADC /*********************************************************************************************\ * ADC support for ESP8266 GPIO17 (=PIN_A0) and ESP32 up to 8 channels on GPIO32 to GPIO39 @@ -932,3 +934,4 @@ bool Xsns02(uint32_t function) { } #endif // USE_ADC +#endif // FIRMWARE_SAFEBOOT \ No newline at end of file