diff --git a/Software/src/lubeapp.cpp b/Software/src/lubeapp.cpp index dd818ca..e61743b 100644 --- a/Software/src/lubeapp.cpp +++ b/Software/src/lubeapp.cpp @@ -9,15 +9,19 @@ void RunLubeApp(uint32_t add_milimeters) static tSystem_Status preserverSysStatusError; + if (globals.systemStatus != sysStat_Error) + preserverSysStatusError = globals.systemStatus; + if (getlastDTC(true) < DTC_LAST_DTC) { - if (globals.systemStatus != sysStat_Error) - preserverSysStatusError = globals.systemStatus; globals.systemStatus = sysStat_Error; } else { - globals.systemStatus = preserverSysStatusError; + if (globals.systemStatus == sysStat_Error) + { + globals.systemStatus = preserverSysStatusError; + } } // Add traveled Distance in mm