Open dpse opened 3 months ago
It would be nice to gradually adjust the ceiling as done in ramp mode as well but I'm unsure of the best way to achieve that since the tick event cannot really be used...
Added gradual ceiling adjustment as well by forcing EV_tick
down to the default state even if handled (which unfortunately is a bit ugly...). Also added automatic adjustment of brightness to bike flasher to prevent bursts to be capped. Ceiling is now also restored whenever changing state/mode.
Adds default handlers for
EV_temperature_high
andEV_temperature_low
to provide thermal regulation in modes that do not handle it themselves (e.g. strobe/mood modes). Thermal regulation is done is done by adjusting a ceiling level that caps the requested output level. If the ceiling is raised, the output level will also be raised if possible: The logic is basically the same as in ramp mode except a ceiling is adjusted rather than the current level. In ramp mode, the thermal regulation is unchanged.Only enabled when
DONT_USE_DEFAULT_STATE
is undefined,USE_THERMAL_REGULATION
andUSE_DEFAULT_THERMAL_REGULATION
as I know some users do not want any thermal stepdown in strobe modes.Candle mode brightness is also automatically adjusted when thermally capped to not cut off mid-amplitude as that may look ugly.