MCPcopy Create free account
hub / github.com/FastLED/FastLED / setMaxRefreshRate

Method setMaxRefreshRate

src/FastLED.cpp.hpp:506–518  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

504}
505
506void CFastLED::setMaxRefreshRate(fl::u16 refresh, bool constrain) {
507 if(constrain) {
508 // if we're constraining, the new value of mNMinMicros _must_ be higher than previously (because we're only
509 // allowed to slow things down if constraining)
510 if(refresh > 0) {
511 mNMinMicros = ((1000000 / refresh) > mNMinMicros) ? (1000000 / refresh) : mNMinMicros;
512 }
513 } else if(refresh > 0) {
514 mNMinMicros = 1000000 / refresh;
515 } else {
516 mNMinMicros = 0;
517 }
518}
519
520
521fl::u8 get_brightness() {

Callers 1

FastLED.cpp.hppFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected