Added flag to indicate if the minifig signature is recognised or not

This commit is contained in:
Nathan Kunicki 2016-06-18 22:48:39 +01:00
parent 007a7d48b6
commit b334b46204
2 changed files with 7 additions and 3 deletions

View File

@ -6,5 +6,7 @@
"40 42 b2 2a 49 80": "Slimer",
"ed 0c 32 75 40 84": "Bane",
"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"
}

View File

@ -103,11 +103,13 @@ class ToyPad extends EventEmitter {
this.emit("connect");
} else if (cmd == Command.ACTION) {
let action = data[5];
let action = data[5],
sig = ToyPad._bufferToHexString(data.slice(7, 13));
let emitPayload = {
panel: data[2],
sig: ToyPad._bufferToHexString(data.slice(7, 13))
sig: sig,
recognized: !!minifigData[sig]
};
if (action == Action.ADD) {