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
3cd68166
Unverified
Commit
3cd68166
authored
Jan 05, 2018
by
Don Gagne
Committed by
GitHub
Jan 05, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5961 from DonLakeFlyer/SetupComplete
Fix AutoPilotPlugin::setupCompleteChanged signalling
parents
2d447d33
0c384ff0
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
2 deletions
+16
-2
AutoPilotPlugin.cc
src/AutoPilotPlugins/AutoPilotPlugin.cc
+11
-0
AutoPilotPlugin.h
src/AutoPilotPlugins/AutoPilotPlugin.h
+1
-1
PX4AutoPilotPlugin.h
src/AutoPilotPlugins/PX4/PX4AutoPilotPlugin.h
+2
-0
VehicleComponent.h
src/VehicleSetup/VehicleComponent.h
+1
-1
VehicleSummary.qml
src/VehicleSetup/VehicleSummary.qml
+1
-0
No files found.
src/AutoPilotPlugins/AutoPilotPlugin.cc
View file @
3cd68166
...
...
@@ -61,6 +61,17 @@ bool AutoPilotPlugin::setupComplete(void)
void
AutoPilotPlugin
::
parametersReadyPreChecks
(
void
)
{
_recalcSetupComplete
();
// Connect signals in order to keep setupComplete up to date
foreach
(
const
QVariant
componentVariant
,
vehicleComponents
())
{
VehicleComponent
*
component
=
qobject_cast
<
VehicleComponent
*>
(
qvariant_cast
<
QObject
*>
(
componentVariant
));
if
(
component
)
{
connect
(
component
,
&
VehicleComponent
::
setupCompleteChanged
,
this
,
&
AutoPilotPlugin
::
_recalcSetupComplete
);
}
else
{
qWarning
()
<<
"AutoPilotPlugin::_recalcSetupComplete Incorrectly typed VehicleComponent"
;
}
}
if
(
!
_setupComplete
)
{
qgcApp
()
->
showMessage
(
tr
(
"One or more vehicle components require setup prior to flight."
));
...
...
src/AutoPilotPlugins/AutoPilotPlugin.h
View file @
3cd68166
...
...
@@ -66,7 +66,7 @@ protected:
FirmwarePlugin
*
_firmwarePlugin
;
bool
_setupComplete
;
private:
private
slots
:
void
_recalcSetupComplete
(
void
);
};
...
...
src/AutoPilotPlugins/PX4/PX4AutoPilotPlugin.h
View file @
3cd68166
...
...
@@ -44,6 +44,7 @@ public:
const
QVariantList
&
vehicleComponents
(
void
)
override
;
void
parametersReadyPreChecks
(
void
)
override
;
QString
prerequisiteSetup
(
VehicleComponent
*
component
)
const
override
;
protected:
bool
_incorrectParameterVersion
;
///< true: parameter version incorrect, setup not allowed
PX4AirframeLoader
*
_airframeFacts
;
...
...
@@ -58,6 +59,7 @@ protected:
MotorComponent
*
_motorComponent
;
PX4TuningComponent
*
_tuningComponent
;
SyslinkComponent
*
_syslinkComponent
;
private:
QVariantList
_components
;
};
...
...
src/VehicleSetup/VehicleComponent.h
View file @
3cd68166
...
...
@@ -56,7 +56,7 @@ public:
virtual
void
addSummaryQmlComponent
(
QQmlContext
*
context
,
QQuickItem
*
parent
);
/// @brief Returns an list of parameter names for which a change should cause the setupCompleteChanged
/// signal to be emitted.
Last element is signalled by NULL.
/// signal to be emitted.
virtual
QStringList
setupCompleteChangedTriggerList
(
void
)
const
=
0
;
/// Should be called after the component is created (but not in constructor) to setup the
...
...
src/VehicleSetup/VehicleSummary.qml
View file @
3cd68166
...
...
@@ -86,6 +86,7 @@ Rectangle {
text
:
setupComplete
?
qsTr
(
"
Below you will find a summary of the settings for your vehicle. To the left are the setup menus for each component.
"
)
:
qsTr
(
"
WARNING: Your vehicle requires setup prior to flight. Please resolve the items marked in red using the menu on the left.
"
)
property
bool
setupComplete
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
?
QGroundControl
.
multiVehicleManager
.
activeVehicle
.
autopilot
.
setupComplete
:
false
}
...
...
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