diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2018-06-18 12:31:20 +0300 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2018-06-18 12:31:20 +0300 |
| commit | 3640afb74b3e7b3e232f56a14104866690495c9a (patch) | |
| tree | 0a1a8d98bcd8bb076e5057b74529ac93f8717da1 /Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c | |
| parent | 51f5ba90ccdba8793a0ce600a8c42264d3770623 (diff) | |
| download | Tango-3640afb74b3e7b3e232f56a14104866690495c9a.tar.gz Tango-3640afb74b3e7b3e232f56a14104866690495c9a.zip | |
Motor Control Fixed, new winder works, CurrentJob holds the job request message
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c')
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c | 5 |
1 files changed, 3 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 e99d3df0b..3505ff3c6 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c @@ -111,7 +111,7 @@ uint32_t ScrewDirectionChange(uint32_t deviceID, uint32_t BusyFlag) if (BusyfirstCall) { BusyfirstCall = false; - return; + return OK; } //ScrewCurrentDirection: false moves out, true moves home if (BusyFlag == NOTBUSY) @@ -182,7 +182,8 @@ uint32_t Winder_End(void) { //stop screw ScrewNumberOfSteps = 0; - RemoveControlCallback(ScrewControlId,ScrewDirectionChange); + if (ScrewControlId != 0xFF) + RemoveControlCallback(ScrewControlId,ScrewDirectionChange); return MotorStop (HARDWARE_MOTOR_TYPE__MOTO_SCREW,Hard_Hiz); } void Winder_ScrewHomeLimitSwitchInterrupt(void) |
