Fixed new brightness as percentage value not being used

This commit is contained in:
Mark van Renswoude 2017-03-27 23:02:45 +02:00
parent 0a41a25163
commit abd12a3714

View File

@ -142,7 +142,7 @@ function writeModeData(mode, data)
case protocol.Mode.Static: case protocol.Mode.Static:
var brightness = getBrightness(data.brightness); var brightness = getBrightness(data.brightness);
return new Buffer([protocol.Command.SetMode, mode, lsb(data.brightness), msb(data.brightness)]); return new Buffer([protocol.Command.SetMode, mode, lsb(brightness), msb(brightness)]);
case protocol.Mode.Custom: case protocol.Mode.Custom:
var brightness = typeof(data.brightness) !== 'undefined' ? data.brightness.split(',') : []; var brightness = typeof(data.brightness) !== 'undefined' ? data.brightness.split(',') : [];