Stop using extraParams

This commit is contained in:
Andrew Stewart 2014-10-31 13:50:22 -07:00
parent 1c922f02c1
commit d62673bc8a
2 changed files with 4 additions and 3 deletions

View File

@ -21,13 +21,14 @@ var Basestar = require('./basestar'),
// Returns a new Driver // Returns a new Driver
var Driver = module.exports = function Driver(opts) { var Driver = module.exports = function Driver(opts) {
opts = opts || {}; opts = opts || {};
var extraParams = opts.extraParams || {}
this.name = opts.name; this.name = opts.name;
this.device = opts.device; this.device = opts.device;
this.connection = opts.connection; this.connection = opts.connection;
this.adaptor = this.connection.adaptor; this.adaptor = this.connection.adaptor;
this.interval = extraParams.interval || 10;
this.interval = opts.interval || 10;
this.commands = {}; this.commands = {};
}; };

View File

@ -53,7 +53,7 @@ describe("Driver", function() {
driver = new Driver({ driver = new Driver({
name: 'driver', name: 'driver',
device: device, device: device,
extraParams: { interval: 2000 }, interval: 2000,
connection: { } connection: { }
}); });