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
920cb7a1
Commit
920cb7a1
authored
7 years ago
by
bresch
Committed by
Daniel Agar
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
VTOL standard - Group multicopter weights in update_vtol_state()
parent
d34767b8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/modules/vtol_att_control/standard.cpp
+10
-12
10 additions, 12 deletions
src/modules/vtol_att_control/standard.cpp
with
10 additions
and
12 deletions
src/modules/vtol_att_control/standard.cpp
+
10
−
12
View file @
920cb7a1
...
...
@@ -162,16 +162,15 @@ void Standard::update_vtol_state()
* For the back transition the pusher motor is immediately stopped and rotors reactivated.
*/
float
mc_weight
=
_mc_roll_weight
;
if
(
!
_attc
->
is_fixed_wing_requested
())
{
// the transition to fw mode switch is off
if
(
_vtol_schedule
.
flight_mode
==
MC_MODE
)
{
// in mc mode
_vtol_schedule
.
flight_mode
=
MC_MODE
;
_mc_roll_weight
=
1.0
f
;
_mc_pitch_weight
=
1.0
f
;
_mc_yaw_weight
=
1.0
f
;
_mc_throttle_weight
=
1.0
f
;
mc_weight
=
1.0
f
;
_pusher_throttle
=
0.0
f
;
_reverse_output
=
0.0
f
;
...
...
@@ -197,10 +196,7 @@ void Standard::update_vtol_state()
}
else
if
(
_vtol_schedule
.
flight_mode
==
TRANSITION_TO_FW
)
{
// failsafe back to mc mode
_vtol_schedule
.
flight_mode
=
MC_MODE
;
_mc_roll_weight
=
1.0
f
;
_mc_pitch_weight
=
1.0
f
;
_mc_yaw_weight
=
1.0
f
;
_mc_throttle_weight
=
1.0
f
;
mc_weight
=
1.0
f
;
_pusher_throttle
=
0.0
f
;
_reverse_output
=
0.0
f
;
...
...
@@ -233,10 +229,7 @@ void Standard::update_vtol_state()
}
else
if
(
_vtol_schedule
.
flight_mode
==
FW_MODE
)
{
// in fw mode
_vtol_schedule
.
flight_mode
=
FW_MODE
;
_mc_roll_weight
=
0.0
f
;
_mc_pitch_weight
=
0.0
f
;
_mc_yaw_weight
=
0.0
f
;
_mc_throttle_weight
=
0.0
f
;
mc_weight
=
0.0
f
;
}
else
if
(
_vtol_schedule
.
flight_mode
==
TRANSITION_TO_FW
)
{
// continue the transition to fw mode while monitoring airspeed for a final switch to fw mode
...
...
@@ -256,6 +249,11 @@ void Standard::update_vtol_state()
}
}
_mc_roll_weight
=
mc_weight
;
_mc_pitch_weight
=
mc_weight
;
_mc_yaw_weight
=
mc_weight
;
_mc_throttle_weight
=
mc_weight
;
// map specific control phases to simple control modes
switch
(
_vtol_schedule
.
flight_mode
)
{
case
MC_MODE
:
...
...
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