Permalink
Browse files

led corrections for chaos hardware

  • Loading branch information...
1 parent a0a01be commit 14144f08f27fcab960a7952e6a662c631b9893a0 @astro astro committed Oct 15, 2011
Showing with 11 additions and 0 deletions.
  1. +11 −0 node_lib/buzz.js
View
@@ -38,6 +38,17 @@ Buzz.prototype = new events.EventEmitter();
// - led: the led of the player [0-1]
// - brightness the brightness of the led [0-1]
Buzz.prototype.set_led = function (player, brightness) {
+ if (brightness)
+ brightness = 0;
+ else
+ brightness = 1;
+ // die Ansteuerung funktioniert, aber bei buzzer B und C sind die
+ // led pins (in der firmware) vertauscht. d.h. keyB hat ledC und
+ // keyC hat ledB.
+ if (player === 1)
+ player = 2;
+ else if (player === 2)
+ player = 1;
// there is only one in the hardware
var led = 1;

0 comments on commit 14144f0

Please sign in to comment.