Betaflight

What is CLI ?

Uncertain about what to buy? Check out THE ULTIMATE FPV SHOPPING LIST: ME ON PATREON at: http. Betaflight developers for the Betaflight resource remapping documentation: Joshua Bardwell’s video on Betaflight 3.1 Resource Remapping. If you found this post helpful, it would be super cool if you purchased the components from my store or purchase items from my Amazon links. These posts are expensive and take a loooong time to make so the.

Betaflight is a flight controller software (firmware) to fly multi-rotor craft and glued wing crafts. This software is different from Baseflight and Cleanflight. It puts attention on flight performance, leading-edge feature additions, as well as wide target support. This is why many people use Betaflight with their drone. Betaflight Configurator is a configuration tool for the Betaflight flight control system. It allows you to configure the Betaflight software running on any supported Betaflight target. Betaflight is a flight controller software (firmware) used to fly multi-rotor craft and fixed wing craft. Betaflight app uses your system's WebKit rendering engine instead of Chrome, consuming way less memory.

CLI is abbreviation of the a Command Line Interface. It is special configuration mode where commands are given insted of the dedicated setting controls and inputs. Every flight controllers firmware configurator (Cleanflight, Betaflight, Butterflight, iNav, etc) has this mode. It is useful for more specific change of settings and detailed configuration the Flight Controller. It is also usefur for dumping the whole flight controller configuration, backuping and restoring the settings in the easy way. Read more about it below.

How to use CLI?

In order to start using CLI you have to connect to your flight controller with configurator software (See here how to install the standalone configurator software). Click on the “CLI” tab – this will enable flight controllers CLI mode. Write the command in the input field and hit the [Enter] to execute it.

You need to execute save command if you want all the commands and changes to be saved into Flight Controllers memory. Saving will reboot the flight controller. Close the CLI tab or send the exit command to exit the CLI mode without saving.

CLI Dump or Diff?

dump command dumps all the setting of the flight controller. This can be quite a long list
diff command was introduced in the BetaFlight version 3.0 and it dumps only the settings that are different from the defaults.
diff all command dumps only differencies from the defaults but also dumps all the PID profiles.

It is highly recommended to use diff instead of the dump as it results in the significant smaller settings list and only the ones that were changed or differ from the defaults.

BetaflightBetaflight

How to Backup/Restore the settings using CLI?

Sometimes it is usefull to save the Flight Controller settings and restore them in case you need. These cases include FC firmware upgrade, restoring the FC to the point where it worked and etc. Backuping and restoring is very simple task.

Backup: Go to CLI, enter diff (or diff all if you have multiple PID profiles) and copy the provided text to anywhere just to save it for later use.

Restore: Go to CLI, paste the saved settings text to the command input field, hit [Enter]. Your FC settings are restored. Don’t forget to save the settings.

CLI commands list

CommandDescription
1wire <esc>passthrough 1wire to the specified esc
adjrangeshow/set adjustment ranges settings
auxshow/set aux settings
colorconfigure colors
defaultsreset controller to defaults and reboot
dumpprint configurable settings in a pastable form
diffdump only the settings that are different from the defaults. Includes only the current PID profile.
diff alldump only the settings that are different from the defaults. Includes ALL PID profiles.
exitexit without saving
featurelist or -val or val
getget the value of the specified variable
gpspassthroughpassthrough gps to serial
helplists all commands
ledconfigure leds
mapmapping of rc channel order
mixermixer name or list
mode_colorconfigure mode colors
motorget/set motor output value
play_soundindex, or none for next
profileindex (0 to 2)
rateprofileindex (0 to 2)
rxrangeconfigure rx channel ranges (end-points)
rxfailshow/set rx failsafe settings
savesave settings and reboot
serialpassthroughserial passthrough mode, reset board to exit
setset the the given value to the variable. (name=value or blank or * for list)
statusshow system status
versionshow version
serialconfigure serial ports
servoconfigure servos
sd_infosdcard info
tasksshow task stats
mmixdesign custom motor mixer
smixdesign custom servo mixer

Note that specific command list depends on the type of the firmware (BetaFlight, Butterflight, iNav) and firmware version you are using. For exact list of the commands type help in CLI mode.

Usefull CLI commands

bl or dfu command to enter the DFU mode without pushing the button. Reboots the FC board in bootloader mode.

set small_angle = 180 – sets any angle your quadcopter will be able to arm. Usefull when you land unexpectedly severely angled and you are unable to re-arm.

