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.c8
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Control/control.c10
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Control/control.h2
3 files changed, 17 insertions, 3 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
index fa94614fd..8e67de0f1 100644
--- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
+++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
@@ -16,7 +16,9 @@
///////////////////////////////////////////////////////////////////////////////////////////
#include "include.h"
#include "Modules/General/GeneralHardware.h"
+
#include "Modules/AlarmHandling/AlarmHandling.h"
+#include "Modules/General/MachineStatus.h"
#include "MillisecTask.h"
#include <driverlib/timer.h>
@@ -40,6 +42,7 @@
#include "modules/thread/thread_ex.h"
#include "modules/ids/ids_ex.h"
#include "modules/Diagnostics/Diagnostics.h"
+#include "Modules/General/MachineStatus.h"
#include "drivers/Flash_Memory/Flash_Memory.h"
#include "drivers/Flash_Memory/fatfs/ff.h"
@@ -536,7 +539,7 @@ uint32_t MillisecLowLoop(uint32_t tick)
{
Speed_Data = Calculate_Speed_Sensor_Velocity();
Read_Buttons_Reg();
- Ink_Cart_Led();
+ //Ink_Cart_Led();
for (Sensor_i = 0;Sensor_i < MAX_TEMPERATURE_SENSOR_ID;Sensor_i++)
{
MillisecUpdateTemperatures (Sensor_i,TemperatureSensorRead(Sensor_i));
@@ -606,7 +609,8 @@ uint32_t MillisecLowLoop(uint32_t tick)
{
Read_MidTank_Pressure_Sensor(Disp_i);
}
-/* for (Motor_i = 0;Motor_i < NUM_OF_MOTORS;Motor_i++)
+ MachineUpdateResponseFunc();
+ /* for (Motor_i = 0;Motor_i < NUM_OF_MOTORS;Motor_i++)
{
if (Motor_i == HARDWARE_MOTOR_TYPE__MOTO_SCREW)
continue; //
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/control.c b/Software/Embedded_SW/Embedded/Modules/Control/control.c
index f1e19d851..07214d240 100644
--- a/Software/Embedded_SW/Embedded/Modules/Control/control.c
+++ b/Software/Embedded_SW/Embedded/Modules/Control/control.c
@@ -158,7 +158,7 @@ uint32_t ControlActivityLed( uint32_t Parameter1)
{
static bool flag = false;
static uint8_t counter;
- const uint8_t Blink_Freq = 3;//odd number
+ const uint8_t Blink_Freq = 7;//odd number
if (flag==true)
{
@@ -479,6 +479,14 @@ uint32_t GetControlLowDevice_i(void)
{
return ControlLowDevice_i;
}
+ControlCBFunction GetControlCallbackFuncPtr(uint32_t ControlId)
+{
+ if (ControlArray[ControlId].ControlActive)
+ return ControlArray[ControlId].ControlCallbackPtr;
+ else
+ return NULL;
+
+}
uint32_t ControlLoop(uint32_t tick)
{
if (MaxHighDevices == 0xFF)
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/control.h b/Software/Embedded_SW/Embedded/Modules/Control/control.h
index 380040e34..450646a68 100644
--- a/Software/Embedded_SW/Embedded/Modules/Control/control.h
+++ b/Software/Embedded_SW/Embedded/Modules/Control/control.h
@@ -48,6 +48,8 @@ uint32_t TemplateDataReadCBFunction (uint32_t deviceId, uint32_t Parameter1);
uint32_t GetControlDevice_i(void);
uint32_t GetControlLowDevice_i(void);
+ControlCBFunction GetControlCallbackFuncPtr(uint32_t ControlId);
+
extern Task_Handle Control_Task_Handle;
extern uint32_t millisecondCounter;