fix(commander): compile out unusable calibration to fit kakutef7 (#29430)

* fix(commander): compile out airspeed calibration without airspeed processing

Without CONFIG_SENSORS_VEHICLE_AIRSPEED nothing turns differential
pressure into airspeed, so the offset this calibration writes is never
applied. Gate it like the magnetometer calibration and answer the
command with UNSUPPORTED. This also covers px4_fmu-v2_fixedwing, which
inherits the option off from fmu-v2's default config, so its MS4525DO
readings already never reach the controllers.

main has not linked holybro_kakutef7 since #28764 (24 B over at
1c3c7e5a72). Flash with the CI compiler (GCC 13.2.1), main -> this
commit:
- holybro_kakutef7: 950,296 -> 947,448 B of 950,272 (99.70 %)
- diatone_mamba-f405-mk2: 1,013,721 -> 1,010,889 B (99.52 %)
- px4_fmu-v2: 1,028,624 -> 1,025,768 B (99.38 %)
- bitcraze_crazyflie: 1,022,720 -> 1,019,896 B (98.81 %)
Boards with airspeed processing are unchanged (px4_fmu-v6c is
byte-identical).

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: jonas <jonas.perolini@rigi.tech>

* fix(mavlink): drop MAG_CAL_REPORT from constrained builds without mag

Flash constrained builds without CONFIG_SENSORS_VEHICLE_MAGNETOMETER
have no magnetometer calibration, so there is nothing to report. Other
builds keep the stream: builds without the sensors module, such as the
VOXL2 apps side, still report the SLPI's calibration, and only
constrained builds may lack a stream that the mode tables list.

holybro_kakutef7: 947,448 -> 945,424 B of 950,272 (99.49 %).

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: jonas <jonas.perolini@rigi.tech>

---------

Signed-off-by: jonas <jonas.perolini@rigi.tech>
Co-authored-by: jonas <jonas.perolini@rigi.tech>
This commit is contained in:
Jonas Peroliniandjonas authored and GitHub committed 2026-10-26 23:37:32 +13:00
1 parent 1c3c7e5a72
commit a2d8b554c9
4 files changed
+21 -1

No files matched your search

+10
View File
@@ -33,7 +33,9 @@
#include "worker_thread.hpp"
#include "accelerometer_calibration.h"
#if defined(CONFIG_SENSORS_VEHICLE_AIRSPEED)
#include "airspeed_calibration.h"
#endif
#include "calibration_routines.h"
#include "baro_calibration.h"
#include "esc_calibration.h"
@@ -146,9 +148,17 @@ void WorkerThread::threadEntry()
_ret_value = do_accel_calibration_quick(&_mavlink_log_pub);
break;
#if defined(CONFIG_SENSORS_VEHICLE_AIRSPEED)
case Request::AirspeedCalibration:
_ret_value = do_airspeed_calibration(&_mavlink_log_pub);
break;
#else
case Request::AirspeedCalibration:
_ret_value = -1;
break;
#endif
case Request::ESCCalibration:
_ret_value = do_esc_calibration(&_mavlink_log_pub);