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
1af73389
Commit
1af73389
authored
Jul 19, 2010
by
lm
Browse files
Cleanups
parent
29da5425
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/ui/HUD.cc
View file @
1af73389
...
...
@@ -569,7 +569,10 @@ void HUD::paintHUD()
float
yawTrans
=
yawInt
*
(
double
)
maxYawTrans
;
yawInt
*=
0.6
f
;
//qDebug() << "yaw translation" << yawTrans << "integral" << yawInt << "difference" << yawDiff << "yaw" << yaw << "asin(yawInt)" << asinYaw;
if
((
yawTrans
<
5.0
)
&&
(
yawTrans
>
-
5.0
))
yawTrans
=
0
;
qDebug
()
<<
"yaw translation"
<<
yawTrans
<<
"integral"
<<
yawInt
<<
"difference"
<<
yawDiff
<<
"yaw"
<<
yaw
;
// Update scaling factor
// adjust scaling to fit both horizontally and vertically
...
...
src/ui/MainWindow.cc
View file @
1af73389
...
...
@@ -48,6 +48,10 @@ This file is part of the QGROUNDCONTROL project
#include
"JoystickWidget.h"
#include
"GAudioOutput.h"
// FIXME Move
#include
"PxQuadMAV.h"
#include
"SlugsMAV.h"
#include
"LogCompressor.h"
...
...
@@ -344,6 +348,12 @@ void MainWindow::UASCreated(UASInterface* uas)
// Revalidate UI
// TODO Stylesheet reloading should in theory not be necessary
reloadStylesheet
();
// Check which type this UAS is of
PxQuadMAV
*
mav
=
dynamic_cast
<
PxQuadMAV
*>
(
uas
);
if
(
mav
)
loadPixhawkView
();
SlugsMAV
*
mav2
=
dynamic_cast
<
SlugsMAV
*>
(
uas
);
if
(
mav2
)
loadSlugsView
();
}
/**
...
...
@@ -377,6 +387,98 @@ void MainWindow::clearView()
}
}
void
MainWindow
::
loadSlugsView
()
{
clearView
();
// Engineer view, used in EMAV2009
// LINE CHART
linechart
->
setActive
(
true
);
centerStack
->
setCurrentWidget
(
linechart
);
// UAS CONTROL
QDockWidget
*
container1
=
new
QDockWidget
(
tr
(
"Control"
),
this
);
container1
->
setWidget
(
control
);
addDockWidget
(
Qt
::
LeftDockWidgetArea
,
container1
);
// UAS LIST
QDockWidget
*
container4
=
new
QDockWidget
(
tr
(
"Unmanned Systems"
),
this
);
container4
->
setWidget
(
list
);
addDockWidget
(
Qt
::
BottomDockWidgetArea
,
container4
);
// UAS STATUS
QDockWidget
*
container3
=
new
QDockWidget
(
tr
(
"Status Details"
),
this
);
container3
->
setWidget
(
info
);
addDockWidget
(
Qt
::
LeftDockWidgetArea
,
container3
);
// HORIZONTAL SITUATION INDICATOR
QDockWidget
*
container6
=
new
QDockWidget
(
tr
(
"Horizontal Situation Indicator"
),
this
);
container6
->
setWidget
(
hsi
);
hsi
->
start
();
addDockWidget
(
Qt
::
LeftDockWidgetArea
,
container6
);
// WAYPOINT LIST
QDockWidget
*
container5
=
new
QDockWidget
(
tr
(
"Waypoint List"
),
this
);
container5
->
setWidget
(
waypoints
);
addDockWidget
(
Qt
::
BottomDockWidgetArea
,
container5
);
// DEBUG CONSOLE
QDockWidget
*
container7
=
new
QDockWidget
(
tr
(
"Communication Console"
),
this
);
container7
->
setWidget
(
debugConsole
);
addDockWidget
(
Qt
::
BottomDockWidgetArea
,
container7
);
// ONBOARD PARAMETERS
QDockWidget
*
containerParams
=
new
QDockWidget
(
tr
(
"Onboard Parameters"
),
this
);
containerParams
->
setWidget
(
parameters
);
addDockWidget
(
Qt
::
RightDockWidgetArea
,
containerParams
);
this
->
show
();
}
void
MainWindow
::
loadPixhawkView
()
{
clearView
();
// Engineer view, used in EMAV2009
// LINE CHART
linechart
->
setActive
(
true
);
centerStack
->
setCurrentWidget
(
linechart
);
// UAS CONTROL
QDockWidget
*
container1
=
new
QDockWidget
(
tr
(
"Control"
),
this
);
container1
->
setWidget
(
control
);
addDockWidget
(
Qt
::
LeftDockWidgetArea
,
container1
);
// UAS LIST
QDockWidget
*
container4
=
new
QDockWidget
(
tr
(
"Unmanned Systems"
),
this
);
container4
->
setWidget
(
list
);
addDockWidget
(
Qt
::
BottomDockWidgetArea
,
container4
);
// UAS STATUS
QDockWidget
*
container3
=
new
QDockWidget
(
tr
(
"Status Details"
),
this
);
container3
->
setWidget
(
info
);
addDockWidget
(
Qt
::
LeftDockWidgetArea
,
container3
);
// WAYPOINT LIST
QDockWidget
*
container5
=
new
QDockWidget
(
tr
(
"Waypoint List"
),
this
);
container5
->
setWidget
(
waypoints
);
addDockWidget
(
Qt
::
BottomDockWidgetArea
,
container5
);
// DEBUG CONSOLE
QDockWidget
*
container7
=
new
QDockWidget
(
tr
(
"Communication Console"
),
this
);
container7
->
setWidget
(
debugConsole
);
addDockWidget
(
Qt
::
BottomDockWidgetArea
,
container7
);
// ONBOARD PARAMETERS
QDockWidget
*
containerParams
=
new
QDockWidget
(
tr
(
"Onboard Parameters"
),
this
);
containerParams
->
setWidget
(
parameters
);
addDockWidget
(
Qt
::
RightDockWidgetArea
,
containerParams
);
this
->
show
();
}
void
MainWindow
::
loadPilotView
()
{
clearView
();
...
...
@@ -490,12 +592,6 @@ void MainWindow::loadEngineerView()
container3
->
setWidget
(
info
);
addDockWidget
(
Qt
::
LeftDockWidgetArea
,
container3
);
// HORIZONTAL SITUATION INDICATOR
QDockWidget
*
container6
=
new
QDockWidget
(
tr
(
"Horizontal Situation Indicator"
),
this
);
container6
->
setWidget
(
hsi
);
hsi
->
start
();
addDockWidget
(
Qt
::
LeftDockWidgetArea
,
container6
);
// WAYPOINT LIST
QDockWidget
*
container5
=
new
QDockWidget
(
tr
(
"Waypoint List"
),
this
);
container5
->
setWidget
(
waypoints
);
...
...
src/ui/MainWindow.h
View file @
1af73389
...
...
@@ -117,6 +117,10 @@ public slots:
/** @brief Load MAVLink XML generator view */
void
loadMAVLinkView
();
// Fixme find a nicer solution that scales to more AP types
void
loadSlugsView
();
void
loadPixhawkView
();
/** @brief Reload the CSS style sheet */
void
reloadStylesheet
();
protected:
...
...
src/ui/QGCParamWidget.cc
View file @
1af73389
...
...
@@ -270,6 +270,7 @@ void QGCParamWidget::requestParameterList()
// Clear view and request param list
clear
();
parameters
.
clear
();
received
.
clear
();
mav
->
requestParameters
();
}
...
...
src/ui/QGCParamWidget.h
View file @
1af73389
...
...
@@ -83,6 +83,7 @@ protected:
QMap
<
int
,
QMap
<
QString
,
QTreeWidgetItem
*>*
>
paramGroups
;
///< Parameter groups
QMap
<
int
,
QMap
<
QString
,
float
>*
>
changedValues
;
///< Changed values
QMap
<
int
,
QMap
<
QString
,
float
>*
>
parameters
;
///< All parameters
QVector
<
bool
>
received
;
///< Successfully received parameters
};
...
...
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