From bca898b563219f5d02fb7d611a49f2a20306f214 Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Sun, 25 Mar 2018 18:53:03 +0300 Subject: job preparation and control improvements --- Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (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 ded4c9f9e..c242401fd 100644 --- a/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c +++ b/Software/Embedded_SW/Embedded/Modules/Control/MillisecTask.c @@ -47,6 +47,7 @@ uint32_t ADC_Data[MAX_ADC_DEVICES] = {0}; uint32_t TemperatureSensor_Data[MAX_TEMPERATURE_SENSOR_ID] = {0}; uint32_t MotorSpeed_Data[MOTOR_SPARE1_1] = {0}; uint32_t MotorStatus_Data[MOTOR_SPARE1_1] = {0}; +uint32_t MotorPosition_Data[MOTOR_SPARE1_1] = {0}; bool MotorBusy_Data[MOTOR_SPARE1_1] = {true}; /******************** GLOBAL PARAMETERS ********************************************/ @@ -154,7 +155,11 @@ uint32_t MillisecLoop(uint32_t tick) MotorStatus_Data[MOTOR_RDRIVING] = MotorGetStatusFromFPGA(MOTOR_RDRIVING); //gather Dancer data from FPGA //gather data from FPGA - + if (Ten_msTick) + { + MotorPosition_Data[MOTOR_SCREW] = MotorGetPositionFromFPGA(MOTOR_SCREW); + MotorPosition_Data[MOTOR_RDRIVING] = MotorGetPositionFromFPGA(MOTOR_RDRIVING); + } if (Hundred_msTick) { int adc_i; -- cgit v1.3.1