aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/Control/control.c
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2019-02-21 14:24:23 +0200
committerShlomo Hecht <shlomo@twine-s.com>2019-02-21 14:24:23 +0200
commita5fde6c76b7c98c482d5fc069c371da5480c0bdf (patch)
tree47c3ead1685ba23cfe31aadcabf3b30c3df65a87 /Software/Embedded_SW/Embedded/Modules/Control/control.c
parent21a6b045581db87278253428839bde3fcc9db563 (diff)
downloadTango-a5fde6c76b7c98c482d5fc069c371da5480c0bdf.tar.gz
Tango-a5fde6c76b7c98c482d5fc069c371da5480c0bdf.zip
Version 1.3.7.5 (careful!) control saves real time - main loop runs to the highest number of active control requests
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Control/control.c')
-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)
{