Index: firmware/App/Monitors/Temperature.c =================================================================== diff -u -rfefb47e88a5285e99498efb830fdceb9e95c2c3e -re3699de422fa3ba1b8145c4cc44257702c9e336f --- firmware/App/Monitors/Temperature.c (.../Temperature.c) (revision fefb47e88a5285e99498efb830fdceb9e95c2c3e) +++ firmware/App/Monitors/Temperature.c (.../Temperature.c) (revision e3699de422fa3ba1b8145c4cc44257702c9e336f) @@ -47,7 +47,7 @@ // ********** private data ********** static TEMPSENSORS_EXEC_STATES_T tempSensorsExecState; ///< TemperatureSensor exec state. -static U32 elapsedTime; ///< Elapsed time variable. +static U32 startTime; ///< star time to read FPGA values. static U32 dataPublicationTimerCounter; ///< Temperature sensors data publish timer counter. static OVERRIDE_U32_T tempSensorsPublishInterval = { TEMP_SENSORS_DATA_PUBLISH_INTERVAL, @@ -68,7 +68,7 @@ *************************************************************************/ void initTemperature( void ) { - elapsedTime = 0; + startTime = 0; tempSensorsExecState = TEMPSENSORS_EXEC_STATE_START; dataPublicationTimerCounter = DATA_PUBLISH_COUNTER_START_COUNT; @@ -111,7 +111,7 @@ * @details \b Inputs: tempSensorsExecState * @details \b Outputs: tempSensorsExecState * @details \b Alarms: ALARM_ID_DD_SOFTWARE_FAULT when invalid temperature - * sensor is seen. + * sensor state is seen. * @return none *************************************************************************/ void execTemperatureSensors( void ) @@ -151,24 +151,24 @@ * @brief * The handleExecStart function waits for a period of time and switches to * the state that reads the ADC values from FPGA. - * @details \b Inputs: elapsedTime - * @details \b Outputs: elapsedTime, baroCoeffsWaitToRcvStartTime + * @details \b Inputs: startTime + * @details \b Outputs: startTime, baroCoeffsWaitToRcvStartTime * @return the next state of the state machine *************************************************************************/ static TEMPSENSORS_EXEC_STATES_T handleExecStart( void ) { TEMPSENSORS_EXEC_STATES_T state = TEMPSENSORS_EXEC_STATE_START; - if ( 0 == elapsedTime ) + if ( 0 == startTime ) { - elapsedTime = getMSTimerCount(); + startTime = getMSTimerCount(); } // A delay to let FPGA to boot up - else if ( TRUE == didTimeout( elapsedTime, ADC_FPGA_READ_DELAY ) ) + else if ( TRUE == didTimeout( startTime, ADC_FPGA_READ_DELAY ) ) { - elapsedTime = 0; + startTime = 0; setBaroSensorCoefficientReadStartTime(); - state = TEMPSENSORS_EXEC_STATE_GET_ADC_VALUES; + state = TEMPSENSORS_EXEC_STATE_GET_ADC_VALUES; } return state; @@ -195,8 +195,8 @@ * @brief * The publishTemperatureSensorsData function broadcasts the temperature * sensors data at the publication interval. - * @details \b Inputs: dataPublicationTimerCounter, tempValuesForPublication - * @details \b Outputs: dataPublicationTimerCounter, tempValuesForPublication + * @details \b Inputs: dataPublicationTimerCounter and publish interval time. + * @details \b Outputs: dataPublicationTimerCounter * @details \b Message \b Sent: MSG_ID_DD_TEMPERATURE_DATA publishes the temperature * data in a periodic interval. * @return none