Index: firmware/App/Controllers/Bubble.c =================================================================== diff -u -r3d72b777cf1ceb673d118341c46e2d6d5b7b75f5 -rf6b78d1fe6741043de38707211710ab0e8a08483 --- firmware/App/Controllers/Bubble.c (.../Bubble.c) (revision 3d72b777cf1ceb673d118341c46e2d6d5b7b75f5) +++ firmware/App/Controllers/Bubble.c (.../Bubble.c) (revision f6b78d1fe6741043de38707211710ab0e8a08483) @@ -30,8 +30,9 @@ // ********** private definitions ********** -#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_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 DATA_PUBLISH_COUNTER_START_COUNT 70 ///< Data publish counter start count. /// Defined states for the air bubble detectors state machine. typedef enum BubbleStates @@ -83,6 +84,8 @@ bubblesSelfTestRequested[ bubble ] = FALSE; bubblesSelfTestStartTime[ bubble ] = 0; } + + bubblesDataPublicationTimerCounter = DATA_PUBLISH_COUNTER_START_COUNT; } /*********************************************************************//** @@ -193,45 +196,48 @@ bubblesStatus[ bubble ].data = BUBBLE_DETECTED; } -#ifndef DISABLE_BUBBLE_ALARMS - // Check status reading and act upon - if ( BUBBLE_DETECTED == getBubbleStatus( bubble ) ) +#ifndef _RELEASE_ + if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_BUBBLE_ALARMS ) != SW_CONFIG_ENABLE_VALUE ) +#endif { - if ( getCurrentOperationMode() == MODE_TREA ) + // Check status reading and act upon + if ( BUBBLE_DETECTED == getBubbleStatus( bubble ) ) { - switch ( treatmentState ) + if ( getCurrentOperationMode() == MODE_TREA ) { - case TREATMENT_BLOOD_PRIME_STATE: - case TREATMENT_DIALYSIS_STATE: - case TREATMENT_END_STATE: - if ( bubble == ADV ) - { - activateAlarmNoData( ALARM_ID_HD_VENOUS_BUBBLE_DETECTED ); - } - break; + switch ( treatmentState ) + { + case TREATMENT_BLOOD_PRIME_STATE: + case TREATMENT_DIALYSIS_STATE: + case TREATMENT_END_STATE: + if ( bubble == ADV ) + { + activateAlarmNoData( ALARM_ID_HD_VENOUS_BUBBLE_DETECTED ); + } + break; - case TREATMENT_RINSEBACK_STATE: - if ( bubble == ADV ) - { - activateAlarmNoData( ALARM_ID_HD_VENOUS_BUBBLE_DETECTED_RINSEBACK ); - } - break; + case TREATMENT_RINSEBACK_STATE: + if ( bubble == ADV ) + { + activateAlarmNoData( ALARM_ID_HD_VENOUS_BUBBLE_DETECTED_RINSEBACK ); + } + break; - default: - // Ignore other treatment states - break; + default: + // Ignore other treatment states + break; + } } } - } - else // Air bubble not detected - { - if ( bubble == ADV ) + else // Air bubble not detected { - clearAlarmCondition( ALARM_ID_HD_VENOUS_BUBBLE_DETECTED ); - clearAlarmCondition( ALARM_ID_HD_VENOUS_BUBBLE_DETECTED_RINSEBACK ); + if ( bubble == ADV ) + { + clearAlarmCondition( ALARM_ID_HD_VENOUS_BUBBLE_DETECTED ); + clearAlarmCondition( ALARM_ID_HD_VENOUS_BUBBLE_DETECTED_RINSEBACK ); + } } } -#endif if ( TRUE == bubblesSelfTestRequested[ bubble ] ) {