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
94fcdaa3
Commit
94fcdaa3
authored
Aug 26, 2013
by
Lorenz Meier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Instatiation / state fixes
parent
107d7167
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
5 deletions
+26
-5
QGCConfigView.cc
src/ui/QGCConfigView.cc
+6
-3
QGCToolBar.cc
src/ui/QGCToolBar.cc
+13
-2
QGCToolBar.h
src/ui/QGCToolBar.h
+7
-0
No files found.
src/ui/QGCConfigView.cc
View file @
94fcdaa3
...
...
@@ -22,6 +22,7 @@ QGCConfigView::QGCConfigView(QWidget *parent) :
ui
->
gridLayout
->
removeWidget
(
ui
->
waitingLabel
);
ui
->
waitingLabel
->
setVisible
(
false
);
delete
ui
->
waitingLabel
;
ui
->
waitingLabel
=
NULL
;
config
=
new
QGCPX4VehicleConfig
();
ui
->
gridLayout
->
addWidget
(
config
);
...
...
@@ -48,10 +49,12 @@ void QGCConfigView::activeUASChanged(UASInterface* uas)
type
=
mav
->
getAutopilotType
();
mav
=
uas
;
if
(
NULL
!=
uas
&&
type
!=
uas
->
getAutopilotType
())
{
if
(
uas
&&
type
!=
uas
->
getAutopilotType
())
{
ui
->
gridLayout
->
removeWidget
(
ui
->
waitingLabel
);
ui
->
waitingLabel
->
setVisible
(
false
);
if
(
ui
->
waitingLabel
)
{
ui
->
gridLayout
->
removeWidget
(
ui
->
waitingLabel
);
ui
->
waitingLabel
->
setVisible
(
false
);
}
//remove all child widgets since they could contain stale data
//for example, when we switch from one PX4 UAS to another UAS
...
...
src/ui/QGCToolBar.cc
View file @
94fcdaa3
...
...
@@ -32,6 +32,7 @@ This file is part of the QGROUNDCONTROL project
QGCToolBar
::
QGCToolBar
(
QWidget
*
parent
)
:
QToolBar
(
parent
),
mav
(
NULL
),
userBaudChoice
(
false
),
changed
(
true
),
batteryPercent
(
0
),
batteryVoltage
(
0
),
...
...
@@ -180,7 +181,7 @@ void QGCToolBar::createUI()
baudcomboBox
->
addItem
(
"921600"
,
921600
);
baudcomboBox
->
setCurrentIndex
(
baudcomboBox
->
findData
(
57600
));
addWidget
(
baudcomboBox
);
connect
(
baudcomboBox
,
SIGNAL
(
currentIndexChanged
(
int
)),
this
,
SLOT
(
baudSelected
(
int
)));
connectButton
=
new
QPushButton
(
tr
(
"Connect"
),
this
);
...
...
@@ -251,6 +252,11 @@ void QGCToolBar::resetToolbarUI()
symbolLabel
->
clear
();
}
void
QGCToolBar
::
baudSelected
(
int
index
)
{
userBaudChoice
=
true
;
}
void
QGCToolBar
::
setPerspectiveChangeActions
(
const
QList
<
QAction
*>
&
actions
)
{
if
(
actions
.
count
()
>
1
)
...
...
@@ -679,7 +685,12 @@ void QGCToolBar::updateComboBox()
portComboBox
->
setEditText
(
tr
(
"No serial port found"
));
}
}
baudcomboBox
->
setCurrentIndex
(
baudcomboBox
->
findData
(
slink
->
getBaudRate
()));
if
(
!
userBaudChoice
)
{
int
index
=
baudcomboBox
->
findData
(
slink
->
getBaudRate
());
if
(
index
>
0
)
baudcomboBox
->
setCurrentIndex
(
index
);
}
}
}
...
...
src/ui/QGCToolBar.h
View file @
94fcdaa3
...
...
@@ -87,6 +87,12 @@ public slots:
void
advancedActivityTriggered
(
QAction
*
action
);
void
updateComboBox
();
/**
* @brief User selected baud rate
* @param index The current index of the combo box
*/
void
baudSelected
(
int
index
);
protected:
void
storeSettings
();
void
loadSettings
();
...
...
@@ -110,6 +116,7 @@ protected:
QComboBox
*
portComboBox
;
QComboBox
*
baudcomboBox
;
QTimer
portBoxTimer
;
bool
userBaudChoice
;
bool
changed
;
float
batteryPercent
;
float
batteryVoltage
;
...
...
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