CLI Commands - rotorflight/rotorflight GitHub Wiki

❗ This page is outdated

Rotorflight Wiki is replaced by www.rotorflight.org.


This page documents the CLI Commands that are different from Betaflight.

Please refer to Betaflight Wiki for all compatible commands.

Rotorflight specific CLI Commands

mixer

The mixer class of commands is used to configure the output mixing facility, that is responsible for directing the control commands to the correct output ports.

Without any parameters, the mixer command will print the current mixer configuration.

mixer reset

This command will reset the mixer, and delete all configurations, including input and rule settings.

mixer input

This group of commands is used to configure the mixer input channels.

Without any parameters, it will print the current input settings.

The mixer input channels are:

SR Stabilized Roll
SP Stabilized Pitch
SY Stabilized Yaw
SC Stabilized Collective
ST Stabilized Throttle
CR Commanded Roll
CP Commanded Pitch
CY Commanded Yaw
CC Commanded Collective
CT Commanded Throttle
RR Receiver Roll channel
RP Receiver Pitch channel
RY Receiver Yaw channel
RC Receiver Collective channel
RT Receiver Throttle channel
AUX1 Receiver AUX1 channel
AUX2 Receiver AUX2 channel
AUX3 Receiver AUX3 channel
CH9..CH18 Receiver channels 9..18

mixer input reset

This command will delete all mixer input settings.

mixer input <ch> <min> <max> <rate>

This command will set the minimum <min>, the maximum <max>, and the scaling <rate> for the input channel <ch>.

Please see Manual Setup: Mixer for details.

mixer limit

This command is a subset of mixer input. It only shows the input channel limits, but not the scaling.

Without any parameters, it will print the current input limits.

mixer limit <ch> <min> <max>

This command will set the minimum <min>, the maximum <max>, for the input channel <ch>.

mixer rate

This command is a subset of mixer input. It only shows the input scaling rates, but not the limits.

Without any parameters, it will print the current input scaling rate values.

mixer rate <ch> <rate>

This command will set the scaling to <rate>, for the input channel <ch>.

mixer rule

This group of commands is used to configure the mixer rules.

Without any parameters, it will print the currently configured mixer rules.

mixer rule reset

This command will remove all mixer rules.

mixer rule <index> <op> <input> <output> <rate> <offset> <modes>

This command will configure the mixer rule at position <index>; with operation <op> being one of add,set,mul; using the input channel <input>; modifying the output channel <output>; using rate <rate> and offset <offset>.

If <modes> is set, it is a string of flight mode letters where the rule is active.

The mixer output channels are:

M1 Motor #1
M2 Motor #2
M3 Motor #3
M4 Motor #4
S1 Servo #1
S2 Servo #2
S3 Servo #3
S4 Servo #4
S5 Servo #5
S6 Servo #6
S7 Servo #7
S8 Servo #8

mixer rule <index> del

This command will delete the mixer rule at position <index>.

mixer override

This group of commands is used to override the mixer input channels to constant values.

Without any parameters, it will print the currently active overrides.

Mixer overrides are not stored, they will be reset in the next reboot.

mixer override <input> <value>

This command will set the override on input <input> to the value <value>.

mixer override <input> off

This command will remove override on the mixer input channel <input>.

mixer override <value>

This command will set the override for all mixer input channels to the value <value>.

Typically this is used for setting all channels to 0, although any value can be used.

mixer override off

This command will remove overrides on all mixer input channels.


servo

The servo group of commands is used to configure the servos.

Without any parameters, the servo command will print the current servo configuration.

servo status

This command will print the current servo positions in [us].

servo <index> <center> <min> <max> <rate> <trim> <speed>

This command will configure servo number <index>; with center point at <center> microseconds; with mimumum position <min> relative to the center; with maximum position <max> relative to the center; with rate <rate>; with center trim <trim>; and with speed <speed>.

The <center> is the PWM signal lenght that will move the servo to its center position.

The <min> and <max> are the travel limits of the servo, relative to the center position.

The <rate> is a scaling factor - the pulse length required to move the servo 60deg. Negative value reverses the servo movement.

The <speed> is a speed limit, measured in ms/60deg. A value 0 disables the limit.

servo trim <index> <value>

This command will change the trim of the servo number <index> to the value <value>.

servo speed <index> <value>

This command will change the speed of the servo number <index> to the value <value>.

servo reverse <index>

This command will reverse the servo number <index>, by negating the <rate> value.

servo override

This group of commands is used to override the servo inputs to constant values.

Without any parameters, it will print the currently active overrides.

Servo overrides are not stored, they will be reset in the next reboot.

servo override <index> <value>

This command will set the override on the servo <index> to the value <value>.

servo override <index> off

This command will remove override on the servo <index>.

servo override <value>

This command will set the override for all servos to the value <value>.

Typically this is used for setting all servos to 0, although any value can be used.

servo override off

This command will remove overrides on all servos.


motor

The motor group of commands is used for configuring the motors.

Without any parameters, the motor command will print the current motor output values.

motor status

Same as above.

motor override

This group of commands is used to override the motor outputs to constant values.

Without any parameters, it will print the currently active overrides.

Motor overrides are not stored, they will be reset in the next reboot.

motor override <index> <value>

This command will set the override on the motor <index> to the value <value>.

motor override <index> off

This command will remove override on the motor <index>.

motor override <value>

This command will set the override for all motors to the value <value>.

Typically this is used for setting all motors to 0 throttle, although any value can be used.

motor override off

This command will remove overrides on all motors.


adjfunc

The adjfunc command is used to configure the RC Adjustments, i.e. the ability to change tuning parameters with the tx, using AUX channels.

The RC Adjustments are configured with a new CLI command adjfunc, which replaces the old BF command adjrange.

adjfunc <index> <ena.ch> <low> <high> <func> <ctrl.ch> <step> <min> <max>

It is possible to have up to 32 adjustments configured, each identified with an unique <index>.

The adjustment is active, when the AUX channel <ena.ch> is withint range <low>..<high>. Then, the adjustment function <func> is applied. If <step> is zero, the control channel <ctrl.ch> position (1000..2000us) is scaled to the parameter range <min>..<max>. If <step> is non-zero, the AUX channel <ctrl.ch> is handled as a three position switch (usually a trim switch), incrementing/decrementing the tuning parameter with stepsize, limited by <min> and <max>.

All inflight adjustments take effect immediately, and are saved to the config. They are also included in the blackbox log.


Deleted CLI Commands

This is a list of Betaflight CLI commands that are not available in Rotorflight.

smix

mmix

adjrange

These commands are replaced with a more generic implemetation in Rotorflight.

⚠️ **GitHub.com Fallback** ⚠️