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
208be59b
Commit
208be59b
authored
May 13, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit
parent
106c2cf2
Changes
14
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
172 additions
and
173 deletions
+172
-173
QGCApplication.pro
QGCApplication.pro
+2
-1
AirframeComponentController.cc
src/AutoPilotPlugins/PX4/AirframeComponentController.cc
+0
-4
AirframeComponentController.h
src/AutoPilotPlugins/PX4/AirframeComponentController.h
+0
-1
PX4AutoPilotPlugin.cc
src/AutoPilotPlugins/PX4/PX4AutoPilotPlugin.cc
+0
-3
SensorsComponent.cc
src/AutoPilotPlugins/PX4/SensorsComponent.cc
+1
-5
SensorsComponent.qml
src/AutoPilotPlugins/PX4/SensorsComponent.qml
+133
-131
SensorsComponentController.cc
src/AutoPilotPlugins/PX4/SensorsComponentController.cc
+2
-10
SensorsComponentController.h
src/AutoPilotPlugins/PX4/SensorsComponentController.h
+3
-6
FactPanel.qml
src/FactSystem/FactControls/FactPanel.qml
+5
-3
FactPanelController.cc
src/FactSystem/FactControls/FactPanelController.cc
+3
-3
FactPanelController.h
src/FactSystem/FactControls/FactPanelController.h
+1
-0
QGCApplication.cc
src/QGCApplication.cc
+10
-0
QGCViewDialog.qml
src/QmlControls/QGCViewDialog.qml
+6
-3
QGCViewPanel.qml
src/QmlControls/QGCViewPanel.qml
+6
-3
No files found.
QGCApplication.pro
View file @
208be59b
...
@@ -548,7 +548,8 @@ SOURCES += \
...
@@ -548,7 +548,8 @@ SOURCES += \
#
#
INCLUDEPATH
+=
\
INCLUDEPATH
+=
\
src
/
VehicleSetup
src
/
VehicleSetup
\
src
/
AutoPilotPlugins
/
PX4
\
FORMS
+=
\
FORMS
+=
\
src
/
VehicleSetup
/
SetupView
.
ui
\
src
/
VehicleSetup
/
SetupView
.
ui
\
...
...
src/AutoPilotPlugins/PX4/AirframeComponentController.cc
View file @
208be59b
...
@@ -38,14 +38,10 @@
...
@@ -38,14 +38,10 @@
bool
AirframeComponentController
::
_typesRegistered
=
false
;
bool
AirframeComponentController
::
_typesRegistered
=
false
;
AirframeComponentController
::
AirframeComponentController
(
void
)
:
AirframeComponentController
::
AirframeComponentController
(
void
)
:
_uas
(
NULL
),
_currentVehicleIndex
(
0
),
_currentVehicleIndex
(
0
),
_autostartId
(
0
),
_autostartId
(
0
),
_showCustomConfigPanel
(
false
)
_showCustomConfigPanel
(
false
)
{
{
_uas
=
UASManager
::
instance
()
->
getActiveUAS
();
Q_ASSERT
(
_uas
);
if
(
!
_typesRegistered
)
{
if
(
!
_typesRegistered
)
{
_typesRegistered
=
true
;
_typesRegistered
=
true
;
qmlRegisterUncreatableType
<
AirframeType
>
(
"QGroundControl.Controllers"
,
1
,
0
,
"AiframeType"
,
"Can only reference AirframeType"
);
qmlRegisterUncreatableType
<
AirframeType
>
(
"QGroundControl.Controllers"
,
1
,
0
,
"AiframeType"
,
"Can only reference AirframeType"
);
...
...
src/AutoPilotPlugins/PX4/AirframeComponentController.h
View file @
208be59b
...
@@ -66,7 +66,6 @@ signals:
...
@@ -66,7 +66,6 @@ signals:
private:
private:
static
bool
_typesRegistered
;
static
bool
_typesRegistered
;
UASInterface
*
_uas
;
QVariantList
_airframeTypes
;
QVariantList
_airframeTypes
;
QString
_currentAirframeType
;
QString
_currentAirframeType
;
QString
_currentVehicleName
;
QString
_currentVehicleName
;
...
...
src/AutoPilotPlugins/PX4/PX4AutoPilotPlugin.cc
View file @
208be59b
...
@@ -75,9 +75,6 @@ PX4AutoPilotPlugin::PX4AutoPilotPlugin(UASInterface* uas, QObject* parent) :
...
@@ -75,9 +75,6 @@ PX4AutoPilotPlugin::PX4AutoPilotPlugin(UASInterface* uas, QObject* parent) :
{
{
Q_ASSERT
(
uas
);
Q_ASSERT
(
uas
);
qmlRegisterType
<
FlightModesComponentController
>
(
"QGroundControl.Controllers"
,
1
,
0
,
"FlightModesComponentController"
);
qmlRegisterType
<
AirframeComponentController
>
(
"QGroundControl.Controllers"
,
1
,
0
,
"AirframeComponentController"
);
_parameterFacts
=
new
PX4ParameterLoader
(
this
,
uas
,
this
);
_parameterFacts
=
new
PX4ParameterLoader
(
this
,
uas
,
this
);
Q_CHECK_PTR
(
_parameterFacts
);
Q_CHECK_PTR
(
_parameterFacts
);
...
...
src/AutoPilotPlugins/PX4/SensorsComponent.cc
View file @
208be59b
...
@@ -110,11 +110,7 @@ QWidget* SensorsComponent::setupWidget(void) const
...
@@ -110,11 +110,7 @@ QWidget* SensorsComponent::setupWidget(void) const
QGCQmlWidgetHolder
*
holder
=
new
QGCQmlWidgetHolder
();
QGCQmlWidgetHolder
*
holder
=
new
QGCQmlWidgetHolder
();
Q_CHECK_PTR
(
holder
);
Q_CHECK_PTR
(
holder
);
holder
->
setAutoPilot
(
_autopilot
);
holder
->
setAutoPilot
(
_autopilot
);
SensorsComponentController
*
controller
=
new
SensorsComponentController
(
_autopilot
,
holder
);
holder
->
setContextPropertyObject
(
"controller"
,
controller
);
holder
->
setSource
(
QUrl
::
fromUserInput
(
"qrc:/qml/SensorsComponent.qml"
));
holder
->
setSource
(
QUrl
::
fromUserInput
(
"qrc:/qml/SensorsComponent.qml"
));
return
holder
;
return
holder
;
...
...
src/AutoPilotPlugins/PX4/SensorsComponent.qml
View file @
208be59b
This diff is collapsed.
Click to expand it.
src/AutoPilotPlugins/PX4/SensorsComponentController.cc
View file @
208be59b
...
@@ -32,8 +32,7 @@
...
@@ -32,8 +32,7 @@
#include <QVariant>
#include <QVariant>
#include <QQmlProperty>
#include <QQmlProperty>
SensorsComponentController
::
SensorsComponentController
(
AutoPilotPlugin
*
autopilot
,
QObject
*
parent
)
:
SensorsComponentController
::
SensorsComponentController
(
void
)
:
QObject
(
parent
),
_statusLog
(
NULL
),
_statusLog
(
NULL
),
_progressBar
(
NULL
),
_progressBar
(
NULL
),
_compassButton
(
NULL
),
_compassButton
(
NULL
),
...
@@ -67,15 +66,8 @@ SensorsComponentController::SensorsComponentController(AutoPilotPlugin* autopilo
...
@@ -67,15 +66,8 @@ SensorsComponentController::SensorsComponentController(AutoPilotPlugin* autopilo
_orientationCalLeftSideRotate
(
false
),
_orientationCalLeftSideRotate
(
false
),
_orientationCalNoseDownSideRotate
(
false
),
_orientationCalNoseDownSideRotate
(
false
),
_unknownFirmwareVersion
(
false
),
_unknownFirmwareVersion
(
false
),
_waitingForCancel
(
false
),
_waitingForCancel
(
false
)
_autopilot
(
autopilot
)
{
{
Q_ASSERT
(
_autopilot
);
Q_ASSERT
(
_autopilot
->
pluginReady
());
_uas
=
_autopilot
->
uas
();
Q_ASSERT
(
_uas
);
// Mag rotation parameters are optional
// Mag rotation parameters are optional
_showCompass0
=
_autopilot
->
parameterExists
(
"CAL_MAG0_ROT"
)
&&
_showCompass0
=
_autopilot
->
parameterExists
(
"CAL_MAG0_ROT"
)
&&
_autopilot
->
getParameterFact
(
"CAL_MAG0_ROT"
)
->
value
().
toInt
()
>=
0
;
_autopilot
->
getParameterFact
(
"CAL_MAG0_ROT"
)
->
value
().
toInt
()
>=
0
;
...
...
src/AutoPilotPlugins/PX4/SensorsComponentController.h
View file @
208be59b
...
@@ -31,15 +31,15 @@
...
@@ -31,15 +31,15 @@
#include <QQuickItem>
#include <QQuickItem>
#include "UASInterface.h"
#include "UASInterface.h"
#include "
AutoPilotPlugin
.h"
#include "
FactPanelController
.h"
/// Sensors Component MVC Controller for SensorsComponent.qml.
/// Sensors Component MVC Controller for SensorsComponent.qml.
class
SensorsComponentController
:
public
QObject
class
SensorsComponentController
:
public
FactPanelController
{
{
Q_OBJECT
Q_OBJECT
public:
public:
SensorsComponentController
(
AutoPilotPlugin
*
autopilot
,
QObject
*
parent
=
NULL
);
SensorsComponentController
(
void
);
Q_PROPERTY
(
bool
fixedWing
READ
fixedWing
CONSTANT
)
Q_PROPERTY
(
bool
fixedWing
READ
fixedWing
CONSTANT
)
...
@@ -167,9 +167,6 @@ private:
...
@@ -167,9 +167,6 @@ private:
bool
_unknownFirmwareVersion
;
bool
_unknownFirmwareVersion
;
bool
_waitingForCancel
;
bool
_waitingForCancel
;
AutoPilotPlugin
*
_autopilot
;
UASInterface
*
_uas
;
};
};
#endif
#endif
src/FactSystem/FactControls/FactPanel.qml
View file @
208be59b
...
@@ -31,7 +31,11 @@ import QGroundControl.FactSystem 1.0
...
@@ -31,7 +31,11 @@ import QGroundControl.FactSystem 1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
Palette
1.0
import
QGroundControl
.
Palette
1.0
Item
{
Rectangle
{
color
:
__qgcPal
.
window
QGCPalette
{
id
:
__qgcPal
;
colorGroupEnabled
:
true
}
property
string
__missingFacts
:
""
property
string
__missingFacts
:
""
function
showMissingFactOverlay
(
missingFactName
)
{
function
showMissingFactOverlay
(
missingFactName
)
{
...
@@ -43,8 +47,6 @@ Item {
...
@@ -43,8 +47,6 @@ Item {
}
}
Rectangle
{
Rectangle
{
QGCPalette
{
id
:
__qgcPal
;
colorGroupEnabled
:
true
}
id
:
__missingFactOverlay
id
:
__missingFactOverlay
anchors.fill
:
parent
anchors.fill
:
parent
z
:
9999
z
:
9999
...
...
src/FactSystem/FactControls/FactPanelController.cc
View file @
208be59b
...
@@ -33,10 +33,10 @@ FactPanelController::FactPanelController(void) :
...
@@ -33,10 +33,10 @@ FactPanelController::FactPanelController(void) :
_autopilot
(
NULL
),
_autopilot
(
NULL
),
_factPanel
(
NULL
)
_factPanel
(
NULL
)
{
{
UASInterface
*
uas
=
UASManager
::
instance
()
->
getActiveUAS
();
_
uas
=
UASManager
::
instance
()
->
getActiveUAS
();
Q_ASSERT
(
uas
);
Q_ASSERT
(
_
uas
);
_autopilot
=
AutoPilotPluginManager
::
instance
()
->
getInstanceForAutoPilotPlugin
(
uas
);
_autopilot
=
AutoPilotPluginManager
::
instance
()
->
getInstanceForAutoPilotPlugin
(
_
uas
);
Q_ASSERT
(
_autopilot
);
Q_ASSERT
(
_autopilot
);
Q_ASSERT
(
_autopilot
->
pluginReady
());
Q_ASSERT
(
_autopilot
->
pluginReady
());
...
...
src/FactSystem/FactControls/FactPanelController.h
View file @
208be59b
...
@@ -56,6 +56,7 @@ protected:
...
@@ -56,6 +56,7 @@ protected:
/// Report a missing fact to the FactPanel Qml element
/// Report a missing fact to the FactPanel Qml element
void
_reportMissingFact
(
const
QString
&
missingFact
);
void
_reportMissingFact
(
const
QString
&
missingFact
);
UASInterface
*
_uas
;
AutoPilotPlugin
*
_autopilot
;
AutoPilotPlugin
*
_autopilot
;
private
slots
:
private
slots
:
...
...
src/QGCApplication.cc
View file @
208be59b
...
@@ -62,6 +62,9 @@
...
@@ -62,6 +62,9 @@
#include "ViewWidgetController.h"
#include "ViewWidgetController.h"
#include "ParameterEditorController.h"
#include "ParameterEditorController.h"
#include "CustomCommandWidgetController.h"
#include "CustomCommandWidgetController.h"
#include "FlightModesComponentController.h"
#include "AirframeComponentController.h"
#include "SensorsComponentController.h"
#include "ScreenTools.h"
#include "ScreenTools.h"
#include "MavManager.h"
#include "MavManager.h"
...
@@ -310,13 +313,20 @@ void QGCApplication::_initCommon(void)
...
@@ -310,13 +313,20 @@ void QGCApplication::_initCommon(void)
// setFont(fontDatabase.font(fontFamilyName, "Roman", 12));
// setFont(fontDatabase.font(fontFamilyName, "Roman", 12));
// Register our Qml objects
// Register our Qml objects
qmlRegisterType
<
QGCPalette
>
(
"QGroundControl.Palette"
,
1
,
0
,
"QGCPalette"
);
qmlRegisterType
<
QGCPalette
>
(
"QGroundControl.Palette"
,
1
,
0
,
"QGCPalette"
);
qmlRegisterType
<
ViewWidgetController
>
(
"QGroundControl.Controllers"
,
1
,
0
,
"ViewWidgetController"
);
qmlRegisterType
<
ViewWidgetController
>
(
"QGroundControl.Controllers"
,
1
,
0
,
"ViewWidgetController"
);
qmlRegisterType
<
ParameterEditorController
>
(
"QGroundControl.Controllers"
,
1
,
0
,
"ParameterEditorController"
);
qmlRegisterType
<
ParameterEditorController
>
(
"QGroundControl.Controllers"
,
1
,
0
,
"ParameterEditorController"
);
qmlRegisterType
<
CustomCommandWidgetController
>
(
"QGroundControl.Controllers"
,
1
,
0
,
"CustomCommandWidgetController"
);
qmlRegisterType
<
CustomCommandWidgetController
>
(
"QGroundControl.Controllers"
,
1
,
0
,
"CustomCommandWidgetController"
);
qmlRegisterType
<
FlightModesComponentController
>
(
"QGroundControl.Controllers"
,
1
,
0
,
"FlightModesComponentController"
);
qmlRegisterType
<
AirframeComponentController
>
(
"QGroundControl.Controllers"
,
1
,
0
,
"AirframeComponentController"
);
qmlRegisterType
<
SensorsComponentController
>
(
"QGroundControl.Controllers"
,
1
,
0
,
"SensorsComponentController"
);
//-- Create QML Singleton Interfaces
//-- Create QML Singleton Interfaces
qmlRegisterSingletonType
<
ScreenTools
>
(
"QGroundControl.ScreenTools"
,
1
,
0
,
"ScreenTools"
,
screenToolsSingletonFactory
);
qmlRegisterSingletonType
<
ScreenTools
>
(
"QGroundControl.ScreenTools"
,
1
,
0
,
"ScreenTools"
,
screenToolsSingletonFactory
);
qmlRegisterSingletonType
<
MavManager
>
(
"QGroundControl.MavManager"
,
1
,
0
,
"MavManager"
,
mavManagerSingletonFactory
);
qmlRegisterSingletonType
<
MavManager
>
(
"QGroundControl.MavManager"
,
1
,
0
,
"MavManager"
,
mavManagerSingletonFactory
);
//-- Register Waypoint Interface
//-- Register Waypoint Interface
qmlRegisterInterface
<
Waypoint
>
(
"Waypoint"
);
qmlRegisterInterface
<
Waypoint
>
(
"Waypoint"
);
}
}
...
...
src/QmlControls/QGCViewDialog.qml
View file @
208be59b
...
@@ -30,8 +30,11 @@ import QtQuick.Controls 1.3
...
@@ -30,8 +30,11 @@ import QtQuick.Controls 1.3
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
Palette
1.0
import
QGroundControl
.
Palette
1.0
Rectangle
{
import
QGroundControl
.
FactSystem
1.0
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
enabled
}
import
QGroundControl
.
FactControls
1.0
FactPanel
{
QGCPalette
{
id
:
__qgcPal
;
colorGroupEnabled
:
enabled
}
signal
hideDialog
signal
hideDialog
...
@@ -43,5 +46,5 @@ Rectangle {
...
@@ -43,5 +46,5 @@ Rectangle {
hideDialog
()
hideDialog
()
}
}
color
:
qgcPal
.
windowShadeDark
color
:
__
qgcPal
.
windowShadeDark
}
}
src/QmlControls/QGCViewPanel.qml
View file @
208be59b
...
@@ -30,12 +30,15 @@ import QtQuick.Controls 1.3
...
@@ -30,12 +30,15 @@ import QtQuick.Controls 1.3
import
QGroundControl
.
Palette
1.0
import
QGroundControl
.
Palette
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
Controls
1.0
Rectangle
{
import
QGroundControl
.
FactSystem
1.0
property
QGCPalette
qgcPal
:
QGCPalette
{
colorGroupEnabled
:
enabled
}
import
QGroundControl
.
FactControls
1.0
FactPanel
{
QGCPalette
{
id
:
__qgcPal
;
colorGroupEnabled
:
enabled
}
signal
showDialog
(
Component
component
,
string
title
,
int
charWidth
,
int
buttons
)
signal
showDialog
(
Component
component
,
string
title
,
int
charWidth
,
int
buttons
)
signal
hideDialog
signal
hideDialog
signal
showMessage
(
string
title
,
string
message
,
int
buttons
)
signal
showMessage
(
string
title
,
string
message
,
int
buttons
)
color
:
qgcPal
.
window
color
:
__
qgcPal
.
window
}
}
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