aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/Control
diff options
context:
space:
mode:
authorAvi Levkovich <avi@twine-s.com>2018-05-17 15:25:51 +0300
committerAvi Levkovich <avi@twine-s.com>2018-05-17 15:25:51 +0300
commitb9c99b358ba0124e32a12f401b7054ce1f85f18c (patch)
tree80638cf96c8973061a3b2e6f415c2934ebd89861 /Software/Embedded_SW/Embedded/Modules/Control
parent1a3a15ed7845e68ba473c69a4842d8617bc41c11 (diff)
parent8d223ccd400fb855eb73f046b25338a04e5f9d34 (diff)
downloadTango-b9c99b358ba0124e32a12f401b7054ce1f85f18c.tar.gz
Tango-b9c99b358ba0124e32a12f401b7054ce1f85f18c.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.c4
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h1
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Control/control.c4
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Control/control.h1
4 files changed, 7 insertions, 3 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
index 109cf87d9..11095b757 100644
--- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
+++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
@@ -31,6 +31,7 @@
#include "modules/thread/thread_ex.h"
+Task_Handle Millisecond_Task_Handle;
/******************** Definitions ********************************************/
#define INVALID_MSG_ID 0xFFFF
#define MAX_TANGO_CONTROL_DEVICES 200
@@ -231,6 +232,7 @@ uint32_t MillisecLoop(uint32_t tick)
//gather Motor data from FPGA
#ifndef EVALUATION_BOARD
FPGA_GetBusy(); //load the busy motor information to all motors
+ FPGA_Read_limit_Switches();
#endif
for (Motor_i = 0;Motor_i < NUM_OF_MOTORS;Motor_i++)
@@ -370,7 +372,7 @@ void MillisecTask(UArg arg0, UArg arg1)
//Clock_setTimeout(HostKAClock, 1000);
//Clock_start(HostKAClock);
MillisecInit();
-
+ Millisecond_Task_Handle = Task_self();
while(1)
{
Mailbox_pend(MillisecMsgQ , &Message, BIOS_WAIT_FOREVER);
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h
index f0009b43b..6949a4abe 100644
--- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h
+++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.h
@@ -30,4 +30,5 @@ void MillisecInit(void);
void MillisecStop(void);
void MillisecStart(void);
+extern Task_Handle Millisecond_Task_Handle;
#endif /* MODULES_CONTROL_MILLISECTASK_H_ */
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/control.c b/Software/Embedded_SW/Embedded/Modules/Control/control.c
index 08001cf01..40eee95c8 100644
--- a/Software/Embedded_SW/Embedded/Modules/Control/control.c
+++ b/Software/Embedded_SW/Embedded/Modules/Control/control.c
@@ -90,7 +90,7 @@ int ControlPhaseDelay = 300; //the control task enters only after data gathering
Mailbox_Handle ControlMsgQ = NULL;
bool ControlRestart;
static GateMutex_Handle gateControlDB;
-
+Task_Handle Control_Task_Handle;
ControlDeviceStruc ControlArray[MAX_TANGO_CONTROL_DEVICES];
uint32_t ControlDatalog[MAX_TANGO_CONTROL_DEVICES];
uint32_t Control_timerBase = TIMER0_BASE; //Timer handle
@@ -321,7 +321,7 @@ void controlTask(UArg arg0, UArg arg1)
//uint16_t length;
//Clock_setTimeout(HostKAClock, 1000);
//Clock_start(HostKAClock);
-
+ Control_Task_Handle = Task_self();
while(1)
{
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/control.h b/Software/Embedded_SW/Embedded/Modules/Control/control.h
index 76e90ed2e..853393739 100644
--- a/Software/Embedded_SW/Embedded/Modules/Control/control.h
+++ b/Software/Embedded_SW/Embedded/Modules/Control/control.h
@@ -40,5 +40,6 @@ uint32_t AddControlCallback( ControlCBFunction Callback, CTRL_TIMING_ENUM Ctr
int RemoveControlCallback(uint32_t deviceId, ControlCBFunction Callback );
uint32_t TemplateDataReadCBFunction (uint32_t deviceId, uint32_t Parameter1, uint32_t Parameter2);
+extern Task_Handle Control_Task_Handle;
#endif