set ledstrip_visual_beeper = ON – When set to on, and the LEDLOW mode is active (i.e. LED strip off), blink the LED strip in synch with beeping, as a visual indicator in cases where the craft is too far away for the beeper to be heard / multiple craft are flying. Values available: [ON,OFF (default)]

Binding with integrated Receivers (connected via SPI):

For Betaflight 4.x – command bind_rx_spi
For Betaflight 3.x: – command frsky_bind
Don’t forget to issue save command after the sucessfull bind.

History:
2018-05-23 – article created
2019-02-13 – Usefull CLI commands updated
2019-07-01 – Usefull CLI commands updated

  • Guide: How to Arm, PreArm and start your quad
    What is Arm and why do we need it? All modern quadcopters (or any
  • ExpressLRS – Open Source Long Range radio control system – Complete Guide
    ExpressLRS is the Open Source Long Range radio control system, developed by Alessandro Carcione (aka AlessandroAU)

When it comes to flying the drone, you will surely need a flight controller. While the flight controller does allow you to fly the drone, the flight controller is actually controlled by what we call the firmware, or otherwise known as the software too. It is akin to having a mobile phone which is powered by software, depending on the brand of the phone that you are getting.

4.3

And as per all software, all of these have their own features as well as distinctive functions. The world’s two most popular firmware for the flight controller is actually the cleanflight as well as the betaflight. Since you have a choice between the cleanflight and the betaflight, which of these will be more suited for you? Let us first find out what exactly is the cleanflight as well as the betaflight

Contents

What Is Cleanflight

Cleanflight is a software that is installed onto flight controllers. It can be used for all multirotor as well as the fixed-wing aircraft. As such, you can expect this open-source software to control all sorts of movement.

Here are a list of the features as well as the benefits of it.

  • Superior flight performance: It is proven to be stable and responsive to your controls.
  • Open-source: Since the source is on github, you can make various modifications as well as suggestions to further improvement of this source code.
  • 32-bit software: Much superior to the old 8-bit infrastructure.
  • Active developers: When you select a software, you have to ensure that the developers are willing to listen to real user feedback.
  • Wide support: Currently, cleanflight can be used on 8 different boards, which allows you to fully customize the type of flight controller board that you wish to use.

As you can see, by having cleanflight installed, you are allowing for a wide range of tricks as well as enhanced performance when you drive the flying device around.

Betaflight

What Is Betaflight

Similar to the cleanflight, the betaflight is one of the most widely used firmware amongst the multirotor as well as the fixed-wing aircraft drivers. As the name suggests, it was initially a ‘beta’ version of cleanflight. Back then, Boris B. started to experiment by designing the betaflight by creating a fork out of cleanflight. The initial purpose was just to test out new features that are not present in cleanflight. As such, you can expect that the features are actually targeted towards advanced users of the devices. Eventually, after many changes to the codes and stuff, people started to realize that the betaflight does provide a higher flight stability than other firmware, and hence it started to penetrate even the beginner market.

Here are some of the features of the betaflight.

  • Control camera settings: It allows you to control VTC as well as the camera setting via the flight controller itself.
  • Open-source: similar to the cleanflight, betaflight completely open source.
  • Flight performance: You can be assured of a superior flight performance when using betaflight in your flight controller
  • Better OSD: The on-screen display does allow you to switch out profiles easily. Also, during the video feed, the OSD will display all the information that you will need. It also allows the drag-and-drop of numbers such as the battery life of the flying device itself.
  • Safety features: This is something that is missing in cleanflight. With the betaflight, you can be assured of accidents being minimized due to the safety rules provided in the firmware itself. Other safety features include the shutdown of the flying device when the orientation of the motor is wrong.

So, Which Is Better?

In the fight of betaflight vs cleanflight, who is the winner? Perhaps the table below can help to shed some light into this.

CleanflightBetaflight
Flight StabilityResponsive but not that accurateExtremely stable
OSDFixed viewOption to customize your view
HardwareUses generic hardwareVery specific hardware has been designed for the betaflight
CompatibilityCompatible with most flight controllersCompatible with a lot of hardware as well as flight peripherals
Ease of useFor everyoneFor advanced riders

Wrapping Things Up

Though it might seem that we are rooting for the betaflight, it is actually down to your individual choice of which is better. There might be users who simply want to fly the vehicle out of the box rather than spending time tweaking the settings. On the other hand, there are some people who love to build and customize settings, and hence the betaflight would be more suitable.

Betaflight

More from my site