Index: firmware/App/Controllers/PresOccl.c =================================================================== diff -u -rd33ae635eb38ae8f2647f68304be74e8e4f78cfd -r667feab319b14681a0330a715da7a1ba930b518d --- firmware/App/Controllers/PresOccl.c (.../PresOccl.c) (revision d33ae635eb38ae8f2647f68304be74e8e4f78cfd) +++ firmware/App/Controllers/PresOccl.c (.../PresOccl.c) (revision 667feab319b14681a0330a715da7a1ba930b518d) @@ -122,18 +122,14 @@ static F32 shortFilteredArterialPressure; ///< Measured arterial pressure after short (1 s) filter. static F32 shortFilteredVenousPressure; ///< Measured venous pressure after short (1 s) filter. -#ifndef DISABLE_PRESSURE_CHECKS static U32 bloodPumpOcclusionAfterCartridgeInstall; ///< Measured blood pump occlusion reading taken after cartridge install. -#endif static U32 emptySalineBagCtr = 0; ///< Timer counter for empty bag detection. static U08 lastArterialPressureReadCtr; ///< Previous arterial pressure sensor read count. static U08 lastVenousPressureReadCtr; ///< Previous venous pressure sensor read count. -#ifndef DISABLE_PRESSURE_CHECKS static U08 lastBPOcclReadCtr; ///< Previous BP occlusion sensor read count. static U08 lastBPErrorCtr; ///< Previous BP error count. -#endif 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. @@ -188,25 +184,21 @@ lastArterialPressureReadCtr = 0; lastVenousPressureReadCtr = 0; -#ifndef DISABLE_PRESSURE_CHECKS if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_PRESSURE_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) { lastBPOcclReadCtr = 0; lastBPErrorCtr = 0; } -#endif longFilteredArterialPressure = 0.0; shortFilteredArterialPressure = 0.0; shortFilteredVenousPressure = 0.0; presOcclDataPublicationTimerCounter = DATA_PUBLISH_COUNTER_START_COUNT; -#ifndef DISABLE_PRESSURE_CHECKS if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_PRESSURE_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) { bloodPumpOcclusionAfterCartridgeInstall = 0; } -#endif } /*********************************************************************//** @@ -285,12 +277,10 @@ *************************************************************************/ void setOcclusionInstallLevel( void ) { -#ifndef DISABLE_PRESSURE_CHECKS if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_PRESSURE_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) { bloodPumpOcclusionAfterCartridgeInstall = getMeasuredBloodPumpOcclusion(); } -#endif } /*********************************************************************//** @@ -391,12 +381,10 @@ } else { -#ifndef DISABLE_PRESSURE_CHECKS if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_PRESSURE_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) { SET_ALARM_WITH_1_U32_DATA( ALARM_ID_ARTERIAL_PRESSURE_SENSOR_FAULT, (U32)artPresAlarm ) } -#endif } // Check for stale venous pressure reading @@ -416,12 +404,10 @@ // If venous pressure sensor status is not normal, fault else { -#ifndef DISABLE_PRESSURE_CHECKS if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_PRESSURE_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) { // SET_ALARM_WITH_1_U32_DATA( ALARM_ID_VENOUS_PRESSURE_SENSOR_FAULT, (U32)venPresStatus ) // TODO - persistence? YES, need persistence - getting a stale data status. OR maybe speed up ADC in FPGA. } -#endif } // Check venous pressure sensor temperature @@ -451,7 +437,6 @@ U08 bpReadCtr = getFPGABloodPumpOcclusionReadCounter(); U08 bpErrorCtr = getFPGABloodPumpOcclusionErrorCounter(); -#ifndef DISABLE_PRESSURE_CHECKS if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_PRESSURE_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) { // Check for sensor errors @@ -466,19 +451,16 @@ activateAlarmNoData( ALARM_ID_HD_BP_OCCLUSION_READ_TIMEOUT_ERROR ); } } -#endif // Record occlusion sensor readings bloodPumpOcclusion.data = (U32)getFPGABloodPumpOcclusion(); -#ifndef DISABLE_PRESSURE_CHECKS if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_PRESSURE_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) { // Record occlusion read and error counters for next time around lastBPOcclReadCtr = bpReadCtr; lastBPErrorCtr = bpErrorCtr; } -#endif } /*********************************************************************//** @@ -493,7 +475,6 @@ { F32 artPres = getFilteredArterialPressure(); -#ifndef DISABLE_ARTERIAL_PRESSURE_CHECK if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_ARTERIAL_PRESSURE_CHECK ) != SW_CONFIG_ENABLE_VALUE ) { // Check arterial pressure is in range @@ -533,7 +514,6 @@ isPersistentAlarmTriggered( ALARM_ID_ARTERIAL_PRESSURE_HIGH, FALSE ); } } -#endif } /*********************************************************************//** @@ -548,7 +528,6 @@ { F32 venPres = getFilteredVenousPressure(); -#ifndef DISABLE_VENOUS_PRESSURE_CHECK if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_VENOUS_PRESSURE_CHECK ) != SW_CONFIG_ENABLE_VALUE ) { // Check venous pressure is in range @@ -595,7 +574,6 @@ isPersistentAlarmTriggered( ALARM_ID_VENOUS_PRESSURE_HIGH, FALSE ); } } -#endif } /*********************************************************************//** @@ -610,7 +588,6 @@ { U32 bpOccl = getMeasuredBloodPumpOcclusion(); -#ifndef DISABLE_PRESSURE_CHECKS if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_PRESSURE_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) { // Range check occlusion sensor @@ -630,7 +607,6 @@ clearAlarmCondition( ALARM_ID_OCCLUSION_BLOOD_PUMP ); } } -#endif } /*********************************************************************//** @@ -811,7 +787,6 @@ *************************************************************************/ void execPresOcclTest( void ) { -#ifndef DISABLE_PRESSURE_CHECKS if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_PRESSURE_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) { U32 const bpPressure = getMeasuredBloodPumpOcclusion(); @@ -833,7 +808,6 @@ SET_ALARM_WITH_1_U32_DATA( ALARM_ID_HD_VENOUS_PRESSURE_SELF_TEST_FAILURE, venousPressure ); } } -#endif } /*********************************************************************//**