Index: firmware/App/Modes/Dialysis.c =================================================================== diff -u -r8ab3c94988c1381c3e4f0d8fb68fd86a995d5285 -rc9084eb8f7c63d230e64fb7e5d641f6b80b918c7 --- firmware/App/Modes/Dialysis.c (.../Dialysis.c) (revision 8ab3c94988c1381c3e4f0d8fb68fd86a995d5285) +++ firmware/App/Modes/Dialysis.c (.../Dialysis.c) (revision c9084eb8f7c63d230e64fb7e5d641f6b80b918c7) @@ -712,6 +712,10 @@ } } + // NOTE: do not move this function this function needs to be after the check for blood leak zeroing logic above. + // If the blood leak logic is no longer needed, the reset function below can be removed. + resetReservoirSwitchFlag(); + // Dialysis state machine switch ( currentDialysisState ) { @@ -1188,7 +1192,7 @@ if ( bloodLeakZeroingStatus.rsrvr2DPiFlushedVolML > RSRVR_2_DPI_VOLUME_ML ) { - // Cmd all pumps to stop + // Cmd DPo to stop setDialOutPumpTargetRate( 0, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_OPEN_LOOP ); stopSyringePump(); @@ -1336,6 +1340,7 @@ data.bolSalineVolumeMl = bolusSalineVolumeDelivered_mL; data.bloodLeakZeroingDPi2BLDFlushVolumeML = bloodLeakZeroingStatus.DPi2BLDFlushedVolML; data.bloodLeakZeroingRsrvr2DPiFlushVolumeML = bloodLeakZeroingStatus.rsrvr2DPiFlushedVolML; + data.bloodLeakZeroingNeededAfterRsrvrSwitch = bloodLeakZeroingStatus.isZeroingNeededAfterRsrvrSwitch; broadcastData( MSG_ID_SALINE_BOLUS_DATA, COMM_BUFFER_OUT_CAN_HD_BROADCAST, (U08*)&data, sizeof( SALINE_BOLUS_DATA_PAYLOAD_T ) ); salineBolusBroadcastTimerCtr = 0;