From 8c5dab5bd68aaf654344c736013792d6beca8b87 Mon Sep 17 00:00:00 2001 From: Andrey Date: Sun, 5 Sep 2021 09:16:35 -0400 Subject: [PATCH] SD-card log fields improvement (warning counter & last code) #3162 --- firmware/console/binary/tunerstudio_outputs.h | 10 +++++----- firmware/development/logic_analyzer.cpp | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/firmware/console/binary/tunerstudio_outputs.h b/firmware/console/binary/tunerstudio_outputs.h index 6d94ffad55..aedba2e245 100644 --- a/firmware/console/binary/tunerstudio_outputs.h +++ b/firmware/console/binary/tunerstudio_outputs.h @@ -202,8 +202,8 @@ struct TunerStudioOutputChannels { // Errors scaled_channel totalTriggerErrorCounter; // 140 int orderingErrorCounter; // 144 - int16_t warningCounter; // 148 - int16_t lastErrorCode; // 150 + scaled_channel warningCounter; // 148 + scaled_channel lastErrorCode; // 150 int16_t recentErrorCodes[8]; // 152-166 // Debug @@ -214,9 +214,9 @@ struct TunerStudioOutputChannels { float debugFloatField5; float debugFloatField6; float debugFloatField7; - int debugIntField1; - int debugIntField2; - int debugIntField3; + scaled_channel debugIntField1; + scaled_channel debugIntField2; + scaled_channel debugIntField3; int16_t debugIntField4; int16_t debugIntField5; // 210 diff --git a/firmware/development/logic_analyzer.cpp b/firmware/development/logic_analyzer.cpp index b47d369aef..41298b24b0 100644 --- a/firmware/development/logic_analyzer.cpp +++ b/firmware/development/logic_analyzer.cpp @@ -239,7 +239,7 @@ void stopLogicAnalyzerPins() { } } -void getChannelFreqAndDuty(int index, float *duty, int *freq) { +static void getChannelFreqAndDuty(int index, float *duty, scaled_channel *freq) { float high,period; @@ -268,12 +268,12 @@ void getChannelFreqAndDuty(int index, float *duty, int *freq) { void reportLogicAnalyzerToTS() { #if EFI_TUNER_STUDIO - int tmp; + scaled_channel tmp; getChannelFreqAndDuty(0,&tsOutputChannels.debugFloatField1, &tsOutputChannels.debugIntField1); getChannelFreqAndDuty(1,&tsOutputChannels.debugFloatField2, &tsOutputChannels.debugIntField2); getChannelFreqAndDuty(2,&tsOutputChannels.debugFloatField3, &tsOutputChannels.debugIntField3); getChannelFreqAndDuty(3,&tsOutputChannels.debugFloatField4, &tmp); - tsOutputChannels.debugIntField4 = (int16_t)tmp; + tsOutputChannels.debugIntField4 = tmp; #endif }