Skip to content

Commit 5274ad7

Browse files
authored
Fix support for some devices (#24)
Devices with deviceId other than 10171 would get its deviceId overwritten with 10171 and the used protocol would always be the newer, thus breaking support for { "vendorId": 1240, "productId": 63560 }.
1 parent d09d517 commit 5274ad7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/busylight.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function Busylight(options){
4141
events.EventEmitter.call(this);
4242
this.options = options || supported;
4343
this.buffer = [0,0,0,0,0,0,0,0,128];
44-
this.newProtocol = options.vendorId = 10171
44+
this.newProtocol = options.vendorId === 10171;
4545
this.debug = false;
4646
this.connectAttempts = 0;
4747
this.getColorArray = function(colors) {

0 commit comments

Comments
 (0)