diff options
| author | Avi Levkovich <avi@twine-s.com> | 2018-10-25 11:18:32 +0300 |
|---|---|---|
| committer | Avi Levkovich <avi@twine-s.com> | 2018-10-25 11:18:32 +0300 |
| commit | 807b2e157d8bb6eda058c92b826917bc86a357e3 (patch) | |
| tree | db5ab90d449c6cdb87a1460c450278f866a058c5 /Software/Embedded_SW/Embedded/Modules/Thread | |
| parent | 29bc999fe00052fa47b5b07a0de4901febc4f8d2 (diff) | |
| parent | 3aa08870dc50c19cfaa619d26f7c37610d950457 (diff) | |
| download | Tango-807b2e157d8bb6eda058c92b826917bc86a357e3.tar.gz Tango-807b2e157d8bb6eda058c92b826917bc86a357e3.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/_git/Tango
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Thread')
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c | 8 | ||||
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c | 10 |
2 files changed, 5 insertions, 13 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c index effa8b2c7..b00e2fca4 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c @@ -263,13 +263,6 @@ uint32_t ScrewDirectionChange(uint32_t deviceID, uint32_t BusyFlag) MotorMove (HARDWARE_MOTOR_TYPE__MOTO_SCREW,ScrewCurrentDirection,Steps); //process: set point 0, set max speed, move to the specified length, return back. REPORT_MSG(ScrewCurrentDirection, "ScrewDirectionChange"); } -/* - * calculate new ScrewSpeed and call MotorSetMaxSpeed (HARDWARE_MOTOR_TYPE__MOTO_SCREW,ScrewSpeed); - * - */ - /* - * calculate cone shape according to DirectionChangeCounter and update ScrewNumberOfSteps - */ return OK; } @@ -342,7 +335,6 @@ uint32_t Winder_End(void) RemoveControlCallback(ScrewControlId,ScrewDirectionChange); CurrentControlledSpeed[SCREW_MOTOR] = 0; pend = MillisecFlushMsgQ(HARDWARE_MOTOR_TYPE__MOTO_SCREW); - //Screw_Interrupt(false,NULL); return MotorStop (HARDWARE_MOTOR_TYPE__MOTO_SCREW,Hard_Hiz); } void Winder_ScrewHomeLimitSwitchInterrupt(void) diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c index ec2ba407a..6c58e1645 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_print.c @@ -201,7 +201,7 @@ uint32_t ThreadLengthCBFunction(uint32_t IfIndex, uint32_t ReadValue) } } - if (CurrentProcessedLength>=CurrentRequestedLength ) + if ((CurrentProcessedLength>=CurrentRequestedLength )&&(CurrentRequestedLength > 0.0)) { usnprintf(Lenstr, 100, "Total processed length: Feeder: %d Pooler %d",(int)TotalProcessedLength,(int)PoolerTotalProcessedLength); SendJobProgress(0.0,0,false, Lenstr); @@ -467,17 +467,17 @@ uint32_t ThreadControlCBFunction(uint32_t IfIndex, uint32_t ReadValue) calculated_speed = (1-MotorControlConfig[index].m_calculatedError)*OriginalMotorSpd_2PPS[index]; if (abs(calculated_speed-CurrentControlledSpeed[index])>2) { - /*if (keepdata == true) + if (keepdata == true) { - calculatedError[controlIndex] = MotorControlConfig[index].m_calculatedError; + /* calculatedError[controlIndex] = MotorControlConfig[index].m_calculatedError; MotorId[controlIndex] = index; readValue[controlIndex] = ReadValue; AveragereadValue[controlIndex] = avreageSampleValue; calculatedspeed[controlIndex] = calculated_speed; timestamp[controlIndex] = HibernateRTCSSGet(); if (controlIndex++>=999) - controlIndex = 0; - }*/ + controlIndex = 0;*/ + } CurrentControlledSpeed[index] = calculated_speed; MotorSetSpeed(ThreadMotorIdToMotorId[index], calculated_speed); } |
