mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-21 19:43:33 +08:00
Fix implicit float to double conversions
The both results of ?: should be of same type, and some compilers give error on this: " implicit conversion from 'float' to 'double' to match other result of conditional" Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
This commit is contained in:
committed by
Lorenz Meier
parent
62dc926891
commit
532f370e7d
@@ -77,7 +77,7 @@ private:
|
||||
|
||||
vehicle_local_position_s lpos{};
|
||||
_local_pos_sub.copy(&lpos);
|
||||
msg.wind_alt = (lpos.z_valid && lpos.z_global) ? (-lpos.z + lpos.ref_alt) : NAN;
|
||||
msg.wind_alt = (lpos.z_valid && lpos.z_global) ? (-lpos.z + lpos.ref_alt) : (float)NAN;
|
||||
|
||||
msg.horiz_accuracy = 0.0f;
|
||||
msg.vert_accuracy = 0.0f;
|
||||
|
||||
Reference in New Issue
Block a user