diff --git a/firmware/config/boards/prometheus/efifeatures.h b/firmware/config/boards/prometheus/efifeatures.h index 5181284a7e..4b16efe98c 100644 --- a/firmware/config/boards/prometheus/efifeatures.h +++ b/firmware/config/boards/prometheus/efifeatures.h @@ -66,7 +66,6 @@ #define LED_CRITICAL_ERROR_BRAIN_PIN Gpio::A13 #undef CONSOLE_MODE_SWITCH_PORT -#undef CONFIG_RESET_SWITCH_PORT //!!!!!!!!!!!!!!! //#undef EFI_INTERNAL_ADC diff --git a/firmware/config/stm32f4ems/efifeatures.h b/firmware/config/stm32f4ems/efifeatures.h index ebc1d38ace..6c69cefdf7 100644 --- a/firmware/config/stm32f4ems/efifeatures.h +++ b/firmware/config/stm32f4ems/efifeatures.h @@ -379,15 +379,6 @@ #define LED_CRITICAL_ERROR_BRAIN_PIN Gpio::D14 #endif -#ifndef CONFIG_RESET_SWITCH_PORT -// looks like this feature is not extremely popular, we can try living without it now :) -//#define CONFIG_RESET_SWITCH_PORT GPIOD -#endif - -#ifndef CONFIG_RESET_SWITCH_PIN -#define CONFIG_RESET_SWITCH_PIN 6 -#endif - #ifndef EFI_STORAGE_INT_FLASH #define EFI_STORAGE_INT_FLASH TRUE #endif diff --git a/firmware/controllers/algo/engine_configuration.cpp b/firmware/controllers/algo/engine_configuration.cpp index 7355ab9a60..1a5c5c9408 100644 --- a/firmware/controllers/algo/engine_configuration.cpp +++ b/firmware/controllers/algo/engine_configuration.cpp @@ -607,31 +607,19 @@ static void setDefaultEngineConfiguration() { #include "default_script.lua" } -#ifdef CONFIG_RESET_SWITCH_PORT -// this pin is not configurable at runtime so that we have a reliable way to reset configuration -#define SHOULD_IGNORE_FLASH() (palReadPad(CONFIG_RESET_SWITCH_PORT, CONFIG_RESET_SWITCH_PIN) == 0) -#else -#define SHOULD_IGNORE_FLASH() (false) -#endif // CONFIG_RESET_SWITCH_PORT - // by default, do not ignore config from flash! use it! #ifndef IGNORE_FLASH_CONFIGURATION #define IGNORE_FLASH_CONFIGURATION false #endif void loadConfiguration() { -#ifdef CONFIG_RESET_SWITCH_PORT - // initialize the reset pin if necessary - palSetPadMode(CONFIG_RESET_SWITCH_PORT, CONFIG_RESET_SWITCH_PIN, PAL_MODE_INPUT_PULLUP); -#endif /* CONFIG_RESET_SWITCH_PORT */ - #if ! EFI_ACTIVE_CONFIGURATION_IN_FLASH // Clear the active configuration so that registered output pins (etc) detect the change on startup and init properly prepareVoidConfiguration(&activeConfiguration); #endif /* EFI_ACTIVE_CONFIGURATION_IN_FLASH */ #if EFI_INTERNAL_FLASH - if (SHOULD_IGNORE_FLASH() || IGNORE_FLASH_CONFIGURATION) { + if (IGNORE_FLASH_CONFIGURATION) { engineConfiguration->engineType = engine_type_e::DEFAULT_ENGINE_TYPE; resetConfigurationExt(engineConfiguration->engineType); writeToFlashNow();