mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-18 20:28:10 -06:00
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>
This commit is contained in:
parent
6bd5f4e44e
commit
c552ba06b4
4 changed files with 1 additions and 18 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue