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.
This commit is contained in:
Beat Küng
2025-09-22 10:51:06 +02:00
committed by Ramon Roche
parent 061f34919e
commit 9670eb69b3
+1 -1
View File
@@ -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 {