mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-25 16:51:16 +08:00
fix(simulation): cast gz airspeed temperature to double (#28843)
The macOS build has been failing since #28842: clang reports the implicit float to double conversion under -Wdouble-promotion, which the build treats as an error. GCC does not warn for argument conversions, so the Linux builds passed. Assisted-by: Claude:claude-opus-5-5
This commit is contained in:
1 parent
579f7d161e
commit
4dbd2e069a
1 file changed
+1
-1
@@ -146,7 +146,7 @@ void AirSpeed::PreUpdate(const gz::sim::UpdateInfo &_info,
|
||||
(double)diff_pressure_noise;
|
||||
gz::msgs::AirSpeed airspeed_msg;
|
||||
airspeed_msg.set_diff_pressure(diff_pressure * 100.0);
|
||||
airspeed_msg.set_temperature(temperature_local); // [K]
|
||||
airspeed_msg.set_temperature((double)temperature_local); // [K]
|
||||
_pub.Publish(airspeed_msg);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user