Fix issues with registerAdaptor
This commit is contained in:
parent
61e8c776c3
commit
2c34f4c77e
|
@ -79,13 +79,16 @@ module.exports = class Robot
|
|||
|
||||
return @adaptors[adaptorName]
|
||||
|
||||
requireAdaptor: (adaptorName, connection) ->
|
||||
self.requireAdaptor(adaptorName, connection)
|
||||
requireAdaptor: (args...) ->
|
||||
self.requireAdaptor(args...)
|
||||
|
||||
registerAdaptor: (moduleName, adaptorName) ->
|
||||
@registerAdaptor: (moduleName, adaptorName) ->
|
||||
return if self.adaptors[adaptorName]?
|
||||
self.adaptors[adaptorName] = moduleName
|
||||
|
||||
registerAdaptor: (args...) ->
|
||||
self.registerAdaptor(args...)
|
||||
|
||||
requireDriver: (driverName, device) =>
|
||||
require("cylon-#{@drivers[driverName]}").register(this) unless @drivers[driverName]?
|
||||
require(@drivers[driverName]).driver(driverName)(device: device)
|
||||
|
|
Loading…
Reference in New Issue