only refactoring

This commit is contained in:
rusefillc 2022-10-16 00:16:17 -04:00
parent ec2fb9a73c
commit d487148eac
1 changed files with 5 additions and 4 deletions

View File

@ -409,11 +409,12 @@ public class BinaryProtocol {
ByteBuffer bb = ByteBuffer.wrap(response, 1, 4);
// that's unusual - most of the protocol is LITTLE_ENDIAN
bb.order(ByteOrder.BIG_ENDIAN);
int crcFromController = bb.getInt();
log.info(String.format("rusEFI says tune CRC32 0x%x %d\n", crcFromController, crcFromController));
short crc16FromController = (short) crcFromController;
int crc32FromController = bb.getInt();
short crc16FromController = (short) crc32FromController;
log.info(String.format("rusEFI says tune CRC32 0x%x %d\n", crc32FromController, crc32FromController));
log.info(String.format("rusEFI says tune CRC16 0x%x %d\n", crc16FromController, crc16FromController));
return crcFromController;
return crc32FromController;
} else {
return -1;
}