Skip to content

Commit

Permalink
Adding init callback and Travis build file.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbain committed Mar 22, 2013
1 parent 828b8e2 commit 782c241
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .travis.yml
@@ -0,0 +1,4 @@
language: node_js
node_js:
- "0.10"
- "0.8"
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -7,6 +7,8 @@ lirc_node
It's designed to be used in a situation where you wish to control infrared
devices using LIRC from a Node application.

It is a part of the [Open Source Universal Remote](http://opensourceuniversalremote.com) project.

## What is this?

LIRC is a fantastic open source software package that allows you to send and
Expand Down
3 changes: 2 additions & 1 deletion lib/lirc_node.js
Expand Up @@ -3,12 +3,13 @@ exports.IRSend = require('./irsend');
exports.irsend = new exports.IRSend();
exports.remotes = {};

exports.init = function() {
exports.init = function(callback) {
exports.irsend.list('', '', irsendCallback);

function irsendCallback(error, stdout, stderr) {
exports._populateRemotes(error, stdout, stderr);
exports._populateCommands();
if (callback) callback();
}

return true;
Expand Down

0 comments on commit 782c241

Please sign in to comment.