1
0
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:
deadprogram 2017-02-07 20:50:26 +01:00
parent 5536115abf
commit 05aded7528
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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
})