From 970c6960ea41f3937e79d39039e22ce34ad5d7ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joa=CC=83o=20Paulo=20Barraca?= Date: Thu, 5 Jan 2017 14:24:39 +0000 Subject: [PATCH] HPlus: delay day slot fetch --- .../service/devices/hplus/HPlusHandlerThread.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/hplus/HPlusHandlerThread.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/hplus/HPlusHandlerThread.java index c40abfaea..93715fce7 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/hplus/HPlusHandlerThread.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/hplus/HPlusHandlerThread.java @@ -264,11 +264,13 @@ class HPlusHandlerThread extends GBDeviceIoThread { builder.queue(mHPlusSupport.getQueue()); mGetDaySlotsTime = now; - if(mSlotsToRequest < 144) { + if(mSlotsToRequest == 6) { mGetDaySlotsTime.add(Calendar.SECOND, CURRENT_DAY_SYNC_RETRY_PERIOD); }else{ mGetDaySlotsTime.add(Calendar.SECOND, CURRENT_DAY_SYNC_PERIOD); } + LOG.debug("Requesting next slot " + mLastSlotRequested+ " at " + mGetDaySlotsTime.getTime()); + } public boolean processIncomingSleepData(byte[] data){