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
9da16afc
Commit
9da16afc
authored
12 years ago
by
Simon Wilks
Browse files
Options
Downloads
Patches
Plain Diff
Add support for V for quads with offset arms such as the TBS and SteadiDrone QU4D
parent
d62058ec
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
apps/systemlib/mixer/mixer.h
+1
-0
1 addition, 0 deletions
apps/systemlib/mixer/mixer.h
apps/systemlib/mixer/mixer_multirotor.cpp
+11
-0
11 additions, 0 deletions
apps/systemlib/mixer/mixer_multirotor.cpp
apps/systemlib/mixer/multi_tables
+8
-1
8 additions, 1 deletion
apps/systemlib/mixer/multi_tables
with
20 additions
and
1 deletion
apps/systemlib/mixer/mixer.h
+
1
−
0
View file @
9da16afc
...
...
@@ -418,6 +418,7 @@ public:
enum
Geometry
{
QUAD_X
=
0
,
/**< quad in X configuration */
QUAD_PLUS
,
/**< quad in + configuration */
QUAD_V
,
/**< quad in V configuration */
HEX_X
,
/**< hex in X configuration */
HEX_PLUS
,
/**< hex in + configuration */
OCTA_X
,
...
...
This diff is collapsed.
Click to expand it.
apps/systemlib/mixer/mixer_multirotor.cpp
+
11
−
0
View file @
9da16afc
...
...
@@ -82,6 +82,12 @@ const MultirotorMixer::Rotor _config_quad_plus[] = {
{
0.000000
,
1.000000
,
-
1.00
},
{
-
0.000000
,
-
1.000000
,
-
1.00
},
};
const
MultirotorMixer
::
Rotor
_config_quad_v
[]
=
{
{
-
0.882948
,
0.469472
,
1.00
},
{
0.731354
,
-
0.681998
,
1.00
},
{
0.882948
,
0.469472
,
-
1.00
},
{
-
0.731354
,
-
0.681998
,
-
1.00
},
};
const
MultirotorMixer
::
Rotor
_config_hex_x
[]
=
{
{
-
1.000000
,
0.000000
,
-
1.00
},
{
1.000000
,
0.000000
,
1.00
},
...
...
@@ -121,6 +127,7 @@ const MultirotorMixer::Rotor _config_octa_plus[] = {
const
MultirotorMixer
::
Rotor
*
_config_index
[
MultirotorMixer
::
Geometry
::
MAX_GEOMETRY
]
=
{
&
_config_quad_x
[
0
],
&
_config_quad_plus
[
0
],
&
_config_quad_v
[
0
],
&
_config_hex_x
[
0
],
&
_config_hex_plus
[
0
],
&
_config_octa_x
[
0
],
...
...
@@ -129,6 +136,7 @@ const MultirotorMixer::Rotor *_config_index[MultirotorMixer::Geometry::MAX_GEOME
const
unsigned
_config_rotor_count
[
MultirotorMixer
::
Geometry
::
MAX_GEOMETRY
]
=
{
4
,
/* quad_x */
4
,
/* quad_plus */
4
,
/* quad_v */
6
,
/* hex_x */
6
,
/* hex_plus */
8
,
/* octa_x */
...
...
@@ -184,6 +192,9 @@ MultirotorMixer::from_text(Mixer::ControlCallback control_cb, uintptr_t cb_handl
}
else
if
(
!
strcmp
(
geomname
,
"4x"
))
{
geometry
=
MultirotorMixer
::
QUAD_X
;
}
else
if
(
!
strcmp
(
geomname
,
"4v"
))
{
geometry
=
MultirotorMixer
::
QUAD_V
;
}
else
if
(
!
strcmp
(
geomname
,
"6+"
))
{
geometry
=
MultirotorMixer
::
HEX_PLUS
;
...
...
This diff is collapsed.
Click to expand it.
apps/systemlib/mixer/multi_tables
+
8
−
1
View file @
9da16afc
...
...
@@ -20,6 +20,13 @@ set quad_plus {
180 CW
}
set quad_v
{
62 CCW
-133 CCW
-62 CW
133 CW
}
set hex_x
{
90 CW
-90 CCW
...
...
@@ -60,7 +67,7 @@ set octa_plus {
90 CW
}
set tables
{
quad_x quad_plus hex_x hex_plus octa_x octa_plus
}
set tables
{
quad_x quad_plus
quad_v
hex_x hex_plus octa_x octa_plus
}
proc factors
{
a d
}
{
puts
[
format
"
\t
{ %9.6f, %9.6f, %5.2f },"
[
rcos
[
expr $a + 90
]]
[
rcos $a
]
[
expr -$d
]]}
...
...
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