diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-10-28 13:55:52 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-10-28 13:55:52 +0200 |
| commit | 521326ce426ed0cd5b8d92b280cdf0c7213e7b50 (patch) | |
| tree | 3c3f8e7f1490a6d848ed307ee108c04fad80fa0a /Software/Embedded_SW/Embedded/Modules/Control | |
| parent | a43d087e6d77333cd6f40642acb731519697998e (diff) | |
| parent | abc09fbcd0a9c0883b957378d71679be776b6f56 (diff) | |
| download | Tango-521326ce426ed0cd5b8d92b280cdf0c7213e7b50.tar.gz Tango-521326ce426ed0cd5b8d92b280cdf0c7213e7b50.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/_git/Tango
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Control')
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c | 10 | ||||
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/Control/control.c | 9 |
2 files changed, 13 insertions, 6 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c index 8e67de0f1..641a249ff 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c +++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c @@ -548,7 +548,7 @@ uint32_t MillisecLowLoop(uint32_t tick) { if (watchdogCriticalAlarm == false) { - Control_WD(ENABLE,5); //activate heaters/dispenser watchdog, 0.5 seconds + Control_WD(ENABLE,10); //activate heaters/dispenser watchdog, 0.5 seconds //LOG_ERROR (1111, "Control_WD"); } } @@ -586,8 +586,8 @@ uint32_t MillisecLowLoop(uint32_t tick) //KeepAliveOneSecondCall(); for (Motor_i = 0;Motor_i < NUM_OF_MOTORS;Motor_i++) { - // if (Motor_i == HARDWARE_MOTOR_TYPE__MOTO_SCREW) - // continue; // + if (Motor_i == HARDWARE_MOTOR_TYPE__MOTO_SCREW) + continue; // if (isMotorConfigured(Motor_i)) MotorGetStatusFromFPGA(Motor_i); } @@ -595,7 +595,7 @@ uint32_t MillisecLowLoop(uint32_t tick) { for (Heater_i = 0;Heater_i < NUM_OF_CURRENT_HEATERS;Heater_i++) { - Read_Heaters_Current(Heater_i); + //Read_Heaters_Current(Heater_i); } } for (Sensor_i = 0;Sensor_i < MAX_TEMPERATURE_SENSOR_ID;Sensor_i++) @@ -623,7 +623,7 @@ uint32_t MillisecLowLoop(uint32_t tick) } if (OneHourTick) { -#define PUMP_LIMIT 8 +#define PUMP_LIMIT 4 PumpCounter++; if (PumpCounter>=PUMP_LIMIT) { diff --git a/Software/Embedded_SW/Embedded/Modules/Control/control.c b/Software/Embedded_SW/Embedded/Modules/Control/control.c index 07214d240..80afb7ac6 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/control.c +++ b/Software/Embedded_SW/Embedded/Modules/Control/control.c @@ -55,6 +55,7 @@ #include "control.h" #include "MillisecTask.h" +#include "drivers/FPGA/FPGA_GPIO/FPGA_GPIO.h" /******************** Definitions ********************************************/ #define MAX_TANGO_CONTROL_DEVICES 100 /******************** STRUCTURES AND ENUMs ********************************************/ @@ -164,6 +165,9 @@ uint32_t ControlActivityLed( uint32_t Parameter1) { COMM_RED_LED_ON; ACTIVITY_RED_LED_OFF; // Heaters indication - all the Heaters OFF + if(FPGA_WD_Occurred == true) + ACTIVITY_GREEN_LED_ON; + if(power.color == fastBILNK) Pannel_Leds(POWER_ON_OFF,MODE_OFF); else @@ -219,6 +223,8 @@ uint32_t ControlActivityLed( uint32_t Parameter1) if (HeaterActive > 0)// Blink the led on heating ACTIVITY_RED_LED_ON;// Heaters indication - at least one of the Heaters is ON + ACTIVITY_GREEN_LED_OFF; + if(power.color == fastBILNK) Pannel_Leds(POWER_ON_OFF,MODE_ON); else @@ -288,13 +294,14 @@ void ControlStart(void) if (ControlRestart == false) { ControlRestart = true; - MillisecStart(); ROM_TimerLoadSet(Control_timerBase, TIMER_A,120000+(ControlPhaseDelay*120)/*one millisecond*/); TimerEnable(Control_timerBase, TIMER_A); ADCAcquireStart(0,1); AddControlCallback( ControlEmptyCBFunction, eHundredMillisecond, ControlActivityLed,0, 0, 0 ); + SysCtlDelay(12000000); + MillisecStart(); } } |
