From e96d9f083aa58b24d2e64cbbec47e638d0ce84a0 Mon Sep 17 00:00:00 2001 From: Shlomo Hecht Date: Wed, 18 Jul 2018 08:01:12 +0300 Subject: global progress counter, some minor corrections --- Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c | 12 ++++++------ Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'Software/Embedded_SW/Embedded/Modules/Thread') diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c index a8ca46574..0ec10a072 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c @@ -183,7 +183,7 @@ uint32_t CalculateNumberOfSteps (uint32_t Counter, bool direction) } } - return CalculateNumberOfSteps; + return NumberOfSteps; } uint32_t ScrewDirectionChange(uint32_t deviceID, uint32_t BusyFlag) @@ -225,7 +225,7 @@ uint32_t WinderPresegmentReady(uint32_t deviceID, uint32_t ReadValue) uint32_t Winder_Presegment(void *JobDetails, uint32_t SegmentId) { - JobTicket* JobTicket = JobDetails; + //JobTicket* JobTicket = JobDetails; float screw_speed = 0; float RotationsPerSecond; @@ -280,18 +280,18 @@ uint32_t Winder_End(void) } void Winder_ScrewHomeLimitSwitchInterrupt(void) { - uint32_t status; + //uint32_t status; //handle glitch - send information to the next time that the motor stops if (Winder_ScrewHoming) { MotorStop(HARDWARE_MOTOR_TYPE__MOTO_SCREW,Hard_Hiz); //stop ASAP } - status = MotorSetDirection(HARDWARE_MOTOR_TYPE__MOTO_SCREW,MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_SCREW].directionthreadwize);//make sure to move the cart out + MotorSetDirection(HARDWARE_MOTOR_TYPE__MOTO_SCREW,MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_SCREW].directionthreadwize);//make sure to move the cart out } void Winder_ScrewOutLimitSwitchInterrupt(void) { //handle glitch - send information to the next time that the motor stops - uint32_t status; - status = MotorSetDirection(HARDWARE_MOTOR_TYPE__MOTO_SCREW,1-MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_SCREW].directionthreadwize);//make sure to move the cart out + //uint32_t status; + MotorSetDirection(HARDWARE_MOTOR_TYPE__MOTO_SCREW,1-MotorsCfg[HARDWARE_MOTOR_TYPE__MOTO_SCREW].directionthreadwize);//make sure to move the cart out } diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h index 56e88204f..df88da8c8 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_ex.h @@ -11,6 +11,7 @@ #define FEEDER_DANCER HARDWARE_DANCER_TYPE__RightDancer #define NUM_OF_DANCERS HARDWARE_DANCER_TYPE__RightDancer+1 //} DANCER_ENUM; +extern double TotalProcessedLength; uint32_t InternalWindingConfigMessage(JobSpool* request); -- cgit v1.3.1