mirror of
git://soft.sys114.com/klipper
synced 2026-02-11 06:10:27 +09:00
extruder: Add support for reversing the direction of extruder stepper movement
Extend SET_EXTRUDER_ROTATION_DISTANCE to support reversing the direction of extruder movement. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
@@ -259,15 +259,25 @@ stepcompress_alloc(uint32_t oid)
|
||||
// Fill message id information
|
||||
void __visible
|
||||
stepcompress_fill(struct stepcompress *sc, uint32_t max_error
|
||||
, uint32_t invert_sdir, int32_t queue_step_msgtag
|
||||
, int32_t set_next_step_dir_msgtag)
|
||||
, int32_t queue_step_msgtag, int32_t set_next_step_dir_msgtag)
|
||||
{
|
||||
sc->max_error = max_error;
|
||||
sc->invert_sdir = !!invert_sdir;
|
||||
sc->queue_step_msgtag = queue_step_msgtag;
|
||||
sc->set_next_step_dir_msgtag = set_next_step_dir_msgtag;
|
||||
}
|
||||
|
||||
// Set the inverted stepper direction flag
|
||||
void __visible
|
||||
stepcompress_set_invert_sdir(struct stepcompress *sc, uint32_t invert_sdir)
|
||||
{
|
||||
invert_sdir = !!invert_sdir;
|
||||
if (invert_sdir != sc->invert_sdir) {
|
||||
sc->invert_sdir = invert_sdir;
|
||||
if (sc->sdir >= 0)
|
||||
sc->sdir ^= 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Helper to free items from the history_list
|
||||
static void
|
||||
free_history(struct stepcompress *sc, uint64_t end_clock)
|
||||
|
||||
Reference in New Issue
Block a user