public static String toHexString(byte[] array) { return toHexString(array, 0, array.length); }
public static String toHexString(byte[] array) { return toHexString(array, 0, array.length); }
public static String toHexString(byte[] array) { return toHexString(array, 0, array.length); }
public static String toHexString(short i) { return toHexString(toByteArray(i)); }
public static String toHexString(short i) { return toHexString(toByteArray(i)); }
public static String toHexString(short i) { return toHexString(toByteArray(i)); }
public static String toHexString(byte b) { return toHexString(toByteArray(b)); }
public static String toHexString(byte b) { return toHexString(toByteArray(b)); }
public static String toHexString(int i) { return toHexString(toByteArray(i)); }
public static String toHexString(int i) { return toHexString(toByteArray(i)); }
public static String toHexString(byte b) { return toHexString(toByteArray(b)); }
public static String toHexString(int i) { return toHexString(toByteArray(i)); }
result.append(toHexString(offset)); result.append(toHexString(i)); lineIndex = 0;
result.append(toHexString(offset)); result.append(toHexString(i)); lineIndex = 0;
result.append(toHexString(offset)); result.append(toHexString(i)); lineIndex = 0;
static void AreWeDone() { if(s_recviedEnoughData) { // This reading already ended return; } if(s_acumulatedSize < 344 + TOMATO_HEADER_LENGTH + 1) { return; } byte[] data = Arrays.copyOfRange(s_full_data, TOMATO_HEADER_LENGTH, TOMATO_HEADER_LENGTH+344); s_recviedEnoughData = true; long now = JoH.tsl(); // Important note, the actual serial number is 8 bytes long and starts at addresses 5. String SensorSn = LibreUtils.decodeSerialNumberKey(Arrays.copyOfRange(s_full_data, 5, 13)); boolean checksum_ok = NFCReaderX.HandleGoodReading(SensorSn, data, now, true); Log.e(TAG, "We have all the data that we need " + s_acumulatedSize + " checksum_ok = " + checksum_ok + HexDump.dumpHexString(data)); if(!checksum_ok) { throw new RuntimeException(CHECKSUM_FAILED); } PersistentStore.setString("Tomatobattery", Integer.toString(s_full_data[13])); Pref.setInt("bridge_battery", s_full_data[13]); PersistentStore.setString("TomatoHArdware",HexDump.toHexString(s_full_data,16,2)); PersistentStore.setString("TomatoFirmware",HexDump.toHexString(s_full_data,14,2)); PersistentStore.setString("LibreSN", SensorSn); }
static void AreWeDone() { if(s_recviedEnoughData) { // This reading already ended return; } if(s_acumulatedSize < 344 + TOMATO_HEADER_LENGTH + 1) { return; } byte[] data = Arrays.copyOfRange(s_full_data, TOMATO_HEADER_LENGTH, TOMATO_HEADER_LENGTH+344); s_recviedEnoughData = true; long now = JoH.tsl(); // Important note, the actual serial number is 8 bytes long and starts at addresses 5. String SensorSn = LibreUtils.decodeSerialNumberKey(Arrays.copyOfRange(s_full_data, 5, 13)); boolean checksum_ok = NFCReaderX.HandleGoodReading(SensorSn, data, now, true); Log.e(TAG, "We have all the data that we need " + s_acumulatedSize + " checksum_ok = " + checksum_ok + HexDump.dumpHexString(data)); if(!checksum_ok) { throw new RuntimeException(CHECKSUM_FAILED); } PersistentStore.setString("Tomatobattery", Integer.toString(s_full_data[13])); Pref.setInt("bridge_battery", s_full_data[13]); PersistentStore.setString("TomatoHArdware",HexDump.toHexString(s_full_data,16,2)); PersistentStore.setString("TomatoFirmware",HexDump.toHexString(s_full_data,14,2)); PersistentStore.setString("LibreSN", SensorSn); }
static void AreWeDone() { if(s_recviedEnoughData) { // This reading already ended return; } if(s_acumulatedSize < 344 + TOMATO_HEADER_LENGTH + 1) { return; } byte[] data = Arrays.copyOfRange(s_full_data, TOMATO_HEADER_LENGTH, TOMATO_HEADER_LENGTH+344); s_recviedEnoughData = true; long now = JoH.tsl(); // Important note, the actual serial number is 8 bytes long and starts at addresses 5. String SensorSn = LibreUtils.decodeSerialNumberKey(Arrays.copyOfRange(s_full_data, 5, 13)); boolean checksum_ok = NFCReaderX.HandleGoodReading(SensorSn, data, now, true); Log.e(TAG, "We have all the data that we need " + s_acumulatedSize + " checksum_ok = " + checksum_ok + HexDump.dumpHexString(data)); if(!checksum_ok) { throw new RuntimeException(CHECKSUM_FAILED); } PersistentStore.setString("Tomatobattery", Integer.toString(s_full_data[13])); Pref.setInt("bridge_battery", s_full_data[13]); PersistentStore.setString("TomatoHArdware",HexDump.toHexString(s_full_data,16,2)); PersistentStore.setString("TomatoFirmware",HexDump.toHexString(s_full_data,14,2)); PersistentStore.setString("LibreSN", SensorSn); }