Disable Barometer?


For a “quick and dirty” project I would like to use this board I have at hand : https://www.drone-fpv-racer.com/en/mamba-f405-mk2-flight-controller-4764.html

I’ve compiled and flashed ArduPlane-4.0.5 for omnibusf4
The point is that the initialization won’t pass since there is no Baro on the board.
I get the error : APM: Check BRD_TYPE: Baro: unable to initialise drive

I would like to completely disable the baro since I only plan to use the Stabilize mode.

Is it possible ?

I went through hw.dat, hwdef.h and libraries/AP_Baro/AP_Baro.cpp but I didn’t find an easy way to disable it.

Thanks !


check speedybeeF4 hwdef (lines 125 ff.) for reference:
will allow booting without baro

cheers, basti.

1 Like

thanks a lot @vierfuffzig !
I’ve added define HAL_BARO_ALLOW_INIT_NO_BARO to libraries/AP_HAL_ChibiOS/hwdef/omnibusf4/hwdef.dat
That did the trick for the first part of init, but now I get the following message :
APM: Check BRD_TYPE: Baro: unable to calibrate


Ok it passes the init.

I’ve changed the return value of the function healthy() in libraries/AP_Baro/AP_Baro.h so it always returns true.
I also had to comment out AP_BoardConfig::sensor_config_error(“AP_Baro: all sensors uncalibrated”); in libraries/AP_Baro/AP_Baro.cpp

It seems to work, the flight mode is RTL as there is no RC connected, and the Horizon reflects the IMU orientation (just have to change the YAW orientation)

Tomorrow I will check if the firmware works “properly” for what I intend to do.

Thanks again


@JeanPhilippeHell thanks for mentioning that!

Thanks @vierfuffzig for the PR.
I just noticed there is a wip to add the PyroF4OSD https://github.com/ArduPilot/ardupilot/pull/14313
It is good news since the Mamba F4 uses the same target