From 94e34fb593272fc4ba65f7af0fbe034275b9e33f Mon Sep 17 00:00:00 2001 From: souko Date: Fri, 27 May 2022 13:33:44 +0200 Subject: [PATCH] Bugfix in DTC and SystemStatus Handling --- Software/src/lubeapp.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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