only refactoring

This commit is contained in:
rusefillc 2022-10-16 00:16:17 -04:00
parent 8389d35821
commit fb68759ddb
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); 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;
} }