/************************************************************************** * * Copyright (c) 2024-2024 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 PressureSensor.c * * @author (last) Sean Nash * @date (last) 09-Nov-2024 * * @author (original) Sean Nash * @date (original) 09-Nov-2024 * ***************************************************************************/ #include "AlarmMgmtRO.h" #include "FpgaRO.h" #include "Messaging.h" #include "PersistentAlarm.h" #include "PressureSensor.h" #include "TemperatureSensors.h" /** * @addtogroup PressureSensor * @{ */ // ********** private definitions ********** #define PRES_SENSORS_COUNT_ERROR_TIMEOUT_MS ( 2 * MS_PER_SECOND ) ///< Pressure sensors read and error count timeout in milliseconds. #define ONE_BAR_TO_MILLI_BAR 1000 ///< 1 bar to milli-bar conversion. #define COUNTS_TO_MILLI_BAR 100 ///< Counts to milli-bar conversion. #define BAR_TO_MMHG ( 750.062F ) ///< Conversion factor for converting bar to mmHg. #define PRES_SENSORS_READ_ERR_MAX_CNT 255 ///< Pressure sensor read and error max count value /// Barometric sensor conversion coefficients typedef struct { U16 pressureSensitivity; ///< Barometric sensor pressure sensitivity constant. U16 pressureOffset; ///< Barometric sensor pressure offset constant. U16 pressureSensitivityTempCoeff; ///< Barometric sensor pressure sensitivity temperature coefficient. U16 pressureOffsetTempCoeff; ///< Barometric sensor pressure offset temperature coefficient. } BARO_SENSOR_CONSTS_T; static const U32 TWO_TO_POWER_OF_6 = ( 1 << 6 ); ///< 2^6. static const U32 TWO_TO_POWER_OF_7 = ( 1 << 7 ); ///< 2^7. static const U32 TWO_TO_POWER_OF_15 = ( 1 << 15 ); ///< 2^15. static const U32 TWO_TO_POWER_OF_16 = ( 1 << 16 ); ///< 2^16. static const U32 TWO_TO_POWER_OF_17 = ( 1 << 17 ); ///< 2^17. static const U32 TWO_TO_POWER_OF_21 = ( 1 << 21 ); ///< 2^21. // ********** private data ********** static OVERRIDE_F32_T currentPressureReadings[ NUM_OF_PRESSURE_SENSORS ]; ///< Current pressure sensor pressure readings (overrideable). static OVERRIDE_F32_T currentPresTempReadings[ NUM_OF_PRESSURE_SENSORS ]; ///< Current pressure sensor temperature readings (overrideable). static OVERRIDE_U32_T lastPressureReadCounter[ NUM_OF_PRESSURE_SENSORS ]; ///< Last pressure sensor read count (Overrideable). static OVERRIDE_U32_T lastPressureErrorCounter[ NUM_OF_PRESSURE_SENSORS ]; ///< Last pressure sensor error count (Overrideable). static BARO_SENSOR_CONSTS_T baroConvConsts; ///< Barometric sensor conversion constants. // ********** private function prototypes ********** //static void checkPressureSensors( void ); //static F32 convertBaroPressureReading2mmHg( U32 rawPressure ); //static F32 calculateBaroPressure( U32 pressure ); /*********************************************************************//** * @brief * The initPressureSensor function initializes the Pressure Sensor unit. * @details \b Inputs: none * @details \b Outputs: Pressure Sensor unit is initialized. * @return none *************************************************************************/ void initPressureSensor( void ) { U32 i; // Initialize override structures for each pressure sensor for ( i = (U32)PRESSURE_SENSOR_FIRST; i < (U32)NUM_OF_PRESSURE_SENSORS; i++ ) { currentPressureReadings[ i ].data = 0.0F; currentPressureReadings[ i ].ovData = 0.0F; currentPressureReadings[ i ].ovInitData = 0.0F; currentPressureReadings[ i ].override = OVERRIDE_RESET; currentPresTempReadings[ i ].data = 0.0F; currentPresTempReadings[ i ].ovData = 0.0F; currentPresTempReadings[ i ].ovInitData = 0.0F; currentPresTempReadings[ i ].override = OVERRIDE_RESET; lastPressureReadCounter[ i ].data = 0; lastPressureReadCounter[ i ].ovData = 0; lastPressureReadCounter[ i ].ovInitData = 0; lastPressureReadCounter[ i ].override = OVERRIDE_RESET; lastPressureErrorCounter[ i ].data = 0; lastPressureErrorCounter[ i ].ovData = 0; lastPressureErrorCounter[ i ].ovInitData = 0; lastPressureErrorCounter[ i ].override = OVERRIDE_RESET; } //Initialize baro variable baroConvConsts.pressureOffset = 0; baroConvConsts.pressureOffsetTempCoeff = 0; baroConvConsts.pressureSensitivity = 0; baroConvConsts.pressureSensitivityTempCoeff = 0; // Initialize the FPGA persistent alarms // initFPGAPersistentAlarm( FPGA_PERS_ERROR_HYDRAULICS_OUTLET_PRESSURE, ALARM_ID_DD_HYD_OUTLET_PRES_TIMEOUT_FAULT, // PRES_SENSORS_COUNT_ERROR_TIMEOUT_MS, PRES_SENSORS_COUNT_ERROR_TIMEOUT_MS ); // initFPGAPersistentAlarm( FPGA_PERS_ERROR_BIBAG_PRESSURE, ALARM_ID_DD_BIBAG_PRES_TIMEOUT_FAULT, // PRES_SENSORS_COUNT_ERROR_TIMEOUT_MS, PRES_SENSORS_COUNT_ERROR_TIMEOUT_MS ); // initFPGAPersistentAlarm( FPGA_PERS_ERROR_SPENT_DIALYSATE_PRESSURE, ALARM_ID_DD_SPENT_DIALYSATE_PRES_TIMEOUT_FAULT, // PRES_SENSORS_COUNT_ERROR_TIMEOUT_MS, PRES_SENSORS_COUNT_ERROR_TIMEOUT_MS ); // initFPGAPersistentAlarm( FPGA_PERS_ERROR_FRESH_DIALYSATE_PRESSURE, ALARM_ID_DD_FRESH_DIALYSATE_PRES_TIMEOUT_FAULT, // PRES_SENSORS_COUNT_ERROR_TIMEOUT_MS, PRES_SENSORS_COUNT_ERROR_TIMEOUT_MS ); // initFPGAPersistentAlarm( FPGA_PERS_ERROR_TRANSMEMBRANE_PRESSURE, ALARM_ID_DD_TRANSMEMB_PRES_TIMEOUT_FAULT, // PRES_SENSORS_COUNT_ERROR_TIMEOUT_MS, PRES_SENSORS_COUNT_ERROR_TIMEOUT_MS ); // initFPGAPersistentAlarm( FPGA_PERS_ERROR_WATER_INLET_INPUT_PRESSURE, ALARM_ID_DD_WATER_INLET_INPUT_PRES_TIMEOUT_FAULT, // PRES_SENSORS_COUNT_ERROR_TIMEOUT_MS, PRES_SENSORS_COUNT_ERROR_TIMEOUT_MS ); // initFPGAPersistentAlarm( FPGA_PERS_ERROR_WATER_INLET_OUTPUT_PRESSURE, ALARM_ID_DD_WATER_INLET_OUTPUT_PRES_TIMEOUT_FAULT, // PRES_SENSORS_COUNT_ERROR_TIMEOUT_MS, PRES_SENSORS_COUNT_ERROR_TIMEOUT_MS ); } /*********************************************************************//** * @brief * The readPressureSensors function gets the current pressure reading * for a all pressure sensors from the FPGA and also reads the freshness * and error counters to verify that the pressure sensors are being read * by the FPGA without issue. * @note This function should be called periodically to maintain fresh * sensor readings for all pressure sensors. * @details \b Inputs: FPGA * @details \b Outputs: currentPressureReadings[],currentPresTempReadings[], * lastPressureReadCounter[],lastPressureErrorCounter[]. * @return none *************************************************************************/ void readPressureSensors( void ) { // // Update and convert raw pressures to mmHg // currentPressureReadings[ PRESSURE_SENSOR_WATER_INLET_INPUT ].data = convertPressureReading2mmHg( getFPGAPRiRawPressure() ); // currentPressureReadings[ PRESSURE_SENSOR_WATER_INLET_OUTPUT ].data = convertPressureReading2mmHg( getFPGAPRoRawPressure() ); // currentPressureReadings[ PRESSURE_SENSOR_HYDRAULICS_OUTLET ].data = convertPressureReading2mmHg( getFPGAPnRawPressure() ); // currentPressureReadings[ PRESSURE_SENSOR_BIBAG ].data = convertPressureReading2mmHg( getFPGAPCbRawPressure() ); // currentPressureReadings[ PRESSURE_SENSOR_SPENT_DIALYSATE ].data = convertPressureReading2mmHg( getFPGAPDsRawPressure() ); // currentPressureReadings[ PRESSURE_SENSOR_FRESH_DIALYSATE ].data = convertPressureReading2mmHg( getFPGAPDfRawPressure() ); // currentPressureReadings[ PRESSURE_SENSOR_TRANSMEMBRANE ].data = convertPressureReading2mmHg( getFPGAPtmRawPressure() ); // currentPressureReadings[ PRESSURE_SENSOR_BAROMETRIC ].data = convertBaroPressureReading2mmHg( getFPGABaroPressure() ); // // // Update and convert raw pressure sensor temperatures to deg C // currentPresTempReadings[ PRESSURE_SENSOR_WATER_INLET_INPUT ].data = convertPressureTempReading2DegC( getFPGAPRiRawTemperature() ); // currentPresTempReadings[ PRESSURE_SENSOR_WATER_INLET_OUTPUT ].data = convertPressureTempReading2DegC( getFPGAPRoRawTemperature() ); // currentPresTempReadings[ PRESSURE_SENSOR_HYDRAULICS_OUTLET ].data = convertPressureTempReading2DegC( getFPGAPnRawTemperature() ); // currentPresTempReadings[ PRESSURE_SENSOR_BIBAG ].data = convertPressureTempReading2DegC( getFPGAPCbRawTemperature() ); // currentPresTempReadings[ PRESSURE_SENSOR_SPENT_DIALYSATE ].data = convertPressureTempReading2DegC( getFPGAPDsRawTemperature() ); // currentPresTempReadings[ PRESSURE_SENSOR_FRESH_DIALYSATE ].data = convertPressureTempReading2DegC( getFPGAPDfRawTemperature() ); // currentPresTempReadings[ PRESSURE_SENSOR_TRANSMEMBRANE ].data = convertPressureTempReading2DegC( getFPGAPtmRawTemperature() ); // // // Update read and error counters for each pressure sensor // lastPressureReadCounter[ PRESSURE_SENSOR_WATER_INLET_INPUT ].data = (U32)getFPGAPRiReadCount(); // lastPressureReadCounter[ PRESSURE_SENSOR_WATER_INLET_OUTPUT ].data = (U32)getFPGAPRoReadCount(); // lastPressureReadCounter[ PRESSURE_SENSOR_HYDRAULICS_OUTLET ].data = (U32)getFPGAPnReadCount(); // lastPressureReadCounter[ PRESSURE_SENSOR_BIBAG ].data = (U32)getFPGAPCbReadCount(); // lastPressureReadCounter[ PRESSURE_SENSOR_SPENT_DIALYSATE ].data = (U32)getFPGAPDsReadCount(); // lastPressureReadCounter[ PRESSURE_SENSOR_FRESH_DIALYSATE ].data = (U32)getFPGAPDfReadCount(); // lastPressureReadCounter[ PRESSURE_SENSOR_TRANSMEMBRANE ].data = (U32)getFPGAPtmReadCount(); // // lastPressureErrorCounter[ PRESSURE_SENSOR_WATER_INLET_INPUT ].data = (U32)getFPGAPRiErrorCount(); // lastPressureErrorCounter[ PRESSURE_SENSOR_WATER_INLET_OUTPUT ].data = (U32)getFPGAPRoErrorCount(); // lastPressureErrorCounter[ PRESSURE_SENSOR_HYDRAULICS_OUTLET ].data = (U32)getFPGAPnErrorCount(); // lastPressureErrorCounter[ PRESSURE_SENSOR_BIBAG ].data = (U32)getFPGAPCbErrorCount(); // lastPressureErrorCounter[ PRESSURE_SENSOR_SPENT_DIALYSATE ].data = (U32)getFPGAPDsErrorCount(); // lastPressureErrorCounter[ PRESSURE_SENSOR_FRESH_DIALYSATE ].data = (U32)getFPGAPDfErrorCount(); // lastPressureErrorCounter[ PRESSURE_SENSOR_TRANSMEMBRANE ].data = (U32)getFPGAPtmErrorCount(); // // // Monitor pressure sensor health // checkPressureSensors(); } /*********************************************************************//** * @brief * The convertBaroPressureReading2mmHg function converts the raw pressure counts * in to mmHg unit. * @details \b Inputs: FPGA * @details \b Outputs: baroConvConsts * @param rawPressure the raw baro sensor reading from FPGA. * @return the converted baro pressure (in mmHg). *************************************************************************/ //static F32 convertBaroPressureReading2mmHg( U32 rawPressure ) //{ // F32 baroPressure = 0.0F; // // baroConvConsts.pressureSensitivity = getFPGABaroPressureSensitivity(); // baroConvConsts.pressureSensitivityTempCoeff = getFPGABaroTempCoeffOfPressSensitvity(); // baroConvConsts.pressureOffset = getFPGABaroPressureOffset(); // baroConvConsts.pressureOffsetTempCoeff = getFPGABaroTempCoeffOfPressOffset(); // baroPressure = calculateBaroPressure( rawPressure ); // // return baroPressure; //} /*********************************************************************//** * @brief * The calculateBaroPressure function performs the required calculations * to compute the baro pressure readings. * @details \b Inputs: baroConvConsts * @details \b Outputs: none * @param pressure the raw baro sensor reading from FPGA. * @return converted baro pressure (in mmHg). *************************************************************************/ //static F32 calculateBaroPressure( U32 pressure ) //{ // S32 tempDiff = getBaroSensorTemperatureDiff(); // S64 tempOffset = ( baroConvConsts.pressureOffsetTempCoeff * tempDiff ) / TWO_TO_POWER_OF_6; // S64 presOffset = baroConvConsts.pressureOffset * TWO_TO_POWER_OF_17; // S64 offset = presOffset + tempOffset; // S64 tempSensitivity = ( baroConvConsts.pressureSensitivityTempCoeff * tempDiff ) / TWO_TO_POWER_OF_7; // S64 presSensitivity = baroConvConsts.pressureSensitivity * TWO_TO_POWER_OF_16; // S64 sensitivity = tempSensitivity + presSensitivity; // S32 pres = (S32)( ( ( pressure * sensitivity ) / TWO_TO_POWER_OF_21 ) - offset ) / TWO_TO_POWER_OF_15; // F32 presmmHg = ( (F32)pres / (F32)( COUNTS_TO_MILLI_BAR * ONE_BAR_TO_MILLI_BAR ) ) * BAR_TO_MMHG; // // return presmmHg; //} /*********************************************************************//** * @brief * The checkPressureSensors function checks the read and error counters for * each pressure sensor. * @details \b Alarm: ALARM_ID_DD_HYD_OUTLET_PRES_TIMEOUT_FAULT if the * hydraulics outlet pressure sensor is not able to be read. * @details \b Alarm: ALARM_ID_DD_BIBAG_PRES_TIMEOUT_FAULT if the * BiBag pressure sensor is not able to be read. * @details \b Alarm: ALARM_ID_DD_SPENT_DIALYSATE_PRES_TIMEOUT_FAULT if the * spent dialysate pressure sensor is not able to be read. * @details \b Alarm: ALARM_ID_DD_FRESH_DIALYSATE_PRES_TIMEOUT_FAULT if the * fresh dialysate pressure sensor is not able to be read. * @details \b Alarm: ALARM_ID_DD_TRANSMEMB_PRES_TIMEOUT_FAULT if the * Transmembrane pressure sensor is not able to be read. * @details \b Inputs: lastPressureReadCounter, lastPressureErrorCounter * @details \b Outputs: none * @return none *************************************************************************/ //static void checkPressureSensors( void ) //{ // checkFPGAPersistentAlarms( FPGA_PERS_ERROR_WATER_INLET_INPUT_PRESSURE, getPressureSensorReadCount( PRESSURE_SENSOR_WATER_INLET_INPUT ) ); // checkFPGAPersistentAlarms( FPGA_PERS_ERROR_WATER_INLET_OUTPUT_PRESSURE, getPressureSensorReadCount( PRESSURE_SENSOR_WATER_INLET_OUTPUT ) ); // checkFPGAPersistentAlarms( FPGA_PERS_ERROR_HYDRAULICS_OUTLET_PRESSURE, getPressureSensorReadCount( PRESSURE_SENSOR_HYDRAULICS_OUTLET ) ); // checkFPGAPersistentAlarms( FPGA_PERS_ERROR_BIBAG_PRESSURE, getPressureSensorReadCount( PRESSURE_SENSOR_BIBAG ) ); // checkFPGAPersistentAlarms( FPGA_PERS_ERROR_SPENT_DIALYSATE_PRESSURE, getPressureSensorReadCount( PRESSURE_SENSOR_SPENT_DIALYSATE ) ); // checkFPGAPersistentAlarms( FPGA_PERS_ERROR_FRESH_DIALYSATE_PRESSURE, getPressureSensorReadCount( PRESSURE_SENSOR_FRESH_DIALYSATE ) ); // checkFPGAPersistentAlarms( FPGA_PERS_ERROR_TRANSMEMBRANE_PRESSURE, getPressureSensorReadCount( PRESSURE_SENSOR_TRANSMEMBRANE ) ); // // checkFPGAPersistentErrorCountAlarm( FPGA_PERS_ERROR_WATER_INLET_INPUT_PRESSURE, getPressureSensorErrorCount( PRESSURE_SENSOR_WATER_INLET_INPUT ) ); // checkFPGAPersistentErrorCountAlarm( FPGA_PERS_ERROR_WATER_INLET_OUTPUT_PRESSURE, getPressureSensorErrorCount( PRESSURE_SENSOR_WATER_INLET_OUTPUT ) ); // checkFPGAPersistentErrorCountAlarm( FPGA_PERS_ERROR_HYDRAULICS_OUTLET_PRESSURE, getPressureSensorErrorCount( PRESSURE_SENSOR_HYDRAULICS_OUTLET ) ); // checkFPGAPersistentErrorCountAlarm( FPGA_PERS_ERROR_BIBAG_PRESSURE, getPressureSensorErrorCount( PRESSURE_SENSOR_BIBAG ) ); // checkFPGAPersistentErrorCountAlarm( FPGA_PERS_ERROR_SPENT_DIALYSATE_PRESSURE, getPressureSensorErrorCount( PRESSURE_SENSOR_SPENT_DIALYSATE ) ); // checkFPGAPersistentErrorCountAlarm( FPGA_PERS_ERROR_FRESH_DIALYSATE_PRESSURE, getPressureSensorErrorCount( PRESSURE_SENSOR_FRESH_DIALYSATE ) ); // checkFPGAPersistentErrorCountAlarm( FPGA_PERS_ERROR_TRANSMEMBRANE_PRESSURE, getPressureSensorErrorCount( PRESSURE_SENSOR_TRANSMEMBRANE ) ); //} /*********************************************************************//** * @brief * The getPressure function gets the current pressure (in mmHg) for a given * pressure sensor. * @details \b Alarm: ALARM_ID_DD_SOFTWARE_FAULT if given sensor is invalid. * @details \b Inputs: currentPressureReadings * @details \b Outputs: none * @param sensor ID of pressure sensor to get pressure reading for. * @return The current pressure (in mmHg) of the given pressure sensor. *************************************************************************/ //F32 getPressure( PRESSURE_SENSORS_T sensor ) //{ // F32 result = 0.0F; // // if ( sensor < NUM_OF_PRESSURE_SENSORS ) // { // result = currentPressureReadings[ sensor ].data; // if ( OVERRIDE_KEY == currentPressureReadings[ sensor ].override ) // { // result = currentPressureReadings[ sensor ].ovData; // } // } // else // { // SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DD_SOFTWARE_FAULT, SW_FAULT_ID_PRESSURE_SENSOR_INVALID_SENSOR1, sensor ) // } // // return result; //} /*********************************************************************//** * @brief * The getPressureSensorTemperature function gets the current pressure sensor * temperature (in deg C) for a given pressure sensor. * @details \b Alarm: ALARM_ID_DD_SOFTWARE_FAULT if given sensor is invalid. * @details \b Inputs: currentPresTempReadings * @details \b Outputs: none * @param sensor ID of pressure sensor to get temperature reading for. * @return The current pressure sensor temperature (in deg C) of the given pressure sensor. *************************************************************************/ //F32 getPressureSensorTemperature( PRESSURE_SENSORS_T sensor ) //{ // F32 result = 0.0F; // // if ( sensor < NUM_OF_PRESSURE_SENSORS ) // { // result = currentPresTempReadings[ sensor ].data; // if ( OVERRIDE_KEY == currentPresTempReadings[ sensor ].override ) // { // result = currentPresTempReadings[ sensor ].ovData; // } // } // else // { // SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DD_SOFTWARE_FAULT, SW_FAULT_ID_PRESSURE_SENSOR_INVALID_SENSOR2, sensor ) // } // // return result; //} /*********************************************************************//** * @brief * The getPressureSensorReadCount function gets the current pressure sensor * read count for a given pressure sensor. * @details \b Alarm: ALARM_ID_DD_SOFTWARE_FAULT if given sensor is invalid. * @details \b Inputs: lastPressureReadCounter * @details \b Outputs: none * @param sensor ID of pressure sensor to get read count for. * @return The current pressure sensor read count of a given pressure sensor. *************************************************************************/ //U32 getPressureSensorReadCount( PRESSURE_SENSORS_T sensor ) //{ // U32 result = 0; // // if ( sensor < NUM_OF_PRESSURE_SENSORS ) // { // result = lastPressureReadCounter[ sensor ].data; // if ( OVERRIDE_KEY == lastPressureReadCounter[ sensor ].override ) // { // result = lastPressureReadCounter[ sensor ].ovData; // } // } // else // { // SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DD_SOFTWARE_FAULT, SW_FAULT_ID_PRESSURE_SENSOR_INVALID_SENSOR3, sensor ) // } // // return result; //} /*********************************************************************//** * @brief * The getPressureSensorErrorCount function gets the current pressure sensor * error count for a given pressure sensor. * @details \b Alarm: ALARM_ID_DD_SOFTWARE_FAULT if given sensor is invalid. * @details \b Inputs: lastPressureErrorCounter * @details \b Outputs: none * @param sensor ID of pressure sensor to get error count for. * @return The current pressure sensor error count of a given pressure sensor. *************************************************************************/ //U32 getPressureSensorErrorCount( PRESSURE_SENSORS_T sensor ) //{ // U32 result = 0; // // if ( sensor < NUM_OF_PRESSURE_SENSORS ) // { // result = lastPressureErrorCounter[ sensor ].data; // if ( OVERRIDE_KEY == lastPressureErrorCounter[ sensor ].override ) // { // result = lastPressureErrorCounter[ sensor ].ovData; // } // } // else // { // SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DD_SOFTWARE_FAULT, SW_FAULT_ID_PRESSURE_SENSOR_INVALID_SENSOR4, sensor ) // } // // return result; //} /************************************************************************* * TEST SUPPORT FUNCTIONS *************************************************************************/ /*********************************************************************//** * @brief * The testPressureSensorReadingsOverride function overrides the value of the * specified pressure sensor with a given value. * @details \b Inputs: none * @details \b Outputs: currentPressureReadings[] * @param message Override message from Dialin which includes an sensor * ID and override value of the pressure sensor. * @return TRUE if override successful, FALSE if not *************************************************************************/ //BOOL testPressureSensorReadingsOverride( MESSAGE_T *message ) //{ // BOOL result = f32ArrayOverride( message, ¤tPressureReadings[0], NUM_OF_PRESSURE_SENSORS - 1 ); // // return result; //} /*********************************************************************//** * @brief * The testPressureSensorTemperatureReadingsOverride function overrides the value of the * specified pressure sensor temperature with a given value. * @details \b Inputs: none * @details \b Outputs: currentPresTempReadings[] * @param message Override message from Dialin which includes an sensor * ID and override value of the pressure sensor temperature. * @return TRUE if override successful, FALSE if not *************************************************************************/ //BOOL testPressureSensorTemperatureReadingsOverride( MESSAGE_T *message ) //{ // BOOL result = f32ArrayOverride( message, ¤tPresTempReadings[0], NUM_OF_PRESSURE_SENSORS - 1 ); // // return result; //} /*********************************************************************//** * @brief * The testPressureSensorReadCounterOverride function overrides the value of the * specified pressure sensor read counter with a given value. * @details \b Inputs: none * @details \b Outputs: lastPressureReadCounter[] * @param message Override message from Dialin which includes an sensor * ID and override value of the pressure sensor read counter. * @return TRUE if override successful, FALSE if not *************************************************************************/ //BOOL testPressureSensorReadCounterOverride( MESSAGE_T *message ) //{ // BOOL result = u32ArrayOverride( message, &lastPressureReadCounter[0], NUM_OF_PRESSURE_SENSORS - 1, 0, PRES_SENSORS_READ_ERR_MAX_CNT ); // // return result; //} /*********************************************************************//** * @brief * The testPressureSensorErrorCounterOverride function overrides the value of the * specified pressure sensor error counter with a given value. * @details \b Inputs: none * @details \b Outputs: lastPressureErrorCounter[] * @param message Override message from Dialin which includes an sensor * ID and override value of the pressure sensor error counter. * @return TRUE if override successful, FALSE if not *************************************************************************/ //BOOL testPressureSensorErrorCounterOverride( MESSAGE_T *message ) //{ // BOOL result = u32ArrayOverride( message, &lastPressureErrorCounter[0], NUM_OF_PRESSURE_SENSORS - 1, 0, PRES_SENSORS_READ_ERR_MAX_CNT ); // // return result; //} /**@}*/