From 777a0b817bc01425d562e42354bf09463a1d7852 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Mon, 11 Jul 2016 11:41:49 -0400 Subject: serialhdl: Calculate baudadjust from MCU's baud instead of host baud Store the baud rate the MCU is configured for in the "identify" data and use that rate when calculating the baudadjust parameter. Signed-off-by: Kevin O'Connor --- klippy/serialqueue.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'klippy/serialqueue.h') diff --git a/klippy/serialqueue.h b/klippy/serialqueue.h index 229fb216..80ecd9c5 100644 --- a/klippy/serialqueue.h +++ b/klippy/serialqueue.h @@ -43,8 +43,7 @@ struct pull_queue_message { }; struct serialqueue; -struct serialqueue *serialqueue_alloc(int serial_fd, double baud_adjust - , int write_only); +struct serialqueue *serialqueue_alloc(int serial_fd, int write_only); void serialqueue_exit(struct serialqueue *sq); struct command_queue *serialqueue_alloc_commandqueue(void); void serialqueue_send_batch(struct serialqueue *sq, struct command_queue *cq @@ -56,6 +55,7 @@ void serialqueue_encode_and_send(struct serialqueue *sq, struct command_queue *c , uint32_t *data, int len , uint64_t min_clock, uint64_t req_clock); void serialqueue_pull(struct serialqueue *sq, struct pull_queue_message *pqm); +void serialqueue_set_baud_adjust(struct serialqueue *sq, double baud_adjust); void serialqueue_set_clock_est(struct serialqueue *sq, double est_clock , double last_ack_time, uint64_t last_ack_clock); void serialqueue_flush_ready(struct serialqueue *sq); -- cgit v1.2.3-70-g09d2