From 5651062d4f514cec07e58250c4e7afeca0bd9ba8 Mon Sep 17 00:00:00 2001 From: rusefillc Date: Fri, 8 Nov 2024 20:21:59 -0500 Subject: [PATCH] additional ETB state into LiveData only:uaefi --- firmware/controllers/actuators/electronic_throttle.cpp | 4 +++- firmware/controllers/actuators/electronic_throttle.txt | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/firmware/controllers/actuators/electronic_throttle.cpp b/firmware/controllers/actuators/electronic_throttle.cpp index a5e9d53bfc..33a0452e37 100644 --- a/firmware/controllers/actuators/electronic_throttle.cpp +++ b/firmware/controllers/actuators/electronic_throttle.cpp @@ -224,7 +224,9 @@ void EtbController::showStatus() { } expected EtbController::observePlant() { - return Sensor::get(m_positionSensor); + expected plant = Sensor::get(m_positionSensor); + validPosition = plant.Valid; + return plant; } void EtbController::setIdlePosition(percent_t pos) { diff --git a/firmware/controllers/actuators/electronic_throttle.txt b/firmware/controllers/actuators/electronic_throttle.txt index 9f672dc6cb..d09a17ecd0 100644 --- a/firmware/controllers/actuators/electronic_throttle.txt +++ b/firmware/controllers/actuators/electronic_throttle.txt @@ -17,6 +17,7 @@ struct_no_prefix electronic_throttle_s bit etbRevLimitActive bit jamDetected + bit validPosition uint16_t etbTpsErrorCounter;"ETB TPS error counter";"count", 1,0, 0,3, 0,@@GAUGE_CATEGORY_ETB@@ uint16_t etbPpsErrorCounter;"ETB pedal error counter";"count", 1,0, 0,3, 0,@@GAUGE_CATEGORY_ETB@@