Restore more formatting

This commit is contained in:
Bart Sopers 2020-05-04 23:52:51 +02:00
parent 1bdc474b51
commit e7fe05dbeb
20 changed files with 36 additions and 56 deletions

View file

@ -38,24 +38,4 @@ public class MedtronicConverterUTest {
// byte[] data = new byte[] { 00 03 00 05 01 00 C8 00 A0 01 01 00 01 00 00 64 01 05 00 14 00 64 01 00 00 };
}
*/
//@Test
public void testLocale() {
Locale l = new Locale("en", "IE");
Locale.setDefault(l);
Date date = new Date();
System.out.println("Date: toLocaleString: " + date.toLocaleString());
System.out.println("Date: toString: " + date.toString());
System.out.println("Date: toGMTString: " + date.toGMTString());
for (String isoCountry : Locale.getISOCountries()) {
//System.out.println("ISO country: " + isoCountry);
}
}
}

View file

@ -34,7 +34,7 @@ public class MedtronicPumpHistoryDecoderUTest {
// @Test
public void decodeRecord() throws Exception {
byte[] data = new byte[]{0x07, 0x00, 0x00, 0x05, (byte) 0xFA, (byte) 0xBF, 0x12};
byte[] data = new byte[] { 0x07, 0x00, 0x00, 0x05, (byte)0xFA, (byte)0xBF, 0x12 };
PumpHistoryEntryType entryType = PumpHistoryEntryType.getByCode(0x07);
@ -51,7 +51,7 @@ public class MedtronicPumpHistoryDecoderUTest {
// @Test
public void decodeLowAmount() {
byte[] data = new byte[]{52, -12, 22, -81, 46, 3, 19};
byte[] data = new byte[] { 52, -12, 22, -81, 46, 3, 19 };
PumpHistoryEntryGroup.doNotTranslate = true;
PumpHistoryEntryType entryType = PumpHistoryEntryType.getByCode(52);
@ -74,15 +74,15 @@ public class MedtronicPumpHistoryDecoderUTest {
// Data=0x6D 0xA1 0x92 0x05 0x0C 0x00 0xE8 0x00 0x00 0x00 0x00 0x04 0x0A 0x04 0x0A 0x64 0x00 0x00 0x00 0x00 0x00
// 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x0C 0x00 0xE8 0x00 0x00
// 0x00}]
byte[] data4443 = new byte[]{
0x6D, (byte) 0xA1, (byte) 0x92, 0x05, 0x0C, 0x00, (byte) 0xE8, 0x00, 0x00, 0x00, 0x00, 0x04, 0x0A, 0x04, 0x0A,
byte[] data4443 = new byte[] {
0x6D, (byte)0xA1, (byte)0x92, 0x05, 0x0C, 0x00, (byte)0xE8, 0x00, 0x00, 0x00, 0x00, 0x04, 0x0A, 0x04, 0x0A,
0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, (byte) 0xE8, 0x00, 0x00, 0x00};
0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, (byte)0xE8, 0x00, 0x00, 0x00 };
byte[] data = new byte[]{
0x6D, (byte) 0xA2, (byte) 0x92, 0x05, 0x0C, 0x00, (byte) 0xE8, 0x00, 0x00, 0x00, 0x00, 0x03, 0x18, 0x02,
(byte) 0xD4, 0x5B, 0x00, 0x44, 0x09, 0x00, 0x00, 0x00, 0x44, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x44, 0x64, 0x01, 0x00, 0x00, 0x00, 0x01, 0x0C, 0x00, (byte) 0xE8, 0x00, 0x00, 0x00};
byte[] data = new byte[] {
0x6D, (byte)0xA2, (byte)0x92, 0x05, 0x0C, 0x00, (byte)0xE8, 0x00, 0x00, 0x00, 0x00, 0x03, 0x18, 0x02,
(byte)0xD4, 0x5B, 0x00, 0x44, 0x09, 0x00, 0x00, 0x00, 0x44, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x44, 0x64, 0x01, 0x00, 0x00, 0x00, 0x01, 0x0C, 0x00, (byte)0xE8, 0x00, 0x00, 0x00 };
// basal 18.1, bolus 1.7 manual = 1.7
// All (bg low hi, number Bgs, Sen Lo/Hi, Sens Cal/Data, Basal, Bolus, Carbs, Fodd, Corr, Manual=1.7, food/corr,
@ -116,11 +116,11 @@ public class MedtronicPumpHistoryDecoderUTest {
// @Test
public void decodeDailyTotals523() {
byte[] data = new byte[]{
0x6E, (byte) 0xB1, (byte) 0x92, 0x05, 0x00, (byte) 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, (byte) 0x9A, 0x00,
byte[] data = new byte[] {
0x6E, (byte)0xB1, (byte)0x92, 0x05, 0x00, (byte)0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, (byte)0x9A, 0x00,
0x50, 0x34, 0x00, 0x4A, 0x30, 0x00, 0x0B, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x01, 0x00, 0x00,
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, (byte) 0x80, (byte) 0x80, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00};
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, (byte)0x80, (byte)0x80, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00 };
// Carbs=11, total=3.850,basal=2.000, bolus=1.850, basal 52%, blus=48%, Manual=0.95, #manual=5,
// Food only=0.9, #Food Only=1,Corr Only =0, #Corr only=0,Food+Corr=0