From 84e73e37dd0035f1d46a3aa75020f285c1e478aa Mon Sep 17 00:00:00 2001 From: Matthew Kennedy Date: Fri, 10 Apr 2020 14:49:13 -0700 Subject: [PATCH] tps (#1279) Co-authored-by: Matthew Kennedy --- firmware/controllers/core/fsio_impl.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/firmware/controllers/core/fsio_impl.cpp b/firmware/controllers/core/fsio_impl.cpp index 5817e97d13..8637ed9f42 100644 --- a/firmware/controllers/core/fsio_impl.cpp +++ b/firmware/controllers/core/fsio_impl.cpp @@ -24,6 +24,7 @@ EXTERN_ENGINE; #include "rpm_calculator.h" #include "efi_gpio.h" #include "pwm_generator_logic.h" +#include "sensor.h" /** * in case of zero frequency pin is operating as simple on/off. '1' for ON and '0' for OFF @@ -148,6 +149,8 @@ float getEngineValue(le_action_e action DECLARE_ENGINE_PARAMETER_SUFFIX) { return engine->isInShutdownMode(); case LE_METHOD_VBATT: return getVBatt(PASS_ENGINE_PARAMETER_SIGNATURE); + case LE_METHOD_TPS: + return Sensor::get(SensorType::DriverThrottleIntent).value_or(0); #include "fsio_getters.def" default: warning(CUSTOM_FSIO_UNEXPECTED, "FSIO ERROR no data for action=%d", action);