Fixed Color was wrongly changing Dimmer

This commit is contained in:
Stephan Hadinger 2019-04-29 08:34:43 +02:00
parent efea6bb794
commit d878a42a62
1 changed files with 2 additions and 5 deletions

View File

@ -1699,11 +1699,8 @@ bool LightCommand(void)
uint8_t old_bri = light_state.getBri();
// change all channels to specified values
light_controller.changeChannels(light_entry_color);
if ((CMND_COLOR == command_code) && (1 == XdrvMailbox.index)) {
// If Color(1) then reset brightness to maximum;
light_controller.changeBri(255);
} else {
// else set back initial brightness
if (2 == XdrvMailbox.index) {
// If Color2, set back old brightness
light_controller.changeBri(old_bri);
}