Index: firmware/App/Controllers/Temperatures.c =================================================================== diff -u -r921034ee7092206a50183eacfaa73b436d2dee5f -r07cdd44ffd0905cb115405e22cc7586585034e7f --- firmware/App/Controllers/Temperatures.c (.../Temperatures.c) (revision 921034ee7092206a50183eacfaa73b436d2dee5f) +++ firmware/App/Controllers/Temperatures.c (.../Temperatures.c) (revision 07cdd44ffd0905cb115405e22cc7586585034e7f) @@ -80,7 +80,6 @@ static const F32 FGPA_BOARD_TEMP_CONVERSION_COEFF = 503.975 / (F32)TWELVE_BIT_RESOLUTION; ///< FPGA board temperature conversion coefficient. static const F32 VENOUS_ART_PRES_SENSOR_TEMP_CONV_COEFF = 200.0 / 2047.0; ///< Arterial and venous pressure sensor temperature conversion coefficient. static const F32 VENOUS_ART_PRES_SENSOR_TEMP_CONV_CONSTANT = 50.0; ///< Arterial and venous pressure sensor temperature conversion constant. -static const F32 ADC_BOARD_TEMP_SENSOR_CONVERSION_COEFF = 1.0 / 13584.0; ///< ADC board temperatures sensor conversion coefficient. // ********** private function prototypes ********** @@ -231,7 +230,7 @@ TEMPERATURES_EXEC_STATES_T state = TEMPERATURES_EXEC_STATE_WAIT_FOR_POST_STATE; // Give a short time for FPGA to boot up and start sending the ADC reads - if ( ( ++adcReadCounter > ADC_FPGA_READ_DELAY_COUNT ) && ( TRUE == isPOSTComplete ) ) + if ( ( ++adcReadCounter > ADC_FPGA_READ_DELAY_COUNT ) && ( MODE_INIT == getCurrentOperationMode() ) ) { adcReadCounter = 0; state = TEMPERATURES_EXEC_STATE_GET_ADC_VALUES_STATE; @@ -283,24 +282,19 @@ BOOL isTempOutOfRange = FALSE; F32 temperature = 0.0; U32 lastFaultSensor = 0; - F32 faultSensorTemp = 0.0; for ( sensor = THERMISTOR_ONBOARD_NTC; sensor < NUM_OF_TEMPERATURES; sensor++ ) { temperature = getTemperatureValue( sensor ); if ( ( temperature > MAX_ALLOWED_TEMPERATURE ) || ( temperature < MIN_ALLOWED_TEMPERATURE ) ) { - isTempOutOfRange = TRUE; - lastFaultSensor = sensor; - faultSensorTemp = temperature; + isTempOutOfRange |= TRUE; + lastFaultSensor = sensor; } } - if ( TRUE == isPersistentAlarmTriggered( ALARM_ID_HD_TEMPERATURES_OUT_OF_RANGE, isTempOutOfRange ) ) - { - SET_ALARM_WITH_2_F32_DATA( ALARM_ID_HD_TEMPERATURES_OUT_OF_RANGE, lastFaultSensor, faultSensorTemp ); - } + checkPersistentAlarm( ALARM_ID_HD_TEMPERATURES_OUT_OF_RANGE, isTempOutOfRange, lastFaultSensor, MAX_ALLOWED_TEMPERATURE ); } /*********************************************************************//** @@ -352,9 +346,6 @@ #endif } - // TODO remove this code and the if statement. This configuration is until the new arterial sensor is implemented everywhere so the temperature calibration - // structure can be updated permanently. This way the PBA sensor will be replaced with the new arterial sensor. This is to make sure the - // calibration structure does not fail in different devices with different sensors temperaturesStatus[ sensor ].temperatureValue.data = temperature; // Apply the calibration record the temperature values prior to updating the structures temperaturesStatus[ sensor ].temperatureValue.data = Index: firmware/App/HDCommon.h =================================================================== diff -u -rfba3daf7d2ab628bf90da7504b38d0b03f9e0bd9 -r07cdd44ffd0905cb115405e22cc7586585034e7f --- firmware/App/HDCommon.h (.../HDCommon.h) (revision fba3daf7d2ab628bf90da7504b38d0b03f9e0bd9) +++ firmware/App/HDCommon.h (.../HDCommon.h) (revision 07cdd44ffd0905cb115405e22cc7586585034e7f) @@ -42,7 +42,7 @@ // #define READ_FPGA_ASYNC_DATA 1 // Test build reads non-priority register page every other time // #define DISABLE_FPGA_COUNTER_CHECKS 1 // Disable alarms associated with FPGA read/error counters // #define EMC_TEST_BUILD 1 // EMC test build - HD/DG run separately but connected, HD pumps toggle on/off w/ stop button -// #define DISABLE_WD_AND_SFTY_POST_TESTS 1 // Disable watchdog and safety shutdown POST tests + #define DISABLE_WD_AND_SFTY_POST_TESTS 1 // Disable watchdog and safety shutdown POST tests // #define DISABLE_UI_POST_TEST 1 // Disable the UI POST // TODO stays as a build switch until the calibration structure is updated with the build