aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/Control
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Control')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c4
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Control/control.c12
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