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
1d1d3fdf
Commit
1d1d3fdf
authored
Feb 24, 2013
by
Lorenz Meier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Toolbar and calibration improvements
parent
5948605c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
4 deletions
+39
-4
QGCToolBar.cc
src/ui/QGCToolBar.cc
+33
-2
QGCToolBar.h
src/ui/QGCToolBar.h
+4
-0
QGCVehicleConfig.cc
src/ui/QGCVehicleConfig.cc
+2
-2
No files found.
src/ui/QGCToolBar.cc
View file @
1d1d3fdf
...
...
@@ -97,11 +97,11 @@ QGCToolBar::QGCToolBar(QWidget *parent) :
toolBarWpLabel
=
new
QLabel
(
"WP--"
,
this
);
toolBarWpLabel
->
setStyleSheet
(
"QLabel { margin: 0px 2px; font: 18px; color: #3C7B9E; }"
);
toolBarWpLabel
->
setToolTip
(
tr
(
"Current mission
"
));
toolBarWpLabel
->
setToolTip
(
tr
(
"Current waypoint
"
));
addWidget
(
toolBarWpLabel
);
toolBarDistLabel
=
new
QLabel
(
"--- ---- m"
,
this
);
toolBarDistLabel
->
setToolTip
(
tr
(
"Distance to current mission
"
));
toolBarDistLabel
->
setToolTip
(
tr
(
"Distance to current waypoint
"
));
addWidget
(
toolBarDistLabel
);
toolBarMessageLabel
=
new
QLabel
(
"No system messages."
,
this
);
...
...
@@ -109,6 +109,12 @@ QGCToolBar::QGCToolBar(QWidget *parent) :
toolBarMessageLabel
->
setToolTip
(
tr
(
"Most recent system message"
));
addWidget
(
toolBarMessageLabel
);
connectButton
=
new
QPushButton
(
tr
(
"Connect"
),
this
);
connectButton
->
setCheckable
(
true
);
connectButton
->
setToolTip
(
tr
(
"Connect wireless link to MAV"
));
addWidget
(
connectButton
);
connect
(
connectButton
,
SIGNAL
(
clicked
(
bool
)),
this
,
SLOT
(
connectLink
(
bool
)));
// DONE INITIALIZING BUTTONS
// Configure the toolbar for the current default UAS
...
...
@@ -450,6 +456,31 @@ void QGCToolBar::receiveTextMessage(int uasid, int componentid, int severity, QS
lastSystemMessage
=
text
;
}
void
QGCToolBar
::
connectLink
(
bool
connect
)
{
if
(
connect
&&
LinkManager
::
instance
()
->
getLinks
().
count
()
<
3
)
{
MainWindow
::
instance
()
->
addLink
();
}
else
if
(
connect
)
{
LinkManager
::
instance
()
->
getLinks
().
last
()
->
connect
();
}
else
if
(
!
connect
&&
LinkManager
::
instance
()
->
getLinks
().
count
()
>
2
)
{
LinkManager
::
instance
()
->
getLinks
().
last
()
->
disconnect
();
}
if
(
LinkManager
::
instance
()
->
getLinks
().
count
()
>
2
)
{
if
(
LinkManager
::
instance
()
->
getLinks
().
last
()
->
isConnected
())
{
connectButton
->
setText
(
tr
(
"Disconnect"
));
}
else
{
connectButton
->
setText
(
tr
(
"Connect"
));
}
}
}
QGCToolBar
::~
QGCToolBar
()
{
if
(
toggleLoggingAction
)
toggleLoggingAction
->
deleteLater
();
...
...
src/ui/QGCToolBar.h
View file @
1d1d3fdf
...
...
@@ -27,6 +27,7 @@ This file is part of the QGROUNDCONTROL project
#include <QToolBar>
#include <QAction>
#include <QToolButton>
#include <QPushButton>
#include <QLabel>
#include <QProgressBar>
#include "UASInterface.h"
...
...
@@ -72,6 +73,8 @@ public slots:
void
updateView
();
/** @brief Update connection timeout time */
void
heartbeatTimeout
(
bool
timeout
,
unsigned
int
ms
);
/** @brief Create or connect link */
void
connectLink
(
bool
connect
);
protected:
void
createCustomWidgets
();
...
...
@@ -88,6 +91,7 @@ protected:
QLabel
*
toolBarWpLabel
;
QLabel
*
toolBarDistLabel
;
QLabel
*
toolBarMessageLabel
;
QPushButton
*
connectButton
;
QProgressBar
*
toolBarBatteryBar
;
QLabel
*
toolBarBatteryVoltageLabel
;
QGCMAVLinkLogPlayer
*
player
;
...
...
src/ui/QGCVehicleConfig.cc
View file @
1d1d3fdf
...
...
@@ -235,8 +235,8 @@ void QGCVehicleConfig::resetCalibrationRC()
{
for
(
unsigned
int
i
=
0
;
i
<
chanMax
;
++
i
)
{
rcMin
[
i
]
=
(
float
)
INT_MAX
;
rcMax
[
i
]
=
(
float
)
INT_MIN
;
rcMin
[
i
]
=
1200
;
rcMax
[
i
]
=
1800
;
}
}
...
...
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