aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2018-05-08 14:19:41 +0300
committerShlomo Hecht <shlomo@twine-s.com>2018-05-08 14:19:41 +0300
commitdc911b096b06388d9bf84d86d35c8d19c84d6e4b (patch)
tree19db0f79259879a380e278fc36055711f75064aa /Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
parente55b98655d1efb66e87f254f8c8869debd4900ba (diff)
downloadTango-dc911b096b06388d9bf84d86d35c8d19c84d6e4b.tar.gz
Tango-dc911b096b06388d9bf84d86d35c8d19c84d6e4b.zip
remove warnings, put order, minor changes
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
index 6ddea7920..0ab763a3f 100644
--- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
+++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
@@ -224,7 +224,9 @@ uint32_t MillisecLoop(uint32_t tick)
Onesecond_Tick = (tick%eOneSecond == 0) ?true:false;
//gather Motor data from FPGA
+#ifndef EVALUATION_BOARD
FPGA_GetBusy(); //load the busy motor information to all motors
+#endif
for (Motor_i = 0;Motor_i < NUM_OF_MOTORS;Motor_i++)
{
if (MotorDriverResponse[Motor_i].Busy == true)
@@ -294,11 +296,13 @@ uint32_t MillisecLoop(uint32_t tick)
if (Hundred_msTick)
{
}
-#ifdef EVALUATION_BOARD
- /* this cannot be done within one millisecond, and not needed
- * instead, check if there is a motor waiting with data to send or read request
- * MotorSpeed_Data[MOTOR_DRYER_DRIVING] = MotorGetSpeedFromFPGA(MOTOR_DRYER_DRIVING);
+ if (Onesecond_Tick)
+ {
+ ADC_TriggerCollection();
+ }
+
+ /* OLD CODE
MotorStatus_Data[MOTOR_DRYER_DRIVING] = MotorGetStatusFromFPGA(MOTOR_DRYER_DRIVING);
MotorSpeed_Data[MOTOR_SCREW] = MotorGetSpeedFromFPGA(MOTOR_SCREW);
MotorStatus_Data[MOTOR_SCREW] = MotorGetStatusFromFPGA(MOTOR_SCREW);
@@ -307,7 +311,7 @@ uint32_t MillisecLoop(uint32_t tick)
MotorSpeed_Data[MOTOR_LDRIVING] = MotorGetSpeedFromFPGA(MOTOR_LDRIVING);
MotorStatus_Data[MOTOR_LDRIVING] = MotorGetStatusFromFPGA(MOTOR_LDRIVING);
MotorSpeed_Data[MOTOR_RDRIVING] = MotorGetSpeedFromFPGA(MOTOR_RDRIVING);
- MotorStatus_Data[MOTOR_RDRIVING] = MotorGetStatusFromFPGA(MOTOR_RDRIVING);*/
+ MotorStatus_Data[MOTOR_RDRIVING] = MotorGetStatusFromFPGA(MOTOR_RDRIVING);
//gather Dancer data from FPGA
Dancer_Data[FEEDER_DANCER] = Read_Dancer_Position(FEEDER_DANCER);
Dancer_Data[POOLER_DANCER] = Read_Dancer_Position(POOLER_DANCER);
@@ -342,7 +346,7 @@ uint32_t MillisecLoop(uint32_t tick)
}
}
}
-#endif
+*/
//gather data from FPGA
return OK;