public static String dumpHexString(byte[] array) { if (array == null) return "<null>"; return dumpHexString(array, 0, array.length); }
public static String toHexString(short i) { return toHexString(toByteArray(i)); }
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); }
public static String toHexString(byte[] array) { return toHexString(array, 0, array.length); }
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); }
public static String toHexString(byte[] array) { return toHexString(array, 0, array.length); }
public static String dumpHexString(byte[] array) { if (array == null) return "<null>"; return dumpHexString(array, 0, array.length); }
public static String toHexString(short i) { return toHexString(toByteArray(i)); }
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); }
public static String toHexString(byte[] array) { return toHexString(array, 0, array.length); }
public static String dumpHexString(byte[] array) { if (array == null) return "<null>"; return dumpHexString(array, 0, array.length); }
public static String toHexString(short i) { return toHexString(toByteArray(i)); }
result.append(toHexString(offset)); result.append(toHexString(i)); lineIndex = 0;
private void HebrewAppendDisplayData() { // Do the append for the hebrew language String original_text = notificationText.getText().toString(); Log.d(TAG, "original_text = " + HexDump.dumpHexString(original_text.getBytes())); if (original_text.length() >= 1 && original_text.charAt(0) == 0x0a) { Log.d(TAG, "removing first and appending " + display_delta); notificationText.setText(display_delta + " " + original_text.substring(1)); } else { notificationText.setText(display_delta + " " + original_text); } }
public static String toHexString(byte b) { return toHexString(toByteArray(b)); }
result.append(toHexString(offset)); result.append(toHexString(i)); lineIndex = 0;
private void HebrewAppendDisplayData() { // Do the append for the hebrew language String original_text = notificationText.getText().toString(); Log.d(TAG, "original_text = " + HexDump.dumpHexString(original_text.getBytes())); if (original_text.length() >= 1 && original_text.charAt(0) == 0x0a) { Log.d(TAG, "removing first and appending " + display_delta); notificationText.setText(display_delta + " " + original_text.substring(1)); } else { notificationText.setText(display_delta + " " + original_text); } }