INAV Mixer Functions Explained
I. Mixer and Platform Type
Mixing Rules
Mixing rules determine how servos and motors respond to user inputs and flight controller outputs. INAV supports multiple predefined mixing configurations as well as custom mixing rules.
Configuration Methods
Mixing settings can be configured through the Mixer tab in the graphical user interface (GUI), or via CLI using the following commands:
- mmix: Configure motor mixing rules
- smix: Configure servo mixing rules
How to Use Predefined Mixing
- First, select the corresponding platform type
- Then, select the mixing preset that matches your aircraft
- Use the following buttons:
- Load and apply: Load the mixing configuration, save, and prompt for a flight controller reboot
- Load mixer: Only load the mixing preset (editable), after editing click Save and Reboot to save and restart
Platform Type
Platform type determines available features, such as supported flight modes, flap support, and optional mixing preset types. It can be set through the Mixer page in the GUI or via theplatform_typeparameter in CLI.
INAV currently supports the following platform types: - MULTIROTOR
- AIRPLANE
- TRICOPTER
II. Custom Mixing Rule Configuration Guide
2.1 Motor Mixing
Each motor requires a mixing rule. Each rule defines the response weight of that motor based on throttle and three-axis flight maneuvers (roll, pitch, yaw). The higher the weight, the greater the impact of the input on motor speed.
| Weight Item | Meaning |
|---|---|
| THROTTLE | Motor response strength to throttle, range [0.0, 1.0]. For example: 0.5 means the motor receives half of the throttle output. |
| ROLL | Motor's contribution to roll rate, range [-1.0, 1.0]. Typically set to 0 for fixed-wing. Positive values mean acceleration during right roll. |
| PITCH | Motor's contribution to pitch rate, range [-1.0, 1.0]. Typically set to 0 for fixed-wing. Positive values mean acceleration during dive. |
| YAW | Motor's contribution to yaw rate, range [-1.0, 1.0]. Used for differential control on multi-motor fixed-wing aircraft. Usually 0 for single motors. |
CLI Configuration Commands:
- Clear all motor mixing rules: mmix reset
- View current rules: mmix
- Set motor mixing rule (for motor n): mmix <n> <throttle> <roll> <pitch> <yaw>
- To disable a rule, set throttle to 0.
2.2 Servo Mixing
Each servo requires at least one mixing rule. The rule defines how the servo responds to a specific input, such as RC channels or flight controller attitude commands.
- Servo index: Specifies the servo number for which the rule applies. The actual value is not important; the relative order determines the corresponding servo output channel.
- Input type: The type of input that the mixing rule is based on (e.g., ROLL, PITCH, CH1, etc.).
- Weight: The degree of influence the input has on the servo output, range [-1000, 1000]. For example: input value × weight = output value. If the output exceeds the servo's max/min limits, it will be clipped (i.e., the servo will not exceed its travel range).
- Speed limit: Restricts the servo movement speed. 1 means a maximum change of 10 microseconds per second; 0 means no limit. For example: 10 means a full sweep from 1000 to 2000 takes 10 seconds; 100 means a full sweep takes 1 second.
smix Command Explanation (Servo Mixing Rules)
- smix reset: Clear all existing servo mixing rules.
- smix: When used without parameters, lists all current servo mixing rules.
- Add/modify rule syntax: smix <n> <servo_index> <input_id> <weight> <speed> <logic_condition_id>
- <n>: Mixing rule number (integer, used for indexing rules)
- <servo_index>: Servo index (which servo)
- <input_id>: Input source number (see table below)
- <weight>: Weight ([-1000, 1000], represents the proportion of input)
- <speed>: Response speed limit (0 = no limit; higher values are slower)
- <logic_condition_id>: Logic control condition (set to -1 to always enable)
- To disable a rule, set weight to 0.
Input ID Reference Table
| CLI Input ID | Input Type | Description |
|---|---|---|
| 0 | Stabilized ROLL | Roll control command from flight controller (depends on flight mode) |
| 1 | Stabilized PITCH | Pitch control command from flight controller |
| 2 | Stabilized YAW | Yaw control command from flight controller |
| 3 | Stabilized THROTTLE | Throttle control command from flight controller |
| 4 | RC Roll Channel | Raw RC roll channel input |
| 5 | RC Pitch Channel | Raw RC pitch channel input |
| 6 | RC Yaw Channel | Raw RC yaw channel input |
| 7 | RC Throttle Channel | Raw RC throttle channel input |
| 8~11 | RC Channels 5~8 | Raw RC channel inputs |
| 12 | GIMBAL PITCH | Aircraft pitch attitude angle, range [-90°, 90°] => [-500, 500] |
| 13 | GIMBAL ROLL | Aircraft roll attitude angle, range [-180°, 180°] => [-500, 500] |
| 14 | FLAPS Function Input | Set value when flap mode is enabled, 0 when disabled |
| 15~22 | RC Channels 9~16 | Additional RC channel inputs |
| 23~28 | Unidirectional Stabilized Output (+/-) | Positive/negative components of roll, pitch, yaw directions |
| 29 | MAX | Constant value 500 (can be used for testing or special logic) |
| ————This article is referenced from the INAV official website: https://github.com/iNavFlight/inav/blob/master/docs/Mixer.md |