Index: firmware/App/Monitors/Bubbles.c =================================================================== diff -u -r8dc9d3fc8e91387d5c50f0781d18e2cc0d0f73f1 -r92f941f177999a7d55f072e08f0dbecf0c0a62ee --- firmware/App/Monitors/Bubbles.c (.../Bubbles.c) (revision 8dc9d3fc8e91387d5c50f0781d18e2cc0d0f73f1) +++ firmware/App/Monitors/Bubbles.c (.../Bubbles.c) (revision 92f941f177999a7d55f072e08f0dbecf0c0a62ee) @@ -55,7 +55,6 @@ 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 ********** @@ -93,10 +92,6 @@ bubblesDataPublishInterval.ovInitData = 0; bubblesDataPublishInterval.override = OVERRIDE_RESET; bubblesDataPublicationTimerCounter = DATA_PUBLISH_COUNTER_START_COUNT; - venousBubbleAlarm.data = 0; - venousBubbleAlarm.ovData = 0; - venousBubbleAlarm.ovInitData = 0; - venousBubbleAlarm.override = OVERRIDE_RESET; } @@ -405,22 +400,25 @@ /*********************************************************************//** * @brief - * The testVenousBubbleAlarmEnableInStandby function enables or disables - * venous bubble alarm triggering while in standby mode. + * The testEnableVenousBubbleAlarm enable/disable venous bubble alarm triggering. * @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 + * @details \b Outputs: bubbleDetectionEnabled[] + * @param message Command message from Dialin which includes enable flag. + * @return TRUE if request is successful, FALSE if not *************************************************************************/ -BOOL testVenousBubbleAlarm( MESSAGE_T *message ) +BOOL testEnableVenousBubbleAlarm( MESSAGE_T *message ) { - BOOL result = u32Override( message, &venousBubbleAlarm, 0U, 1U ); + BOOL result = FALSE; - if ( TRUE == result ) + if ( sizeof( U32 ) == message->hdr.payloadLen ) { - BOOL enable = ( 0U != getU32OverrideValue( &venousBubbleAlarm ) ) ? TRUE : FALSE; - setVenousBubbleDetectionEnabled( H18_BBLD, enable ); + U32 enable = 0; + + memcpy( &enable, message->payload, sizeof( U32 ) ); + + setVenousBubbleDetectionEnabled( H18_BBLD, ( 0 != enable ) ? TRUE : FALSE ); + + result = TRUE; } return result; Index: firmware/App/Monitors/Bubbles.h =================================================================== diff -u -r8dc9d3fc8e91387d5c50f0781d18e2cc0d0f73f1 -r92f941f177999a7d55f072e08f0dbecf0c0a62ee --- firmware/App/Monitors/Bubbles.h (.../Bubbles.h) (revision 8dc9d3fc8e91387d5c50f0781d18e2cc0d0f73f1) +++ firmware/App/Monitors/Bubbles.h (.../Bubbles.h) (revision 92f941f177999a7d55f072e08f0dbecf0c0a62ee) @@ -53,7 +53,7 @@ SELF_TEST_STATUS_T getBubbleSelfTestStatus( BUBBLE_DETECTOR_T bubble ); BOOL testBubblesDataPublishIntervalOverride( MESSAGE_T *message ); -BOOL testVenousBubbleAlarm( MESSAGE_T *message ); +BOOL testEnableVenousBubbleAlarm( MESSAGE_T *message ); /**@}*/ Index: firmware/App/Services/Messaging.c =================================================================== diff -u -r8dc9d3fc8e91387d5c50f0781d18e2cc0d0f73f1 -r92f941f177999a7d55f072e08f0dbecf0c0a62ee --- firmware/App/Services/Messaging.c (.../Messaging.c) (revision 8dc9d3fc8e91387d5c50f0781d18e2cc0d0f73f1) +++ firmware/App/Services/Messaging.c (.../Messaging.c) (revision 92f941f177999a7d55f072e08f0dbecf0c0a62ee) @@ -181,7 +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 }, + { MSG_ID_TD_ENABLE_VENOUS_BUBBLE_ALARM, &testEnableVenousBubbleAlarm }, }; #define NUM_OF_FUNCTION_HANDLERS (sizeof(MSG_FUNCTION_HANDLER_LOOKUP) / sizeof(MSG_HANDLER_LOOKUP_T))