moodlite => moodlite Software => Topic started by: spooky3do on June 09, 2019, 10:51:36 PM

Title: Cause and Solution for my Issues
Post by: spooky3do on June 09, 2019, 10:51:36 PM
Hi everyone,

i spent the last couple of days and a lot of coffee and lateron some vodka on solving my problems with the  moodlite software.

there are three main issues

1. every time the UI Werbsite sends a message containing either 16 20 or 24 chars ( I assume basically any multiple of 4 although i did not bother to test this) my controller dumps and the programm restarts.
1a. I solved this by renaming all the stuff that caused dumps to a name that would not cause a dump ( luckily just adding a single letter did not always work because of the variable nature of the data transmitted .. 0-9 would work  10 would not,  so i had more fun and vodka while finding the right amount of characters to add so it would work for all combinations)

2. the settings page contains fields for mqtt stuff. whatever this is for.  In my case these fields are empty but upon calling the screen the  server wants to send out a json containing lots of jibberish.  And the http server flat out refuses to send jibberish.  Good for him.

See screenshot for my solution for this issue.

3. the website sets some servermode variable during startup and it seems  the java script crashes before it can clear the variable.  I added a  try catch to the  method and cleared the servermode variable in the finally block.

3a. see atachments

I guess it has something to do with my controllers as these kinds of issues would have and must have come up during testing and for a lot of other guys and gals.

I am not sure how to post my current and mostly working solution. If restrictions allow it i will try to add a zipped file containing the sources. In case there are more lost souls like me out there
Title: Re: Cause and Solution for my Issues
Post by: spooky3do on June 09, 2019, 10:56:28 PM
Please find attached my adjusted version.

Only use it if you also encounter the problems i mentioned in the other threads
Title: For lubos88923
Post by: spooky3do on June 10, 2019, 07:08:34 PM
Hi lubos88923,

please try to just upload the sketch data folder.  The remaining code  you can take from version 3. 

I did not need to change the code for brightness. I just limited it to 10 as the lowest value on the website to fix my controller issues.

This  version of the Data folder however contains the fix for the main page javascript issue that is preventing the site from sending any data to the device and this might fix your issue