Skip to content

Brightness factor is not strictly enforced #4824

@Taudris

Description

@Taudris

What happened?

When using brightness factor to limit the average power draw of a PWM LED strip, sometimes the PWM duty cycle is able to exceed this value.

I don’t know if this behavior also affects digital LEDs.

To Reproduce Bug

Set a brightness factor of eg 20%, set brightness to 100%/255, then open the LED preferences screen and save (no changes are needed). The PWM duty cycle will then become 100% until the next brightness change.

I also observed an animation glitch where the brightness exceeded the brightness factor for a moment, but I have not been able to reproduce this.

Expected Behavior

The LED output must absolutely never exceed the configured brightness factor.

Install Method

Binary from WLED.me

What version of WLED?

0.15.1

Which microcontroller/board are you seeing the problem on?

ESP32

Relevant log/trace output

Anything else?

I don’t know which flavor of ESP32 this device uses, but it’s whatever is in the GLEDOPTO GL-C-211WL. (They put a custom RF shield on the carrier that has the MCU, and the info screen just says ESP32.)

As a side note, since brightness factor could be used to keep power consumption within hardware limits and could thus constitute a safety issue, ideally it would be preserved when resetting the config by hardware button. (Maybe it already is; I haven’t tested it yet.)

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    fixed in sourceThis issue is unsolved in the latest release but fixed in master

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions