diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2019-02-25 11:02:07 +0200 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2019-02-25 11:02:07 +0200 |
| commit | b462fdd744f491b04137fd99863f6cb6c623cfa0 (patch) | |
| tree | 2f69f8e953450a0452442c24f3809aec84ce7db0 /Software/Embedded_SW/Embedded/Modules/Control | |
| parent | a8ddb23154fe5111c9509fa0a83dcc36adcba4ee (diff) | |
| parent | 44a35db8a2929fb3f6aa56ed08185e066292f106 (diff) | |
| download | Tango-b462fdd744f491b04137fd99863f6cb6c623cfa0.tar.gz Tango-b462fdd744f491b04137fd99863f6cb6c623cfa0.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Control')
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c | 6 | ||||
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/Control/control.c | 18 |
2 files changed, 14 insertions, 10 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c index 5943c11c5..471833dc5 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c +++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c @@ -428,7 +428,7 @@ uint32_t MillisecLoop(uint32_t tick) } uint32_t MillisecLowLoop(uint32_t tick) { - uint8_t Motor_i,Disp_i; + uint8_t Motor_i,Disp_i,Heater_i; TEMPERATURE_SENSOR_ID_ENUM Sensor_i; //static int temp=0; @@ -489,6 +489,10 @@ uint32_t MillisecLowLoop(uint32_t tick) if (isMotorConfigured(Motor_i)) MotorGetStatusFromFPGA(Motor_i); } + for (Heater_i = 0;Heater_i < NUM_OF_HEATERS;Heater_i++) + { + Read_Head_MixChip_Heaters_Current(Heater_i); + } } if (OneMinute_Tick) { 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) { |
