aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/Thread
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-11-18 14:34:52 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-11-18 14:34:52 +0200
commit6763ba35500bf9e6827c9a74c39f0e0e3f839e77 (patch)
tree7d034f0e1710b6eee444a64e6278785ada8a7348 /Software/Embedded_SW/Embedded/Modules/Thread
parent8a01668048f2a261dd0ede2cc63db6862c6217b8 (diff)
parent758fc8bd4b0f8e547600d6cc6a7cc47b955c849c (diff)
downloadTango-6763ba35500bf9e6827c9a74c39f0e0e3f839e77.tar.gz
Tango-6763ba35500bf9e6827c9a74c39f0e0e3f839e77.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.new10
1 files changed, 5 insertions, 5 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.new b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.new
index 537d27775..e21114603 100644
--- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.new
+++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.new
@@ -177,7 +177,7 @@ uint32_t CalculateNumberOfSteps (uint32_t Counter, bool direction)
float screw_horizontal_speed = 0;
float RotationsPerSecond;
- if (Counter%InternalWinderCfg.spoolbackingrate == 1)
+ if (Counter%InternalWinderCfg.spoolbackingrate == 0)
{
NumberOfSteps -= (Counter/InternalWinderCfg.spoolbackingrate);
REPORT_MSG(ScrewNumberOfSteps, "Head Backing ScrewNumberOfSteps");
@@ -189,14 +189,14 @@ uint32_t CalculateNumberOfSteps (uint32_t Counter, bool direction)
ScrewSpeed = screw_horizontal_speed*RotationsPerSecond;
//MotorSetMaxSpeed (HARDWARE_MOTOR_TYPE__MOTO_SCREW,ScrewSpeed);
- REPORT_MSG(ScrewSpeed, "CalculateNumberOfSteps ScrewSpeed");
- REPORT_MSG(CurrentControlledSpeed[WINDER_MOTOR], "CalculateNumberOfSteps Winder speed");
+ //REPORT_MSG(ScrewSpeed, "CalculateNumberOfSteps ScrewSpeed");
+ //REPORT_MSG(CurrentControlledSpeed[WINDER_MOTOR], "CalculateNumberOfSteps Winder speed");
CurrentControlledSpeed[SCREW_MOTOR] = ScrewSpeed;
}
if ((Counter%InternalWinderCfg.SpoolBottomBackingRate == 0)||(Counter%InternalWinderCfg.SpoolBottomBackingRate == 1))
{
- if (direction != MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_SCREW].directionthreadwize)
+ if (direction == MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_SCREW].directionthreadwize)//because the direction is already reversed at the interrupt
{
NumberOfSteps += (Counter/InternalWinderCfg.SpoolBottomBackingRate);
ScrewNumberOfSteps++;
@@ -391,7 +391,7 @@ void ScrewTimerInterrupt(int ARG0)
{
TimerDisable(Screw_timerBase, TIMER_A);
}
- Report("ScrewTimerInterrupt duration, speed", __FILE__,__LINE__,ScrewRunningTime, RpMessage, ScrewSpeed, 0);
+ //Report("ScrewTimerInterrupt duration, speed", __FILE__,__LINE__,ScrewRunningTime, RpMessage, ScrewSpeed, 0);
//
// Enable all interrupts.
//