Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
qgroundcontrol
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Valentin Platzgummer
qgroundcontrol
Commits
b6394af0
Commit
b6394af0
authored
9 years ago
by
Don Gagne
Browse files
Options
Downloads
Patches
Plain Diff
Remove MIN/MAX/TRIM as cal trigger
parent
1d376dbf
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/AutoPilotPlugins/PX4/RadioComponent.cc
+2
-37
2 additions, 37 deletions
src/AutoPilotPlugins/PX4/RadioComponent.cc
with
2 additions
and
37 deletions
src/AutoPilotPlugins/PX4/RadioComponent.cc
+
2
−
37
View file @
b6394af0
...
...
@@ -67,32 +67,6 @@ bool RadioComponent::setupComplete(void) const
}
}
// Check for min/max/trim defaults for channel 1-4
static
const
int
rcMinDefault
=
1000
;
static
const
int
rcMaxDefault
=
2000
;
static
const
int
rcTrimDefault
=
1500
;
for
(
int
i
=
1
;
i
<
5
;
i
++
)
{
QVariant
value
;
int
rcMin
,
rcMax
,
rcTrim
;
QString
param
;
param
=
QString
(
"RC%1_MIN"
).
arg
(
i
);
rcMin
=
_autopilot
->
getParameterFact
(
FactSystem
::
defaultComponentId
,
param
)
->
value
().
toInt
();
param
=
QString
(
"RC%1_MAX"
).
arg
(
i
);
rcMax
=
_autopilot
->
getParameterFact
(
FactSystem
::
defaultComponentId
,
param
)
->
value
().
toInt
();
param
=
QString
(
"RC%1_TRIM"
).
arg
(
i
);
rcTrim
=
_autopilot
->
getParameterFact
(
FactSystem
::
defaultComponentId
,
param
)
->
value
().
toInt
();
if
(
rcMin
==
rcMinDefault
&&
rcMax
==
rcMaxDefault
&&
rcTrim
==
rcTrimDefault
)
{
return
false
;
}
}
return
true
;
}
...
...
@@ -112,20 +86,11 @@ QStringList RadioComponent::setupCompleteChangedTriggerList(void) const
{
QStringList
triggers
;
// The best we can do to detect the need for a radio calibration is look for trim/min/max still being
// at defaults. We also look for attitude controls to be mapped. But since they default to channels
// they are not a very reliable source.
// The best we can do to detect the need for a radio calibration is look for attitude
// controls to be mapped.
// Attitude control mapping is always a trigger
triggers
<<
"RC_MAP_ROLL"
<<
"RC_MAP_PITCH"
<<
"RC_MAP_YAW"
<<
"RC_MAP_THROTTLE"
;
// We also trigger on min/max/trim for channels 1-4 which would normally be the attitude
// control channels. This may not always be the case, but it's the best we can
triggers
<<
"RC1_MIN"
<<
"RC1_MAX"
<<
"RC1_TRIM"
;
triggers
<<
"RC2_MIN"
<<
"RC2_MAX"
<<
"RC2_TRIM"
;
triggers
<<
"RC3_MIN"
<<
"RC3_MAX"
<<
"RC3_TRIM"
;
triggers
<<
"RC4_MIN"
<<
"RC4_MAX"
<<
"RC4_TRIM"
;
return
triggers
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment