This fixes the issue where builds with a single voltage/current regulator (e.g. the Noctigon KR4 linear driver with noFET/FET disabled in firmware) put the default bike flasher brightness beyond MAX_BIKING_LEVEL (120) due to MAX_1x7135 = 150 (MAX_LEVEL).
With this change, the default bike flasher brightness is the minimum of MAX_1x7135 and MAX_BIKING_LEVEL, ensuring it never exceeds the maximum.
As a side effect, this provides a way to specify the default bike flasher brightness via #define DEFAULT_BIKING_LEVEL. This is not checked against MAX_BIKING_LEVEL, for simplicity.
Alternatively, strobe-modes.c could be updated to check if the value exceeds MAX_BIKING_LEVEL at runtime. However, that might take up more flash space.
Thanks! Looks good. I modified it a bit to put the definitions into a more specific file, and to remove dependence on old 7135 chip symbols. The default is level 50/150 now, unless overridden.
Migrated from original Launchpad merge request
This fixes the issue where builds with a single voltage/current regulator (e.g. the Noctigon KR4 linear driver with noFET/FET disabled in firmware) put the default bike flasher brightness beyond
MAX_BIKING_LEVEL
(120
) due toMAX_1x7135 = 150
(MAX_LEVEL
).With this change, the default bike flasher brightness is the minimum of
MAX_1x7135
andMAX_BIKING_LEVEL
, ensuring it never exceeds the maximum.As a side effect, this provides a way to specify the default bike flasher brightness via
#define DEFAULT_BIKING_LEVEL
. This is not checked againstMAX_BIKING_LEVEL
, for simplicity.Alternatively,
strobe-modes.c
could be updated to check if the value exceedsMAX_BIKING_LEVEL
at runtime. However, that might take up more flash space.