Skip to content

Commit a99be11

Browse files
Another attempt to fix Arduino issue...
1 parent 99e7d21 commit a99be11

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

btutillib/src/main/java/com/devpaul/bluetoothutillib/utils/BluetoothUtility.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -757,9 +757,10 @@ public void run() {
757757
if(reader.ready()) {
758758
//read a single line.
759759
String message = reader.readLine();
760-
buffer = message.getBytes();
761-
bytes = buffer.length;
762-
bluetoothHandler.obtainMessage(BluetoothHandler.MESSAGE_READ, bytes, -1, buffer)
760+
//don't use the regular buffer.
761+
byte[] byteString = message.getBytes();
762+
bytes = byteString.length;
763+
bluetoothHandler.obtainMessage(BluetoothHandler.MESSAGE_READ, bytes, -1, byteString)
763764
.sendToTarget();
764765
}
765766
} catch (IOException e) {

0 commit comments

Comments
 (0)