aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2020-11-22 16:55:53 +0200
committerShlomo Hecht <shlomo@twine-s.com>2020-11-22 16:55:53 +0200
commit51b913dbffe9f0bb3b1a3a0ce00cef6720ba9a5e (patch)
tree21ee7d4236c5d4aafbb093fc3502abfb405c84ba /Software/Embedded_SW
parent389d8c71bdf3af88d4a02f041e42ca4945608b73 (diff)
downloadTango-51b913dbffe9f0bb3b1a3a0ce00cef6720ba9a5e.tar.gz
Tango-51b913dbffe9f0bb3b1a3a0ce00cef6720ba9a5e.zip
some changes in spikes
Diffstat (limited to 'Software/Embedded_SW')
-rw-r--r--Software/Embedded_SW/Embedded/Common/Utilities/RFIDTagHandling.c2
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c11
-rw-r--r--Software/Embedded_SW/Embedded/Modules/General/GeneralHardware.c7
3 files changed, 15 insertions, 5 deletions
diff --git a/Software/Embedded_SW/Embedded/Common/Utilities/RFIDTagHandling.c b/Software/Embedded_SW/Embedded/Common/Utilities/RFIDTagHandling.c
index 6465903fa..6d15afc6a 100644
--- a/Software/Embedded_SW/Embedded/Common/Utilities/RFIDTagHandling.c
+++ b/Software/Embedded_SW/Embedded/Common/Utilities/RFIDTagHandling.c
@@ -5,8 +5,6 @@
* Author: shlomo
*/
#include "include.h"
-
-#include "Modules/Waste/Waste.h"
#include "Modules/IFS/ifs.h"
#include "Modules/AlarmHandling/AlarmHandling.h"
#include "PMR/Diagnostics/CartridgeValidationRequest.pb-c.h"
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;