manual_stepper: Add basic status. (#6527)

Adding position and enabled in manual_stepper status. Enabled is already available through stepper_enable object. But this makes it more straightforward to access it.

Signed-off-by: Viesturs Zarins <viesturz@gmail.com>
This commit is contained in:
Viesturs Zariņš 2024-04-04 22:46:30 +02:00 committed by GitHub
parent 6f16e11197
commit b029d04668
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 0 deletions

View file

@ -104,6 +104,11 @@ class ManualStepper:
self.do_move(movepos, speed, accel, sync)
elif gcmd.get_int('SYNC', 0):
self.sync_print_time()
def get_status(self, eventtime):
return {'position': self.rail.get_commanded_position(),
'enabled': self.steppers[0].is_motor_enabled()}
# Toolhead wrappers to support homing
def flush_step_generation(self):
self.sync_print_time()