Skip to content

Commit

Permalink
simple mixer: make output scalers O: optional and use default values …
Browse files Browse the repository at this point in the history
…instead

Reduces FLASH usage by about 4KB

Command to replace:
for i in *.mix; do sed -r -i '/O: +10000 +10000 +0 +-10000 +10000/d' $i; done
  • Loading branch information
bkueng authored and dagar committed May 24, 2018
1 parent b03cfd9 commit 556d682
Show file tree
Hide file tree
Showing 42 changed files with 53 additions and 147 deletions.
9 changes: 0 additions & 9 deletions ROMFS/px4fmu_common/mixers/AAERTWF.main.mix
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,10 @@ factors (to reverse the servo movement) and adjust the offset, scaling and
endpoints to suit.

M: 2
O: 10000 10000 0 -10000 10000
S: 0 0 10000 10000 0 -10000 10000
S: 0 6 10000 10000 0 -10000 10000

M: 2
O: 10000 10000 0 -10000 10000
S: 0 0 10000 10000 0 -10000 10000
S: 0 6 -10000 -10000 0 -10000 10000

Expand All @@ -38,7 +36,6 @@ factors (to reverse the servo movement) and adjust the offset, scaling and
endpoints to suit.

M: 1
O: 10000 10000 0 -10000 10000
S: 0 1 -10000 -10000 0 -10000 10000

Rudder mixer
Expand All @@ -51,7 +48,6 @@ factors (to reverse the servo movement) and adjust the offset, scaling and
endpoints to suit.

M: 1
O: 10000 10000 0 -10000 10000
S: 0 2 10000 10000 0 -10000 10000

Motor speed mixer
Expand All @@ -62,7 +58,6 @@ 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: 1
O: 10000 10000 0 -10000 10000
S: 0 3 0 20000 -10000 -10000 10000

Wheel mixer
Expand All @@ -75,7 +70,6 @@ factors (to reverse the servo movement) and adjust the offset, scaling and
endpoints to suit.

M: 1
O: 10000 10000 0 -10000 10000
S: 0 2 10000 10000 0 -10000 10000


Expand All @@ -84,13 +78,10 @@ using the payload control group
-----------------------------------------------------

M: 1
O: 10000 10000 0 -10000 10000
S: 0 4 10000 10000 0 -10000 10000

M: 1
O: 10000 10000 0 -10000 10000
S: 2 0 10000 10000 0 -10000 10000

M: 1
O: 10000 10000 0 -10000 10000
S: 2 2 10000 10000 0 -10000 10000
8 changes: 0 additions & 8 deletions ROMFS/px4fmu_common/mixers/AAVVTWFF.main.mix
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,10 @@ factors (to reverse the servo movement) and adjust the offset, scaling and
endpoints to suit.

M: 2
O: 10000 10000 0 -10000 10000
S: 0 0 10000 10000 0 -10000 10000
S: 0 6 10000 10000 0 -10000 10000

M: 2
O: 10000 10000 0 -10000 10000
S: 0 0 10000 10000 0 -10000 10000
S: 0 6 -10000 -10000 0 -10000 10000

Expand All @@ -37,12 +35,10 @@ On the assumption that the two tail servos are physically reversed, the pitch
input is inverted between the two servos.

M: 2
O: 10000 10000 0 -10000 10000
S: 0 2 -7000 -7000 0 -10000 10000
S: 0 1 -8000 -8000 0 -10000 10000

M: 2
O: 10000 10000 0 -10000 10000
S: 0 2 -7000 -7000 0 -10000 10000
S: 0 1 8000 8000 0 -10000 10000

Expand All @@ -54,7 +50,6 @@ 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: 1
O: 10000 10000 0 -10000 10000
S: 0 3 0 20000 -10000 -10000 10000

Wheel mixer
Expand All @@ -67,18 +62,15 @@ factors (to reverse the servo movement) and adjust the offset, scaling and
endpoints to suit.

M: 1
O: 10000 10000 0 -10000 10000
S: 0 2 -10000 -10000 0 -10000 10000

Flaps mixer
------------
Flap servos are physically reversed.

M: 1
O: 10000 10000 0 -10000 10000
S: 0 4 0 5000 -10000 -10000 10000

M: 1
O: 10000 10000 0 -10000 10000
S: 0 4 0 -5000 10000 -10000 10000

5 changes: 0 additions & 5 deletions ROMFS/px4fmu_common/mixers/AERT.main.mix
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ 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: 1
O: 10000 10000 0 -10000 10000
S: 0 0 10000 10000 0 -10000 10000

