Also reset the last package counter when doing a second round

See #691
master
cpfeiffer 2017-05-15 23:11:52 +02:00
parent b1d1e701f9
commit 07f4d3148a
1 changed files with 4 additions and 1 deletions

View File

@ -68,7 +68,7 @@ public class FetchActivityOperation extends AbstractMiBand2Operation {
private List<MiBandActivitySample> samples = new ArrayList<>(60*24); // 1day per default
private byte lastPacketCounter = -1;
private byte lastPacketCounter;
private Calendar startTimestamp;
private int fetchCount;
@ -90,6 +90,9 @@ public class FetchActivityOperation extends AbstractMiBand2Operation {
}
private void startFetching() throws IOException {
samples.clear();
lastPacketCounter = -1;
TransactionBuilder builder = performInitialized("fetching activity data");
getSupport().setLowLatency(builder);
if (fetchCount == 0) {