Index: firmware/App/Drivers/BubbleDetector.c =================================================================== diff -u -rd9b5f588d81e15ed3849222bed3362e15dbf4b0a -r961784c895cb8f551a2623cd02dcbfe42d04b7c2 --- firmware/App/Drivers/BubbleDetector.c (.../BubbleDetector.c) (revision d9b5f588d81e15ed3849222bed3362e15dbf4b0a) +++ firmware/App/Drivers/BubbleDetector.c (.../BubbleDetector.c) (revision 961784c895cb8f551a2623cd02dcbfe42d04b7c2) @@ -15,40 +15,40 @@ * ***************************************************************************/ -#include "BubbleDetector.h" +#include "BubbleDetector.h" #include "FpgaTD.h" -#include "Messaging.h" - +#include "Messaging.h" + /** * @addtogroup BubbleDetector * @{ */ -// ********** private definitions ********** - +// ********** private definitions ********** -// ********** private data ********** - + +// ********** private data ********** + /// Current bubble detected states (overrideable). static OVERRIDE_U32_T currentBubbleState[ NUM_OF_BUBBLE_DETECTORS ]; - + // ********** private function prototypes ********** -/*********************************************************************//** - * @brief - * The initBubbleDetector function initializes the BubbleDetector unit. - * @details \b Inputs: none - * @details \b Outputs: Bubble Detector unit is initialized. - * @return none - *************************************************************************/ +/*********************************************************************//** + * @brief + * The initBubbleDetector function initializes the BubbleDetector unit. + * @details \b Inputs: none + * @details \b Outputs: Bubble Detector unit is initialized. + * @return none + *************************************************************************/ void initBubbleDetector( void ) { - currentBubbleState[ BUBBLE_DETECTOR_ADV ].data = NO_BUBBLE_DETECTED; - currentBubbleState[ BUBBLE_DETECTOR_ADV ].ovData = NO_BUBBLE_DETECTED; - currentBubbleState[ BUBBLE_DETECTOR_ADV ].ovInitData = NO_BUBBLE_DETECTED; - currentBubbleState[ BUBBLE_DETECTOR_ADV ].override = OVERRIDE_RESET; -} - + currentBubbleState[ H18_BBLD ].data = NO_BUBBLE_DETECTED; + currentBubbleState[ H18_BBLD ].ovData = NO_BUBBLE_DETECTED; + currentBubbleState[ H18_BBLD ].ovInitData = NO_BUBBLE_DETECTED; + currentBubbleState[ H18_BBLD ].override = OVERRIDE_RESET; +} + /*********************************************************************//** * @brief * The readBubbleDetector function gets the current bubble detected state @@ -63,20 +63,20 @@ { BOOL bubble; - bubble = ADVBubbleDetected(); // read current sensor state from FPGA - currentBubbleState[ BUBBLE_DETECTOR_ADV ].data = (U32)( FALSE == bubble ? NO_BUBBLE_DETECTED : BUBBLE_DETECTED ); + bubble = H18BubbleDetected(); // read current sensor state from FPGA + currentBubbleState[ H18_BBLD ].data = (U32)( FALSE == bubble ? NO_BUBBLE_DETECTED : BUBBLE_DETECTED ); } -/*********************************************************************//** - * @brief +/*********************************************************************//** + * @brief * The getBubbleDetectedState function gets the current bubble detected state * for a given bubble detector sensor. - * @details \b Alarm: ALARM_ID_TD_SOFTWARE_FAULT if given sensor is invalid. - * @details \b Inputs: currentBubbleState[] - * @details \b Outputs: none - * @param sensor ID of bubble detector sensor to get state for. - * @return The current state of the given bubble detector sensor. - *************************************************************************/ + * @details \b Alarm: ALARM_ID_TD_SOFTWARE_FAULT if given sensor is invalid. + * @details \b Inputs: currentBubbleState[] + * @details \b Outputs: none + * @param sensor ID of bubble detector sensor to get state for. + * @return The current state of the given bubble detector sensor. + *************************************************************************/ BUBBLE_STATE_T getBubbleDetectedState( BUBBLE_DETECTOR_T sensor ) { BUBBLE_STATE_T result = NO_BUBBLE_DETECTED; @@ -94,7 +94,7 @@ SET_ALARM_WITH_2_U32_DATA( ALARM_ID_TD_SOFTWARE_FAULT, SW_FAULT_ID_BUBBLE_DETECTOR_INVALID_SENSOR, sensor ) } - return result; + return result; } @@ -119,5 +119,5 @@ return result; } - + /**@}*/