Index: firmware/App/Monitors/Bubbles.c =================================================================== diff -u -r395522dffef1348e176564925656012f529c1910 -r8dc9d3fc8e91387d5c50f0781d18e2cc0d0f73f1 --- firmware/App/Monitors/Bubbles.c (.../Bubbles.c) (revision 395522dffef1348e176564925656012f529c1910) +++ firmware/App/Monitors/Bubbles.c (.../Bubbles.c) (revision 8dc9d3fc8e91387d5c50f0781d18e2cc0d0f73f1) @@ -55,6 +55,7 @@ static OVERRIDE_U32_T bubblesDataPublishInterval; ///< Interval (in ms) at which to publish air bubble detectors data on CAN bus. static U32 bubblesDataPublicationTimerCounter; ///< Timer counter used to schedule air bubble detectors data publication to CAN bus. +static OVERRIDE_U32_T venousBubbleAlarm; ///< Flag to enable the venous bubble alarm. // ********** private function prototypes ********** @@ -91,7 +92,12 @@ bubblesDataPublishInterval.ovData = BUBBLE_PUB_INTERVAL; bubblesDataPublishInterval.ovInitData = 0; bubblesDataPublishInterval.override = OVERRIDE_RESET; - bubblesDataPublicationTimerCounter = DATA_PUBLISH_COUNTER_START_COUNT; + bubblesDataPublicationTimerCounter = DATA_PUBLISH_COUNTER_START_COUNT; + venousBubbleAlarm.data = 0; + venousBubbleAlarm.ovData = 0; + venousBubbleAlarm.ovInitData = 0; + venousBubbleAlarm.override = OVERRIDE_RESET; + } /*********************************************************************//** @@ -221,7 +227,7 @@ #endif { // Check for venous bubble alarm if enabled. - if ( ( BUBBLE_DETECTED == getBubbleDetectedState( bubble ) )) + if ( BUBBLE_DETECTED == getBubbleDetectedState( bubble ) ) { activateAlarmNoData( ALARM_ID_TD_VENOUS_BUBBLE_DETECTED ); } @@ -397,4 +403,27 @@ return result; } +/*********************************************************************//** + * @brief + * The testVenousBubbleAlarmEnableInStandby function enables or disables + * venous bubble alarm triggering while in standby mode. + * @details \b Inputs: none + * @details \b Outputs: venousBubbleAlarmEnableInStandby, bubbleDetectionEnabled[] + * @param message Override message from Dialin which includes the enable + * flag (BOOL) to allow venous bubble alarm triggering in standby mode. + * @return TRUE if override request is successful, FALSE if not + *************************************************************************/ +BOOL testVenousBubbleAlarm( MESSAGE_T *message ) +{ + BOOL result = u32Override( message, &venousBubbleAlarm, 0U, 1U ); + + if ( TRUE == result ) + { + BOOL enable = ( 0U != getU32OverrideValue( &venousBubbleAlarm ) ) ? TRUE : FALSE; + setVenousBubbleDetectionEnabled( H18_BBLD, enable ); + } + + return result; +} + /**@}*/ Index: firmware/App/Monitors/Bubbles.h =================================================================== diff -u -r395522dffef1348e176564925656012f529c1910 -r8dc9d3fc8e91387d5c50f0781d18e2cc0d0f73f1 --- firmware/App/Monitors/Bubbles.h (.../Bubbles.h) (revision 395522dffef1348e176564925656012f529c1910) +++ firmware/App/Monitors/Bubbles.h (.../Bubbles.h) (revision 8dc9d3fc8e91387d5c50f0781d18e2cc0d0f73f1) @@ -53,6 +53,7 @@ SELF_TEST_STATUS_T getBubbleSelfTestStatus( BUBBLE_DETECTOR_T bubble ); BOOL testBubblesDataPublishIntervalOverride( MESSAGE_T *message ); +BOOL testVenousBubbleAlarm( MESSAGE_T *message ); /**@}*/ Index: firmware/App/Services/Messaging.c =================================================================== diff -u -r6f02ff4686ec9dfc60247e9ed3fc9c5cc7771543 -r8dc9d3fc8e91387d5c50f0781d18e2cc0d0f73f1 --- firmware/App/Services/Messaging.c (.../Messaging.c) (revision 6f02ff4686ec9dfc60247e9ed3fc9c5cc7771543) +++ firmware/App/Services/Messaging.c (.../Messaging.c) (revision 8dc9d3fc8e91387d5c50f0781d18e2cc0d0f73f1) @@ -181,6 +181,7 @@ { MSG_ID_TD_EJECTOR_OPT_SENSOR_OVERRIDE_REQUEST, &testEjectorOpticalSensorOverride }, { MSG_ID_TD_BLOOD_PRIME_VOLUME_OVERRIDE, &testBloodPrimeVolumeOverride }, { MSG_ID_TD_BLOOD_PRIME_PUBLISH_INTERVAL_OVERRIDE_REQUEST, &testBloodPrimePublishIntervalOverride }, + { MSG_ID_TD_VENOUS_BUBBLE_ALARM, &testVenousBubbleAlarm }, }; #define NUM_OF_FUNCTION_HANDLERS (sizeof(MSG_FUNCTION_HANDLER_LOOKUP) / sizeof(MSG_HANDLER_LOOKUP_T))