mirror of
https://github.com/Klipper3d/klipper.git
synced 2026-02-08 01:01:06 -07:00
stepcompress: don't increase max error
On every cycle last step happens at the time or before. New max_error is equal to or larger than before. Simplify logic by avoiding re-computing it. It have insegnificant impact on the compressed output. Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
This commit is contained in:
parent
86da9c846d
commit
3f728d5505
1 changed files with 0 additions and 7 deletions
|
|
@ -383,12 +383,6 @@ step_init_max_error(struct stepcompress *sc, struct qstep *pos)
|
|||
pos->max_error = max_error;
|
||||
}
|
||||
|
||||
static void
|
||||
step_update_max_error(struct stepcompress *sc, struct qstep *pos)
|
||||
{
|
||||
step_init_max_error(sc, pos);
|
||||
}
|
||||
|
||||
// Convert previously scheduled steps into commands for the mcu
|
||||
static int
|
||||
queue_flush(struct stepcompress *sc, uint64_t move_clock)
|
||||
|
|
@ -396,7 +390,6 @@ queue_flush(struct stepcompress *sc, uint64_t move_clock)
|
|||
if (sc->queue_pos >= sc->queue_next)
|
||||
return 0;
|
||||
while (sc->last_step_clock < move_clock) {
|
||||
step_update_max_error(sc, sc->queue_pos);
|
||||
struct step_move move = compress_bisect_add(sc);
|
||||
int ret = check_line(sc, move);
|
||||
if (ret)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue