Merge pull request #1761 from p5nbTgip0r/fix-medtronic-cannula-logging

Fix regression in medtronic cannula change detection
This commit is contained in:
Milos Kozak 2022-05-23 08:40:20 +02:00 committed by GitHub
commit 7bcfc29b36
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -397,7 +397,7 @@ class MedtronicHistoryData @Inject constructor(
continue continue
} }
if (primeRecord.atechDateTime > maxAllowedTimeInPast) { if (primeRecord.atechDateTime > maxAllowedTimeInPast) {
if (lastPrimeRecordTime != 0L && lastPrimeRecordTime < primeRecord.atechDateTime) { if (lastPrimeRecordTime < primeRecord.atechDateTime) {
lastPrimeRecordTime = primeRecord.atechDateTime lastPrimeRecordTime = primeRecord.atechDateTime
lastPrimeRecord = primeRecord lastPrimeRecord = primeRecord
} }