Index: firmware/App/Controllers/Valves.c =================================================================== diff -u -r82bd1d24c050e79690a7f5b236e49dd7db7e2a91 -re7c4a51e6057f0cc83fabc72f2df9bb5dffee391 --- firmware/App/Controllers/Valves.c (.../Valves.c) (revision 82bd1d24c050e79690a7f5b236e49dd7db7e2a91) +++ firmware/App/Controllers/Valves.c (.../Valves.c) (revision e7c4a51e6057f0cc83fabc72f2df9bb5dffee391) @@ -19,7 +19,7 @@ #include "reg_het.h" #include "gio.h" -#include "Battery.h" +#include "CPLD.h" #include "FPGA.h" #include "MessageSupport.h" #include "NVDataMgmt.h" @@ -925,7 +925,7 @@ state = VALVE_STATE_IDLE; } // Check if the valve's transition time has timed out - else if ( ( TRUE == didTimeout( valvesStatus[ valve ].transitionStartTime, VALVE_TRANSITION_TIMEOUT_MS ) ) && ( FALSE == isACPowerLost() ) ) + else if ( ( TRUE == didTimeout( valvesStatus[ valve ].transitionStartTime, VALVE_TRANSITION_TIMEOUT_MS ) ) && ( getCPLDACPowerLossDetected() != TRUE ) ) { // Go back to Idle state and set the valve position to not in position because it was not able to get to the target position valvesStatus[ valve ].currentPosition = VALVE_POSITION_NOT_IN_POSITION; @@ -1187,7 +1187,7 @@ for ( valve = VDI; valve < NUM_OF_VALVES; valve++ ) { // Check the valve is in Idle state, otherwise the position should not be checked - if ( ( valvesStatus[ valve ].execState == VALVE_STATE_IDLE ) && ( FALSE == isACPowerLost() ) ) + if ( ( valvesStatus[ valve ].execState == VALVE_STATE_IDLE ) && ( getCPLDACPowerLossDetected() != TRUE ) ) { U32 maxDeviation = MAX_DEVIATION_FROM_TARGET_IN_COUNTS;