Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gregorybel/Missed reading timeout increase to 6min #51

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,9 @@ private void checkBackAfterMissedTime(long alarmIn) {

// alarmIn is relative time ms
public void setAlarm(long alarmIn, boolean force) {
if(!force && (alarmIn < 5 * 60 * 1000)) {
// No need to check more than once every 5 minutes
alarmIn = 5 * 60 * 1000;
if(!force && (alarmIn < 6 * 60 * 1000)) {
// No need to check more than once every 6 minutes as most CGM wake-up every 5min
alarmIn = 6 * 60 * 1000;
}

alarmIn = Math.max(alarmIn, 5000); // don't try to set less than 5 seconds in the future
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ public static boolean isCollecting() {
}
}

Log.w(TAG,"isCollecting() returns: " + m_communicationStarted);

return m_communicationStarted;
}

Expand All @@ -99,7 +101,7 @@ public static void clearPin() {
}

public static void initialize() {
Log.i(TAG, "initialize!");
Log.w(TAG, "initialize Blukon!");
Pref.setInt("bridge_battery", 0); //force battery to no-value before first reading
Pref.setInt("nfc_sensor_age", 0); //force sensor age to no-value before first reading
JoH.clearRatelimit(BLUKON_GETSENSORAGE_TIMER);
Expand Down