From 06b763ca9499e72faa344174bcda1a24db81e969 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Mon, 23 Sep 2024 19:43:12 +1000 Subject: [PATCH] AP_Param: add and use global NaNf float value --- libraries/AP_Param/AP_Param.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AP_Param/AP_Param.cpp b/libraries/AP_Param/AP_Param.cpp index c335c7aef3..2249d98b0d 100644 --- a/libraries/AP_Param/AP_Param.cpp +++ b/libraries/AP_Param/AP_Param.cpp @@ -2945,14 +2945,14 @@ void AP_Param::show_all(AP_HAL::BetterStream *port, bool showKeyValues) ParamToken token; AP_Param *ap; enum ap_var_type type; - float default_value = nanf("0x4152"); // from logger quiet_nanf + float default_value = NaNf; // from logger quiet_nanf for (ap=AP_Param::first(&token, &type, &default_value); ap; ap=AP_Param::next_scalar(&token, &type, &default_value)) { if (showKeyValues) { ::printf("Key %u: Index %u: GroupElement %u : Default %f :", (unsigned)var_info(token.key).key, (unsigned)token.idx, (unsigned)token.group_element, default_value); - default_value = nanf("0x4152"); + default_value = NaNf; } show(ap, token, type, port); hal.scheduler->delay(1);