aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2018-04-04 23:28:09 +0300
committerShlomo Hecht <shlomo@twine-s.com>2018-04-04 23:28:09 +0300
commit692d71abcd583ade2977d4b6012b9c2a6de7d4d8 (patch)
tree8f7788759361f8ad14d8f5609983ab3495248e4f /Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c
parentbb14319440cd873b1ad7713a66c4a2369dffb8e7 (diff)
downloadTango-692d71abcd583ade2977d4b6012b9c2a6de7d4d8.tar.gz
Tango-692d71abcd583ade2977d4b6012b9c2a6de7d4d8.zip
1. Idle task - test real time usage
2. improve and fix heaters test 3. motor/dancer test preparations
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c10
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)
{