esp32-aog icon indicating copy to clipboard operation
esp32-aog copied to clipboard

Adding Control widgets to ESP32 UI fails

Open benreu opened this issue 3 years ago • 1 comments

In the process of adding some more widgets and code to support steering wheel encoders to turn off steering, the web page no longer loads. I tried it several times, and as soon as I add widgets, the page no longer loads. Removing the added widgets makes it work again. I see the ESPUI has moved on to include a

ESPUI.jsonInitialDocumentSize = 8000; // This is the default, adjust when you have too many widgets or options

When I try to add this to esp32-aog, I get an error:

'class ESPUIClass' has no member named 'jsonInitialDocumentSize'

And if I try to switch to the https://github.com/s00500/ESPUI repository, I get an error when trying to compile the esp-aog project

'class ESPUIClass' has no member named 'updateControlAsyncTransmit'

I see the repositories cannot be merged automatically using GitHub's website. Indeed, I tried to merge locally by pulling from both repos, which gave the conflicting differences. It appears the biggest differences are syntax and variable names, with a few added functions on the eringerli repo. I'm wondering what it would take to bring these repos into sync?

benreu avatar Feb 22 '21 15:02 benreu

So I added the missing function to the ESPUI.cpp and ESPUI.h, and upgraded the ArduinoJSON library to the latest version, and updated the code in the updateControlAsyncTransmit() for ArduinoJSON 6. Now I get a stacktrace pointing to updateControlAsyncTransmit() in idleStats.cpp line 94. Obviously something miscarried somewhere, and I am at loss how to fix it.

benreu avatar Feb 22 '21 20:02 benreu