mirror of
https://github.com/hybridgroup/gobot.git
synced 2025-05-11 19:29:20 +08:00
firmata: correct error in I2C reads not listening to board events
Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
parent
5536115abf
commit
05aded7528
@ -25,7 +25,7 @@ type firmataBoard interface {
|
||||
I2cWrite(int, []byte) error
|
||||
I2cConfig(int) error
|
||||
ServoConfig(int, int, int) error
|
||||
Event(string) string
|
||||
gobot.Eventer
|
||||
}
|
||||
|
||||
// Adaptor is the Gobot Adaptor for Firmata based boards
|
||||
|
@ -25,7 +25,7 @@ func (c *firmataI2cConnection) Read(b []byte) (read int, err error) {
|
||||
return
|
||||
}
|
||||
|
||||
c.adaptor.Once(c.adaptor.board.Event("I2cReply"), func(data interface{}) {
|
||||
c.adaptor.board.Once(c.adaptor.board.Event("I2cReply"), func(data interface{}) {
|
||||
ret <- data.(client.I2cReply).Data
|
||||
})
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user