Fixed new brightness as percentage value not being used
This commit is contained in:
parent
0a41a25163
commit
abd12a3714
@ -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(',') : [];
|
||||||
|
Loading…
Reference in New Issue
Block a user