add the ability to process the layer definitions as Jinja2 templates just like any other Klipper macro. All of the normal objects available to macros are also available to layers.
allow passing of parameters to the layer templates through the SET_LED_EFFECT command.
It is also possible to have layers be re-evaluated when an effect is enabled (this is required for layer parameters to be processed). This has the benefit of using the current printer state. However, it will use CPU cycles to re-compute the layers.
This PR includes two commits that:
SET_LED_EFFECT
command.As an example, the following layer definition:
will result in the following layer being defined:
Layers are then processed as normal.
It is also possible to have layers be re-evaluated when an effect is enabled (this is required for layer parameters to be processed). This has the benefit of using the current printer state. However, it will use CPU cycles to re-compute the layers.