From 53b5ef734132b543838e1663fe96d70457d8a62b Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Sun, 18 Nov 2018 08:16:57 +0200 Subject: my pc changes. HardwareBlower with a heating voltage --- Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.new | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.new') 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. // -- cgit v1.3.1