Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

node: Fixing led command offsets

  • Loading branch information...
commit af05d5d67b01ce55a76dd48be72a01d75b974596 1 parent ee18b78
thammi authored April 22, 2011

Showing 1 changed file with 4 additions and 4 deletions. Show diff stats Hide diff stats

  1. 8  node_lib/buzz.js
8  node_lib/buzz.js
@@ -34,13 +34,13 @@ Buzz.prototype = new events.EventEmitter();
34 34
 Buzz.prototype.set_led = function (player, led, brightness) {
35 35
     buf = new Buffer("QL$$$Q");
36 36
 
37  
-    buf[1] = 'A'.charCodeAt(0) + player;
38  
-    buf[2] = '0'.charCodeAt(0) + led;
  37
+    buf[2] = 'A'.charCodeAt(0) + player;
  38
+    buf[3] = '1'.charCodeAt(0) + led;
39 39
 
40 40
     if(brightness) {
41  
-        buf[3] = '1'.charCodeAt(0);
  41
+        buf[4] = '1'.charCodeAt(0);
42 42
     } else {
43  
-        buf[3] = '0'.charCodeAt(0);
  43
+        buf[4] = '0'.charCodeAt(0);
44 44
     }
45 45
 
46 46
     // async?

0 notes on commit af05d5d

Please sign in to comment.
Something went wrong with that request. Please try again.