CH2: Elevator mixer
Expand All @@ -36,7 +35,6 @@ factors (to reverse the servo movement) and adjust the offset, scaling and
endpoints to suit.

M: 1
O: 10000 10000 0 -10000 10000
S: 0 1 -10000 -10000 0 -10000 10000

CH3: Rudder mixer
Expand All @@ -49,7 +47,6 @@ factors (to reverse the servo movement) and adjust the offset, scaling and
endpoints to suit.

M: 1
O: 10000 10000 0 -10000 10000
S: 0 2 10000 10000 0 -10000 10000

CH4: Motor speed mixer
Expand All @@ -60,7 +57,6 @@ 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: 1
O: 10000 10000 0 -10000 10000
S: 0 3 0 20000 -10000 -10000 10000

CH5: Flaps mixer
Expand All @@ -77,5 +73,4 @@ Ch6: Landing gear mixer
By default pass-through of gear switch

M: 1
O: 10000 10000 0 -10000 10000
S: 3 5 10000 10000 0 -10000 10000
5 changes: 0 additions & 5 deletions ROMFS/px4fmu_common/mixers/AETRFG.main.mix
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ 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: 1
O: 10000 10000 0 -10000 10000
S: 0 0 10000 10000 0 -10000 10000

CH2: Elevator mixer
Expand All @@ -36,7 +35,6 @@ factors (to reverse the servo movement) and adjust the offset, scaling and
endpoints to suit.

M: 1
O: 10000 10000 0 -10000 10000
S: 0 1 -10000 -10000 0 -10000 10000

CH3: Motor speed mixer
Expand All @@ -47,7 +45,6 @@ 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: 1
O: 10000 10000 0 -10000 10000
S: 0 3 0 20000 -10000 -10000 10000

CH4: Rudder mixer
Expand All @@ -60,7 +57,6 @@ factors (to reverse the servo movement) and adjust the offset, scaling and
endpoints to suit.

M: 1
O: 10000 10000 0 -10000 10000
S: 0 2 10000 10000 0 -10000 10000

CH5: Flaps mixer
Expand All @@ -77,5 +73,4 @@ CH6: Landing gear mixer
By default pass-through of gear switch

M: 1
O: 10000 10000 0 -10000 10000
S: 3 5 10000 10000 0 -10000 10000
5 changes: 0 additions & 5 deletions ROMFS/px4fmu_common/mixers/CCPM.main.mix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Output 0 - Rear Servo Mixer
Rear Servo = Collective (Thrust - 3) + Elevator (Pitch - 1)

M: 2
O: 10000 10000 0 -10000 10000
S: 0 3 10000 10000 0 -10000 10000
S: 0 1 10000 10000 0 -10000 10000

Expand All @@ -18,7 +17,6 @@ Output 1 - Left Servo Mixer
Left Servo = Collective (Thurst - 3) - 0.5 * Elevator (Pitch - 1) + 0.866 * Aileron (Roll - 0)

M: 3
O: 10000 10000 0 -10000 10000
S: 0 3 -10000 -10000 0 -10000 10000
S: 0 1 -5000 -5000 0 -10000 10000
S: 0 0 8660 8660 0 -10000 10000
Expand All @@ -30,7 +28,6 @@ Right Servo = Collective (Thurst - 3) - 0.5 * Elevator (Pitch - 1) - 0.866 * Ail


M: 3
O: 10000 10000 0 -10000 10000
S: 0 3 -10000 -10000 0 -10000 10000
S: 0 1 -5000 -5000 0 -10000 10000
S: 0 0 -8660 -8660 0 -10000 10000
Expand All @@ -40,7 +37,6 @@ Output 3 - Tail Servo Mixer
Tail Servo = Yaw (control index = 2)

M: 1
O: 10000 10000 0 -10000 10000
S: 0 2 10000 10000 0 -10000 10000


Expand All @@ -49,5 +45,4 @@ Output 4 - Motor speed mixer
This would be the motor speed control output from governor power demand- not sure what index to use here?

M: 1
O: 10000 10000 0 -10000 10000
S: 0 4 0 20000 -10000 -10000 10000
4 changes: 0 additions & 4 deletions ROMFS/px4fmu_common/mixers/FMU_pass.mix
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,14 @@ This file defines passthrough mixers suitable for testing.
Channel group 0, channels 0-3 are passed directly through to the outputs.

M: 1
O: 10000 10000 0 -10000 10000
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: 1
O: 10000 10000 0 -10000 10000
S: 0 2 10000 10000 0 -10000 10000

M: 1
O: 10000 10000 0 -10000 10000
S: 0 3 10000 10000 0 -10000 10000

