input_shaper: Correctly initialize input shaper stepper_kinematics

If the stepper already executed some steps with the basic
stepper_kinematics, subsequent creation of a new one for input_shaper
would result in stepcompress errors unless position and time tracking
flags are also copied over.

Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
This commit is contained in:
Dmitry Butyugin 2023-04-19 22:57:39 +02:00 committed by KevinOConnor
parent e15bad4844
commit a3c00d0bed
1 changed files with 3 additions and 0 deletions

View File

@ -171,6 +171,9 @@ input_shaper_set_sk(struct stepper_kinematics *sk
return -1; return -1;
is->sk.active_flags = orig_sk->active_flags; is->sk.active_flags = orig_sk->active_flags;
is->orig_sk = orig_sk; is->orig_sk = orig_sk;
is->sk.commanded_pos = orig_sk->commanded_pos;
is->sk.last_flush_time = orig_sk->last_flush_time;
is->sk.last_move_time = orig_sk->last_move_time;
return 0; return 0;
} }