Index: firmware/App/Monitors/Bubbles.c =================================================================== diff -u -r04c7345ebdbdbb6c6aef2f7fe686dd3c1eb31827 -r6d590485ad7117e235f2fd206ff3121072ebbf16 --- firmware/App/Monitors/Bubbles.c (.../Bubbles.c) (revision 04c7345ebdbdbb6c6aef2f7fe686dd3c1eb31827) +++ firmware/App/Monitors/Bubbles.c (.../Bubbles.c) (revision 6d590485ad7117e235f2fd206ff3121072ebbf16) @@ -32,6 +32,7 @@ #define BUBBLE_PUB_INTERVAL ( MS_PER_SECOND / TASK_PRIORITY_INTERVAL ) ///< Interval (ms/task time) at which the air bubble detector data is published on the CAN bus. #define BUBBLE_TIMEOUT_MS 500 ///< Air bubble detector timeout for self-test (15 ms extended edge detection) +#define BUBBLE_SELF_TEST_RECOVERY_MS 100 ///< Timeout offset (in ms) for sensor to return to normal mode after self-test completed. #define DATA_PUBLISH_COUNTER_START_COUNT 70 ///< Data publish counter start count. /// Defined states for the air bubble detectors state machine. @@ -52,7 +53,7 @@ static BOOL bubblesSelfTestRequested[ NUM_OF_BUBBLE_DETECTORS ]; ///< Air bubble detectors self-test requested flags. static BOOL bubbleDetectionEnabled[ NUM_OF_BUBBLE_DETECTORS ]; ///< Flag indicates whether air bubble alarm detection is enabled. -static OVERRIDE_U32_T bubblesDataPublishInterval = { BUBBLE_PUB_INTERVAL, BUBBLE_PUB_INTERVAL, 0, 0 }; ///< Interval (in ms) at which to publish air bubble detectors data on CAN bus. +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. // ********** private function prototypes ********** @@ -86,7 +87,10 @@ bubblesSelfTestStartTime[ bubble ] = 0; bubbleDetectionEnabled[ bubble ] = FALSE; } - + bubblesDataPublishInterval.data = BUBBLE_PUB_INTERVAL; + bubblesDataPublishInterval.ovData = BUBBLE_PUB_INTERVAL; + bubblesDataPublishInterval.ovInitData = 0; + bubblesDataPublishInterval.override = OVERRIDE_RESET; bubblesDataPublicationTimerCounter = DATA_PUBLISH_COUNTER_START_COUNT; } @@ -327,7 +331,7 @@ { // Air bubble self-test finished, wait for self-test faked air bubble detector clear if ( ( NO_BUBBLE_DETECTED == getBubbleDetectedState( bubble ) ) || - ( TRUE == didTimeout( bubblesSelfTestStartTime[ bubble ], BUBBLE_TIMEOUT_MS + 100 ) ) ) + ( TRUE == didTimeout( bubblesSelfTestStartTime[ bubble ], BUBBLE_TIMEOUT_MS + BUBBLE_SELF_TEST_RECOVERY_MS ) ) ) { if ( bubbleDetectionEnabled[ bubble ] != FALSE ) {