From 966e51cbc6eec1d4b04de7d59c6e95d2e5daa611 Mon Sep 17 00:00:00 2001 From: Matthew Kennedy Date: Thu, 27 Jan 2022 04:46:13 -0800 Subject: [PATCH] more tps accel data (#3844) --- firmware/console/binary/output_channels.txt | 6 +++++- firmware/controllers/algo/accel_enrichment.cpp | 4 ++++ firmware/tunerstudio/rusefi.input | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/firmware/console/binary/output_channels.txt b/firmware/console/binary/output_channels.txt index 3035179dd2..ca325941c0 100644 --- a/firmware/console/binary/output_channels.txt +++ b/firmware/console/binary/output_channels.txt @@ -277,8 +277,11 @@ uint16_t rpmAcceleration;dRPM;"RPM/s",1, 0, 0, 0, 0 uint16_t autoscale rawMap;;"V",{1/@@PACK_MULT_VOLTAGE@@}, 0, 0, 5, 3 uint16_t autoscale rawAfr;;"V",{1/@@PACK_MULT_VOLTAGE@@}, 0, 0, 5, 3 + uint8_t tpsAccelFrom;;"%", 1, 0, 0, 100, 0 + uint8_t tpsAccelTo;;"%", 1, 0, 0, 100, 0 + ! we have some unused bytes to allow compatible TS changes - uint8_t[98 iterate] unusedAtTheEnd;;"",1, 0, 0, 0, 0 + uint8_t[96 iterate] unusedAtTheEnd;;"",1, 0, 0, 0, 0 bit launchSpeedCondition bit launchRpmCondition @@ -288,6 +291,7 @@ uint16_t rpmAcceleration;dRPM;"RPM/s",1, 0, 0, 0, 0 bit launchCombinedConditions bit launchActivatePinState bit dfcoActive + bit tpsAccelActive uint8_t TEMPLOG_MAP_AT_CYCLE_COUNT;;"", 1, 0, -10000, 10000, 3 uint8_t boostControllerOutput;;"", 1, 0, -10000, 10000, 0 diff --git a/firmware/controllers/algo/accel_enrichment.cpp b/firmware/controllers/algo/accel_enrichment.cpp index 6d8273f8d0..505f30be69 100644 --- a/firmware/controllers/algo/accel_enrichment.cpp +++ b/firmware/controllers/algo/accel_enrichment.cpp @@ -176,6 +176,10 @@ void TpsAccelEnrichment::onNewValue(float currentValue) { // TODO: can deltaTps actually be negative? Will this ever trigger? isBelowDecelThreshold = deltaTps < -engineConfiguration->tpsDecelEnleanmentThreshold; + + engine->outputChannels.tpsAccelActive = isAboveAccelThreshold; + engine->outputChannels.tpsAccelFrom = tpsFrom; + engine->outputChannels.tpsAccelTo = tpsTo; } TpsAccelEnrichment::TpsAccelEnrichment() { diff --git a/firmware/tunerstudio/rusefi.input b/firmware/tunerstudio/rusefi.input index 00d46004e7..75fec95e53 100644 --- a/firmware/tunerstudio/rusefi.input +++ b/firmware/tunerstudio/rusefi.input @@ -1236,6 +1236,7 @@ gaugeCategory = DynoView indicator = { isIdleClosedLoop }, "not idling", "idling", white, black, green, black indicator = { isIdleCoasting }, "not coasting", "coasting", white, black, green, black indicator = { dfcoActive }, "no decel cut", "decel cut", white, black, yellow, black + indicator = { tpsAccelActive }, "no TPS accel", "TPS accel active", white, black, yellow, black ; error codes indicator = { isTpsError}, "tps", "tps error", white, black, red, black