diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2019-10-03 10:04:11 +0300 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2019-10-03 10:04:11 +0300 |
| commit | 2ccc5a2e78f306d3c434c764e34509d4db92d8d8 (patch) | |
| tree | 399f8c061fa698c36d06da9ebc101d65b02df26e /Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c | |
| parent | b9e2c008322ce474ce6e0b18da9a786c128de8d9 (diff) | |
| parent | a6496a02892d653a70bc9e0d37856b1a7d3cd74b (diff) | |
| download | Tango-2ccc5a2e78f306d3c434c764e34509d4db92d8d8.tar.gz Tango-2ccc5a2e78f306d3c434c764e34509d4db92d8d8.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 | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c index 38c0f86f1..88d62a495 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_init.c @@ -11,6 +11,9 @@ #include "PMR/Hardware/HardwareDancer.pb-c.h" #include "PMR/Hardware/HardwareWinder.pb-c.h" #include "PMR/Hardware/HardwareBreakSensor.pb-c.h" +#include <PMR/Diagnostics/EventType.pb-c.h> + +#include "Modules/AlarmHandling/AlarmHandling.h" #include "PMR/Printing/JobSpool.pb-c.h" #include "PMR/common/MessageContainer.pb-c.h" @@ -49,6 +52,8 @@ uint32_t MotorsConfigMessage(HardwareConfiguration * HWrequest) HardwareMotor *request; if (HWrequest == NULL) return ERROR; + AlarmHandlingSetAlarm (EVENT_TYPE__MACHINE_STATE_HW_CONFIG_FAILED,OFF); + for (MotorId = 0; MotorId < HWrequest->n_motors ; MotorId++) { request = HWrequest->motors[MotorId]; @@ -69,13 +74,12 @@ uint32_t MotorsConfigMessage(HardwareConfiguration * HWrequest) MotorsCfg[Motor_i].configword = request->configword; if(MotorDriverResponse[Motor_i].DriverType == CombinrdMotDriver) { - MotorsCfg[Motor_i].directionthreadwize = !(request->directionthreadwize);//PowerSTEP01 + MotorsCfg[Motor_i].directionthreadwize = request->directionthreadwize ^ 1;//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; MotorsCfg[Motor_i].kvalacc = request->kvalacc; |
