Blood pressure profile: prevent persisting duplicate samples

Explicitly clear the GregorianCalendar Instance, as calling "set" only does not set the milliseconds and causes duplicate samples.
This commit is contained in:
Daniele Gobbetti
2026-03-22 16:10:28 +01:00
parent cf244cd1b4
commit 1c3c6c8ce9
@@ -60,6 +60,7 @@ class BloodPressureProfile<T : AbstractBTLESingleDeviceSupport>(val support: T)
val second = buf.get()
val c = GregorianCalendar.getInstance()
c.clear() //set also milliseconds to 0
c.set(year.toInt(), month - 1, day.toInt(), hour.toInt(), minute.toInt(), second.toInt())
timestamp = c.getTime().time