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
dee99ea5
Commit
dee99ea5
authored
Mar 26, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed pluginReady mechanism
More consistent with Qml usage pattern
parent
aa1b3191
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
157 additions
and
146 deletions
+157
-146
qgroundcontrol.qrc
qgroundcontrol.qrc
+2
-1
AutoPilotPlugin.cc
src/AutoPilotPlugins/AutoPilotPlugin.cc
+2
-1
AutoPilotPlugin.h
src/AutoPilotPlugins/AutoPilotPlugin.h
+7
-5
GenericAutoPilotPlugin.cc
src/AutoPilotPlugins/Generic/GenericAutoPilotPlugin.cc
+7
-2
GenericAutoPilotPlugin.h
src/AutoPilotPlugins/Generic/GenericAutoPilotPlugin.h
+3
-1
FlightModesComponentController.cc
src/AutoPilotPlugins/PX4/FlightModesComponentController.cc
+1
-1
PX4AutoPilotPlugin.cc
src/AutoPilotPlugins/PX4/PX4AutoPilotPlugin.cc
+2
-6
PX4AutoPilotPlugin.h
src/AutoPilotPlugins/PX4/PX4AutoPilotPlugin.h
+0
-1
FactBinder.cc
src/FactSystem/FactBinder.cc
+1
-1
FactSystemTestBase.cc
src/FactSystem/FactSystemTestBase.cc
+3
-3
SetupView.cc
src/VehicleSetup/SetupView.cc
+23
-22
SetupView.h
src/VehicleSetup/SetupView.h
+1
-1
SetupViewButtons.qml
src/VehicleSetup/SetupViewButtons.qml
+0
-99
SetupViewButtonsConnected.qml
src/VehicleSetup/SetupViewButtonsConnected.qml
+62
-0
SetupViewButtonsDisconnected.qml
src/VehicleSetup/SetupViewButtonsDisconnected.qml
+40
-0
DebugConsole.cc
src/ui/DebugConsole.cc
+1
-1
PrimaryFlightDisplay.cc
src/ui/PrimaryFlightDisplay.cc
+2
-1
No files found.
qgroundcontrol.qrc
View file @
dee99ea5
...
@@ -264,7 +264,8 @@
...
@@ -264,7 +264,8 @@
<file alias="QGroundControl/Controls/arrow-down.png">src/QmlControls/arrow-down.png</file>
<file alias="QGroundControl/Controls/arrow-down.png">src/QmlControls/arrow-down.png</file>
<file alias="octo_x.png">files/images/px4/airframes/octo_x.png</file>
<file alias="octo_x.png">files/images/px4/airframes/octo_x.png</file>
<file alias="px4fmu_2.x.png">files/images/px4/boards/px4fmu_2.x.png</file>
<file alias="px4fmu_2.x.png">files/images/px4/boards/px4fmu_2.x.png</file>
<file alias="SetupViewButtons.qml">src/VehicleSetup/SetupViewButtons.qml</file>
<file alias="SetupViewButtonsConnected.qml">src/VehicleSetup/SetupViewButtonsConnected.qml</file>
<file alias="SetupViewButtonsDisconnected.qml">src/VehicleSetup/SetupViewButtonsDisconnected.qml</file>
<file alias="VehicleSummary.qml">src/VehicleSetup/VehicleSummary.qml</file>
<file alias="VehicleSummary.qml">src/VehicleSetup/VehicleSummary.qml</file>
<file alias="FirmwareUpgrade.qml">src/VehicleSetup/FirmwareUpgrade.qml</file>
<file alias="FirmwareUpgrade.qml">src/VehicleSetup/FirmwareUpgrade.qml</file>
<file alias="SafetyComponent.qml">src/AutoPilotPlugins/PX4/SafetyComponent.qml</file>
<file alias="SafetyComponent.qml">src/AutoPilotPlugins/PX4/SafetyComponent.qml</file>
...
...
src/AutoPilotPlugins/AutoPilotPlugin.cc
View file @
dee99ea5
...
@@ -28,7 +28,8 @@
...
@@ -28,7 +28,8 @@
AutoPilotPlugin
::
AutoPilotPlugin
(
UASInterface
*
uas
,
QObject
*
parent
)
:
AutoPilotPlugin
::
AutoPilotPlugin
(
UASInterface
*
uas
,
QObject
*
parent
)
:
QObject
(
parent
),
QObject
(
parent
),
_uas
(
uas
)
_uas
(
uas
),
_pluginReady
(
false
)
{
{
Q_ASSERT
(
_uas
);
Q_ASSERT
(
_uas
);
}
}
...
...
src/AutoPilotPlugins/AutoPilotPlugin.h
View file @
dee99ea5
...
@@ -50,6 +50,8 @@ class AutoPilotPlugin : public QObject
...
@@ -50,6 +50,8 @@ class AutoPilotPlugin : public QObject
public:
public:
AutoPilotPlugin
(
UASInterface
*
uas
,
QObject
*
parent
);
AutoPilotPlugin
(
UASInterface
*
uas
,
QObject
*
parent
);
Q_PROPERTY
(
bool
pluginReady
READ
pluginReady
NOTIFY
pluginReadyChanged
)
Q_PROPERTY
(
QVariantList
components
READ
components
CONSTANT
)
Q_PROPERTY
(
QVariantList
components
READ
components
CONSTANT
)
Q_PROPERTY
(
QUrl
setupBackgroundImage
READ
setupBackgroundImage
CONSTANT
)
Q_PROPERTY
(
QUrl
setupBackgroundImage
READ
setupBackgroundImage
CONSTANT
)
...
@@ -71,23 +73,23 @@ public:
...
@@ -71,23 +73,23 @@ public:
virtual
const
QVariantMap
&
parameters
(
void
)
=
0
;
virtual
const
QVariantMap
&
parameters
(
void
)
=
0
;
virtual
QUrl
setupBackgroundImage
(
void
)
=
0
;
virtual
QUrl
setupBackgroundImage
(
void
)
=
0
;
/// Returns true if the plugin is ready for use
virtual
bool
pluginIsReady
(
void
)
const
=
0
;
/// FIXME: Kind of hacky
/// FIXME: Kind of hacky
static
void
clearStaticData
(
void
);
static
void
clearStaticData
(
void
);
UASInterface
*
uas
(
void
)
{
return
_uas
;
}
UASInterface
*
uas
(
void
)
{
return
_uas
;
}
bool
pluginReady
(
void
)
{
return
_pluginReady
;
}
signals:
signals:
/// Signalled when plugin is ready for use
/// Signalled when plugin is ready for use
void
pluginReady
(
void
);
void
pluginReady
Changed
(
bool
pluginReady
);
protected:
protected:
/// All access to AutoPilotPugin objects is through getInstanceForAutoPilotPlugin
/// All access to AutoPilotPugin objects is through getInstanceForAutoPilotPlugin
AutoPilotPlugin
(
QObject
*
parent
=
NULL
)
:
QObject
(
parent
)
{
}
AutoPilotPlugin
(
QObject
*
parent
=
NULL
)
:
QObject
(
parent
)
{
}
UASInterface
*
_uas
;
UASInterface
*
_uas
;
bool
_pluginReady
;
};
};
#endif
#endif
src/AutoPilotPlugins/Generic/GenericAutoPilotPlugin.cc
View file @
dee99ea5
...
@@ -34,8 +34,7 @@ GenericAutoPilotPlugin::GenericAutoPilotPlugin(UASInterface* uas, QObject* paren
...
@@ -34,8 +34,7 @@ GenericAutoPilotPlugin::GenericAutoPilotPlugin(UASInterface* uas, QObject* paren
_parameterFacts
=
new
GenericParameterFacts
(
uas
,
this
);
_parameterFacts
=
new
GenericParameterFacts
(
uas
,
this
);
Q_CHECK_PTR
(
_parameterFacts
);
Q_CHECK_PTR
(
_parameterFacts
);
connect
(
_parameterFacts
,
&
GenericParameterFacts
::
factsReady
,
this
,
&
GenericAutoPilotPlugin
::
pluginReady
);
connect
(
_parameterFacts
,
&
GenericParameterFacts
::
factsReady
,
this
,
&
GenericAutoPilotPlugin
::
_factsReady
);
}
}
QList
<
AutoPilotPluginManager
::
FullMode_t
>
GenericAutoPilotPlugin
::
getModes
(
void
)
QList
<
AutoPilotPluginManager
::
FullMode_t
>
GenericAutoPilotPlugin
::
getModes
(
void
)
...
@@ -104,3 +103,9 @@ QUrl GenericAutoPilotPlugin::setupBackgroundImage(void)
...
@@ -104,3 +103,9 @@ QUrl GenericAutoPilotPlugin::setupBackgroundImage(void)
{
{
return
QUrl
::
fromUserInput
(
"qrc:/qml/px4fmu_2.x.png"
);
return
QUrl
::
fromUserInput
(
"qrc:/qml/px4fmu_2.x.png"
);
}
}
void
GenericAutoPilotPlugin
::
_factsReady
(
void
)
{
_pluginReady
=
true
;
emit
pluginReadyChanged
(
_pluginReady
);
}
src/AutoPilotPlugins/Generic/GenericAutoPilotPlugin.h
View file @
dee99ea5
...
@@ -41,7 +41,6 @@ public:
...
@@ -41,7 +41,6 @@ public:
GenericAutoPilotPlugin
(
UASInterface
*
uas
,
QObject
*
parent
=
NULL
);
GenericAutoPilotPlugin
(
UASInterface
*
uas
,
QObject
*
parent
=
NULL
);
// Overrides from AutoPilotPlugin
// Overrides from AutoPilotPlugin
virtual
bool
pluginIsReady
(
void
)
const
{
return
_parameterFacts
->
factsAreReady
();
}
virtual
QUrl
setupBackgroundImage
(
void
);
virtual
QUrl
setupBackgroundImage
(
void
);
virtual
const
QVariantList
&
components
(
void
);
virtual
const
QVariantList
&
components
(
void
);
virtual
const
QVariantMap
&
parameters
(
void
);
virtual
const
QVariantMap
&
parameters
(
void
);
...
@@ -50,6 +49,9 @@ public:
...
@@ -50,6 +49,9 @@ public:
static
QString
getShortModeText
(
uint8_t
baseMode
,
uint32_t
customMode
);
static
QString
getShortModeText
(
uint8_t
baseMode
,
uint32_t
customMode
);
static
void
clearStaticData
(
void
);
static
void
clearStaticData
(
void
);
private
slots
:
void
_factsReady
(
void
);
private:
private:
GenericParameterFacts
*
_parameterFacts
;
GenericParameterFacts
*
_parameterFacts
;
};
};
...
...
src/AutoPilotPlugins/PX4/FlightModesComponentController.cc
View file @
dee99ea5
...
@@ -44,7 +44,7 @@ FlightModesComponentController::FlightModesComponentController(QObject* parent)
...
@@ -44,7 +44,7 @@ FlightModesComponentController::FlightModesComponentController(QObject* parent)
_autoPilotPlugin
=
AutoPilotPluginManager
::
instance
()
->
getInstanceForAutoPilotPlugin
(
_uas
);
_autoPilotPlugin
=
AutoPilotPluginManager
::
instance
()
->
getInstanceForAutoPilotPlugin
(
_uas
);
Q_ASSERT
(
_autoPilotPlugin
);
Q_ASSERT
(
_autoPilotPlugin
);
Q_ASSERT
(
_autoPilotPlugin
->
plugin
Is
Ready
());
Q_ASSERT
(
_autoPilotPlugin
->
pluginReady
());
_initRcValues
();
_initRcValues
();
_validateConfiguration
();
_validateConfiguration
();
...
...
src/AutoPilotPlugins/PX4/PX4AutoPilotPlugin.cc
View file @
dee99ea5
...
@@ -189,11 +189,6 @@ void PX4AutoPilotPlugin::clearStaticData(void)
...
@@ -189,11 +189,6 @@ void PX4AutoPilotPlugin::clearStaticData(void)
PX4ParameterFacts
::
clearStaticData
();
PX4ParameterFacts
::
clearStaticData
();
}
}
bool
PX4AutoPilotPlugin
::
pluginIsReady
(
void
)
const
{
return
_parameterFacts
->
factsAreReady
();
}
const
QVariantList
&
PX4AutoPilotPlugin
::
components
(
void
)
const
QVariantList
&
PX4AutoPilotPlugin
::
components
(
void
)
{
{
if
(
_components
.
count
()
==
0
&&
!
_incorrectParameterVersion
)
{
if
(
_components
.
count
()
==
0
&&
!
_incorrectParameterVersion
)
{
...
@@ -261,5 +256,6 @@ void PX4AutoPilotPlugin::_pluginReadyPreChecks(void)
...
@@ -261,5 +256,6 @@ void PX4AutoPilotPlugin::_pluginReadyPreChecks(void)
}
}
}
}
emit
pluginReady
();
_pluginReady
=
true
;
emit
pluginReadyChanged
(
_pluginReady
);
}
}
src/AutoPilotPlugins/PX4/PX4AutoPilotPlugin.h
View file @
dee99ea5
...
@@ -50,7 +50,6 @@ public:
...
@@ -50,7 +50,6 @@ public:
~
PX4AutoPilotPlugin
();
~
PX4AutoPilotPlugin
();
// Overrides from AutoPilotPlugin
// Overrides from AutoPilotPlugin
virtual
bool
pluginIsReady
(
void
)
const
;
virtual
const
QVariantList
&
components
(
void
);
virtual
const
QVariantList
&
components
(
void
);
virtual
const
QVariantMap
&
parameters
(
void
);
virtual
const
QVariantMap
&
parameters
(
void
);
virtual
QUrl
setupBackgroundImage
(
void
);
virtual
QUrl
setupBackgroundImage
(
void
);
...
...
src/FactSystem/FactBinder.cc
View file @
dee99ea5
...
@@ -38,7 +38,7 @@ FactBinder::FactBinder(void) :
...
@@ -38,7 +38,7 @@ FactBinder::FactBinder(void) :
_autopilotPlugin
=
AutoPilotPluginManager
::
instance
()
->
getInstanceForAutoPilotPlugin
(
uas
);
_autopilotPlugin
=
AutoPilotPluginManager
::
instance
()
->
getInstanceForAutoPilotPlugin
(
uas
);
Q_ASSERT
(
_autopilotPlugin
);
Q_ASSERT
(
_autopilotPlugin
);
Q_ASSERT
(
_autopilotPlugin
->
plugin
Is
Ready
());
Q_ASSERT
(
_autopilotPlugin
->
pluginReady
());
}
}
QString
FactBinder
::
name
(
void
)
const
QString
FactBinder
::
name
(
void
)
const
...
...
src/FactSystem/FactSystemTestBase.cc
View file @
dee99ea5
...
@@ -72,11 +72,11 @@ void FactSystemTestBase::_init(MAV_AUTOPILOT autopilot)
...
@@ -72,11 +72,11 @@ void FactSystemTestBase::_init(MAV_AUTOPILOT autopilot)
// Wait for the plugin to be ready
// Wait for the plugin to be ready
QSignalSpy
spyPlugin
(
_plugin
,
SIGNAL
(
pluginReady
(
)));
QSignalSpy
spyPlugin
(
_plugin
,
SIGNAL
(
pluginReady
Changed
(
bool
)));
if
(
!
_plugin
->
plugin
Is
Ready
())
{
if
(
!
_plugin
->
pluginReady
())
{
QCOMPARE
(
spyPlugin
.
wait
(
5000
),
true
);
QCOMPARE
(
spyPlugin
.
wait
(
5000
),
true
);
}
}
Q_ASSERT
(
_plugin
->
plugin
Is
Ready
());
Q_ASSERT
(
_plugin
->
pluginReady
());
}
}
void
FactSystemTestBase
::
_cleanup
(
void
)
void
FactSystemTestBase
::
_cleanup
(
void
)
...
...
src/VehicleSetup/SetupView.cc
View file @
dee99ea5
...
@@ -54,12 +54,11 @@ SetupView::SetupView(QWidget* parent) :
...
@@ -54,12 +54,11 @@ SetupView::SetupView(QWidget* parent) :
Q_UNUSED
(
fSucceeded
);
Q_UNUSED
(
fSucceeded
);
Q_ASSERT
(
fSucceeded
);
Q_ASSERT
(
fSucceeded
);
_ui
->
buttonHolder
->
setAutoPilot
(
NULL
);
qmlRegisterType
<
FirmwareUpgradeController
>
(
"QGroundControl.FirmwareUpgradeController"
,
1
,
0
,
"FirmwareUpgradeController"
);
_ui
->
buttonHolder
->
setSource
(
QUrl
::
fromUserInput
(
"qrc:/qml/SetupViewButtons.qml"
));
_ui
->
buttonHolder
->
rootContext
()
->
setContextProperty
(
"controller"
,
this
);
_ui
->
buttonHolder
->
rootContext
()
->
setContextProperty
(
"controller"
,
this
);
_ui
->
buttonHolder
->
setAutoPilot
(
NULL
);
qmlRegisterType
<
FirmwareUpgradeController
>
(
"QGroundControl.FirmwareUpgradeController"
,
1
,
0
,
"FirmwareUpgradeController"
);
_ui
->
buttonHolder
->
setSource
(
QUrl
::
fromUserInput
(
"qrc:/qml/SetupViewButtonsDisconnected.qml"
)
);
_setActiveUAS
(
UASManager
::
instance
()
->
getActiveUAS
());
_setActiveUAS
(
UASManager
::
instance
()
->
getActiveUAS
());
}
}
...
@@ -73,35 +72,37 @@ void SetupView::_setActiveUAS(UASInterface* uas)
...
@@ -73,35 +72,37 @@ void SetupView::_setActiveUAS(UASInterface* uas)
{
{
if
(
_uasCurrent
)
{
if
(
_uasCurrent
)
{
Q_ASSERT
(
_autoPilotPlugin
);
Q_ASSERT
(
_autoPilotPlugin
);
disconnect
(
_autoPilotPlugin
,
&
AutoPilotPlugin
::
pluginReady
,
this
,
&
SetupView
::
_pluginReady
);
disconnect
(
_autoPilotPlugin
,
&
AutoPilotPlugin
::
pluginReady
Changed
,
this
,
&
SetupView
::
_pluginReadyChanged
);
}
}
_autoPilotPlugin
=
NULL
;
_pluginReadyChanged
(
false
);
_ui
->
buttonHolder
->
setAutoPilot
(
NULL
);
firmwareButtonClicked
();
QObject
*
button
=
_ui
->
buttonHolder
->
rootObject
()
->
findChild
<
QObject
*>
(
"firmwareButton"
);
Q_ASSERT
(
button
);
button
->
setProperty
(
"checked"
,
true
);
_uasCurrent
=
uas
;
_uasCurrent
=
uas
;
if
(
_uasCurrent
)
{
if
(
_uasCurrent
)
{
_autoPilotPlugin
=
AutoPilotPluginManager
::
instance
()
->
getInstanceForAutoPilotPlugin
(
_uasCurrent
);
_autoPilotPlugin
=
AutoPilotPluginManager
::
instance
()
->
getInstanceForAutoPilotPlugin
(
_uasCurrent
);
_pluginReadyChanged
(
_autoPilotPlugin
->
pluginReady
());
connect
(
_autoPilotPlugin
,
&
AutoPilotPlugin
::
pluginReady
,
this
,
&
SetupView
::
_pluginReady
);
connect
(
_autoPilotPlugin
,
&
AutoPilotPlugin
::
pluginReadyChanged
,
this
,
&
SetupView
::
_pluginReadyChanged
);
if
(
_autoPilotPlugin
->
pluginIsReady
())
{
_pluginReady
();
}
}
}
}
}
void
SetupView
::
_pluginReady
(
void
)
void
SetupView
::
_pluginReady
Changed
(
bool
pluginReady
)
{
{
_ui
->
buttonHolder
->
setAutoPilot
(
_autoPilotPlugin
);
if
(
pluginReady
)
{
summaryButtonClicked
();
_ui
->
buttonHolder
->
setAutoPilot
(
_autoPilotPlugin
);
QObject
*
button
=
_ui
->
buttonHolder
->
rootObject
()
->
findChild
<
QObject
*>
(
"summaryButton"
);
_ui
->
buttonHolder
->
setSource
(
QUrl
::
fromUserInput
(
"qrc:/qml/SetupViewButtonsConnected.qml"
));
Q_ASSERT
(
button
);
summaryButtonClicked
();
button
->
setProperty
(
"checked"
,
true
);
QObject
*
button
=
_ui
->
buttonHolder
->
rootObject
()
->
findChild
<
QObject
*>
(
"summaryButton"
);
Q_ASSERT
(
button
);
button
->
setProperty
(
"checked"
,
true
);
}
else
{
_ui
->
buttonHolder
->
setSource
(
QUrl
::
fromUserInput
(
"qrc:/qml/SetupViewButtonsDisconnected.qml"
));
_ui
->
buttonHolder
->
setAutoPilot
(
NULL
);
firmwareButtonClicked
();
QObject
*
button
=
_ui
->
buttonHolder
->
rootObject
()
->
findChild
<
QObject
*>
(
"firmwareButton"
);
Q_ASSERT
(
button
);
button
->
setProperty
(
"checked"
,
true
);
}
}
}
void
SetupView
::
_changeSetupWidget
(
QWidget
*
newWidget
)
void
SetupView
::
_changeSetupWidget
(
QWidget
*
newWidget
)
...
...
src/VehicleSetup/SetupView.h
View file @
dee99ea5
...
@@ -54,7 +54,7 @@ public:
...
@@ -54,7 +54,7 @@ public:
private
slots
:
private
slots
:
void
_setActiveUAS
(
UASInterface
*
uas
);
void
_setActiveUAS
(
UASInterface
*
uas
);
void
_pluginReady
(
void
);
void
_pluginReady
Changed
(
bool
pluginReady
);
private:
private:
void
_changeSetupWidget
(
QWidget
*
newWidget
);
void
_changeSetupWidget
(
QWidget
*
newWidget
);
...
...
src/VehicleSetup/SetupViewButtons.qml
deleted
100644 → 0
View file @
aa1b3191
import
QtQuick
2.3
import
QtQuick
.
Controls
1.2
import
QtQuick
.
Controls
.
Styles
1.2
import
QtGraphicalEffects
1.0
import
QGroundControl
.
FactSystem
1.0
import
QGroundControl
.
Palette
1.0
import
QGroundControl
.
Controls
1.0
Rectangle
{
id
:
topLevel
QGCPalette
{
id
:
palette
;
colorGroupEnabled
:
true
}
color
:
palette
.
window
ExclusiveGroup
{
id
:
setupButtonGroup
}
Component
{
id
:
disconnectedButtons
Column
{
anchors.fill
:
parent
SubMenuButton
{
id
:
firmwareButton
;
objectName
:
"
firmwareButton
"
width
:
parent
.
width
text
:
"
FIRMWARE
"
imageResource
:
"
FirmwareUpgradeIcon.png
"
setupIndicator
:
false
exclusiveGroup
:
setupButtonGroup
onClicked
:
controller
.
firmwareButtonClicked
()
}
Item
{
width
:
parent
.
width
;
height
:
10
}
// spacer
QGCLabel
{
width
:
parent
.
width
text
:
"
Full setup options are only available when connected to vehicle and full parameter list has completed downloading.
"
wrapMode
:
Text
.
WordWrap
horizontalAlignment
:
Text
.
AlignHCenter
}
}
}
Component
{
id
:
connectedButtons
Column
{
anchors.fill
:
parent
SubMenuButton
{
id
:
summaryButton
;
objectName
:
"
summaryButton
"
width
:
parent
.
width
text
:
"
SUMMARY
"
imageResource
:
"
VehicleSummaryIcon.png
"
setupIndicator
:
false
exclusiveGroup
:
setupButtonGroup
onClicked
:
controller
.
summaryButtonClicked
()
}
SubMenuButton
{
id
:
firmwareButton
;
objectName
:
"
firmwareButton
"
width
:
parent
.
width
text
:
"
FIRMWARE
"
imageResource
:
"
FirmwareUpgradeIcon.png
"
setupIndicator
:
false
exclusiveGroup
:
setupButtonGroup
onClicked
:
controller
.
firmwareButtonClicked
()
}
Repeater
{
model
:
autopilot
.
components
SubMenuButton
{
width
:
parent
.
width
text
:
modelData
.
name
.
toUpperCase
()
imageResource
:
modelData
.
iconResource
setupComplete
:
modelData
.
setupComplete
exclusiveGroup
:
setupButtonGroup
onClicked
:
controller
.
setupButtonClicked
(
modelData
)
}
}
SubMenuButton
{
width
:
parent
.
width
text
:
"
PARAMETERS
"
setupIndicator
:
false
exclusiveGroup
:
setupButtonGroup
onClicked
:
controller
.
parametersButtonClicked
()
}
}
}
Loader
{
anchors.fill
:
parent
sourceComponent
:
autopilot
?
connectedButtons
:
disconnectedButtons
}
}
src/VehicleSetup/SetupViewButtonsConnected.qml
0 → 100644
View file @
dee99ea5
import
QtQuick
2.3
import
QtQuick
.
Controls
1.2
import
QtQuick
.
Controls
.
Styles
1.2
import
QtGraphicalEffects
1.0
import
QGroundControl
.
FactSystem
1.0
import
QGroundControl
.
Palette
1.0
import
QGroundControl
.
Controls
1.0
Rectangle
{
id
:
topLevel
QGCPalette
{
id
:
palette
;
colorGroupEnabled
:
true
}
color
:
palette
.
window
ExclusiveGroup
{
id
:
setupButtonGroup
}
Column
{
anchors.fill
:
parent
SubMenuButton
{
id
:
summaryButton
;
objectName
:
"
summaryButton
"
width
:
parent
.
width
text
:
"
SUMMARY
"
imageResource
:
"
VehicleSummaryIcon.png
"
setupIndicator
:
false
exclusiveGroup
:
setupButtonGroup
onClicked
:
controller
.
summaryButtonClicked
()
}
SubMenuButton
{
id
:
firmwareButton
;
objectName
:
"
firmwareButton
"
width
:
parent
.
width
text
:
"
FIRMWARE
"
imageResource
:
"
FirmwareUpgradeIcon.png
"
setupIndicator
:
false
exclusiveGroup
:
setupButtonGroup
onClicked
:
controller
.
firmwareButtonClicked
()
}
Repeater
{
model
:
autopilot
?
autopilot
.
components
:
0
SubMenuButton
{
width
:
parent
.
width
text
:
modelData
.
name
.
toUpperCase
()
imageResource
:
modelData
.
iconResource
setupComplete
:
modelData
.
setupComplete
exclusiveGroup
:
setupButtonGroup
onClicked
:
controller
.
setupButtonClicked
(
modelData
)
}
}
SubMenuButton
{
width
:
parent
.
width
text
:
"
PARAMETERS
"
setupIndicator
:
false
exclusiveGroup
:
setupButtonGroup
onClicked
:
controller
.
parametersButtonClicked
()
}
}
}
src/VehicleSetup/SetupViewButtonsDisconnected.qml
0 → 100644
View file @
dee99ea5
import
QtQuick
2.3
import
QtQuick
.
Controls
1.2
import
QtQuick
.
Controls
.
Styles
1.2
import
QtGraphicalEffects
1.0
import
QGroundControl
.
FactSystem
1.0
import
QGroundControl
.
Palette
1.0
import
QGroundControl
.
Controls
1.0
Rectangle
{
id
:
topLevel
QGCPalette
{
id
:
palette
;
colorGroupEnabled
:
true
}
color
:
palette
.
window
ExclusiveGroup
{
id
:
setupButtonGroup
}
Column
{
anchors.fill
:
parent
SubMenuButton
{
id
:
firmwareButton
;
objectName
:
"
firmwareButton
"
width
:
parent
.
width
text
:
"
FIRMWARE
"
imageResource
:
"
FirmwareUpgradeIcon.png
"
setupIndicator
:
false
exclusiveGroup
:
setupButtonGroup
onClicked
:
controller
.
firmwareButtonClicked
()
}
Item
{
width
:
parent
.
width
;
height
:
10
}
// spacer
QGCLabel
{
width
:
parent
.
width
text
:
"
Full setup options are only available when connected to vehicle and full parameter list has completed downloading.
"
wrapMode
:
Text
.
WordWrap
horizontalAlignment
:
Text
.
AlignHCenter
}
}
}
src/ui/DebugConsole.cc
View file @
dee99ea5
...
@@ -181,7 +181,7 @@ void DebugConsole::addLink(LinkInterface* link)
...
@@ -181,7 +181,7 @@ void DebugConsole::addLink(LinkInterface* link)
// Register for name changes
// Register for name changes
connect
(
link
,
SIGNAL
(
nameChanged
(
QString
)),
this
,
SLOT
(
updateLinkName
(
QString
)),
Qt
::
UniqueConnection
);
connect
(
link
,
SIGNAL
(
nameChanged
(
QString
)),
this
,
SLOT
(
updateLinkName
(
QString
)),
Qt
::
UniqueConnection
);
connect
(
LinkManager
::
instance
(),
&
LinkManager
::
linkD
ele
ted
,
this
,
&
DebugConsole
::
removeLink
,
Qt
::
UniqueConnection
);
connect
(
LinkManager
::
instance
(),
&
LinkManager
::
linkD
isconnec
ted
,
this
,
&
DebugConsole
::
removeLink
,
Qt
::
UniqueConnection
);
}
}
void
DebugConsole
::
removeLink
(
LinkInterface
*
const
linkInterface
)
void
DebugConsole
::
removeLink
(
LinkInterface
*
const
linkInterface
)
...
...
src/ui/PrimaryFlightDisplay.cc
View file @
dee99ea5
...
@@ -219,10 +219,11 @@ void PrimaryFlightDisplay::forgetUAS(UASInterface* uas)
...
@@ -219,10 +219,11 @@ void PrimaryFlightDisplay::forgetUAS(UASInterface* uas)
disconnect
(
this
->
uas
,
SIGNAL
(
attitudeChanged
(
UASInterface
*
,
double
,
double
,
double
,
quint64
)),
this
,
SLOT
(
updateAttitude
(
UASInterface
*
,
double
,
double
,
double
,
quint64
)));
disconnect
(
this
->
uas
,
SIGNAL
(
attitudeChanged
(
UASInterface
*
,
double
,
double
,
double
,
quint64
)),
this
,
SLOT
(
updateAttitude
(
UASInterface
*
,
double
,
double
,
double
,
quint64
)));
disconnect
(
this
->
uas
,
SIGNAL
(
attitudeChanged
(
UASInterface
*
,
int
,
double
,
double
,
double
,
quint64
)),
this
,
SLOT
(
updateAttitude
(
UASInterface
*
,
int
,
double
,
double
,
double
,
quint64
)));
disconnect
(
this
->
uas
,
SIGNAL
(
attitudeChanged
(
UASInterface
*
,
int
,
double
,
double
,
double
,
quint64
)),
this
,
SLOT
(
updateAttitude
(
UASInterface
*
,
int
,
double
,
double
,
double
,
quint64
)));
disconnect
(
this
->
uas
,
SIGNAL
(
speedChanged
(
UASInterface
*
,
double
,
double
,
quint64
)),
this
,
SLOT
(
updateSpeed
(
UASInterface
*
,
double
,
double
,
quint64
)));
disconnect
(
this
->
uas
,
SIGNAL
(
speedChanged
(
UASInterface
*
,
double
,
double
,
quint64
)),
this
,
SLOT
(
updateSpeed
(
UASInterface
*
,
double
,
double
,
quint64
)));
disconnect
(
this
->
uas
,
SIGNAL
(
altitudeChanged
(
UASInterface
*
,
double
,
double
,
double
,
double
,
quint64
)),
this
,
SLOT
(
updateAltitude
(
UASInterface
*
,
double
,
double
,
double
,
quint64
)));
disconnect
(
this
->
uas
,
SIGNAL
(
altitudeChanged
(
UASInterface
*
,
double
,
double
,
double
,
double
,
quint64
)),
this
,
SLOT
(
updateAltitude
(
UASInterface
*
,
double
,
double
,
double
,
double
,
quint64
)));
disconnect
(
this
->
uas
,
SIGNAL
(
navigationControllerErrorsChanged
(
UASInterface
*
,
double
,
double
,
double
)),
this
,
SLOT
(
updateNavigationControllerErrors
(
UASInterface
*
,
double
,
double
,
double
)));
disconnect
(
this
->
uas
,
SIGNAL
(
navigationControllerErrorsChanged
(
UASInterface
*
,
double
,
double
,
double
)),
this
,
SLOT
(
updateNavigationControllerErrors
(
UASInterface
*
,
double
,
double
,
double
)));
disconnect
(
this
->
uas
,
&
UASInterface
::
NavigationControllerDataChanged
,
this
,
&
PrimaryFlightDisplay
::
UpdateNavigationControllerData
);
disconnect
(
this
->
uas
,
&
UASInterface
::
NavigationControllerDataChanged
,
this
,
&
PrimaryFlightDisplay
::
UpdateNavigationControllerData
);
}
}
this
->
uas
=
NULL
;
}
}
/**
/**
...
...
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