diff options
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; |
