diff --git a/v5_field_control.ino b/v5_field_control.ino index 4b564bb..32d2662 100644 --- a/v5_field_control.ino +++ b/v5_field_control.ino @@ -245,9 +245,13 @@ void parse_poll(uint8_t* pkt, size_t len) { } void on_rx(void) { - uint8_t pkt[4]; + uint8_t pkt[12]; int n = Serial.available(); - if (n < 4) { + if (n != 12) { + Serial.printf("Wrong number of bytes on serial port %d/12\n", n); + for (int i = 0; i < n; i++) { + Serial.read(); + } return; } int read = Serial.readBytes(pkt, n);