Skip to content

Commit

Permalink
Fix RGBWWTable ignored (arendst#7572)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hadinger committed Jan 22, 2020
1 parent 2f00aad commit 514f3e7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions tasmota/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- Add most SetOptions as defines to my_user_config.h
- Add SoftwareSerial to CSE7766 driver allowing different GPIOs (#7563)
- Add optional parameter <startcolor> to command ``Scheme <scheme>, <startcolor>`` to control initial start color
- Fix ``RGBWWTable`` ignored (#7572)

### 8.1.0.3 20200106

Expand Down
8 changes: 8 additions & 0 deletions tasmota/xdrv_04_light.ino
Original file line number Diff line number Diff line change
Expand Up @@ -1799,6 +1799,14 @@ void LightAnimate(void)
}
}

// Apply RGBWWTable only if Settings.rgbwwTable[4] != 0
if (0 != Settings.rgbwwTable[4]) {
for (uint32_t i = 0; i<Light.subtype; i++) {
uint32_t adjust = change8to10(Settings.rgbwwTable[i]);
cur_col_10[i] = changeUIntScale(cur_col_10[i], 0, 1023, 0, adjust);
}
}

// final adjusments for PMW, post-gamma correction
for (uint32_t i = 0; i < LST_MAX; i++) {
// scale from 0..1023 to 0..pwm_range, but keep any non-zero value to at least 1
Expand Down

0 comments on commit 514f3e7

Please sign in to comment.