aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/serialqueue.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2016-12-30 17:22:05 -0500
committerKevin O'Connor <kevin@koconnor.net>2016-12-30 20:15:05 -0500
commitc552ba06b4886d400e235267b23f86f44260bb92 (patch)
tree5ff0dc1ef600d891ff0212f9d934892f1dd5df06 /klippy/serialqueue.c
parent6bd5f4e44ec4898a6082c12df4ca7e4408a9df93 (diff)
downloadkutter-c552ba06b4886d400e235267b23f86f44260bb92.tar.gz
kutter-c552ba06b4886d400e235267b23f86f44260bb92.tar.xz
kutter-c552ba06b4886d400e235267b23f86f44260bb92.zip
serialqueue: Remove serialqueue_flush_ready()
The serialqueue_flush_ready() code was used to flush queue_step commands during a homing operation. It's no longer necessary now that moves during a homing operation use the normal message priority system. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/serialqueue.c')
-rw-r--r--klippy/serialqueue.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/klippy/serialqueue.c b/klippy/serialqueue.c
index 7e8e770b..6cdd9f77 100644
--- a/klippy/serialqueue.c
+++ b/klippy/serialqueue.c
@@ -356,7 +356,6 @@ struct serialqueue {
struct list_head pending_queues;
int ready_bytes, stalled_bytes;
uint64_t need_kick_clock;
- int can_delay_writes;
// Received messages
struct list_head receive_queue;
// Debugging
@@ -695,11 +694,9 @@ check_send_command(struct serialqueue *sq, double eventtime)
// Check for messages to send
if (sq->ready_bytes >= MESSAGE_PAYLOAD_MAX)
return PR_NOW;
- if (! sq->can_delay_writes) {
+ if (! sq->est_clock) {
if (sq->ready_bytes)
return PR_NOW;
- if (sq->est_clock)
- sq->can_delay_writes = 1;
sq->need_kick_clock = MAX_CLOCK;
return PR_NEVER;
}
@@ -986,16 +983,6 @@ serialqueue_set_clock_est(struct serialqueue *sq, double est_clock
pthread_mutex_unlock(&sq->lock);
}
-// Flush all messages in a "ready" state
-void
-serialqueue_flush_ready(struct serialqueue *sq)
-{
- pthread_mutex_lock(&sq->lock);
- sq->can_delay_writes = 0;
- pthread_mutex_unlock(&sq->lock);
- kick_bg_thread(sq);
-}
-
// Return a string buffer containing statistics for the serial port
void
serialqueue_get_stats(struct serialqueue *sq, char *buf, int len)