From 73e3edc3d834e6226dd7edd882da23f82b591353 Mon Sep 17 00:00:00 2001 From: rusefi Date: Fri, 29 Nov 2019 20:15:29 -0500 Subject: [PATCH] dual ETB seems to work! --- firmware/controllers/actuators/electronic_throttle.cpp | 2 +- firmware/controllers/sensors/tps.cpp | 2 +- firmware/controllers/sensors/tps.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/firmware/controllers/actuators/electronic_throttle.cpp b/firmware/controllers/actuators/electronic_throttle.cpp index 9afe1c5fb9..6eff7ee366 100644 --- a/firmware/controllers/actuators/electronic_throttle.cpp +++ b/firmware/controllers/actuators/electronic_throttle.cpp @@ -227,7 +227,7 @@ void EtbController::PeriodicTask() { return; } - percent_t actualThrottlePosition = getTPSWithIndex(ownIndex PASS_ENGINE_PARAMETER_SIGNATURE); + percent_t actualThrottlePosition = getTPSWithIndex(ownIndex PASS_ENGINE_PARAMETER_SUFFIX); if (engine->etbAutoTune) { autoTune.input = actualThrottlePosition; diff --git a/firmware/controllers/sensors/tps.cpp b/firmware/controllers/sensors/tps.cpp index 22e5ee6f47..4ded0610bc 100644 --- a/firmware/controllers/sensors/tps.cpp +++ b/firmware/controllers/sensors/tps.cpp @@ -141,7 +141,7 @@ float getTPSVoltage(DECLARE_ENGINE_PARAMETER_SIGNATURE) { * We need ADC value because TunerStudio has a nice TPS configuration wizard, and this wizard * wants a TPS value. */ -int getTPS12bitAdc(int index PASS_ENGINE_PARAMETER_SUFFIX) { +int getTPS12bitAdc(int index DECLARE_ENGINE_PARAMETER_SUFFIX) { #if !EFI_PROD_CODE if (engine->mockTpsAdcValue != MOCK_UNDEFINED) { return engine->mockTpsAdcValue; diff --git a/firmware/controllers/sensors/tps.h b/firmware/controllers/sensors/tps.h index ed5af40ce2..cd12176012 100644 --- a/firmware/controllers/sensors/tps.h +++ b/firmware/controllers/sensors/tps.h @@ -27,8 +27,8 @@ percent_t getTPS(DECLARE_ENGINE_PARAMETER_SIGNATURE); percent_t getTPSWithIndex(int index DECLARE_ENGINE_PARAMETER_SUFFIX); bool hasTpsSensor(DECLARE_ENGINE_PARAMETER_SIGNATURE); int convertVoltageTo10bitADC(float voltage); -int getTPS12bitAdc(int index PASS_ENGINE_PARAMETER_SUFFIX); -#define getTPS10bitAdc() (getTPS12bitAdc() / TPS_TS_CONVERSION) +int getTPS12bitAdc(int index DECLARE_ENGINE_PARAMETER_SUFFIX); +#define getTPS10bitAdc() (getTPS12bitAdc(0 PASS_ENGINE_PARAMETER_SUFFIX) / TPS_TS_CONVERSION) float getTPSVoltage(DECLARE_ENGINE_PARAMETER_SIGNATURE); percent_t getTpsValue(int adc DECLARE_ENGINE_PARAMETER_SUFFIX); void setBosch0280750009(DECLARE_ENGINE_PARAMETER_SIGNATURE);