SerialManager: set_console_baud uses first matching protocol

This ensures we set the baud to the first serial port with the specified
protocol instead of the last.
This commit is contained in:
Randy Mackay 2015-01-28 12:38:30 +09:00 committed by Andrew Tridgell
parent ff2a31e3ae
commit 0a195671b3

View File

@ -230,6 +230,7 @@ void AP_SerialManager::set_console_baud(enum SerialProtocol protocol) const
if (state[i].protocol == protocol) {
// set console's baud rate
state[0].uart->begin(map_baudrate(state[i].baud));
return;
}
}
}