Index: firmware/App/Modes/ModeStandby.c =================================================================== diff -u -rc20c77ef196a760a7642d2426e509995e4a98e01 -r43ab88c9ad8435e0a0a3df0adde1de150c582305 --- firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision c20c77ef196a760a7642d2426e509995e4a98e01) +++ firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision 43ab88c9ad8435e0a0a3df0adde1de150c582305) @@ -523,6 +523,7 @@ *************************************************************************/ static HD_STANDBY_STATE_T handleStandbyModeStartState( void ) { + static BOOL homingInitiated = FALSE; HD_STANDBY_STATE_T state = STANDBY_START_STATE; // Wait for door to be closed so we can home actuators @@ -540,18 +541,28 @@ homeDialOutPump(); retractSyringePump(); - // Go to wait for treatment state - state = STANDBY_WAIT_FOR_TREATMENT_STATE; + homingInitiated = TRUE; } else { // Trigger door open alarm to prompt user to close the door activateAlarmNoData( ALARM_ID_CARTRIDGE_DOOR_OPENED ); + homingInitiated = FALSE; } + // If homing has been initiated, wait for syringe pump to home and the verify force sensor calibration + if ( ( TRUE == homingInitiated ) && ( TRUE == isSyringePumpHome() ) ) + { + syringePumpVerifyForceSensorDACCalibration(); + homingInitiated = FALSE; // reset for next time + state = STANDBY_WAIT_FOR_TREATMENT_STATE; // Go to wait for treatment state after above check + } + return state; } +// Verify calibration + /*********************************************************************//** * @brief * The handleStandbyModeWaitForTreatmentState function handles wait for