Stop using extraParams
This commit is contained in:
parent
1c922f02c1
commit
d62673bc8a
|
@ -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 = {};
|
||||||
};
|
};
|
||||||
|
|
|
@ -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: { }
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue