Page 1 of 1
Seriously, guys?
Posted: Sun Dec 08, 2024 7:40 pm
by KE5FX
Re: Seriously, guys?
Posted: Tue Dec 10, 2024 11:32 am
by wbradley
Hi KE5FX!
I apologize for the frustration with these lines. This was part of the new config_*_limit functionality to allow developers to easily define reasonable and/or custom validations and error messages on config objects, but I miscommunicated with a senior engineer and allowed these values to remain in code and make their way into a place that probably caused you problems: what's reasonable for an end user to type into a web form is not the same as how DBL_MAX/DBL_MIN is used globally.
In our next release the following changes will be made to config_obj.h:
Code: Select all
--- a/nbrtos/include/config_obj.h
+++ b/nbrtos/include/config_obj.h
@@ -52,6 +52,7 @@ is required to save changes to flash memory.
#include <string.h>
#include <utils.h>
#include <limits.h>
+#include <float.h>
void ShowTree();
@@ -2415,8 +2454,6 @@ class config_uint_limit : public config_uint
};
-#define DBL_MIN INT_MIN
-#define DBL_MAX INT_MAX
/**
* @brief A config_double with minimum and/or maximum values
Re: Seriously, guys?
Posted: Tue Dec 10, 2024 5:34 pm
by KE5FX
Great to hear it wasn't intentional. I was starting to question my own text editor.
As an aside, I'm sure you know that DBL_MIN is the smallest positive normal double while INT_MIN is the largest negative int. That has tripped me up before, and it looks like it may have caused additional confusion here as well.
Re: Seriously, guys?
Posted: Thu Dec 12, 2024 11:21 am
by wbradley
Yep, caught that one too! Some of this will become moot as I also discovered that `name` is required for proper operation and rather than change the argument order I'll just remove the default values for min/max/step. Which shouldn't be a big issue since the whole purpose of the _limit objects is to define custom limits.
Thanks for the feedback!