From 1597ee77b584b3dfdef76d6c14fd7608af4f6122 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Sat, 22 Oct 2016 18:04:26 +0200 Subject: [PATCH] typo --- .../androidaps/plugins/DanaR/comm/MessageBase.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/DanaR/comm/MessageBase.java b/app/src/main/java/info/nightscout/androidaps/plugins/DanaR/comm/MessageBase.java index 7843f27d17..3fc4093119 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/DanaR/comm/MessageBase.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/DanaR/comm/MessageBase.java @@ -84,11 +84,11 @@ public class MessageBase { } public int getCommand() { - int command = byeFromRawBuff(buffer, 5) | (byeFromRawBuff(buffer, 4) << 8); + int command = byteFromRawBuff(buffer, 5) | (byteFromRawBuff(buffer, 4) << 8); return command; } - public static int byeFromRawBuff(byte[] buff, int offset) { + public static int byteFromRawBuff(byte[] buff, int offset) { return buff[offset] & 0xFF; } @@ -96,13 +96,13 @@ public class MessageBase { offset += 6; switch (length) { case 1: - return byeFromRawBuff(buff, offset); + return byteFromRawBuff(buff, offset); case 2: - return (byeFromRawBuff(buff, offset) << 8) + byeFromRawBuff(buff, offset + 1); + return (byteFromRawBuff(buff, offset) << 8) + byteFromRawBuff(buff, offset + 1); case 3: - return (byeFromRawBuff(buff, offset + 2) << 16) + (byeFromRawBuff(buff, offset + 1) << 8) + byeFromRawBuff(buff, offset); + return (byteFromRawBuff(buff, offset + 2) << 16) + (byteFromRawBuff(buff, offset + 1) << 8) + byteFromRawBuff(buff, offset); case 4: - return (byeFromRawBuff(buff, offset + 3) << 24) + (byeFromRawBuff(buff, offset + 2) << 16) + (byeFromRawBuff(buff, offset + 1) << 8) + byeFromRawBuff(buff, offset); + return (byteFromRawBuff(buff, offset + 3) << 24) + (byteFromRawBuff(buff, offset + 2) << 16) + (byteFromRawBuff(buff, offset + 1) << 8) + byteFromRawBuff(buff, offset); } return 0; }