From b1165caef3e7dfc95810e602a9e3c97f239dc57b Mon Sep 17 00:00:00 2001 From: Philoul Date: Thu, 5 May 2022 21:58:32 +0200 Subject: [PATCH] Add milliSecFromMidnight in Profile interface and Autotune LTag --- .../java/info/nightscout/androidaps/interfaces/Profile.kt | 4 ++++ shared/src/main/java/info/nightscout/shared/logging/LTag.kt | 1 + 2 files changed, 5 insertions(+) diff --git a/core/src/main/java/info/nightscout/androidaps/interfaces/Profile.kt b/core/src/main/java/info/nightscout/androidaps/interfaces/Profile.kt index d935495eb8..c62af2c988 100644 --- a/core/src/main/java/info/nightscout/androidaps/interfaces/Profile.kt +++ b/core/src/main/java/info/nightscout/androidaps/interfaces/Profile.kt @@ -148,6 +148,10 @@ interface Profile { return (passed / 1000).toInt() } + fun milliSecFromMidnight(date: Long): Long { + val passed = DateTime(date).millisOfDay.toLong() + return passed + } /* * Units conversion */ diff --git a/shared/src/main/java/info/nightscout/shared/logging/LTag.kt b/shared/src/main/java/info/nightscout/shared/logging/LTag.kt index df6aafa82b..d9ef1e3c56 100644 --- a/shared/src/main/java/info/nightscout/shared/logging/LTag.kt +++ b/shared/src/main/java/info/nightscout/shared/logging/LTag.kt @@ -5,6 +5,7 @@ enum class LTag(val tag: String, val defaultValue : Boolean = true, val requires APS("APS"), AUTOSENS("AUTOSENS", defaultValue = false), AUTOMATION("AUTOMATION"), + AUTOTUNE("AUTOTUNE", defaultValue = false), BGSOURCE("BGSOURCE"), CONFIGBUILDER("CONFIGBUILDER"), CONSTRAINTS("CONSTRAINTS"),