Index: firmware/App/Modes/Prime.c =================================================================== diff -u -rd28280f1054fc9ddf9304a11373dc9ee963425e3 -rd4bc221d9817b488c2dcd00868386d7036a5c9a1 --- firmware/App/Modes/Prime.c (.../Prime.c) (revision d28280f1054fc9ddf9304a11373dc9ee963425e3) +++ firmware/App/Modes/Prime.c (.../Prime.c) (revision d4bc221d9817b488c2dcd00868386d7036a5c9a1) @@ -7,14 +7,13 @@ * * @file Prime.c * -* @author (last) Michael Garthwaite -* @date (last) 26-Aug-2022 +* @author (last) Dong Nguyen +* @date (last) 27-Sep-2022 * * @author (original) Quang Nguyen * @date (original) 08-Dec-2020 * ***************************************************************************/ - #include "AirTrap.h" #include "AlarmMgmt.h" #include "BloodFlow.h" @@ -52,6 +51,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 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. @@ -86,7 +86,8 @@ { 100, 200 }, // DIALYZER_TYPE_BBRAUN_PRO_16H { 120, 257 }, // DIALYZER_TYPE_BBRAUN_PRO_19H { 87, 233 }, // DIALYZER_TYPE_FRESENIUS_OPTIFLUX_F160NRE - { 102, 280 } }; // DIALYZER_TYPE_FRESENIUS_OPTIFLUX_F180NRE + { 102, 280 }, // DIALYZER_TYPE_FRESENIUS_OPTIFLUX_F180NRE + { 113, 348 } }; // DIALYZER_TYPE_FRESENIUS_OPTIFLUX_F200NRE static U32 primeDialysateDialyzerTimeLimit; ///< Time limit in msec for priming dialysate dialyzer path. static U32 primeSalineDialyzerTimeLimit; ///< Time limit in msec for priming saline dialyzer path. @@ -499,7 +500,7 @@ if ( TRUE == didTimeout( purgeAirTimeOutStartTime, PURGE_AIR_TIME_OUT_COUNT ) ) { - activateAlarmNoData( ALARM_ID_HD_PRIME_SALINE_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 ) ) @@ -731,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();