AP_HAL: AP_HAL_Linux: add comment to I2CDevice::transfer()

If I2CDevice::transfer() has to do nothing it returns false. This can be
misleading, as this might feel contradictory.

Let's spend a comment on that.

Signed-off-by: Ralf Ramsauer <ralf.ramsauer@othr.de>
This commit is contained in:
Ralf Ramsauer 2016-08-11 17:38:56 +02:00 committed by Lucas De Marchi
parent 25c7e8bf60
commit 5b81920737

View File

@ -168,6 +168,7 @@ bool I2CDevice::transfer(const uint8_t *send, uint32_t send_len,
nmsgs++;
}
/* interpret it as an input error if nothing has to be done */
if (!nmsgs) {
return false;
}