From dc911b096b06388d9bf84d86d35c8d19c84d6e4b Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Tue, 8 May 2018 14:19:41 +0300 Subject: remove warnings, put order, minor changes --- .../Embedded_SW/Embedded/Modules/Control/MillisecTask.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'Software/Embedded_SW/Embedded/Modules/Control') 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; -- cgit v1.3.1