firmata / arduino

Firmata firmware for Arduino
GNU Lesser General Public License v2.1
1.55k stars 516 forks source link

I2C protocol lists delay in microseconds as optional, but StandardFirmata.ino grabs bytes from buffer either way #382

Closed zfields closed 7 years ago

zfields commented 7 years ago

I2C Protocol: https://github.com/firmata/protocol/blob/master/i2c.md#i2c-config

StandardFirmata.ino: https://github.com/firmata/arduino/blob/master/examples/StandardFirmata/StandardFirmata.ino#L587

We need to check for argc to ensure we were sent a value. Currently, the i2c implementation will take any bytes sitting in the sysex buffer.

soundanalogous commented 7 years ago

Good catch!

zfields commented 7 years ago

I'll send out a PR to cover this shortly. I'm a busy bee right now... :D

soundanalogous commented 7 years ago

Fixed in https://github.com/firmata/arduino/pull/383