From 9b140e57a169b26bd63e65acce90df89e49aa58c Mon Sep 17 00:00:00 2001 From: rusefi Date: Sun, 10 Oct 2021 17:10:04 -0400 Subject: [PATCH] etb_test_hw --- firmware/controllers/actuators/electronic_throttle.cpp | 9 ++++++++- firmware/controllers/actuators/electronic_throttle.h | 6 +++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/firmware/controllers/actuators/electronic_throttle.cpp b/firmware/controllers/actuators/electronic_throttle.cpp index 222a3b17dd..1d94e8b5fc 100644 --- a/firmware/controllers/actuators/electronic_throttle.cpp +++ b/firmware/controllers/actuators/electronic_throttle.cpp @@ -942,7 +942,7 @@ void doInitElectronicThrottle(DECLARE_ENGINE_PARAMETER_SIGNATURE) { // this command is useful for real hardware test with known cheap hardware addConsoleAction("etb_test_hw", [](){ - setToyota89281_33010_pedal_position_sensor(PASS_CONFIG_PARAMETER_SIGNATURE); + set18919_AM810_pedal_position_sensor(PASS_CONFIG_PARAMETER_SIGNATURE); }); #endif /* EFI_PROD_CODE */ @@ -1034,6 +1034,13 @@ void setEtbWastegatePosition(percent_t pos DECLARE_ENGINE_PARAMETER_SUFFIX) { } } +void set18919_AM810_pedal_position_sensor(DECLARE_CONFIG_PARAMETER_SIGNATURE) { + engineConfiguration->throttlePedalUpVoltage = 0.1; + engineConfiguration->throttlePedalWOTVoltage = 4.5; + engineConfiguration->throttlePedalSecondaryUpVoltage = 0.1; + engineConfiguration->throttlePedalSecondaryWOTVoltage = 2.2; +} + void setToyota89281_33010_pedal_position_sensor(DECLARE_CONFIG_PARAMETER_SIGNATURE) { engineConfiguration->throttlePedalUpVoltage = 0; engineConfiguration->throttlePedalWOTVoltage = 4.1; diff --git a/firmware/controllers/actuators/electronic_throttle.h b/firmware/controllers/actuators/electronic_throttle.h index 1a9f4ea17a..897b271d97 100644 --- a/firmware/controllers/actuators/electronic_throttle.h +++ b/firmware/controllers/actuators/electronic_throttle.h @@ -16,9 +16,13 @@ void doInitElectronicThrottle(DECLARE_ENGINE_PARAMETER_SIGNATURE); void setEtbIdlePosition(percent_t pos DECLARE_ENGINE_PARAMETER_SUFFIX); void setEtbWastegatePosition(percent_t pos DECLARE_ENGINE_PARAMETER_SUFFIX); -void setToyota89281_33010_pedal_position_sensor(DECLARE_CONFIG_PARAMETER_SIGNATURE); void setHitachiEtbCalibration(DECLARE_CONFIG_PARAMETER_SIGNATURE); +// these two sensors use same plug but have different calibrations and even rotate in different directions +void set18919_AM810_pedal_position_sensor(DECLARE_CONFIG_PARAMETER_SIGNATURE); +void setToyota89281_33010_pedal_position_sensor(DECLARE_CONFIG_PARAMETER_SIGNATURE); + + void setDefaultEtbBiasCurve(DECLARE_CONFIG_PARAMETER_SIGNATURE); void setDefaultEtbParameters(DECLARE_CONFIG_PARAMETER_SIGNATURE); void setBoschVNH2SP30Curve(DECLARE_CONFIG_PARAMETER_SIGNATURE);