accept up to 250 fps target in LED preferences

warning included.
This commit is contained in:
Frank
2023-04-21 15:26:35 +02:00
parent 63a597b987
commit 00661de7fc
7 changed files with 499 additions and 483 deletions

View File

@@ -1650,8 +1650,9 @@ uint16_t WS2812FX::getFps() {
}
void WS2812FX::setTargetFps(uint8_t fps) {
if (fps > 0 && fps <= 120) _targetFps = fps;
if (fps > 0 && fps <= 251) _targetFps = fps; // WLEDMM allow higher framerates
_frametime = 1000 / _targetFps;
if (_frametime < 1) _frametime = 1; // WLEDMM better safe than sorry
}
void WS2812FX::setMode(uint8_t segid, uint8_t m) {