Skip to content

Commit 9670eb6

Browse files
bkuengmrpollo
authored andcommitted
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.
1 parent 061f349 commit 9670eb6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/modules/commander/Commander.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ int Commander::custom_command(int argc, char *argv[])
468468
const float heading_accuracy = NAN;
469469

470470
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);
471+
0.f, 0.f, heading, 0.f, 0.0, 0.0, heading_accuracy);
472472
return (ret ? 0 : 1);
473473

474474
} else {

0 commit comments

Comments
 (0)