This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Slider lazy/notinit value big issue
#1
Hi,
I have big issue with slider component (other have the same issue) with ESP32 library.
PhyphoxBLE::read(...)
return always 0 (lazy not init value) until I do some change on Slider.
Slider example:
<slider default="1.0" minValue="-5.0" maxValue="5.0" stepSize="1.0">

I can workaround it by
Code:
if(readValue) {
   destvalue = readValue;
}
 but only for cases where slider doesn't have 0, like <1,5>, but for range <-5,5> i have 0 and it cause another issue.

Question is: how to change not init/lazy value by NaN vale or MAX_VALUE to prevent "Null" as 0.

Or how to force phyphox to init component (e.g. Slider) to start sending real values, even it is not touched?

This issue blow my application which I'm working on since 2 weeks. 

I tried to change code of libraries to return not init values as NaN, but I failed. Is it possible to do on ESP32 code, or do we need to change code of phyphox?
Reply
#2
I think this param
https://github.com/phyphox/phyphox-andro...java#L3236
Should be possible to set to true by XML.

I test toggle where `triggered = true` and toggle works as expected. Seems like this is only Slider component problem.
Reply


Forum Jump: