1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-29 14:52:12 +01:00

gcs serial: fix broken baud rate selection

The difference between 56000 and 57600 baud is very
important.

When using a USB to serial adapter that is capable
of synthesizing arbitrary baud rates, these errors
resulted in a completely mismatched/unusable serial
link.
This commit is contained in:
Stacey Sheldon 2011-12-30 13:00:37 -05:00
parent 2cf1fe93c6
commit fa9702db97

View File

@ -209,9 +209,9 @@ BaudRateType SerialConnection::stringToBaud(QString str)
if(str=="1200")
return BAUD1200;
else if(str=="2400")
return BAUD1200;
else if(str== "4800")
return BAUD2400;
else if(str== "4800")
return BAUD4800;
else if(str== "9600")
return BAUD9600;
else if(str== "19200")
@ -219,7 +219,7 @@ BaudRateType SerialConnection::stringToBaud(QString str)
else if(str== "38400")
return BAUD38400;
else if(str== "57600")
return BAUD56000;
return BAUD57600;
else if(str== "115200")
return BAUD115200;
else if(str== "230400")
@ -229,7 +229,7 @@ BaudRateType SerialConnection::stringToBaud(QString str)
else if(str== "921600")
return BAUD921600;
else
return BAUD56000;
return BAUD57600;
}
SerialPlugin::SerialPlugin()