Clutch switch inverted options do not invert detected pedal position #3044

This commit is contained in:
rusefillc 2021-07-24 15:54:51 -04:00
parent 9c166d86fe
commit ca34562d5d
3 changed files with 28 additions and 25 deletions

View File

@ -735,10 +735,8 @@ void startPedalPins(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
} }
void stopPedalPins(DECLARE_ENGINE_PARAMETER_SIGNATURE) { void stopPedalPins(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
brain_pin_markUsed(CONFIG(clutchUpPin), "clutch" PASS_ENGINE_PARAMETER_SIGNATURE); brain_pin_markUsed(activeConfiguration.clutchUpPin, "clutch" PASS_ENGINE_PARAMETER_SUFFIX);
brain_pin_markUsed(CONFIG(clutchDownPin), "clutch" PASS_ENGINE_PARAMETER_SIGNATURE); brain_pin_markUsed(activeConfiguration.clutchDownPin, "clutch" PASS_ENGINE_PARAMETER_SUFFIX);
brain_pin_markUsed(CONFIG(throttlePedalUpPin), "th_pedal" PASS_ENGINE_PARAMETER_SIGNATURE); brain_pin_markUsed(activeConfiguration.throttlePedalUpPin, "th_pedal" PASS_ENGINE_PARAMETER_SUFFIX);
brain_pin_markUsed(CONFIG(brakePedalPin), "brake" PASS_ENGINE_PARAMETER_SIGNATURE); brain_pin_markUsed(activeConfiguration.brakePedalPin, "brake" PASS_ENGINE_PARAMETER_SUFFIX);
} }

View File

@ -311,25 +311,7 @@ void applyNewHardwareSettings(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
stopHip9001_pins(); stopHip9001_pins();
#endif /* EFI_HIP_9011 */ #endif /* EFI_HIP_9011 */
#if EFI_PROD_CODE && (BOARD_EXT_GPIOCHIPS > 0) stopHardware(PASS_ENGINE_PARAMETER_SIGNATURE);
stopSmartCsPins();
#endif /* (BOARD_EXT_GPIOCHIPS > 0) */
#if EFI_VEHICLE_SPEED
stopVSSPins();
#endif /* EFI_VEHICLE_SPEED */
#if EFI_LOGIC_ANALYZER
stopLogicAnalyzerPins();
#endif /* EFI_LOGIC_ANALYZER */
#if EFI_EMULATE_POSITION_SENSORS
stopTriggerEmulatorPins();
#endif /* EFI_EMULATE_POSITION_SENSORS */
#if EFI_AUX_PID
stopVvtControlPins();
#endif /* EFI_AUX_PID */
if (isConfigurationChanged(is_enabled_spi_1)) { if (isConfigurationChanged(is_enabled_spi_1)) {
stopSpi(SPI_DEVICE_1); stopSpi(SPI_DEVICE_1);
@ -488,6 +470,28 @@ void initHardwareNoConfig(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
#endif // EFI_FILE_LOGGING #endif // EFI_FILE_LOGGING
} }
void stopHardware(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
#if EFI_PROD_CODE && (BOARD_EXT_GPIOCHIPS > 0)
stopSmartCsPins();
#endif /* (BOARD_EXT_GPIOCHIPS > 0) */
#if EFI_VEHICLE_SPEED
stopVSSPins();
#endif /* EFI_VEHICLE_SPEED */
#if EFI_LOGIC_ANALYZER
stopLogicAnalyzerPins();
#endif /* EFI_LOGIC_ANALYZER */
#if EFI_EMULATE_POSITION_SENSORS
stopTriggerEmulatorPins();
#endif /* EFI_EMULATE_POSITION_SENSORS */
#if EFI_AUX_PID
stopVvtControlPins();
#endif /* EFI_AUX_PID */
}
/** /**
* This method is invoked both on ECU start and configuration change * This method is invoked both on ECU start and configuration change
*/ */

View File

@ -10,6 +10,7 @@
#include "global.h" #include "global.h"
void startHardware(DECLARE_ENGINE_PARAMETER_SIGNATURE); void startHardware(DECLARE_ENGINE_PARAMETER_SIGNATURE);
void stopHardware(DECLARE_ENGINE_PARAMETER_SIGNATURE);
#if HAL_USE_SPI #if HAL_USE_SPI