mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-23 00:04:02 -04:00
GCS_MAVLink: fix flow control check
Thanks to Tridge for spotting is
This commit is contained in:
parent
227327c678
commit
559684b257
@ -408,9 +408,14 @@ bool GCS_MAVLINK::have_flow_control(void)
|
||||
|
||||
if (mavlink_comm_port[chan] == NULL) {
|
||||
return false;
|
||||
} else {
|
||||
// assume USB has flow control
|
||||
}
|
||||
|
||||
if (chan == MAVLINK_COMM_0) {
|
||||
// assume USB console has flow control
|
||||
return hal.gpio->usb_connected() || mavlink_comm_port[chan]->get_flow_control() != AP_HAL::UARTDriver::FLOW_CONTROL_DISABLE;
|
||||
} else {
|
||||
// all other channels
|
||||
return mavlink_comm_port[chan]->get_flow_control() != AP_HAL::UARTDriver::FLOW_CONTROL_DISABLE;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user