Skip to content
Snippets Groups Projects
Commit 7e4682b6 authored by Volker Richert's avatar Volker Richert
Browse files

fixing #95

parent 2f03c9a5
No related branches found
No related tags found
No related merge requests found
...@@ -197,15 +197,13 @@ public class MedtronicCnlIntentService extends IntentService { ...@@ -197,15 +197,13 @@ public class MedtronicCnlIntentService extends IntentService {
activePump.updateLastQueryTS(); activePump.updateLastQueryTS();
byte radioChannel = cnlReader.negotiateChannel(activePump.getLastRadioChannel()); byte radioChannel = cnlReader.negotiateChannel(activePump.getLastRadioChannel());
if (radioChannel == 0) { if (radioChannel == 0) {
sendStatus("Could not communicate with the 640g. Are you near the pump?"); sendStatus("Could not communicate with the 640g. Are you near the pump?");
Log.i(TAG, "Could not communicate with the 640g. Are you near the pump?"); Log.i(TAG, "Could not communicate with the 640g. Are you near the pump?");
// reduce polling interval to half until pump is available // reduce polling interval to half until pump is available
//TODO: make it configurable??? MedtronicCnlAlarmManager.setAlarm(activePump.getLastQueryTS() +
MedtronicCnlAlarmManager.setAlarmAfterMillis(
(MainActivity.pollInterval + MedtronicCnlIntentService.POLL_GRACE_PERIOD_MS) / (MainActivity.reducePollOnPumpAway?2L:1L) (MainActivity.pollInterval + MedtronicCnlIntentService.POLL_GRACE_PERIOD_MS) / (MainActivity.reducePollOnPumpAway?2L:1L)
); );
} else { } else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment