diff --git a/klippy/chelper/__init__.py b/klippy/chelper/__init__.py index 1c1f73b99..c26196e66 100644 --- a/klippy/chelper/__init__.py +++ b/klippy/chelper/__init__.py @@ -46,8 +46,6 @@ defs_stepcompress = """ , uint64_t clock, int64_t last_position); int64_t stepcompress_find_past_position(struct stepcompress *sc , uint64_t clock); - int stepcompress_queue_msg(struct stepcompress *sc - , uint32_t *data, int len); int stepcompress_extract_old(struct stepcompress *sc , struct pull_history_steps *p, int max , uint64_t start_clock, uint64_t end_clock); diff --git a/klippy/chelper/stepcompress.c b/klippy/chelper/stepcompress.c index 0f2c4ef74..141c8ac35 100644 --- a/klippy/chelper/stepcompress.c +++ b/klippy/chelper/stepcompress.c @@ -603,20 +603,6 @@ stepcompress_find_past_position(struct stepcompress *sc, uint64_t clock) return last_position; } -// Queue an mcu command to go out in order with stepper commands -int __visible -stepcompress_queue_msg(struct stepcompress *sc, 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->req_clock = sc->last_step_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 diff --git a/klippy/chelper/stepcompress.h b/klippy/chelper/stepcompress.h index 91d1bc11d..affc1e23c 100644 --- a/klippy/chelper/stepcompress.h +++ b/klippy/chelper/stepcompress.h @@ -33,7 +33,6 @@ int stepcompress_set_last_position(struct stepcompress *sc, uint64_t clock , int64_t last_position); int64_t stepcompress_find_past_position(struct stepcompress *sc , uint64_t clock); -int stepcompress_queue_msg(struct stepcompress *sc, uint32_t *data, int len); int stepcompress_extract_old(struct stepcompress *sc , struct pull_history_steps *p, int max , uint64_t start_clock, uint64_t end_clock); diff --git a/klippy/stepper.py b/klippy/stepper.py index 3bcca565c..248e487d2 100644 --- a/klippy/stepper.py +++ b/klippy/stepper.py @@ -205,9 +205,7 @@ class MCU_stepper: if ret: raise error("Internal error in stepcompress") data = (self._reset_cmd_tag, self._oid, 0) - ret = ffi_lib.stepcompress_queue_msg(self._stepqueue, data, len(data)) - if ret: - raise error("Internal error in stepcompress") + ffi_lib.syncemitter_queue_msg(self._syncemitter, 0, data, len(data)) self._query_mcu_position() def _query_mcu_position(self): if self._mcu.is_fileoutput():