From 873d4e26cb62b413d33318f85ab5deafbee59111 Mon Sep 17 00:00:00 2001 From: rusefillc Date: Mon, 14 Mar 2022 23:02:00 -0400 Subject: [PATCH] refactoring --- firmware/console/binary/tunerstudio_commands.cpp | 2 +- firmware/console/status_loop.cpp | 8 +------- firmware/console/status_loop.h | 1 - 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/firmware/console/binary/tunerstudio_commands.cpp b/firmware/console/binary/tunerstudio_commands.cpp index 37d329c145..41bcb5f22d 100644 --- a/firmware/console/binary/tunerstudio_commands.cpp +++ b/firmware/console/binary/tunerstudio_commands.cpp @@ -21,7 +21,7 @@ void TunerStudio::cmdOutputChannels(TsChannelBase* tsChannel, uint16_t offset, u } tsState.outputChannelsCommandCounter++; - prepareTunerStudioOutputs(); + updateTunerStudioState(); // this method is invoked too often to print any debug information tsChannel->writeCrcPacket(TS_RESPONSE_OK, reinterpret_cast(&engine->outputChannels) + offset, count); } diff --git a/firmware/console/status_loop.cpp b/firmware/console/status_loop.cpp index 2c07623056..a9fded1a58 100644 --- a/firmware/console/status_loop.cpp +++ b/firmware/console/status_loop.cpp @@ -707,6 +707,7 @@ static void updateTpsDebug() { engine->outputChannels.debugFloatField5 = 100 * Sensor::getOrZero(SensorType::Tps1Primary) / Sensor::getOrZero(SensorType::Tps1Secondary); } +// sensor state for EFI Analytics Tuner Studio void updateTunerStudioState() { TunerStudioOutputChannels *tsOutputChannels = &engine->outputChannels; #if EFI_SHAFT_POSITION_INPUT @@ -904,13 +905,6 @@ void updateTunerStudioState() { } } -void prepareTunerStudioOutputs(void) { - // sensor state for EFI Analytics Tuner Studio - updateTunerStudioState(); - engine->outputChannels.idleStatus.resetCounter = 0x12345653; - engine->outputChannels.etbStatus.resetCounter = 0x12345654; -} - #endif /* EFI_TUNER_STUDIO */ void initStatusLoop(void) { diff --git a/firmware/console/status_loop.h b/firmware/console/status_loop.h index b932d6aedb..8cf4f749da 100644 --- a/firmware/console/status_loop.h +++ b/firmware/console/status_loop.h @@ -10,7 +10,6 @@ #include "rusefi_types.h" void updateDevConsoleState(void); -void prepareTunerStudioOutputs(void); void startStatusThreads(void); void initStatusLoop(void);