diff options
| author | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2019-08-20 14:54:08 +0300 |
|---|---|---|
| committer | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2019-08-20 14:54:08 +0300 |
| commit | 37ac8fbec05d6980e94cb682d42edbd3ef6aa15e (patch) | |
| tree | 052732264349ff6c40bdafc83163be71cca8b572 /Software/Embedded_SW/Embedded/Modules/Control | |
| parent | 53d2c81ebf6a98b4a0c46559abd6a636a4517314 (diff) | |
| parent | 884fce5075ca6a53cb5687feb0b01c6db0802f06 (diff) | |
| download | Tango-37ac8fbec05d6980e94cb682d42edbd3ef6aa15e.tar.gz Tango-37ac8fbec05d6980e94cb682d42edbd3ef6aa15e.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Control')
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; |
