mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-19 07:23:34 +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
@@ -122,7 +122,7 @@ void LandDetector::Run()
|
||||
const bool ground_contactDetected = _ground_contact_hysteresis.get_state();
|
||||
const bool maybe_landedDetected = _maybe_landed_hysteresis.get_state();
|
||||
const bool landDetected = _landed_hysteresis.get_state();
|
||||
const float alt_max = _get_max_altitude() > 0.0f ? _get_max_altitude() : INFINITY;
|
||||
const float alt_max = _get_max_altitude() > 0.0f ? _get_max_altitude() : (float)INFINITY;
|
||||
const bool in_ground_effect = _ground_effect_hysteresis.get_state();
|
||||
|
||||
// publish at 1 Hz, very first time, or when the result has changed
|
||||
|
||||
Reference in New Issue
Block a user