Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
d890252c
Commit
d890252c
authored
Jul 09, 2019
by
Tomaz Canabrava
Committed by
Daniel Agar
Jul 10, 2019
Browse files
Initialize baudrates correctly
parent
06f79af5
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/comm/SerialLink.cc
View file @
d890252c
...
@@ -513,50 +513,52 @@ QStringList SerialConfiguration::supportedBaudRates()
...
@@ -513,50 +513,52 @@ QStringList SerialConfiguration::supportedBaudRates()
void
SerialConfiguration
::
_initBaudRates
()
void
SerialConfiguration
::
_initBaudRates
()
{
{
kSupportedBaudRates
.
clear
();
kSupportedBaudRates
.
clear
();
kSupportedBaudRates
=
QStringList
({
#if USE_ANCIENT_RATES
#if USE_ANCIENT_RATES
#if defined(Q_OS_UNIX) || defined(Q_OS_LINUX) || defined(Q_OS_DARWIN)
#if defined(Q_OS_UNIX) || defined(Q_OS_LINUX) || defined(Q_OS_DARWIN)
kSupportedBaudRates
<<
"50"
;
"50"
,
kSupportedBaudRates
<<
"75"
;
"75"
,
#endif
#endif
kSupportedBaudRates
<<
"110"
;
"110"
,
#if defined(Q_OS_UNIX) || defined(Q_OS_LINUX) || defined(Q_OS_DARWIN)
#if defined(Q_OS_UNIX) || defined(Q_OS_LINUX) || defined(Q_OS_DARWIN)
kSupportedBaudRates
<<
"134"
;
"150"
,
kSupportedBaudRates
<<
"150"
;
"200"
,
kSupportedBaudRates
<<
"200"
;
"134"
,
#endif
#endif
kSupportedBaudRates
<<
"300"
;
"300"
,
kSupportedBaudRates
<<
"600"
;
"600"
,
kSupportedBaudRates
<<
"1200"
;
"1200"
,
#if defined(Q_OS_UNIX) || defined(Q_OS_LINUX) || defined(Q_OS_DARWIN)
#if defined(Q_OS_UNIX) || defined(Q_OS_LINUX) || defined(Q_OS_DARWIN)
kSupportedBaudRates
<<
"1800"
;
"1800"
,
#endif
#endif
#endif
#endif
kSupportedBaudRates
<<
"2400"
;
"2400"
,
kSupportedBaudRates
<<
"4800"
;
"4800"
,
kSupportedBaudRates
<<
"9600"
;
"9600"
,
#if defined(Q_OS_WIN)
#if defined(Q_OS_WIN)
kSupportedBaudRates
<<
"14400"
;
"14400"
,
#endif
#endif
kSupportedBaudRates
<<
"19200"
;
"19200"
,
kSupportedBaudRates
<<
"38400"
;
"38400"
,
#if defined(Q_OS_WIN)
#if defined(Q_OS_WIN)
kSupportedBaudRates
<<
"56000"
;
"56000"
,
#endif
#endif
kSupportedBaudRates
<<
"57600"
;
"57600"
,
kSupportedBaudRates
<<
"115200"
;
"115200"
,
#if defined(Q_OS_WIN)
#if defined(Q_OS_WIN)
kSupportedBaudRates
<<
"128000"
;
"128000"
,
#endif
#endif
kSupportedBaudRates
<<
"230400"
;
"230400"
,
#if defined(Q_OS_WIN)
#if defined(Q_OS_WIN)
kSupportedBaudRates
<<
"256000"
;
"256000"
,
#endif
#endif
kSupportedBaudRates
<<
"460800"
;
"460800"
,
kSupportedBaudRates
<<
"500000"
;
"500000"
,
#if defined(Q_OS_LINUX)
#if defined(Q_OS_LINUX)
kSupportedBaudRates
<<
"576000"
;
"576000"
,
#endif
#endif
kSupportedBaudRates
<<
"921600"
;
"921600"
,
});
}
}
void
SerialConfiguration
::
setUsbDirect
(
bool
usbDirect
)
void
SerialConfiguration
::
setUsbDirect
(
bool
usbDirect
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment