public static boolean isRawValueSane(double raw_value, DexCollectionType type) { return isRawValueSane(raw_value, type, false); }
public static boolean isRawValueSane(double raw_value, DexCollectionType type) { return isRawValueSane(raw_value, type, false); }
public static boolean isRawValueSane(double raw_value, DexCollectionType type) { return isRawValueSane(raw_value, type, false); }
public static boolean isRawValueSane(double raw_value, boolean hard) { return isRawValueSane(raw_value, DexCollectionType.getDexCollectionType(), hard); }
public static boolean isRawValueSane(double raw_value) { return isRawValueSane(raw_value, DexCollectionType.getDexCollectionType(), false); }
public static boolean isRawValueSane(double raw_value, boolean hard) { return isRawValueSane(raw_value, DexCollectionType.getDexCollectionType(), hard); }
public static boolean isRawValueSane(double raw_value, boolean hard) { return isRawValueSane(raw_value, DexCollectionType.getDexCollectionType(), hard); }
public static boolean isRawValueSane(double raw_value) { return isRawValueSane(raw_value, DexCollectionType.getDexCollectionType(), false); }
public static boolean isRawValueSane(double raw_value) { return isRawValueSane(raw_value, DexCollectionType.getDexCollectionType(), false); }
break; if (!SensorSanity.isRawValueSane(uncalculated.get(i).raw_data)) { uncalculated.remove(i); adjusted = true;
break; if (!SensorSanity.isRawValueSane(uncalculated.get(i).raw_data)) { uncalculated.remove(i); adjusted = true;
break; if (!SensorSanity.isRawValueSane(uncalculated.get(i).raw_data)) { uncalculated.remove(i); adjusted = true;
@Test public void sanity_raw_test_1() { assertWithMessage("Unrestricted passes").that(SensorSanity.isRawValueSane(1, DexCollectionType.Disabled)).isTrue(); assertWithMessage("G5 typical OK").that(SensorSanity.isRawValueSane(100, DexCollectionType.DexcomG5)).isTrue(); assertWithMessage("G4 typical OK").that(SensorSanity.isRawValueSane(100, DexCollectionType.DexbridgeWixel)).isTrue(); assertWithMessage("Libre typical OK").that(SensorSanity.isRawValueSane(100, DexCollectionType.LimiTTer)).isTrue(); assertWithMessage("G5 low FAIL").that(SensorSanity.isRawValueSane(1, DexCollectionType.DexcomG5)).isFalse(); assertWithMessage("G4 low FAIL").that(SensorSanity.isRawValueSane(1, DexCollectionType.DexbridgeWixel)).isFalse(); assertWithMessage("Libre low FAIL").that(SensorSanity.isRawValueSane(1, DexCollectionType.LimiTTer)).isFalse(); }
if (SensorSanity.isRawValueSane(bgReading.raw_data, DexCollectionType.getDexCollectionType(), true)) { calibration.sensor = sensor; calibration.bg = bg; calibration.uuid = UUID.randomUUID().toString(); if (!SensorSanity.isRawValueSane(calibration.estimate_raw_at_time_of_calibration, true)) { JoH.static_toast_long("Estimated raw value out of range - cannot calibrate"); return null;
@Test public void sanity_raw_test_1() { assertWithMessage("Unrestricted passes").that(SensorSanity.isRawValueSane(1, DexCollectionType.Disabled)).isTrue(); assertWithMessage("G5 typical OK").that(SensorSanity.isRawValueSane(100, DexCollectionType.DexcomG5)).isTrue(); assertWithMessage("G4 typical OK").that(SensorSanity.isRawValueSane(100, DexCollectionType.DexbridgeWixel)).isTrue(); assertWithMessage("Libre typical OK").that(SensorSanity.isRawValueSane(100, DexCollectionType.LimiTTer)).isTrue(); assertWithMessage("G5 low FAIL").that(SensorSanity.isRawValueSane(1, DexCollectionType.DexcomG5)).isFalse(); assertWithMessage("G4 low FAIL").that(SensorSanity.isRawValueSane(1, DexCollectionType.DexbridgeWixel)).isFalse(); assertWithMessage("Libre low FAIL").that(SensorSanity.isRawValueSane(1, DexCollectionType.LimiTTer)).isFalse(); }
@Test public void sanity_raw_test_2() { assertWithMessage("Unrestricted passes").that(SensorSanity.isRawValueSane(10000, DexCollectionType.Disabled)).isTrue(); assertWithMessage("G5 typical OK").that(SensorSanity.isRawValueSane(300, DexCollectionType.DexcomG5)).isTrue(); assertWithMessage("G4 typical OK").that(SensorSanity.isRawValueSane(300, DexCollectionType.DexbridgeWixel)).isTrue(); assertWithMessage("Libre typical OK").that(SensorSanity.isRawValueSane(300, DexCollectionType.LimiTTer)).isTrue(); assertWithMessage("G5 high FAIL").that(SensorSanity.isRawValueSane(1001, DexCollectionType.DexcomG5)).isFalse(); assertWithMessage("G4 high FAIL").that(SensorSanity.isRawValueSane(1001, DexCollectionType.DexbridgeWixel)).isFalse(); // assertWithMessage("Libre low FAIL").that(SensorSanity.isRawValueSane(1001, DexCollectionType.LimiTTer)).isFalse(); } }
@Test public void sanity_raw_test_2() { assertWithMessage("Unrestricted passes").that(SensorSanity.isRawValueSane(10000, DexCollectionType.Disabled)).isTrue(); assertWithMessage("G5 typical OK").that(SensorSanity.isRawValueSane(300, DexCollectionType.DexcomG5)).isTrue(); assertWithMessage("G4 typical OK").that(SensorSanity.isRawValueSane(300, DexCollectionType.DexbridgeWixel)).isTrue(); assertWithMessage("Libre typical OK").that(SensorSanity.isRawValueSane(300, DexCollectionType.LimiTTer)).isTrue(); assertWithMessage("G5 high FAIL").that(SensorSanity.isRawValueSane(1001, DexCollectionType.DexcomG5)).isFalse(); assertWithMessage("G4 high FAIL").that(SensorSanity.isRawValueSane(1001, DexCollectionType.DexbridgeWixel)).isFalse(); // assertWithMessage("Libre low FAIL").that(SensorSanity.isRawValueSane(1001, DexCollectionType.LimiTTer)).isFalse(); } }
bgReading.filtered_calculated_value = 0; bgReading.hide_slope = true; } else if (!SensorSanity.isRawValueSane(bgReading.raw_data)) { Log.wtf(TAG, "Raw data fails sanity check! " + bgReading.raw_data); bgReading.calculated_value = 0;
bgReading.filtered_calculated_value = 0; bgReading.hide_slope = true; } else if (!SensorSanity.isRawValueSane(bgReading.raw_data)) { Log.wtf(TAG, "Raw data fails sanity check! " + bgReading.raw_data); bgReading.calculated_value = 0;
bgReading.filtered_calculated_value = 0; bgReading.hide_slope = true; } else if (!SensorSanity.isRawValueSane(bgReading.raw_data)) { Log.wtf(TAG, "Raw data fails sanity check! " + bgReading.raw_data); bgReading.calculated_value = 0;