firmata/arduino — pull request #110 by nahuel (2013-12-08 00:12:54+00:00)
Title: I2c fix shorter or larger messages

In the current code, if the board gets a shorter or larger I2C reply, an string message is sent to the host with the warning. But then the I2C_REPLY is also sent to the host, without including the data data and without including the slave address and register. At least not including the address and the register is a bug.

I fixed the bug by changing the behaviour. When the board receives a shorter or larger I2C reply, a warning message will be sent, but also the reply including the slave address, the register (fixing the bug) and the data (truncated in the case of a larger than expected reply).