Skip to content

Add Lighting system

Max Brauer requested to merge feature/lighting into main

List of features and changes:

  • introduce a new lighting system that replaces the old one
  • all old API calls are mapped so that it will use the new lighting system internally
  • the new lighting system use for its colors a vector representation with values between 0 and 1. This allows to manipulate colors more easily. It is possible to mix the old and new representation in the configuration as they are converted automatically.
  • the lighting system provides for each led its own configuration
  • each configuration can have multiple effect channels that are blended together to get the resulting color
  • 14 blend methods added
    • bottom
    • top
    • add
    • subtract
    • subtract_b
    • difference
    • average
    • multiply
    • divide
    • divide_inv
    • screen
    • lighten
    • darken
    • overlay
  • each effect determine how to compute its color. All of them has their own configuration. It is possible to combine effects together.
  • 8 effects added
    • static: provides a static color
    • blink: will turn the color on and off. If multiple colors are specified it will cycle through them.
    • linear-fade: Will fade between the colors in the list.
    • breath: will show breathing animation (inhale - exhale)
    • strobe: shows a stroboscopic effect. Warning: Fast flashing lights!
    • twinkle: The LED will twinkle randomly like falling stars. If colors are provided it will randomly use one.
    • queue: queue effects together to play one after another
    • channel: combines and blend multiple effects to get a more complex result
  • add 7 API methods to get and set the new lighting system. Documentation is in the extended API spec.
  • add possibility to temporary override the current lighting config. This will play the specified animation for a short time and resume the normal animation after that.
  • Add /api/v1/hello that will make use of the temporary override.

Merge request reports

Loading