aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c11
-rw-r--r--Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c7
2 files changed, 15 insertions, 3 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
index 8beab771d..3de362af9 100644
--- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
+++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
@@ -524,11 +524,13 @@ int TemperatureSum[MAX_HEAD_CARD_TEMP_SENS_ID];
int TemperatureMin[MAX_HEAD_CARD_TEMP_SENS_ID];
int TemperatureMax[MAX_HEAD_CARD_TEMP_SENS_ID];
int TemperatureCount[MAX_HEAD_CARD_TEMP_SENS_ID];
-int TemperatureCalc[MAX_HEAD_CARD_TEMP_SENS_ID];
+int TemperatureCalc[MAX_HEAD_CARD_TEMP_SENS_ID] = {2.1,2.1,2.1,2.1,2.1,2.1,2.1,2.1,2.1,2.1,2.1,2.1,2.1,2.1,2.1,2.1,2.1,2.1,2.1,2.1,2.1,2.1,2.1,2.1,2.1,2.1,2.1};
void MillisecUpdateTemperatures (TEMPERATURE_SENSOR_ID_ENUM SensorId,int temperature)
{
//if(TemperatureCount[SensorId]++>=10)
// TemperatureCount[SensorId] = 0;
+ if ((temperature>28000)||(temperature<900))
+ return;
TemperatureCount[SensorId]++;
if (TemperatureMax[SensorId]<temperature) TemperatureMax[SensorId]=temperature;
if (TemperatureMin[SensorId]>temperature) TemperatureMin[SensorId]=temperature;
@@ -540,8 +542,11 @@ int MillisecCalculateTemperatures (TEMPERATURE_SENSOR_ID_ENUM SensorId)
TemperatureSum[SensorId]-=TemperatureMax[SensorId];
TemperatureSum[SensorId]-=TemperatureMin[SensorId];
calc = TemperatureSum[SensorId] / (TemperatureCount[SensorId]-2);
- if (abs(TemperatureMax[SensorId]-TemperatureMin[SensorId])>2000)
- Report("Millisec Temp spike",__FILE__,SensorId,(int)TemperatureMax[SensorId],RpWarning,(int) TemperatureMin[SensorId],0);
+ if (TemperatureSum[SensorId]>10)
+ {
+ if(abs(TemperatureMax[SensorId]-TemperatureMin[SensorId])>2000)
+ Report("Millisec Temp spike",__FILE__,SensorId,(int)TemperatureMax[SensorId],RpWarning,(int) TemperatureMin[SensorId],0);
+ }
TemperatureSum[SensorId] = 0;
TemperatureCount[SensorId] = 0;
TemperatureMin[SensorId] = 30000;
diff --git a/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c b/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c
index c90b4fee9..6c4293f6f 100644
--- a/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c
+++ b/Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c
@@ -452,6 +452,13 @@ uint32_t HWConfiguration(UploadHardwareConfigurationRequest* UploadRequest)
AlarmHandlingSetAlarm (EVENT_TYPE__POWER_UP_BIT_FAILURE,ON);
return ERROR;
}
+ else
+ {
+ if (InitFailures > 2)
+ {
+ Report("HWConfigurationInit repeated failure going up",__FILE__,__LINE__,(int)InitFailures,RpWarning,(int)EEPROM_INIT_FAILURE_COUNTER,0);
+ }
+ }
HardwareConfiguration *request = UploadRequest->hardwareconfiguration;