Index: firmware/App/Modes/Prime.c =================================================================== diff -u -raceb6e5388e905d119c5c379bc97ced0720aa270 -r72ab02a2c5612b5ee178d682671b5e34d16ca3c3 --- firmware/App/Modes/Prime.c (.../Prime.c) (revision aceb6e5388e905d119c5c379bc97ced0720aa270) +++ firmware/App/Modes/Prime.c (.../Prime.c) (revision 72ab02a2c5612b5ee178d682671b5e34d16ca3c3) @@ -7,14 +7,13 @@ * * @file Prime.c * -* @author (last) Michael Garthwaite -* @date (last) 21-Apr-2022 +* @author (last) Dara Navaei +* @date (last) 31-Aug-2022 * * @author (original) Quang Nguyen * @date (original) 08-Dec-2020 * ***************************************************************************/ - #include "AirTrap.h" #include "AlarmMgmt.h" #include "BloodFlow.h" @@ -52,7 +51,8 @@ #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 PRIME_SALINE_DIALYZER_TIME_OUT_COUNT ( 60 * MS_PER_SECOND ) ///< Time period count for prime saline dialyzer 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. @@ -500,7 +500,7 @@ if ( TRUE == didTimeout( purgeAirTimeOutStartTime, PURGE_AIR_TIME_OUT_COUNT ) ) { - activateAlarmNoData( ALARM_ID_HD_PRIME_PURGE_AIR_TIME_OUT ); + SET_ALARM_WITH_1_U32_DATA( ALARM_ID_HD_PRIME_SALINE_PURGE_AIR_TIME_OUT, PURGE_AIR_TIME_OUT_COUNT ); } if ( AIR_TRAP_LEVEL_FLUID == getAirTrapLevel( AIR_TRAP_LEVEL_SENSOR_LOWER ) ) @@ -732,6 +732,11 @@ state = HD_PRIME_RESERVOIR_TWO_FILL_COMPLETE_STATE; } + if ( TRUE == didTimeout( primeSalineDialyzerStartTime, PRIME_SALINE_DIALYZER_TIME_OUT_COUNT ) ) + { + SET_ALARM_WITH_1_U32_DATA( ALARM_ID_PRIME_SALINE_DIALYZER_TIME_OUT, PRIME_SALINE_DIALYZER_TIME_OUT_COUNT ); // Trigger HD prime saline dialyzer time out alarm. + } + if ( TRUE == doesAlarmStatusIndicateStop() ) { setupForPrimePause();