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

This commit is contained in:
Andrey 2021-09-05 14:43:35 -04:00
parent 3ff9568521
commit 3ed50dbea7
4 changed files with 16 additions and 9 deletions

View File

@ -207,13 +207,13 @@ struct TunerStudioOutputChannels {
int16_t recentErrorCodes[8]; // 152-166
// Debug
float debugFloatField1; // 168
float debugFloatField2;
float debugFloatField3;
float debugFloatField4;
float debugFloatField5;
float debugFloatField6;
float debugFloatField7;
scaled_channel<float> debugFloatField1; // 168
scaled_channel<float> debugFloatField2;
scaled_channel<float> debugFloatField3;
scaled_channel<float> debugFloatField4;
scaled_channel<float> debugFloatField5;
scaled_channel<float> debugFloatField6;
scaled_channel<float> debugFloatField7;
scaled_channel<uint32_t> debugIntField1;
scaled_channel<uint32_t> debugIntField2;
scaled_channel<uint32_t> debugIntField3;

View File

@ -40,6 +40,13 @@ static constexpr LogField fields[] = {
{tsOutputChannels.debugIntField3, GAUGE_NAME_DEBUG_I3, "", 0},
{tsOutputChannels.debugIntField4, GAUGE_NAME_DEBUG_I4, "", 0},
{tsOutputChannels.debugIntField5, GAUGE_NAME_DEBUG_I5, "", 0},
{tsOutputChannels.debugFloatField1, GAUGE_NAME_DEBUG_F1, "", 3},
{tsOutputChannels.debugFloatField2, GAUGE_NAME_DEBUG_F2, "", 3},
{tsOutputChannels.debugFloatField3, GAUGE_NAME_DEBUG_F3, "", 3},
{tsOutputChannels.debugFloatField4, GAUGE_NAME_DEBUG_F4, "", 3},
{tsOutputChannels.debugFloatField5, GAUGE_NAME_DEBUG_F5, "", 3},
{tsOutputChannels.debugFloatField6, GAUGE_NAME_DEBUG_F6, "", 3},
{tsOutputChannels.debugFloatField7, GAUGE_NAME_DEBUG_F7, "", 3},
{tsOutputChannels.vBatt, GAUGE_NAME_VBAT, "v", 2},
{tsOutputChannels.oilPressure, GAUGE_NAME_OIL_PRESSURE, GAUGE_NAME_FUEL_PRESSURE_HIGH_UNITS, 0},
{tsOutputChannels.lowFuelPressure, GAUGE_NAME_FUEL_PRESSURE_LOW, GAUGE_NAME_FUEL_PRESSURE_LOW_UNITS, 0},

View File

@ -54,7 +54,7 @@ void updateGppwm() {
#ifdef EFI_TUNER_STUDIO
if (CONFIG(debugMode) == DBG_GPPWM) {
float* debugFloats = &tsOutputChannels.debugFloatField1;
scaled_channel<float>* debugFloats = &tsOutputChannels.debugFloatField1;
debugFloats[i] = result;
}
#endif

View File

@ -239,7 +239,7 @@ void stopLogicAnalyzerPins() {
}
}
static void getChannelFreqAndDuty(int index, float *duty, scaled_channel<uint32_t> *freq) {
static void getChannelFreqAndDuty(int index, scaled_channel<float> *duty, scaled_channel<uint32_t> *freq) {
float high,period;