only refactoring
This commit is contained in:
parent
8389d35821
commit
fb68759ddb
|
@ -409,11 +409,12 @@ public class BinaryProtocol {
|
||||||
ByteBuffer bb = ByteBuffer.wrap(response, 1, 4);
|
ByteBuffer bb = ByteBuffer.wrap(response, 1, 4);
|
||||||
// that's unusual - most of the protocol is LITTLE_ENDIAN
|
// that's unusual - most of the protocol is LITTLE_ENDIAN
|
||||||
bb.order(ByteOrder.BIG_ENDIAN);
|
bb.order(ByteOrder.BIG_ENDIAN);
|
||||||
int crcFromController = bb.getInt();
|
int crc32FromController = bb.getInt();
|
||||||
log.info(String.format("rusEFI says tune CRC32 0x%x %d\n", crcFromController, crcFromController));
|
short crc16FromController = (short) crc32FromController;
|
||||||
short crc16FromController = (short) crcFromController;
|
|
||||||
|
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));
|
log.info(String.format("rusEFI says tune CRC16 0x%x %d\n", crc16FromController, crc16FromController));
|
||||||
return crcFromController;
|
return crc32FromController;
|
||||||
} else {
|
} else {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue