summaryrefslogtreecommitdiff
path: root/usb-i2c-sl018/stepper.c
diff options
context:
space:
mode:
Diffstat (limited to 'usb-i2c-sl018/stepper.c')
-rw-r--r--usb-i2c-sl018/stepper.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/usb-i2c-sl018/stepper.c b/usb-i2c-sl018/stepper.c
index 7501feb..d555889 100644
--- a/usb-i2c-sl018/stepper.c
+++ b/usb-i2c-sl018/stepper.c
@@ -77,8 +77,14 @@ inline uint8_t handle_step(void)
STEPPER_PORT = (STEPPER_PORT & STEPPER_OUTPUT_BITMASK ) | stepper_output;
step_cnt++;
- if(step_cnt >= STEP_CNT_OFF)
+ if(step_cnt >= STEP_CNT_OFF) {
+ if(step_direction == dir_open)
+ eventqueue_push(open_fin);
+ else
+ eventqueue_push(close_fin);
+
return 0;
+ }
return 1;
}