DutchDevelop / BLLEDController

Other
94 stars 26 forks source link

Continuous MQTT & Lower Startup Brightness #44

Closed wile1411 closed 5 months ago

wile1411 commented 5 months ago

With people reporting flickering lights on start, I suspect 1 or two likely causes:

1) underpowered PS or large draws from whatever LED strip is being used. In order to reduce occurrences, I reduces the default brightness to 20%. <- you may want to test they yourself to see if you want to change before commiting a new release. 20% is still plenty bright for me. I also change the start up sequence LED to be 100,100,100,100,100 (instead of all 255) in case of the same problem

2) Errors casued due to MQTT timeout. Changed the maintenance mode / test color / RGB cycle logic so it doesn't skip the MQTT loop. Errors appear if the BLLED client doesn't keep up with the MQTT subscription by mqttClient.loop();

The printer eventually drops the MQTT connection after ~20 seconds on no acknowledgement from the BLLED.

Reworked logic now still accepts any new MQTT messages, but doesn't process the content for state changes, unless in replicate state mode.