AP_EFI: prevent flood of Lutan serial port

send request at max 5Hz
This commit is contained in:
Andrew Tridgell 2022-07-17 12:56:38 +10:00
parent 54280c2ae0
commit 4585c9fdc1
1 changed files with 1 additions and 1 deletions

View File

@ -91,7 +91,7 @@ void AP_EFI_Serial_Lutan::update()
pkt_nbytes = 0;
}
}
if (n == 0 || now - last_request_ms > 200) {
if (now - last_request_ms > 200) {
last_request_ms = now;
port->discard_input();
send_request();