moved DTC Processing to own File
This commit is contained in:
@@ -10,32 +10,6 @@ void RunLubeApp(uint32_t add_milimeters)
|
||||
MaintainDTC(DTC_TANK_EMPTY, DTC_CRITICAL, (PersistenceData.tankRemain_microL < LubeConfig.amountPerDose_microL));
|
||||
MaintainDTC(DTC_TANK_LOW, DTC_WARN, (globals.TankPercentage < LubeConfig.TankRemindAtPercentage));
|
||||
|
||||
static tSystem_Status preserverSysStatusError;
|
||||
|
||||
if (getlastDTC(false) < DTC_LAST_DTC)
|
||||
{
|
||||
globals.hasDTC = true;
|
||||
if (getlastDTC_Severity(true, DTC_CRITICAL) < DTC_LAST_DTC)
|
||||
{
|
||||
if (globals.systemStatus != sysStat_Error)
|
||||
{
|
||||
preserverSysStatusError = globals.systemStatus;
|
||||
}
|
||||
globals.systemStatus = sysStat_Error;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (globals.systemStatus == sysStat_Error)
|
||||
{
|
||||
globals.systemStatus = preserverSysStatusError;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
globals.hasDTC = false;
|
||||
}
|
||||
|
||||
// Add traveled Distance in mm
|
||||
PersistenceData.TravelDistance_highRes_mm += add_milimeters;
|
||||
PersistenceData.odometer_mm += add_milimeters;
|
||||
|
Reference in New Issue
Block a user