Skip to content
This repository was archived by the owner on Dec 20, 2018. It is now read-only.

Commit 1d5b375

Browse files
author
Andrew Nesbitt
committed
Merge pull request #20 from EricSmekens/master
Styling issues
2 parents d91fc47 + 045dc18 commit 1d5b375

File tree

3 files changed

+20
-20
lines changed

3 files changed

+20
-20
lines changed

Readme.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -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

4343
Set LED pattern on controller:
4444

45-
xbox.setLed(0x0A)
45+
xbox.setLed(0x0A);
4646

4747
Available 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

7373
Where the strengths are between 0 and 255.
7474

7575
## Third Party Controllers
7676

7777
If 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

lib/xbox.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ XboxController.configure = function () {
253253
default:
254254
console.log('error try again');
255255
}
256-
}
256+
};
257257

258258
util.inherits(XboxController, events.EventEmitter);
259259

tests/test.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
var XboxController = require('../lib/xbox')
2-
var xbox = new XboxController
1+
var XboxController = require('../lib/xbox');
2+
var xbox = new XboxController;
33

44

55
xbox.on('a:press', function (key) {
@@ -12,17 +12,17 @@ xbox.on('b:release', function (key) {
1212

1313

1414
xbox.on('lefttrigger', function (position) {
15-
console.log('lefttrigger', position)
15+
console.log('lefttrigger', position);
1616
});
1717

1818
xbox.on('righttrigger', function (position) {
19-
console.log('righttrigger', position)
19+
console.log('righttrigger', position);
2020
});
2121

2222
xbox.on('left:move', function (position) {
23-
console.log('left:move', position)
23+
console.log('left:move', position);
2424
});
2525

2626
xbox.on('right:move', function (position) {
27-
console.log('right:move', position)
27+
console.log('right:move', position);
2828
});

0 commit comments

Comments
 (0)