diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2018-05-10 13:57:03 +0300 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2018-05-10 13:57:03 +0300 |
| commit | d60f78be71fd705cb6bbea8ecb5b5c49858c973e (patch) | |
| tree | 2a9f89698e8247efc097dc0e5c344eda18af0d4c /Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c | |
| parent | a19812920469fdcf6305e22b1a435c7a3895fa17 (diff) | |
| download | Tango-d60f78be71fd705cb6bbea8ecb5b5c49858c973e.tar.gz Tango-d60f78be71fd705cb6bbea8ecb5b5c49858c973e.zip | |
change motors config, improve initialization and control, first control run
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c')
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c index 5a8c3df76..0e276fe92 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c @@ -51,7 +51,6 @@ uint32_t MotorsConfigMessage(HardwareMotor * request) { uint32_t status = PASSED; TimerMotors_t Motor_i; - MotorDriverConfigStruc MotorDriverConfig; Motor_i = request->hardwaremotortype; /*for (i=0;i<MAX_THREAD_MOTORS_NUM;i++) { @@ -69,15 +68,8 @@ uint32_t MotorsConfigMessage(HardwareMotor * request) //if (Motor_i< MAX_THREAD_MOTORS_NUM) //{ memcpy (&MotorsCfg[Motor_i],request,sizeof(HardwareMotor)); - MotorDriverConfig.ACC = MotorsCfg[Motor_i].maxchangeslope; - MotorDriverConfig.DEC = MotorsCfg[Motor_i].maxchangeslope; - MotorDriverConfig.MaxSpeed = MotorsCfg[Motor_i].maxfrequency; - MotorDriverConfig.HasMicroStep = MotorsCfg[Motor_i].has_microstep; - MotorDriverConfig.Microstep = MotorsCfg[Motor_i].microstep; - MotorDriverConfig.HasConfigWord = MotorsCfg[Motor_i].has_configword; - MotorDriverConfig.ConfigWord = MotorsCfg[Motor_i].configword; - status = MotorConfig( Motor_i, &MotorDriverConfig); + status = MotorConfig( Motor_i, &MotorsCfg[Motor_i]); // if (Motor_i == MOTOR_RDRIVING) // ThreadInitialTestStub(request); |
