uUnchangedCounter reset logic flaw

This commit is contained in:
2026-01-10 11:54:18 +01:00
parent a9ec101bc6
commit 40f757b7d1

View File

@ -105,6 +105,7 @@ void checkSensorSanity(void)
}
else
{
sanityChecks[i].uUnchangedCounter = 0U;
sanityChecks[i].fSensorTemperatureLast = sCurrentMeasurement.fCurrentValue;
if (sCurrentMeasurement.fCurrentValue > sanityChecks[i].sSensorLimit.max)
@ -121,12 +122,10 @@ void checkSensorSanity(void)
}
else
{
sanityChecks[i].uUnchangedCounter = 0U;
sanityChecks[i].state = SENSOR_NO_ERROR;
}
}
}
// printf(" state: %u\n", sanityChecks[i].state);
}
}