From 14810d7e80e6a691b9d28a21f6cb525ad9fe9855 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Wed, 13 Sep 2017 09:01:13 -0400 Subject: stepcompress: Return number of steps traveled from stepcompress_push() Return the same information from stepcompress_push() that is returned from stepcompress_push_const() and stpcompress_push_delta(). Signed-off-by: Kevin O'Connor --- klippy/stepcompress.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'klippy/stepcompress.c') diff --git a/klippy/stepcompress.c b/klippy/stepcompress.c index c3f010b2..9c815b3a 100644 --- a/klippy/stepcompress.c +++ b/klippy/stepcompress.c @@ -488,7 +488,7 @@ static inline double safe_sqrt(double v) { } // Schedule a step event at the specified step_clock time -int +int32_t stepcompress_push(struct stepcompress *sc, double step_clock, int32_t sdir) { int ret = set_next_step_dir(sc, !!sdir); @@ -499,7 +499,7 @@ stepcompress_push(struct stepcompress *sc, double step_clock, int32_t sdir) if (ret) return ret; queue_append_finish(qa); - return 0; + return sdir ? 1 : -1; } // Schedule 'steps' number of steps at constant acceleration. If -- cgit v1.2.3-70-g09d2