Browse Source

AP_EFI: prevent flood of Lutan serial port

send request at max 5Hz
release-4.2.3
Andrew Tridgell 3 years ago committed by Randy Mackay
parent
commit
5b7a6a7f6a
  1. 2
      libraries/AP_EFI/AP_EFI_Serial_Lutan.cpp

2
libraries/AP_EFI/AP_EFI_Serial_Lutan.cpp

@ -88,7 +88,7 @@ void AP_EFI_Serial_Lutan::update() @@ -88,7 +88,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();

Loading…
Cancel
Save