Browse Source

Merge pull request #1006 from Skaronator/patch-1

_light_mireds must be set before we return;
rfm69
Xose Pérez 6 years ago
committed by GitHub
parent
commit
be8457cbc8
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      code/espurna/light.ino

+ 2
- 2
code/espurna/light.ino View File

@ -282,14 +282,14 @@ void _fromHSV(const char * hsv) {
void _fromKelvin(unsigned long kelvin) {
if (!_light_has_color) return;
_light_mireds = constrain(round(1000000UL / kelvin), LIGHT_MIN_MIREDS, LIGHT_MAX_MIREDS);
if (_light_use_cct) {
_setRGBInputValue(LIGHT_MAX_VALUE, LIGHT_MAX_VALUE, LIGHT_MAX_VALUE);
return;
}
_light_mireds = constrain(round(1000000UL / kelvin), LIGHT_MIN_MIREDS, LIGHT_MAX_MIREDS);
// Calculate colors
kelvin /= 100;
unsigned int red = (kelvin <= 66)


Loading…
Cancel
Save