phyphox Forums

Full Version: Slider lazy/notinit value big issue
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?
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.