SD-card log fields improvement (warning counter & last code) #3162

This commit is contained in:
Andrey 2021-09-05 09:16:35 -04:00
parent 5afda5f2cc
commit 8c5dab5bd6
2 changed files with 8 additions and 8 deletions

View File

@ -202,8 +202,8 @@ struct TunerStudioOutputChannels {
// Errors
scaled_channel<uint32_t> totalTriggerErrorCounter; // 140
int orderingErrorCounter; // 144
int16_t warningCounter; // 148
int16_t lastErrorCode; // 150
scaled_channel<uint16_t> warningCounter; // 148
scaled_channel<uint16_t> 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<uint32_t> debugIntField1;
scaled_channel<uint32_t> debugIntField2;
scaled_channel<uint32_t> debugIntField3;
int16_t debugIntField4;
int16_t debugIntField5; // 210

View File

@ -239,7 +239,7 @@ void stopLogicAnalyzerPins() {
}
}
void getChannelFreqAndDuty(int index, float *duty, int *freq) {
static void getChannelFreqAndDuty(int index, float *duty, scaled_channel<uint32_t> *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<uint32_t> 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
}