mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-09 09:28:31 -04:00
HAL_PX4: don't check USB for data if not connected
This commit is contained in:
parent
8dc6b758f3
commit
24d1cf3bd6
@ -418,6 +418,11 @@ void PX4UARTDriver::_timer_tick(void)
|
||||
|
||||
if (!_initialised) return;
|
||||
|
||||
// don't try IO on a disconnected USB port
|
||||
if (strcmp(_devpath, "/dev/ttyACM0") == 0 && !hal.gpio->usb_connected()) {
|
||||
return;
|
||||
}
|
||||
|
||||
_in_timer = true;
|
||||
|
||||
// write any pending bytes
|
||||
|
Loading…
Reference in New Issue
Block a user