From d1972b1e9ccc1331d2a2e5d3af108abf8a2858e2 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Mon, 13 Jan 2020 21:30:32 -0500 Subject: itersolve: Add ability to query the active_flags state Signed-off-by: Kevin O'Connor --- klippy/chelper/itersolve.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'klippy/chelper/itersolve.c') diff --git a/klippy/chelper/itersolve.c b/klippy/chelper/itersolve.c index 1f30bcae..0b7c4b04 100644 --- a/klippy/chelper/itersolve.c +++ b/klippy/chelper/itersolve.c @@ -212,6 +212,15 @@ itersolve_check_active(struct stepper_kinematics *sk, double flush_time) } } +// Report if the given stepper is registered for the given axis +int32_t __visible +itersolve_is_active_axis(struct stepper_kinematics *sk, char axis) +{ + if (axis < 'x' || axis > 'z') + return 0; + return (sk->active_flags & (AF_X << (axis - 'x'))) != 0; +} + void __visible itersolve_set_trapq(struct stepper_kinematics *sk, struct trapq *tq) { -- cgit v1.2.3-70-g09d2