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
fee7929e
Commit
fee7929e
authored
May 23, 2016
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle airspeed circuit breaker correctly
parent
c3c3f5f8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
16 deletions
+7
-16
SensorsComponent.cc
src/AutoPilotPlugins/PX4/SensorsComponent.cc
+5
-16
SensorsComponent.h
src/AutoPilotPlugins/PX4/SensorsComponent.h
+2
-0
No files found.
src/AutoPilotPlugins/PX4/SensorsComponent.cc
View file @
fee7929e
...
...
@@ -29,7 +29,7 @@
#include "QGCQmlWidgetHolder.h"
#include "SensorsComponentController.h"
// These two list must be kept in sync
const
char
*
SensorsComponent
::
_airspeedBreaker
=
"CBRK_AIRSPD_CHK"
;
SensorsComponent
::
SensorsComponent
(
Vehicle
*
vehicle
,
AutoPilotPlugin
*
autopilot
,
QObject
*
parent
)
:
VehicleComponent
(
vehicle
,
autopilot
,
parent
),
...
...
@@ -62,7 +62,7 @@ bool SensorsComponent::requiresSetup(void) const
bool
SensorsComponent
::
setupComplete
(
void
)
const
{
foreach
(
const
QString
&
triggerParam
,
setupCompleteChangedTriggerList
())
{
if
(
_autopilot
->
getParameterFact
(
FactSystem
::
defaultComponentId
,
triggerParam
)
->
rawValue
().
toFloat
()
==
0.0
f
)
{
if
(
triggerParam
!=
_airspeedBreaker
&&
_autopilot
->
getParameterFact
(
FactSystem
::
defaultComponentId
,
triggerParam
)
->
rawValue
().
toFloat
()
==
0.0
f
)
{
return
false
;
}
}
...
...
@@ -74,20 +74,9 @@ QStringList SensorsComponent::setupCompleteChangedTriggerList(void) const
{
QStringList
triggers
;
triggers
<<
"CAL_MAG0_ID"
<<
"CAL_GYRO0_ID"
<<
"CAL_ACC0_ID"
;
switch
(
_vehicle
->
vehicleType
())
{
case
MAV_TYPE_FIXED_WING
:
case
MAV_TYPE_VTOL_DUOROTOR
:
case
MAV_TYPE_VTOL_QUADROTOR
:
case
MAV_TYPE_VTOL_TILTROTOR
:
case
MAV_TYPE_VTOL_RESERVED2
:
case
MAV_TYPE_VTOL_RESERVED3
:
case
MAV_TYPE_VTOL_RESERVED4
:
case
MAV_TYPE_VTOL_RESERVED5
:
triggers
<<
"SENS_DPRES_OFF"
;
break
;
default:
break
;
triggers
<<
"CAL_MAG0_ID"
<<
"CAL_GYRO0_ID"
<<
"CAL_ACC0_ID"
<<
"CBRK_AIRSPD_CHK"
;
if
(
_vehicle
->
fixedWing
()
&&
_autopilot
->
getParameterFact
(
FactSystem
::
defaultComponentId
,
_airspeedBreaker
)
->
rawValue
().
toInt
()
!=
162128
)
{
triggers
<<
"SENS_DPRES_OFF"
;
}
return
triggers
;
...
...
src/AutoPilotPlugins/PX4/SensorsComponent.h
View file @
fee7929e
...
...
@@ -53,6 +53,8 @@ public:
private:
const
QString
_name
;
QVariantList
_summaryItems
;
static
const
char
*
_airspeedBreaker
;
};
#endif
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