mirror of
https://github.com/oliexdev/openScale.git
synced 2025-08-29 19:20:36 +02:00
Strip trailing space in hexdump
This commit is contained in:
@@ -371,12 +371,16 @@ public abstract class BluetoothCommunication {
|
||||
return "";
|
||||
}
|
||||
|
||||
if (data.length == 0) {
|
||||
return "";
|
||||
}
|
||||
|
||||
final StringBuilder stringBuilder = new StringBuilder(3 * data.length);
|
||||
for (byte byteChar : data) {
|
||||
stringBuilder.append(String.format("%02X ", byteChar));
|
||||
}
|
||||
|
||||
return stringBuilder.toString();
|
||||
return stringBuilder.substring(0, stringBuilder.length() - 1);
|
||||
}
|
||||
|
||||
protected byte xorChecksum(byte[] data, int offset, int length) {
|
||||
|
Reference in New Issue
Block a user