aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/Control
diff options
context:
space:
mode:
authorAvi Levkovich <avi@twine-s.com>2018-05-09 11:44:32 +0300
committerAvi Levkovich <avi@twine-s.com>2018-05-09 11:44:32 +0300
commit67255998056910f53640e11e634cfdbbd7f6880c (patch)
treee8e1a7a7fb653a69cf3c2150367308a99a4d5c13 /Software/Embedded_SW/Embedded/Modules/Control
parentd84b6c4fff9cbf40263140a522fca3ae6bdfd57c (diff)
parent915ee5e76204c895c71ae45447b47f24dfde44a8 (diff)
downloadTango-67255998056910f53640e11e634cfdbbd7f6880c.tar.gz
Tango-67255998056910f53640e11e634cfdbbd7f6880c.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/MillisecTask.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
index 7841b1310..12603b5ee 100644
--- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
+++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c
@@ -224,9 +224,9 @@ uint32_t MillisecLoop(uint32_t tick)
Onesecond_Tick = (tick%eOneSecond == 0) ?true:false;
//gather Motor data from FPGA
- #ifndef EVALUATION_BOARD
+#ifndef EVALUATION_BOARD
FPGA_GetBusy(); //load the busy motor information to all motors
- #endif
+#endif
for (Motor_i = 0;Motor_i < NUM_OF_MOTORS;Motor_i++)
{
@@ -297,11 +297,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);
@@ -310,7 +312,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);
@@ -345,7 +347,7 @@ uint32_t MillisecLoop(uint32_t tick)
}
}
}
-#endif
+*/
//gather data from FPGA
return OK;