Added flag to indicate if the minifig signature is recognised or not
This commit is contained in:
parent
007a7d48b6
commit
b334b46204
@ -6,5 +6,7 @@
|
|||||||
"40 42 b2 2a 49 80": "Slimer",
|
"40 42 b2 2a 49 80": "Slimer",
|
||||||
"ed 0c 32 75 40 84": "Bane",
|
"ed 0c 32 75 40 84": "Bane",
|
||||||
"d4 61 82 55 42 80": "Lloyd",
|
"d4 61 82 55 42 80": "Lloyd",
|
||||||
"54 60 a2 5b 49 81": "Krusty-the-Clown"
|
"54 60 a2 5b 49 81": "Krusty-the-Clown",
|
||||||
|
"87 b8 1a 7f 49 80": "Peter Venkman",
|
||||||
|
"0a 2e aa 5c 49 81": "Kai"
|
||||||
}
|
}
|
@ -103,11 +103,13 @@ class ToyPad extends EventEmitter {
|
|||||||
this.emit("connect");
|
this.emit("connect");
|
||||||
} else if (cmd == Command.ACTION) {
|
} else if (cmd == Command.ACTION) {
|
||||||
|
|
||||||
let action = data[5];
|
let action = data[5],
|
||||||
|
sig = ToyPad._bufferToHexString(data.slice(7, 13));
|
||||||
|
|
||||||
let emitPayload = {
|
let emitPayload = {
|
||||||
panel: data[2],
|
panel: data[2],
|
||||||
sig: ToyPad._bufferToHexString(data.slice(7, 13))
|
sig: sig,
|
||||||
|
recognized: !!minifigData[sig]
|
||||||
};
|
};
|
||||||
|
|
||||||
if (action == Action.ADD) {
|
if (action == Action.ADD) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user