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/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)
{