Browse files

node: Fixing bug in button calculation

  • Loading branch information...
1 parent eee39d6 commit ee18b784b659cd9bbcd6701608375e795d3113dd @thammi thammi committed Apr 22, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 node_lib/buzz.js
View
2 node_lib/buzz.js
@@ -18,7 +18,7 @@ function Buzz(device) {
port.on("data", function(data) {
if(data[0] == "K") {
- that.emit("button", data[1] - 'A'.charCodeAt(0));
+ that.emit("button", data[1].charCodeAt(0) - 'A'.charCodeAt(0));
}
});
}

0 comments on commit ee18b78

Please sign in to comment.