@@ -11,8 +11,8 @@ Mac OSX driver: http://tattiebogle.net/index.php/ProjectRoot/Xbox360Controller/O
1111
1212## Usage
1313
14- var XboxController = require('xbox-controller')
15- var xbox = new XboxController
14+ var XboxController = require('xbox-controller');
15+ var xbox = new XboxController;
1616
1717 xbox.on('a:press', function (key) {
1818 console.log(key + ' press');
@@ -23,26 +23,26 @@ Mac OSX driver: http://tattiebogle.net/index.php/ProjectRoot/Xbox360Controller/O
2323 });
2424
2525 xbox.on('lefttrigger', function(position){
26- console.log('lefttrigger', position)
27- })
26+ console.log('lefttrigger', position);
27+ });
2828
2929 xbox.on('righttrigger', function(position){
30- console.log('righttrigger', position)
31- })
30+ console.log('righttrigger', position);
31+ });
3232
3333 xbox.on('left:move', function(position){
34- console.log('left:move', position)
35- })
34+ console.log('left:move', position);
35+ });
3636
3737 xbox.on('right:move', function(position){
38- console.log('right:move', position)
39- })
38+ console.log('right:move', position);
39+ });
4040
4141## LEDs
4242
4343Set LED pattern on controller:
4444
45- xbox.setLed(0x0A)
45+ xbox.setLed(0x0A);
4646
4747Available LED patterns:
4848
@@ -68,15 +68,15 @@ Control left and right rumble motors:
6868 var leftStrength = 255;
6969 var rightStrength = 255;
7070
71- xbox.rumble(leftStrength, rightStrength)
71+ xbox.rumble(leftStrength, rightStrength);
7272
7373Where the strengths are between 0 and 255.
7474
7575## Third Party Controllers
7676
7777If you have a third party controller with a different name you can specify the name when creating the controller:
7878
79- var xbox = new XboxController('flight stick')
79+ var xbox = new XboxController('flight stick');
8080
8181## Configuring a Third Party Controller
8282
0 commit comments