Fix channel command for dual dimmers (#5940)

This commit is contained in:
Stephan Hadinger 2019-06-12 22:49:22 +02:00
parent 8ed16c15a0
commit 66d372586a
2 changed files with 8 additions and 1 deletions

View File

@ -2,6 +2,7 @@
* Refactored TLS based on BearSSL, warning breaking change for fingerprints validation (see doc)
* Add checkbox to GUI password field enabling visibility during password entry only (#5934)
* Add using heap when more than 199 IRSend values need to be send. May need increase of define MQTT_MAX_PACKET_SIZE too (#5950)
* Fix channel command for dual dimmers (#5940)
*
* 6.5.0.15 20190606
* Change pubsubclient MQTT_KEEPALIVE from 10 to 30 seconds in preparation of AWS IoT support

View File

@ -942,7 +942,13 @@ public:
// Channels are: R G B CW WW
// Brightness is automatically recalculated to adjust channels to the desired values
void changeChannels(uint8_t *channels) {
_state->setChannels(channels);
if (LST_COLDWARM == light_subtype) {
// remap channels 0-1 to 3-4 if cold/warm
uint8_t remapped_channels[5] = {0,0,0,channels[0],channels[1]};
_state->setChannels(remapped_channels);
} else {
_state->setChannels(channels);
}
saveSettings();
calcLevels();
}