Flight controllers

Settings for PX4, ArduPilot, Betaflight and INAV.

Flow Lite finds out what it is connected to and speaks that language. On CAN it joins a DroneCAN bus at the bit rate it hears. On the UART it recognises the flight controller and switches format by itself.

Tested with PX4 1.17, Betaflight 2026.6 and INAV 9.1.

Test with care

Check the readings on the bench with propellers off. Make the first flight low, in an open area, and be ready to switch to a mode that does not use optical flow.

PX4 over CAN#

  1. Connect Flow Lite's CAN port to the autopilot's CAN port. The autopilot needs an SD card fitted.
  2. In QGroundControl, set UAVCAN_ENABLE to 2, or 3 if you also use DroneCAN ESCs.
  3. Reboot the autopilot.
  4. Set the parameters below, then reboot again.
ParameterValueWhy
UAVCAN_SUB_FLOW1Use the flow from the bus
UAVCAN_SUB_RNG1Use the range from the bus
UAVCAN_RNG_MIN0.01PX4 takes the range limits from here, not from the module
UAVCAN_RNG_MAX6As above, in metres
EKF2_OF_CTRL1Fuse optical flow
EKF2_RNG_CTRL1Use range for height at low altitude
SENS_FLOW_MINHGT0.08Lowest height at which flow is used, in metres
SENS_FLOW_MAXR7.4Highest flow rate, in rad/s

These are the PX4 1.17 names. Some later versions number the flow settings, for example EKF2_OF0_CTRL and SENS_FLOW0_MAXR.

To check, open the MAVLink Inspector in QGroundControl and look for flow and distance readings. Flow arrives at 100 Hz and range at 40 Hz.

ArduPilot over CAN#

Flow Lite connects the same way as HereFlow and ARK Flow.

  1. Connect Flow Lite's CAN port to the autopilot's CAN port.
  2. Set the parameters below in Mission Planner.
  3. Reboot the autopilot.
ParameterValueWhy
CAN_P1_DRIVER1Turn on the first CAN port
CAN_D1_PROTOCOL1DroneCAN
FLOW_TYPE6Optical flow over DroneCAN
RNGFND1_TYPE24Rangefinder over DroneCAN
RNGFND1_ADDR0Flow Lite's rangefinder id
RNGFND1_ORIENT25Facing down
RNGFND1_MAX6In metres. Older versions use RNGFND1_MAX_CM = 600

To check, open the Status tab on Mission Planner's Flight Data screen. opt_m_x, opt_m_y and opt_qua should change as you move the vehicle over a textured surface, and the rangefinder distance should follow its height.

To hold position on flow without GPS, set the EKF sources:

ParameterValueWhy
EK3_SRC1_POSXY0No horizontal position source
EK3_SRC1_VELXY5Horizontal velocity from optical flow
EK3_SRC1_POSZ1Height from the barometer
EK3_SRC1_VELZ0No vertical velocity source
EK3_SRC1_YAW1Heading from the compass

With flow as the only horizontal source, ArduPilot does not climb above RNGFND1_MAX in Loiter. ArduPilot's optical flow setup page covers the test flights.

Betaflight over UART#

For Betaflight 2026.6.

  1. Connect Flow Lite's UART port to a free UART.
  2. On the Ports tab, turn on MSP at 115200 for that UART.
  3. Run these in the CLI:
feature RANGEFINDER
feature OPTICALFLOW
set rangefinder_hardware = MTF01
set opticalflow_hardware = MT
save

Without the two features, the sensors are detected but never read.

INAV over UART#

  1. Connect Flow Lite's UART port to a free UART.
  2. On the Ports tab, turn on MSP at 115200 for that UART.
  3. Run these in the CLI:
set opflow_hardware = MSP
set rangefinder_hardware = MSP
save

Then calibrate opflow_scale, once per installation. With propellers off, open the Calibration tab in INAV Configurator and choose Calibrate Optic Flow sensor. For the next 30 seconds, hold the model over a textured surface and tilt it from side to side without moving it horizontally. INAV works out opflow_scale from this.

ArduPilot and PX4 over UART#

CAN is the better link where a CAN port is free. Both can also read Flow Lite as MAVLink 2 at 115200, through the three-wire adapter described in Get started.

On ArduPilot, where x is the serial port:

ParameterValueWhy
SERIALx_PROTOCOL2MAVLink 2
SERIALx_BAUD115115200 baud
FLOW_TYPE5Optical flow over MAVLink
RNGFND1_TYPE10Rangefinder over MAVLink
RNGFND1_ORIENT25Facing down

On PX4, start a MAVLink instance on the serial port at 115200.