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