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
1af73389
Commit
1af73389
authored
Jul 19, 2010
by
lm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanups
parent
29da5425
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
112 additions
and
7 deletions
+112
-7
HUD.cc
src/ui/HUD.cc
+4
-1
MainWindow.cc
src/ui/MainWindow.cc
+102
-6
MainWindow.h
src/ui/MainWindow.h
+4
-0
QGCParamWidget.cc
src/ui/QGCParamWidget.cc
+1
-0
QGCParamWidget.h
src/ui/QGCParamWidget.h
+1
-0
No files found.
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
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