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
c8f1e925
Commit
c8f1e925
authored
Mar 15, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add setup pre-flight check
parent
4b3c2cec
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
3 deletions
+20
-3
PX4AutoPilotPlugin.cc
src/AutoPilotPlugins/PX4/PX4AutoPilotPlugin.cc
+19
-2
PX4AutoPilotPlugin.h
src/AutoPilotPlugins/PX4/PX4AutoPilotPlugin.h
+1
-1
No files found.
src/AutoPilotPlugins/PX4/PX4AutoPilotPlugin.cc
View file @
c8f1e925
...
...
@@ -80,7 +80,7 @@ PX4AutoPilotPlugin::PX4AutoPilotPlugin(UASInterface* uas, QObject* parent) :
_parameterFacts
=
new
PX4ParameterFacts
(
uas
,
this
);
Q_CHECK_PTR
(
_parameterFacts
);
connect
(
_parameterFacts
,
&
PX4ParameterFacts
::
factsReady
,
this
,
&
PX4AutoPilotPlugin
::
_
checkForIncorrectParameterVersion
);
connect
(
_parameterFacts
,
&
PX4ParameterFacts
::
factsReady
,
this
,
&
PX4AutoPilotPlugin
::
_
pluginReadyPreChecks
);
PX4ParameterFacts
::
loadParameterFactMetaData
();
}
...
...
@@ -237,12 +237,29 @@ QUrl PX4AutoPilotPlugin::setupBackgroundImage(void)
return
QUrl
::
fromUserInput
(
"qrc:/qml/px4fmu_2.x.png"
);
}
void
PX4AutoPilotPlugin
::
_checkForIncorrectParameterVersion
(
void
)
/// This will perform various checks prior to signalling that the plug in ready
void
PX4AutoPilotPlugin
::
_pluginReadyPreChecks
(
void
)
{
// Check for older parameter version set
// FIXME: Firmware is moving to version stamp parameter set. Once that is complete the version stamp
// should be used instead.
if
(
parameters
().
contains
(
"SENS_GYRO_XOFF"
))
{
_incorrectParameterVersion
=
true
;
QGCMessageBox
::
warning
(
tr
(
"Setup"
),
tr
(
"This version of GroundControl can only perform vehicle setup on a newer version of firmware. "
"Please perform a Firmware Upgrade if you wish to use Vehicle Setup."
));
}
else
{
// Check for missing setup complete
foreach
(
const
QVariant
componentVariant
,
components
())
{
VehicleComponent
*
component
=
qobject_cast
<
VehicleComponent
*>
(
qvariant_cast
<
QObject
*>
(
componentVariant
));
Q_ASSERT
(
component
);
if
(
!
component
->
setupComplete
())
{
QGCMessageBox
::
warning
(
tr
(
"Setup"
),
tr
(
"One or more vehicle components require setup prior to flight. "
"Please correct these by going to the Setup view."
));
break
;
}
}
}
emit
pluginReady
();
}
src/AutoPilotPlugins/PX4/PX4AutoPilotPlugin.h
View file @
c8f1e925
...
...
@@ -68,7 +68,7 @@ public:
PowerComponent
*
powerComponent
(
void
)
{
return
_powerComponent
;
}
private
slots
:
void
_
checkForIncorrectParameterVersion
(
void
);
void
_
pluginReadyPreChecks
(
void
);
private:
PX4ParameterFacts
*
_parameterFacts
;
...
...
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