diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2019-03-06 13:36:17 +0200 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2019-03-06 13:36:17 +0200 |
| commit | 20df5917530e27ae8ead5bf2c35d2dbcad6669ae (patch) | |
| tree | 679d2e9eaac132494304a4dd71590f24276b266d /Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c | |
| parent | c2b14d371de9a97c4ced81fc7d79ba6617b75457 (diff) | |
| parent | d95329065734fec34e0e3763cf4b6dee428499d2 (diff) | |
| download | Tango-20df5917530e27ae8ead5bf2c35d2dbcad6669ae.tar.gz Tango-20df5917530e27ae8ead5bf2c35d2dbcad6669ae.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
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, 10 insertions, 0 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c index 435d7aef3..a1e91f6fc 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c @@ -17,6 +17,8 @@ #include "drivers/Flash_Memory/fatfs/ff.h" #include "drivers/SSI_Comm/Dancer/Dancer.h" +#include "drivers/FPGA/Moters_Driver/PowerSTEP01.h" + #include "thread.h" MotorDriverConfigStruc MotorsCfg[NUM_OF_MOTORS]={0}; HardwarePidControl MotorsControl[MAX_THREAD_MOTORS_NUM] = {0}; @@ -52,6 +54,14 @@ uint32_t MotorsConfigMessage(HardwareMotor * request) MotorsCfg[Motor_i].pulseperround = request->pulseperround; MotorsCfg[Motor_i].pulleyradius = request->pulleyradius; MotorsCfg[Motor_i].configword = request->configword; + if(MotorDriverResponse[Motor_i].DriverType == VoltageCombinedMotDriver) + { + MotorsCfg[Motor_i].directionthreadwize = !(request->directionthreadwize);//PowerSTEP01 + } + else + { + MotorsCfg[Motor_i].directionthreadwize = request->directionthreadwize;//L6470 + L6472 + } MotorsCfg[Motor_i].directionthreadwize = request->directionthreadwize; MotorsCfg[Motor_i].kvalhold = request->kvalhold; MotorsCfg[Motor_i].kvalrun = request->kvalrun; |
