mirror of https://github.com/arendst/Tasmota.git
Merge pull request #5951 from s-hadinger/issue_5940
Fix channel command for dual dimmers (#5940)
This commit is contained in:
commit
e43aa0be18
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue