diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2018-08-12 15:35:02 +0300 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2018-08-12 15:35:02 +0300 |
| commit | 08230d9473ade10bba291b9f336583ff5b4f571c (patch) | |
| tree | c2846fdb334e617fa0a56ab562fa203e1eb89995 /Software/Embedded_SW/Embedded/Modules/Control | |
| parent | bbbc155a96729050b9aa7d966055726df46696af (diff) | |
| download | Tango-08230d9473ade10bba291b9f336583ff5b4f571c.tar.gz Tango-08230d9473ade10bba291b9f336583ff5b4f571c.zip | |
alarm handling (basic)
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Control')
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c | 5 | ||||
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c index 559db0e79..58d3f9889 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c +++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c @@ -74,6 +74,8 @@ typedef struct MillisecMessage{ uint32_t Dancer_Data[NUM_OF_DANCERS] = {0}; uint32_t Speed_Data = 0; +bool watchdogCriticalAlarm = false; + MillisecMotorDataStruc MotorData[NUM_OF_MOTORS] = {0}; MillisecMotorDataStruc SpeedSetPending[NUM_OF_MOTORS] = {0}; MillisecMotorDataStruc PT100Data[MAX_TEMPERATURE_SENSOR_ID] = {0}; @@ -417,7 +419,8 @@ uint32_t MillisecLoop(uint32_t tick) for (Sensor_i = 0;Sensor_i < MAX_SYSTEM_DISPENSERS;Sensor_i++) CalculateDispenserPressure(Sensor_i); FPGA_GetAllDispensersValveBusyOCD(); - Control_WD(ENABLE,50); //activate heaters/dispenser watchdog, 5 seconds + if (watchdogCriticalAlarm == false) + Control_WD(ENABLE,50); //activate heaters/dispenser watchdog, 5 seconds } //ROM_IntMasterEnable(); diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h index ef9a9d21b..77c3a5ef8 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h +++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h @@ -32,5 +32,7 @@ void MillisecInit(void); void MillisecStop(void); void MillisecStart(void); +extern bool watchdogCriticalAlarm; + extern Task_Handle Millisecond_Task_Handle; #endif /* MODULES_CONTROL_MILLISECTASK_H_ */ |
