Compare commits
No commits in common. "a6031798daebb41e93df7dfb9e82335d169272ec" and "32107a45db0ac80bcde8eabeef1b1716742cba96" have entirely different histories.
a6031798da
...
32107a45db
@ -243,6 +243,7 @@ boolean checkEEPROMavailable()
|
||||
if (!ee.isConnected())
|
||||
{
|
||||
MaintainDTC(DTC_NO_EEPROM_FOUND, DTC_CRITICAL, true);
|
||||
globals.systemStatus = sysStat_Error;
|
||||
return false;
|
||||
}
|
||||
MaintainDTC(DTC_NO_EEPROM_FOUND, DTC_CRITICAL, false);
|
||||
|
@ -39,7 +39,6 @@ void MaintainDTC(DTCNums_t DTC_no, DTCSeverity_t DTC_severity, boolean active, u
|
||||
DTCStorage[i].timestamp = millis();
|
||||
DTCStorage[i].active = DTC_ACTIVE;
|
||||
DTCStorage[i].debugVal = DebugValue;
|
||||
DTCStorage[i].severity = DTC_severity;
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -108,32 +107,3 @@ DTCNums_t getlastDTC_Severity(boolean only_active, DTCSeverity_t severity)
|
||||
|
||||
return pointer >= 0 ? DTCStorage[pointer].Number : DTC_LAST_DTC;
|
||||
}
|
||||
|
||||
void DTC_Process()
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
@ -55,7 +55,6 @@ void ClearDTC(DTCNums_t DTC_no);
|
||||
void ClearAllDTC();
|
||||
DTCNums_t getlastDTC(boolean only_active);
|
||||
DTCNums_t getlastDTC_Severity(boolean only_active, DTCSeverity_t severity);
|
||||
void DTC_Process();
|
||||
|
||||
extern DTCEntry_s DTCStorage[MAX_DTC_STORAGE];
|
||||
#endif
|
@ -10,6 +10,32 @@ 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;
|
||||
|
@ -185,6 +185,7 @@ void loop()
|
||||
}
|
||||
|
||||
RunLubeApp(wheelDistance);
|
||||
EEPROMCyclicPDSTicker.update();
|
||||
#ifdef FEATURE_ENABLE_OLED
|
||||
Display_Process();
|
||||
#endif
|
||||
@ -192,10 +193,9 @@ void loop()
|
||||
LED_Process();
|
||||
EEPROM_Process();
|
||||
Webserver_Process();
|
||||
DTC_Process();
|
||||
|
||||
ArduinoOTA.handle();
|
||||
EEPROMCyclicPDSTicker.update();
|
||||
|
||||
#ifdef FEATURE_ENABLE_WIFI_CLIENT
|
||||
WiFiMaintainConnectionTicker.update();
|
||||
#endif
|
||||
|
@ -552,7 +552,6 @@ void Websocket_HandleMessage(void *arg, uint8_t *data, size_t len)
|
||||
if (strcmp((char *)data, "start") == 0)
|
||||
{
|
||||
SetDebugportStatus(dbg_Webui, enabled);
|
||||
Debug_ShowDTCs();
|
||||
}
|
||||
else if (strcmp((char *)data, "stop") == 0)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user