Index: firmware/App/Modes/Prime.c =================================================================== diff -u -r27a68f930508638f2eb6265ebb381c8918cbc37b -r83a8a0e1e8630939e6a173f1313cceb7f39e00dd --- firmware/App/Modes/Prime.c (.../Prime.c) (revision 27a68f930508638f2eb6265ebb381c8918cbc37b) +++ firmware/App/Modes/Prime.c (.../Prime.c) (revision 83a8a0e1e8630939e6a173f1313cceb7f39e00dd) @@ -165,6 +165,19 @@ setAlarmUserActionEnabled( ALARM_USER_ACTION_RINSEBACK, FALSE ); setAlarmUserActionEnabled( ALARM_USER_ACTION_END_TREATMENT, TRUE ); + // Pumps should be off + signalBloodPumpHardStop(); + signalDialInPumpHardStop(); + signalDialOutPumpHardStop(); + stopSyringePump(); + + // Set valves to default positions + setValveAirTrap( STATE_CLOSED ); + setValvePosition( VDI, VALVE_POSITION_C_CLOSE ); + setValvePosition( VDO, VALVE_POSITION_C_CLOSE ); + setValvePosition( VBA, VALVE_POSITION_C_CLOSE ); + setValvePosition( VBV, VALVE_POSITION_C_CLOSE ); + resetPrimeFlags(); } Index: firmware/App/Modes/SelfTests.c =================================================================== diff -u -rcc067242d41776eb2a598212413e25df5a58b1fe -r83a8a0e1e8630939e6a173f1313cceb7f39e00dd --- firmware/App/Modes/SelfTests.c (.../SelfTests.c) (revision cc067242d41776eb2a598212413e25df5a58b1fe) +++ firmware/App/Modes/SelfTests.c (.../SelfTests.c) (revision 83a8a0e1e8630939e6a173f1313cceb7f39e00dd) @@ -359,6 +359,19 @@ selfTestStartTime = getMSTimerCount(); selfTestPreviousPublishDataTime = getMSTimerCount(); + // Pumps should be off + signalBloodPumpHardStop(); + signalDialInPumpHardStop(); + signalDialOutPumpHardStop(); + stopSyringePump(); + + // Set valves to default positions + setValveAirTrap( STATE_CLOSED ); + setValvePosition( VDI, VALVE_POSITION_A_INSERT_EJECT ); + setValvePosition( VDO, VALVE_POSITION_A_INSERT_EJECT ); + setValvePosition( VBA, VALVE_POSITION_A_INSERT_EJECT ); + setValvePosition( VBV, VALVE_POSITION_A_INSERT_EJECT ); + resetSelfTestsFlags(); } @@ -498,7 +511,6 @@ *************************************************************************/ void transitionToWetSelfTests() { - signalDialInPumpHardStop(); // turn off DPi that was on in previous dialysate bypass state wetSelfTestsResult = FALSE; currentWetSelfTestsState = WET_SELF_TESTS_START_STATE; settleStartTime = 0; @@ -508,6 +520,19 @@ selfTestStartTime = getMSTimerCount(); selfTestPreviousPublishDataTime = getMSTimerCount(); + // Pumps should be off + signalBloodPumpHardStop(); + signalDialInPumpHardStop(); + signalDialOutPumpHardStop(); + stopSyringePump(); + + // Set valves to default positions + setValveAirTrap( STATE_CLOSED ); + setValvePosition( VDI, VALVE_POSITION_C_CLOSE ); + setValvePosition( VDO, VALVE_POSITION_C_CLOSE ); + setValvePosition( VBA, VALVE_POSITION_C_CLOSE ); + setValvePosition( VBV, VALVE_POSITION_C_CLOSE ); + resetSelfTestsFlags(); } Index: firmware/App/Services/Reservoirs.c =================================================================== diff -u -ra7675f3c917b632cf16207fc7ccfc1f38eb83f9b -r83a8a0e1e8630939e6a173f1313cceb7f39e00dd --- firmware/App/Services/Reservoirs.c (.../Reservoirs.c) (revision a7675f3c917b632cf16207fc7ccfc1f38eb83f9b) +++ firmware/App/Services/Reservoirs.c (.../Reservoirs.c) (revision 83a8a0e1e8630939e6a173f1313cceb7f39e00dd) @@ -589,8 +589,8 @@ { TREATMENT_RESERVOIR_MGMT_STATE_T state = TREATMENT_RESERVOIR_MGMT_WAIT_FOR_FILL_SETTLE_STATE; - // Wait for the reservoir to settle and then send the commands to switch the active reservoir - if ( ( TRUE == didTimeout( reservoirSwitchStartTimeMS, RESERVOIR_SETTLE_TIME_MS ) ) && ( volSpentML >= (F32)FILL_RESERVOIR_TO_VOLUME_ML ) ) + // Wait for the reservoir to settle and then send the commands to switch the active reservoir TODO - restore #define below + if ( ( TRUE == didTimeout( reservoirSwitchStartTimeMS, 15000 /*RESERVOIR_SETTLE_TIME_MS*/ ) ) && ( volSpentML >= (F32)FILL_RESERVOIR_TO_VOLUME_ML ) ) { DG_RESERVOIR_ID_T inactiveRes = getDGInactiveReservoir();