Index: firmware/App/Modes/StateTxDialysis.c =================================================================== diff -u -r95c81a7d81fa3e6534bcf2e35e1d9b1eba26e372 -r28d515e25f5f3b2c0bbff55abd68641927b6659c --- firmware/App/Modes/StateTxDialysis.c (.../StateTxDialysis.c) (revision 95c81a7d81fa3e6534bcf2e35e1d9b1eba26e372) +++ firmware/App/Modes/StateTxDialysis.c (.../StateTxDialysis.c) (revision 28d515e25f5f3b2c0bbff55abd68641927b6659c) @@ -248,7 +248,7 @@ // Make rate changes in real time if currently performing dialysis. if ( (TREATMENT_END_STATE == getTreatmentState() )) { - setBloodPumpTargetFlowRate( setBloodFlowRate, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_CLOSED_LOOP ); + setBloodPumpTargetFlowRate( setBloodFlowRate, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_OPEN_LOOP ); } } @@ -385,6 +385,25 @@ /*********************************************************************//** * @brief + * The stopDialysis function stops dialysis. This function will be called + * by Treatment Mode when an alarm occurs or the user pressed the stop button. + * Dialysis may be resumed later. + * @details Inputs: none + * @details Outputs: Blood and dialysate pumps stopped. Heparin pump stopped. + * @return none + *************************************************************************/ +void stopDialysis( void ) +{ + // Stop pumps + signalBloodPumpHardStop(); + stopSyringePump(); + + // CKOE whta command used for trimmer heater to stop + // Tell DG to stop heating dialysate + //cmdStopDGTrimmerHeater(); +} +/*********************************************************************//** + * @brief * The execDialysis function executes the Dialysis sub-mode state machine. * @details \b Alarm: ALARM_ID_TD_SOFTWARE_FAULT if state is invalid * @details \b Message \b Sent: TD_EVENT_SUB_STATE_CHANGE when state changes