albertnis / lightt

Control RGBW LEDs over MQTT using ESP8266
1 stars 1 forks source link

Refactor lightt.ino #2

Open albertnis opened 5 years ago

albertnis commented 5 years ago

Lightt.ino is a large file with much procedural logic. With plans for new features such as gamma correction and effects, it is time to refactor lightt into manageable classes and interfaces.

albertnis commented 5 years ago

One idea is to use a pipeline pattern. A pipeline consists of nodes. Nodes are implemented by pipelines and concrete nodes.

The pipeline would run once per loop and would output a full array of uint_8 triplets for the strip. Timing would have to be taken into account for frame generation.