mirror of
https://github.com/markqvist/RNode_Firmware.git
synced 2025-11-24 00:43:08 -05:00
Fixed packet buffer FIFO state mismatch on high-bitrate queue processing if raw underlying byte buffer was full
This commit is contained in:
parent
5e98407ee2
commit
8382d4a08d
1 changed files with 5 additions and 6 deletions
|
|
@ -575,7 +575,7 @@ volatile bool queue_flushing = false;
|
|||
void flush_queue(void) {
|
||||
if (!queue_flushing) {
|
||||
queue_flushing = true;
|
||||
led_tx_on(); uint16_t processed = 0;
|
||||
led_tx_on();
|
||||
|
||||
#if MCU_VARIANT == MCU_ESP32 || MCU_VARIANT == MCU_NRF52
|
||||
while (!fifo16_isempty(&packet_starts)) {
|
||||
|
|
@ -592,7 +592,7 @@ void flush_queue(void) {
|
|||
tbuf[i] = packet_queue[pos];
|
||||
}
|
||||
|
||||
transmit(length); processed++;
|
||||
transmit(length);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -615,8 +615,7 @@ void flush_queue(void) {
|
|||
|
||||
void pop_queue() {
|
||||
if (!queue_flushing) {
|
||||
queue_flushing = true;
|
||||
led_tx_on(); uint16_t processed = 0;
|
||||
queue_flushing = true; led_tx_on();
|
||||
|
||||
#if MCU_VARIANT == MCU_ESP32 || MCU_VARIANT == MCU_NRF52
|
||||
if (!fifo16_isempty(&packet_starts)) {
|
||||
|
|
@ -632,9 +631,9 @@ void pop_queue() {
|
|||
tbuf[i] = packet_queue[pos];
|
||||
}
|
||||
|
||||
transmit(length); processed++;
|
||||
transmit(length);
|
||||
}
|
||||
queue_height -= processed;
|
||||
queue_height -= 1;
|
||||
queued_bytes -= length;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue