| 504 | } |
| 505 | |
| 506 | void 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 | |
| 521 | fl::u8 get_brightness() { |