From 33dcf6479d4f22e70718f584b0aa50b8ee84380b Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Mon, 21 Nov 2022 20:26:06 +0100 Subject: [PATCH] Sensitivity module --- app/build.gradle | 5 +- .../activities/MyPreferenceFragment.kt | 6 +- .../androidaps/di/PluginsListModule.kt | 6 +- .../iob/iobCobCalculator/IobCobOref1Worker.kt | 4 +- .../iob/iobCobCalculator/IobCobOrefWorker.kt | 4 +- .../workflow/CalculationWorkflow.kt | 2 +- app/src/main/res/values-af-rZA/strings.xml | 6 +- app/src/main/res/values-bg-rBG/strings.xml | 6 +- app/src/main/res/values-cs-rCZ/strings.xml | 6 +- app/src/main/res/values-da-rDK/strings.xml | 6 +- app/src/main/res/values-de-rDE/strings.xml | 6 +- app/src/main/res/values-el-rGR/strings.xml | 6 +- app/src/main/res/values-es-rES/strings.xml | 6 +- app/src/main/res/values-fr-rFR/strings.xml | 6 +- app/src/main/res/values-it-rIT/strings.xml | 6 +- app/src/main/res/values-iw-rIL/strings.xml | 6 +- app/src/main/res/values-ko-rKR/strings.xml | 6 +- app/src/main/res/values-lt-rLT/strings.xml | 6 +- app/src/main/res/values-nl-rNL/strings.xml | 6 +- app/src/main/res/values-no-rNO/strings.xml | 6 +- app/src/main/res/values-pl-rPL/strings.xml | 6 +- app/src/main/res/values-pt-rBR/strings.xml | 6 +- app/src/main/res/values-pt-rPT/strings.xml | 6 +- app/src/main/res/values-ro-rRO/strings.xml | 6 +- app/src/main/res/values-ru-rRU/strings.xml | 6 +- app/src/main/res/values-sk-rSK/strings.xml | 6 +- app/src/main/res/values-sv-rSE/strings.xml | 6 +- app/src/main/res/values-tr-rTR/strings.xml | 6 +- app/src/main/res/values-zh-rCN/strings.xml | 6 +- app/src/main/res/values/strings.xml | 9 -- .../AbstractSensitivityPluginTest.kt | 1 + core/core-main/build.gradle | 1 + .../androidaps/data/ProfileSealed.kt | 24 ++-- .../extensions/ProfileSwitchExtension.kt | 12 -- .../core/profile/ProfileExtension.kt | 17 --- .../core/wizard/QuickWizardEntry.kt | 4 +- .../core-main/src/main/res/values/strings.xml | 103 ----------------- .../src/main/res/values-af-rZA/strings.xml | 2 - .../src/main/res/values-bg-rBG/strings.xml | 2 - .../src/main/res/values-ca-rES/strings.xml | 2 - .../src/main/res/values-cs-rCZ/strings.xml | 2 - .../src/main/res/values-da-rDK/strings.xml | 2 - .../src/main/res/values-de-rDE/strings.xml | 2 - .../src/main/res/values-el-rGR/strings.xml | 2 - .../src/main/res/values-es-rES/strings.xml | 2 - .../src/main/res/values-fr-rFR/strings.xml | 2 - .../src/main/res/values-ga-rIE/strings.xml | 2 - .../src/main/res/values-hr-rHR/strings.xml | 2 - .../src/main/res/values-hu-rHU/strings.xml | 2 - .../src/main/res/values-it-rIT/strings.xml | 2 - .../src/main/res/values-iw-rIL/strings.xml | 2 - .../src/main/res/values-ja-rJP/strings.xml | 2 - .../src/main/res/values-ko-rKR/strings.xml | 2 - .../src/main/res/values-lt-rLT/strings.xml | 2 - .../src/main/res/values-nl-rNL/strings.xml | 2 - .../src/main/res/values-no-rNO/strings.xml | 2 - .../src/main/res/values-pl-rPL/strings.xml | 2 - .../src/main/res/values-pt-rBR/strings.xml | 2 - .../src/main/res/values-pt-rPT/strings.xml | 2 - .../src/main/res/values-ro-rRO/strings.xml | 2 - .../src/main/res/values-ru-rRU/strings.xml | 2 - .../src/main/res/values-sk-rSK/strings.xml | 2 - .../src/main/res/values-sr-rCS/strings.xml | 2 - .../src/main/res/values-sv-rSE/strings.xml | 2 - .../src/main/res/values-tr-rTR/strings.xml | 2 - .../src/main/res/values-zh-rCN/strings.xml | 2 - core/fabric/src/main/res/values/strings.xml | 4 - .../src/main/res/drawable/ic_generic_icon.xml | 0 core/{fabric => utils}/.gitignore | 0 core/{fabric => utils}/build.gradle | 3 +- core/{fabric => utils}/consumer-rules.pro | 0 core/{fabric => utils}/proguard-rules.pro | 0 .../src/main/AndroidManifest.xml | 0 .../nightscout/core/fabric/FabricPrivacy.kt | 1 + .../info/nightscout/core/fabric/InstanceId.kt | 0 .../nightscout/core/utils/MidnightUtils.kt | 22 ++++ .../info/nightscout/core}/utils/Percentile.kt | 2 +- core/utils/src/main/res/values/keys.xml | 106 ++++++++++++++++++ crowdin.yml | 6 +- implementation/build.gradle | 2 +- insight/build.gradle | 2 +- plugins/aps/build.gradle | 2 +- .../aps/openAPSAMA/OpenAPSAMAPlugin.kt | 4 +- .../aps/openAPSSMB/OpenAPSSMBPlugin.kt | 4 +- .../plugins/general/autotune/AutotuneCore.kt | 2 +- .../plugins/general/autotune/AutotuneIob.kt | 6 +- .../general/autotune/data/ATProfile.kt | 4 +- plugins/automation/build.gradle | 2 +- .../automation/elements/InputTime.kt | 4 +- .../automation/elements/InputTimeRange.kt | 4 +- .../triggers/TriggerRecurringTime.kt | 4 +- .../automation/triggers/TriggerTimeRange.kt | 4 +- plugins/configuration/build.gradle | 2 +- plugins/main/build.gradle | 2 +- .../extensions/TherapyEventExtension.kt | 8 -- plugins/main/src/main/res/values/strings.xml | 1 - plugins/sensitivity/.gitignore | 1 + plugins/sensitivity/build.gradle | 28 +++++ plugins/sensitivity/consumer-rules.pro | 0 plugins/sensitivity/proguard-rules.pro | 21 ++++ .../sensitivity/src/main/AndroidManifest.xml | 4 + .../sensitivity/AbstractSensitivityPlugin.kt | 3 +- .../sensitivity/SensitivityAAPSPlugin.kt | 16 +-- .../sensitivity/SensitivityOref1Plugin.kt | 21 ++-- .../SensitivityWeightedAveragePlugin.kt | 14 +-- .../extensions/ProfileSwitchExtensions.kt | 16 +++ .../extensions/TherapyEventExtensions.kt | 13 +++ .../src/main/res/values/strings.xml | 12 ++ .../src/main/res/xml/pref_absorption_aaps.xml | 0 .../main/res/xml/pref_absorption_oref1.xml | 0 pump/combo/build.gradle | 2 +- pump/dana/build.gradle | 2 +- pump/danar/build.gradle | 2 +- pump/danars/build.gradle | 2 +- pump/diaconn/build.gradle | 2 +- pump/eopatch/build.gradle | 2 +- pump/medtronic/build.gradle | 2 +- pump/omnipod-dash/build.gradle | 2 +- pump/omnipod-eros/build.gradle | 2 +- pump/pump-common/build.gradle | 2 +- settings.gradle | 5 +- ui/build.gradle | 2 +- 122 files changed, 392 insertions(+), 379 deletions(-) delete mode 100644 core/fabric/src/main/res/values-af-rZA/strings.xml delete mode 100644 core/fabric/src/main/res/values-bg-rBG/strings.xml delete mode 100644 core/fabric/src/main/res/values-ca-rES/strings.xml delete mode 100644 core/fabric/src/main/res/values-cs-rCZ/strings.xml delete mode 100644 core/fabric/src/main/res/values-da-rDK/strings.xml delete mode 100644 core/fabric/src/main/res/values-de-rDE/strings.xml delete mode 100644 core/fabric/src/main/res/values-el-rGR/strings.xml delete mode 100644 core/fabric/src/main/res/values-es-rES/strings.xml delete mode 100644 core/fabric/src/main/res/values-fr-rFR/strings.xml delete mode 100644 core/fabric/src/main/res/values-ga-rIE/strings.xml delete mode 100644 core/fabric/src/main/res/values-hr-rHR/strings.xml delete mode 100644 core/fabric/src/main/res/values-hu-rHU/strings.xml delete mode 100644 core/fabric/src/main/res/values-it-rIT/strings.xml delete mode 100644 core/fabric/src/main/res/values-iw-rIL/strings.xml delete mode 100644 core/fabric/src/main/res/values-ja-rJP/strings.xml delete mode 100644 core/fabric/src/main/res/values-ko-rKR/strings.xml delete mode 100644 core/fabric/src/main/res/values-lt-rLT/strings.xml delete mode 100644 core/fabric/src/main/res/values-nl-rNL/strings.xml delete mode 100644 core/fabric/src/main/res/values-no-rNO/strings.xml delete mode 100644 core/fabric/src/main/res/values-pl-rPL/strings.xml delete mode 100644 core/fabric/src/main/res/values-pt-rBR/strings.xml delete mode 100644 core/fabric/src/main/res/values-pt-rPT/strings.xml delete mode 100644 core/fabric/src/main/res/values-ro-rRO/strings.xml delete mode 100644 core/fabric/src/main/res/values-ru-rRU/strings.xml delete mode 100644 core/fabric/src/main/res/values-sk-rSK/strings.xml delete mode 100644 core/fabric/src/main/res/values-sr-rCS/strings.xml delete mode 100644 core/fabric/src/main/res/values-sv-rSE/strings.xml delete mode 100644 core/fabric/src/main/res/values-tr-rTR/strings.xml delete mode 100644 core/fabric/src/main/res/values-zh-rCN/strings.xml delete mode 100644 core/fabric/src/main/res/values/strings.xml rename core/{core-main => ui}/src/main/res/drawable/ic_generic_icon.xml (100%) rename core/{fabric => utils}/.gitignore (100%) rename core/{fabric => utils}/build.gradle (92%) rename core/{fabric => utils}/consumer-rules.pro (100%) rename core/{fabric => utils}/proguard-rules.pro (100%) rename core/{fabric => utils}/src/main/AndroidManifest.xml (100%) rename core/{fabric => utils}/src/main/java/info/nightscout/core/fabric/FabricPrivacy.kt (99%) rename core/{fabric => utils}/src/main/java/info/nightscout/core/fabric/InstanceId.kt (100%) create mode 100644 core/utils/src/main/java/info/nightscout/core/utils/MidnightUtils.kt rename {plugins/aps/src/main/java/info/nightscout/plugins/aps => core/utils/src/main/java/info/nightscout/core}/utils/Percentile.kt (94%) create mode 100644 core/utils/src/main/res/values/keys.xml create mode 100644 plugins/sensitivity/.gitignore create mode 100644 plugins/sensitivity/build.gradle create mode 100644 plugins/sensitivity/consumer-rules.pro create mode 100644 plugins/sensitivity/proguard-rules.pro create mode 100644 plugins/sensitivity/src/main/AndroidManifest.xml rename {app/src/main/java/info/nightscout/androidaps/plugins => plugins/sensitivity/src/main/java/info/nightscout}/sensitivity/AbstractSensitivityPlugin.kt (97%) rename {app/src/main/java/info/nightscout/androidaps/plugins => plugins/sensitivity/src/main/java/info/nightscout}/sensitivity/SensitivityAAPSPlugin.kt (93%) rename {app/src/main/java/info/nightscout/androidaps/plugins => plugins/sensitivity/src/main/java/info/nightscout}/sensitivity/SensitivityOref1Plugin.kt (93%) rename {app/src/main/java/info/nightscout/androidaps/plugins => plugins/sensitivity/src/main/java/info/nightscout}/sensitivity/SensitivityWeightedAveragePlugin.kt (94%) create mode 100644 plugins/sensitivity/src/main/java/info/nightscout/sensitivity/extensions/ProfileSwitchExtensions.kt create mode 100644 plugins/sensitivity/src/main/java/info/nightscout/sensitivity/extensions/TherapyEventExtensions.kt create mode 100644 plugins/sensitivity/src/main/res/values/strings.xml rename {app => plugins/sensitivity}/src/main/res/xml/pref_absorption_aaps.xml (100%) rename {app => plugins/sensitivity}/src/main/res/xml/pref_absorption_oref1.xml (100%) diff --git a/app/build.gradle b/app/build.gradle index 83063a8d88..a7840600f3 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -188,15 +188,16 @@ dependencies { implementation project(':app-wear-shared:shared') implementation project(':app-wear-shared:shared-impl') implementation project(':core:core-main') - implementation project(':core:fabric') + implementation project(':core:utils') implementation project(':core:ui') implementation project(':interfaces') implementation project(':ui') implementation project(':plugins:aps') implementation project(':plugins:automation') + implementation project(':plugins:configuration') implementation project(':plugins:main') implementation project(':plugins:openhumans') - implementation project(':plugins:configuration') + implementation project(':plugins:sensitivity') implementation project(':implementation') implementation project(':database:entities') implementation project(':database:impl') diff --git a/app/src/main/java/info/nightscout/androidaps/activities/MyPreferenceFragment.kt b/app/src/main/java/info/nightscout/androidaps/activities/MyPreferenceFragment.kt index d08c346668..b76eda7756 100644 --- a/app/src/main/java/info/nightscout/androidaps/activities/MyPreferenceFragment.kt +++ b/app/src/main/java/info/nightscout/androidaps/activities/MyPreferenceFragment.kt @@ -31,9 +31,9 @@ import info.nightscout.androidaps.plugins.pump.combo.ComboPlugin import info.nightscout.androidaps.plugins.pump.eopatch.EopatchPumpPlugin import info.nightscout.androidaps.plugins.pump.insight.LocalInsightPlugin import info.nightscout.androidaps.plugins.pump.medtronic.MedtronicPumpPlugin -import info.nightscout.androidaps.plugins.sensitivity.SensitivityAAPSPlugin -import info.nightscout.androidaps.plugins.sensitivity.SensitivityOref1Plugin -import info.nightscout.androidaps.plugins.sensitivity.SensitivityWeightedAveragePlugin +import info.nightscout.sensitivity.SensitivityAAPSPlugin +import info.nightscout.sensitivity.SensitivityOref1Plugin +import info.nightscout.sensitivity.SensitivityWeightedAveragePlugin import info.nightscout.androidaps.utils.protection.PasswordCheck import info.nightscout.androidaps.utils.protection.ProtectionCheck.ProtectionType.BIOMETRIC import info.nightscout.androidaps.utils.protection.ProtectionCheck.ProtectionType.CUSTOM_PASSWORD diff --git a/app/src/main/java/info/nightscout/androidaps/di/PluginsListModule.kt b/app/src/main/java/info/nightscout/androidaps/di/PluginsListModule.kt index c04ee1c049..9c26f6c94f 100644 --- a/app/src/main/java/info/nightscout/androidaps/di/PluginsListModule.kt +++ b/app/src/main/java/info/nightscout/androidaps/di/PluginsListModule.kt @@ -24,9 +24,9 @@ import info.nightscout.androidaps.plugins.pump.insight.LocalInsightPlugin import info.nightscout.androidaps.plugins.pump.medtronic.MedtronicPumpPlugin import info.nightscout.androidaps.plugins.pump.omnipod.dash.OmnipodDashPumpPlugin import info.nightscout.androidaps.plugins.pump.omnipod.eros.OmnipodErosPumpPlugin -import info.nightscout.androidaps.plugins.sensitivity.SensitivityAAPSPlugin -import info.nightscout.androidaps.plugins.sensitivity.SensitivityOref1Plugin -import info.nightscout.androidaps.plugins.sensitivity.SensitivityWeightedAveragePlugin +import info.nightscout.sensitivity.SensitivityAAPSPlugin +import info.nightscout.sensitivity.SensitivityOref1Plugin +import info.nightscout.sensitivity.SensitivityWeightedAveragePlugin import info.nightscout.automation.AutomationPlugin import info.nightscout.interfaces.plugin.PluginBase import info.nightscout.plugins.aps.openAPSAMA.OpenAPSAMAPlugin diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobOref1Worker.kt b/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobOref1Worker.kt index a5b1fe6280..9c98a7ce4c 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobOref1Worker.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobOref1Worker.kt @@ -11,8 +11,8 @@ import info.nightscout.androidaps.extensions.target import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.plugins.iob.iobCobCalculator.data.AutosensDataObject import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventIobCalculationProgress -import info.nightscout.androidaps.plugins.sensitivity.SensitivityAAPSPlugin -import info.nightscout.androidaps.plugins.sensitivity.SensitivityWeightedAveragePlugin +import info.nightscout.sensitivity.SensitivityAAPSPlugin +import info.nightscout.sensitivity.SensitivityWeightedAveragePlugin import info.nightscout.androidaps.receivers.DataWorkerStorage import info.nightscout.androidaps.utils.DecimalFormatter import info.nightscout.androidaps.workflow.CalculationWorkflow diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobOrefWorker.kt b/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobOrefWorker.kt index 381ed41b5e..bce4e75a43 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobOrefWorker.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobOrefWorker.kt @@ -10,8 +10,8 @@ import info.nightscout.androidaps.R import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.plugins.iob.iobCobCalculator.data.AutosensDataObject import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventIobCalculationProgress -import info.nightscout.androidaps.plugins.sensitivity.SensitivityAAPSPlugin -import info.nightscout.androidaps.plugins.sensitivity.SensitivityWeightedAveragePlugin +import info.nightscout.sensitivity.SensitivityAAPSPlugin +import info.nightscout.sensitivity.SensitivityWeightedAveragePlugin import info.nightscout.androidaps.receivers.DataWorkerStorage import info.nightscout.androidaps.utils.DecimalFormatter import info.nightscout.androidaps.workflow.CalculationWorkflow diff --git a/app/src/main/java/info/nightscout/androidaps/workflow/CalculationWorkflow.kt b/app/src/main/java/info/nightscout/androidaps/workflow/CalculationWorkflow.kt index bfca001cc6..547f16272e 100644 --- a/app/src/main/java/info/nightscout/androidaps/workflow/CalculationWorkflow.kt +++ b/app/src/main/java/info/nightscout/androidaps/workflow/CalculationWorkflow.kt @@ -15,7 +15,7 @@ import info.nightscout.androidaps.plugins.general.overview.OverviewData import info.nightscout.androidaps.plugins.iob.iobCobCalculator.IobCobCalculatorPlugin import info.nightscout.androidaps.plugins.iob.iobCobCalculator.IobCobOref1Worker import info.nightscout.androidaps.plugins.iob.iobCobCalculator.IobCobOrefWorker -import info.nightscout.androidaps.plugins.sensitivity.SensitivityOref1Plugin +import info.nightscout.sensitivity.SensitivityOref1Plugin import info.nightscout.androidaps.receivers.DataWorkerStorage import info.nightscout.core.fabric.FabricPrivacy import info.nightscout.interfaces.iob.IobCobCalculator diff --git a/app/src/main/res/values-af-rZA/strings.xml b/app/src/main/res/values-af-rZA/strings.xml index 968e7ce1ad..d21e9a33a2 100644 --- a/app/src/main/res/values-af-rZA/strings.xml +++ b/app/src/main/res/values-af-rZA/strings.xml @@ -81,15 +81,15 @@ Sensitiwiteit opsporing Watter sensitiwiteit algoritme moet gebruik word? SENS - Sensitiwiteit Oref1 - Sensitiwiteit AAPS + Sensitiwiteit Oref1 + Sensitiwiteit AAPS Absorpsie instellings Maaltyd max\ks absorpsie tyd [h] Tyd in ure waarna verwag word dat alle koolhidrate uit maaltyd geabsorbeer sal wees Hou skerm aktief Verhoed dat Android skerm afskakel. Dit sal baie meer energie vereis wanneer nie in krag prop is nie. Deur Autosense aan te skakel onthou om alle koolhidrate in te voer Andersins sal koolhidrate dwalinge verkeerdelik geïdentifiseer word as sensitiwiteit veranderinge!! - Sensitiwiteit GeweegdeGemiddelde + Sensitiwiteit GeweegdeGemiddelde Nie alle profiele gelaai! Waardes nie gestoor! ONGELDIG diff --git a/app/src/main/res/values-bg-rBG/strings.xml b/app/src/main/res/values-bg-rBG/strings.xml index 0e6bfe9afc..736bb72153 100644 --- a/app/src/main/res/values-bg-rBG/strings.xml +++ b/app/src/main/res/values-bg-rBG/strings.xml @@ -116,15 +116,15 @@ Определяне на чувствителност Кой алгоритъм за определяне на чувствителността да се използва? ЧУВСТВ - Чрез Oref1 - чрез AAPS + Чрез Oref1 + чрез AAPS Настройки за абсорбция Максимално време за усвояване на храненето [ч] Брой часове, за които се очаква храненето да бъде напълно усвоено в организма Винаги включен екран Предотвратяване на андроид да изключва екрана. Това ще доведе до консумацията на много енергия, когато устройството не е включено в контакта. Когато включите Autosense feature трябва да въвеждате ВСИЧКИ въглехидрати. В противен случай те ще се изчисляват грешно като повишена чувствителност!! - чрез Среднопретеглената стойност + чрез Среднопретеглената стойност Не всички профили са заредени! Стойностите не са запазени! НЕВАЛИДНО diff --git a/app/src/main/res/values-cs-rCZ/strings.xml b/app/src/main/res/values-cs-rCZ/strings.xml index c0cac39b5b..6d3874ddde 100644 --- a/app/src/main/res/values-cs-rCZ/strings.xml +++ b/app/src/main/res/values-cs-rCZ/strings.xml @@ -122,15 +122,15 @@ Detekce citlivosti Jaký druh algoritmu pro detekci citlivosti chcete použít? SENZ - Sensitivita Oref1 - Sensitivita AAPS + Sensitivita Oref1 + Sensitivita AAPS Nastavení absorpce sacharidů Max. doba absorpce sacharidů [h] Čas v hodinách, ve kterém předpokládáme, že všechny sacharidy budou strávené Nechat obrazovku zapnutou Zabránit Androidu ve zhasínání obrazovky. Bez připojení do nabíječky vybije velice rychle baterii! Při zapnuté detekci sensitivity nezapomeňte vkládat všechny sacharidy. Jinak budou odchylky mylně vyhodnocovány jako změna sensitivity !! - Sensitivita vážený průměr + Sensitivita vážený průměr Všechny profily nenačteny! Hodnoty nejsou uloženy! NEPLATNÝ diff --git a/app/src/main/res/values-da-rDK/strings.xml b/app/src/main/res/values-da-rDK/strings.xml index 523cee87b6..594eb659ac 100644 --- a/app/src/main/res/values-da-rDK/strings.xml +++ b/app/src/main/res/values-da-rDK/strings.xml @@ -116,15 +116,15 @@ Detektering af følsomhed Hvilken følsomhedsalgoritme skal anvendes? SENS - Følsomhed Oref1 - Følsomhed AAPS + Følsomhed Oref1 + Følsomhed AAPS Indstillinger for absorbering Måltid max absorptionstid [h] Tid i timer, hvor det forventes at alle kulhydrater fra måltidet vil blive absorberet Hold skærmen tændt Forhindrer Android i at slukke for skærmen. Det vil forbruge meget energi, når den ikke er tilsluttet stikkontakt. Ved at slå funktionen Autosense til husk at indtaste alle spiste kulhydrater. Ellers vil kulhydrat afvigelser blive identificeret forkert som følsomheds ændring !! - Følsomhed Vægtet Gennemsnit + Følsomhed Vægtet Gennemsnit Ikke alle profiler er indlæst! Værdier ikke gemt! UGYLDIG diff --git a/app/src/main/res/values-de-rDE/strings.xml b/app/src/main/res/values-de-rDE/strings.xml index 747386d773..b0268f2077 100644 --- a/app/src/main/res/values-de-rDE/strings.xml +++ b/app/src/main/res/values-de-rDE/strings.xml @@ -116,15 +116,15 @@ Sensitivitätserkennung Welcher Sensitivitäts-Algorithmus soll verwendet werden? SENS - Sensitivität Oref1 - Sensitivität AAPS + Sensitivität Oref1 + Sensitivität AAPS Resorptions-Einstellungen Maximale Essens-Resorptionszeit [h] Zeit in Stunden, in der zu erwarten ist, dass alle Kohlenhydrate resorbiert sein werden. Bildschirm aktiv lassen Hindere Android daran, den Bildschirm abzuschalten. Dies erhöht den Energieverbrauch, wenn das Gerät nicht an einem Ladegerät angeschlossen ist. Stelle bei aktivierter Autosens-Funktion sicher, dass du alle eingenommenen Kohlenhydrate eingibst. Ansonsten können die Kohlenhydrat-Abweichungen zu falschen Sensitivitätswerten führen! - Durchschnittliche Sensitivität + Durchschnittliche Sensitivität Es sind nicht alle Profile geladen! Werte nicht gespeichert! Ungültig diff --git a/app/src/main/res/values-el-rGR/strings.xml b/app/src/main/res/values-el-rGR/strings.xml index bb7a814581..3bbcea3c26 100644 --- a/app/src/main/res/values-el-rGR/strings.xml +++ b/app/src/main/res/values-el-rGR/strings.xml @@ -80,15 +80,15 @@ Ανίχνευση ευαισθησίας Ποιος αλγόριθμος ευαισθησίας να χρησιμοποιηθεί; SENS - Ευαισθησία Oref1 - Ευαισθησία AAPS + Ευαισθησία Oref1 + Ευαισθησία AAPS Ρύθμιση απορρόφησης Μέγιστος χρόνος απορρόφησης γεύματος [h] Χρόνος σε ώρες που περιμένουμε να απορροφηθούν όλοι οι υδατάνθρακες ενός γεύματος Κρατήστε την οθόνη ενεργή Αποτρέψετε το Android να απενεργοποιήσει την οθόνη. Χωρίς σύνδεση με το φορτιστή, αποφορτίζει πολύ γρήγορα την μπαταρία. Ενεργοποιώντας το autosense θυμηθείτε να εισάγετε όλους τους υδατάνθρακες. Διαφορετικά, οι αποκλίσεις των υδατανθράκων θα εντοπιστούν λανθασμένα ως αλλαγή ευαισθησίας!! - Ευαισθησία WeightedAverage + Ευαισθησία WeightedAverage Δεν έχουν φορτωθεί όλα τα προφίλ! Οι τιμές δεν αποθηκεύτηκαν! ΜΗ ΕΓΚΥΡΟ diff --git a/app/src/main/res/values-es-rES/strings.xml b/app/src/main/res/values-es-rES/strings.xml index 60530689d7..8a1972f43e 100644 --- a/app/src/main/res/values-es-rES/strings.xml +++ b/app/src/main/res/values-es-rES/strings.xml @@ -122,15 +122,15 @@ Detección sensibilidad ¿Qué algoritmo de sensibilidad debería usar? SENS - Sensibilidad Oref1 - Sensibilidad AAPS + Sensibilidad Oref1 + Sensibilidad AAPS Ajustes de absorción Tiempo máximo de absorción de la comida [h] Tiempo en horas en el que se espera que todos los carbohidratos hayan sido absorbidos Mantener la pantalla activa Evita que Android apague la pantalla. Consume mucha batería cuando el teléfono no está conectado al cargador Al activar Autosens, recuerda introducir todos carbohidratos que has comido, sino, las desviaciones de carbohidratos serán identificados incorrectamente, como un cambio de sensibilidad - Sensibilidad promedio ponderada + Sensibilidad promedio ponderada Faltan perfiles por cargar! Valores no guardados! INVÁLIDO diff --git a/app/src/main/res/values-fr-rFR/strings.xml b/app/src/main/res/values-fr-rFR/strings.xml index f22f5ef6bb..0132fd3fed 100644 --- a/app/src/main/res/values-fr-rFR/strings.xml +++ b/app/src/main/res/values-fr-rFR/strings.xml @@ -123,15 +123,15 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S Estimation de Sensibilité Quel algorithme de Sensibilité doit être utilisé ? SENS - Sensibilité Oref1 - Sensibilité AAPS + Sensibilité Oref1 + Sensibilité AAPS Paramètres d’absorption Durée max d’absorption d\'un repas [h] Le temps estimé en heures pour une absorbption totale des glucides d’un repas Garder l\'écran allumé Empêcher Android d\'éteindre l\'écran. Ceci consommera beaucoup de batterie lorsque vous n’êtes pas connecté à une prise de courant. En activant la fonction Autosens, n’oubliez pas de rentrer tous les glucides consommés. Sinon les déviations de glucides seront incorrectement identifiées pour les changements de sensibilité !! - Sensibilité avec moyenne pondérée + Sensibilité avec moyenne pondérée Les profils ne sont pas tous téléchargés ! Valeurs non enregistrées ! INVALIDE diff --git a/app/src/main/res/values-it-rIT/strings.xml b/app/src/main/res/values-it-rIT/strings.xml index f2e896f798..928d5e0934 100644 --- a/app/src/main/res/values-it-rIT/strings.xml +++ b/app/src/main/res/values-it-rIT/strings.xml @@ -121,15 +121,15 @@ Rilevamento sensibilità Quale algoritmo di sensibilità dovrebbe essere usato? SENS - Sensibilità Oref1 - Sensibilità AAPS + Sensibilità Oref1 + Sensibilità AAPS Impostazioni assorbimento Max tempo assorbimento pasto [h] Tempo in ore in cui è previsto che tutti i carboidrati del pasto vengano assorbiti Mantieni lo schermo acceso Evita che Android spenga lo schermo. Consumerà molta energia quando non è collegato alla presa di corrente. Attivando la funzione Autosense, ricorda di inserire tutti i carboidrati assunti. Altrimenti le deviazioni di glicemia dovute ai carboidrati saranno identificate erroneamente come variazione di sensibilità !! - Sensibilità WeightedAverage + Sensibilità WeightedAverage Non tutti i profili caricati! Valori non memorizzati! NON VALIDO diff --git a/app/src/main/res/values-iw-rIL/strings.xml b/app/src/main/res/values-iw-rIL/strings.xml index 04c52e723f..1689a2f59c 100644 --- a/app/src/main/res/values-iw-rIL/strings.xml +++ b/app/src/main/res/values-iw-rIL/strings.xml @@ -116,15 +116,15 @@ זיהוי רגישות באיזה אלגוריתם זיהוי רגישות להשתמש? רגישות - רגישות Oref1 - רגישות AAPS + רגישות Oref1 + רגישות AAPS הגדרות ספיגה זמן ספיגה מקסימלי של הארוחה [h] מספר השעות בהן צפוי שכל הפחמימות מארוחה ייספגו השאר את המסך דולק מניעת כיבוי המסך. הדבר צורך הרבה כח סוללה. בהפעלת פונקציית ה-Autosens יש לזכור שחייבים להזין למערכת את כל הפחמימות שנאכלו. אחרת פחמימות לא יזוהו נכון כשינוי ברגישות! - רגישות משוקללת ממוצעת + רגישות משוקללת ממוצעת לא כל הפרופילים נטענו! הערכים לא נשמרו לא חוקי diff --git a/app/src/main/res/values-ko-rKR/strings.xml b/app/src/main/res/values-ko-rKR/strings.xml index 130bfb260f..66111d7ec2 100644 --- a/app/src/main/res/values-ko-rKR/strings.xml +++ b/app/src/main/res/values-ko-rKR/strings.xml @@ -115,15 +115,15 @@ 민감도 감지 어떤 민감도 알고리즘을 사용하겠습니까? 민감도 - 민감도 Oref1 - 민감도 AAPS + 민감도 Oref1 + 민감도 AAPS 흡수 설정 식사 최대 흡수 시간 [h] 식사로 섭취한 탄수화물이 모두 흡수될기까지 예상되는 시간 화면을 켜진 상태로 유지 안드로이드의 화면이 꺼지는 것을 방지합니다. 전원이 공급되어 있지 않으면 전력소모가 큽니다. Autosense 기능을 켜면 모든 섭취된 탄수화물양을 입력하십시오. 그렇지 않으면 탄수화물 편차(deviations)가 민감도 변화로 잘못 인식될것입니다!! - 민감도 가중평균 + 민감도 가중평균 모든 프로파일이 로드되지 않았습니다. 값이 저장되지 않았습니다! 유효하지 않음 diff --git a/app/src/main/res/values-lt-rLT/strings.xml b/app/src/main/res/values-lt-rLT/strings.xml index b5fc609d7b..7db850eadb 100644 --- a/app/src/main/res/values-lt-rLT/strings.xml +++ b/app/src/main/res/values-lt-rLT/strings.xml @@ -116,15 +116,15 @@ Jautrumo nustatymas Kurį jautrumo nustatymo algoritmą naudoti? JAUTR - Jautrumo nustatymo algoritmas Oref1 - Jautrumo nustatymo algoritmas AAPS + Jautrumo nustatymo algoritmas Oref1 + Jautrumo nustatymo algoritmas AAPS Angliavandenių įsisavinimo parametrai Maksimalus angliavandenių įsisavinimo laikas [h] Laikas, per kurį visi maisto angliavandeniai, tikėtina, bus įsisavinti Laikyti ekraną įjungtą Neleidžia Android sistemai išjungti ekrano. Naudojama daug energijos, jei telefonas neprijungtas prie maitinimo šaltinio. Įjungę Autosens funkciją nepamirškite įvedinėti visus valgomus angliavandenius. To nedarant, angliavandenių sukeliami gliukozės svyravimai bus klaidingai identifikuojami kaip jautrumo pasikeitimai! - Jautrumas pagal svertinį vidurkį + Jautrumas pagal svertinį vidurkį Ne visi profiliai įkelti! Reikšmės neišsaugotos! KLAIDA diff --git a/app/src/main/res/values-nl-rNL/strings.xml b/app/src/main/res/values-nl-rNL/strings.xml index b06f02b5fb..c78a2c2251 100644 --- a/app/src/main/res/values-nl-rNL/strings.xml +++ b/app/src/main/res/values-nl-rNL/strings.xml @@ -122,15 +122,15 @@ Gevoeligheid detectie Welk gevoeligheid algoritme moet worden gebruikt? SENS - Gevoeligheid Oref1 - Gevoeligheid AAPS + Gevoeligheid Oref1 + Gevoeligheid AAPS Opname instellingen Max absorptietijd maaltijd [uur] Verwachte tijd in uren totdat alle koolhydraten opgenomen zijn Laat scherm aan Voorkomen dat Android het scherm uitschakelt. Dit kost veel accuvoeding als je de telefoon niet aan de oplader hebt. Bij het gebruik van Autosense, vergeet niet alle opgenomen koolhydraten in te geven. Anders zullen BG wijzigingen door maaltijden foutief geïnterpreteerd worden !! - Gemiddelde gevoeligheid + Gemiddelde gevoeligheid Niet alle profielen zijn geladen! Waarden niet opgeslagen! Ongeldig diff --git a/app/src/main/res/values-no-rNO/strings.xml b/app/src/main/res/values-no-rNO/strings.xml index 927ada125c..06f27a94fc 100644 --- a/app/src/main/res/values-no-rNO/strings.xml +++ b/app/src/main/res/values-no-rNO/strings.xml @@ -122,15 +122,15 @@ Sensitivitetsdeteksjon Hvilken sensitivitetsalgoritme skal benyttes? SENS - Sensitivitet Oref1 - Sensitivitet AAPS + Sensitivitet Oref1 + Sensitivitet AAPS Absorpsjonsinnstillinger Maks absorpsjonstid for måltid [h] Tid i timer hvor det forventes at alle karbohydrater fra måltid vil være absorbert Hold skjermen påslått Forhindre Android fra å slå av skjermen. Mobilen vil bruke mye batteri hvis den ikke plugges til strømledning. Hvis du slår på Autosense-funksjonen må du huske å angi alle spiste karbohydrater. Ellers vil KH-avvik gi feil i sensitivitetsberegningen !! - Sensitivitet vektet middelverdi + Sensitivitet vektet middelverdi Ikke alle profiler ble lastet! Verdier ikke lagret! UGYLDIG diff --git a/app/src/main/res/values-pl-rPL/strings.xml b/app/src/main/res/values-pl-rPL/strings.xml index 9219686d51..f22eb98b95 100644 --- a/app/src/main/res/values-pl-rPL/strings.xml +++ b/app/src/main/res/values-pl-rPL/strings.xml @@ -116,15 +116,15 @@ Detekcja wrażliwości (sensitivity) Który algorytm wrażliwości powinien być używany? SENS - Wrażliwość Oref1 - Wrażliwość AAPS + Wrażliwość Oref1 + Wrażliwość AAPS Ustawienia wchłaniania Maks. czas wchłaniania posiłku [h] Oczekiwany czas w godzinach, w którym wszystkie węglowodany zostają wchłonięte Utrzymuj ekran włączony Nie pozwól, aby system Android wyłączał ekran. Zwiększy to zużycie energii, gdy zasilanie sieciowe jest wyłączone. Przy włączonej funkcji Autosens pamiętaj, żeby wprowadzać wszystkie węglowodany. W innym wypadku odchylenia węglowodanów będą błędnie identyfikowane jako zmiany wrażliwości !! - Wrażliwość ŚredniaWażona + Wrażliwość ŚredniaWażona Nie wszystkie profile zostały załadowane! Wartości nie są przechowywane! NIEPRAWIDŁOWY diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 2301d4d464..c4a8501da1 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -107,15 +107,15 @@ Detecção sensibilidade Que algoritmo de sensibilidade deve ser usado? SENS - Sensibilidade Oref1 - Sensibilidade AAPS + Sensibilidade Oref1 + Sensibilidade AAPS Configurações de absorção Tempo máx. absorção refeição [h] Tempo em horas, espectável para que todos os hidratos de carbono da refeição sejam absorvidos Manter a tela ligada Impedir Android de desligar o ecrã. Isto irá consumir muita bateria quando não ligado ao carregador. Ao ativar a função Autosense lembre-se de introduzir todos os carboidratos (carbs) que comeu. Caso contra contrário os desvios de carbs serão erroneamente identificados como uma variação da sensibilidade!! - Média ponderada da Sensibilidade + Média ponderada da Sensibilidade Nem todos perfis foram carregados! Valores não guardados! INVÁLIDO diff --git a/app/src/main/res/values-pt-rPT/strings.xml b/app/src/main/res/values-pt-rPT/strings.xml index 83214d9b37..6215ca4f83 100644 --- a/app/src/main/res/values-pt-rPT/strings.xml +++ b/app/src/main/res/values-pt-rPT/strings.xml @@ -116,15 +116,15 @@ Detecção sensibilidade Que algoritmo de sensibilidade deve ser usado? SENS - Sensibilidade Oref1 - Sensibilidade AAPS + Sensibilidade Oref1 + Sensibilidade AAPS Definições de absorção Tempo máx. absorção refeição [h] Tempo em horas, espectável para que todos os hidratos de carbono da refeição sejam absorvidos Manter ecrã ligado Impedir Android de desligar o ecrã. Isto irá consumir muita bateria quando não ligado ao carregador. Ao activar a função Autosense lembre-se de introduzir todos os hidratos de carbono (HC) que comeu. Caso contrário os desvios de hidratos serão erroneamente identificados como uma variação da sensibilidade !! - Média ponderada da Sensibilidade + Média ponderada da Sensibilidade Nem todos perfis foram carregados! Valores não guardados! INVÁLIDO diff --git a/app/src/main/res/values-ro-rRO/strings.xml b/app/src/main/res/values-ro-rRO/strings.xml index c7e8544121..4669744992 100644 --- a/app/src/main/res/values-ro-rRO/strings.xml +++ b/app/src/main/res/values-ro-rRO/strings.xml @@ -116,15 +116,15 @@ Detectare sensibilitate Ce algoritm de detecție a sensibilității doriți să folosiți? SENS - Sensibilitate Oref1 - Sensibilitate AAPS + Sensibilitate Oref1 + Sensibilitate AAPS Setări absorbție Timp maxim absorbție masă [o] Timp în ore la care se presupune că toți carbohidrații sunt absorbiți Menține ecranul aprins Nu permite telefonului să stingă ecranul. Când este activă, această opțiune consumă foarte multă baterie atunci când telefonul nu este la încărcat. Trebuie introduși toți carbo la pornirea Autosens. În caz contrar, acțiunea carbo va fi percepută ca schimbare a sensibilității! - Sensibilitate estimată prin mediere + Sensibilitate estimată prin mediere Nu s-au încărcat toate profilurile! Nu s-au salvat valorile! INVALID diff --git a/app/src/main/res/values-ru-rRU/strings.xml b/app/src/main/res/values-ru-rRU/strings.xml index f89dd65a34..a08c7d9205 100644 --- a/app/src/main/res/values-ru-rRU/strings.xml +++ b/app/src/main/res/values-ru-rRU/strings.xml @@ -122,15 +122,15 @@ определение чувствительности Какой алгоритм чувствительности следует использовать? ЧУВСТВ - Чувствительность Oref1 - Чувствительность AAPS + Чувствительность Oref1 + Чувствительность AAPS Настройки усваиваемости Максимальное время усваимости пищи [h] (час) Ожидаемое время усваивания всех углеводов пищи в часах Не отключать экран Не давать системе Android отключать экран. Это увеличит потребление энергии при отключенной сети питания. Активируя Autosense не забывайте вводить все съеденные углеводы. Иначе отклонения в углеводах будут неверно определены как изменение чувствительности !! - Средневзвешенная чувствительность + Средневзвешенная чувствительность не все профили загружены! Данные не сохранены! НЕВЕРНО diff --git a/app/src/main/res/values-sk-rSK/strings.xml b/app/src/main/res/values-sk-rSK/strings.xml index 8cac41d7a1..754f5bf6b3 100644 --- a/app/src/main/res/values-sk-rSK/strings.xml +++ b/app/src/main/res/values-sk-rSK/strings.xml @@ -122,15 +122,15 @@ Detekcia citlivosti Aký druh algoritmu pre detekciu citlivosti má byť použitý? SENZ - Senzitivita Oref1 - Senzitivita AAPS + Senzitivita Oref1 + Senzitivita AAPS Nastavenie vstrebávania sacharidov Max. doba vstrebávania sacharidov [h] Čas v hodinách, počas ktorého predpokladáme, že všetky sacharidy budú vstrebané Nechať obrazovku zapnutú Zabrániť Androidu, aby zhasínal obrazovku. Bez pripojenia nabíjačky vybije veľmi rýchlo batériu! Pri zapnutej automatickej detekcii citlivosti, nezabudnite vkladať všetky prijaté sacharidy. V opačnom prípade, budú odchýlky mylne vyhodnocované, ako zmena citlivosti !! - Citlivosť vážený priemer + Citlivosť vážený priemer Nenačítané všetky profily! Hodnoty nie sú uložené! NEPLATNÝ diff --git a/app/src/main/res/values-sv-rSE/strings.xml b/app/src/main/res/values-sv-rSE/strings.xml index e9061c643c..6615128cdf 100644 --- a/app/src/main/res/values-sv-rSE/strings.xml +++ b/app/src/main/res/values-sv-rSE/strings.xml @@ -116,15 +116,15 @@ Känslighetsavkänning Vilken algoritm vill du använda för känslighetsavkänning? SENS - Oref1 - AAPS + Oref1 + AAPS Absorptionsinställningar Max absorptionstid för en måltid [tim] Tid i timmar när alla kolhydrater förväntas vara absorberade Håll skärmen igång Förhindrar att skärmen stängs av. Förbrukar mer batteri. Genom att slå på Autosens funktionen, kom ihåg att skriva in alla KH. Annars kommer programmet göra fel i beräkningar av känslighet (ISF)!! - WeightedAverage + WeightedAverage Alla profiler laddades inte! Alla värden sparades inte! OGILTIG diff --git a/app/src/main/res/values-tr-rTR/strings.xml b/app/src/main/res/values-tr-rTR/strings.xml index 759e2a902c..2674d788d9 100644 --- a/app/src/main/res/values-tr-rTR/strings.xml +++ b/app/src/main/res/values-tr-rTR/strings.xml @@ -120,15 +120,15 @@ Duyarlılık algılaması Hangi duyarlılık algoritması kullanılmalıdır? SENS - Oref1 duyarlılık - AAPS duyarlılık + Oref1 duyarlılık + AAPS duyarlılık Emilim ayarları Besinin maksimum emilim süresi [h] Yemekteki tüm karbonhidratların emilmesinin beklendiği saat cinsinden süre Ekranı açık tut Android\'in ekranı kapatmasını önleyin. Prize takılı değilken çok fazla enerji tüketir. Otoduyarlılık özelliğini açarsanız tüm yenen karbonhidratları girmeyi unutmayın. Aksi halde, karbonhidrat sapmaları duyarlılık değiştikçe yanlış tanımlanacaktır!! - Ağırlıklı ortalama duyarlılık + Ağırlıklı ortalama duyarlılık Tüm profiller yüklenmedi! Değerler kaydedilmedi! GEÇERSİZ diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index d9307a89aa..e247b6c3c5 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -116,15 +116,15 @@ 灵敏度检测 应使用哪一种灵敏度算法? 灵敏度 - 灵敏度 Oref1 - 灵敏度 AAPS + 灵敏度 Oref1 + 灵敏度 AAPS 食物吸收设置 膳食最大吸收时间 [h] 预计膳食中所有的碳水化合物被吸收的时间,以小时为单位 保持屏幕常亮 阻止 Android 系统关闭手机屏幕。这将非常耗电 如果要打开 Autosense功能, 记住输入所有吃的碳水化合物。否则碳水化合物的偏差将被识别为错误的灵敏度变化!! - 灵敏度 WeightedAverage + 灵敏度 WeightedAverage 配置文件加载不完整 值没有被存储 无效 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index ebfaca5093..7d985c040a 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -41,10 +41,6 @@ Used for configuring the active plugins Displays the current state of your loop and buttons for most common actions Shows an ongoing notification with a short overview of what your loop is doing - Sensitivity is calculated the same way like Oref0, but you can specify timeframe to the past. Minimal carb absorption is calculated from max carb absorption time from preferences. - Sensitivity is calculated from 8h or 24h data in the past (using either which is more sensitive). Carbs (if not absorbed) are cut after time specified in preferences. Plugin also calculates UAM. - Sensitivity is calculated as a weighted average from deviations. Newer deviations have higher weight. Minimal carb absorption is calculated from max carb absorption time from preferences. This algorithm is the fastest in following sensitivity changes. - Saves all treatments that were made Monitor and control AAPS using your WearOS watch. Delta Config Builder @@ -120,19 +116,14 @@ Urgent stale data threshold [min] Interval for autosens [h] Amount of hours in the past for sensitivity detection (carbs absorption time is excluded) - openapsama_autosens_period OpenAPS Uploader - SENS - Sensitivity Oref1 - Sensitivity AAPS Absorption settings Meal max absorption time [h] Time in hours where is expected all carbs from meal will be absorbed Keep screen on Prevent Android to turn screen off. It will consume lot of energy when not plugged to power outlet. By turning on Autosense feature remember to enter all eated carbs. Otherwise carbs deviations will be identified wrong as sensitivity change !! - Sensitivity WeightedAverage Not all profiles loaded! Values not stored! INVALID diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/sensitivity/AbstractSensitivityPluginTest.kt b/app/src/test/java/info/nightscout/androidaps/plugins/sensitivity/AbstractSensitivityPluginTest.kt index d3186551a3..fe83cb0932 100644 --- a/app/src/test/java/info/nightscout/androidaps/plugins/sensitivity/AbstractSensitivityPluginTest.kt +++ b/app/src/test/java/info/nightscout/androidaps/plugins/sensitivity/AbstractSensitivityPluginTest.kt @@ -8,6 +8,7 @@ import info.nightscout.interfaces.aps.AutosensResult import info.nightscout.interfaces.aps.Sensitivity import info.nightscout.interfaces.plugin.PluginDescription import info.nightscout.rx.logging.AAPSLogger +import info.nightscout.sensitivity.AbstractSensitivityPlugin import info.nightscout.shared.interfaces.ResourceHelper import info.nightscout.shared.sharedPreferences.SP import org.json.JSONObject diff --git a/core/core-main/build.gradle b/core/core-main/build.gradle index 9cb96a63ac..098f8f72fb 100644 --- a/core/core-main/build.gradle +++ b/core/core-main/build.gradle @@ -21,6 +21,7 @@ dependencies { implementation project(':database:impl') implementation project(':interfaces') implementation project(':core:ui') + implementation project(':core:utils') api "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" diff --git a/core/core-main/src/main/java/info/nightscout/androidaps/data/ProfileSealed.kt b/core/core-main/src/main/java/info/nightscout/androidaps/data/ProfileSealed.kt index 1701cb47db..6b9343f4f8 100644 --- a/core/core-main/src/main/java/info/nightscout/androidaps/data/ProfileSealed.kt +++ b/core/core-main/src/main/java/info/nightscout/androidaps/data/ProfileSealed.kt @@ -8,8 +8,8 @@ import info.nightscout.androidaps.extensions.shiftTargetBlock import info.nightscout.androidaps.extensions.targetBlockValueBySeconds import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.core.main.R -import info.nightscout.core.profile.secondsFromMidnight import info.nightscout.core.profile.toMgdl +import info.nightscout.core.utils.MidnightUtils import info.nightscout.database.entities.EffectiveProfileSwitch import info.nightscout.database.entities.ProfileSwitch import info.nightscout.database.entities.data.Block @@ -228,17 +228,17 @@ sealed class ProfileSealed( override val percentage: Int get() = pct - override fun getBasal(): Double = basalBlocks.blockValueBySeconds(Profile.secondsFromMidnight(), percentage / 100.0, timeshift) - override fun getBasal(timestamp: Long): Double = basalBlocks.blockValueBySeconds(Profile.secondsFromMidnight(timestamp), percentage / 100.0, timeshift) - override fun getIc(): Double = icBlocks.blockValueBySeconds(Profile.secondsFromMidnight(), 100.0 / percentage, timeshift) - override fun getIc(timestamp: Long): Double = icBlocks.blockValueBySeconds(Profile.secondsFromMidnight(timestamp), 100.0 / percentage, timeshift) - override fun getIsfMgdl(): Double = Profile.toMgdl(isfBlocks.blockValueBySeconds(Profile.secondsFromMidnight(), 100.0 / percentage, timeshift), units) - override fun getIsfMgdl(timestamp: Long): Double = Profile.toMgdl(isfBlocks.blockValueBySeconds(Profile.secondsFromMidnight(timestamp), 100.0 / percentage, timeshift), units) - override fun getTargetMgdl(): Double = Profile.toMgdl(targetBlocks.targetBlockValueBySeconds(Profile.secondsFromMidnight(), timeshift), units) - override fun getTargetLowMgdl(): Double = Profile.toMgdl(targetBlocks.lowTargetBlockValueBySeconds(Profile.secondsFromMidnight(), timeshift), units) - override fun getTargetLowMgdl(timestamp: Long): Double = Profile.toMgdl(targetBlocks.lowTargetBlockValueBySeconds(Profile.secondsFromMidnight(timestamp), timeshift), units) - override fun getTargetHighMgdl(): Double = Profile.toMgdl(targetBlocks.highTargetBlockValueBySeconds(Profile.secondsFromMidnight(), timeshift), units) - override fun getTargetHighMgdl(timestamp: Long): Double = Profile.toMgdl(targetBlocks.highTargetBlockValueBySeconds(Profile.secondsFromMidnight(timestamp), timeshift), units) + override fun getBasal(): Double = basalBlocks.blockValueBySeconds(MidnightUtils.secondsFromMidnight(), percentage / 100.0, timeshift) + override fun getBasal(timestamp: Long): Double = basalBlocks.blockValueBySeconds(MidnightUtils.secondsFromMidnight(timestamp), percentage / 100.0, timeshift) + override fun getIc(): Double = icBlocks.blockValueBySeconds(MidnightUtils.secondsFromMidnight(), 100.0 / percentage, timeshift) + override fun getIc(timestamp: Long): Double = icBlocks.blockValueBySeconds(MidnightUtils.secondsFromMidnight(timestamp), 100.0 / percentage, timeshift) + override fun getIsfMgdl(): Double = Profile.toMgdl(isfBlocks.blockValueBySeconds(MidnightUtils.secondsFromMidnight(), 100.0 / percentage, timeshift), units) + override fun getIsfMgdl(timestamp: Long): Double = Profile.toMgdl(isfBlocks.blockValueBySeconds(MidnightUtils.secondsFromMidnight(timestamp), 100.0 / percentage, timeshift), units) + override fun getTargetMgdl(): Double = Profile.toMgdl(targetBlocks.targetBlockValueBySeconds(MidnightUtils.secondsFromMidnight(), timeshift), units) + override fun getTargetLowMgdl(): Double = Profile.toMgdl(targetBlocks.lowTargetBlockValueBySeconds(MidnightUtils.secondsFromMidnight(), timeshift), units) + override fun getTargetLowMgdl(timestamp: Long): Double = Profile.toMgdl(targetBlocks.lowTargetBlockValueBySeconds(MidnightUtils.secondsFromMidnight(timestamp), timeshift), units) + override fun getTargetHighMgdl(): Double = Profile.toMgdl(targetBlocks.highTargetBlockValueBySeconds(MidnightUtils.secondsFromMidnight(), timeshift), units) + override fun getTargetHighMgdl(timestamp: Long): Double = Profile.toMgdl(targetBlocks.highTargetBlockValueBySeconds(MidnightUtils.secondsFromMidnight(timestamp), timeshift), units) override fun getBasalTimeFromMidnight(timeAsSeconds: Int): Double = basalBlocks.blockValueBySeconds(timeAsSeconds, percentage / 100.0, timeshift) override fun getIcTimeFromMidnight(timeAsSeconds: Int): Double = icBlocks.blockValueBySeconds(timeAsSeconds, 100.0 / percentage, timeshift) fun getIsfTimeFromMidnight(timeAsSeconds: Int): Double = isfBlocks.blockValueBySeconds(timeAsSeconds, 100.0 / percentage, timeshift) diff --git a/core/core-main/src/main/java/info/nightscout/androidaps/extensions/ProfileSwitchExtension.kt b/core/core-main/src/main/java/info/nightscout/androidaps/extensions/ProfileSwitchExtension.kt index 15f8dc1969..42d48816ae 100644 --- a/core/core-main/src/main/java/info/nightscout/androidaps/extensions/ProfileSwitchExtension.kt +++ b/core/core-main/src/main/java/info/nightscout/androidaps/extensions/ProfileSwitchExtension.kt @@ -12,18 +12,6 @@ import info.nightscout.shared.utils.T import org.json.JSONObject import java.util.TimeZone -fun List.isPSEvent5minBack(time: Long): Boolean { - for (event in this) { - if (event.timestamp <= time && event.timestamp > time - T.mins(5).msecs()) { - if (event.duration == 0L) { - //aapsLogger.debug(LTag.DATABASE, "Found ProfileSwitch event for time: " + dateUtil.dateAndTimeString(time) + " " + event.toString()) - return true - } - } - } - return false -} - fun ProfileSwitch.getCustomizedName(): String { var name: String = profileName if (Constants.LOCAL_PROFILE == name) { diff --git a/core/core-main/src/main/java/info/nightscout/core/profile/ProfileExtension.kt b/core/core-main/src/main/java/info/nightscout/core/profile/ProfileExtension.kt index 05cb4fccd6..1f25cee192 100644 --- a/core/core-main/src/main/java/info/nightscout/core/profile/ProfileExtension.kt +++ b/core/core-main/src/main/java/info/nightscout/core/profile/ProfileExtension.kt @@ -5,24 +5,7 @@ import info.nightscout.interfaces.Constants import info.nightscout.interfaces.GlucoseUnit import info.nightscout.interfaces.profile.Profile import info.nightscout.interfaces.profile.ProfileFunction -import org.joda.time.DateTime -/* - * Midnight time conversion - */ -fun Profile.Companion.secondsFromMidnight(): Int { - val passed = DateTime().millisOfDay.toLong() - return (passed / 1000).toInt() -} - -fun Profile.Companion.secondsFromMidnight(date: Long): Int { - val passed = DateTime(date).millisOfDay.toLong() - return (passed / 1000).toInt() -} - -fun Profile.Companion.milliSecFromMidnight(date: Long): Long { - return DateTime(date).millisOfDay.toLong() -} /* * Units conversion */ diff --git a/core/core-main/src/main/java/info/nightscout/core/wizard/QuickWizardEntry.kt b/core/core-main/src/main/java/info/nightscout/core/wizard/QuickWizardEntry.kt index 00ba5e75c3..25f4d1c8fc 100644 --- a/core/core-main/src/main/java/info/nightscout/core/wizard/QuickWizardEntry.kt +++ b/core/core-main/src/main/java/info/nightscout/core/wizard/QuickWizardEntry.kt @@ -6,7 +6,7 @@ import info.nightscout.androidaps.extensions.valueToUnits import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatusProvider import info.nightscout.core.iob.round import info.nightscout.core.main.R -import info.nightscout.core.profile.secondsFromMidnight +import info.nightscout.core.utils.MidnightUtils import info.nightscout.database.entities.GlucoseValue import info.nightscout.database.impl.AppRepository import info.nightscout.database.impl.ValueWrapper @@ -39,7 +39,7 @@ class QuickWizardEntry @Inject constructor(private val injector: HasAndroidInjec // for mock @OpenForTesting class Time { - fun secondsFromMidnight(): Int = Profile.secondsFromMidnight() + fun secondsFromMidnight(): Int = MidnightUtils.secondsFromMidnight() } var time = Time() diff --git a/core/core-main/src/main/res/values/strings.xml b/core/core-main/src/main/res/values/strings.xml index 56eaaa3ee5..608871521a 100644 --- a/core/core-main/src/main/res/values/strings.xml +++ b/core/core-main/src/main/res/values/strings.xml @@ -1,108 +1,5 @@ - - units - loop_openmode_min_change - absorption_maxtime - openapsama_min_5m_carbimpact - absorption_cutoff - danar_useextended - eatingsoon_duration - eatingsoon_target - activity_duration - activity_target - hypo_duration - hypo_target - low_mark - high_mark - ns_create_announcements_from_errors - bt_watchdog - bt_watchdog_last - pump_unreachable_threshold - missed_bg_readings_threshold - gradually_increase_notification_volume - virtualpump_type - QuickWizard - wearcontrol - units_mgdl - show_notes_entry_dialogs - autosens_max - autosens_min - treatmentssafety_maxcarbs - bgsource_upload_settings - localalert_settings - wear_settings - configbuilder_general_settings - maintenance_settings - smscommunicator_settings - openapssmb_settings - treatmentssafety_settings - loop_settings - virtualpump_settings - pump_settings - tidepool_settings - absorption_settings - overview_settings - openapsma_settings - medtronic_settings - danars_settings - nsclientinternal_settings - insight_local_settings - data_choices_settings - dexcom_settings - active_pump_change_timestamp - active_pump_type - active_pump_serial_number - age - child - teenage - adult - resistantadult - pregnant - app_expiration - use_dark_mode - insulin_oref_peak - autotune_auto - categorize_uam_as_basal - autotune_tune_insulin_curve - autotune_default_tune_days - autotune_circadian_ic_isf - autotune_additional_log - key_autotune_plugin - key_autotune_last_run - dexcomg5_xdripupload - nsclient_localbroadcasts - use_bolus_reminder - carbs_button_increment_1 - carbs_button_increment_2 - carbs_button_increment_3 - enable_pump_unreachable_alert - enable_missed_bg_readings - enable_carbs_required_alert_local - smscommunicator_report_pump_unreachable - rangetodisplay - local_profile_last_change - ns_receive_profile_store - nsclientinternal_url - nsclientinternal_api_secret - ns_receive_insulin - ns_receive_carbs - ns_receive_therapy_events - ns_receive_profile_switch - ns_receive_offline_event - ns_receive_temp_target - ObjectivesProfileSwitchUsed - ObjectivesTempTargetUsed - ObjectivesDisconnectUsed - ObjectivesReconnectUsed - aps_mode - boluswizard_percentage - key_usersuperbolus - treatmentssafety_maxbolus - patient_name - email_for_crash_report - - Refresh Error diff --git a/core/fabric/src/main/res/values-af-rZA/strings.xml b/core/fabric/src/main/res/values-af-rZA/strings.xml deleted file mode 100644 index 3ea04e700d..0000000000 --- a/core/fabric/src/main/res/values-af-rZA/strings.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/core/fabric/src/main/res/values-bg-rBG/strings.xml b/core/fabric/src/main/res/values-bg-rBG/strings.xml deleted file mode 100644 index 3ea04e700d..0000000000 --- a/core/fabric/src/main/res/values-bg-rBG/strings.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/core/fabric/src/main/res/values-ca-rES/strings.xml b/core/fabric/src/main/res/values-ca-rES/strings.xml deleted file mode 100644 index 3ea04e700d..0000000000 --- a/core/fabric/src/main/res/values-ca-rES/strings.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/core/fabric/src/main/res/values-cs-rCZ/strings.xml b/core/fabric/src/main/res/values-cs-rCZ/strings.xml deleted file mode 100644 index 3ea04e700d..0000000000 --- a/core/fabric/src/main/res/values-cs-rCZ/strings.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/core/fabric/src/main/res/values-da-rDK/strings.xml b/core/fabric/src/main/res/values-da-rDK/strings.xml deleted file mode 100644 index 3ea04e700d..0000000000 --- a/core/fabric/src/main/res/values-da-rDK/strings.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/core/fabric/src/main/res/values-de-rDE/strings.xml b/core/fabric/src/main/res/values-de-rDE/strings.xml deleted file mode 100644 index 3ea04e700d..0000000000 --- a/core/fabric/src/main/res/values-de-rDE/strings.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/core/fabric/src/main/res/values-el-rGR/strings.xml b/core/fabric/src/main/res/values-el-rGR/strings.xml deleted file mode 100644 index 3ea04e700d..0000000000 --- a/core/fabric/src/main/res/values-el-rGR/strings.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/core/fabric/src/main/res/values-es-rES/strings.xml b/core/fabric/src/main/res/values-es-rES/strings.xml deleted file mode 100644 index 3ea04e700d..0000000000 --- a/core/fabric/src/main/res/values-es-rES/strings.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/core/fabric/src/main/res/values-fr-rFR/strings.xml b/core/fabric/src/main/res/values-fr-rFR/strings.xml deleted file mode 100644 index 3ea04e700d..0000000000 --- a/core/fabric/src/main/res/values-fr-rFR/strings.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/core/fabric/src/main/res/values-ga-rIE/strings.xml b/core/fabric/src/main/res/values-ga-rIE/strings.xml deleted file mode 100644 index 3ea04e700d..0000000000 --- a/core/fabric/src/main/res/values-ga-rIE/strings.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/core/fabric/src/main/res/values-hr-rHR/strings.xml b/core/fabric/src/main/res/values-hr-rHR/strings.xml deleted file mode 100644 index 3ea04e700d..0000000000 --- a/core/fabric/src/main/res/values-hr-rHR/strings.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/core/fabric/src/main/res/values-hu-rHU/strings.xml b/core/fabric/src/main/res/values-hu-rHU/strings.xml deleted file mode 100644 index 3ea04e700d..0000000000 --- a/core/fabric/src/main/res/values-hu-rHU/strings.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/core/fabric/src/main/res/values-it-rIT/strings.xml b/core/fabric/src/main/res/values-it-rIT/strings.xml deleted file mode 100644 index 3ea04e700d..0000000000 --- a/core/fabric/src/main/res/values-it-rIT/strings.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/core/fabric/src/main/res/values-iw-rIL/strings.xml b/core/fabric/src/main/res/values-iw-rIL/strings.xml deleted file mode 100644 index 3ea04e700d..0000000000 --- a/core/fabric/src/main/res/values-iw-rIL/strings.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/core/fabric/src/main/res/values-ja-rJP/strings.xml b/core/fabric/src/main/res/values-ja-rJP/strings.xml deleted file mode 100644 index 3ea04e700d..0000000000 --- a/core/fabric/src/main/res/values-ja-rJP/strings.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/core/fabric/src/main/res/values-ko-rKR/strings.xml b/core/fabric/src/main/res/values-ko-rKR/strings.xml deleted file mode 100644 index 3ea04e700d..0000000000 --- a/core/fabric/src/main/res/values-ko-rKR/strings.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/core/fabric/src/main/res/values-lt-rLT/strings.xml b/core/fabric/src/main/res/values-lt-rLT/strings.xml deleted file mode 100644 index 3ea04e700d..0000000000 --- a/core/fabric/src/main/res/values-lt-rLT/strings.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/core/fabric/src/main/res/values-nl-rNL/strings.xml b/core/fabric/src/main/res/values-nl-rNL/strings.xml deleted file mode 100644 index 3ea04e700d..0000000000 --- a/core/fabric/src/main/res/values-nl-rNL/strings.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/core/fabric/src/main/res/values-no-rNO/strings.xml b/core/fabric/src/main/res/values-no-rNO/strings.xml deleted file mode 100644 index 3ea04e700d..0000000000 --- a/core/fabric/src/main/res/values-no-rNO/strings.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/core/fabric/src/main/res/values-pl-rPL/strings.xml b/core/fabric/src/main/res/values-pl-rPL/strings.xml deleted file mode 100644 index 3ea04e700d..0000000000 --- a/core/fabric/src/main/res/values-pl-rPL/strings.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/core/fabric/src/main/res/values-pt-rBR/strings.xml b/core/fabric/src/main/res/values-pt-rBR/strings.xml deleted file mode 100644 index 3ea04e700d..0000000000 --- a/core/fabric/src/main/res/values-pt-rBR/strings.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/core/fabric/src/main/res/values-pt-rPT/strings.xml b/core/fabric/src/main/res/values-pt-rPT/strings.xml deleted file mode 100644 index 3ea04e700d..0000000000 --- a/core/fabric/src/main/res/values-pt-rPT/strings.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/core/fabric/src/main/res/values-ro-rRO/strings.xml b/core/fabric/src/main/res/values-ro-rRO/strings.xml deleted file mode 100644 index 3ea04e700d..0000000000 --- a/core/fabric/src/main/res/values-ro-rRO/strings.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/core/fabric/src/main/res/values-ru-rRU/strings.xml b/core/fabric/src/main/res/values-ru-rRU/strings.xml deleted file mode 100644 index 3ea04e700d..0000000000 --- a/core/fabric/src/main/res/values-ru-rRU/strings.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/core/fabric/src/main/res/values-sk-rSK/strings.xml b/core/fabric/src/main/res/values-sk-rSK/strings.xml deleted file mode 100644 index 3ea04e700d..0000000000 --- a/core/fabric/src/main/res/values-sk-rSK/strings.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/core/fabric/src/main/res/values-sr-rCS/strings.xml b/core/fabric/src/main/res/values-sr-rCS/strings.xml deleted file mode 100644 index 3ea04e700d..0000000000 --- a/core/fabric/src/main/res/values-sr-rCS/strings.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/core/fabric/src/main/res/values-sv-rSE/strings.xml b/core/fabric/src/main/res/values-sv-rSE/strings.xml deleted file mode 100644 index 3ea04e700d..0000000000 --- a/core/fabric/src/main/res/values-sv-rSE/strings.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/core/fabric/src/main/res/values-tr-rTR/strings.xml b/core/fabric/src/main/res/values-tr-rTR/strings.xml deleted file mode 100644 index 3ea04e700d..0000000000 --- a/core/fabric/src/main/res/values-tr-rTR/strings.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/core/fabric/src/main/res/values-zh-rCN/strings.xml b/core/fabric/src/main/res/values-zh-rCN/strings.xml deleted file mode 100644 index 3ea04e700d..0000000000 --- a/core/fabric/src/main/res/values-zh-rCN/strings.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/core/fabric/src/main/res/values/strings.xml b/core/fabric/src/main/res/values/strings.xml deleted file mode 100644 index 3ad8e4ea03..0000000000 --- a/core/fabric/src/main/res/values/strings.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - enable_fabric2 - \ No newline at end of file diff --git a/core/core-main/src/main/res/drawable/ic_generic_icon.xml b/core/ui/src/main/res/drawable/ic_generic_icon.xml similarity index 100% rename from core/core-main/src/main/res/drawable/ic_generic_icon.xml rename to core/ui/src/main/res/drawable/ic_generic_icon.xml diff --git a/core/fabric/.gitignore b/core/utils/.gitignore similarity index 100% rename from core/fabric/.gitignore rename to core/utils/.gitignore diff --git a/core/fabric/build.gradle b/core/utils/build.gradle similarity index 92% rename from core/fabric/build.gradle rename to core/utils/build.gradle index 5b7ede3fbb..bb59fa38b3 100644 --- a/core/fabric/build.gradle +++ b/core/utils/build.gradle @@ -14,12 +14,11 @@ apply from: "${project.rootDir}/core/core-main/jacoco_global.gradle" android { - namespace 'info.nightscout.core.fabric' + namespace 'info.nightscout.core.utils' } dependencies { - implementation project(':interfaces') implementation project(':app-wear-shared:rx') implementation project(':app-wear-shared:shared') diff --git a/core/fabric/consumer-rules.pro b/core/utils/consumer-rules.pro similarity index 100% rename from core/fabric/consumer-rules.pro rename to core/utils/consumer-rules.pro diff --git a/core/fabric/proguard-rules.pro b/core/utils/proguard-rules.pro similarity index 100% rename from core/fabric/proguard-rules.pro rename to core/utils/proguard-rules.pro diff --git a/core/fabric/src/main/AndroidManifest.xml b/core/utils/src/main/AndroidManifest.xml similarity index 100% rename from core/fabric/src/main/AndroidManifest.xml rename to core/utils/src/main/AndroidManifest.xml diff --git a/core/fabric/src/main/java/info/nightscout/core/fabric/FabricPrivacy.kt b/core/utils/src/main/java/info/nightscout/core/fabric/FabricPrivacy.kt similarity index 99% rename from core/fabric/src/main/java/info/nightscout/core/fabric/FabricPrivacy.kt rename to core/utils/src/main/java/info/nightscout/core/fabric/FabricPrivacy.kt index 916756c53a..5e213a6af7 100644 --- a/core/fabric/src/main/java/info/nightscout/core/fabric/FabricPrivacy.kt +++ b/core/utils/src/main/java/info/nightscout/core/fabric/FabricPrivacy.kt @@ -6,6 +6,7 @@ import com.google.firebase.analytics.ktx.analytics import com.google.firebase.crashlytics.FirebaseCrashlytics import com.google.firebase.ktx.Firebase import info.nightscout.androidaps.annotations.OpenForTesting +import info.nightscout.core.utils.R import info.nightscout.rx.logging.AAPSLogger import info.nightscout.rx.logging.LTag import info.nightscout.shared.sharedPreferences.SP diff --git a/core/fabric/src/main/java/info/nightscout/core/fabric/InstanceId.kt b/core/utils/src/main/java/info/nightscout/core/fabric/InstanceId.kt similarity index 100% rename from core/fabric/src/main/java/info/nightscout/core/fabric/InstanceId.kt rename to core/utils/src/main/java/info/nightscout/core/fabric/InstanceId.kt diff --git a/core/utils/src/main/java/info/nightscout/core/utils/MidnightUtils.kt b/core/utils/src/main/java/info/nightscout/core/utils/MidnightUtils.kt new file mode 100644 index 0000000000..77305be80e --- /dev/null +++ b/core/utils/src/main/java/info/nightscout/core/utils/MidnightUtils.kt @@ -0,0 +1,22 @@ +package info.nightscout.core.utils + +import org.joda.time.DateTime + +object MidnightUtils { + /* + * Midnight time conversion + */ + fun secondsFromMidnight(): Int { + val passed = DateTime().millisOfDay.toLong() + return (passed / 1000).toInt() + } + + fun secondsFromMidnight(date: Long): Int { + val passed = DateTime(date).millisOfDay.toLong() + return (passed / 1000).toInt() + } + + fun milliSecFromMidnight(date: Long): Long { + return DateTime(date).millisOfDay.toLong() + } +} \ No newline at end of file diff --git a/plugins/aps/src/main/java/info/nightscout/plugins/aps/utils/Percentile.kt b/core/utils/src/main/java/info/nightscout/core/utils/Percentile.kt similarity index 94% rename from plugins/aps/src/main/java/info/nightscout/plugins/aps/utils/Percentile.kt rename to core/utils/src/main/java/info/nightscout/core/utils/Percentile.kt index f71f2158cb..c336de8ded 100644 --- a/plugins/aps/src/main/java/info/nightscout/plugins/aps/utils/Percentile.kt +++ b/core/utils/src/main/java/info/nightscout/core/utils/Percentile.kt @@ -1,4 +1,4 @@ -package info.nightscout.plugins.aps.utils +package info.nightscout.core.utils import kotlin.math.floor diff --git a/core/utils/src/main/res/values/keys.xml b/core/utils/src/main/res/values/keys.xml new file mode 100644 index 0000000000..bd10de0529 --- /dev/null +++ b/core/utils/src/main/res/values/keys.xml @@ -0,0 +1,106 @@ + + + + units + loop_openmode_min_change + absorption_maxtime + openapsama_min_5m_carbimpact + absorption_cutoff + danar_useextended + eatingsoon_duration + eatingsoon_target + activity_duration + activity_target + hypo_duration + hypo_target + low_mark + high_mark + ns_create_announcements_from_errors + bt_watchdog + bt_watchdog_last + pump_unreachable_threshold + missed_bg_readings_threshold + gradually_increase_notification_volume + virtualpump_type + QuickWizard + wearcontrol + units_mgdl + show_notes_entry_dialogs + autosens_max + autosens_min + treatmentssafety_maxcarbs + bgsource_upload_settings + localalert_settings + wear_settings + configbuilder_general_settings + maintenance_settings + smscommunicator_settings + openapssmb_settings + treatmentssafety_settings + loop_settings + virtualpump_settings + pump_settings + tidepool_settings + absorption_settings + overview_settings + openapsma_settings + medtronic_settings + danars_settings + nsclientinternal_settings + insight_local_settings + data_choices_settings + dexcom_settings + active_pump_change_timestamp + active_pump_type + active_pump_serial_number + age + child + teenage + adult + resistantadult + pregnant + app_expiration + use_dark_mode + insulin_oref_peak + autotune_auto + categorize_uam_as_basal + autotune_tune_insulin_curve + autotune_default_tune_days + autotune_circadian_ic_isf + autotune_additional_log + key_autotune_plugin + key_autotune_last_run + dexcomg5_xdripupload + nsclient_localbroadcasts + use_bolus_reminder + carbs_button_increment_1 + carbs_button_increment_2 + carbs_button_increment_3 + enable_pump_unreachable_alert + enable_missed_bg_readings + enable_carbs_required_alert_local + smscommunicator_report_pump_unreachable + rangetodisplay + local_profile_last_change + ns_receive_profile_store + nsclientinternal_url + nsclientinternal_api_secret + ns_receive_insulin + ns_receive_carbs + ns_receive_therapy_events + ns_receive_profile_switch + ns_receive_offline_event + ns_receive_temp_target + ObjectivesProfileSwitchUsed + ObjectivesTempTargetUsed + ObjectivesDisconnectUsed + ObjectivesReconnectUsed + aps_mode + boluswizard_percentage + key_usersuperbolus + treatmentssafety_maxbolus + patient_name + email_for_crash_report + openapsama_autosens_period + enable_fabric2 + \ No newline at end of file diff --git a/crowdin.yml b/crowdin.yml index daaf8587cf..f0318d01ce 100644 --- a/crowdin.yml +++ b/crowdin.yml @@ -15,6 +15,8 @@ files: translation: /plugins/automation/src/main/res/values-%android_code%/strings.xml - source: /plugins/openhumans/src/main/res/values/strings.xml translation: /plugins/openhumans/src/main/res/values-%android_code%/strings.xml + - source: /plugins/sensitivity/src/main/res/values/strings.xml + translation: /plugins/sensitivity/src/main/res/values-%android_code%/strings.xml - source: /plugins/configuration/src/main/res/values/strings.xml translation: /plugins/configuration/src/main/res/values-%android_code%/strings.xml - source: /core/core-main/src/main/res/values/protection.xml @@ -23,8 +25,8 @@ files: translation: /core/core-main/src/main/res/values-%android_code%/validator.xml - source: /core/core-main/src/main/res/values/strings.xml translation: /core/core-main/src/main/res/values-%android_code%/strings.xml - - source: /core/fabric/src/main/res/values/strings.xml - translation: /core/fabric/src/main/res/values-%android_code%/strings.xml + - source: /core/utils/src/main/res/values/strings.xml + translation: /core/utils/src/main/res/values-%android_code%/strings.xml - source: /core/ui/src/main/res/values/strings.xml translation: /core/ui/src/main/res/values-%android_code%/strings.xml - source: /app-wear-shared/shared/src/main/res/values/strings.xml diff --git a/implementation/build.gradle b/implementation/build.gradle index cd610c49e8..2098509b31 100644 --- a/implementation/build.gradle +++ b/implementation/build.gradle @@ -23,7 +23,7 @@ dependencies { implementation project(':plugins:automation') implementation project(':interfaces') implementation project(':core:core-main') - implementation project(':core:fabric') + implementation project(':core:utils') implementation project(':core:ui') implementation project(':ui') } \ No newline at end of file diff --git a/insight/build.gradle b/insight/build.gradle index 94a41ddbbc..7484683df6 100644 --- a/insight/build.gradle +++ b/insight/build.gradle @@ -28,7 +28,7 @@ android { dependencies { implementation project(':core:core-main') - implementation project(':core:fabric') + implementation project(':core:utils') implementation project(':interfaces') implementation project(':app-wear-shared:rx') implementation project(':app-wear-shared:shared') diff --git a/plugins/aps/build.gradle b/plugins/aps/build.gradle index c13275c4a2..137cf8bce1 100644 --- a/plugins/aps/build.gradle +++ b/plugins/aps/build.gradle @@ -21,7 +21,7 @@ dependencies { implementation project(':database:entities') implementation project(':database:impl') implementation project(':core:core-main') - implementation project(':core:fabric') + implementation project(':core:utils') implementation project(':core:ui') implementation project(':interfaces') diff --git a/plugins/aps/src/main/java/info/nightscout/plugins/aps/openAPSAMA/OpenAPSAMAPlugin.kt b/plugins/aps/src/main/java/info/nightscout/plugins/aps/openAPSAMA/OpenAPSAMAPlugin.kt index 071378a0fa..a69564922a 100644 --- a/plugins/aps/src/main/java/info/nightscout/plugins/aps/openAPSAMA/OpenAPSAMAPlugin.kt +++ b/plugins/aps/src/main/java/info/nightscout/plugins/aps/openAPSAMA/OpenAPSAMAPlugin.kt @@ -6,7 +6,7 @@ import info.nightscout.androidaps.annotations.OpenForTesting import info.nightscout.androidaps.extensions.target import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatusProvider import info.nightscout.core.fabric.FabricPrivacy -import info.nightscout.core.profile.secondsFromMidnight +import info.nightscout.core.utils.MidnightUtils import info.nightscout.database.impl.AppRepository import info.nightscout.database.impl.ValueWrapper import info.nightscout.interfaces.aps.APS @@ -159,7 +159,7 @@ class OpenAPSAMAPlugin @Inject constructor( ) } if (!hardLimits.checkHardLimits(profile.dia, R.string.profile_dia, hardLimits.minDia(), hardLimits.maxDia())) return - if (!hardLimits.checkHardLimits(profile.getIcTimeFromMidnight(Profile.secondsFromMidnight()), R.string.profile_carbs_ratio_value, hardLimits.minIC(), hardLimits.maxIC())) return + if (!hardLimits.checkHardLimits(profile.getIcTimeFromMidnight(MidnightUtils.secondsFromMidnight()), R.string.profile_carbs_ratio_value, hardLimits.minIC(), hardLimits.maxIC())) return if (!hardLimits.checkHardLimits(profile.getIsfMgdl(), R.string.profile_sensitivity_value, HardLimits.MIN_ISF, HardLimits.MAX_ISF)) return if (!hardLimits.checkHardLimits(profile.getMaxDailyBasal(), R.string.profile_max_daily_basal_value, 0.02, hardLimits.maxBasal())) return if (!hardLimits.checkHardLimits(pump.baseBasalRate, R.string.current_basal_value, 0.01, hardLimits.maxBasal())) return diff --git a/plugins/aps/src/main/java/info/nightscout/plugins/aps/openAPSSMB/OpenAPSSMBPlugin.kt b/plugins/aps/src/main/java/info/nightscout/plugins/aps/openAPSSMB/OpenAPSSMBPlugin.kt index 47f3ef245f..85aa475426 100644 --- a/plugins/aps/src/main/java/info/nightscout/plugins/aps/openAPSSMB/OpenAPSSMBPlugin.kt +++ b/plugins/aps/src/main/java/info/nightscout/plugins/aps/openAPSSMB/OpenAPSSMBPlugin.kt @@ -7,7 +7,7 @@ import dagger.android.HasAndroidInjector import info.nightscout.androidaps.annotations.OpenForTesting import info.nightscout.androidaps.extensions.target import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatusProvider -import info.nightscout.core.profile.secondsFromMidnight +import info.nightscout.core.utils.MidnightUtils import info.nightscout.database.impl.AppRepository import info.nightscout.database.impl.ValueWrapper import info.nightscout.interfaces.aps.APS @@ -161,7 +161,7 @@ class OpenAPSSMBPlugin @Inject constructor( ) } if (!hardLimits.checkHardLimits(profile.dia, R.string.profile_dia, hardLimits.minDia(), hardLimits.maxDia())) return - if (!hardLimits.checkHardLimits(profile.getIcTimeFromMidnight(Profile.secondsFromMidnight()), R.string.profile_carbs_ratio_value, hardLimits.minIC(), hardLimits.maxIC())) return + if (!hardLimits.checkHardLimits(profile.getIcTimeFromMidnight(MidnightUtils.secondsFromMidnight()), R.string.profile_carbs_ratio_value, hardLimits.minIC(), hardLimits.maxIC())) return if (!hardLimits.checkHardLimits(profile.getIsfMgdl(), R.string.profile_sensitivity_value, HardLimits.MIN_ISF, HardLimits.MAX_ISF)) return if (!hardLimits.checkHardLimits(profile.getMaxDailyBasal(), R.string.profile_max_daily_basal_value, 0.02, hardLimits.maxBasal())) return if (!hardLimits.checkHardLimits(pump.baseBasalRate, R.string.current_basal_value, 0.01, hardLimits.maxBasal())) return diff --git a/plugins/aps/src/main/java/info/nightscout/plugins/general/autotune/AutotuneCore.kt b/plugins/aps/src/main/java/info/nightscout/plugins/general/autotune/AutotuneCore.kt index 38304a4d76..e0c06e903c 100644 --- a/plugins/aps/src/main/java/info/nightscout/plugins/general/autotune/AutotuneCore.kt +++ b/plugins/aps/src/main/java/info/nightscout/plugins/general/autotune/AutotuneCore.kt @@ -2,7 +2,7 @@ package info.nightscout.plugins.general.autotune import info.nightscout.interfaces.utils.Round import info.nightscout.plugins.aps.R -import info.nightscout.plugins.aps.utils.Percentile +import info.nightscout.core.utils.Percentile import info.nightscout.plugins.general.autotune.data.ATProfile import info.nightscout.plugins.general.autotune.data.LocalInsulin import info.nightscout.plugins.general.autotune.data.PreppedGlucose diff --git a/plugins/aps/src/main/java/info/nightscout/plugins/general/autotune/AutotuneIob.kt b/plugins/aps/src/main/java/info/nightscout/plugins/general/autotune/AutotuneIob.kt index 6a7661c676..ea38010c9e 100644 --- a/plugins/aps/src/main/java/info/nightscout/plugins/general/autotune/AutotuneIob.kt +++ b/plugins/aps/src/main/java/info/nightscout/plugins/general/autotune/AutotuneIob.kt @@ -5,7 +5,7 @@ import info.nightscout.androidaps.extensions.durationInMinutes import info.nightscout.androidaps.extensions.toJson import info.nightscout.androidaps.extensions.toTemporaryBasal import info.nightscout.core.iob.round -import info.nightscout.core.profile.milliSecFromMidnight +import info.nightscout.core.utils.MidnightUtils import info.nightscout.database.entities.Bolus import info.nightscout.database.entities.Carbs import info.nightscout.database.entities.ExtendedBolus @@ -207,7 +207,7 @@ open class AutotuneIob @Inject constructor( if (tb.isValid && tb.durationInMinutes > 0) { val endTimestamp = splittedTimestamp + splittedDuration while (splittedDuration > 0) { - if (Profile.milliSecFromMidnight(splittedTimestamp) / cutInMilliSec == Profile.milliSecFromMidnight(endTimestamp) / cutInMilliSec) { + if (MidnightUtils.milliSecFromMidnight(splittedTimestamp) / cutInMilliSec == MidnightUtils.milliSecFromMidnight(endTimestamp) / cutInMilliSec) { val newTb = TemporaryBasal( isValid = true, isAbsolute = tb.isAbsolute, @@ -224,7 +224,7 @@ open class AutotuneIob @Inject constructor( boluses.addAll(convertToBoluses(newTb, profile, tunedProfile.profile)) // // required for correct iob calculation with oref0 algo } else { - val durationFilled = (cutInMilliSec - Profile.milliSecFromMidnight(splittedTimestamp) % cutInMilliSec) + val durationFilled = (cutInMilliSec - MidnightUtils.milliSecFromMidnight(splittedTimestamp) % cutInMilliSec) val newTb = TemporaryBasal( isValid = true, isAbsolute = tb.isAbsolute, diff --git a/plugins/aps/src/main/java/info/nightscout/plugins/general/autotune/data/ATProfile.kt b/plugins/aps/src/main/java/info/nightscout/plugins/general/autotune/data/ATProfile.kt index 5f474cf01d..ff79d51e06 100644 --- a/plugins/aps/src/main/java/info/nightscout/plugins/general/autotune/data/ATProfile.kt +++ b/plugins/aps/src/main/java/info/nightscout/plugins/general/autotune/data/ATProfile.kt @@ -7,7 +7,7 @@ import info.nightscout.androidaps.extensions.pureProfileFromJson import info.nightscout.core.main.R import info.nightscout.core.profile.ProfileStoreObject import info.nightscout.core.profile.fromMgdlToUnits -import info.nightscout.core.profile.secondsFromMidnight +import info.nightscout.core.utils.MidnightUtils import info.nightscout.database.entities.data.Block import info.nightscout.interfaces.Config import info.nightscout.interfaces.GlucoseUnit @@ -65,7 +65,7 @@ class ATProfile(profile: Profile, var localInsulin: LocalInsulin, val injector: val avgIC: Double get() = if (profile.getIcsValues().size == 1) profile.getIcsValues().get(0).value else Round.roundTo(averageProfileValue(profile.getIcsValues()), 0.01) - fun getBasal(timestamp: Long): Double = basal[Profile.secondsFromMidnight(timestamp) / 3600] + fun getBasal(timestamp: Long): Double = basal[MidnightUtils.secondsFromMidnight(timestamp) / 3600] // for localProfilePlugin Synchronisation fun basal() = jsonArray(basal) diff --git a/plugins/automation/build.gradle b/plugins/automation/build.gradle index 545488c54d..0950a142c7 100644 --- a/plugins/automation/build.gradle +++ b/plugins/automation/build.gradle @@ -19,7 +19,7 @@ android { dependencies { implementation project(':graphview') implementation project(':core:core-main') - implementation project(':core:fabric') + implementation project(':core:utils') implementation project(':core:ui') implementation project(':database:entities') implementation project(':database:impl') diff --git a/plugins/automation/src/main/java/info/nightscout/automation/elements/InputTime.kt b/plugins/automation/src/main/java/info/nightscout/automation/elements/InputTime.kt index 3afe0cc273..e3600294f8 100644 --- a/plugins/automation/src/main/java/info/nightscout/automation/elements/InputTime.kt +++ b/plugins/automation/src/main/java/info/nightscout/automation/elements/InputTime.kt @@ -12,7 +12,7 @@ import androidx.fragment.app.FragmentManager import com.google.android.material.timepicker.MaterialTimePicker import com.google.android.material.timepicker.TimeFormat import info.nightscout.automation.R -import info.nightscout.core.profile.secondsFromMidnight +import info.nightscout.core.utils.MidnightUtils import info.nightscout.interfaces.profile.Profile import info.nightscout.interfaces.utils.MidnightTime import info.nightscout.shared.interfaces.ResourceHelper @@ -60,7 +60,7 @@ class InputTime(private val rh: ResourceHelper, private val dateUtil: DateUtil) private fun toMills(minutesSinceMidnight: Int): Long = MidnightTime.calcPlusMinutes(minutesSinceMidnight) - private fun getMinSinceMidnight(time: Long): Int = Profile.secondsFromMidnight(time) / 60 + private fun getMinSinceMidnight(time: Long): Int = MidnightUtils.secondsFromMidnight(time) / 60 private fun getFragmentManager(context: Context?): FragmentManager? { return when (context) { diff --git a/plugins/automation/src/main/java/info/nightscout/automation/elements/InputTimeRange.kt b/plugins/automation/src/main/java/info/nightscout/automation/elements/InputTimeRange.kt index 585f9036b1..ded97ef653 100644 --- a/plugins/automation/src/main/java/info/nightscout/automation/elements/InputTimeRange.kt +++ b/plugins/automation/src/main/java/info/nightscout/automation/elements/InputTimeRange.kt @@ -13,7 +13,7 @@ import androidx.fragment.app.FragmentManager import com.google.android.material.timepicker.MaterialTimePicker import com.google.android.material.timepicker.TimeFormat import info.nightscout.automation.R -import info.nightscout.core.profile.secondsFromMidnight +import info.nightscout.core.utils.MidnightUtils import info.nightscout.interfaces.profile.Profile import info.nightscout.interfaces.utils.MidnightTime import info.nightscout.shared.interfaces.ResourceHelper @@ -86,7 +86,7 @@ class InputTimeRange(private val rh: ResourceHelper, private val dateUtil: DateU private fun toMills(minutesSinceMidnight: Int): Long = MidnightTime.calcPlusMinutes(minutesSinceMidnight) - private fun getMinSinceMidnight(time: Long): Int = Profile.secondsFromMidnight(time) / 60 + private fun getMinSinceMidnight(time: Long): Int = MidnightUtils.secondsFromMidnight(time) / 60 private fun getFragmentManager(context: Context?): FragmentManager? { return when (context) { diff --git a/plugins/automation/src/main/java/info/nightscout/automation/triggers/TriggerRecurringTime.kt b/plugins/automation/src/main/java/info/nightscout/automation/triggers/TriggerRecurringTime.kt index 170598ec8a..c3f28abe8f 100644 --- a/plugins/automation/src/main/java/info/nightscout/automation/triggers/TriggerRecurringTime.kt +++ b/plugins/automation/src/main/java/info/nightscout/automation/triggers/TriggerRecurringTime.kt @@ -8,7 +8,7 @@ import info.nightscout.automation.elements.InputTime import info.nightscout.automation.elements.InputWeekDay import info.nightscout.automation.elements.LayoutBuilder import info.nightscout.automation.elements.StaticLabel -import info.nightscout.core.profile.secondsFromMidnight +import info.nightscout.core.utils.MidnightUtils import info.nightscout.interfaces.profile.Profile import info.nightscout.interfaces.utils.JsonHelper import info.nightscout.interfaces.utils.MidnightTime @@ -92,7 +92,7 @@ class TriggerRecurringTime(injector: HasAndroidInjector) : Trigger(injector) { private fun toMills(minutesSinceMidnight: Int): Long = MidnightTime.calcPlusMinutes(minutesSinceMidnight) - private fun getMinSinceMidnight(time: Long): Int = Profile.secondsFromMidnight(time) / 60 + private fun getMinSinceMidnight(time: Long): Int = MidnightUtils.secondsFromMidnight(time) / 60 override fun generateDialog(root: LinearLayout) { LayoutBuilder() diff --git a/plugins/automation/src/main/java/info/nightscout/automation/triggers/TriggerTimeRange.kt b/plugins/automation/src/main/java/info/nightscout/automation/triggers/TriggerTimeRange.kt index d8638df250..18867478ad 100644 --- a/plugins/automation/src/main/java/info/nightscout/automation/triggers/TriggerTimeRange.kt +++ b/plugins/automation/src/main/java/info/nightscout/automation/triggers/TriggerTimeRange.kt @@ -7,7 +7,7 @@ import info.nightscout.automation.R import info.nightscout.automation.elements.InputTimeRange import info.nightscout.automation.elements.LayoutBuilder import info.nightscout.automation.elements.StaticLabel -import info.nightscout.core.profile.secondsFromMidnight +import info.nightscout.core.utils.MidnightUtils import info.nightscout.interfaces.profile.Profile import info.nightscout.interfaces.utils.JsonHelper.safeGetInt import info.nightscout.interfaces.utils.MidnightTime @@ -73,7 +73,7 @@ class TriggerTimeRange(injector: HasAndroidInjector) : Trigger(injector) { private fun toMills(minutesSinceMidnight: Int): Long = MidnightTime.calcPlusMinutes(minutesSinceMidnight) - private fun getMinSinceMidnight(time: Long): Int = Profile.secondsFromMidnight(time) / 60 + private fun getMinSinceMidnight(time: Long): Int = MidnightUtils.secondsFromMidnight(time) / 60 override fun generateDialog(root: LinearLayout) { LayoutBuilder() diff --git a/plugins/configuration/build.gradle b/plugins/configuration/build.gradle index d6c349f558..8d21ec056c 100644 --- a/plugins/configuration/build.gradle +++ b/plugins/configuration/build.gradle @@ -22,6 +22,6 @@ dependencies { implementation project(':app-wear-shared:shared') implementation project(':database:entities') implementation project(':core:core-main') - implementation project(':core:fabric') + implementation project(':core:utils') implementation project(':core:ui') } \ No newline at end of file diff --git a/plugins/main/build.gradle b/plugins/main/build.gradle index 8316b164f0..d91f0d606f 100644 --- a/plugins/main/build.gradle +++ b/plugins/main/build.gradle @@ -22,7 +22,7 @@ dependencies { implementation project(':database:impl') implementation project(':graphview') implementation project(':core:core-main') - implementation project(':core:fabric') + implementation project(':core:utils') implementation project(':core:ui') implementation project(':interfaces') implementation project(':ns-sdk') diff --git a/plugins/main/src/main/java/info/nightscout/plugins/sync/nsclient/extensions/TherapyEventExtension.kt b/plugins/main/src/main/java/info/nightscout/plugins/sync/nsclient/extensions/TherapyEventExtension.kt index a3bab73543..1c815ba8d9 100644 --- a/plugins/main/src/main/java/info/nightscout/plugins/sync/nsclient/extensions/TherapyEventExtension.kt +++ b/plugins/main/src/main/java/info/nightscout/plugins/sync/nsclient/extensions/TherapyEventExtension.kt @@ -81,11 +81,3 @@ fun TherapyEvent.toJson(isAdd: Boolean, dateUtil: DateUtil): JSONObject = if (type == TherapyEvent.Type.ANNOUNCEMENT) it.put("isAnnouncement", true) } -fun List.isTherapyEventEvent5minBack(time: Long): Boolean { - for (event in this) { - if (event.timestamp <= time && event.timestamp > time - T.mins(5).msecs()) { - return true - } - } - return false -} diff --git a/plugins/main/src/main/res/values/strings.xml b/plugins/main/src/main/res/values/strings.xml index 6b3fb6a6aa..d0ca819e7e 100644 --- a/plugins/main/src/main/res/values/strings.xml +++ b/plugins/main/src/main/res/values/strings.xml @@ -278,7 +278,6 @@ Safety Pump is not temp basal capable Closed loop mode disabled in preferences - UAM disabled because it rely on Oref1 sensitivity plugin Running dev version. Closed loop is disabled. Closed loop disabled because of running Extended bolus SMB always and after carbs disabled because active BG source doesn\'t support advanced filtering diff --git a/plugins/sensitivity/.gitignore b/plugins/sensitivity/.gitignore new file mode 100644 index 0000000000..42afabfd2a --- /dev/null +++ b/plugins/sensitivity/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/plugins/sensitivity/build.gradle b/plugins/sensitivity/build.gradle new file mode 100644 index 0000000000..95cd5b5bbe --- /dev/null +++ b/plugins/sensitivity/build.gradle @@ -0,0 +1,28 @@ +plugins { + id 'com.android.library' + id 'kotlin-android' + id 'kotlin-kapt' + id 'kotlin-allopen' + id 'com.hiya.jacoco-android' +} + +apply from: "${project.rootDir}/core/core-main/android_dependencies.gradle" +apply from: "${project.rootDir}/core/core-main/android_module_dependencies.gradle" +apply from: "${project.rootDir}/core/core-main/allopen_dependencies.gradle" +apply from: "${project.rootDir}/core/core-main/test_dependencies.gradle" +apply from: "${project.rootDir}/core/core-main/jacoco_global.gradle" +android { + namespace 'info.nightscout.sensitivity' +} + + +dependencies { + implementation project(':interfaces') + implementation project(':app-wear-shared:rx') + implementation project(':app-wear-shared:shared') + implementation project(':database:entities') + implementation project(':database:impl') + //implementation project(':core:core-main') + implementation project(':core:utils') + implementation project(':core:ui') +} \ No newline at end of file diff --git a/plugins/sensitivity/consumer-rules.pro b/plugins/sensitivity/consumer-rules.pro new file mode 100644 index 0000000000..e69de29bb2 diff --git a/plugins/sensitivity/proguard-rules.pro b/plugins/sensitivity/proguard-rules.pro new file mode 100644 index 0000000000..481bb43481 --- /dev/null +++ b/plugins/sensitivity/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/plugins/sensitivity/src/main/AndroidManifest.xml b/plugins/sensitivity/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..a5918e68ab --- /dev/null +++ b/plugins/sensitivity/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/sensitivity/AbstractSensitivityPlugin.kt b/plugins/sensitivity/src/main/java/info/nightscout/sensitivity/AbstractSensitivityPlugin.kt similarity index 97% rename from app/src/main/java/info/nightscout/androidaps/plugins/sensitivity/AbstractSensitivityPlugin.kt rename to plugins/sensitivity/src/main/java/info/nightscout/sensitivity/AbstractSensitivityPlugin.kt index 99abdfb6ac..2080fb8866 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/sensitivity/AbstractSensitivityPlugin.kt +++ b/plugins/sensitivity/src/main/java/info/nightscout/sensitivity/AbstractSensitivityPlugin.kt @@ -1,7 +1,6 @@ -package info.nightscout.androidaps.plugins.sensitivity +package info.nightscout.sensitivity import dagger.android.HasAndroidInjector -import info.nightscout.androidaps.R import info.nightscout.interfaces.aps.AutosensDataStore import info.nightscout.interfaces.aps.AutosensResult import info.nightscout.interfaces.aps.Sensitivity diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/sensitivity/SensitivityAAPSPlugin.kt b/plugins/sensitivity/src/main/java/info/nightscout/sensitivity/SensitivityAAPSPlugin.kt similarity index 93% rename from app/src/main/java/info/nightscout/androidaps/plugins/sensitivity/SensitivityAAPSPlugin.kt rename to plugins/sensitivity/src/main/java/info/nightscout/sensitivity/SensitivityAAPSPlugin.kt index 7a6ab4e86a..c7fbf7669d 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/sensitivity/SensitivityAAPSPlugin.kt +++ b/plugins/sensitivity/src/main/java/info/nightscout/sensitivity/SensitivityAAPSPlugin.kt @@ -1,10 +1,9 @@ -package info.nightscout.androidaps.plugins.sensitivity +package info.nightscout.sensitivity import dagger.android.HasAndroidInjector -import info.nightscout.androidaps.R import info.nightscout.androidaps.annotations.OpenForTesting -import info.nightscout.androidaps.extensions.isPSEvent5minBack -import info.nightscout.core.profile.secondsFromMidnight +import info.nightscout.core.utils.MidnightUtils +import info.nightscout.core.utils.Percentile import info.nightscout.database.entities.TherapyEvent import info.nightscout.database.impl.AppRepository import info.nightscout.interfaces.Constants @@ -15,9 +14,10 @@ import info.nightscout.interfaces.plugin.PluginDescription import info.nightscout.interfaces.plugin.PluginType import info.nightscout.interfaces.profile.Profile import info.nightscout.interfaces.profile.ProfileFunction -import info.nightscout.plugins.sync.nsclient.extensions.isTherapyEventEvent5minBack import info.nightscout.rx.logging.AAPSLogger import info.nightscout.rx.logging.LTag +import info.nightscout.sensitivity.extensions.isPSEvent5minBack +import info.nightscout.sensitivity.extensions.isTherapyEventEvent5minBack import info.nightscout.shared.interfaces.ResourceHelper import info.nightscout.shared.sharedPreferences.SP import info.nightscout.shared.utils.DateUtil @@ -42,7 +42,7 @@ class SensitivityAAPSPlugin @Inject constructor( PluginDescription() .mainType(PluginType.SENSITIVITY) .pluginIcon(R.drawable.ic_generic_icon) - .pluginName(R.string.sensitivityaaps) + .pluginName(R.string.sensitivity_aaps) .shortName(R.string.sensitivity_shortname) .preferencesId(R.xml.pref_absorption_aaps) .description(R.string.description_sensitivity_aaps), @@ -104,7 +104,7 @@ class SensitivityAAPSPlugin @Inject constructor( if (autosensData.validDeviation) if (autosensData.time > toTime - hoursForDetection * 60 * 60 * 1000L) deviationsArray.add(deviation) if (deviationsArray.size > hoursForDetection * 60 / 5) deviationsArray.removeAt(0) pastSensitivity += autosensData.pastSensitivity - val secondsFromMidnight = Profile.secondsFromMidnight(autosensData.time) + val secondsFromMidnight = MidnightUtils.secondsFromMidnight(autosensData.time) if (secondsFromMidnight % 3600 < 2.5 * 60 || secondsFromMidnight % 3600 > 57.5 * 60) { pastSensitivity += "(" + (secondsFromMidnight / 3600.0).roundToInt() + ")" } @@ -116,7 +116,7 @@ class SensitivityAAPSPlugin @Inject constructor( val sensResult: String aapsLogger.debug(LTag.AUTOSENS, "Records: $index $pastSensitivity") Arrays.sort(deviations) - val percentile = info.nightscout.plugins.aps.utils.Percentile.percentile(deviations, 0.50) + val percentile = Percentile.percentile(deviations, 0.50) val basalOff = percentile * (60.0 / 5.0) / sens val ratio = 1 + basalOff / profile.getMaxDailyBasal() sensResult = when { diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/sensitivity/SensitivityOref1Plugin.kt b/plugins/sensitivity/src/main/java/info/nightscout/sensitivity/SensitivityOref1Plugin.kt similarity index 93% rename from app/src/main/java/info/nightscout/androidaps/plugins/sensitivity/SensitivityOref1Plugin.kt rename to plugins/sensitivity/src/main/java/info/nightscout/sensitivity/SensitivityOref1Plugin.kt index 7cc466d1a6..6c3d24e0db 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/sensitivity/SensitivityOref1Plugin.kt +++ b/plugins/sensitivity/src/main/java/info/nightscout/sensitivity/SensitivityOref1Plugin.kt @@ -1,10 +1,9 @@ -package info.nightscout.androidaps.plugins.sensitivity +package info.nightscout.sensitivity import dagger.android.HasAndroidInjector -import info.nightscout.androidaps.R import info.nightscout.androidaps.annotations.OpenForTesting -import info.nightscout.androidaps.extensions.isPSEvent5minBack -import info.nightscout.core.profile.secondsFromMidnight +import info.nightscout.core.utils.MidnightUtils +import info.nightscout.core.utils.Percentile import info.nightscout.database.entities.TherapyEvent import info.nightscout.database.impl.AppRepository import info.nightscout.interfaces.Constants @@ -16,11 +15,11 @@ import info.nightscout.interfaces.constraints.Constraint import info.nightscout.interfaces.constraints.Constraints import info.nightscout.interfaces.plugin.PluginDescription import info.nightscout.interfaces.plugin.PluginType -import info.nightscout.interfaces.profile.Profile import info.nightscout.interfaces.profile.ProfileFunction -import info.nightscout.plugins.sync.nsclient.extensions.isTherapyEventEvent5minBack import info.nightscout.rx.logging.AAPSLogger import info.nightscout.rx.logging.LTag +import info.nightscout.sensitivity.extensions.isPSEvent5minBack +import info.nightscout.sensitivity.extensions.isTherapyEventEvent5minBack import info.nightscout.shared.interfaces.ResourceHelper import info.nightscout.shared.sharedPreferences.SP import info.nightscout.shared.utils.DateUtil @@ -45,7 +44,7 @@ class SensitivityOref1Plugin @Inject constructor( PluginDescription() .mainType(PluginType.SENSITIVITY) .pluginIcon(R.drawable.ic_generic_icon) - .pluginName(R.string.sensitivityoref1) + .pluginName(R.string.sensitivity_oref1) .shortName(R.string.sensitivity_shortname) .enableByDefault(true) .preferencesId(R.xml.pref_absorption_oref1) @@ -123,7 +122,7 @@ class SensitivityOref1Plugin @Inject constructor( deviationsArray.removeAt(0) } pastSensitivity += autosensData.pastSensitivity - val secondsFromMidnight = Profile.secondsFromMidnight(autosensData.time) + val secondsFromMidnight = MidnightUtils.secondsFromMidnight(autosensData.time) if (secondsFromMidnight % 3600 < 2.5 * 60 || secondsFromMidnight % 3600 > 57.5 * 60) { pastSensitivity += "(" + (secondsFromMidnight / 3600.0).roundToInt() + ")" } @@ -162,8 +161,8 @@ class SensitivityOref1Plugin @Inject constructor( val sens = profile.getIsfMgdl() aapsLogger.debug(LTag.AUTOSENS, "Records: $index $pastSensitivity") Arrays.sort(deviations) - val pSensitive = info.nightscout.plugins.aps.utils.Percentile.percentile(deviations, 0.50) - val pResistant = info.nightscout.plugins.aps.utils.Percentile.percentile(deviations, 0.50) + val pSensitive = Percentile.percentile(deviations, 0.50) + val pResistant = Percentile.percentile(deviations, 0.50) var basalOff = 0.0 when { pSensitive < 0 -> { // sensitive @@ -238,7 +237,7 @@ class SensitivityOref1Plugin @Inject constructor( get() = SensitivityType.SENSITIVITY_OREF1 override fun isUAMEnabled(value: Constraint): Constraint { - if (!isEnabled()) value.set(aapsLogger, false, rh.gs(info.nightscout.plugins.R.string.uamdisabledoref1notselected), this) + if (!isEnabled()) value.set(aapsLogger, false, rh.gs(R.string.uam_disabled_oref1_not_selected), this) return value } } \ No newline at end of file diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/sensitivity/SensitivityWeightedAveragePlugin.kt b/plugins/sensitivity/src/main/java/info/nightscout/sensitivity/SensitivityWeightedAveragePlugin.kt similarity index 94% rename from app/src/main/java/info/nightscout/androidaps/plugins/sensitivity/SensitivityWeightedAveragePlugin.kt rename to plugins/sensitivity/src/main/java/info/nightscout/sensitivity/SensitivityWeightedAveragePlugin.kt index f20009460f..e93080e3e6 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/sensitivity/SensitivityWeightedAveragePlugin.kt +++ b/plugins/sensitivity/src/main/java/info/nightscout/sensitivity/SensitivityWeightedAveragePlugin.kt @@ -1,11 +1,9 @@ -package info.nightscout.androidaps.plugins.sensitivity +package info.nightscout.sensitivity import androidx.collection.LongSparseArray import dagger.android.HasAndroidInjector -import info.nightscout.androidaps.R import info.nightscout.androidaps.annotations.OpenForTesting -import info.nightscout.androidaps.extensions.isPSEvent5minBack -import info.nightscout.core.profile.secondsFromMidnight +import info.nightscout.core.utils.MidnightUtils import info.nightscout.database.entities.TherapyEvent import info.nightscout.database.impl.AppRepository import info.nightscout.interfaces.Constants @@ -14,11 +12,11 @@ import info.nightscout.interfaces.aps.AutosensResult import info.nightscout.interfaces.aps.Sensitivity.SensitivityType import info.nightscout.interfaces.plugin.PluginDescription import info.nightscout.interfaces.plugin.PluginType -import info.nightscout.interfaces.profile.Profile import info.nightscout.interfaces.profile.ProfileFunction -import info.nightscout.plugins.sync.nsclient.extensions.isTherapyEventEvent5minBack import info.nightscout.rx.logging.AAPSLogger import info.nightscout.rx.logging.LTag +import info.nightscout.sensitivity.extensions.isPSEvent5minBack +import info.nightscout.sensitivity.extensions.isTherapyEventEvent5minBack import info.nightscout.shared.interfaces.ResourceHelper import info.nightscout.shared.sharedPreferences.SP import info.nightscout.shared.utils.DateUtil @@ -42,7 +40,7 @@ class SensitivityWeightedAveragePlugin @Inject constructor( PluginDescription() .mainType(PluginType.SENSITIVITY) .pluginIcon(R.drawable.ic_generic_icon) - .pluginName(R.string.sensitivityweightedaverage) + .pluginName(R.string.sensitivity_weighted_average) .shortName(R.string.sensitivity_shortname) .preferencesId(R.xml.pref_absorption_aaps) .description(R.string.description_sensitivity_weighted_average), @@ -110,7 +108,7 @@ class SensitivityWeightedAveragePlugin @Inject constructor( val reverseWeight = (toTime - autosensData.time) / (5 * 60 * 1000L) if (autosensData.validDeviation) data.append(reverseWeight, deviation) pastSensitivity += autosensData.pastSensitivity - val secondsFromMidnight = Profile.secondsFromMidnight(autosensData.time) + val secondsFromMidnight = MidnightUtils.secondsFromMidnight(autosensData.time) if (secondsFromMidnight % 3600 < 2.5 * 60 || secondsFromMidnight % 3600 > 57.5 * 60) { pastSensitivity += "(" + (secondsFromMidnight / 3600.0).roundToInt() + ")" } diff --git a/plugins/sensitivity/src/main/java/info/nightscout/sensitivity/extensions/ProfileSwitchExtensions.kt b/plugins/sensitivity/src/main/java/info/nightscout/sensitivity/extensions/ProfileSwitchExtensions.kt new file mode 100644 index 0000000000..dc3a566333 --- /dev/null +++ b/plugins/sensitivity/src/main/java/info/nightscout/sensitivity/extensions/ProfileSwitchExtensions.kt @@ -0,0 +1,16 @@ +package info.nightscout.sensitivity.extensions + +import info.nightscout.database.entities.ProfileSwitch +import info.nightscout.shared.utils.T + +fun List.isPSEvent5minBack(time: Long): Boolean { + for (event in this) { + if (event.timestamp <= time && event.timestamp > time - T.mins(5).msecs()) { + if (event.duration == 0L) { + //aapsLogger.debug(LTag.DATABASE, "Found ProfileSwitch event for time: " + dateUtil.dateAndTimeString(time) + " " + event.toString()) + return true + } + } + } + return false +} diff --git a/plugins/sensitivity/src/main/java/info/nightscout/sensitivity/extensions/TherapyEventExtensions.kt b/plugins/sensitivity/src/main/java/info/nightscout/sensitivity/extensions/TherapyEventExtensions.kt new file mode 100644 index 0000000000..0788398e6c --- /dev/null +++ b/plugins/sensitivity/src/main/java/info/nightscout/sensitivity/extensions/TherapyEventExtensions.kt @@ -0,0 +1,13 @@ +package info.nightscout.sensitivity.extensions + +import info.nightscout.database.entities.TherapyEvent +import info.nightscout.shared.utils.T + +fun List.isTherapyEventEvent5minBack(time: Long): Boolean { + for (event in this) { + if (event.timestamp <= time && event.timestamp > time - T.mins(5).msecs()) { + return true + } + } + return false +} \ No newline at end of file diff --git a/plugins/sensitivity/src/main/res/values/strings.xml b/plugins/sensitivity/src/main/res/values/strings.xml new file mode 100644 index 0000000000..065f277f08 --- /dev/null +++ b/plugins/sensitivity/src/main/res/values/strings.xml @@ -0,0 +1,12 @@ + + + SENS + Sensitivity Oref1 + Sensitivity AAPS + Sensitivity WeightedAverage + Sensitivity is calculated the same way like Oref0, but you can specify timeframe to the past. Minimal carb absorption is calculated from max carb absorption time from preferences. + Sensitivity is calculated from 8h or 24h data in the past (using either which is more sensitive). Carbs (if not absorbed) are cut after time specified in preferences. Plugin also calculates UAM. + Sensitivity is calculated as a weighted average from deviations. Newer deviations have higher weight. Minimal carb absorption is calculated from max carb absorption time from preferences. This algorithm is the fastest in following sensitivity changes. + UAM disabled because it rely on Oref1 sensitivity plugin + + \ No newline at end of file diff --git a/app/src/main/res/xml/pref_absorption_aaps.xml b/plugins/sensitivity/src/main/res/xml/pref_absorption_aaps.xml similarity index 100% rename from app/src/main/res/xml/pref_absorption_aaps.xml rename to plugins/sensitivity/src/main/res/xml/pref_absorption_aaps.xml diff --git a/app/src/main/res/xml/pref_absorption_oref1.xml b/plugins/sensitivity/src/main/res/xml/pref_absorption_oref1.xml similarity index 100% rename from app/src/main/res/xml/pref_absorption_oref1.xml rename to plugins/sensitivity/src/main/res/xml/pref_absorption_oref1.xml diff --git a/pump/combo/build.gradle b/pump/combo/build.gradle index 54727a2f18..c8f482ed93 100644 --- a/pump/combo/build.gradle +++ b/pump/combo/build.gradle @@ -19,7 +19,7 @@ dependencies { implementation project(':libraries') implementation project(':core:core-main') implementation project(':core:ui') - implementation project(':core:fabric') + implementation project(':core:utils') implementation project(':app-wear-shared:rx') implementation project(':app-wear-shared:shared') implementation project(':interfaces') diff --git a/pump/dana/build.gradle b/pump/dana/build.gradle index 218fedf329..b5ce512315 100644 --- a/pump/dana/build.gradle +++ b/pump/dana/build.gradle @@ -28,7 +28,7 @@ android { dependencies { implementation project(':libraries') implementation project(':core:core-main') - implementation project(':core:fabric') + implementation project(':core:utils') implementation project(':app-wear-shared:rx') implementation project(':app-wear-shared:shared') implementation project(':interfaces') diff --git a/pump/danar/build.gradle b/pump/danar/build.gradle index f60b31fac2..61303f823e 100644 --- a/pump/danar/build.gradle +++ b/pump/danar/build.gradle @@ -19,7 +19,7 @@ dependencies { implementation project(':app-wear-shared:rx') implementation project(':app-wear-shared:shared') implementation project(':core:core-main') - implementation project(':core:fabric') + implementation project(':core:utils') implementation project(':core:ui') implementation project(':pump:dana') implementation project(':interfaces') diff --git a/pump/danars/build.gradle b/pump/danars/build.gradle index 52fd71aed2..d5292eb455 100644 --- a/pump/danars/build.gradle +++ b/pump/danars/build.gradle @@ -32,7 +32,7 @@ android { dependencies { implementation project(':core:core-main') - implementation project(':core:fabric') + implementation project(':core:utils') implementation project(':core:ui') implementation project(':pump:dana') implementation project(':app-wear-shared:rx') diff --git a/pump/diaconn/build.gradle b/pump/diaconn/build.gradle index 3356efd9d3..de93d0684e 100644 --- a/pump/diaconn/build.gradle +++ b/pump/diaconn/build.gradle @@ -30,7 +30,7 @@ dependencies { implementation project(':app-wear-shared:shared') implementation project(':libraries') implementation project(':interfaces') - implementation project(':core:fabric') + implementation project(':core:utils') implementation project(':core:core-main') api "androidx.room:room-ktx:$room_version" diff --git a/pump/eopatch/build.gradle b/pump/eopatch/build.gradle index 2a7f41e670..b1bc664eeb 100644 --- a/pump/eopatch/build.gradle +++ b/pump/eopatch/build.gradle @@ -27,7 +27,7 @@ dependencies { implementation project(':database:entities') implementation project(':database:impl') implementation project(':core:core-main') - implementation project(':core:fabric') + implementation project(':core:utils') implementation project(':core:ui') implementation project(':interfaces') diff --git a/pump/medtronic/build.gradle b/pump/medtronic/build.gradle index cfccfd972d..9f1ae45f07 100644 --- a/pump/medtronic/build.gradle +++ b/pump/medtronic/build.gradle @@ -25,6 +25,6 @@ dependencies { implementation project(':pump:pump-core') implementation project(':pump:rileylink') implementation project(':interfaces') - implementation project(path: ':core:fabric') + implementation project(path: ':core:utils') testImplementation project(path: ':database:impl') } diff --git a/pump/omnipod-dash/build.gradle b/pump/omnipod-dash/build.gradle index 460f2620e2..c18f325187 100644 --- a/pump/omnipod-dash/build.gradle +++ b/pump/omnipod-dash/build.gradle @@ -32,7 +32,7 @@ dependencies { implementation project(':app-wear-shared:shared') implementation project(':libraries') implementation project(':core:core-main') - implementation project(':core:fabric') + implementation project(':core:utils') implementation project(':core:ui') implementation project(':pump:pump-common') implementation project(':pump:omnipod-common') diff --git a/pump/omnipod-eros/build.gradle b/pump/omnipod-eros/build.gradle index 8391aeb4d9..fd7eca4d58 100644 --- a/pump/omnipod-eros/build.gradle +++ b/pump/omnipod-eros/build.gradle @@ -32,7 +32,7 @@ dependencies { implementation project(':app-wear-shared:shared') implementation project(':libraries') implementation project(':core:core-main') - implementation project(':core:fabric') + implementation project(':core:utils') implementation project(':core:ui') implementation project(':pump:pump-common') implementation project(':pump:pump-core') diff --git a/pump/pump-common/build.gradle b/pump/pump-common/build.gradle index bc0feeff2c..ae3686ebb9 100644 --- a/pump/pump-common/build.gradle +++ b/pump/pump-common/build.gradle @@ -17,7 +17,7 @@ android { dependencies { implementation project(':core:core-main') - implementation project(':core:fabric') + implementation project(':core:utils') implementation project(':app-wear-shared:rx') implementation project(':app-wear-shared:shared') implementation project(':interfaces') diff --git a/settings.gradle b/settings.gradle index 802870db56..05c2127f78 100644 --- a/settings.gradle +++ b/settings.gradle @@ -3,7 +3,7 @@ include ':wear' include ':database:entities' include ':database:impl' include ':core:core-main' -include ':core:fabric' +include ':core:utils' include ':core:ui' include ':app-wear-shared:rx' include ':app-wear-shared:shared' @@ -16,9 +16,10 @@ include ':implementation' include ':interfaces' include ':plugins:aps' include ':plugins:automation' +include ':plugins:configuration' include ':plugins:main' include ':plugins:openhumans' -include ':plugins:configuration' +include ':plugins:sensitivity' include ':pump:combo' include ':pump:dana' include ':pump:danar' diff --git a/ui/build.gradle b/ui/build.gradle index f7123159ce..91d20109a6 100644 --- a/ui/build.gradle +++ b/ui/build.gradle @@ -23,7 +23,7 @@ dependencies { implementation project(':database:entities') implementation project(':database:impl') implementation project(':core:core-main') - implementation project(':core:fabric') + implementation project(':core:utils') implementation project(':interfaces') implementation project(':core:ui') } \ No newline at end of file