Index: firmware/App/Controllers/Thermistors.c =================================================================== diff -u -r22176ce95e49213c48454f34ddf5d29b8109f2cb -r6499ea25921fcf67826fa0c35bb03caf411ba542 --- firmware/App/Controllers/Thermistors.c (.../Thermistors.c) (revision 22176ce95e49213c48454f34ddf5d29b8109f2cb) +++ firmware/App/Controllers/Thermistors.c (.../Thermistors.c) (revision 6499ea25921fcf67826fa0c35bb03caf411ba542) @@ -1,14 +1,14 @@ /************************************************************************** * -* Copyright (c) 2020-2022 Diality Inc. - All Rights Reserved. +* Copyright (c) 2020-2023 Diality Inc. - All Rights Reserved. * * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * * @file Thermistors.c * * @author (last) Dara Navaei -* @date (last) 07-Mar-2022 +* @date (last) 03-Nov-2022 * * @author (original) Dara Navaei * @date (original) 25-Nov-2020 @@ -24,6 +24,7 @@ #include "SystemCommMessages.h" #include "Thermistors.h" #include "TaskGeneral.h" +#include "Utilities.h" /** * @addtogroup Thermistors @@ -61,7 +62,7 @@ OVERRIDE_F32_T temperatureValue; ///< Thermistor temperature value. } THERMISTOR_T; -static THERMISTORS_EXEC_STATES_T thermistorsExecState = THERMISTORS_EXEC_STATE_START_STATE; ///< Thermistors exec state. +static THERMISTORS_EXEC_STATES_T thermistorsExecState; ///< Thermistors exec state. static THERMISTOR_T thermistorsStatus[ NUM_OF_THERMISTORS ]; ///< Thermistors array. static OVERRIDE_U32_T thermistorsPublishInterval = { THERMISTORS_DATA_PUBLISH_INTERVAL, THERMISTORS_DATA_PUBLISH_INTERVAL, 0, 0 }; ///< Thermistors publish time interval override. @@ -110,7 +111,6 @@ { SELF_TEST_STATUS_T status = SELF_TEST_STATUS_IN_PROGRESS; - // TODO implement the calibration processing function. // It returns a pass for now status = SELF_TEST_STATUS_PASSED; @@ -226,8 +226,14 @@ // If time has elapsed to read the ADCs, read them all if ( ++adcReadCounter >= THERMISTORS_ADC_READ_INTERVAL ) { +#ifndef _RELEASE_ + if ( HW_CONFIG_BETA == getHardwareConfigStatus() ) + { + thermistorsStatus[ THERMISTOR_ONBOARD_NTC ].rawADCRead = getIntADCReading( INT_ADC_BOARD_THERMISTOR ); + } +#endif // Get all the raw readings in ADC - thermistorsStatus[ THERMISTOR_ONBOARD_NTC ].rawADCRead = getIntADCReading( INT_ADC_BOARD_THERMISTOR ); + thermistorsStatus[ THERMISTOR_ONBOARD_NTC ].rawADCRead = getFPGAOnBoardThermistorCount(); thermistorsStatus[ THERMISTOR_POWER_SUPPLY_1 ].rawADCRead = getIntADCReading( INT_ADC_POWER_SUPPLY_1_THERMISTOR ); thermistorsStatus[ THERMISTOR_POWER_SUPPLY_2 ].rawADCRead = getIntADCReading( INT_ADC_POWER_SUPPLY_2_THERMISTOR );