3 changes: 0 additions & 3 deletions ROMFS/px4fmu_common/mixers/FX79.main.mix
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,10 @@ The scaling factor for roll inputs is adjusted to implement differential travel
for the elevons.

M: 2
O: 10000 10000 0 -10000 10000
S: 0 0 8500 8500 0 -10000 10000
S: 0 1 9500 9500 0 -10000 10000

M: 2
O: 10000 10000 0 -10000 10000
S: 0 0 8500 8500 0 -10000 10000
S: 0 1 -9500 -9500 0 -10000 10000

Expand All @@ -49,5 +47,4 @@ 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: 1
O: 10000 10000 0 -10000 10000
S: 0 3 0 20000 -10000 -10000 10000
8 changes: 0 additions & 8 deletions ROMFS/px4fmu_common/mixers/IO_pass.main.mix
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,25 @@ This file defines passthrough mixers suitable for testing.
Channel group 0, channels 0-7 are passed directly through to the outputs.

M: 1
O: 10000 10000 0 -10000 10000
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: 1
O: 10000 10000 0 -10000 10000
S: 0 2 10000 10000 0 -10000 10000

M: 1
O: 10000 10000 0 -10000 10000
S: 0 3 10000 10000 0 -10000 10000

M: 1
O: 10000 10000 0 -10000 10000
S: 0 4 10000 10000 0 -10000 10000

M: 1
O: 10000 10000 0 -10000 10000
S: 0 5 10000 10000 0 -10000 10000

M: 1
O: 10000 10000 0 -10000 10000
S: 0 6 10000 10000 0 -10000 10000

M: 1
O: 10000 10000 0 -10000 10000
S: 0 7 10000 10000 0 -10000 10000
6 changes: 0 additions & 6 deletions ROMFS/px4fmu_common/mixers/Viper.main.mix
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,10 @@ The scaling factor for roll inputs is adjusted to implement differential travel
for the elevons.

M: 2
O: 10000 10000 0 -10000 10000
S: 0 0 7500 7500 0 -10000 10000
S: 0 1 8000 8000 0 -10000 10000

M: 2
O: 10000 10000 0 -10000 10000
S: 0 0 7500 7500 0 -10000 10000
S: 0 1 -8000 -8000 0 -10000 10000

Expand All @@ -49,23 +47,19 @@ 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: 1
O: 10000 10000 0 -10000 10000
S: 0 3 0 20000 -10000 -10000 10000

Inputs to the mixer come from channel group 2 (payload), channels 0
(bay servo 1), 1 (bay servo 2) and 3 (drop release).
-----------------------------------------------------

M: 1
O: 10000 10000 0 -10000 10000
S: 2 0 10000 10000 0 -10000 10000

M: 1
O: 10000 10000 0 -10000 10000
S: 2 1 10000 10000 0 -10000 10000

M: 1
O: 10000 10000 0 -10000 10000
S: 2 2 -8000 -8000 0 -10000 10000


1 change: 0 additions & 1 deletion ROMFS/px4fmu_common/mixers/blade130.main.mix
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@ S: 220 13054 10000 0 -8000 8000

# Tail servo:
M: 1
O: 10000 10000 0 -10000 10000
S: 0 2 10000 10000 0 -10000 10000
3 changes: 0 additions & 3 deletions ROMFS/px4fmu_common/mixers/caipi.main.mix
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,10 @@ The scaling factor for roll inputs is adjusted to implement differential travel
for the elevons.

M: 2
O: 10000 10000 0 -10000 10000
S: 0 0 8000 8000 0 -10000 10000
S: 0 1 9000 9000 0 -10000 10000

M: 2
O: 10000 10000 0 -10000 10000
S: 0 0 8000 8000 0 -10000 10000
S: 0 1 -9000 -9000 0 -10000 10000

Expand All @@ -47,5 +45,4 @@ 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: 1
O: 10000 10000 0 -10000 10000
S: 0 3 0 20000 -10000 -10000 10000
3 changes: 0 additions & 3 deletions ROMFS/px4fmu_common/mixers/claire.aux.mix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ Tilt mechanism servo mixer

M: 1

O: 10000 10000 0 -10000 10000

S: 1 4 10000 10000 0 -10000 10000

Expand All @@ -21,11 +20,9 @@ Elevon mixers

M: 2

O: 10000 10000 0 -10000 10000
S: 1 0 -7500 -7500 0 -10000 10000
S: 1 1 7500 7500 0 -10000 10000

M: 2
O: 10000 10000 0 -10000 10000
S: 1 0 -7500 -7500 0 -10000 10000
S: 1 1 -7500 -7500 0 -10000 10000
Loading

0 comments on commit 556d682

Please sign in to comment.