wip test don't skip blocking just because of suppression

This commit is contained in:
2025-11-18 14:19:50 -05:00
parent f75d3be98d
commit a00edb718b

View File

@@ -32,6 +32,7 @@ void UARTMITM::loop() {
ESP_LOGD(TAG, "RX1: %s", hexString.c_str());
rx1_buffer_idx = 0;
}
rx1_block_until = millis() + RX_BLOCK_INTERVAL;
if (rx1_suppress_until < millis()) {
rx1_buffer[rx1_buffer_idx++] = c;
@@ -39,7 +40,6 @@ void UARTMITM::loop() {
ESP_LOGW(TAG, "RX1: Somehow ran out of buf space.");
rx1_buffer_idx = 0;
}
rx1_block_until = millis() + RX_BLOCK_INTERVAL;
this->uart2_->write_byte(c);
rx2_suppress_until = millis() + RX_SUPPRESS_INTERVAL;
@@ -54,13 +54,14 @@ void UARTMITM::loop() {
rx2_buffer_idx = 0;
}
rx2_block_until = millis() + RX_BLOCK_INTERVAL;
if (rx2_suppress_until < millis()) {
rx2_buffer[rx2_buffer_idx++] = c;
if (rx2_buffer_idx == RX_BUF_LEN) {
ESP_LOGW(TAG, "RX2: Somehow ran out of buf space.");
rx2_buffer_idx = 0;
}
rx2_block_until = millis() + RX_BLOCK_INTERVAL;
this->uart1_->write_byte(c);
rx1_suppress_until = millis() + RX_SUPPRESS_INTERVAL;