From 041a97fe1815008d603cc0eab08af784595e9df0 Mon Sep 17 00:00:00 2001 From: rusefi Date: Sun, 5 May 2024 00:58:55 -0400 Subject: [PATCH] only:pedal2TpsProvider --- firmware/controllers/actuators/electronic_throttle.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/firmware/controllers/actuators/electronic_throttle.cpp b/firmware/controllers/actuators/electronic_throttle.cpp index e5e81dbb92..184b54ee85 100644 --- a/firmware/controllers/actuators/electronic_throttle.cpp +++ b/firmware/controllers/actuators/electronic_throttle.cpp @@ -939,6 +939,10 @@ static pid_s* getPidForDcFunction(dc_function_e function) { } } +BOARD_WEAK ValueProvider3D* pedal2TpsProvider() { + return &pedal2tpsMap; +} + void doInitElectronicThrottle() { bool hasPedal = Sensor::hasSensor(SensorType::AcceleratorPedalPrimary); @@ -966,7 +970,7 @@ void doInitElectronicThrottle() { auto pid = getPidForDcFunction(func); - bool dcConfigured = controller->init(func, motor, pid, &pedal2tpsMap, hasPedal); + bool dcConfigured = controller->init(func, motor, pid, pedal2TpsProvider(), hasPedal); bool etbConfigured = dcConfigured && controller->isEtbMode(); if (i == 0) { engineConfiguration->etb1configured = etbConfigured;