Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Firmware
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
Package Registry
Model registry
Operate
Environments
Terraform modules
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alberto Ruiz Garcia
Firmware
Commits
c665c34d
Commit
c665c34d
authored
6 years ago
by
Beat Küng
Browse files
Options
Downloads
Patches
Plain Diff
MC stabilized: allow yaw control at 0 throttle if yaw-airmode is selected
parent
24dc3169
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/modules/mc_att_control/mc_att_control.hpp
+3
-1
3 additions, 1 deletion
src/modules/mc_att_control/mc_att_control.hpp
src/modules/mc_att_control/mc_att_control_main.cpp
+1
-1
1 addition, 1 deletion
src/modules/mc_att_control/mc_att_control_main.cpp
with
4 additions
and
2 deletions
src/modules/mc_att_control/mc_att_control.hpp
+
3
−
1
View file @
c665c34d
...
...
@@ -269,7 +269,9 @@ private:
(
ParamFloat
<
px4
::
params
::
MPC_MANTHR_MIN
>
)
_man_throttle_min
,
/**< minimum throttle for stabilized */
(
ParamFloat
<
px4
::
params
::
MPC_THR_MAX
>
)
_throttle_max
,
/**< maximum throttle for stabilized */
(
ParamFloat
<
px4
::
params
::
MPC_THR_HOVER
>
)
_throttle_hover
,
/**< throttle at which vehicle is at hover equilibrium */
(
ParamInt
<
px4
::
params
::
MPC_THR_CURVE
>
)
_throttle_curve
/**< throttle curve behavior */
(
ParamInt
<
px4
::
params
::
MPC_THR_CURVE
>
)
_throttle_curve
,
/**< throttle curve behavior */
(
ParamInt
<
px4
::
params
::
MC_AIRMODE
>
)
_airmode
)
matrix
::
Vector3f
_attitude_p
;
/**< P gain for attitude control */
...
...
This diff is collapsed.
Click to expand it.
src/modules/mc_att_control/mc_att_control_main.cpp
+
1
−
1
View file @
c665c34d
...
...
@@ -438,7 +438,7 @@ MulticopterAttitudeControl::generate_attitude_setpoint(float dt, bool reset_yaw_
if
(
reset_yaw_sp
)
{
_man_yaw_sp
=
yaw
;
}
else
if
(
_manual_control_sp
.
z
>
0.05
f
)
{
}
else
if
(
_manual_control_sp
.
z
>
0.05
f
||
_airmode
.
get
()
==
(
int32_t
)
Mixer
::
Airmode
::
roll_pitch_yaw
)
{
const
float
yaw_rate
=
math
::
radians
(
_yaw_rate_scaling
.
get
());
attitude_setpoint
.
yaw_sp_move_rate
=
_manual_control_sp
.
r
*
yaw_rate
;
...
...
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