aboutsummaryrefslogtreecommitdiff
path: root/ROMFS
diff options
context:
space:
mode:
authorpx4dev <px4@purgatory.org>2012-08-11 11:28:05 -0700
committerpx4dev <px4@purgatory.org>2012-08-11 11:28:05 -0700
commita2116d2058df2e44fe2e495063d198111fa1e365 (patch)
tree61002a79a240f0f94343f8e133c593bb2bd3cacc /ROMFS
parent65aec69705069d952c1b3c8d76fda752d7abe539 (diff)
downloadpx4-firmware-a2116d2058df2e44fe2e495063d198111fa1e365.tar.gz
px4-firmware-a2116d2058df2e44fe2e495063d198111fa1e365.tar.bz2
px4-firmware-a2116d2058df2e44fe2e495063d198111fa1e365.zip
Adjust sample mixer configurations and documentation to match new syntax.
Diffstat (limited to 'ROMFS')
-rw-r--r--ROMFS/mixers/FMU_AERT.mix16
-rw-r--r--ROMFS/mixers/FMU_AET.mix12
-rw-r--r--ROMFS/mixers/FMU_RET.mix12
-rw-r--r--ROMFS/mixers/FMU_delta.mix12
-rw-r--r--ROMFS/mixers/FMU_multirotor.mix16
-rw-r--r--ROMFS/mixers/FMU_pass.mix16
-rw-r--r--ROMFS/mixers/README66
7 files changed, 94 insertions, 56 deletions
diff --git a/ROMFS/mixers/FMU_AERT.mix b/ROMFS/mixers/FMU_AERT.mix
index eb46da5fa..d7e317e13 100644
--- a/ROMFS/mixers/FMU_AERT.mix
+++ b/ROMFS/mixers/FMU_AERT.mix
@@ -22,8 +22,8 @@ As there is only one output, if using two servos adjustments to compensate for
differences between the servos must be made mechanically. To obtain the correct
motion using a Y cable, the servos can be positioned reversed from one another.
-M: 2
-S: 0 0 10000 10000 0 -10000 10000
+M: 1
+O: 10000 10000 0 -10000 10000
S: 0 0 10000 10000 0 -10000 10000
Elevator mixer
@@ -35,8 +35,8 @@ depending on the actual configuration it may be necessary to reverse the scaling
factors (to reverse the servo movement) and adjust the offset, scaling and
endpoints to suit.
-M: 2
-S: 0 0 10000 10000 0 -10000 10000
+M: 1
+O: 10000 10000 0 -10000 10000
S: 0 1 10000 10000 0 -10000 10000
Rudder mixer
@@ -48,8 +48,8 @@ depending on the actual configuration it may be necessary to reverse the scaling
factors (to reverse the servo movement) and adjust the offset, scaling and
endpoints to suit.
-M: 2
-S: 0 0 10000 10000 0 -10000 10000
+M: 1
+O: 10000 10000 0 -10000 10000
S: 0 2 10000 10000 0 -10000 10000
Motor speed mixer
@@ -59,6 +59,6 @@ Two scalers total (output, thrust).
This mixer generates a full-range output (-1 to 1) from an input in the (0 - 1)
range. Inputs below zero are treated as zero.
-M: 2
-S: 0 0 10000 10000 0 -10000 10000
+M: 1
+O: 10000 10000 0 -10000 10000
S: 0 3 0 20000 -10000 -10000 10000
diff --git a/ROMFS/mixers/FMU_AET.mix b/ROMFS/mixers/FMU_AET.mix
index 1f1931861..bd7056f7c 100644
--- a/ROMFS/mixers/FMU_AET.mix
+++ b/ROMFS/mixers/FMU_AET.mix
@@ -25,8 +25,8 @@ motion using a Y cable, the servos can be positioned reversed from one another.
Alternatively, output 2 could be used as a second aileron servo output with
separate mixing.
-M: 2
-S: 0 0 10000 10000 0 -10000 10000
+M: 1
+O: 10000 10000 0 -10000 10000
S: 0 0 10000 10000 0 -10000 10000
Elevator mixer
@@ -38,8 +38,8 @@ depending on the actual configuration it may be necessary to reverse the scaling
factors (to reverse the servo movement) and adjust the offset, scaling and
endpoints to suit.
-M: 2
-S: 0 0 10000 10000 0 -10000 10000
+M: 1
+O: 10000 10000 0 -10000 10000
S: 0 1 10000 10000 0 -10000 10000
Output 2
@@ -55,6 +55,6 @@ Two scalers total (output, thrust).
This mixer generates a full-range output (-1 to 1) from an input in the (0 - 1)
range. Inputs below zero are treated as zero.
-M: 2
-S: 0 0 10000 10000 0 -10000 10000
+M: 1
+O: 10000 10000 0 -10000 10000
S: 0 3 0 20000 -10000 -10000 10000
diff --git a/ROMFS/mixers/FMU_RET.mix b/ROMFS/mixers/FMU_RET.mix
index b2fff7224..156fcb129 100644
--- a/ROMFS/mixers/FMU_RET.mix
+++ b/ROMFS/mixers/FMU_RET.mix
@@ -18,8 +18,8 @@ depending on the actual configuration it may be necessary to reverse the scaling
factors (to reverse the servo movement) and adjust the offset, scaling and
endpoints to suit.
-M: 2
-S: 0 0 10000 10000 0 -10000 10000
+M: 1
+O: 10000 10000 0 -10000 10000
S: 0 0 10000 10000 0 -10000 10000
Elevator mixer
@@ -31,8 +31,8 @@ depending on the actual configuration it may be necessary to reverse the scaling
factors (to reverse the servo movement) and adjust the offset, scaling and
endpoints to suit.
-M: 2
-S: 0 0 10000 10000 0 -10000 10000
+M: 1
+O: 10000 10000 0 -10000 10000
S: 0 1 10000 10000 0 -10000 10000
Output 2
@@ -48,6 +48,6 @@ Two scalers total (output, thrust).
This mixer generates a full-range output (-1 to 1) from an input in the (0 - 1)
range. Inputs below zero are treated as zero.
-M: 2
-S: 0 0 10000 10000 0 -10000 10000
+M: 1
+O: 10000 10000 0 -10000 10000
S: 0 3 0 20000 -10000 -10000 10000
diff --git a/ROMFS/mixers/FMU_delta.mix b/ROMFS/mixers/FMU_delta.mix
index b01284ef7..981466704 100644
--- a/ROMFS/mixers/FMU_delta.mix
+++ b/ROMFS/mixers/FMU_delta.mix
@@ -21,13 +21,13 @@ input is inverted between the two servos.
The scaling factor for roll inputs is adjusted to implement differential travel
for the elevons.
-M: 3
-S: 0 0 10000 10000 0 -10000 10000
+M: 2
+O: 10000 10000 0 -10000 10000
S: 0 0 3000 5000 0 -10000 10000
S: 0 1 5000 5000 0 -10000 10000
-M: 3
-S: 0 0 10000 10000 0 -10000 10000
+M: 2
+O: 10000 10000 0 -10000 10000
S: 0 0 5000 3000 0 -10000 10000
S: 0 1 -5000 -5000 0 -10000 10000
@@ -44,7 +44,7 @@ Two scalers total (output, thrust).
This mixer generates a full-range output (-1 to 1) from an input in the (0 - 1)
range. Inputs below zero are treated as zero.
-M: 2
-S: 0 0 10000 10000 0 -10000 10000
+M: 1
+O: 10000 10000 0 -10000 10000
S: 0 3 0 20000 -10000 -10000 10000
diff --git a/ROMFS/mixers/FMU_multirotor.mix b/ROMFS/mixers/FMU_multirotor.mix
index 6175b18e1..362cfdbdf 100644
--- a/ROMFS/mixers/FMU_multirotor.mix
+++ b/ROMFS/mixers/FMU_multirotor.mix
@@ -6,19 +6,19 @@ input range.
Channel group 0, channels 0-3 values 0.0 - 1.0 are scaled to the full output range.
-M: 2
-S: 0 0 10000 10000 0 -10000 10000
+M: 1
+O: 10000 10000 0 -10000 10000
S: 0 0 0 20000 -10000 -10000 10000
-M: 2
-S: 0 0 10000 10000 0 -10000 10000
+M: 1
+O: 10000 10000 0 -10000 10000
S: 0 1 0 20000 -10000 -10000 10000
-M: 2
-S: 0 0 10000 10000 0 -10000 10000
+M: 1
+O: 10000 10000 0 -10000 10000
S: 0 2 0 20000 -10000 -10000 10000
-M: 2
-S: 0 0 10000 10000 0 -10000 10000
+M: 1
+O: 10000 10000 0 -10000 10000
S: 0 3 0 20000 -10000 -10000 10000
diff --git a/ROMFS/mixers/FMU_pass.mix b/ROMFS/mixers/FMU_pass.mix
index 0e8e07a07..e9a81f2bb 100644
--- a/ROMFS/mixers/FMU_pass.mix
+++ b/ROMFS/mixers/FMU_pass.mix
@@ -5,19 +5,19 @@ This file defines passthrough mixers suitable for testing.
Channel group 0, channels 0-3 are passed directly through to the outputs.
-M: 2
-S: 0 0 10000 10000 0 -10000 10000
+M: 1
+O: 10000 10000 0 -10000 10000
S: 0 0 10000 10000 0 -10000 10000
-M: 2
-S: 0 0 10000 10000 0 -10000 10000
+M: 1
+O: 10000 10000 0 -10000 10000
S: 0 1 10000 10000 0 -10000 10000
-M: 2
-S: 0 0 10000 10000 0 -10000 10000
+M: 1
+O: 10000 10000 0 -10000 10000
S: 0 2 10000 10000 0 -10000 10000
-M: 2
-S: 0 0 10000 10000 0 -10000 10000
+M: 1
+O: 10000 10000 0 -10000 10000
S: 0 3 10000 10000 0 -10000 10000
diff --git a/ROMFS/mixers/README b/ROMFS/mixers/README
index 482478fa7..3c740e37a 100644
--- a/ROMFS/mixers/README
+++ b/ROMFS/mixers/README
@@ -62,29 +62,67 @@ followed by a colon are significant. All other lines are ignored, meaning that
explanatory text can be freely mixed with the definitions.
Each file may define more than one mixer; the allocation of mixers to actuators
-is specific to the device reading the mixer definition.
+is specific to the device reading the mixer definition, and the number of
+actuator outputs generated by a mixer is specific to the mixer.
A mixer begins with a line of the form
- M: <scaler count>
+ <tag>: <mixer arguments>
-If the scaler count is zero, the mixer is a placeholder and the device will not
-allocate a mixer for this position. Otherwise, this line is followed by scaler
-definitions matching the given count.
+The tag selects the mixer type; 'M' for a simple summing mixer, 'R' for a
+multirotor mixer, etc.
-A scaler definition is a line of the form:
+Null Mixer
+..........
- S: <group> <index> <-ve scale> <+ve scale> <offset> <lower limit> <upper limit>
+A null mixer consumes no controls and generates a single actuator output whose
+value is always zero. Typically a null mixer is used as a placeholder in a
+collection of mixers in order to achieve a specific pattern of actuator outputs.
-The first scaler definition following the M: line configures the output scaler.
-The <group> and <index> fields are ignored in this case.
+The null mixer definition has the form:
-For the remaining scalers, the <group> value identifies the control group from
-which the scaler will read. Control group 0 is the vehicle attitude control
-group; other group numbers may be assigned for other purposes. The <index> value
-selects the control within the group that will be scaled.
+ Z:
-The remaining fields on the line represent the scaler parameters as discussed
+Simple Mixer
+............
+
+A simple mixer combines zero or more control inputs into a single actuator
+output. Inputs are scaled, and the mixing function sums the result before
+applying an output scaler.
+
+A simple mixer definition begins with:
+
+ M: <control count>
+ O: <-ve scale> <+ve scale> <offset> <lower limit> <upper limit>
+
+If <control count> is zero, the sum is effectively zero and the mixer will
+output a fixed value that is <offset> constrained by <lower limit> and <upper
+limit>.
+
+The second line defines the output scaler with scaler parameters as discussed
above. Whilst the calculations are performed as floating-point operations, the
values stored in the definition file are scaled by a factor of 10000; i.e. an
offset of -0.5 is encoded as -5000.
+
+The definition continues with <control count> entries describing the control
+inputs and their scaling, in the form:
+
+ S: <group> <index> <-ve scale> <+ve scale> <offset> <lower limit> <upper limit>
+
+The <group> value identifies the control group from which the scaler will read,
+and the <index> value an offset within that group. These values are specific to
+the device reading the mixer definition.
+
+When used to mix vehicle controls, mixer group zero is the vehicle attitude
+control group, and index values zero through three are normally roll, pitch,
+yaw and thrust respectively.
+
+The remaining fields on the line configure the control scaler with parameters as
+discussed above. Whilst the calculations are performed as floating-point
+operations, the values stored in the definition file are scaled by a factor of
+10000; i.e. an offset of -0.5 is encoded as -5000.
+
+Multirotor Mixer
+................
+
+The multirotor mixer is not yet defined.