diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2018-07-11 18:31:23 +0000 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2018-07-11 18:31:23 +0000 |
| commit | e9665e376174a23c361cebb57fa94da67c4e9ec0 (patch) | |
| tree | 1006a18250b658f90394904e88a34ef38e33eea0 /Software/Embedded_SW/Embedded/Modules/Thread | |
| parent | b09df90c46d7b6411b253e09678bc4282b56f5eb (diff) | |
| download | Tango-e9665e376174a23c361cebb57fa94da67c4e9ec0.tar.gz Tango-e9665e376174a23c361cebb57fa94da67c4e9ec0.zip | |
Updated Thread_Winder.c - preparation for cone
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Thread')
| -rw-r--r-- | Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c index a119b0b16..c651c57a6 100644 --- a/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c +++ b/Software/Embedded_SW/Embedded/Modules/Thread/Thread_Winder.c @@ -1,7 +1,7 @@ /* * Thread_Winder.c * - * Created on: 25 áîøõ 2018 + * Created on: 25 áîøõ 2018 * Author: shlomo */ #include"include.h" @@ -108,6 +108,18 @@ uint32_t ScrewNumberOfSteps = 0; uint32_t DirectionChangeCounter = 0; */ +Calculate the number of steps. +Initial home position = ... +Initial out movement = ScrewNumberOfSteps +if DirectionChangeCounter %= external cone : reduce one from the ScrewNumberOfSteps +if DirectionChangeCounter %= internal cone && direction was out: ADD one to the ScrewNumberOfSteps, (raise a flag???) +// WRONG? if the flag is raised - lower it and reduce one from the ScrewNumberOfSteps +30:100 - 70 +30:99 - 69 +30:98 - 68 +29:98 - 69 +29:97 -68 +*/ uint32_t ScrewDirectionChange(uint32_t deviceID, uint32_t BusyFlag) { if (BusyfirstCall) @@ -197,6 +209,7 @@ uint32_t Winder_End(void) void Winder_ScrewHomeLimitSwitchInterrupt(void) { 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 @@ -205,6 +218,7 @@ void Winder_ScrewHomeLimitSwitchInterrupt(void) } 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 } |
