Index: firmware/App/Modes/Prime.c =================================================================== diff -u -r19a8bf98a7154e24c35da25225d4b55bf70ddd09 -rb6e15b38182e5a3720420889ebcdf29203a30821 --- firmware/App/Modes/Prime.c (.../Prime.c) (revision 19a8bf98a7154e24c35da25225d4b55bf70ddd09) +++ firmware/App/Modes/Prime.c (.../Prime.c) (revision b6e15b38182e5a3720420889ebcdf29203a30821) @@ -7,8 +7,8 @@ * * @file Prime.c * -* @author (last) Michael Garthwaite -* @date (last) 21-Apr-2022 +* @author (last) Bill Bracken +* @date (last) 24-Aug-2022 * * @author (original) Quang Nguyen * @date (original) 08-Dec-2020 @@ -52,7 +52,7 @@ #define DIALYZER_VOLUME_SCALE_FACTOR 0.5F ///< Half of the dialyzer total volume. #define NO_AIR_DETECTED_COUNT ( 20 * MS_PER_SECOND ) ///< No air detected time period count. -#define PURGE_AIR_TIME_OUT_COUNT ( 60 * MS_PER_SECOND ) ///< Time period count for purge air time out. +#define PURGE_AIR_TIME_OUT_COUNT ( 120 * MS_PER_SECOND ) ///< Time period count for purge air time out. #define LOAD_CELL_STEADY_VOLUME_SAMPLING_TIME ( 1 * MS_PER_SECOND ) ///< Time load cell reading steady state detection sampling time in seconds. #define PRIME_DIALYSATE_BYPASS_TIME_LIMIT ( 15 * MS_PER_SECOND ) ///< Time limit for priming dialysate bypass circuit. #define STEADY_VOLUME_COUNT_SEC ( 10000 / LOAD_CELL_STEADY_VOLUME_SAMPLING_TIME ) ///< Counter must be greater than 10 seconds before steady volume is true. @@ -166,6 +166,8 @@ setAlarmUserActionEnabled( ALARM_USER_ACTION_RINSEBACK, FALSE ); setAlarmUserActionEnabled( ALARM_USER_ACTION_END_TREATMENT, TRUE ); + doorClosedRequired( TRUE, TRUE ); + // Pumps should be off signalBloodPumpHardStop(); signalDialInPumpHardStop(); @@ -497,7 +499,7 @@ if ( TRUE == didTimeout( purgeAirTimeOutStartTime, PURGE_AIR_TIME_OUT_COUNT ) ) { - activateAlarmNoData( ALARM_ID_HD_PRIME_PURGE_AIR_TIME_OUT ); + activateAlarmNoData( ALARM_ID_HD_PRIME_SALINE_PURGE_AIR_TIME_OUT ); } if ( AIR_TRAP_LEVEL_FLUID == getAirTrapLevel( AIR_TRAP_LEVEL_SENSOR_LOWER ) ) @@ -594,7 +596,7 @@ // Calculate the time out value that must passed prior to checking for the steady state volume in the reservoir primeDialysateDialyzerTimeLimit = (U32)( ( ( DIALYSATE_DIALYZER_TUBE_VOLUME_ML + dialyzerDialysateVolume ) * SEC_PER_MIN * MS_PER_SECOND ) / DIALYSATE_PUMP_PRIME_FLOW_RATE_ML_MIN ); - minimumReservoirVolume = getLoadCellWeight( LOAD_CELL_RESERVOIR_2_PRIMARY ); + minimumReservoirVolume = getLoadCellWeight( LOAD_CELL_RESERVOIR_1_PRIMARY ); steadyVolumeCount = 0; steadyVolumeSamplingStartTime = getMSTimerCount(); primeDialysateDialyzerStartTime = getMSTimerCount();