Make LED dimming optional
Problem description
Currently feedbackd uses the pattern
sysfs entry to control the LEDs. By definition, this will dimm the LED between the configured min and max brightness values. Since the max_brightness
is read from sysfs, this causes issues on devices that do not have dimmable LEDs (i.e. max_brightness
is really 1, not 255). That is because the brightness will gradually vary between 0 and the default 255, where any value >0 means "turn the LED on". On my pinephone, this has the effect that the indicator LEDs are on most of the cycle time, and only very briefly turn off: They do not blink regularly.
Proposed Solution
One could either add another LED attribute to the feedbacks
section in the config like dimming: false
, or implement this as another feedback type like type: "Led-dimm"
, but I find the former prettier. But I'm not really aware how the code works: Could this be added as optional attribute (i.e. with a fallback of true
) so it doesn't break existing configurations? Is this feasible at all?