diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2023-10-13 20:43:27 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2023-11-16 22:07:15 -0500 |
commit | 48a05eaa542bfd4a1099c2224bda443049a6fa64 (patch) | |
tree | acda1bae545fdf49e6b4ca8dd3f3b7b857143df8 /klippy/chelper/stepcompress.c | |
parent | 4688c21c54dfb89ef9902b607521a8cc0e99c94a (diff) | |
download | kutter-48a05eaa542bfd4a1099c2224bda443049a6fa64.tar.gz kutter-48a05eaa542bfd4a1099c2224bda443049a6fa64.tar.xz kutter-48a05eaa542bfd4a1099c2224bda443049a6fa64.zip |
stepcompress: Add support for queuing messages that consume move queue space
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/chelper/stepcompress.c')
-rw-r--r-- | klippy/chelper/stepcompress.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/klippy/chelper/stepcompress.c b/klippy/chelper/stepcompress.c index e261f1d3..e5514b95 100644 --- a/klippy/chelper/stepcompress.c +++ b/klippy/chelper/stepcompress.c @@ -623,6 +623,21 @@ stepcompress_queue_msg(struct stepcompress *sc, uint32_t *data, int len) return 0; } +// Queue an mcu command that will consume space in the mcu move queue +int __visible +stepcompress_queue_mq_msg(struct stepcompress *sc, uint64_t req_clock + , uint32_t *data, int len) +{ + int ret = stepcompress_flush(sc, UINT64_MAX); + if (ret) + return ret; + + struct queue_message *qm = message_alloc_and_encode(data, len); + qm->min_clock = qm->req_clock = req_clock; + list_add_tail(&qm->node, &sc->msg_queue); + return 0; +} + // Return history of queue_step commands int __visible stepcompress_extract_old(struct stepcompress *sc, struct pull_history_steps *p |