fablab-luenen / McLighting

The ESP8266 based multi-client lighting gadget
MIT License
218 stars 30 forks source link

Values for gamma correction and color picker not saved in SPIFFS Mode #32

Closed Cypris2010 closed 5 years ago

Cypris2010 commented 5 years ago

Describe the bug When MCLighting ist compiled with ENABLE_STATE_SAVE 1 some values (tested with gamma correction an color picker) are not saved when the device is shut down by power loss (removing power).

To Reproduce Steps to reproduce the behavior:

  1. Go to the user interface
  2. Click on the settings icon
  3. Change the described values, press "save settings". Settings keep active as long the device is powered. After switching off an on power the settings are discarded.
  4. See error

SKETCH_VERSION "2.2.5.RU1.rgbw.3c"

Don't know if they are not saved ore not reloaded.

bpohvoodoo commented 5 years ago

Maybe your SPIFFS is corrupt, Try http://ipofyourdevice/format_spiffs and check again.

bpohvoodoo commented 5 years ago

Ok found a bug, causing settings were saved only for one time. After reboot you can save again - for one time. Missed to detach a ticker. Will be corrected soon.

Cypris2010 commented 5 years ago

Thank you.

Cypris2010 commented 5 years ago

How can i debug the gamma value? It still seems not to reload this value?

Could it be possible that there is not enough space? I'm using a Wemos board.

bpohvoodoo commented 5 years ago

Which gamma value do you mean? Do you mean the value in the definitions, or do you mean the GAMMA setting in the GUI? The gamma value in the definitions is for the a color sensor GY-33 and corrects its readings, if connected. The GAMMA setting in the gui corrects the strips output to match the led colors on the WHEEL and CIRCLE input.

Cypris2010 commented 5 years ago

I mean the GAMMA setting in the GUI.

ryancasler commented 5 years ago

I am experiencing a similar problem with the "Segment Size" setting. I have ENABLE_STATE_SAVE 1 and I am using a Wemos D1 mini. It seems to save it some of the time but some of the time it is reverting back to the last setting. I am testing on the latest 2.2.6 build.

bpohvoodoo commented 5 years ago

GAMMA is doing as it should in my case. To check please choose Red value:255 Green: 55 Blue:0 White:0 Then turn on/off gamma in gui. You should see a differnce.

bpohvoodoo commented 5 years ago

Ok found the reason. I looked at saving which was fine, but the reading after reboot failed!

ryancasler commented 5 years ago

OOOPS! Doesn't do much good to save it if you're not using it later. ;-) thanks so much!!!