s00500 / ESPUI

A simple web user interface library for ESP32 and ESP8266

Home Page:https://valencia.lbsfilm.at/midterm-presentation/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Label Update Resets Sliders

jbergman11 opened this issue · comments

Every time the .updateLabel is called, any slider that have been changed from their default value get changed back to their default values. This does not invoke the slider callback however. The slider value that is being used in the code does not change, just the value of the slider on the display.

Hi, are you sure this is the case? In my test UI I can update large number of controls - including labels - without it affecting the state of a slider.
Screenshot 2022-02-16 at 15 12 07

This did used to be an issue, are you on the latest version?

Do you have a sketch that shows this that I can test? As I say, I cannot replicate the issue here.

I will try to upload a sketch later today when I get a chance. Thank you for your help.

The attached file is the sketch I am using with ESPUI
Plane.zip
.

Hmm, so I can't test this entirely one-to-one because I've had to tear it apart due to me not having the stepper motor bits and bobs, but fundamentally you are using Slider and ESPUI::print and at least for me that doesn't affect the position of the slider. I've tried a few different variations and it all seems fine to me.

Can you try the latest version of this repository, rather than the 2.1 tag? Instructions to install manually are in the README.

I downloaded the latest revision from the repository and unzipped it in the libraries folder. I renamed the existing ESPUI folder to something else then renamed the unzipped folder to ESPUI. So what is now in the ESPUI folder should be the files downloaded from the repository. However, I still have the same issue where the sliders reset to their default values any time the ESP.updateLabel() is called. I downloaded the gui.io sketch from the examples directory of the ESPUI library folder and it does the same thing. Was there something not correct about the way I "updated" the ESP library?

Thank you again for your help on this.

OK I've just got everything building with the awful Arduino IDE. I can confirm that whatever code it pulls in is old and does experience the bug you've seen. However, if I go to /Users/<my username>/Documents/Arduino/libraries and replace ESPUI with the current contents of this repo then everything is fixed. So you might have replaced the wrong library or something?

I would strongly recommend considering using PlatformIO, with something like VSCode, but I have got with working with the Arduino 'IDE'. ;) Best of luck.

Thanks for the information. I can try replacing the contents of the library folder again or try another platform. Thanks again for taking the time to look into it.