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
d4e21f98
Commit
d4e21f98
authored
Jul 01, 2013
by
Bill Bonney
Browse files
Merge branch 'refs/heads/master' into qtserialport
parents
7680355b
ee16284d
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/ui/QGCToolBar.cc
View file @
d4e21f98
...
...
@@ -166,6 +166,22 @@ void QGCToolBar::createUI()
portComboBox
->
setEnabled
(
true
);
portComboBox
->
setMinimumWidth
(
200
);
addWidget
(
portComboBox
);
baudcomboBox
=
new
QComboBox
(
this
);
baudcomboBox
->
setToolTip
(
tr
(
"Choose what baud rate to use"
));
baudcomboBox
->
setEnabled
(
true
);
baudcomboBox
->
setMinimumWidth
(
80
);
baudcomboBox
->
addItem
(
"9600"
);
baudcomboBox
->
addItem
(
"14400"
);
baudcomboBox
->
addItem
(
"19200"
);
baudcomboBox
->
addItem
(
"38400"
);
baudcomboBox
->
addItem
(
"57600"
);
baudcomboBox
->
addItem
(
"115200"
);
baudcomboBox
->
setCurrentIndex
(
5
);
addWidget
(
baudcomboBox
);
connectButton
=
new
QPushButton
(
tr
(
"Connect"
),
this
);
connectButton
->
setToolTip
(
tr
(
"Connect wireless link to MAV"
));
connectButton
->
setCheckable
(
true
);
...
...
@@ -610,6 +626,8 @@ void QGCToolBar::connectLink(bool connect)
QString
portname
=
portComboBox
->
currentText
().
split
(
":"
)[
2
];
link
->
setPortName
(
portname
.
trimmed
());
}
int
baud
=
baudcomboBox
->
currentText
().
toInt
();
link
->
setBaudRate
(
baud
);
link
->
connect
();
}
else
...
...
src/ui/QGCToolBar.h
View file @
d4e21f98
...
...
@@ -105,6 +105,7 @@ protected:
QLabel
*
toolBarBatteryVoltageLabel
;
QGCMAVLinkLogPlayer
*
player
;
QComboBox
*
portComboBox
;
QComboBox
*
baudcomboBox
;
bool
changed
;
float
batteryPercent
;
float
batteryVoltage
;
...
...
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