Index: firmware/App/Controllers/PresOccl.c =================================================================== diff -u -red4d9f0a8493695e63d4b226d1c3d885a00b7565 -r81c902fb595b9fcde229f8898d14e43312969f26 --- firmware/App/Controllers/PresOccl.c (.../PresOccl.c) (revision ed4d9f0a8493695e63d4b226d1c3d885a00b7565) +++ firmware/App/Controllers/PresOccl.c (.../PresOccl.c) (revision 81c902fb595b9fcde229f8898d14e43312969f26) @@ -145,15 +145,10 @@ static F32 shortFilteredArterialPressure; ///< Measured arterial pressure after short (1 s) filter. static F32 shortFilteredVenousPressure; ///< Measured venous pressure after short (1 s) filter. -static U32 airPumpOpenToleranceTimer; ///< Timer for increased maximum venous high limit. - static U32 bloodPumpOcclusionAfterCartridgeInstall; ///< Measured blood pump occlusion reading taken after cartridge install. static U32 emptySalineBagCtr = 0; ///< Timer counter for empty bag detection. -static U08 lastBPOcclReadCtr; ///< Previous BP occlusion sensor read count. -static U08 lastBPErrorCtr; ///< Previous BP error count. - static F32 artPressureReadingsLong[ SIZE_OF_LONG_ART_ROLLING_AVG ]; ///< Holds flow samples for long arterial pressure rolling average. static U32 artPressureReadingsLongIdx = 0; ///< Index for next sample in rolling average array. static F32 artPressureReadingsLongTotal = 0.0; ///< Rolling total - used to calc average. @@ -211,21 +206,12 @@ initFPGAPersistentAlarm( FPGA_PERS_ERROR_VENOUS_PRESSURE_SESNOR, ALARM_ID_HD_VENOUS_SENSOR_FPGA_FAULT, PRES_SENSORS_FPGA_ERROR_TIMEOUT_MS, PRES_SENSORS_FPGA_ERROR_TIMEOUT_MS ); -#ifndef _RELEASE_ - if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_PRESSURE_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) -#endif - { - lastBPOcclReadCtr = 0; - lastBPErrorCtr = 0; - } - longFilteredArterialPressure = 0.0F; shortFilteredArterialPressure = 0.0F; shortFilteredVenousPressure = 0.0F; presOcclDataPublicationTimerCounter = DATA_PUBLISH_COUNTER_START_COUNT; presOcclState = PRESSURE_WAIT_FOR_POST_STATE; presOcclPostState = PRESSURE_SELF_TEST_STATE_START; - airPumpOpenToleranceTimer = 0; #ifndef _RELEASE_ if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_PRESSURE_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) @@ -458,15 +444,6 @@ // Record occlusion sensor readings bloodPumpOcclusion.data = (U32)getFPGABloodPumpOcclusion(); - -#ifndef _RELEASE_ - if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_PRESSURE_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) -#endif - { - // Record occlusion read and error counters for next time around - lastBPOcclReadCtr = bpReadCtr; - lastBPErrorCtr = bpErrorCtr; - } } /*********************************************************************//** @@ -485,6 +462,8 @@ if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_ARTERIAL_PRESSURE_CHECK ) != SW_CONFIG_ENABLE_VALUE ) #endif { + TREATMENT_STATE_T txState = getTreatmentState(); + // Check arterial pressure is in range if ( TRUE == isPersistentAlarmTriggered( ALARM_ID_HD_ARTERIAL_PRESSURE_OUT_OF_RANGE, ( artPres > ARTERIAL_PRESSURE_MAX_MMHG || artPres < ARTERIAL_PRESSURE_MIN_MMHG ) ) ) @@ -494,7 +473,8 @@ // Check arterial pressure during treatment mode if ( ( MODE_TREA == getCurrentOperationMode() ) && - ( TREATMENT_DIALYSIS_STATE == getTreatmentState() ) && ( getDialysisState() != DIALYSIS_SALINE_BOLUS_STATE ) ) + ( ( TREATMENT_BLOOD_PRIME_STATE == txState ) || + ( ( TREATMENT_DIALYSIS_STATE == txState ) && ( getDialysisState() != DIALYSIS_SALINE_BOLUS_STATE ) ) ) ) { F32 artLowLimit = (F32)getTreatmentParameterS32( TREATMENT_PARAM_ART_PRESSURE_LOW_LIMIT ); F32 artHighLimit = (F32)getTreatmentParameterS32( TREATMENT_PARAM_ART_PRESSURE_HIGH_LIMIT );