diff --git a/app/src/main/java/com/eveningoutpost/dexdrip/cgm/nsfollow/NightscoutFollowService.java b/app/src/main/java/com/eveningoutpost/dexdrip/cgm/nsfollow/NightscoutFollowService.java index 09163c9e5b..f4534e2d21 100644 --- a/app/src/main/java/com/eveningoutpost/dexdrip/cgm/nsfollow/NightscoutFollowService.java +++ b/app/src/main/java/com/eveningoutpost/dexdrip/cgm/nsfollow/NightscoutFollowService.java @@ -147,7 +147,7 @@ private static boolean shouldServiceRun() { */ public static List megaStatus() { final BgReading lastBg = BgReading.lastNoSenssor(); - final long lag = Constants.SECOND_IN_MS * Integer.valueOf(Pref.getString("nsfollow_lag", "0")); // Wake delay selected by user + final long lag = Constants.SECOND_IN_MS * Pref.getStringToInt("nsfollow_lag", 0); // Wake delay selected by user String lastPollText = "n/a"; if (lastPoll > 0) { diff --git a/app/src/main/java/com/eveningoutpost/dexdrip/cgm/nsfollow/utils/Anticipate.java b/app/src/main/java/com/eveningoutpost/dexdrip/cgm/nsfollow/utils/Anticipate.java index 2ce10709e8..426bf0c629 100644 --- a/app/src/main/java/com/eveningoutpost/dexdrip/cgm/nsfollow/utils/Anticipate.java +++ b/app/src/main/java/com/eveningoutpost/dexdrip/cgm/nsfollow/utils/Anticipate.java @@ -21,7 +21,7 @@ public class Anticipate { */ public static long next(long now, final long lastTimeStamp, final long period, final long grace) { - final long lag = Constants.SECOND_IN_MS * Integer.valueOf(Pref.getString("nsfollow_lag", "0")); // User can choose a wake delay with a 0 default. + final long lag = Constants.SECOND_IN_MS * Pref.getStringToInt("nsfollow_lag", 0); // User can choose a wake delay with a 0 default. final long last = lastTimeStamp + lag; // We delay the source timestamp and use it as the time we received the reading to account for any source delay. final long since = now - last; diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml index 4dda01ed90..2b2c7a6dc6 100644 --- a/app/src/main/res/values/arrays.xml +++ b/app/src/main/res/values/arrays.xml @@ -531,15 +531,17 @@ The default is no delay, and is marked with the single symbol > --> 0 > - 30 s + 40 s 1 min + 1.5 min 2 min 3 min 0 - 30 + 40 60 + 90 120 180