Skip to content

Commit

Permalink
Moved queue code into npm module so it can be used for other modules
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyman727 committed May 4, 2014
1 parent 3b6cc41 commit 906af88
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 36 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var util = require('util');
var EventEmitter = require('events').EventEmitter;
var q = require('./lib/simple-queue');
var queue = require('sync-queue');

// The SparkFun breakout board defaults to 1, set to 0 if SA0 jumper on the bottom of the board is set
var I2C_ADDRESS = 0x1D; // 0x1D if SA0 is high, 0x1C if low
Expand All @@ -18,7 +18,7 @@ function Accelerometer (hardware, callback)
{
var self = this;
// Command Queue
self.queue = q.createQueue();
self.queue = new queue();
// Port assignment
self.hardware = hardware;
// Rate at which data is collected and is ready to be read
Expand Down
34 changes: 0 additions & 34 deletions lib/simple-queue.js

This file was deleted.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies" : {
"sync-queue" : "*"
},
"hardware": {
"./examples": false
},
Expand Down

0 comments on commit 906af88

Please sign in to comment.