aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/Control
diff options
context:
space:
mode:
authorAvi Levkovich <avi@twine-s.com>2019-02-21 17:34:53 +0200
committerAvi Levkovich <avi@twine-s.com>2019-02-21 17:34:53 +0200
commitd7c8a8e9a6320ade6098e0d8e182c7ada4e30a97 (patch)
tree4f261cdd6c2f5a3336e09e775576fbd6bf353dd1 /Software/Embedded_SW/Embedded/Modules/Control
parent1b6e37351cde492bc27e48d4c53f6a69eea91052 (diff)
parenta5fde6c76b7c98c482d5fc069c371da5480c0bdf (diff)
downloadTango-d7c8a8e9a6320ade6098e0d8e182c7ada4e30a97.tar.gz
Tango-d7c8a8e9a6320ade6098e0d8e182c7ada4e30a97.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/control.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/control.c b/Software/Embedded_SW/Embedded/Modules/Control/control.c
index e4abc5e3c..52b52d93b 100644
--- a/Software/Embedded_SW/Embedded/Modules/Control/control.c
+++ b/Software/Embedded_SW/Embedded/Modules/Control/control.c
@@ -232,8 +232,8 @@ uint32_t AddControlCallback( ControlCBFunction Callback, CTRL_TIMING_ENUM CtrlF
uint32_t device_i;
uint32_t deviceId = 0xFF;
- //if (CtrlFrequency == eOneMillisecond)
- //{
+ if (CtrlFrequency == eOneMillisecond)
+ {
for(device_i = 0;device_i < MAX_TANGO_CONTROL_DEVICES;device_i++)
{
if (ControlArray[device_i].ControlActive == false)
@@ -242,7 +242,7 @@ uint32_t AddControlCallback( ControlCBFunction Callback, CTRL_TIMING_ENUM CtrlF
break;
}
}
-/* if (MaxHighDevices == 0xFF)
+ if (MaxHighDevices == 0xFF)
MaxHighDevices = deviceId;
else
{
@@ -252,7 +252,7 @@ uint32_t AddControlCallback( ControlCBFunction Callback, CTRL_TIMING_ENUM CtrlF
}
else
{
- for(device_i = MAX_TANGO_CONTROL_DEVICES-1;device_i >=0;device_i--)
+ for(device_i = MAX_TANGO_CONTROL_DEVICES-1;device_i > 0;device_i--)
{
if (ControlArray[device_i].ControlActive == false)
{
@@ -260,7 +260,7 @@ uint32_t AddControlCallback( ControlCBFunction Callback, CTRL_TIMING_ENUM CtrlF
break;
}
}
- }*/
+ }
if (deviceId == 0xFF)
{
@@ -399,10 +399,10 @@ uint32_t GetControlLowDevice_i(void)
}
uint32_t ControlLoop(uint32_t tick)
{
- //if (MaxHighDevices == 0xFF)
- // return OK;
- //for (ControlDevice_i = 0; ControlDevice_i <= MaxHighDevices;ControlDevice_i++)
- for (ControlDevice_i = 0; ControlDevice_i < MAX_TANGO_CONTROL_DEVICES;ControlDevice_i++)
+ if (MaxHighDevices == 0xFF)
+ return OK;
+ for (ControlDevice_i = 0; ControlDevice_i <= MaxHighDevices;ControlDevice_i++)
+ //for (ControlDevice_i = 0; ControlDevice_i < MAX_TANGO_CONTROL_DEVICES;ControlDevice_i++)
{
if (ControlArray[ControlDevice_i].ControlActive)
{