Index: firmware/App/Controllers/ROPump.c =================================================================== diff -u -r8a8d1df888149820c08256a673378f36c7336e0c -r2169bb140369dd394aadedcf1cc0d5ea4832e286 --- firmware/App/Controllers/ROPump.c (.../ROPump.c) (revision 8a8d1df888149820c08256a673378f36c7336e0c) +++ firmware/App/Controllers/ROPump.c (.../ROPump.c) (revision 2169bb140369dd394aadedcf1cc0d5ea4832e286) @@ -277,7 +277,7 @@ signalROPumpHardStop(); } // Check if need to switch control modes - else if ( getTargetROPumpPressure() > 0.0F ) + else if ( getTargetROPumpPressure() > 0.0F ) // isTargetPressureActive() == TRUE inside isTargetPressure -> T/F based on data and ov data. { // Transition to target pressure resetPIController( PI_CONTROLLER_ID_RO_PUMP_PRES, roPumpDutyCyclePctSet, 0 ); @@ -731,12 +731,21 @@ BOOL testROPumpTargetPressureOverride( MESSAGE_T *message ) { BOOL result = f32Override( message, &targetROPumpPressure ); - if ( targetROPumpPressure.override == OVERRIDE_RESET && backupSet ) + if ( backupSet ) { // Restore previous flow and pressure values - targetROPumpFlowRate.data = backupROPumpFlowRate; - targetROPumpPressure.data = backupROPumpPressure; - roPumpOpenLoopTargetDutyCycle.data = backupROPumpDutyCyclePctSet; + if ( targetROPumpFlowRate.override == OVERRIDE_RESET && backupSet ) + { + targetROPumpFlowRate.data = backupROPumpFlowRate; + } + if ( targetROPumpPressure.override == OVERRIDE_RESET ) + { + targetROPumpPressure.data = backupROPumpPressure; + } + if ( roPumpOpenLoopTargetDutyCycle.override == OVERRIDE_RESET ) + { + roPumpOpenLoopTargetDutyCycle.data = backupROPumpDutyCyclePctSet; + } backupSet = FALSE; } setROPumpTargetPressure(getTargetROPumpPressure());