From 9670eb69b3f8449853f99a4295b045138979c63d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Mon, 22 Sep 2025 10:51:06 +0200 Subject: [PATCH] commander: use double literals to avoid implicit conversion Fixes a CI failure for fuzzing and macos: https://github.com/PX4/PX4-Autopilot/actions/runs/17906277709/job/50907922642 /__w/PX4-Autopilot/PX4-Autopilot/src/modules/commander/Commander.cpp:471:37: fatal error: implicit conversion increases floating-point precision: 'float' to 'double' [-Wdouble-promotion] 470 | bool ret = send_vehicle_command(vehicle_command_s::VEHICLE_CMD_EXTERNAL_ATTITUDE_ESTIMATE, | ~~~~~~~~~~~~~~~~~~~~ 471 | 0.f, 0.f, heading, 0.f, 0.f, 0.f, heading_accuracy); | ^~~ 1 error generated. --- src/modules/commander/Commander.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/commander/Commander.cpp b/src/modules/commander/Commander.cpp index cb5e87ff05..0f891b344b 100644 --- a/src/modules/commander/Commander.cpp +++ b/src/modules/commander/Commander.cpp @@ -468,7 +468,7 @@ int Commander::custom_command(int argc, char *argv[]) const float heading_accuracy = NAN; bool ret = send_vehicle_command(vehicle_command_s::VEHICLE_CMD_EXTERNAL_ATTITUDE_ESTIMATE, - 0.f, 0.f, heading, 0.f, 0.f, 0.f, heading_accuracy); + 0.f, 0.f, heading, 0.f, 0.0, 0.0, heading_accuracy); return (ret ? 0 : 1); } else {