Skip to content

Commit

Permalink
manual_stepper: Add basic status. (#6527)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
viesturz authored Apr 4, 2024
1 parent 6f16e11 commit b029d04
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/Status_Reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,13 @@ understands it).
- `z_position_lower`: Last probe attempt just lower than the current height.
- `z_position_upper`: Last probe attempt just greater than the current height.

## manual_stepper

The following information is available in the
`manual_stepper` object:
- `enabled`: Returns True if the stepper is currently enabled.
- `position`: The requested position.

## mcu

The following information is available in
Expand Down
5 changes: 5 additions & 0 deletions klippy/extras/manual_stepper.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ def cmd_MANUAL_STEPPER(self, gcmd):
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()
Expand Down

0 comments on commit b029d04

Please sign in to comment.