Fixes issue with connection port not being found in adaptor.
This commit is contained in:
parent
0e5f27f1c6
commit
e8095a2ffd
|
@ -2,7 +2,7 @@ Cylon = require '..'
|
|||
|
||||
Cylon.robot
|
||||
connection:
|
||||
name: 'Sphero', adaptor: 'sphero'
|
||||
name: 'Sphero', adaptor: 'sphero', port: '/dev/Sphero-RPB'
|
||||
|
||||
work: ->
|
||||
every 2.seconds(), -> Logger.info "Required cylon-sphero adaptor!"
|
||||
|
|
|
@ -22,12 +22,12 @@ module.exports = class Connection
|
|||
|
||||
connect: ->
|
||||
Logger.info "Connecting to '#{@name}' on port '#{@port.toString()}'..."
|
||||
@adaptor.connect(connection: self)
|
||||
@adaptor.connect(this)
|
||||
|
||||
disconnect: ->
|
||||
Logger.info "Disconnecting from '#{@name}' on port '#{@port.toString()}'..."
|
||||
@adaptor.disconnect(connection: self)
|
||||
@adaptor.disconnect(this)
|
||||
|
||||
requireAdaptor: (adaptorName) ->
|
||||
Logger.info "dynamic load adaptor"
|
||||
@robot.requireAdaptor(adaptorName, self)
|
||||
@robot.requireAdaptor(adaptorName, this)
|
||||
|
|
Loading…
Reference in New Issue