diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2018-05-28 09:42:59 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2018-05-28 11:12:30 -0400 |
commit | d798fae20b1cd87396ea884de737aa7f3e359193 (patch) | |
tree | 607759d9360d7d2e69cf638913f72155586a0d47 /klippy/chelper/__init__.py | |
parent | 0728c1a8be5f76d62fae79a9adcc998081049f9e (diff) | |
download | kutter-d798fae20b1cd87396ea884de737aa7f3e359193.tar.gz kutter-d798fae20b1cd87396ea884de737aa7f3e359193.tar.xz kutter-d798fae20b1cd87396ea884de737aa7f3e359193.zip |
serialqueue: Limit message transmission to available receive buffer size
If the mcu is using a traditional serial port, then only send a new
message block if there is space available in the mcu receive buffer.
This should make it significantly less likely that high load on the
mcu will result in retransmits.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/chelper/__init__.py')
-rw-r--r-- | klippy/chelper/__init__.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/klippy/chelper/__init__.py b/klippy/chelper/__init__.py index cbd0cb88..f7ba372c 100644 --- a/klippy/chelper/__init__.py +++ b/klippy/chelper/__init__.py @@ -59,8 +59,11 @@ defs_serialqueue = """ void serialqueue_encode_and_send(struct serialqueue *sq , struct command_queue *cq, 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_pull(struct serialqueue *sq + , struct pull_queue_message *pqm); void serialqueue_set_baud_adjust(struct serialqueue *sq, double baud_adjust); + void serialqueue_set_receive_window(struct serialqueue *sq + , int receive_window); void serialqueue_set_clock_est(struct serialqueue *sq, double est_freq , double last_clock_time, uint64_t last_clock); void serialqueue_get_stats(struct serialqueue *sq, char *buf, int len); |