Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
fc80050a
Commit
fc80050a
authored
Dec 08, 2011
by
pixhawk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added 921600 and two other useful win baud rates
parent
ddd6c32b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
17 deletions
+33
-17
commdcbhelper.cpp
thirdParty/qserialport/src/win32/commdcbhelper.cpp
+33
-17
No files found.
thirdParty/qserialport/src/win32/commdcbhelper.cpp
View file @
fc80050a
...
...
@@ -316,9 +316,18 @@ void CommDCBHelper::setBaudRate(QPortSettings::BaudRate baudRate)
case
QPortSettings
:
:
BAUDR_128000
:
baud
=
CBR_128000
;
break
;
case
QPortSettings
:
:
BAUDR_230400
:
baud
=
230400
;
break
;
case
QPortSettings
:
:
BAUDR_256000
:
baud
=
CBR_256000
;
break
;
case
QPortSettings
:
:
BAUDR_460800
:
baud
=
460800
;
break
;
case
QPortSettings
:
:
BAUDR_921600
:
baud
=
921600
;
break
;
default:
qWarning
()
<<
"CommDCBHelper::setBaudRate("
<<
baudRate
<<
"): "
\
"Unsupported baud rate"
;
...
...
@@ -347,43 +356,50 @@ QPortSettings::BaudRate CommDCBHelper::baudRate() const
baud
=
currentAttrs_
->
BaudRate
;
}
else
{
baud
=
dcb
.
BaudRate
;
baud
=
dcb
.
BaudRate
;
}
Q_ASSERT
(
currentAttrs_
->
BaudRate
==
baud
);
switch
(
baud
)
{
case
CBR_110
:
case
CBR_110
:
return
QPortSettings
::
BAUDR_110
;
case
CBR_300
:
case
CBR_300
:
return
QPortSettings
::
BAUDR_300
;
case
CBR_600
:
case
CBR_600
:
return
QPortSettings
::
BAUDR_600
;
case
CBR_1200
:
case
CBR_1200
:
return
QPortSettings
::
BAUDR_1200
;
case
CBR_2400
:
case
CBR_2400
:
return
QPortSettings
::
BAUDR_2400
;
case
CBR_4800
:
case
CBR_4800
:
return
QPortSettings
::
BAUDR_4800
;
case
CBR_9600
:
case
CBR_9600
:
return
QPortSettings
::
BAUDR_9600
;
case
CBR_14400
:
case
CBR_14400
:
return
QPortSettings
::
BAUDR_14400
;
case
CBR_19200
:
case
CBR_19200
:
return
QPortSettings
::
BAUDR_19200
;
case
CBR_38400
:
case
CBR_38400
:
return
QPortSettings
::
BAUDR_38400
;
case
CBR_56000
:
case
CBR_56000
:
return
QPortSettings
::
BAUDR_56000
;
case
CBR_57600
:
case
CBR_57600
:
return
QPortSettings
::
BAUDR_57600
;
case
CBR_115200
:
case
CBR_115200
:
return
QPortSettings
::
BAUDR_115200
;
case
CBR_128000
:
case
CBR_128000
:
return
QPortSettings
::
BAUDR_128000
;
case
CBR_256000
:
case
230400
:
return
QPortSettings
::
BAUDR_230400
;
case
CBR_256000
:
return
QPortSettings
::
BAUDR_256000
;
default:
case
460800
:
return
QPortSettings
::
BAUDR_460800
;
case
921600
:
return
QPortSettings
::
BAUDR_921600
;
break
;
default:
qWarning
()
<<
"CommDCBHelper::baudRate(): Unknown baud rate"
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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