mirror of https://github.com/rusefi/rusefi.git
only: CONFIG_RESET_SWITCH is dead
This commit is contained in:
parent
356d3cc701
commit
7235fa937e
|
@ -85,10 +85,6 @@
|
||||||
#undef TS_SERIAL_AF
|
#undef TS_SERIAL_AF
|
||||||
#define TS_SERIAL_AF 8
|
#define TS_SERIAL_AF 8
|
||||||
|
|
||||||
/* no reset switch */
|
|
||||||
#undef CONFIG_RESET_SWITCH_PORT
|
|
||||||
#undef CONFIG_RESET_SWITCH_PIN
|
|
||||||
|
|
||||||
#undef ADC_VCC
|
#undef ADC_VCC
|
||||||
#define ADC_VCC 2.5f
|
#define ADC_VCC 2.5f
|
||||||
|
|
||||||
|
|
|
@ -441,15 +441,6 @@
|
||||||
#define GPS_SERIAL_DEVICE &SD1
|
#define GPS_SERIAL_DEVICE &SD1
|
||||||
#define GPS_SERIAL_SPEED 38400
|
#define GPS_SERIAL_SPEED 38400
|
||||||
|
|
||||||
#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
|
#ifndef EFI_STORAGE_INT_FLASH
|
||||||
#define EFI_STORAGE_INT_FLASH TRUE
|
#define EFI_STORAGE_INT_FLASH TRUE
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -630,23 +630,12 @@ static void setDefaultEngineConfiguration() {
|
||||||
#include "default_script.lua"
|
#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!
|
// by default, do not ignore config from flash! use it!
|
||||||
#ifndef IGNORE_FLASH_CONFIGURATION
|
#ifndef IGNORE_FLASH_CONFIGURATION
|
||||||
#define IGNORE_FLASH_CONFIGURATION false
|
#define IGNORE_FLASH_CONFIGURATION false
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void loadConfiguration() {
|
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
|
#if ! EFI_ACTIVE_CONFIGURATION_IN_FLASH
|
||||||
// Clear the active configuration so that registered output pins (etc) detect the change on startup and init properly
|
// Clear the active configuration so that registered output pins (etc) detect the change on startup and init properly
|
||||||
|
@ -654,7 +643,7 @@ void loadConfiguration() {
|
||||||
#endif /* EFI_ACTIVE_CONFIGURATION_IN_FLASH */
|
#endif /* EFI_ACTIVE_CONFIGURATION_IN_FLASH */
|
||||||
|
|
||||||
#if EFI_INTERNAL_FLASH
|
#if EFI_INTERNAL_FLASH
|
||||||
if (SHOULD_IGNORE_FLASH() || IGNORE_FLASH_CONFIGURATION) {
|
if (IGNORE_FLASH_CONFIGURATION) {
|
||||||
engineConfiguration->engineType = DEFAULT_ENGINE_TYPE;
|
engineConfiguration->engineType = DEFAULT_ENGINE_TYPE;
|
||||||
resetConfigurationExt(engineConfiguration->engineType);
|
resetConfigurationExt(engineConfiguration->engineType);
|
||||||
writeToFlashNow();
|
writeToFlashNow();
|
||||||
|
|
Loading…
Reference in New Issue