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
|
@ -66,7 +66,6 @@ defs_serialqueue = """
|
|||
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);
|
||||
void serialqueue_get_stats(struct serialqueue *sq, char *buf, int len);
|
||||
int serialqueue_extract_old(struct serialqueue *sq, int sentq
|
||||
, struct pull_queue_message *q, int max);
|
||||
|
|
|
@ -167,8 +167,6 @@ class SerialReader:
|
|||
def send_with_response(self, cmd, name):
|
||||
src = SerialRetryCommand(self, cmd, name)
|
||||
return src.get_response()
|
||||
def send_flush(self):
|
||||
self.ffi_lib.serialqueue_flush_ready(self.serialqueue)
|
||||
def alloc_command_queue(self):
|
||||
return self.ffi_main.gc(self.ffi_lib.serialqueue_alloc_commandqueue(),
|
||||
self.ffi_lib.serialqueue_free_commandqueue)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -61,7 +61,6 @@ 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);
|
||||
void serialqueue_get_stats(struct serialqueue *sq, char *buf, int len);
|
||||
int serialqueue_extract_old(struct serialqueue *sq, int sentq
|
||||
, struct pull_queue_message *q, int max);
|
||||
|
|
Loading…
Reference in New Issue