This fixes the java version of the addressOnly() function.

Change-Id: Iec308c76f7699729c628f230d366b34626afccd8
This commit is contained in:
jmanning
2015-07-09 14:20:24 -04:00
committed by Peter Johnson
parent 4f535fb77b
commit cd47030651

View File

@@ -76,7 +76,9 @@ public class I2C extends SensorBase {
boolean aborted = true;
ByteBuffer dataToSendBuffer = ByteBuffer.allocateDirect(sendSize);
dataToSendBuffer.put(dataToSend);
if (sendSize > 0 && dataToSend != null) {
dataToSendBuffer.put(dataToSend);
}
ByteBuffer dataReceivedBuffer = ByteBuffer.allocateDirect(receiveSize);
aborted =