Index: firmware/App/Monitors/Temperature.c =================================================================== diff -u -raf3b8065167834683ec01c8c8342b3d196fca593 -r81aa682aa24931c7f44aea82ec72fb3dfabc7890 --- firmware/App/Monitors/Temperature.c (.../Temperature.c) (revision af3b8065167834683ec01c8c8342b3d196fca593) +++ firmware/App/Monitors/Temperature.c (.../Temperature.c) (revision 81aa682aa24931c7f44aea82ec72fb3dfabc7890) @@ -24,7 +24,7 @@ #include "ModePreGenPermeateDefeatured.h" #include "OperationModes.h" #include "PersistentAlarm.h" -#include "PressureSensor.h" +#include "Pressure.h" #include "Temperature.h" #include "Timers.h" #include "TaskPriority.h" @@ -139,30 +139,6 @@ *************************************************************************/ void execTemperatureSensors( void ) { - // Check if a new calibration is available -// if ( TRUE == isNewCalibrationRecordAvailable() ) -// { -// getNVRecord2Driver( GET_CAL_TEMP_SENSORS, (U08*)&tempSensorCalRecord, sizeof( DD_TEMP_SENSORS_CAL_RECORD_T ), -// NUM_OF_CAL_DATA_TEMP_SENSORS, ALARM_ID_DD_TEMPERATURE_SENSORS_INVALID_CAL_RECORD ); -// } - - // Read the sensors all the time - switch ( tempSensorsExecState ) - { - case TEMPSENSORS_EXEC_STATE_START: - tempSensorsExecState = handleExecStart(); - break; - - case TEMPSENSORS_EXEC_STATE_GET_ADC_VALUES: - tempSensorsExecState = handleExecGetADCValues(); - break; - - default: -// SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DD_SOFTWARE_FAULT, SW_FAULT_ID_TEMPERATURE_SENSORS_EXEC_INVALID_STATE, tempSensorsExecState ); -// tempSensorsExecState = TEMPSENSORS_EXEC_STATE_GET_ADC_VALUES; - break; - } - // Monitor the temperature values monitorTemperatureSenors(); @@ -326,16 +302,16 @@ static void monitorPreGenDefAlarms( void ) { //FP_PRE_GENP_DEF_MODE_STATE_T preGenDefState; - F32 temperatureM4 = getTemperatureValue( M4_TEMP ); + F32 temperatureM3 = getFilteredPressureSensorTemperature( M3_PRES ); BOOL isTempOutOfLowRange = FALSE; BOOL isTempOutOfHighRange = FALSE; //if ( preGenDefState == FP_PRE_GENP_DEF_INLET_WATER_CHECK ) - isTempOutOfLowRange = ( ( temperatureM4 < TEMPERATURE_INLET_LOW_THRESHOLD ) ? TRUE : FALSE); - isTempOutOfHighRange = ( ( temperatureM4 > TEMPERATURE_INLET_HIGH_THRESHOLD ) ? TRUE : FALSE); - checkPersistentAlarm( ALARM_ID_FP_INLET_TEMPERATURE_OUT_LOW_RANGE, isTempOutOfLowRange, temperatureM4, TEMPERATURE_INLET_LOW_THRESHOLD ); - checkPersistentAlarm( ALARM_ID_FP_INLET_TEMPERATURE_OUT_HIGH_RANGE, isTempOutOfHighRange, temperatureM4, TEMPERATURE_INLET_HIGH_THRESHOLD ); + isTempOutOfLowRange = ( ( temperatureM3 < TEMPERATURE_INLET_LOW_THRESHOLD ) ? TRUE : FALSE); + isTempOutOfHighRange = ( ( temperatureM3 > TEMPERATURE_INLET_HIGH_THRESHOLD ) ? TRUE : FALSE); + checkPersistentAlarm( ALARM_ID_FP_INLET_TEMPERATURE_OUT_LOW_RANGE, isTempOutOfLowRange, temperatureM3, TEMPERATURE_INLET_LOW_THRESHOLD ); + checkPersistentAlarm( ALARM_ID_FP_INLET_TEMPERATURE_OUT_HIGH_RANGE, isTempOutOfHighRange, temperatureM3, TEMPERATURE_INLET_HIGH_THRESHOLD ); }