From 5865f65e1e975822428d3c8399b34415bdc4931d Mon Sep 17 00:00:00 2001 From: Matthew Kennedy Date: Thu, 27 Jan 2022 16:21:05 -0800 Subject: [PATCH] remove getDebugChannels (#3850) --- .../console/binary/tunerstudio_debug_struct.h | 20 ---------------- firmware/console/binary/tunerstudio_outputs.h | 9 +------ firmware/console/status_loop.cpp | 2 +- firmware/hw_layer/drivers/gpio/tle8888.cpp | 24 +++++++++---------- firmware/hw_layer/drivers/gpio/tle8888.h | 3 +-- 5 files changed, 15 insertions(+), 43 deletions(-) delete mode 100644 firmware/console/binary/tunerstudio_debug_struct.h diff --git a/firmware/console/binary/tunerstudio_debug_struct.h b/firmware/console/binary/tunerstudio_debug_struct.h deleted file mode 100644 index a5a17b4bf5..0000000000 --- a/firmware/console/binary/tunerstudio_debug_struct.h +++ /dev/null @@ -1,20 +0,0 @@ -/** - * - */ - -#pragma once - -typedef struct { - float debugFloatField1; // 180 - float debugFloatField2; - float debugFloatField3; - float debugFloatField4; - float debugFloatField5; - float debugFloatField6; - float debugFloatField7; - int debugIntField1; - int debugIntField2; - int debugIntField3; - int16_t debugIntField4; - int16_t debugIntField5; -} TsDebugChannels; diff --git a/firmware/console/binary/tunerstudio_outputs.h b/firmware/console/binary/tunerstudio_outputs.h index 13165e6944..b4206d45fa 100644 --- a/firmware/console/binary/tunerstudio_outputs.h +++ b/firmware/console/binary/tunerstudio_outputs.h @@ -12,7 +12,6 @@ #include "rusefi_types.h" #include "scaled_channel.h" -#include "tunerstudio_debug_struct.h" #include "ts_outputs_generated.h" #ifndef WITH_TS_STATE @@ -31,10 +30,4 @@ * see also [OutputChannels] in rusefi.input * see also TS_OUTPUT_SIZE in rusefi_config.txt */ -struct TunerStudioOutputChannels : ts_outputs_s { - // Temporary - will remove soon - TsDebugChannels* getDebugChannels() { - return reinterpret_cast(&debugFloatField1); - } - -}; +struct TunerStudioOutputChannels : ts_outputs_s { }; diff --git a/firmware/console/status_loop.cpp b/firmware/console/status_loop.cpp index b8f5790079..b53d258b24 100644 --- a/firmware/console/status_loop.cpp +++ b/firmware/console/status_loop.cpp @@ -871,7 +871,7 @@ void updateTunerStudioState() { break; case DBG_TLE8888: #if (BOARD_TLE8888_COUNT > 0) - tle8888PostState(tsOutputChannels->getDebugChannels()); + tle8888PostState(); #endif /* BOARD_TLE8888_COUNT */ break; case DBG_LOGIC_ANALYZER: diff --git a/firmware/hw_layer/drivers/gpio/tle8888.cpp b/firmware/hw_layer/drivers/gpio/tle8888.cpp index a7c4a12592..c8d5125b3b 100644 --- a/firmware/hw_layer/drivers/gpio/tle8888.cpp +++ b/firmware/hw_layer/drivers/gpio/tle8888.cpp @@ -288,21 +288,21 @@ static const char* tle8888_pin_names[TLE8888_SIGNALS] = { #if EFI_TUNER_STUDIO // set debug_mode 31 -void tle8888PostState(TsDebugChannels *debugChannels) { +void tle8888PostState() { Tle8888 *chip = &chips[0]; - debugChannels->debugIntField1 = chip->wwd_err_cnt; - debugChannels->debugIntField2 = chip->fwd_err_cnt; - debugChannels->debugIntField3 = chip->tot_err_cnt; - //debugChannels->debugIntField1 = chip->spi_cnt; - //debugChannels->debugIntField2 = chip->tx; - //debugChannels->debugIntField3 = chip->rx; - debugChannels->debugIntField5 = chip->init_cnt; + engine->outputChannels.debugIntField1 = chip->wwd_err_cnt; + engine->outputChannels.debugIntField2 = chip->fwd_err_cnt; + engine->outputChannels.debugIntField3 = chip->tot_err_cnt; + //engine->outputChannels.debugIntField1 = chip->spi_cnt; + //engine->outputChannels.debugIntField2 = chip->tx; + //engine->outputChannels.debugIntField3 = chip->rx; + engine->outputChannels.debugIntField5 = chip->init_cnt; - debugChannels->debugFloatField3 = chip->OpStat[1]; - debugChannels->debugFloatField4 = chip->por_cnt * 1000000 + chip->init_req_cnt * 10000 + lowVoltageResetCounter; - debugChannels->debugFloatField5 = 0; - debugChannels->debugFloatField6 = 0; + engine->outputChannels.debugFloatField3 = chip->OpStat[1]; + engine->outputChannels.debugFloatField4 = chip->por_cnt * 1000000 + chip->init_req_cnt * 10000 + lowVoltageResetCounter; + engine->outputChannels.debugFloatField5 = 0; + engine->outputChannels.debugFloatField6 = 0; } #endif /* EFI_TUNER_STUDIO */ diff --git a/firmware/hw_layer/drivers/gpio/tle8888.h b/firmware/hw_layer/drivers/gpio/tle8888.h index c90c09224d..210cd2d068 100644 --- a/firmware/hw_layer/drivers/gpio/tle8888.h +++ b/firmware/hw_layer/drivers/gpio/tle8888.h @@ -82,6 +82,5 @@ void tle8888_req_init(); void tle8888_dump_regs(); #if EFI_TUNER_STUDIO -#include "tunerstudio_debug_struct.h" -void tle8888PostState(TsDebugChannels *tsDebugChannels); +void tle8888PostState(); #endif /* EFI_TUNER_STUDIO */