From d586a7dc9c60170728af1f1f60b01dc1c0e04cea Mon Sep 17 00:00:00 2001 From: rusefillc Date: Fri, 15 Jul 2022 06:37:30 -0400 Subject: [PATCH] raw aux inputs gauges fix #4346 --- firmware/CHANGELOG.md | 3 +++ firmware/console/status_loop.cpp | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/firmware/CHANGELOG.md b/firmware/CHANGELOG.md index 2db0a05ded..306c0c02c0 100644 --- a/firmware/CHANGELOG.md +++ b/firmware/CHANGELOG.md @@ -25,6 +25,9 @@ Release template (copy/paste this for new release): ## Unreleased +### Added + - raw voltage gauges for Lua script aux analog inputs #4346 + ### Fixed - Lua CAN reception fixed for 11-bit IDs where the frame would be received, but a corrupt ID was passed to the handler function. #4321 - Many drop downs menues are now sorted #4339 diff --git a/firmware/console/status_loop.cpp b/firmware/console/status_loop.cpp index 595e6aaf6f..2c2fec4123 100644 --- a/firmware/console/status_loop.cpp +++ b/firmware/console/status_loop.cpp @@ -569,6 +569,13 @@ static void updateRawSensors() { engine->outputChannels.rawWastegatePosition = Sensor::getRaw(SensorType::WastegatePosition); engine->outputChannels.rawIdlePositionSensor = Sensor::getRaw(SensorType::IdlePosition); + for (int i = 0;iauxAnalogInputs[i]; + if (ch != EFI_ADC_NONE) { + engine->outputChannels.rawAnalogInput[i] = getVoltage("raw aux", ch); + } + } + // TODO: transition AFR to new sensor model engine->outputChannels.rawAfr = (engineConfiguration->afr.hwChannel == EFI_ADC_NONE) ? 0 : getVoltageDivided("ego", engineConfiguration->afr.hwChannel); }