Index: firmware/App/Monitors/FluidLeak.c =================================================================== diff -u -r9ea1971251bb0064e626c21e7d94215114254a98 -r3518e8a088c32e75c0c8960d5e629a7401095feb --- firmware/App/Monitors/FluidLeak.c (.../FluidLeak.c) (revision 9ea1971251bb0064e626c21e7d94215114254a98) +++ firmware/App/Monitors/FluidLeak.c (.../FluidLeak.c) (revision 3518e8a088c32e75c0c8960d5e629a7401095feb) @@ -16,8 +16,8 @@ ***************************************************************************/ #include "TDCommon.h" +#include "FpgaTD.h" #include "FluidLeak.h" -//#include "FPGA.h" #include "Messaging.h" #include "OperationModes.h" #include "PersistentAlarm.h" @@ -43,6 +43,7 @@ /// Interval (in ms) at which to publish fluid leak data to CAN bus. static OVERRIDE_U32_T fluidLeakStatePublishInterval = { FLUID_LEAK_PUB_INTERVAL, FLUID_LEAK_PUB_INTERVAL, 0, 0 }; + static OVERRIDE_U32_T fluidLeakState; ///< Detected fluid leak state for fluid leak detector. // ********** private function prototypes ********** @@ -51,9 +52,9 @@ /*********************************************************************//** * @brief - * The initFluidLeak function initializes the Fluid Leak module. - * @details Inputs: none - * @details Outputs: Fluid Leak module initialized. + * The initFluidLeak function initializes the Fluid Leak unit. + * @details \b Inputs: none + * @details \b Outputs: Fluid Leak unit initialized. * @return none *************************************************************************/ void initFluidLeak( void ) @@ -64,19 +65,20 @@ fluidLeakState.override = OVERRIDE_RESET; fluidLeakStatePublicationTimerCounter = DATA_PUBLISH_COUNTER_START_COUNT; -// initPersistentAlarm( ALARM_ID_HD_FLUID_LEAK_DETECTED, 0, FLUID_LEAK_ERROR_PERSIST_MS ); +// initPersistentAlarm( ALARM_ID_TD_FLUID_LEAK_DETECTED, 0, FLUID_LEAK_ERROR_PERSIST_MS ); } /*********************************************************************//** * @brief * The execFluidLeak function executes the fluid leak monitor. - * @details Inputs: FPGA fluid leak state GPIO pin state - * @details Outputs: fluidLeakState + * @details \b Alarm: ALARM_ID_TD_FLUID_LEAK_DETECTED if fluid leak detected. + * @details \b Inputs: FPGA fluid leak state GPIO pin state + * @details \b Outputs: fluidLeakState * @return none *************************************************************************/ void execFluidLeak( void ) { - BOOL noFluidLeakDetected = TRUE;// = noFPGAFluidLeakDetected(); + BOOL noFluidLeakDetected = noFPGAFluidLeakDetected(); if ( getCurrentOperationMode() != MODE_INIT ) { @@ -93,9 +95,9 @@ // Check state reading and act upon if ( FLUID_LEAK_STATE_WET == getFluidLeakState() ) { -// if ( TRUE == isPersistentAlarmTriggered( ALARM_ID_HD_FLUID_LEAK_DETECTED, TRUE ) ) +// if ( TRUE == isPersistentAlarmTriggered( ALARM_ID_TD_FLUID_LEAK_DETECTED, TRUE ) ) // { -// activateAlarmNoData( ALARM_ID_HD_FLUID_LEAK_DETECTED ); +// activateAlarmNoData( ALARM_ID_TD_FLUID_LEAK_DETECTED ); // } } else // FLUID_LEAK_STATE_DRY == getFluidLeakState() @@ -113,8 +115,8 @@ * @brief * The getFluidLeakState function gets the current reading for the fluid * leak detector. - * @details Inputs: fluidLeakState - * @details Outputs: none + * @details \b Inputs: fluidLeakState + * @details \b Outputs: none * @param none * @return the current fluid leak state. *************************************************************************/ @@ -132,9 +134,11 @@ /*********************************************************************//** * @brief - * The publishFluidLeakState function publishes fluid leak state at the set interval. - * @details Inputs: fluidLeakState - * @details Outputs: if broadcast is due, send fluid leak state + * The publishFluidLeakState function publishes fluid leak state at the set + * interval. + * @details \b Message \b Sent: MSG_ID_TD_FLUID_LEAK_STATE_DATA if time to publish fluid leak sensor data. + * @details \b Inputs: fluidLeakState, fluidLeakStatePublicationTimerCounter + * @details \b Outputs: fluidLeakStatePublicationTimerCounter * @return none *************************************************************************/ static void publishFluidLeakState( void ) @@ -161,8 +165,8 @@ * @brief * The testSetFluidLeakStatePublishIntervalOverride function overrides the * fluid leak state publish interval. - * @details Inputs: none - * @details Outputs: fluidLeakStatePublishInterval + * @details \b Inputs: none + * @details \b Outputs: fluidLeakStatePublishInterval * @param value override fluid leak state publish interval with (in ms) * @return TRUE if override successful, FALSE if not *************************************************************************/ @@ -186,8 +190,8 @@ * @brief * The testResetFluidLeakStatePublishIntervalOverride function resets the override * of the fluid leak state publish interval. - * @details Inputs: none - * @details Outputs: fluidLeakStatePublishInterval + * @details \b Inputs: none + * @details \b Outputs: fluidLeakStatePublishInterval * @return TRUE if override reset successful, FALSE if not *************************************************************************/ BOOL testResetFluidLeakStatePublishIntervalOverride( void ) @@ -208,8 +212,8 @@ * @brief * The testSetFluidLeakStateOverride function overrides the state * of the fluid leak detector. - * @details Inputs: none - * @details Outputs: fluidLeakState + * @details \b Inputs: none + * @details \b Outputs: fluidLeakState * @param none * @param state override fluid leak detector with this * @return TRUE if override successful, FALSE if not @@ -235,8 +239,8 @@ * @brief * The testResetFluidLeakStateOverride function resets the override of the * fluid leak detector. - * @details Inputs: none - * @details Outputs: fluidLeakState + * @details \b Inputs: none + * @details \b Outputs: fluidLeakState * @param none * @return TRUE if reset successful, FALSE if not *************************************************************************/