diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2020-08-10 08:33:34 +0300 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2020-08-10 08:33:34 +0300 |
| commit | 41f960a47a79f13a2a741f30cfa9441ad2392872 (patch) | |
| tree | 530aaef40fdab3c1b37b3fb5ca2db43101e5d74d /Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c | |
| parent | 046d701f0b56c3cf0316ea92160cf34ccbf90412 (diff) | |
| parent | ee2c20c777478b178de879ff6c827fc90ed86e27 (diff) | |
| download | Tango-41f960a47a79f13a2a741f30cfa9441ad2392872.tar.gz Tango-41f960a47a79f13a2a741f30cfa9441ad2392872.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c')
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c index f040a9a8d..e489f78ff 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c @@ -888,9 +888,9 @@ uint32_t Adjust_Right_TFU_Tension(double tension) uint32_t status = OK; if (tension > 0.5) //0 = lower position, 1 = high position { - //PrepareWaitCount++; if (FPGA_Read_limit_Switches(GPI_LS_RDANCER_UP) == NO_LIMIT) { + PrepareWaitCount++; MotorMovetoLimitSwitch (HARDWARE_MOTOR_TYPE__MOTO_RDANCER,1-MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_RDANCER].directionthreadwize, 15, GPI_LS_RDANCER_UP, Adjust_Right_TFU_Tension_Callback,15000); Report("Adjust_Right_TFU_Tension",__FILE__,1-MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_RDANCER].directionthreadwize,HARDWARE_MOTOR_TYPE__MOTO_RDANCER,RpMessage,GPI_LS_RDANCER_UP,0); } @@ -901,9 +901,9 @@ uint32_t Adjust_Right_TFU_Tension(double tension) uint32_t ThreadPrepare_TensionCallback (int MotorId, double tension) { //MotorStop(MotorId,Hard_Hiz); + ReportWithPackageFilter(ThreadFilter,"ThreadPrepare_TensionCallback",__FILE__,__LINE__,MotorId,RpWarning,PrepareWaitCount,0); if (PrepareWaitCount) { - ReportWithPackageFilter(ThreadFilter,"ThreadPrepare_TensionCallback",__FILE__,__LINE__,MotorId,RpWarning,PrepareWaitCount,0); PrepareWaitCount--; } if ((PrepareWaitCount == 0)&&(PrepareState == true)) @@ -962,10 +962,20 @@ uint32_t ThreadPrepare_Tension (int DancerId, double tension) MotorMoveWithCallback (HW_Motor_Id, direction, (movement*MotorsCfg[HW_Motor_Id].microstep), ThreadPrepare_TensionCallback,20000); status |= MCU_E2PromProgram(address,request); } - usnprintf(Lenstr, 100, "ThreadPrepare_Tension Dancer %d Request: %d Current %d movement %d dir %d motor %d address %d", - DancerId,request,current,movement,direction,HW_Motor_Id,address); - ReportWithPackageFilter(ThreadFilter,Lenstr,__FILE__,address,current,RpWarning,request,0); + if (DancerId == HARDWARE_DANCER_TYPE__LeftDancer) + { + usnprintf(Lenstr, 100, "ThreadPrepare_Tension Dancer %d Request: %d Current %d movement %d dir %d motor %d address %d", + DancerId,request,current,movement,direction,HW_Motor_Id,address); + ReportWithPackageFilter(ThreadFilter,Lenstr,__FILE__,address,current,RpWarning,request,0); + + } + else + { + usnprintf(TMessage, 100, "ThreadPrepare_Tension Dancer %d Request: %d Current %d movement %d dir %d motor %d address %d", + DancerId,request,current,movement,direction,HW_Motor_Id,address); + ReportWithPackageFilter(ThreadFilter,TMessage,__FILE__,address,current,RpWarning,request,0); + } return status; } //******************************************************************************************************************** |
