diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-07-08 18:51:34 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-07-08 18:51:34 +0300 |
| commit | eaea90470769eb87a7f38cb64cc8fd391e4fa027 (patch) | |
| tree | 409deb83d6ff3310866447b84f8805f4178c4ce9 /Software/Embedded_SW/Embedded/Modules/Control | |
| parent | 0aa9415d8597476480e3cfb217ad019f430e10d9 (diff) | |
| parent | 16089bfb639f7285e58de1faf19078156f0f6536 (diff) | |
| download | Tango-eaea90470769eb87a7f38cb64cc8fd391e4fa027.tar.gz Tango-eaea90470769eb87a7f38cb64cc8fd391e4fa027.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Control')
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c | 4 | ||||
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/Control/control.c | 12 |
2 files changed, 11 insertions, 5 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c index 5f9c3130b..4ad5336d9 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c +++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c @@ -43,6 +43,7 @@ #include "modules/thread/thread_ex.h" #include "modules/ifs/ifs.h" #include "modules/ids/ids_ex.h" +#include "modules/waste/waste_ex.h" #include "modules/Diagnostics/Diagnostics.h" #include "Modules/General/MachineStatus.h" @@ -658,7 +659,6 @@ uint32_t MillisecLowLoop(uint32_t tick) #ifndef EVALUATION_BOARD Read_Buttons_Reg(); #endif - //Ink_Cart_Led(); /////////////////////////////////////////////////////////////////// @@ -766,6 +766,8 @@ uint32_t MillisecLowLoop(uint32_t tick) } */ } + //call waste state machine + Waste_StateMachine_OneSecond_Call(); } if (Tensecond_Tick) { diff --git a/Software/Embedded_SW/Embedded/Modules/Control/control.c b/Software/Embedded_SW/Embedded/Modules/Control/control.c index 0f9848ba1..26fba0194 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/control.c +++ b/Software/Embedded_SW/Embedded/Modules/Control/control.c @@ -170,6 +170,7 @@ void ControlStop(void) ControlRestart = false; ADCAcquireStop(); } +int FPGA_ReInit_Count = 0; ///avoid too many reinitializations of motors as happens when FPGA is corrupted uint32_t ControlActivityLed( uint32_t Parameter1) { static bool flag = false; @@ -192,11 +193,14 @@ uint32_t ControlActivityLed( uint32_t Parameter1) SendJobProgress(0.0,0,false, "Hardware Failure Error"); AbortJob("FPGA Watchdog Error"); } - ReportWithPackageFilter(FPGAFilter, "FPGA Watchdog Error",__FILE__,__LINE__,0,RpError, 0,0); + if (FPGA_ReInit_Count++<20) + { + ReportWithPackageFilter(FPGAFilter, "FPGA Watchdog Error",__FILE__,__LINE__,0,RpError, 0,0); - ACTIVITY_GREEN_LED_ON; - FPGA_SetMotorsInit(); - Motor_ReconfigAllMotors(); + ACTIVITY_GREEN_LED_ON; + FPGA_SetMotorsInit(); + Motor_ReconfigAllMotors(); + } } } else |
