diff options
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c')
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c index 9474ee44d..eacdd2ed9 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c @@ -53,7 +53,12 @@ uint32_t Winder_PrepareStage2(void) return status; } -uint32_t Winder_Print(void *JobDetails) + +uint32_t WinderPresegmentReady(uint32_t deviceID, uint32_t ReadValue) +{ + return PreSegmentReady(Module_Winder,OK); +} +uint32_t Winder_Presegment(void *JobDetails) { JobTicket* JobTicket = JobDetails; int process_speed = JobTicket->processparameters->dyeingspeed; @@ -87,6 +92,7 @@ uint32_t Winder_Print(void *JobDetails) // * 5. register motor nBusy callback. this callback will flip between move(traverse length, hardstop) and goto(0), with handline og the coneshape and adjusting maxspeed //MotorMove (InternalWinderCfg.segmentoffsetpulses,screw_speed); process: set point 0, set max speed, move to the specified length, return back. + MotorSetSpeedWithCallback (MOTOR_SCREW, screw_speed, MotorsCfg[SCREW_MOTOR].minmicrostep,WinderPresegmentReady); //in a callback: calculate backing rate for top and bottom, update point 0, update passing length, call the appropriate move to 0 / move; return OK; @@ -94,7 +100,7 @@ uint32_t Winder_Print(void *JobDetails) uint32_t Winder_End(void) { //stop screw - StopMotor (MOTOR_SCREW,1); + return StopMotor (MOTOR_SCREW,1); } void Winder_ScrewHomeLimitSwitchInterrupt(void) { |
