From b7237ea6ec7758e1c6ea389850a6dafc21cceb37 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Wed, 18 Oct 2023 13:33:11 +0200 Subject: [PATCH 01/60] remove redundant code --- .../app/aaps/plugins/main/general/overview/OverviewFragment.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt b/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt index 8f5f834e1f..76ceac01f6 100644 --- a/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt +++ b/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt @@ -231,7 +231,6 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList binding.buttonsLayout.quickWizardButton.setOnLongClickListener(this) binding.infoLayout.apsMode.setOnClickListener(this) binding.infoLayout.apsMode.setOnLongClickListener(this) - binding.activeProfile.setOnLongClickListener(this) } @Synchronized From c1d388d910a351867188e97c1a988144b7d10d95 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Mon, 23 Oct 2023 20:54:38 +0200 Subject: [PATCH 02/60] 3.2.0.1-dev --- buildSrc/src/main/kotlin/Versions.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/src/main/kotlin/Versions.kt b/buildSrc/src/main/kotlin/Versions.kt index 8bdf66eda9..b5ce446d61 100644 --- a/buildSrc/src/main/kotlin/Versions.kt +++ b/buildSrc/src/main/kotlin/Versions.kt @@ -2,7 +2,7 @@ import org.gradle.api.JavaVersion object Versions { - const val appVersion = "3.2.0.1" + const val appVersion = "3.2.0.1-dev" const val versionCode = 1500 const val ndkVersion = "21.1.6352462" From 5fd2db9706bce7e776fa2d864f9c8771250fc86a Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Tue, 24 Oct 2023 09:22:48 +0200 Subject: [PATCH 03/60] update .gitignore --- .gitignore | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index d9e995910d..369da9db4c 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ /local.properties .DS_Store */jacoco.exec +*/output-metadata.json /build /captures *.apk @@ -19,6 +20,9 @@ app/.classpath app/.settings/org.eclipse.buildship.core.prefs wear/.classpath wear/.settings/org.eclipse.buildship.core.prefs -app/nsclient/* -app/nsclient2/* +app/aapsclient/* +app/aapsclient2/* app/pumpcontrol/* +wear/aapsclient/* +wear/aapsclient2/* +wear/pumpcontrol/* From 7b5d164239e4286f3e2fb3aaadc9735dc757a019 Mon Sep 17 00:00:00 2001 From: Philoul Date: Tue, 24 Oct 2023 17:00:54 +0200 Subject: [PATCH 04/60] Wear CWF Fix invalid keys for topOffset, leftOffset and rotationOffset steps --- .../core/interfaces/rx/weardata/CustomWatchfaceFormat.kt | 3 +++ .../main/kotlin/app/aaps/wear/watchfaces/CustomWatchface.kt | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/rx/weardata/CustomWatchfaceFormat.kt b/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/rx/weardata/CustomWatchfaceFormat.kt index 0cae6aa73d..7eb411bed4 100644 --- a/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/rx/weardata/CustomWatchfaceFormat.kt +++ b/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/rx/weardata/CustomWatchfaceFormat.kt @@ -268,6 +268,9 @@ enum class JsonKeys(val key: String) { DYNPREF("dynPref"), DYNPREFCOLOR("dynPrefColor"), PREFKEY("prefKey"), + INVALIDTOPOFFSET("invalidTopOffset"), + INVALIDLEFTOFFSET("invalidLeftOffset"), + INVALIDROTATIONOFFSET("invalidRotationOffset"), DEFAULT("default") } diff --git a/wear/src/main/kotlin/app/aaps/wear/watchfaces/CustomWatchface.kt b/wear/src/main/kotlin/app/aaps/wear/watchfaces/CustomWatchface.kt index 73f917e8a3..7b94983183 100644 --- a/wear/src/main/kotlin/app/aaps/wear/watchfaces/CustomWatchface.kt +++ b/wear/src/main/kotlin/app/aaps/wear/watchfaces/CustomWatchface.kt @@ -819,9 +819,9 @@ class CustomWatchface : BaseWatchFace() { getColorSteps(dynColor, COLOR.key, INVALIDCOLOR.key) getColorSteps(dynFontColor, FONTCOLOR.key, INVALIDFONTCOLOR.key) getIntSteps(dynTextSize, TEXTSIZE.key, INVALIDTEXTSIZE.key) - getIntSteps(dynLeftOffset, LEFTOFFSET.key, INVALIDTEXTSIZE.key) - getIntSteps(dynTopOffset, TOPOFFSET.key, INVALIDTEXTSIZE.key) - getIntSteps(dynRotationOffset, ROTATIONOFFSET.key, INVALIDTEXTSIZE.key) + getIntSteps(dynLeftOffset, LEFTOFFSET.key, INVALIDLEFTOFFSET.key) + getIntSteps(dynTopOffset, TOPOFFSET.key, INVALIDTOPOFFSET.key) + getIntSteps(dynRotationOffset, ROTATIONOFFSET.key, INVALIDROTATIONOFFSET.key) } private fun getDrawableSteps(dynMap: MutableMap, key: String, invalidKey: String) { From 5925dc958612c8dbbdf1431700ef37e585fde078 Mon Sep 17 00:00:00 2001 From: Robert Buessow Date: Tue, 24 Oct 2023 23:22:45 +0200 Subject: [PATCH 05/60] Set testCoverageEnabled=false in wear. Setting this to true conflicts with the jacoco plugin and causes no coverage reporting. Not sure why this is only a problem in the wear subproj. --- wear/build.gradle.kts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/wear/build.gradle.kts b/wear/build.gradle.kts index 9e074ec8c1..ad13b8e525 100644 --- a/wear/build.gradle.kts +++ b/wear/build.gradle.kts @@ -50,6 +50,18 @@ android { buildConfigField("String", "BUILDVERSION", "\"${generateGitBuild()}-${generateDate()}\"") } + android { + buildTypes { + debug { + enableUnitTestCoverage = true + // Disable androidTest coverage, since it performs offline coverage + // instrumentation and that causes online (JavaAgent) instrumentation + // to fail in this project. + enableAndroidTestCoverage = false + } + } + } + flavorDimensions.add("standard") productFlavors { create("full") { From 23c12077c6779981bf561d3c7352d0ae22c2130a Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Wed, 25 Oct 2023 09:58:38 +0200 Subject: [PATCH 06/60] fix Objective4 --- core/utils/src/main/res/values/keys.xml | 1 + .../app/aaps/plugins/aps/openAPSAMA/OpenAPSAMAPlugin.kt | 2 +- .../app/aaps/plugins/aps/openAPSSMB/OpenAPSSMBPlugin.kt | 2 +- plugins/aps/src/main/res/values/strings.xml | 1 - .../plugins/constraints/objectives/objectives/Objective4.kt | 4 ++-- .../aaps/plugins/constraints/ConstraintsCheckerImplTest.kt | 4 ++-- .../app/aaps/plugins/constraints/safety/SafetyPluginTest.kt | 6 +++--- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/core/utils/src/main/res/values/keys.xml b/core/utils/src/main/res/values/keys.xml index b98cdfe2c0..8493fae85b 100644 --- a/core/utils/src/main/res/values/keys.xml +++ b/core/utils/src/main/res/values/keys.xml @@ -155,5 +155,6 @@ virtualpump_uploadstatus openapsama_useautosens used_autosens_on_main_phone + openapsma_max_basal \ No newline at end of file diff --git a/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/openAPSAMA/OpenAPSAMAPlugin.kt b/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/openAPSAMA/OpenAPSAMAPlugin.kt index c1c289b315..3d63cab18b 100644 --- a/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/openAPSAMA/OpenAPSAMAPlugin.kt +++ b/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/openAPSAMA/OpenAPSAMAPlugin.kt @@ -247,7 +247,7 @@ class OpenAPSAMAPlugin @Inject constructor( override fun applyBasalConstraints(absoluteRate: Constraint, profile: Profile): Constraint { if (isEnabled()) { - var maxBasal = sp.getDouble(R.string.key_openapsma_max_basal, 1.0) + var maxBasal = sp.getDouble(app.aaps.core.utils.R.string.key_openapsma_max_basal, 1.0) if (maxBasal < profile.getMaxDailyBasal()) { maxBasal = profile.getMaxDailyBasal() absoluteRate.addReason(rh.gs(R.string.increasing_max_basal), this) diff --git a/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/openAPSSMB/OpenAPSSMBPlugin.kt b/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/openAPSSMB/OpenAPSSMBPlugin.kt index 8671217cea..a8e3bd68cd 100644 --- a/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/openAPSSMB/OpenAPSSMBPlugin.kt +++ b/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/openAPSSMB/OpenAPSSMBPlugin.kt @@ -313,7 +313,7 @@ open class OpenAPSSMBPlugin @Inject constructor( override fun applyBasalConstraints(absoluteRate: Constraint, profile: Profile): Constraint { if (isEnabled()) { - var maxBasal = sp.getDouble(R.string.key_openapsma_max_basal, 1.0) + var maxBasal = sp.getDouble(app.aaps.core.utils.R.string.key_openapsma_max_basal, 1.0) if (maxBasal < profile.getMaxDailyBasal()) { maxBasal = profile.getMaxDailyBasal() absoluteRate.addReason(rh.gs(R.string.increasing_max_basal), this) diff --git a/plugins/aps/src/main/res/values/strings.xml b/plugins/aps/src/main/res/values/strings.xml index 62774fbfc0..6dd6a65a33 100644 --- a/plugins/aps/src/main/res/values/strings.xml +++ b/plugins/aps/src/main/res/values/strings.xml @@ -22,7 +22,6 @@ lgsThreshold DynISFAdjust dynisf_adjust_sensitivity - openapsma_max_basal Adjust sensitivity and BG DynamicISF Adjustment Factor % diff --git a/plugins/constraints/src/main/kotlin/app/aaps/plugins/constraints/objectives/objectives/Objective4.kt b/plugins/constraints/src/main/kotlin/app/aaps/plugins/constraints/objectives/objectives/Objective4.kt index bf4991b645..36ae040e1a 100644 --- a/plugins/constraints/src/main/kotlin/app/aaps/plugins/constraints/objectives/objectives/Objective4.kt +++ b/plugins/constraints/src/main/kotlin/app/aaps/plugins/constraints/objectives/objectives/Objective4.kt @@ -21,9 +21,9 @@ class Objective4(injector: HasAndroidInjector) : Objective(injector, "maxbasal", object : Task(this, R.string.objectives_maxbasal_gate) { override fun isCompleted(): Boolean { val profile = profileFunction.getProfile() ?: return false - val maxBasalSet = (activePlugin.activeAPS as PluginConstraints).applyBasalConstraints(ConstraintObject(Double.MAX_VALUE, aapsLogger), profile) + val maxBasalSet = sp.getDouble(app.aaps.core.utils.R.string.key_openapsma_max_basal, 0.0) val maxDailyBasal = profile.getMaxDailyBasal() - return maxBasalSet.value() > 2.8 * maxDailyBasal + return maxBasalSet > 2.8 * maxDailyBasal } }.learned(Learned(R.string.objectives_maxbasal_learned)) ) diff --git a/plugins/constraints/src/test/kotlin/app/aaps/plugins/constraints/ConstraintsCheckerImplTest.kt b/plugins/constraints/src/test/kotlin/app/aaps/plugins/constraints/ConstraintsCheckerImplTest.kt index 9d9ce076bc..932a6d89c0 100644 --- a/plugins/constraints/src/test/kotlin/app/aaps/plugins/constraints/ConstraintsCheckerImplTest.kt +++ b/plugins/constraints/src/test/kotlin/app/aaps/plugins/constraints/ConstraintsCheckerImplTest.kt @@ -316,7 +316,7 @@ class ConstraintsCheckerImplTest : TestBaseWithProfile() { // insightPlugin.setStatusResult(result); // No limit by default - `when`(sp.getDouble(app.aaps.plugins.aps.R.string.key_openapsma_max_basal, 1.0)).thenReturn(1.0) + `when`(sp.getDouble(app.aaps.core.utils.R.string.key_openapsma_max_basal, 1.0)).thenReturn(1.0) `when`(sp.getDouble(app.aaps.plugins.aps.R.string.key_openapsama_current_basal_safety_multiplier, 4.0)).thenReturn(4.0) `when`(sp.getDouble(app.aaps.plugins.aps.R.string.key_openapsama_max_daily_safety_multiplier, 3.0)).thenReturn(3.0) `when`(sp.getString(app.aaps.core.utils.R.string.key_age, "")).thenReturn("child") @@ -343,7 +343,7 @@ class ConstraintsCheckerImplTest : TestBaseWithProfile() { // insightPlugin.setStatusResult(result); // No limit by default - `when`(sp.getDouble(app.aaps.plugins.aps.R.string.key_openapsma_max_basal, 1.0)).thenReturn(1.0) + `when`(sp.getDouble(app.aaps.core.utils.R.string.key_openapsma_max_basal, 1.0)).thenReturn(1.0) `when`(sp.getDouble(app.aaps.plugins.aps.R.string.key_openapsama_current_basal_safety_multiplier, 4.0)).thenReturn(4.0) `when`(sp.getDouble(app.aaps.plugins.aps.R.string.key_openapsama_max_daily_safety_multiplier, 3.0)).thenReturn(3.0) `when`(sp.getString(app.aaps.core.utils.R.string.key_age, "")).thenReturn("child") diff --git a/plugins/constraints/src/test/kotlin/app/aaps/plugins/constraints/safety/SafetyPluginTest.kt b/plugins/constraints/src/test/kotlin/app/aaps/plugins/constraints/safety/SafetyPluginTest.kt index d990ba7893..3a78c2115d 100644 --- a/plugins/constraints/src/test/kotlin/app/aaps/plugins/constraints/safety/SafetyPluginTest.kt +++ b/plugins/constraints/src/test/kotlin/app/aaps/plugins/constraints/safety/SafetyPluginTest.kt @@ -138,7 +138,7 @@ class SafetyPluginTest : TestBaseWithProfile() { @Test fun basalRateShouldBeLimited() { - `when`(sp.getDouble(app.aaps.plugins.aps.R.string.key_openapsma_max_basal, 1.0)).thenReturn(1.0) + `when`(sp.getDouble(app.aaps.core.utils.R.string.key_openapsma_max_basal, 1.0)).thenReturn(1.0) `when`(sp.getDouble(app.aaps.plugins.aps.R.string.key_openapsama_current_basal_safety_multiplier, 4.0)).thenReturn(4.0) `when`(sp.getDouble(app.aaps.plugins.aps.R.string.key_openapsama_max_daily_safety_multiplier, 3.0)).thenReturn(3.0) `when`(sp.getString(app.aaps.core.utils.R.string.key_age, "")).thenReturn("child") @@ -167,7 +167,7 @@ class SafetyPluginTest : TestBaseWithProfile() { @Test fun percentBasalRateShouldBeLimited() { // No limit by default - `when`(sp.getDouble(app.aaps.plugins.aps.R.string.key_openapsma_max_basal, 1.0)).thenReturn(1.0) + `when`(sp.getDouble(app.aaps.core.utils.R.string.key_openapsma_max_basal, 1.0)).thenReturn(1.0) `when`(sp.getDouble(app.aaps.plugins.aps.R.string.key_openapsama_current_basal_safety_multiplier, 4.0)).thenReturn(4.0) `when`(sp.getDouble(app.aaps.plugins.aps.R.string.key_openapsama_max_daily_safety_multiplier, 3.0)).thenReturn(3.0) `when`(sp.getString(app.aaps.core.utils.R.string.key_age, "")).thenReturn("child") @@ -190,7 +190,7 @@ Safety: Limiting max basal rate to 500.00 U/h because of pump limit @Test fun percentBasalShouldBeLimitedBySMB() { // No limit by default - `when`(sp.getDouble(app.aaps.plugins.aps.R.string.key_openapsma_max_basal, 1.0)).thenReturn(1.0) + `when`(sp.getDouble(app.aaps.core.utils.R.string.key_openapsma_max_basal, 1.0)).thenReturn(1.0) `when`(sp.getDouble(app.aaps.plugins.aps.R.string.key_openapsama_current_basal_safety_multiplier, 4.0)).thenReturn(4.0) `when`(sp.getDouble(app.aaps.plugins.aps.R.string.key_openapsama_max_daily_safety_multiplier, 3.0)).thenReturn(3.0) `when`(sp.getString(app.aaps.core.utils.R.string.key_age, "")).thenReturn("child") From e363ac2c6a0706984ce4f8a9e05913bd6479e9d7 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Wed, 25 Oct 2023 10:07:14 +0200 Subject: [PATCH 07/60] fix showing EB tab in treatments --- .../app/aaps/core/interfaces/pump/defs/PumpDescription.kt | 2 +- .../main/kotlin/app/aaps/ui/activities/TreatmentsActivity.kt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/pump/defs/PumpDescription.kt b/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/pump/defs/PumpDescription.kt index 6d65db1233..9f5a406abc 100644 --- a/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/pump/defs/PumpDescription.kt +++ b/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/pump/defs/PumpDescription.kt @@ -9,7 +9,7 @@ class PumpDescription() { var pumpType = PumpType.GENERIC_AAPS var isBolusCapable = false var bolusStep = 0.0 - var isExtendedBolusCapable = false + var isExtendedBolusCapable = true var extendedBolusStep = 0.0 var extendedBolusDurationStep = 0.0 var extendedBolusMaxDuration = 0.0 diff --git a/ui/src/main/kotlin/app/aaps/ui/activities/TreatmentsActivity.kt b/ui/src/main/kotlin/app/aaps/ui/activities/TreatmentsActivity.kt index 9bb17b428e..da0a568cec 100644 --- a/ui/src/main/kotlin/app/aaps/ui/activities/TreatmentsActivity.kt +++ b/ui/src/main/kotlin/app/aaps/ui/activities/TreatmentsActivity.kt @@ -34,8 +34,8 @@ class TreatmentsActivity : TranslatedDaggerAppCompatActivity() { setContentView(binding.root) // Use index, TabItems crashes with an id - val useFakeTempBasal = activePlugin.activePump.isFakingTempsByExtendedBoluses - binding.treatmentsTabs.getTabAt(1)?.view?.visibility = useFakeTempBasal.not().toVisibility() + val showEbTab = !activePlugin.activePump.isFakingTempsByExtendedBoluses && activePlugin.activePump.pumpDescription.isExtendedBolusCapable + binding.treatmentsTabs.getTabAt(1)?.view?.visibility = showEbTab.toVisibility() setFragment(TreatmentsBolusCarbsFragment()) setSupportActionBar(binding.toolbar) From c351671b9692112f0a07850df5a8c94f54e4f1d7 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Thu, 26 Oct 2023 16:47:12 +0200 Subject: [PATCH 08/60] New Crowdin updates (#2972) * New translations strings.xml (French) * New translations strings.xml (Romanian) * New translations strings.xml (Romanian) * New translations strings.xml (Slovak) * New translations strings.xml (Turkish) * New translations strings.xml (Slovak) * New translations strings.xml (Turkish) * New translations strings.xml (Slovak) * New translations strings.xml (Slovak) * New translations strings.xml (Turkish) * Update source file strings.xml * New translations strings.xml (Italian) * New translations strings.xml (Italian) * New translations strings.xml (Italian) * New translations strings.xml (Italian) * New translations strings.xml (Russian) * New translations strings.xml (Russian) * New translations strings.xml (Russian) * New translations strings.xml (Russian) * New translations strings.xml (Russian) * New translations strings.xml (Italian) * New translations strings.xml (Italian) * New translations strings.xml (Italian) * New translations strings.xml (Italian) * New translations strings.xml (Italian) * New translations strings.xml (Italian) * New translations strings.xml (Italian) * New translations strings.xml (Italian) * New translations strings.xml (Italian) * New translations strings.xml (Italian) --- .../src/main/res/values-ru-rRU/strings.xml | 1 + .../src/main/res/values-sk-rSK/strings.xml | 1 + .../src/main/res/values-tr-rTR/strings.xml | 1 + core/ui/src/main/res/values-ro-rRO/strings.xml | 5 +++++ core/ui/src/main/res/values-ru-rRU/strings.xml | 5 +++++ core/ui/src/main/res/values-sk-rSK/strings.xml | 5 +++++ core/ui/src/main/res/values-tr-rTR/strings.xml | 5 +++++ .../aps/src/main/res/values-it-rIT/strings.xml | 18 +++++++++--------- .../src/main/res/values-it-rIT/strings.xml | 2 +- .../src/main/res/values-it-rIT/strings.xml | 2 +- .../src/main/res/values-fr-rFR/strings.xml | 2 +- .../src/main/res/values-ru-rRU/strings.xml | 5 +++++ .../src/main/res/values-sk-rSK/strings.xml | 3 +++ .../src/main/res/values-it-rIT/strings.xml | 12 ++++++------ .../src/main/res/values-it-rIT/strings.xml | 6 +++--- .../src/main/res/values-it-rIT/strings.xml | 8 ++++---- .../src/main/res/values-it-rIT/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-tr-rTR/strings.xml | 2 ++ .../src/main/res/values-it-rIT/strings.xml | 12 ++++++------ .../src/main/res/values-it-rIT/strings.xml | 10 +++++----- .../src/main/res/values-it-rIT/strings.xml | 16 ++++++++-------- .../src/main/res/values-it-rIT/strings.xml | 2 +- ui/src/main/res/values-it-rIT/strings.xml | 2 +- 26 files changed, 86 insertions(+), 47 deletions(-) diff --git a/core/interfaces/src/main/res/values-ru-rRU/strings.xml b/core/interfaces/src/main/res/values-ru-rRU/strings.xml index 3342913df5..b4018beb48 100644 --- a/core/interfaces/src/main/res/values-ru-rRU/strings.xml +++ b/core/interfaces/src/main/res/values-ru-rRU/strings.xml @@ -58,6 +58,7 @@ Отображать стрелку тренда Отображать историю Показывать номер недели + Показать дату Циферблат по умолчанию, вы можете нажать на EXPORT WATCHFACE чтобы создать шаблон Циферблат по умолчанию Фоновое изображение diff --git a/core/interfaces/src/main/res/values-sk-rSK/strings.xml b/core/interfaces/src/main/res/values-sk-rSK/strings.xml index 02d512c361..c73ce91829 100644 --- a/core/interfaces/src/main/res/values-sk-rSK/strings.xml +++ b/core/interfaces/src/main/res/values-sk-rSK/strings.xml @@ -58,6 +58,7 @@ Zobraziť trendovú šípku Zobraziť aktualizované pred Zobraziť číslo týždňa + Zobraziť dátum Predvolený ciferník. Môžete kliknúť na tlačítko EXPORTOVAŤ CIFERNÍK pre vygenerovanie šablóny Predvolený ciferník Obrázok pozadia diff --git a/core/interfaces/src/main/res/values-tr-rTR/strings.xml b/core/interfaces/src/main/res/values-tr-rTR/strings.xml index 4ccc935828..367125e688 100644 --- a/core/interfaces/src/main/res/values-tr-rTR/strings.xml +++ b/core/interfaces/src/main/res/values-tr-rTR/strings.xml @@ -58,6 +58,7 @@ Ok yönünü Göster Önce Göster Hafta sayısını göster + Tarihi Göster Varsayılan saat arayüzü; bir şablon oluşturmak için SAAT ARAYÜZÜNÜ DIŞA AKTAR butonuna tıklayabilirsiniz Varsayılan saat arayüzü Arka plan görüntüsü diff --git a/core/ui/src/main/res/values-ro-rRO/strings.xml b/core/ui/src/main/res/values-ro-rRO/strings.xml index 8c524b93eb..535e8b9df8 100644 --- a/core/ui/src/main/res/values-ro-rRO/strings.xml +++ b/core/ui/src/main/res/values-ro-rRO/strings.xml @@ -51,6 +51,7 @@ Bolus extins Suspendat Total TDD + Date vechi Se vor livra %1$.2fU Se așteaptă pompa AAPS pornit @@ -167,6 +168,8 @@ Trimitere status către NS sau Tidepool Buclă dezactivată/suspendată Insulină activă (IOB) + ȚINTE: + REZULTATUL OAPS: Parola greșită PIN greșit @@ -462,6 +465,8 @@ Bolusul va fi doar consemnat (nu va fi livrat de pompă) Rulează alarma când este timpul să mănânci Nicio acțiune selectată, nu se va întâmpla nimic + Carbohidrați = 0. Nicio acțiune efectuată! + Nu este necesară insulină! Nicio glicemie recentă pe care să se bazeze calculul! Niciun profil activ stabilit! COB necunoscut! Lipsesc datele de glicemie sau aplicația a fost repornită de curând? diff --git a/core/ui/src/main/res/values-ru-rRU/strings.xml b/core/ui/src/main/res/values-ru-rRU/strings.xml index b19518a94d..c14db0d712 100644 --- a/core/ui/src/main/res/values-ru-rRU/strings.xml +++ b/core/ui/src/main/res/values-ru-rRU/strings.xml @@ -51,6 +51,7 @@ Пролонгированный болюс На паузе Суммарный суточный инсулин TDD + Старые данные Будет подано %1$.2f ед инс Ожидание помпы AAPS запущен @@ -167,6 +168,8 @@ Передавать статус помпы в NS или Tidepool Отключенный/приостановленный цикл Активный инсулин (IOB) + ЦЕЛИ: + РЕЗУЛЬТАТ: OAPS: Неверный пароль Неверный PIN-код @@ -462,6 +465,8 @@ Болюс будет только записан (без подачи помпой) Напомнить о еде Действие не выбрано, ничего не произойдет + Carbs = 0. Никаких мер не принято! + Инсулин не требуется! Нет данных ГК для основы расчета! Активный профиль не установлен! Неизвестный COB! Отсутствуют данные ГК или приложения недавно перезапущено? diff --git a/core/ui/src/main/res/values-sk-rSK/strings.xml b/core/ui/src/main/res/values-sk-rSK/strings.xml index fcc6f72401..e88ce6480f 100644 --- a/core/ui/src/main/res/values-sk-rSK/strings.xml +++ b/core/ui/src/main/res/values-sk-rSK/strings.xml @@ -51,6 +51,7 @@ Predĺžený bolus Pozastavené CDD celkom + Staré dáta Podávanie %1$.2f J inzulínu Čakám na pumpu AAPS spustený @@ -167,6 +168,8 @@ Nahrávať stav pumpy do NS, alebo Tidepoolu Deaktivovaný/pozastavený uzavretý okruh Aktívny inzulín (IOB) + CIELE: + VÝSLEDOK OAPS: Nesprávne heslo Nesprávny PIN @@ -462,6 +465,8 @@ Bolus bude iba zaznamenaný (nie pumpou vydaný) Spustiť výstrahu, keď je čas na jedlo Žiadna akcia nevybraná, nič sa neudeje + Sacharidy = 0. Žiadna akcia! + Nie je požadovaný žiadny inzulín! Žiadna aktuálna glykémia k základnému výpočtu! Nie je nastavený žiadny aktívny profil! Neznáme COB! Chýbajú glykémie, alebo bola práve reštartovaná aplikácia? diff --git a/core/ui/src/main/res/values-tr-rTR/strings.xml b/core/ui/src/main/res/values-tr-rTR/strings.xml index 0a42490957..4ba91babaa 100644 --- a/core/ui/src/main/res/values-tr-rTR/strings.xml +++ b/core/ui/src/main/res/values-tr-rTR/strings.xml @@ -51,6 +51,7 @@ Yayma Bolus Duraklatıldı GTD Toplam + Eski veri %1$.2f Ü gönderilecek Pompa bekleniyor AAPS başladı @@ -167,6 +168,8 @@ Pompa durumunu NS veya Tidepool\'a yükleyin Döngüyü Devre Dışı bırakma/Askıya alma Aktif İnsülin (AİNS) + HEDEFLER: + OAPS SONUCU: Hatalı parola Yanlış PIN @@ -462,6 +465,8 @@ Bolus yalnızca kaydedilecektir (pompa ile iletilmez) Yemek zamanı alarmı çalıştır Seçili eylem yok, hiçbir şey olmayacak + Karb = 0. Hiçbir şey yapılmadı! + İnsülin gerekmiyor! Hesaplamayı temel alacak yeni bir KŞ yok! Etkin profil ayarlanmadı! Aktif karbonhidrat (AKRB) bilinmiyor! KŞ okuması eksik veya son uygulama yeniden başlatılsın mı? diff --git a/plugins/aps/src/main/res/values-it-rIT/strings.xml b/plugins/aps/src/main/res/values-it-rIT/strings.xml index 69489f338c..15a659e294 100644 --- a/plugins/aps/src/main/res/values-it-rIT/strings.xml +++ b/plugins/aps/src/main/res/values-it-rIT/strings.xml @@ -3,17 +3,17 @@ Regola sensibilità e BG Fattore di regolazione per ISF Dinamico (%) Fattore di regolazione per ISF Dinamico. Imposta più del 100% per dosi di correzione più aggressive e meno del 100% per correzioni meno aggressive. - Temp-Target \"alto\" aumenta la sensibilità - = 100]]> - Temp-Target \"basso\" riduce la sensibilità - + Target temporaneo \"alto\" aumenta la sensibilità + = 100]]> + Target temporaneo \"basso\" riduce la sensibilità + OpenAPS SMB ISF Dinamico Frequenza erogazione SMB (min) La resistenza abbassa il target Quando viene rilevata resistenza, ridurre la glicemia target La sensibilità aumenta il target - Quando viene rilevata sensibilità, aumentare la glicemia target + Quando viene rilevata sensibilità, aumenta la glicemia target Il plugin è disabilitato Dati glicemia non disponibili Nessun dato autosens disponibile @@ -46,7 +46,7 @@ [Valore predefinito: vero]\nViene usato per consentire ad autosens di regolare i target glicemici, in aggiunta a ISF e basali. Autosens regola anche i target [Valore predefinito: 3.0 (AMA) o 8.0 (SMB)]. Questa è un\'impostazione per l\'impatto di assorbimento predefinito dei carboidrati in 5 minuti. L\'impostazione predefinita è una previsione di 3mg/dl/5min. Ha effetto sulla velocità di decadimento dei COB (carboidrati attivi) e su quanto il loro assorbimento incide nella previsione dell’andamento glicemico, quando la glicemia sta scendendo più del previsto o non sta salendo quanto previsto. - [Valore predefinito: 3] Questo è un parametro di sicurezza chiave in OpenAPS. Ciò che fa è limitare le tue basali a essere 3 volte, al più, la tua velocità basale massima. Probabilmente non avrai bisogno di cambiare questo valore, ma dovresti essere consapevole di cosa significa il gruppo di parametri \"3x max giornaliera; 4x corrente\" e per quali motivi di sicurezza siano stati impostati tali valori. + [Valore predefinito: 3] Questo è un parametro di sicurezza chiave in OpenAPS. Ciò che fa è limitare la tua basale ad un valore pari alla tua velocità basale massima moltiplicata per 3. Probabilmente non avrai bisogno di cambiare questo valore ma dovresti essere consapevole di cosa significa il gruppo di parametri \"3x max giornaliera; 4x corrente\" e per quali motivi di sicurezza siano stati impostati tali valori. [Valore predefinito: 4] Questo è un ulteriore parametro di sicurezza chiave in OpenAPS. La tua basale temporanea, indipendentemente dalla basale massima impostata sul micro, non può mai essere più alta di questo valore moltiplicato per la tua basale corrente in ogni specifico momento. Questo serve a impedire alle persone di addentrarsi in \"territori pericolosi\" impostando basali massime eccessivamente alte prima di aver capito come funziona l\'algoritmo. Ancora una volta, il valore predefinito è 4x; la maggior parte delle persone non avrà bisogno di modificare questo valore e avrà, invece, maggiori probabilità di dover regolare altre impostazioni se ha la sensazione di \"scontrarsi\" con questo limite di sicurezza. [Valore predefinito: 2]\nBolus snooze è attivato dopo un bolo pasto per fare in modo che il loop non imposti basali temporanee basse quando hai appena mangiato. AndroidAPS non imposterà velocità basali troppo basse nel periodo corrispondente a DIA diviso il parametro bolus snooze - divisore DIA. Con DIA di 3 ore \"bolus snooze\" durerà 1.5 ore (3/2). Attenzione!\nNormalmente non dovresti modificare questi valori. FAI CLICK QUI e leggi il testo e assicurati di AVERLO CAPITO prima di cambiare uno di questi valori. @@ -55,10 +55,10 @@ Moltiplicatore di sicurezza max basale giornaliera Moltiplicatore di sicurezza basale corrente Max IOB totale a cui limitare OpenAPS [U] - Questo valore è chiamato Max IOB nel contesto OpenAPS\nOpenAPS non aggiungerà ulteriore insulina se IOB corrente è maggiore di questo valore + Questo valore è chiamato Max IOB nel contesto OpenAPS\nOpenAPS non aggiungerà ulteriore insulina se l\'IOB corrente è maggiore di questo valore Abilita UAM Abilita SMB - Usa super-micro-boli al posto della basale temporanea per un\'azione più veloce + Usa super-micro-boli (SMB) al posto della basale temporanea per un\'azione più veloce Rilevamento dei pasti non annunciati Abilita SMB sempre Abilita SMB sempre, indipendentemente dai boli. Possibile solo con sorgente glicemia con un buon filtraggio dei dati, come G5 @@ -75,7 +75,7 @@ Max minuti di basale a cui limitare SMB per UAM CHO minimi richiesti per il suggerimento Quantità minima di carboidrati (in grammi) necessaria per visualizzare un avviso di suggerimento CHO. Al di sotto di questo numero non verrà attivata alcuna notifica. - Glicemia sotto la quale l\'erogazione d\'insulina è sospesa. Il valore predefinito utilizza il modello target standard. L\'utente può impostare un valore compreso tra 60 mg/dl (3.3mmol/l) e 100mg/dl (5.5mmol/l). Con valori inferiori a 65/3.6 viene usato il modello predefinito + Glicemia sotto la quale l\'erogazione d\'insulina è sospesa. Il valore predefinito utilizza il modello target standard. L\'utente può impostare un valore compreso tra 60 mg/dl (3.3mmol/l) e 100mg/dl (5.5mmol/l). Con valori inferiori a 65 mg/dl (3.6mmol/l) viene usato il modello predefinito Glicemia sotto la quale si attiva la sospensione per glicemia bassa Aumento del valore max basale perché l\'impostazione è inferiore alla tua basale massima nel profilo moltiplicatore max basale diff --git a/plugins/automation/src/main/res/values-it-rIT/strings.xml b/plugins/automation/src/main/res/values-it-rIT/strings.xml index 5675c0f163..7de4d8d4b4 100644 --- a/plugins/automation/src/main/res/values-it-rIT/strings.xml +++ b/plugins/automation/src/main/res/values-it-rIT/strings.xml @@ -37,7 +37,7 @@ Glicemia non disponibile Glicemia %1$s %2$.0f %3$s Glicemia %1$s %2$.1f %3$s - Il target temporaneo non esiste + Il target temporaneo non è impostato Temp-Target %1$s %2$.0f %3$s Temp-Target %1$s %2$.1f %3$s PCT profilo %1$s %2$d diff --git a/plugins/main/src/main/res/values-it-rIT/strings.xml b/plugins/main/src/main/res/values-it-rIT/strings.xml index 7fb506c704..8b01693506 100644 --- a/plugins/main/src/main/res/values-it-rIT/strings.xml +++ b/plugins/main/src/main/res/values-it-rIT/strings.xml @@ -14,7 +14,7 @@ Resetta autenticatori Resetta chiave autenticatore Sei sicuro di resettare la chiave autenticatore? Renderà non validi tutti gli autenticatori attualmente configurati e sarà necessario configurarli nuovamente. - La nuova chiave autenticatore è stata generata! Usa il QRCode aggiornato per fornire gli autenticatori. + La nuova chiave autenticatore è stata generata! Fornisci il QRCode aggiornato agli autenticatori. Esportazione OTP secret Sei sicuro di voler copiare l\'OTP secret negli appunti?\n\nPotresti averne bisogno solo se la tua app autenticatore ha problemi con la scansione del QRCode, vuoi inserirlo manualmente o vuoi configurare un token OTP hardware usando un\'app dedicata. OTP secret (in formato Base32) esportato e copiato negli appunti. Incollalo nell\'autenticatore o nel configuratore hardware di OTP! diff --git a/plugins/sync/src/main/res/values-fr-rFR/strings.xml b/plugins/sync/src/main/res/values-fr-rFR/strings.xml index c3ef782ac8..2af445a728 100644 --- a/plugins/sync/src/main/res/values-fr-rFR/strings.xml +++ b/plugins/sync/src/main/res/values-fr-rFR/strings.xml @@ -116,7 +116,7 @@ Envoyer les glycémies et les traitements à xDrip+. La source de données \"xDrip+ Sync Follower\" doit être sélectionnée et l\'acceptation des données doit être activée dans Paramètres - Paramètres Inter-app - Accepter Glycémies/Traitements Activer les diffusions vers xDrip+. - Diffusue de données + Diffuseur de données DD Diffuser des données sur l\'application G-Watch Wear de Garmin diff --git a/plugins/sync/src/main/res/values-ru-rRU/strings.xml b/plugins/sync/src/main/res/values-ru-rRU/strings.xml index 582e622c54..af4483a28a 100644 --- a/plugins/sync/src/main/res/values-ru-rRU/strings.xml +++ b/plugins/sync/src/main/res/values-ru-rRU/strings.xml @@ -116,7 +116,12 @@ Отправлять данные о глюкозе и терапии на xDrip+. Источником данных должен быть выбран \"xDrip+ Sync Follower\" а в настройках между приложениями надо включить - Принимать глюкозу/терапию Включить трансляции для xDrip+. + DBRO + Передавать данные приложению Garmin\'s G-Watch Wear + Garmin + Подключение к устройству Garmin (Fenix, Edge, …) + Настройки Garmin WEAR Мониторить и контролировать AAPS при помощи часов WearOS. diff --git a/plugins/sync/src/main/res/values-sk-rSK/strings.xml b/plugins/sync/src/main/res/values-sk-rSK/strings.xml index dc9edf52bf..b4a49e688e 100644 --- a/plugins/sync/src/main/res/values-sk-rSK/strings.xml +++ b/plugins/sync/src/main/res/values-sk-rSK/strings.xml @@ -116,11 +116,14 @@ Poslať dáta o glykémii a ošetrení do xDrip+. Musí byť vybraný zdroj dát \"xDrip+ Sync Follower\" a prijímanie dát musí byť povolené v Nastavenia - Nastavenie komunikácie medzi aplikáciami - Prijímať Glykémie/Ošetrenia Povoliť odosielanie do xDrip+. + DBRO + Odosielanie dát do Garmin aplikácie G-Watch Wear Garmin Pripájanie k zariadeniu Garmin (Fénix, Edge, ...) Garmin nastavenia + WEAR Zobrazovanie stavu a riadenie AndroidAPS z hodiniek s WearOS. (Žiadne hodinky nie sú pripojené) Stav pumpy diff --git a/pump/combo/src/main/res/values-it-rIT/strings.xml b/pump/combo/src/main/res/values-it-rIT/strings.xml index 551f31df84..39e5f41ae0 100644 --- a/pump/combo/src/main/res/values-it-rIT/strings.xml +++ b/pump/combo/src/main/res/values-it-rIT/strings.xml @@ -29,14 +29,14 @@ Necessario aggiornare orologio micro Avviso TBR CANCELLATO: confermato Il micro potrebbe non essere raggiungibile. Nessun bolo erogato - Erogazione bolo fallita. Sembra che nessun bolo sia stato erogato. Per sicurezza, controlla il micro per evitare un doppio bolo e se è tutto ok, erogalo di nuovo. Come protezione da eventuali \"bug\", i boli non vengono ripetuti automaticamente. + Erogazione bolo fallita. Sembra che nessun bolo sia stato erogato. Per sicurezza controlla il micro per evitare un doppio bolo e se è tutto ok, erogalo di nuovo. Come protezione da eventuali \"bug\", i boli non vengono ripetuti automaticamente. Solo la quantità di %1$.2f U del bolo richiesto di %2$.2f U è stata erogata a causa di un errore. Controlla il micro per verificare quanto accaduto e intraprendi le azioni necessarie. Erogazione del bolo e verifica dello storico del micro fallite. Controlla il micro. Se è stato erogato un bolo, sarà aggiunto ai trattamenti durante la successiva connessione al micro. Insulina nel serbatoio insufficiente per erogare il bolo Configurazione micro non valida, controlla la documentazione e verifica che il menu Quick Info sia denominato QUICK INFO usando \"360 configuration software\". Lettura profilo basale Lo storico del micro è cambiato dopo il calcolo del bolo. Il bolo non è stato erogato. Ricalcolare se un bolo è ancora necessario. - Bolo erogato con successo, ma non è possibile aggiungere la voce ai trattamenti. Questo può accadere se due piccoli boli della stessa quantità sono stati somministrati negli ultimi due minuti. Controlla lo storico del micro e le voci della sezione Trattamenti e usa la sezione Portale per aggiungere eventuali voci mancanti. Assicurati di non aggiungere voci che si riferiscano al medesimo minuto e alla stessa quantità. + Bolo erogato con successo ma non è stato possibile aggiungere la voce ai trattamenti. Questo può accadere se due piccoli boli della stessa quantità sono stati somministrati negli ultimi due minuti. Controlla lo storico del micro e le voci della sezione Trattamenti e usa la sezione Portale per aggiungere eventuali voci mancanti. Assicurati di non aggiungere voci che si riferiscano al medesimo minuto e alla stessa quantità. Rifiuto basale temporanea \"alta\" in quanto il calcolo non ha considerato i cambiamenti recenti allo storico del micro Aggiornamento stato micro La velocità basale sul micro è cambiata e verrà aggiornata a breve @@ -44,14 +44,14 @@ Controllo modifiche allo storico Sono appena stati importati più boli con la stessa quantità nello stesso minuto. Solo un record può essere aggiunto ai trattamenti. Controlla il micro e aggiungi manualmente un record di bolo usando la sezione Portale. Assicurati di creare un bolo con un\'ora non usata da nessun altro bolo. L\'ultimo bolo è più vecchio di 24 ore o ha una data nel futuro. Controlla che la data sul micro sia impostata correttamente. - L\'ora/la data del bolo erogato sul micro sembra errata, IOB probabilmente non è corretto. Controlla l\'ora e/o la data del micro. + L\'ora e/o la data del bolo erogato sul micro sembra errata, IOB probabilmente non è corretto. Controlla l\'ora e/o la data del micro. Conteggio bolo Conteggio TBR Bolo stoppato Stop del bolo in corso - Conta degli errori comunicazione - Mostra conta degli errori di comunicazione - Mostra la conta degli errori quando si comunica con Ruffy. Nella maggior parte dei casi, un numero più alto di 0 denota problemi di comunicazione con Ruffy (potrebbe essere necessario riavviare). + Conteggio degli errori comunicazione + Mostra conteggio degli errori di comunicazione + Mostra il conteggio degli errori quando si comunica con Ruffy. Nella maggior parte dei casi un numero più alto di 0 denota problemi di comunicazione con esso (potrebbe essere necessario riavviare). Mai In caso di errore Sempre diff --git a/pump/diaconn/src/main/res/values-it-rIT/strings.xml b/pump/diaconn/src/main/res/values-it-rIT/strings.xml index 7ba7fb80a7..61a3b08ca5 100644 --- a/pump/diaconn/src/main/res/values-it-rIT/strings.xml +++ b/pump/diaconn/src/main/res/values-it-rIT/strings.xml @@ -130,8 +130,8 @@ OK Pasto: OK Ricerca non possibile a causa di un errore CRC del pacchetto. - Impostazione non possibile - errore di un parametro di input. - Impostazione non possibile - errore di specifica del protocollo. + Impostazione non possibile per errore di un parametro di input. + Impostazione non possibile per errore di specifica del protocollo. Pasti programmati, erogazione non possibile ora. Cancellato dal micro Altre azioni in corso, limitazione impostazioni app. @@ -148,7 +148,7 @@ Aggiungi evento \"cambio catetere\" alle note quando rilevato nello storico Avvio basale temporanea Durante l\'esecuzione di LGS, l’erogazione è limitata - Stato LGS già su ON. Comando di attivazione rifiutato. + Stato LGS già su ON, comando di attivazione rifiutato. Stato LGS già su OFF. Comando di disattivazione rifiutato. L\'avvio della basale temporanea viene rifiutato quando è già in esecuzione una basale temporanea Lo stop della basale temporanea viene rifiutato quando non è in esecuzione alcuna basale temporanea diff --git a/pump/eopatch/src/main/res/values-it-rIT/strings.xml b/pump/eopatch/src/main/res/values-it-rIT/strings.xml index 599168eeec..339e9beb79 100644 --- a/pump/eopatch/src/main/res/values-it-rIT/strings.xml +++ b/pump/eopatch/src/main/res/values-it-rIT/strings.xml @@ -44,7 +44,7 @@ Per la disattivazione unilaterale, tocca \'Scarta\'. Disattivazione manuale allarme patch Se disattivato unilateralmente durante un errore di comunicazione, il BIP di allarme dalla patch potrebbe non arrestarsi. - In questo caso, puoi fermarlo completamente colpendo la porta di rilascio manuale dell\'allarme sulla patch come di seguito: + In questo caso, puoi fermarlo completamente tramite lo switch manuale dell\'allarme sulla patch come di seguito: 1. Rimuovi la patch dal corpo e stacca il nastro adesivo. 2. Usa una clip, colpisci con forza il foro accanto alla porta di riempimento dell\'insulina. Riempimento insulina @@ -87,7 +87,7 @@ Avvicinare il dispositivo alla patch. Spostati in un altro posto e riprova. Errore comunicazione - Riuscita comunicazione + Comunicazione riuscita Connesso con la patch Annulla associazione giorni @@ -113,8 +113,8 @@ Elaborazione Riprova [Caution] NON rimuovere la protezione dell\'ago e il supporto adesivo sino a ulteriori istruzioni. - Sei sicuro di scartare la patch corrent? - A causa di informazioni non confermate riguardo il bolo, il calcolo del bolo non può essere usato fino a %s.\n\nSei sicuro di voler scartare la patch corrente? + Sei sicuro di voler scartare la patch corrente? + A causa di informazioni non confermate riguardo il bolo, il calcolatore del bolo non può essere usato fino a %s.\n\nSei sicuro di voler scartare la patch corrente? Errore inserimento ago. Controlla che la direzione del foro rimanente dopo aver girato la leva sia dritta, quindi tocca \'Riprova\'. Tocca \'Scarta\' per disattivare la patch. diff --git a/pump/medtronic/src/main/res/values-it-rIT/strings.xml b/pump/medtronic/src/main/res/values-it-rIT/strings.xml index b5683acd96..c72f0d3962 100644 --- a/pump/medtronic/src/main/res/values-it-rIT/strings.xml +++ b/pump/medtronic/src/main/res/values-it-rIT/strings.xml @@ -52,7 +52,7 @@ Storico micro Medtronic - Hai cancellato il bolo, dopo che era già stato impostato sul micro. Dal momento che il micro Medtronic non supporta la cancellazione, avrai bisogno di cancellare il bolo manualmente. Metti il micro in modalità sospensione e poi fallo ripartire (se vuoi ancora cancellare il bolo). L\'applicazione rileverà le modifiche al prossimo aggiornamento (in meno di 5 minuti). + Hai cancellato il bolo dopo che era già stato impostato sul micro. Dal momento che il micro Medtronic non supporta la cancellazione, avrai bisogno di cancellare il bolo manualmente. Metti il micro in modalità sospensione e poi fallo ripartire (se vuoi ancora cancellare il bolo). L\'applicazione rileverà le modifiche al prossimo aggiornamento (in meno di 5 minuti). Impossibile leggere il TBR corrente. Impossibile cancellare il TBR corrente. Arresto dell\'operazione. Impostazione del profilo fallita. A causa dei seguenti modelli, hai una velocità basale troppo grande: %1$s diff --git a/pump/medtrum/src/main/res/values-ro-rRO/strings.xml b/pump/medtrum/src/main/res/values-ro-rRO/strings.xml index 01b5297304..1ea49a7620 100644 --- a/pump/medtrum/src/main/res/values-ro-rRO/strings.xml +++ b/pump/medtrum/src/main/res/values-ro-rRO/strings.xml @@ -112,6 +112,8 @@ Selectează setările preferate pentru alarma pompei. Notificare la avertizarea pompei Arată notificare cu privire la avertismentele non-critice ale pompei: baterie scăzută, rezervor redus (20 de unități) și expiră în curând. Se recomandă să lăsaţi activat când alarmele pompei sunt setate la silențios. + Atenționare expirare pompă [hours] + Arată notificarea la ora specificată după activare. Patch Expirare Când este activat, patchul va expira după 3 zile, cu o perioadă de graţie de 8 ore după expirare. Insulină maximă pe oră diff --git a/pump/medtrum/src/main/res/values-ru-rRU/strings.xml b/pump/medtrum/src/main/res/values-ru-rRU/strings.xml index c029351280..5a18717b55 100644 --- a/pump/medtrum/src/main/res/values-ru-rRU/strings.xml +++ b/pump/medtrum/src/main/res/values-ru-rRU/strings.xml @@ -112,6 +112,8 @@ Выберите предпочитаемые параметры оповещений помпы. Уведомление об оповещениях помпы Показывать уведомления о некритических оповещениях помпы: низком заряде батареи, низком запасе инсулина (20 единиц) и приближающемся истечении срока работы. Рекомендуется оставить включенным, когда звук оповещений выключен. + Предупреждение об окончании срока годности помпы [hours] + Показывать уведомление в указанный час после активации. Окончание срока действия патча Если включено, то патч закончит свое действие через 3 дня, с дополнительными 8 часами после этого. Максимальное количество инсулина в час diff --git a/pump/medtrum/src/main/res/values-sk-rSK/strings.xml b/pump/medtrum/src/main/res/values-sk-rSK/strings.xml index a03c3f0d9a..445e778cc3 100644 --- a/pump/medtrum/src/main/res/values-sk-rSK/strings.xml +++ b/pump/medtrum/src/main/res/values-sk-rSK/strings.xml @@ -112,6 +112,8 @@ Vyberte preferované nastavenie výstrah. Oznámenie o výstrahe pumpy Zobraziť upozornenie na nie kritické varovanie pumpy: vybitá batéria, takmer prázdny zásobník (20 jednotiek) a čoskoro dojde inzulín. Doporučené ponechať zapnuté, keď sú výstrahy pumpy nastavené na ticho. + Výstraha expirácie pumpy (hodiny) + Zobraziť notifikáciu v určenej hodine po aktivácii. Expirácia Patch Pokiaľ je povolené, Patch expiruje po 3 dňoch s maximálnou dobou odkladu 8 hodín. Hodinové maximum inzulínu diff --git a/pump/medtrum/src/main/res/values-tr-rTR/strings.xml b/pump/medtrum/src/main/res/values-tr-rTR/strings.xml index 143f6dab14..1c6af42aad 100644 --- a/pump/medtrum/src/main/res/values-tr-rTR/strings.xml +++ b/pump/medtrum/src/main/res/values-tr-rTR/strings.xml @@ -112,6 +112,8 @@ Tercih ettiğiniz pompa alarm ayarlarını seçin. Pompa uyarısı hakkında bildirim Kritik olmayan pompa uyarılarıyla ilgili bildirimi göster: düşük pil, düşük rezervuar (20 birim) ve yakında süresi doluyor. Pompa alarmları sessize ayarlandığında etkin bırakılması önerilir. + Pompa sona erme süresi uyarısı [hours] + Etkinleştirmeden sonra belirtilen saatte bildirimi göster. Patch süre sonu Etkinleştirildiğinde, patch 3 gün sonra sona erecek ve bunun ardından 8 saatlik bir ek süre tanınacaktır. Saatlik Maksimum insülin diff --git a/pump/omnipod-common/src/main/res/values-it-rIT/strings.xml b/pump/omnipod-common/src/main/res/values-it-rIT/strings.xml index a636f224a4..6e4cd2fe9e 100644 --- a/pump/omnipod-common/src/main/res/values-it-rIT/strings.xml +++ b/pump/omnipod-common/src/main/res/values-it-rIT/strings.xml @@ -40,7 +40,7 @@ L\'ora nel pod è stata aggiornata. Tutta l\'erogazione di insulina è stata sospesa. Gli avvisi attivi sono stati silenziati. - L\'erogazione di insulina è ripresa. + L\'erogazione di insulina è stata ripristinata. Imposta ora Sospensione @@ -80,16 +80,16 @@ Inizializza pod Collega pod Prepara il sito di infusione. Rimuovi la protezione dell\'ago del pod e il supporto adesivo e collega il pod al sito di infusione.\n\nSe la cannula fuoriesce premi Annulla e scarta il pod.\n\nPremi Avanti per inserire la cannula e iniziare l\'erogazione della basale. - Quando premi OK, la cannula verrà inserita. Assicurati di aver collegato il pod al sito di infusione. + Quando premi OK la cannula verrà inserita. Assicurati di aver collegato il pod al sito di infusione. Inserisci cannula - Tentativo di impostare il piano basale iniziale e inserire la cannula.\n\nQuando la cannula è stata inserita con successo, puoi premere Avanti. + Tentativo di impostare il piano basale iniziale e inserire la cannula.\n\nQuando la cannula è stata inserita con successo puoi premere Avanti. Pod attivato - Il nuovo pod è ora attivo.\n\nIl tuo piano basale è stato programmato e la cannula è stata inserita.\n\nVerifica che la cannula sia stata inserita correttamente e sostituisci il tuo pod se avverti il contrario. + Il nuovo pod è ora attivo.\n\nIl tuo piano basale è stato programmato e la cannula è stata inserita.\n\nVerifica che la cannula sia stata inserita correttamente e sostituisci il tuo pod qualora non lo fosse. Disattiva pod Premi Avanti per disattivare il pod.\n\nNota: Questo sospenderà tutta l\'erogazione di insulina e disattiverà il pod. Disattivazione pod - Disattivazione del pod.\n\nQuando la disattivazione è correttamente completata, puoi premere Avanti. + Disattivazione del pod.\n\nQuando la disattivazione sarà correttamente completata, puoi premere Avanti. Pod disattivato Il tuo pod è stato disattivato.\n\nRimuovi il pod dal tuo corpo e gettalo. Pod scartato @@ -153,7 +153,7 @@ Fine promemoria associazione Fine promemoria configurazione Il pod scadrà presto - Il pod scadrà presto + Il pod scadrà a breve L\'arresto è imminente Livello serbatoio basso Avviso sconosciuto diff --git a/pump/omnipod-dash/src/main/res/values-it-rIT/strings.xml b/pump/omnipod-dash/src/main/res/values-it-rIT/strings.xml index 6987ca28d4..99f8e72197 100644 --- a/pump/omnipod-dash/src/main/res/values-it-rIT/strings.xml +++ b/pump/omnipod-dash/src/main/res/values-it-rIT/strings.xml @@ -1,7 +1,7 @@ - Integrazione del microinfusore Omnipod Dash (il nuovo modello, abilitato al Bluetooth e con la protezione ago di colore blu). + Integrazione del microinfusore Omnipod Dash (il nuovo modello, con il Bluetooth e con la protezione ago di colore blu). Storico pod @@ -25,9 +25,9 @@ Impossibile connettersi al pod Trovati troppi pod per l\'attivazione - Nessun pod disponibile per l\'attivazione + Nessun pod disponibile per l\'attivazione trovato Errore generico: %1$s - Impossibile inviare il comando + L\'invio del comando è fallito Comando non inviato Comando non ricevuto dal pod Stato sconosciuto per il comando @@ -35,9 +35,9 @@ %1$.2f U L\'erogazione di insulina è sospesa Totale erogato: %1$.2f U - Persa connessione al pod + Connessione col pod persa Altro bolo in erogazione - Non è rimasta abbastanza insulina nel serbatoio + Insulina nel serbatoio insufficiente Comando non confermato Richiesto da utente Impostazione profilo OK diff --git a/pump/omnipod-eros/src/main/res/values-it-rIT/strings.xml b/pump/omnipod-eros/src/main/res/values-it-rIT/strings.xml index d3dbf85b62..8befe30754 100644 --- a/pump/omnipod-eros/src/main/res/values-it-rIT/strings.xml +++ b/pump/omnipod-eros/src/main/res/values-it-rIT/strings.xml @@ -42,14 +42,14 @@ RileyLink interrotto Nessuna risposta dal pod Impostazione profilo basale fallita. L\'erogazione potrebbe essere sospesa! Aggiorna manualmente lo stato del pod dalla scheda Omnipod e riprendi l\'erogazione se necessario. - L\'Impostazione del profilo basale potrebbe essere fallita. L\'erogazione potrebbe essere sospesa! Aggiorna manualmente lo stato del pod dalla scheda Omnipod e riprendi l\'erogazione se necessario. - Impostazione profilo basale fallita. L\'erogazione è sospesa! Riprendi manualmente l\'erogazione dalla scheda Omnipod. - La cancellazione della basale temporanea potrebbe essere fallita. Aggiorna manualmente lo stato del pod dalla scheda Omnipod. - Impostazione basale temporanea fallita. Se una basale temporanea era precedentemente in esecuzione, potrebbe essere stata cancellata. Aggiorna manualmente lo stato del pod dalla scheda Omnipod. - L\'impostazione della basale temporanea potrebbe essere fallita. Se una basale temporanea era precedentemente in esecuzione, è stata cancellata. Aggiorna manualmente lo stato del pod dalla scheda Omnipod. + L\'impostazione del profilo basale potrebbe essere fallita. L\'erogazione potrebbe essere sospesa! Aggiorna manualmente lo stato del pod nella scheda Omnipod e riprendi l\'erogazione se necessario. + Impostazione profilo basale fallita. L\'erogazione è sospesa! Riprendi manualmente l\'erogazione nella scheda Omnipod. + La cancellazione della basale temporanea potrebbe essere fallita. Aggiorna manualmente lo stato del pod nella scheda Omnipod. + Impostazione basale temporanea fallita. Se una basale temporanea era precedentemente in esecuzione, potrebbe essere stata cancellata. Aggiorna manualmente lo stato del pod nella scheda Omnipod. + L\'impostazione della basale temporanea potrebbe essere fallita. Se una basale temporanea era precedentemente in esecuzione, è stata cancellata. Aggiorna manualmente lo stato del pod nella scheda Omnipod. La durata del TBR deve essere maggiore di zero e un multiplo di %1$s minuti. - L\'Impostazione dell\'ora potrebbe essere fallita. L\'erogazione potrebbe essere sospesa! Aggiorna manualmente lo stato del pod dalla scheda Omnipod e riprendi l\'erogazione se necessario. - Impostazione ora fallita. L\'erogazione è sospesa! Riprendi manualmente l\'erogazione dalla scheda Omnipod. + L\'impostazione dell\'ora potrebbe essere fallita. L\'erogazione potrebbe essere sospesa! Aggiorna manualmente lo stato del pod nella scheda Omnipod e riprendi l\'erogazione se necessario. + Impostazione ora fallita. L\'erogazione è sospesa! Riprendi manualmente l\'erogazione nella scheda Omnipod. Impossibile leggere il log impulsi Impossibile cambiare automaticamente l\'ora nel pod. Dovresti sincronizzare manualmente l\'ora nella scheda Omnipod. Operazione non possibile.\n\nDevi prima configurare Omnipod. @@ -66,7 +66,7 @@ Log impulsi (copiato negli appunti) Riempi un nuovo pod con abbastanza insulina per 3 giorni.\n\nResta in ascolto di due bip dal pod durante il processo di riempimento. Questi indicano che è stata inserita la quantità minima di 80U. Assicurati di svuotare completamente la siringa di riempimento, anche dopo aver sentito i due segnali acustici.\n\nDopo il riempimento del pod, premi Avanti.\n\nNota: non rimuovere la protezione dell\'ago del pod in questo momento.\nNota: colloca il RileyLink in posizione verticale e il pod a pochi centimetri di distanza. - Tentativo di associazione nuovo pod e caricamento.\n\nQuando il processo di inizializzazione è stato completato con successo, puoi premere Avanti.\n\nNota: colloca il RileyLink in posizione verticale e il pod a pochi centimetri di distanza. + Tentativo di associazione nuovo pod e caricamento.\n\nQuando il processo di inizializzazione è stato completato con successo puoi premere Avanti.\n\nNota: colloca il RileyLink in posizione verticale e il pod a pochi centimetri di distanza. indeterminato diff --git a/pump/pump-common/src/main/res/values-it-rIT/strings.xml b/pump/pump-common/src/main/res/values-it-rIT/strings.xml index 664d65dfdd..4cdd9853f5 100644 --- a/pump/pump-common/src/main/res/values-it-rIT/strings.xml +++ b/pump/pump-common/src/main/res/values-it-rIT/strings.xml @@ -9,7 +9,7 @@ Non inizializzato Inizializzato - Comunicazione crittata + Comunicazione criptata Pronto Occupato Sospeso diff --git a/ui/src/main/res/values-it-rIT/strings.xml b/ui/src/main/res/values-it-rIT/strings.xml index a9ea9cd201..eadc5c5aae 100644 --- a/ui/src/main/res/values-it-rIT/strings.xml +++ b/ui/src/main/res/values-it-rIT/strings.xml @@ -27,7 +27,7 @@ Età Peso Profilo più comune: - Nota: solo i dati visibili su questa schermata verranno caricati (in modo anonimo). Un ID è assegnato a questa installazione di AAPS. Puoi inviare nuovamente i dati se il tuo profilo principale viene modificato, ma lascialo in esecuzione almeno per una settimana per rendere il risultato visibile nel time in range (TIR). Il tuo aiuto è apprezzato. + Nota: solo i dati visibili su questa schermata verranno caricati in modo anonimo. A questa installazione di AAPS verrà assegnato un ID. Puoi inviare nuovamente i dati se il tuo profilo principale viene modificato, ma lascialo in esecuzione almeno per una settimana per rendere il risultato visibile nel time in range (TIR). Il tuo aiuto è apprezzato. Tipo glicemia Altro Glucometro From e33a66b65e00be35d182e500be60eb097596933d Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Fri, 27 Oct 2023 11:25:31 +0200 Subject: [PATCH 09/60] New Crowdin updates (#2987) * New translations strings.xml (Italian) * New translations strings.xml (Italian) * New translations strings.xml (Italian) * New translations strings.xml (Italian) * New translations strings.xml (Italian) * New translations strings.xml (Italian) --- .../ui/src/main/res/values-it-rIT/strings.xml | 20 +++++++++---------- .../src/main/res/values-it-rIT/strings.xml | 2 +- .../src/main/res/values-it-rIT/strings.xml | 2 +- .../src/main/res/values-it-rIT/strings.xml | 4 ++-- .../src/main/res/values-it-rIT/strings.xml | 4 ++-- .../src/main/res/values-it-rIT/strings.xml | 8 ++++---- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/core/ui/src/main/res/values-it-rIT/strings.xml b/core/ui/src/main/res/values-it-rIT/strings.xml index d831408e00..e01c9f4b87 100644 --- a/core/ui/src/main/res/values-it-rIT/strings.xml +++ b/core/ui/src/main/res/values-it-rIT/strings.xml @@ -120,7 +120,7 @@ Non configurato Loop sospeso Freccia trend - Asuto sens + Auto sens ric discesa rapida discesa @@ -155,7 +155,7 @@ Login Carica/Riempi Insulina - Stoppa temp-target + Stoppa target temporaneo Loop chiuso Loop aperto Sospensione a glicemia bassa (LGS) @@ -222,7 +222,7 @@ Cambio batteria micro Target temporaneo Valore target temporaneo - Cancellazione temp-target + Cancellazione target temporaneo Calcolatore Dito Sensore @@ -404,9 +404,9 @@ AT Impostazioni Autotune Automazione cambio profilo - Se abilitato, Autotune si aggiornerà automaticamente e passerà al profilo di input dopo il calcolo da una regola di automazione. + Se abilitato, dopo il calcolo di una regola di automazione Autotune verrà eseguito e il profilo generato verrà automaticamente attivato. Classifica UAM come basale - Abilita solo se hai inserito in modo affidabile tutti i carboidrati assunti, con questa opzione aumenti improvvisi individuati da Autotune verranno usati per consigliare modifiche alla velocità basale. + Abilita solo se hai inserito in modo affidabile tutti i carboidrati assunti, con questa opzione gli aumenti improvvisi individuati da Autotune verranno usati per consigliare modifiche alla velocità basale. Regola la curva dell\'insulina Abilita solo se usi free-peak. Questa opzione regolerà la durata di picco e DIA Numero di giorni di dati @@ -453,9 +453,9 @@ INFO Consiglio bolo - Hai una glicemia alta. Invece di mangiare ora, si consiglia di attendere una glicemia migliore. Vuoi fare adesso un bolo di correzione ed essere ricordato quando è il momento di mangiare? In questo caso non verranno registrati carboidrati e dovrai usare di nuovo il calcolatore quando ti verrà mostrato il promemoria. + Hai una glicemia alta. Invece di mangiare ora, si consiglia di attendere una glicemia migliore. Vuoi fare adesso un bolo di correzione ed ricevere un promemoria quando è il momento di mangiare? In questo caso non verranno registrati carboidrati e dovrai usare di nuovo il calcolatore quando ti verrà mostrato il promemoria. COB vs IOB - !!!!! Rilevato assorbimento lento dei carboidrati: %2$d%% del tempo. Ricontrolla il tuo calcolo. COB potrebbero essere sovrastimati e potrebbe essere somministrata più insulina !!!!!]]> + !!!!! Rilevato assorbimento lento dei carboidrati: %2$d%% del tempo. Ricontrolla il tuo calcolo. I COB potrebbero essere sovrastimati e potrebbe essere somministrata più insulina !!!!!]]> Eroga parte del risultato del calcolatore [%] Soglia tempo glicemia \"vecchia\" [min] Vincolo bolo applicato: %1$.2f U a %2$.2f U @@ -555,7 +555,7 @@ Bluetooth Low Energy non supportato o dispositivo non associato. Bluetooth non abilitato. La localizzazione non è abilitata - Affinché la ricerca bluetooth funzioni sui dispositivi più recenti, la localizzazione deve essere abilitata, ma può essere disabilitata dopo l\'associazione. AAPS non tiene traccia della tua posizione. + Affinché la ricerca bluetooth funzioni sui dispositivi più recenti la localizzazione deve essere abilitata, ma può essere disabilitata dopo l\'associazione. AAPS non tiene traccia della tua posizione. Preferenze plugin @@ -589,8 +589,8 @@ Lun L - M - M + Ma + Me G V S diff --git a/plugins/configuration/src/main/res/values-it-rIT/strings.xml b/plugins/configuration/src/main/res/values-it-rIT/strings.xml index eeaa0dadcc..f35ae754cd 100644 --- a/plugins/configuration/src/main/res/values-it-rIT/strings.xml +++ b/plugins/configuration/src/main/res/values-it-rIT/strings.xml @@ -88,7 +88,7 @@ Esportazione annullata! Le preferenze NON sono state esportate! Importazione annullata! Le preferenze NON sono state importate! Impossibile importare le preferenze! - Descrivi i problemi importazione… + Descrivi i problemi di importazione… Dettagli dei problemi di importazione Importa Importa comunque (PERICOLOSO!) diff --git a/plugins/main/src/main/res/values-it-rIT/strings.xml b/plugins/main/src/main/res/values-it-rIT/strings.xml index 8b01693506..31bd160ab3 100644 --- a/plugins/main/src/main/res/values-it-rIT/strings.xml +++ b/plugins/main/src/main/res/values-it-rIT/strings.xml @@ -225,7 +225,7 @@ Secondo incremento di CHO Terzo incremento di CHO CGM - Temp-Target predefiniti + Target temporanei predefiniti target \"pasto a breve\" - durata target \"pasto a breve\" target \"attività fisica\" - durata diff --git a/plugins/sensitivity/src/main/res/values-it-rIT/strings.xml b/plugins/sensitivity/src/main/res/values-it-rIT/strings.xml index 0d5e8c2b95..84e1b4a654 100644 --- a/plugins/sensitivity/src/main/res/values-it-rIT/strings.xml +++ b/plugins/sensitivity/src/main/res/values-it-rIT/strings.xml @@ -5,14 +5,14 @@ Sensibilità AAPS Sensibilità WeightedAverage La sensibilità è calcolata allo stesso modo di Oref0, ma puoi specificare l\'intervallo di tempo al passato. L\'assorbimento minimo dei carboidrati è calcolato da \'max tempo assorbimento pasto\' nelle preferenze. - La sensibilità è calcolata dai dati delle ultime 8h o 24h (usando tra i due periodi il più sensibile) e i carboidrati (se non assorbiti) vengono tagliati fuori dopo il tempo specificato nelle preferenze. Il plugin calcola anche UAM. + La sensibilità è calcolata dai dati delle ultime 8h o 24h (usando tra i due periodi quello più sensibile) e i carboidrati (se non assorbiti) vengono tagliati fuori dopo il tempo specificato nelle preferenze. Il plugin calcola anche UAM. La sensibilità è calcolata come media ponderata dalle deviazioni. Le deviazioni più recenti hanno peso maggiore. L\'assorbimento minimo dei carboidrati è calcolato da \'max tempo assorbimento pasto\' nelle preferenze. Questo algoritmo è il più veloce nel seguire i cambiamenti di sensibilità. UAM disabilitato perché il plugin di sensibilità Oref1, dal quale UAM dipende, non è abilitato Impostazioni assorbimento Max tempo assorbimento pasto [h] Tempo in ore in cui è previsto che tutti i carboidrati del pasto vengano assorbiti Intervallo per autosens [h] - Quantità di ore al passato per il rilevamento della sensibilità (il tempo di assorbimento dei carboidrati è escluso) + Quantità di ore del passato per il rilevamento della sensibilità (il tempo di assorbimento dei carboidrati è escluso) [Valore predefinito: 1.2]\nQuesto è un moltiplicatore di sicurezza per autosens (e presto autotune) per impostare un limite massimo del 20%% (col valore predefinito) su quanto alto può essere il rapporto di autosens, che a sua volta determina quanto in alto autosens può regolare le basali, quanto in basso può regolare ISF e quanto in basso può impostare il target glicemico. [Valore predefinito: 0.7]\nUn altro limite di sicurezza di autosens, imposta un blocco a quanto in basso autosens può regolare le basali e a quanto in alto può regolare ISF e target glicemici. Max rapporto autosens diff --git a/plugins/sync/src/main/res/values-it-rIT/strings.xml b/plugins/sync/src/main/res/values-it-rIT/strings.xml index 1021520da1..7558878f23 100644 --- a/plugins/sync/src/main/res/values-it-rIT/strings.xml +++ b/plugins/sync/src/main/res/values-it-rIT/strings.xml @@ -98,7 +98,7 @@ Carica adesso Non connesso Sola lettura - Lavorazione + In esecuzione xDrip+ @@ -138,7 +138,7 @@ non riuscito - controlla il telefono Impostazioni smartwatch Controlli da smartwatch - Imposta Temp-Target e inserisci trattamenti dallo smartwatch. + Imposta Target temporanei e inserisci trattamenti dallo smartwatch. Calcoli inclusi nel risultato del Calcolatore: Impostazioni generali Notifica SMB diff --git a/pump/combov2/src/main/res/values-it-rIT/strings.xml b/pump/combov2/src/main/res/values-it-rIT/strings.xml index 6e809d31a2..44270da307 100644 --- a/pump/combov2/src/main/res/values-it-rIT/strings.xml +++ b/pump/combov2/src/main/res/values-it-rIT/strings.xml @@ -3,7 +3,7 @@ Accu-Check Combo Integrazione nativa del microinfusore Accu-Chek Combo Impossibile connettersi al micro - Non associato a un micro + Non associato ad un micro Il micro ha terminato la connessione Avviso Combo Errore Combo @@ -21,7 +21,7 @@ Set di infusione non caricato Il bolo esteso non è supportato Accu-Check Combo v2 - Associa con micro + Associa micro Disassocia micro Stato driver Attività corrente @@ -29,11 +29,11 @@ Avvia associazione Associazione Combo in corso Passi per eseguire l\'associazione con il tuo Combo:\n\n -1. Sul tuo microinfusore, vai alle Impostazioni Bluetooth\n +1. Sul tuo microinfusore vai alle Impostazioni Bluetooth\n 2. Controlla se un dispositivo è già mostrato come associato; in tal caso, vai alla schermata del microinfusore \"Elimina dispositivo\" per eliminare/disassociare quel dispositivo\n 3. Vai alla schermata del microinfusore \"Aggiungi dispositivo\" e avvia l\'associazione sul microinfusore\n 4. Clicca sul tasto \"Avvia associazione\" qui sotto per avviare l\'associazione in AndroidAPS\n - Dopo un po \', il nome del telefono viene mostrato sullo schermo del micro; premi il tasto di CONFERMA per confermare.\n\n + Dopo un po\', il nome del telefono viene mostrato sullo schermo del micro; premi il tasto di CONFERMA per confermare.\n\n Quando l\'associazione è stata completata con successo, conferma la fine dell\'associazione sul microinfusore e torna alla schermata principale del microinfusore premendo il tasto di CONFERMA due volte.\n\n Se non viene stabilita alcuna connessione dopo più di ~5 minuti:\n\n 1. Premi Indietro o il tasto \"Annulla associazione\"\n From 3c2991dd28e346453a282844f672e65cff98195c Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Fri, 27 Oct 2023 12:29:04 +0200 Subject: [PATCH 10/60] SetupWizard: fix button visibility --- .../aaps/plugins/configuration/setupwizard/elements/SWButton.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/elements/SWButton.kt b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/elements/SWButton.kt index 0c757ba0f0..202988efb2 100644 --- a/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/elements/SWButton.kt +++ b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/setupwizard/elements/SWButton.kt @@ -9,7 +9,7 @@ class SWButton(injector: HasAndroidInjector) : SWItem(injector, Type.BUTTON) { private var buttonRunnable: Runnable? = null private var buttonText = 0 - private var buttonValidator: (() -> Boolean)? = { false } + private var buttonValidator: (() -> Boolean)? = null private var button: Button? = null fun text(buttonText: Int): SWButton { From 90b101e77fa40a34cb39334f1206ca7792fe7b77 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Fri, 27 Oct 2023 12:45:18 +0200 Subject: [PATCH 11/60] Overview: process buttons on pump change --- .../aaps/plugins/main/general/overview/OverviewFragment.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt b/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt index 8f5f834e1f..e89a4e5450 100644 --- a/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt +++ b/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt @@ -56,6 +56,7 @@ import app.aaps.core.interfaces.rx.events.EventAcceptOpenLoopChange import app.aaps.core.interfaces.rx.events.EventBucketedDataCreated import app.aaps.core.interfaces.rx.events.EventEffectiveProfileSwitchChanged import app.aaps.core.interfaces.rx.events.EventExtendedBolusChange +import app.aaps.core.interfaces.rx.events.EventInitializationChanged import app.aaps.core.interfaces.rx.events.EventMobileToWear import app.aaps.core.interfaces.rx.events.EventNewOpenLoopNotification import app.aaps.core.interfaces.rx.events.EventPreferenceChange @@ -308,6 +309,10 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList overviewData.pumpStatus = it.getStatus(requireContext()) updatePumpStatus() }, fabricPrivacy::logException) + disposable += rxBus + .toObservable(EventInitializationChanged::class.java) + .observeOn(aapsSchedulers.main) + .subscribe({ processButtonsVisibility() }, fabricPrivacy::logException) disposable += rxBus .toObservable(EventEffectiveProfileSwitchChanged::class.java) .observeOn(aapsSchedulers.io) From ff0d327a157cbbf58328be70f0094829d13050e5 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Fri, 27 Oct 2023 13:45:35 +0200 Subject: [PATCH 12/60] Wear: optimize loading treed arrow --- .../core/interfaces/utils/TrendCalculator.kt | 25 -------- .../utils/TrendCalculatorImpl.kt | 59 ------------------- .../wear/wearintegration/DataHandlerMobile.kt | 9 +-- 3 files changed, 5 insertions(+), 88 deletions(-) diff --git a/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/utils/TrendCalculator.kt b/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/utils/TrendCalculator.kt index 9e13b843f4..5959c42ab3 100644 --- a/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/utils/TrendCalculator.kt +++ b/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/utils/TrendCalculator.kt @@ -1,7 +1,6 @@ package app.aaps.core.interfaces.utils import app.aaps.core.interfaces.aps.AutosensDataStore -import app.aaps.core.interfaces.iob.InMemoryGlucoseValue import app.aaps.database.entities.GlucoseValue /** @@ -10,22 +9,6 @@ import app.aaps.database.entities.GlucoseValue */ interface TrendCalculator { - /** - * Provide or calculate trend - * - * @param glucoseValue BG - * @return TrendArrow - */ - fun getTrendArrow(glucoseValue: GlucoseValue?): GlucoseValue.TrendArrow - - /** - * Provide or calculate trend - * - * @param glucoseValue BG - * @return TrendArrow - */ - fun getTrendArrow(glucoseValue: InMemoryGlucoseValue?): GlucoseValue.TrendArrow - /** * Provide or calculate trend from newest bucketed data * @@ -34,14 +17,6 @@ interface TrendCalculator { */ fun getTrendArrow(autosensDataStore: AutosensDataStore): GlucoseValue.TrendArrow? - /** - * Provide or calculate trend - * - * @param glucoseValue BG - * @return string description of TrendArrow - */ - fun getTrendDescription(glucoseValue: GlucoseValue?): String - /** * Provide or calculate trend from newest bucketed data * diff --git a/implementation/src/main/kotlin/app/aaps/implementation/utils/TrendCalculatorImpl.kt b/implementation/src/main/kotlin/app/aaps/implementation/utils/TrendCalculatorImpl.kt index c96b2d1e53..9146154dea 100644 --- a/implementation/src/main/kotlin/app/aaps/implementation/utils/TrendCalculatorImpl.kt +++ b/implementation/src/main/kotlin/app/aaps/implementation/utils/TrendCalculatorImpl.kt @@ -3,75 +3,16 @@ package app.aaps.implementation.utils import app.aaps.core.interfaces.aps.AutosensDataStore import app.aaps.core.interfaces.iob.InMemoryGlucoseValue import app.aaps.core.interfaces.resources.ResourceHelper -import app.aaps.core.interfaces.utils.T import app.aaps.core.interfaces.utils.TrendCalculator import app.aaps.database.entities.GlucoseValue -import app.aaps.database.impl.AppRepository import javax.inject.Inject import javax.inject.Singleton @Singleton class TrendCalculatorImpl @Inject constructor( - private val repository: AppRepository, private val rh: ResourceHelper ) : TrendCalculator { - override fun getTrendArrow(glucoseValue: GlucoseValue?): GlucoseValue.TrendArrow = - when { - glucoseValue?.trendArrow == null -> GlucoseValue.TrendArrow.NONE - glucoseValue.trendArrow != GlucoseValue.TrendArrow.NONE -> glucoseValue.trendArrow - else -> calculateDirection(InMemoryGlucoseValue(glucoseValue)) - } - - override fun getTrendArrow(glucoseValue: InMemoryGlucoseValue?): GlucoseValue.TrendArrow = - when { - glucoseValue?.trendArrow == null -> GlucoseValue.TrendArrow.NONE - glucoseValue.trendArrow != GlucoseValue.TrendArrow.NONE -> glucoseValue.trendArrow - else -> calculateDirection(glucoseValue) - } - - override fun getTrendDescription(glucoseValue: GlucoseValue?): String = - when (getTrendArrow(glucoseValue)) { - GlucoseValue.TrendArrow.DOUBLE_DOWN -> rh.gs(app.aaps.core.ui.R.string.a11y_arrow_double_down) - GlucoseValue.TrendArrow.SINGLE_DOWN -> rh.gs(app.aaps.core.ui.R.string.a11y_arrow_single_down) - GlucoseValue.TrendArrow.FORTY_FIVE_DOWN -> rh.gs(app.aaps.core.ui.R.string.a11y_arrow_forty_five_down) - GlucoseValue.TrendArrow.FLAT -> rh.gs(app.aaps.core.ui.R.string.a11y_arrow_flat) - GlucoseValue.TrendArrow.FORTY_FIVE_UP -> rh.gs(app.aaps.core.ui.R.string.a11y_arrow_forty_five_up) - GlucoseValue.TrendArrow.SINGLE_UP -> rh.gs(app.aaps.core.ui.R.string.a11y_arrow_single_up) - GlucoseValue.TrendArrow.DOUBLE_UP -> rh.gs(app.aaps.core.ui.R.string.a11y_arrow_double_up) - GlucoseValue.TrendArrow.NONE -> rh.gs(app.aaps.core.ui.R.string.a11y_arrow_none) - else -> rh.gs(app.aaps.core.ui.R.string.a11y_arrow_unknown) - } - - private fun calculateDirection(glucoseValue: InMemoryGlucoseValue): GlucoseValue.TrendArrow { - - val toTime = glucoseValue.timestamp - val readings = repository.compatGetBgReadingsDataFromTime(toTime - T.mins(10).msecs(), toTime, false).blockingGet() - - if (readings.size < 2) - return GlucoseValue.TrendArrow.NONE - val current = readings[0] - val previous = readings[1] - - // Avoid division by 0 - val slope = - if (current.timestamp == previous.timestamp) 0.0 - else (previous.value - current.value) / (previous.timestamp - current.timestamp) - - val slopeByMinute = slope * 60000 - - return when { - slopeByMinute <= -3.5 -> GlucoseValue.TrendArrow.DOUBLE_DOWN - slopeByMinute <= -2 -> GlucoseValue.TrendArrow.SINGLE_DOWN - slopeByMinute <= -1 -> GlucoseValue.TrendArrow.FORTY_FIVE_DOWN - slopeByMinute <= 1 -> GlucoseValue.TrendArrow.FLAT - slopeByMinute <= 2 -> GlucoseValue.TrendArrow.FORTY_FIVE_UP - slopeByMinute <= 3.5 -> GlucoseValue.TrendArrow.SINGLE_UP - slopeByMinute <= 40 -> GlucoseValue.TrendArrow.DOUBLE_UP - else -> GlucoseValue.TrendArrow.NONE - } - } - override fun getTrendArrow(autosensDataStore: AutosensDataStore): GlucoseValue.TrendArrow? { val data = autosensDataStore.getBucketedDataTableCopy() ?: return null if (data.size == 0) return null diff --git a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/wear/wearintegration/DataHandlerMobile.kt b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/wear/wearintegration/DataHandlerMobile.kt index 927e891e67..a967c33b82 100644 --- a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/wear/wearintegration/DataHandlerMobile.kt +++ b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/wear/wearintegration/DataHandlerMobile.kt @@ -2,6 +2,7 @@ package app.aaps.plugins.sync.wear.wearintegration import android.app.NotificationManager import android.content.Context +import app.aaps.core.interfaces.aps.AutosensDataStore import app.aaps.core.interfaces.aps.Loop import app.aaps.core.interfaces.configuration.Config import app.aaps.core.interfaces.configuration.Constants @@ -741,7 +742,7 @@ class DataHandlerMobile @Inject constructor( fun resendData(from: String) { aapsLogger.debug(LTag.WEAR, "Sending data to wear from $from") // SingleBg - iobCobCalculator.ads.lastBg()?.let { rxBus.send(EventMobileToWear(getSingleBG(it))) } + iobCobCalculator.ads.lastBg()?.let { rxBus.send(EventMobileToWear(getSingleBG(it, iobCobCalculator.ads))) } // Preferences rxBus.send( EventMobileToWear( @@ -769,7 +770,7 @@ class DataHandlerMobile @Inject constructor( ) // GraphData iobCobCalculator.ads.getBucketedDataTableCopy()?.let { bucketedData -> - rxBus.send(EventMobileToWear(EventData.GraphData(ArrayList(bucketedData.map { getSingleBG(it) })))) + rxBus.send(EventMobileToWear(EventData.GraphData(ArrayList(bucketedData.map { getSingleBG(it, null) })))) } // Treatments sendTreatments() @@ -969,7 +970,7 @@ class DataHandlerMobile @Inject constructor( return deltaStringDetailed } - private fun getSingleBG(glucoseValue: InMemoryGlucoseValue): EventData.SingleBg { + private fun getSingleBG(glucoseValue: InMemoryGlucoseValue, autosensDataStore: AutosensDataStore?): EventData.SingleBg { val glucoseStatus = glucoseStatusProvider.getGlucoseStatusData(true) val units = profileFunction.getUnits() val lowLine = profileUtil.convertToMgdl(defaultValueHelper.determineLowLine(), units) @@ -979,7 +980,7 @@ class DataHandlerMobile @Inject constructor( timeStamp = glucoseValue.timestamp, sgvString = profileUtil.stringInCurrentUnitsDetect(glucoseValue.value), glucoseUnits = units.asText, - slopeArrow = trendCalculator.getTrendArrow(glucoseValue).symbol, + slopeArrow = (autosensDataStore?.let { ads -> trendCalculator.getTrendArrow(ads) } ?: GlucoseValue.TrendArrow.NONE).symbol, delta = glucoseStatus?.let { deltaString(it.delta, it.delta * Constants.MGDL_TO_MMOLL, units) } ?: "--", deltaDetailed = glucoseStatus?.let { deltaStringDetailed(it.delta, it.delta * Constants.MGDL_TO_MMOLL, units) } ?: "--", avgDelta = glucoseStatus?.let { deltaString(it.shortAvgDelta, it.shortAvgDelta * Constants.MGDL_TO_MMOLL, units) } ?: "--", From 4dde47bc44562d5082516ca65296b92d318b7773 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Fri, 27 Oct 2023 21:48:24 +0200 Subject: [PATCH 13/60] NSCv1: catch misformatted devicestatus --- .../aaps/plugins/sync/nsclient/services/NSClientService.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclient/services/NSClientService.kt b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclient/services/NSClientService.kt index c05558ec8c..c6ddabc390 100644 --- a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclient/services/NSClientService.kt +++ b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclient/services/NSClientService.kt @@ -524,7 +524,11 @@ class NSClientService : DaggerService() { } } - val devicestatuses = gson.fromJson(data.getString("devicestatus"), Array::class.java) + val devicestatuses = try { + gson.fromJson(data.getString("devicestatus"), Array::class.java) + } catch (unused: Exception) { + emptyArray() + } if (devicestatuses.isNotEmpty()) { rxBus.send(EventNSClientNewLog("◄ DATA", "received " + devicestatuses.size + " device statuses")) nsDeviceStatusHandler.handleNewData(devicestatuses) From 90251178a9a3aa0650ac0717f9008c6784b0fa26 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Fri, 27 Oct 2023 21:59:49 +0200 Subject: [PATCH 14/60] Overview: display smoothed value --- .../app/aaps/plugins/main/general/overview/OverviewFragment.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt b/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt index e89a4e5450..e584ddb958 100644 --- a/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt +++ b/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt @@ -793,7 +793,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList val lastBgDescription = overviewData.lastBgDescription(iobCobCalculator.ads) runOnUiThread { _binding ?: return@runOnUiThread - binding.infoLayout.bg.text = profileUtil.fromMgdlToStringInUnits(lastBg?.value) + binding.infoLayout.bg.text = profileUtil.fromMgdlToStringInUnits(lastBg?.smoothed) binding.infoLayout.bg.setTextColor(lastBgColor) trendArrow?.let { binding.infoLayout.arrow.setImageResource(it.directionToIcon()) } binding.infoLayout.arrow.visibility = (trendArrow != null).toVisibilityKeepSpace() From 70db7354768ed2f24cae0f0d8919ed9024bfb2cd Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Fri, 27 Oct 2023 23:26:03 +0200 Subject: [PATCH 15/60] NSCv3: catch stop service crash --- .../app/aaps/plugins/sync/nsclientV3/NSClientV3Plugin.kt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclientV3/NSClientV3Plugin.kt b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclientV3/NSClientV3Plugin.kt index a8ad36955d..21555b15bb 100644 --- a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclientV3/NSClientV3Plugin.kt +++ b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclientV3/NSClientV3Plugin.kt @@ -194,7 +194,7 @@ class NSClientV3Plugin @Inject constructor( disposable += rxBus .toObservable(EventAppExit::class.java) .observeOn(aapsSchedulers.io) - .subscribe({ if (nsClientV3Service != null) context.unbindService(serviceConnection) }, fabricPrivacy::logException) + .subscribe({ stopService() }, fabricPrivacy::logException) disposable += rxBus .toObservable(EventConnectivityOptionChanged::class.java) .observeOn(aapsSchedulers.io) @@ -359,7 +359,11 @@ class NSClientV3Plugin @Inject constructor( } private fun stopService() { - if (nsClientV3Service != null) context.unbindService(serviceConnection) + try { + if (nsClientV3Service != null) context.unbindService(serviceConnection) + } catch (e: Exception) { + nsClientV3Service = null + } } override fun resend(reason: String) { From 1f9f112f684ff60688131b5200907bc6398686f5 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Sat, 28 Oct 2023 01:20:59 +0200 Subject: [PATCH 16/60] synchronized access to hashmap --- .../app/aaps/plugins/sync/nsShared/StoreDataForDbImpl.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsShared/StoreDataForDbImpl.kt b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsShared/StoreDataForDbImpl.kt index 4336aea51d..edbe3219bc 100644 --- a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsShared/StoreDataForDbImpl.kt +++ b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsShared/StoreDataForDbImpl.kt @@ -130,8 +130,10 @@ class StoreDataForDbImpl @Inject constructor( private val pause = 1000L // to slow down db operations fun HashMap.inc(key: T) = - if (containsKey(key)) merge(key, 1, Long::plus) - else put(key, 1) + synchronized(this) { + if (containsKey(key)) merge(key, 1, Long::plus) + else put(key, 1) + } override fun storeGlucoseValuesToDb() { if (glucoseValues.isNotEmpty()) From 4b8c48b4243b13e3348496f8ddf1dcf7c0fa1e2d Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Sat, 28 Oct 2023 12:50:25 +0200 Subject: [PATCH 17/60] Fix displaying value --- .../app/aaps/plugins/main/general/overview/OverviewFragment.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt b/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt index e584ddb958..b56f1144b2 100644 --- a/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt +++ b/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt @@ -793,7 +793,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList val lastBgDescription = overviewData.lastBgDescription(iobCobCalculator.ads) runOnUiThread { _binding ?: return@runOnUiThread - binding.infoLayout.bg.text = profileUtil.fromMgdlToStringInUnits(lastBg?.smoothed) + binding.infoLayout.bg.text = profileUtil.fromMgdlToStringInUnits(lastBg?.recalculated) binding.infoLayout.bg.setTextColor(lastBgColor) trendArrow?.let { binding.infoLayout.arrow.setImageResource(it.directionToIcon()) } binding.infoLayout.arrow.visibility = (trendArrow != null).toVisibilityKeepSpace() From e026b59208097ed4dd0490e62582c651eb5c6bb9 Mon Sep 17 00:00:00 2001 From: jbr7rr <> Date: Sat, 28 Oct 2023 09:46:00 +0200 Subject: [PATCH 18/60] Medtrum: Skip record if it fails --- .../interfaces/notifications/Notification.kt | 1 + .../pump/medtrum/services/MedtrumService.kt | 23 +++++++++++++++++-- pump/medtrum/src/main/res/values/strings.xml | 1 + 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/notifications/Notification.kt b/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/notifications/Notification.kt index f9eb549c7b..336b16afe5 100644 --- a/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/notifications/Notification.kt +++ b/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/notifications/Notification.kt @@ -139,6 +139,7 @@ open class Notification { const val PUMP_TIMEZONE_UPDATE_FAILED = 85 const val BLUETOOTH_NOT_SUPPORTED = 86 const val PUMP_WARNING = 87 + const val PUMP_SYNC_ERROR = 88 const val USER_MESSAGE = 1000 diff --git a/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/services/MedtrumService.kt b/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/services/MedtrumService.kt index 887c4c1a95..49a93bc68c 100644 --- a/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/services/MedtrumService.kt +++ b/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/services/MedtrumService.kt @@ -559,10 +559,29 @@ class MedtrumService : DaggerService(), BLECommCallback { private fun syncRecords(): Boolean { aapsLogger.debug(LTag.PUMP, "syncRecords: called!, syncedSequenceNumber: ${medtrumPump.syncedSequenceNumber}, currentSequenceNumber: ${medtrumPump.currentSequenceNumber}") var result = true + var failureCount = 0 if (medtrumPump.syncedSequenceNumber < medtrumPump.currentSequenceNumber) { for (sequence in (medtrumPump.syncedSequenceNumber + 1)..medtrumPump.currentSequenceNumber) { - result = sendPacketAndGetResponse(GetRecordPacket(injector, sequence), COMMAND_SYNC_TIMEOUT_SEC) - if (!result) break + val packet = GetRecordPacket(injector, sequence) + result = sendPacketAndGetResponse(packet, COMMAND_SYNC_TIMEOUT_SEC) + if (!result && packet.failed) { + // Record may be broken for unkown reasons, try the next packet if that fails abort + failureCount++ + if (failureCount == 1) { + // Show notification to alert user of failure + uiInteraction.addNotificationWithSound( + Notification.PUMP_SYNC_ERROR, + rh.gs(R.string.pump_sync_error), + Notification.URGENT, + app.aaps.core.ui.R.raw.alarm + ) + } else if (failureCount >= 2) { + break + } + } else if (!result) { + // Communication timeout, try again + break + } } } return result diff --git a/pump/medtrum/src/main/res/values/strings.xml b/pump/medtrum/src/main/res/values/strings.xml index f2a283e42f..10e4496dc8 100644 --- a/pump/medtrum/src/main/res/values/strings.xml +++ b/pump/medtrum/src/main/res/values/strings.xml @@ -38,6 +38,7 @@ Pump is suspended due to daily max insulin exceeded Patch not activated Setting user settings to pump failed! + Error while syncing history from pump, a record has been skipped. Check treatment tab to check if bolus is synced correctly. Snooze and if error keep coming back change patch or pumpbase. BLE Status From 68d45aae4fd092959376d25f1d85560e20200afb Mon Sep 17 00:00:00 2001 From: jbr7rr <> Date: Sun, 29 Oct 2023 06:57:43 +0100 Subject: [PATCH 19/60] Medtrum: Add log line --- .../info/nightscout/pump/medtrum/services/MedtrumService.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/services/MedtrumService.kt b/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/services/MedtrumService.kt index 49a93bc68c..4d9d52dd38 100644 --- a/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/services/MedtrumService.kt +++ b/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/services/MedtrumService.kt @@ -566,7 +566,8 @@ class MedtrumService : DaggerService(), BLECommCallback { result = sendPacketAndGetResponse(packet, COMMAND_SYNC_TIMEOUT_SEC) if (!result && packet.failed) { // Record may be broken for unkown reasons, try the next packet if that fails abort - failureCount++ + failureCount++ + aapsLogger.error(LTag.PUMPCOMM, "Failed to sync record $sequence, failureCount: $failureCount") if (failureCount == 1) { // Show notification to alert user of failure uiInteraction.addNotificationWithSound( From 7b04f79c7bcab81aaf3b2f96e420a20168ae3962 Mon Sep 17 00:00:00 2001 From: Philoul Date: Sun, 29 Oct 2023 18:24:36 +0100 Subject: [PATCH 20/60] Wear log replace bytearray data by size --- .../wear/wearintegration/DataLayerListenerServiceMobile.kt | 6 +++--- .../app/aaps/wear/comm/DataLayerListenerServiceWear.kt | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/wear/wearintegration/DataLayerListenerServiceMobile.kt b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/wear/wearintegration/DataLayerListenerServiceMobile.kt index 92fdea324e..78586e11fc 100644 --- a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/wear/wearintegration/DataLayerListenerServiceMobile.kt +++ b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/wear/wearintegration/DataLayerListenerServiceMobile.kt @@ -143,7 +143,7 @@ class DataLayerListenerServiceMobile : WearableListenerService() { } rxDataPath -> { - aapsLogger.debug(LTag.WEAR, "onMessageReceived rxDataPath: ${String(messageEvent.data)}") + aapsLogger.debug(LTag.WEAR, "onMessageReceived rxDataPath: ${messageEvent.data.size}") val command = EventData.deserializeByte(messageEvent.data) rxBus.send(command.also { it.sourceNodeId = messageEvent.sourceNodeId }) } @@ -213,13 +213,13 @@ class DataLayerListenerServiceMobile : WearableListenerService() { } private fun sendMessage(path: String, data: ByteArray) { - aapsLogger.debug(LTag.WEAR, "sendMessage: $path") + aapsLogger.debug(LTag.WEAR, "sendMessage: $path ${data.size}") transcriptionNodeId?.also { nodeId -> messageClient .sendMessage(nodeId, path, data).apply { addOnSuccessListener { } addOnFailureListener { - aapsLogger.debug(LTag.WEAR, "sendMessage: $path failure") + aapsLogger.debug(LTag.WEAR, "sendMessage: $path failure ${data.size}") } } } diff --git a/wear/src/main/kotlin/app/aaps/wear/comm/DataLayerListenerServiceWear.kt b/wear/src/main/kotlin/app/aaps/wear/comm/DataLayerListenerServiceWear.kt index c701b69391..29478a4d57 100644 --- a/wear/src/main/kotlin/app/aaps/wear/comm/DataLayerListenerServiceWear.kt +++ b/wear/src/main/kotlin/app/aaps/wear/comm/DataLayerListenerServiceWear.kt @@ -206,15 +206,15 @@ class DataLayerListenerServiceWear : WearableListenerService() { } ?: aapsLogger.debug(LTag.WEAR, "sendMessage: Ignoring message. No node selected.") } - @Suppress("unused") + private fun sendMessage(path: String, data: ByteArray) { - aapsLogger.debug(LTag.WEAR, "sendMessage: $path") + aapsLogger.debug(LTag.WEAR, "sendMessage: $path ${data.size}") transcriptionNodeId?.also { nodeId -> messageClient .sendMessage(nodeId, path, data).apply { addOnSuccessListener { } addOnFailureListener { - aapsLogger.debug(LTag.WEAR, "sendMessage: $path failure") + aapsLogger.debug(LTag.WEAR, "sendMessage: $path failure ${data.size}") } } } From 570f39948db76939042e37e7a55feb69cf53435c Mon Sep 17 00:00:00 2001 From: olorinmaia Date: Sun, 29 Oct 2023 18:35:11 +0100 Subject: [PATCH 21/60] Fix typo of DynISF setting "Adjust sensitivity and BG" and add summary --- plugins/aps/src/main/res/values/strings.xml | 4 +++- plugins/aps/src/main/res/xml/pref_openapssmbdynamicisf.xml | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/aps/src/main/res/values/strings.xml b/plugins/aps/src/main/res/values/strings.xml index 6dd6a65a33..5e5cc9d06b 100644 --- a/plugins/aps/src/main/res/values/strings.xml +++ b/plugins/aps/src/main/res/values/strings.xml @@ -23,7 +23,8 @@ DynISFAdjust dynisf_adjust_sensitivity - Adjust sensitivity and BG + Adjust sensitivity and basal + If activated this replaces Autosens, and uses the last 24h TDD/7D TDD as the basis for adjusting calculated ISF and also for increasing and decreasing basal rate, in the same way that standard Autosens does DynamicISF Adjustment Factor % Adjustment factor for DynamicISF. Set more than 100% for more aggressive correction doses, and less than 100% for less aggressive corrections. High temptarget raises sensitivity @@ -150,4 +151,5 @@ Fallback to SMB. Not enough TDD data. + \ No newline at end of file diff --git a/plugins/aps/src/main/res/xml/pref_openapssmbdynamicisf.xml b/plugins/aps/src/main/res/xml/pref_openapssmbdynamicisf.xml index 6bcc93117b..6c6a192efe 100644 --- a/plugins/aps/src/main/res/xml/pref_openapssmbdynamicisf.xml +++ b/plugins/aps/src/main/res/xml/pref_openapssmbdynamicisf.xml @@ -52,6 +52,7 @@ Date: Mon, 30 Oct 2023 09:16:10 +0100 Subject: [PATCH 22/60] Rephrase summary After discussion with Milos and Tim --- plugins/aps/src/main/res/values/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/aps/src/main/res/values/strings.xml b/plugins/aps/src/main/res/values/strings.xml index 5e5cc9d06b..fa718b1246 100644 --- a/plugins/aps/src/main/res/values/strings.xml +++ b/plugins/aps/src/main/res/values/strings.xml @@ -24,7 +24,7 @@ dynisf_adjust_sensitivity Adjust sensitivity and basal - If activated this replaces Autosens, and uses the last 24h TDD/7D TDD as the basis for adjusting calculated ISF and also for increasing and decreasing basal rate, in the same way that standard Autosens does + If activated DynISF uses the last 24h TDD/7D TDD as the basis for adjusting calculated ISF and also for increasing and decreasing basal rate, in the same way that standard Autosens does DynamicISF Adjustment Factor % Adjustment factor for DynamicISF. Set more than 100% for more aggressive correction doses, and less than 100% for less aggressive corrections. High temptarget raises sensitivity @@ -152,4 +152,4 @@ - \ No newline at end of file + From 9b4d9b788b1715c7fc662596ceade69e2862ef8a Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Mon, 30 Oct 2023 13:21:17 +0100 Subject: [PATCH 23/60] NSCv3: fix loading v1 records on full sync --- .../app/aaps/core/nssdk/networking/NightscoutRemoteService.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/nssdk/src/main/kotlin/app/aaps/core/nssdk/networking/NightscoutRemoteService.kt b/core/nssdk/src/main/kotlin/app/aaps/core/nssdk/networking/NightscoutRemoteService.kt index 806ce6573b..2fc3436528 100644 --- a/core/nssdk/src/main/kotlin/app/aaps/core/nssdk/networking/NightscoutRemoteService.kt +++ b/core/nssdk/src/main/kotlin/app/aaps/core/nssdk/networking/NightscoutRemoteService.kt @@ -56,7 +56,7 @@ internal interface NightscoutRemoteService { @DELETE("v3/entries/{identifier}") suspend fun deleteEntry(@Path("identifier") identifier: String): Response> - @GET("v3/treatments?sort=date") + @GET("v3/treatments?sort=created_at") suspend fun getTreatmentsNewerThan(@Query(value = "created_at\$gt", encoded = true) createdAt: String, @Query("limit") limit: Int): Response>> @GET("v3/treatments/history/{from}") From aa2ae1b99fe9dc6c02338bb86495ce0cc93093f9 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Mon, 30 Oct 2023 13:54:24 +0100 Subject: [PATCH 24/60] Overview: show adjusted target in NSC mode --- .../interfaces/nsclient/ProcessedDeviceStatusData.kt | 3 +-- .../plugins/main/general/overview/OverviewFragment.kt | 9 ++++++--- .../sync/nsclient/data/ProcessedDeviceStatusDataImpl.kt | 2 +- .../kotlin/app/aaps/workflow/PreparePredictionsWorker.kt | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/nsclient/ProcessedDeviceStatusData.kt b/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/nsclient/ProcessedDeviceStatusData.kt index f9d69ac6e5..09fe08cb04 100644 --- a/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/nsclient/ProcessedDeviceStatusData.kt +++ b/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/nsclient/ProcessedDeviceStatusData.kt @@ -2,7 +2,6 @@ package app.aaps.core.interfaces.nsclient import android.text.Spanned import app.aaps.core.interfaces.aps.APSResult -import dagger.android.HasAndroidInjector import org.json.JSONObject interface ProcessedDeviceStatusData { @@ -61,7 +60,7 @@ interface ProcessedDeviceStatusData { val extendedOpenApsStatus: Spanned val openApsStatus: Spanned val openApsTimestamp: Long - fun getAPSResult(injector: HasAndroidInjector): APSResult + fun getAPSResult(): APSResult val uploaderStatus: String val uploaderStatusSpanned: Spanned val extendedUploaderStatus: Spanned diff --git a/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt b/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt index b56f1144b2..a9a3e0f696 100644 --- a/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt +++ b/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt @@ -963,9 +963,12 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList profileUtil.toTargetRangeString(tempTarget.lowTarget, tempTarget.highTarget, GlucoseUnit.MGDL, units) + " " + dateUtil.untilString(tempTarget.end, rh) ) } else { - // If the target is not the same as set in the profile then oref has overridden it profileFunction.getProfile()?.let { profile -> - val targetUsed = loop.lastRun?.constraintsProcessed?.targetBG ?: 0.0 + // If the target is not the same as set in the profile then oref has overridden it + val targetUsed = + if (config.APS) loop.lastRun?.constraintsProcessed?.targetBG ?: 0.0 + else if (config.NSCLIENT) JsonHelper.safeGetDouble(processedDeviceStatusData.getAPSResult().json, "targetBg") + else 0.0 if (targetUsed != 0.0 && abs(profile.getTargetMgdl() - targetUsed) > 0.01) { aapsLogger.debug("Adjusted target. Profile: ${profile.getTargetMgdl()} APS: $targetUsed") @@ -1111,7 +1114,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList val isfMgdl = profile?.getIsfMgdl() val variableSens = if (config.APS && request is VariableSensitivityResult) request.variableSens ?: 0.0 - else if (config.NSCLIENT) JsonHelper.safeGetDouble(processedDeviceStatusData.getAPSResult(injector).json, "variable_sens") + else if (config.NSCLIENT) JsonHelper.safeGetDouble(processedDeviceStatusData.getAPSResult().json, "variable_sens") else 0.0 if (variableSens != isfMgdl && variableSens != 0.0 && isfMgdl != null) { diff --git a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclient/data/ProcessedDeviceStatusDataImpl.kt b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclient/data/ProcessedDeviceStatusDataImpl.kt index 0e6f497d42..3b60851a56 100644 --- a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclient/data/ProcessedDeviceStatusDataImpl.kt +++ b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclient/data/ProcessedDeviceStatusDataImpl.kt @@ -116,7 +116,7 @@ class ProcessedDeviceStatusDataImpl @Inject constructor( override val openApsTimestamp: Long get() = if (openAPSData.clockSuggested != 0L) openAPSData.clockSuggested else -1 - override fun getAPSResult(injector: HasAndroidInjector): APSResult = + override fun getAPSResult(): APSResult = instantiator.provideAPSResultObject().also { it.json = openAPSData.suggested it.date = openAPSData.clockSuggested diff --git a/workflow/src/main/kotlin/app/aaps/workflow/PreparePredictionsWorker.kt b/workflow/src/main/kotlin/app/aaps/workflow/PreparePredictionsWorker.kt index ff57b7b4cf..d229c4c674 100644 --- a/workflow/src/main/kotlin/app/aaps/workflow/PreparePredictionsWorker.kt +++ b/workflow/src/main/kotlin/app/aaps/workflow/PreparePredictionsWorker.kt @@ -51,7 +51,7 @@ class PreparePredictionsWorker( val data = dataWorkerStorage.pickupObject(inputData.getLong(DataWorkerStorage.STORE_KEY, -1)) as PreparePredictionsData? ?: return Result.failure(workDataOf("Error" to "missing input data")) - val apsResult = if (config.APS) loop.lastRun?.constraintsProcessed else processedDeviceStatusData.getAPSResult(injector) + val apsResult = if (config.APS) loop.lastRun?.constraintsProcessed else processedDeviceStatusData.getAPSResult() val predictionsAvailable = if (config.APS) loop.lastRun?.request?.hasPredictions == true else config.NSCLIENT val menuChartSettings = overviewMenus.setting // align to hours From 51e4a984974702b1652bfcabc4fe315234b66fda Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Mon, 30 Oct 2023 14:02:26 +0100 Subject: [PATCH 25/60] NSC: improve connectivity message --- .../aaps/core/interfaces/rx/events/EventNetworkChange.kt | 5 ++++- .../app/aaps/plugins/sync/nsclient/ReceiverDelegate.kt | 6 +++++- plugins/sync/src/main/res/values/strings.xml | 1 + 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/rx/events/EventNetworkChange.kt b/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/rx/events/EventNetworkChange.kt index fc0bb64181..914cf7ba45 100644 --- a/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/rx/events/EventNetworkChange.kt +++ b/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/rx/events/EventNetworkChange.kt @@ -7,4 +7,7 @@ class EventNetworkChange( var ssid: String = "", var roaming: Boolean = false, var metered: Boolean = false -) : Event() \ No newline at end of file +) : Event() { + val isAnyConnection : Boolean + get() = mobileConnected || wifiConnected +} \ No newline at end of file diff --git a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclient/ReceiverDelegate.kt b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclient/ReceiverDelegate.kt index cceb6490f0..1697ef1638 100644 --- a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclient/ReceiverDelegate.kt +++ b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclient/ReceiverDelegate.kt @@ -84,7 +84,11 @@ class ReceiverDelegate @Inject constructor( val newNetworkState = calculateStatus(ev) if (newNetworkState != allowedNetworkState) { allowedNetworkState = newNetworkState - if (!newNetworkState) blockingReason = rh.gs(R.string.blocked_by_connectivity) + if (!newNetworkState) { + blockingReason = + if (!ev.isAnyConnection) rh.gs(R.string.no_connectivity) + else rh.gs(R.string.blocked_by_connectivity) + } processStateChange() } } diff --git a/plugins/sync/src/main/res/values/strings.xml b/plugins/sync/src/main/res/values/strings.xml index 015419cce4..9a85f46131 100644 --- a/plugins/sync/src/main/res/values/strings.xml +++ b/plugins/sync/src/main/res/values/strings.xml @@ -41,6 +41,7 @@ Synchronizes your data with Nightscout using v3 API Blocked by charging options Blocked by connectivity options + No connectivity Unsupported version of Nightscout OAPS UPLD From cbde9564d41ca0c703de26dd4555698a8ec24cc7 Mon Sep 17 00:00:00 2001 From: Robert Buessow Date: Mon, 30 Oct 2023 14:22:07 +0100 Subject: [PATCH 26/60] Get glucose unit from settings rather than profile. Add post carbs and connect/disconnect functionality for Garmin Widget. --- .../aaps/plugins/sync/garmin/GarminPlugin.kt | 34 +++++++ .../app/aaps/plugins/sync/garmin/LoopHub.kt | 10 ++ .../aaps/plugins/sync/garmin/LoopHubImpl.kt | 59 +++++++++++- .../plugins/sync/garmin/GarminPluginTest.kt | 92 +++++++++++++++++++ .../aaps/plugins/sync/garmin/LoopHubTest.kt | 75 ++++++++++++--- 5 files changed, 256 insertions(+), 14 deletions(-) diff --git a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/garmin/GarminPlugin.kt b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/garmin/GarminPlugin.kt index 0b28af0e94..5d20fd3c70 100644 --- a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/garmin/GarminPlugin.kt +++ b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/garmin/GarminPlugin.kt @@ -94,6 +94,8 @@ class GarminPlugin @Inject constructor( server?.close() server = HttpServer(aapsLogger, port).apply { registerEndpoint("/get", ::onGetBloodGlucose) + registerEndpoint("/carbs", ::onPostCarbs) + registerEndpoint("/connect", ::onConnectPump) } } else if (server != null) { aapsLogger.info(LTag.GARMIN, "stopping HTTP server") @@ -243,4 +245,36 @@ class GarminPlugin @Inject constructor( aapsLogger.warn(LTag.GARMIN, "Skip saving invalid HR $avg $samplingStart..$samplingEnd") } } + + /** Handles carb notification from the device. */ + @VisibleForTesting + @Suppress("UNUSED_PARAMETER") + fun onPostCarbs(caller: SocketAddress, uri: URI, requestBody: String?): CharSequence { + aapsLogger.info(LTag.GARMIN, "carbs from $caller, req: $uri") + postCarbs(getQueryParameter(uri, "carbs", 0L).toInt()) + return "" + } + + private fun postCarbs(carbs: Int) { + if (carbs > 0) { + loopHub.postCarbs(carbs) + } + } + + /** Handles pump connected notification that the user entered on the Garmin device. */ + @VisibleForTesting + @Suppress("UNUSED_PARAMETER") + fun onConnectPump(caller: SocketAddress, uri: URI, requestBody: String?): CharSequence { + aapsLogger.info(LTag.GARMIN, "connect from $caller, req: $uri") + val minutes = getQueryParameter(uri, "disconnectMinutes", 0L).toInt() + if (minutes > 0) { + loopHub.disconnectPump(minutes) + } else { + loopHub.connectPump() + } + + val jo = JsonObject() + jo.addProperty("connected", loopHub.isConnected) + return jo.toString() + } } diff --git a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/garmin/LoopHub.kt b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/garmin/LoopHub.kt index 69f2f44a62..4b420d21f5 100644 --- a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/garmin/LoopHub.kt +++ b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/garmin/LoopHub.kt @@ -29,9 +29,19 @@ interface LoopHub { /** Returns the factor by which the basal rate is currently raised (> 1) or lowered (< 1). */ val temporaryBasal: Double + /** Tells the loop algorithm that the pump is physically connected. */ + fun connectPump() + + /** Tells the loop algorithm that the pump will be physically disconnected + * for the given number of minutes. */ + fun disconnectPump(minutes: Int) + /** Retrieves the glucose values starting at from. */ fun getGlucoseValues(from: Instant, ascending: Boolean): List + /** Notifies the system that carbs were eaten and stores the value. */ + fun postCarbs(carbohydrates: Int) + /** Stores hear rate readings that a taken and averaged of the given interval. */ fun storeHeartRate( samplingStart: Instant, samplingEnd: Instant, diff --git a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/garmin/LoopHubImpl.kt b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/garmin/LoopHubImpl.kt index e762d27b49..dfcf9dab37 100644 --- a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/garmin/LoopHubImpl.kt +++ b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/garmin/LoopHubImpl.kt @@ -2,15 +2,26 @@ package app.aaps.plugins.sync.garmin import androidx.annotation.VisibleForTesting import app.aaps.core.interfaces.aps.Loop +import app.aaps.core.interfaces.constraints.ConstraintsChecker import app.aaps.core.interfaces.db.GlucoseUnit import app.aaps.core.interfaces.iob.IobCobCalculator +import app.aaps.core.interfaces.logging.AAPSLogger +import app.aaps.core.interfaces.logging.LTag +import app.aaps.core.interfaces.logging.UserEntryLogger import app.aaps.core.interfaces.profile.Profile import app.aaps.core.interfaces.profile.ProfileFunction +import app.aaps.core.interfaces.pump.DetailedBolusInfo +import app.aaps.core.interfaces.queue.CommandQueue +import app.aaps.core.interfaces.sharedPreferences.SP import app.aaps.database.ValueWrapper import app.aaps.database.entities.EffectiveProfileSwitch import app.aaps.database.entities.GlucoseValue import app.aaps.database.entities.HeartRate +import app.aaps.database.entities.OfflineEvent +import app.aaps.database.entities.UserEntry +import app.aaps.database.entities.ValueWithUnit import app.aaps.database.impl.AppRepository +import app.aaps.database.impl.transactions.CancelCurrentOfflineEventIfAnyTransaction import app.aaps.database.impl.transactions.InsertOrUpdateHeartRateTransaction import java.time.Clock import java.time.Instant @@ -22,10 +33,15 @@ import javax.inject.Singleton * Interface to the functionality of the looping algorithm and storage systems. */ class LoopHubImpl @Inject constructor( + private val aapsLogger: AAPSLogger, + private val commandQueue: CommandQueue, + private val constraintChecker: ConstraintsChecker, private val iobCobCalculator: IobCobCalculator, private val loop: Loop, private val profileFunction: ProfileFunction, private val repo: AppRepository, + private val userEntryLogger: UserEntryLogger, + private val sp: SP, ) : LoopHub { @VisibleForTesting @@ -40,7 +56,9 @@ class LoopHubImpl @Inject constructor( /** Returns the glucose unit (mg/dl or mmol/l) as selected by the user. */ override val glucoseUnit: GlucoseUnit - get() = profileFunction.getProfile()?.units ?: GlucoseUnit.MGDL + get() = GlucoseUnit.fromText(sp.getString( + app.aaps.core.utils.R.string.key_units, + GlucoseUnit.MGDL.asText)) /** Returns the remaining bolus insulin on board. */ override val insulinOnboard: Double @@ -65,12 +83,51 @@ class LoopHubImpl @Inject constructor( return if (apsResult == null) Double.NaN else apsResult.percent / 100.0 } + /** Tells the loop algorithm that the pump is physicallly connected. */ + override fun connectPump() { + repo.runTransaction( + CancelCurrentOfflineEventIfAnyTransaction(clock.millis()) + ).subscribe() + commandQueue.cancelTempBasal(true, null) + userEntryLogger.log(UserEntry.Action.RECONNECT, UserEntry.Sources.GarminDevice) + } + + /** Tells the loop algorithm that the pump will be physically disconnected + * for the given number of minutes. */ + override fun disconnectPump(minutes: Int) { + currentProfile?.let { p -> + loop.goToZeroTemp(minutes, p, OfflineEvent.Reason.DISCONNECT_PUMP) + userEntryLogger.log( + UserEntry.Action.DISCONNECT, + UserEntry.Sources.GarminDevice, + ValueWithUnit.Minute(minutes) + ) + } + } + /** Retrieves the glucose values starting at from. */ override fun getGlucoseValues(from: Instant, ascending: Boolean): List { return repo.compatGetBgReadingsDataFromTime(from.toEpochMilli(), ascending) .blockingGet() } + /** Notifies the system that carbs were eaten and stores the value. */ + override fun postCarbs(carbohydrates: Int) { + aapsLogger.info(LTag.GARMIN, "post $carbohydrates g carbohydrates") + val carbsAfterConstraints = + carbohydrates.coerceAtMost(constraintChecker.getMaxCarbsAllowed().value()) + userEntryLogger.log( + UserEntry.Action.CARBS, + UserEntry.Sources.GarminDevice, + ValueWithUnit.Gram(carbsAfterConstraints) + ) + val detailedBolusInfo = DetailedBolusInfo().apply { + eventType = DetailedBolusInfo.EventType.CARBS_CORRECTION + carbs = carbsAfterConstraints.toDouble() + } + commandQueue.bolus(detailedBolusInfo, null) + } + /** Stores hear rate readings that a taken and averaged of the given interval. */ override fun storeHeartRate( samplingStart: Instant, samplingEnd: Instant, diff --git a/plugins/sync/src/test/kotlin/app/aaps/plugins/sync/garmin/GarminPluginTest.kt b/plugins/sync/src/test/kotlin/app/aaps/plugins/sync/garmin/GarminPluginTest.kt index c0af17edfa..18c772877e 100644 --- a/plugins/sync/src/test/kotlin/app/aaps/plugins/sync/garmin/GarminPluginTest.kt +++ b/plugins/sync/src/test/kotlin/app/aaps/plugins/sync/garmin/GarminPluginTest.kt @@ -1,5 +1,6 @@ package app.aaps.plugins.sync.garmin +import app.aaps.core.interfaces.db.GlucoseUnit import app.aaps.core.interfaces.resources.ResourceHelper import app.aaps.core.interfaces.rx.events.EventNewBG import app.aaps.core.interfaces.sharedPreferences.SP @@ -9,14 +10,18 @@ import dagger.android.AndroidInjector import dagger.android.HasAndroidInjector import org.junit.jupiter.api.AfterEach import org.junit.jupiter.api.Assertions.assertArrayEquals +import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test +import org.mockito.ArgumentMatchers.anyLong import org.mockito.Mock import org.mockito.Mockito.atMost import org.mockito.Mockito.mock +import org.mockito.Mockito.times import org.mockito.Mockito.verify import org.mockito.Mockito.verifyNoMoreInteractions import org.mockito.Mockito.`when` +import java.net.SocketAddress import java.net.URI import java.time.Clock import java.time.Instant @@ -113,4 +118,91 @@ class GarminPluginTest: TestBase() { verify(gp.newValue).signalAll() verify(loopHub).getGlucoseValues(from, true) } + + @Test + fun testOnGetBloodGlucose() { + `when`(loopHub.isConnected).thenReturn(true) + `when`(loopHub.insulinOnboard).thenReturn(3.14) + `when`(loopHub.temporaryBasal).thenReturn(0.8) + val from = getGlucoseValuesFrom + `when`(loopHub.getGlucoseValues(from, true)).thenReturn( + listOf(createGlucoseValue(Instant.ofEpochSecond(1_000)))) + val hr = createHeartRate(99) + val uri = createUri(hr) + val result = gp.onGetBloodGlucose(mock(SocketAddress::class.java), uri, null) + assertEquals( + "{\"encodedGlucose\":\"0A+6AQ==\"," + + "\"remainingInsulin\":3.14," + + "\"glucoseUnit\":\"mmoll\",\"temporaryBasalRate\":0.8," + + "\"profile\":\"D\",\"connected\":true}", + result.toString()) + verify(loopHub).getGlucoseValues(from, true) + verify(loopHub).insulinOnboard + verify(loopHub).temporaryBasal + verify(loopHub).isConnected + verify(loopHub).glucoseUnit + verify(loopHub).storeHeartRate( + Instant.ofEpochSecond(hr["hrStart"] as Long), + Instant.ofEpochSecond(hr["hrEnd"] as Long), + 99, + hr["device"] as String) + } + + @Test + fun testOnGetBloodGlucose_Wait() { + `when`(loopHub.isConnected).thenReturn(true) + `when`(loopHub.insulinOnboard).thenReturn(3.14) + `when`(loopHub.temporaryBasal).thenReturn(0.8) + `when`(loopHub.glucoseUnit).thenReturn(GlucoseUnit.MMOL) + val from = getGlucoseValuesFrom + `when`(loopHub.getGlucoseValues(from, true)).thenReturn( + listOf(createGlucoseValue(clock.instant().minusSeconds(330)))) + val params = createHeartRate(99).toMutableMap() + params["wait"] = 10 + val uri = createUri(params) + gp.newValue = mock(Condition::class.java) + val result = gp.onGetBloodGlucose(mock(SocketAddress::class.java), uri, null) + assertEquals( + "{\"encodedGlucose\":\"/wS6AQ==\"," + + "\"remainingInsulin\":3.14," + + "\"glucoseUnit\":\"mmoll\",\"temporaryBasalRate\":0.8," + + "\"profile\":\"D\",\"connected\":true}", + result.toString()) + verify(gp.newValue).awaitNanos(anyLong()) + verify(loopHub, times(2)).getGlucoseValues(from, true) + verify(loopHub).insulinOnboard + verify(loopHub).temporaryBasal + verify(loopHub).isConnected + verify(loopHub).glucoseUnit + verify(loopHub).storeHeartRate( + Instant.ofEpochSecond(params["hrStart"] as Long), + Instant.ofEpochSecond(params["hrEnd"] as Long), + 99, + params["device"] as String) + } + + @Test + fun testOnPostCarbs() { + val uri = createUri(mapOf("carbs" to "12")) + assertEquals("", gp.onPostCarbs(mock(SocketAddress::class.java), uri, null)) + verify(loopHub).postCarbs(12) + } + + @Test + fun testOnConnectPump_Disconnect() { + val uri = createUri(mapOf("disconnectMinutes" to "20")) + `when`(loopHub.isConnected).thenReturn(false) + assertEquals("{\"connected\":false}", gp.onConnectPump(mock(SocketAddress::class.java), uri, null)) + verify(loopHub).disconnectPump(20) + verify(loopHub).isConnected + } + + @Test + fun testOnConnectPump_Connect() { + val uri = createUri(mapOf("disconnectMinutes" to "0")) + `when`(loopHub.isConnected).thenReturn(true) + assertEquals("{\"connected\":true}", gp.onConnectPump(mock(SocketAddress::class.java), uri, null)) + verify(loopHub).connectPump() + verify(loopHub).isConnected + } } diff --git a/plugins/sync/src/test/kotlin/app/aaps/plugins/sync/garmin/LoopHubTest.kt b/plugins/sync/src/test/kotlin/app/aaps/plugins/sync/garmin/LoopHubTest.kt index 6f1cccad86..a88facfa05 100644 --- a/plugins/sync/src/test/kotlin/app/aaps/plugins/sync/garmin/LoopHubTest.kt +++ b/plugins/sync/src/test/kotlin/app/aaps/plugins/sync/garmin/LoopHubTest.kt @@ -1,8 +1,8 @@ package app.aaps.plugins.sync.garmin - import app.aaps.core.interfaces.aps.APSResult import app.aaps.core.interfaces.aps.Loop +import app.aaps.core.interfaces.constraints.Constraint import app.aaps.core.interfaces.constraints.ConstraintsChecker import app.aaps.core.interfaces.db.GlucoseUnit import app.aaps.core.interfaces.iob.IobCobCalculator @@ -10,13 +10,19 @@ import app.aaps.core.interfaces.iob.IobTotal import app.aaps.core.interfaces.logging.UserEntryLogger import app.aaps.core.interfaces.profile.Profile import app.aaps.core.interfaces.profile.ProfileFunction +import app.aaps.core.interfaces.pump.DetailedBolusInfo import app.aaps.core.interfaces.queue.CommandQueue +import app.aaps.core.interfaces.sharedPreferences.SP import app.aaps.database.ValueWrapper import app.aaps.database.entities.EffectiveProfileSwitch import app.aaps.database.entities.GlucoseValue import app.aaps.database.entities.HeartRate +import app.aaps.database.entities.OfflineEvent +import app.aaps.database.entities.UserEntry +import app.aaps.database.entities.ValueWithUnit import app.aaps.database.entities.embedments.InsulinConfiguration import app.aaps.database.impl.AppRepository +import app.aaps.database.impl.transactions.CancelCurrentOfflineEventIfAnyTransaction import app.aaps.database.impl.transactions.InsertOrUpdateHeartRateTransaction import app.aaps.shared.tests.TestBase import io.reactivex.rxjava3.core.Completable @@ -27,6 +33,8 @@ import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test +import org.mockito.ArgumentMatchers.argThat +import org.mockito.ArgumentMatchers.isNull import org.mockito.Mock import org.mockito.Mockito.mock import org.mockito.Mockito.times @@ -45,13 +53,17 @@ class LoopHubTest: TestBase() { @Mock lateinit var profileFunction: ProfileFunction @Mock lateinit var repo: AppRepository @Mock lateinit var userEntryLogger: UserEntryLogger + @Mock lateinit var sp: SP private lateinit var loopHub: LoopHubImpl private val clock = Clock.fixed(Instant.ofEpochMilli(10_000), ZoneId.of("UTC")) @BeforeEach fun setup() { - loopHub = LoopHubImpl(iobCobCalculator, loop, profileFunction, repo) + loopHub = LoopHubImpl( + aapsLogger, commandQueue, constraints, iobCobCalculator, loop, + profileFunction, repo, userEntryLogger, sp + ) loopHub.clock = clock } @@ -83,18 +95,10 @@ class LoopHubTest: TestBase() { @Test fun testGlucoseUnit() { - val profile = mock(Profile::class.java) - `when`(profile.units).thenReturn(GlucoseUnit.MMOL) - `when`(profileFunction.getProfile()).thenReturn(profile) - assertEquals(GlucoseUnit.MMOL, loopHub.glucoseUnit) - verify(profileFunction, times(1)).getProfile() - } - - @Test - fun testGlucoseUnitNullProfile() { - `when`(profileFunction.getProfile()).thenReturn(null) + `when`(sp.getString(app.aaps.core.utils.R.string.key_units, GlucoseUnit.MGDL.asText)).thenReturn("mg/dl") assertEquals(GlucoseUnit.MGDL, loopHub.glucoseUnit) - verify(profileFunction, times(1)).getProfile() + `when`(sp.getString(app.aaps.core.utils.R.string.key_units, GlucoseUnit.MGDL.asText)).thenReturn("mmol") + assertEquals(GlucoseUnit.MMOL, loopHub.glucoseUnit) } @Test @@ -165,6 +169,32 @@ class LoopHubTest: TestBase() { verify(loop, times(1)).lastRun } + @Test + fun testConnectPump() { + val c = mock(Completable::class.java) + val dummy = CancelCurrentOfflineEventIfAnyTransaction(0) + val matcher = { + argThat { t -> t.timestamp == clock.millis() }} + `when`(repo.runTransaction(matcher() ?: dummy)).thenReturn(c) + loopHub.connectPump() + verify(repo).runTransaction(matcher() ?: dummy) + verify(commandQueue).cancelTempBasal(true, null) + verify(userEntryLogger).log(UserEntry.Action.RECONNECT, UserEntry.Sources.GarminDevice) + } + + @Test + fun testDisconnectPump() { + val profile = mock(Profile::class.java) + `when`(profileFunction.getProfile()).thenReturn(profile) + loopHub.disconnectPump(23) + verify(profileFunction).getProfile() + verify(loop).goToZeroTemp(23, profile, OfflineEvent.Reason.DISCONNECT_PUMP) + verify(userEntryLogger).log( + UserEntry.Action.DISCONNECT, + UserEntry.Sources.GarminDevice, + ValueWithUnit.Minute(23)) + } + @Test fun testGetGlucoseValues() { val glucoseValues = listOf( @@ -180,6 +210,25 @@ class LoopHubTest: TestBase() { verify(repo).compatGetBgReadingsDataFromTime(1001_000, false) } + @Test + fun testPostCarbs() { + @Suppress("unchecked_cast") + val constraint = mock(Constraint::class.java) as Constraint + `when`(constraint.value()).thenReturn(99) + `when`(constraints.getMaxCarbsAllowed()).thenReturn(constraint) + loopHub.postCarbs(100) + verify(constraints).getMaxCarbsAllowed() + verify(userEntryLogger).log( + UserEntry.Action.CARBS, + UserEntry.Sources.GarminDevice, + ValueWithUnit.Gram(99)) + verify(commandQueue).bolus( + argThat { b -> + b!!.eventType == DetailedBolusInfo.EventType.CARBS_CORRECTION && + b.carbs == 99.0 }?: DetailedBolusInfo() , + isNull()) + } + @Test fun testStoreHeartRate() { val samplingStart = Instant.ofEpochMilli(1_001_000) From 0845f082b9c06cb909a896c30df8584e905e2ce7 Mon Sep 17 00:00:00 2001 From: swissalpine Date: Mon, 30 Oct 2023 23:31:40 +0100 Subject: [PATCH 27/60] Like in overview tab: Show smoothed bg value --- ui/src/main/kotlin/app/aaps/ui/widget/Widget.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/src/main/kotlin/app/aaps/ui/widget/Widget.kt b/ui/src/main/kotlin/app/aaps/ui/widget/Widget.kt index 0b3dfd892d..7da495f72b 100644 --- a/ui/src/main/kotlin/app/aaps/ui/widget/Widget.kt +++ b/ui/src/main/kotlin/app/aaps/ui/widget/Widget.kt @@ -132,7 +132,7 @@ class Widget : AppWidgetProvider() { private fun updateBg(views: RemoteViews) { views.setTextViewText( R.id.bg, - overviewData.lastBg(iobCobCalculator.ads)?.let { profileUtil.fromMgdlToStringInUnits(it.value) } ?: rh.gs(app.aaps.core.ui.R.string.value_unavailable_short)) + overviewData.lastBg(iobCobCalculator.ads)?.let { profileUtil.fromMgdlToStringInUnits(it.recalculated) } ?: rh.gs(app.aaps.core.ui.R.string.value_unavailable_short)) views.setTextColor( R.id.bg, when { overviewData.isLow(iobCobCalculator.ads) -> rh.gc(app.aaps.core.ui.R.color.widget_low) @@ -285,4 +285,4 @@ class Widget : AppWidgetProvider() { } else views.setViewVisibility(R.id.variable_sensitivity, View.GONE) } else views.setViewVisibility(R.id.variable_sensitivity, View.GONE) } -} \ No newline at end of file +} From 9881be1309b840890a2b7669dabc6263de734fe2 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Tue, 31 Oct 2023 09:08:01 +0100 Subject: [PATCH 28/60] prevent NPE in import list --- .../maintenance/PrefFileListProviderImpl.kt | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/PrefFileListProviderImpl.kt b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/PrefFileListProviderImpl.kt index 33f1162eca..a98c17402a 100644 --- a/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/PrefFileListProviderImpl.kt +++ b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/PrefFileListProviderImpl.kt @@ -11,7 +11,6 @@ import app.aaps.core.interfaces.maintenance.PrefsImportDir import app.aaps.core.interfaces.maintenance.PrefsMetadataKey import app.aaps.core.interfaces.resources.ResourceHelper import app.aaps.core.interfaces.rx.bus.RxBus -import app.aaps.core.interfaces.rx.weardata.CwfData import app.aaps.core.interfaces.rx.weardata.CwfFile import app.aaps.core.interfaces.rx.weardata.EventData import app.aaps.core.interfaces.rx.weardata.ZipWatchfaceFormat @@ -30,7 +29,6 @@ import org.joda.time.Hours import org.joda.time.LocalDateTime import org.joda.time.format.DateTimeFormat import java.io.File -import java.util.zip.ZipInputStream import javax.inject.Inject import kotlin.math.abs @@ -89,10 +87,13 @@ class PrefFileListProviderImpl @Inject constructor( // we sort only if we have metadata to be used for that if (loadMetadata) { - prefFiles.sortWith( - compareByDescending { it.metadata[PrefsMetadataKeyImpl.AAPS_FLAVOUR]?.status as PrefsStatusImpl } - .thenByDescending { it.metadata[PrefsMetadataKeyImpl.CREATED_AT]?.value } - ) + prefFiles + .filter { it.metadata[PrefsMetadataKeyImpl.AAPS_FLAVOUR]?.status != null } + .toMutableList() + .sortWith( + compareByDescending { it.metadata[PrefsMetadataKeyImpl.AAPS_FLAVOUR]?.status as PrefsStatusImpl } + .thenByDescending { it.metadata[PrefsMetadataKeyImpl.CREATED_AT]?.value } + ) } return prefFiles From 656e3e44bef9416275a66734658b79bfce6879bb Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Tue, 31 Oct 2023 09:17:54 +0100 Subject: [PATCH 29/60] RL: prevent crash with BT off --- .../pump/common/dialog/RileyLinkBLEConfigActivity.kt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/dialog/RileyLinkBLEConfigActivity.kt b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/dialog/RileyLinkBLEConfigActivity.kt index e118910538..4d4b403186 100644 --- a/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/dialog/RileyLinkBLEConfigActivity.kt +++ b/pump/rileylink/src/main/java/info/nightscout/androidaps/plugins/pump/common/dialog/RileyLinkBLEConfigActivity.kt @@ -219,9 +219,11 @@ class RileyLinkBLEConfigActivity : TranslatedDaggerAppCompatActivity() { } scanning = true if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S || ActivityCompat.checkSelfPermission(this, Manifest.permission.BLUETOOTH_SCAN) == PackageManager.PERMISSION_GRANTED) { - bleScanner?.startScan(filters, settings, bleScanCallback) - aapsLogger.debug(LTag.PUMPBTCOMM, "startLeDeviceScan: Scanning Start") - Toast.makeText(this@RileyLinkBLEConfigActivity, R.string.riley_link_ble_config_scan_scanning, Toast.LENGTH_SHORT).show() + if (bluetoothAdapter?.isEnabled == true && bluetoothAdapter?.state == BluetoothAdapter.STATE_ON) { + bleScanner?.startScan(filters, settings, bleScanCallback) + aapsLogger.debug(LTag.PUMPBTCOMM, "startLeDeviceScan: Scanning Start") + Toast.makeText(this@RileyLinkBLEConfigActivity, R.string.riley_link_ble_config_scan_scanning, Toast.LENGTH_SHORT).show() + } } } From fec3e71aef003be8a6a604428a6d473f0596a095 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Tue, 31 Oct 2023 11:32:43 +0100 Subject: [PATCH 30/60] NSC: fix sync if there is messed up date in phone --- .../sync/nsShared/NsIncomingDataProcessor.kt | 36 +++++++++++++------ .../sync/nsclientV3/workers/LoadBgWorker.kt | 2 +- .../workers/LoadTreatmentsWorker.kt | 4 +-- 3 files changed, 29 insertions(+), 13 deletions(-) diff --git a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsShared/NsIncomingDataProcessor.kt b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsShared/NsIncomingDataProcessor.kt index 4051ca563f..88dd660b88 100644 --- a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsShared/NsIncomingDataProcessor.kt +++ b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsShared/NsIncomingDataProcessor.kt @@ -81,10 +81,15 @@ class NsIncomingDataProcessor @Inject constructor( ) } + /** + * Preprocess list of SGVs + * + * @return true if there was an accepted SGV + */ @Suppress("SpellCheckingInspection") - fun processSgvs(sgvs: Any) { + fun processSgvs(sgvs: Any): Boolean { - if (!nsClientSource.isEnabled() && !sp.getBoolean(app.aaps.core.utils.R.string.key_ns_receive_cgm, false)) return + if (!nsClientSource.isEnabled() && !sp.getBoolean(app.aaps.core.utils.R.string.key_ns_receive_cgm, false)) return false var latestDateInReceivedData: Long = 0 aapsLogger.debug(LTag.NSCLIENT, "Received NS Data: $sgvs") @@ -104,16 +109,24 @@ class NsIncomingDataProcessor @Inject constructor( glucoseValues += sgv } } - activePlugin.activeNsClient?.updateLatestBgReceivedIfNewer(latestDateInReceivedData) - // Was that sgv more less 5 mins ago ? - if (T.msecs(dateUtil.now() - latestDateInReceivedData).mins() < 5L) { - rxBus.send(EventDismissNotification(Notification.NS_ALARM)) - rxBus.send(EventDismissNotification(Notification.NS_URGENT_ALARM)) + if (latestDateInReceivedData > 0) { + activePlugin.activeNsClient?.updateLatestBgReceivedIfNewer(latestDateInReceivedData) + // Was that sgv more less 5 mins ago ? + if (T.msecs(dateUtil.now() - latestDateInReceivedData).mins() < 5L) { + rxBus.send(EventDismissNotification(Notification.NS_ALARM)) + rxBus.send(EventDismissNotification(Notification.NS_URGENT_ALARM)) + } + storeDataForDb.glucoseValues.addAll(glucoseValues) } - storeDataForDb.glucoseValues.addAll(glucoseValues) + return latestDateInReceivedData > 0 } - fun processTreatments(treatments: List) { + /** + * Preprocess list of treatments + * + * @return true if there was an accepted treatment + */ + fun processTreatments(treatments: List): Boolean { try { var latestDateInReceivedData: Long = 0 for (treatment in treatments) { @@ -189,11 +202,14 @@ class NsIncomingDataProcessor @Inject constructor( } } } - activePlugin.activeNsClient?.updateLatestTreatmentReceivedIfNewer(latestDateInReceivedData) + if (latestDateInReceivedData > 0) + activePlugin.activeNsClient?.updateLatestTreatmentReceivedIfNewer(latestDateInReceivedData) + return latestDateInReceivedData > 0 } catch (error: Exception) { aapsLogger.error("Error: ", error) rxBus.send(EventNSClientNewLog("◄ ERROR", error.localizedMessage)) } + return false } fun processFood(data: Any) { diff --git a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclientV3/workers/LoadBgWorker.kt b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclientV3/workers/LoadBgWorker.kt index e2bbe80482..360fe14072 100644 --- a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclientV3/workers/LoadBgWorker.kt +++ b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclientV3/workers/LoadBgWorker.kt @@ -65,7 +65,7 @@ class LoadBgWorker( sp.putBoolean(app.aaps.core.utils.R.string.key_objectives_bg_is_available_in_ns, true) // Schedule processing of fetched data and continue of loading continueLoading = response.code != 304 - nsIncomingDataProcessor.processSgvs(sgvs) + continueLoading = nsIncomingDataProcessor.processSgvs(sgvs) } else { // End first load if (isFirstLoad) { diff --git a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclientV3/workers/LoadTreatmentsWorker.kt b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclientV3/workers/LoadTreatmentsWorker.kt index 0b6e7f7840..e32b3419e1 100644 --- a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclientV3/workers/LoadTreatmentsWorker.kt +++ b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclientV3/workers/LoadTreatmentsWorker.kt @@ -58,8 +58,8 @@ class LoadTreatmentsWorker( val action = if (isFirstLoad) "RCV-F" else "RCV" rxBus.send(EventNSClientNewLog("◄ $action", "${treatments.size} TRs from ${dateUtil.dateAndTimeAndSecondsString(lastLoaded)}")) // Schedule processing of fetched data and continue of loading - continueLoading = response.code != 304 - nsIncomingDataProcessor.processTreatments(response.values) + continueLoading = + response.code != 304 && nsIncomingDataProcessor.processTreatments(response.values) } else { // End first load if (isFirstLoad) { From ddc643b83ac6848e4e50554d14eb2906d591cb95 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Tue, 31 Oct 2023 15:29:02 +0100 Subject: [PATCH 31/60] NSC: reset client on preference change --- .../kotlin/app/aaps/plugins/sync/nsclientV3/NSClientV3Plugin.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclientV3/NSClientV3Plugin.kt b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclientV3/NSClientV3Plugin.kt index 21555b15bb..5bfdb0ed8c 100644 --- a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclientV3/NSClientV3Plugin.kt +++ b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclientV3/NSClientV3Plugin.kt @@ -222,6 +222,7 @@ class NSClientV3Plugin @Inject constructor( ev.isChanged(rh.gs(app.aaps.core.utils.R.string.key_ns_announcements)) ) { stopService() + nsAndroidClient = null setClient() } if (ev.isChanged(rh.gs(app.aaps.core.utils.R.string.key_local_profile_last_change))) From 32ec95d47414664ddaed07278589e851d271eb03 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Wed, 1 Nov 2023 13:40:14 +0100 Subject: [PATCH 32/60] fix copy/paste error --- .../app/aaps/plugins/sync/nsclientV3/workers/LoadBgWorker.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclientV3/workers/LoadBgWorker.kt b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclientV3/workers/LoadBgWorker.kt index 360fe14072..5e2976c9b4 100644 --- a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclientV3/workers/LoadBgWorker.kt +++ b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclientV3/workers/LoadBgWorker.kt @@ -64,8 +64,7 @@ class LoadBgWorker( // Objective0 sp.putBoolean(app.aaps.core.utils.R.string.key_objectives_bg_is_available_in_ns, true) // Schedule processing of fetched data and continue of loading - continueLoading = response.code != 304 - continueLoading = nsIncomingDataProcessor.processSgvs(sgvs) + continueLoading = response.code != 304 && nsIncomingDataProcessor.processSgvs(sgvs) } else { // End first load if (isFirstLoad) { From fecca3b107fce3c268f8d6df56830dfd7ad533d2 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Wed, 1 Nov 2023 15:22:05 +0100 Subject: [PATCH 33/60] New Crowdin updates (#2989) * New translations strings.xml (Italian) * New translations strings.xml (Italian) * New translations strings.xml (Italian) * New translations strings.xml (Italian) * New translations strings.xml (Italian) * New translations strings.xml (Italian) * New translations exam.xml (Italian) * New translations strings.xml (Italian) * New translations strings.xml (Norwegian Bokmal) * Update source file strings.xml * New translations strings.xml (Czech) * New translations strings.xml (Hebrew) * New translations strings.xml (French) * New translations strings.xml (Spanish) * New translations strings.xml (Slovak) * New translations strings.xml (Czech) * New translations strings.xml (Romanian) * New translations strings.xml (French) * New translations strings.xml (Spanish) * New translations strings.xml (Bulgarian) * New translations strings.xml (Czech) * New translations strings.xml (Danish) * New translations strings.xml (German) * New translations strings.xml (Greek) * New translations strings.xml (Hebrew) * New translations strings.xml (Italian) * New translations strings.xml (Korean) * New translations strings.xml (Lithuanian) * New translations strings.xml (Dutch) * New translations strings.xml (Polish) * New translations strings.xml (Portuguese) * New translations strings.xml (Russian) * New translations strings.xml (Slovak) * New translations strings.xml (Swedish) * New translations strings.xml (Turkish) * New translations strings.xml (Portuguese, Brazilian) * New translations strings.xml (Croatian) * New translations strings.xml (Italian) * New translations strings.xml (Turkish) * New translations strings.xml (Norwegian Bokmal) * Update source file strings.xml * New translations strings.xml (Czech) * New translations strings.xml (Hebrew) * New translations strings.xml (Italian) * New translations strings.xml (Turkish) * New translations strings.xml (Norwegian Bokmal) * New translations strings.xml (Norwegian Bokmal) * Update source file strings.xml * New translations strings.xml (Romanian) * New translations strings.xml (Romanian) * New translations strings.xml (Czech) * New translations strings.xml (Italian) * New translations strings.xml (Turkish) * New translations strings.xml (Romanian) * New translations strings.xml (Norwegian Bokmal) * New translations strings.xml (Dutch) * New translations strings.xml (Hebrew) * New translations strings.xml (Dutch) * New translations exam.xml (Italian) * New translations objectives.xml (Italian) * New translations strings.xml (Lithuanian) * New translations strings.xml (Lithuanian) * New translations strings.xml (Lithuanian) * New translations strings.xml (Lithuanian) * New translations strings.xml (Spanish) * New translations strings.xml (Lithuanian) * New translations strings.xml (Spanish) * New translations strings.xml (Lithuanian) * New translations oh_strings.xml (Lithuanian) * New translations strings.xml (Lithuanian) * New translations strings.xml (Lithuanian) * New translations strings.xml (Lithuanian) * New translations strings.xml (Lithuanian) * New translations strings.xml (Lithuanian) * New translations strings.xml (Lithuanian) * New translations strings.xml (Lithuanian) * New translations strings.xml (Lithuanian) * New translations strings.xml (Lithuanian) * New translations strings.xml (Lithuanian) * New translations oh_strings.xml (Lithuanian) * New translations strings.xml (Lithuanian) * New translations strings.xml (Norwegian Bokmal) * New translations strings.xml (Norwegian Bokmal) * New translations strings.xml (Norwegian Bokmal) * New translations strings.xml (Norwegian Bokmal) * New translations strings.xml (Norwegian Bokmal) * New translations strings.xml (Lithuanian) * New translations strings.xml (Dutch) * New translations strings.xml (Lithuanian) * New translations strings.xml (Lithuanian) * New translations strings.xml (Lithuanian) * New translations strings.xml (Lithuanian) * New translations strings.xml (Lithuanian) * New translations strings.xml (Lithuanian) * New translations strings.xml (Lithuanian) * New translations strings.xml (Lithuanian) * New translations strings.xml (Polish) * New translations strings.xml (Lithuanian) * New translations strings.xml (Lithuanian) * New translations strings.xml (Lithuanian) * New translations strings.xml (Lithuanian) * New translations strings.xml (Hebrew) * New translations strings.xml (Lithuanian) * New translations strings.xml (Polish) * New translations strings.xml (Lithuanian) * New translations exam.xml (Lithuanian) * New translations strings.xml (Lithuanian) * New translations oh_strings.xml (Lithuanian) * New translations strings.xml (Polish) * New translations strings.xml (Norwegian Bokmal) * New translations strings.xml (Dutch) * New translations strings.xml (Norwegian Bokmal) * New translations strings.xml (Norwegian Bokmal) * New translations strings.xml (Lithuanian) * New translations strings.xml (Lithuanian) * New translations strings.xml (Lithuanian) * New translations strings.xml (Lithuanian) * New translations objectives.xml (Lithuanian) * New translations strings.xml (Lithuanian) * New translations objectives.xml (Norwegian Bokmal) * New translations strings.xml (Russian) * New translations strings.xml (Russian) * New translations strings.xml (Lithuanian) * New translations strings.xml (Spanish) * New translations strings.xml (Italian) * New translations strings.xml (Lithuanian) * New translations strings.xml (Russian) * New translations strings.xml (Norwegian Bokmal) * New translations strings.xml (Norwegian Bokmal) * New translations objectives.xml (Norwegian Bokmal) --- app/src/main/res/values-lt-rLT/strings.xml | 6 +-- .../src/main/res/values-it-rIT/strings.xml | 3 ++ .../src/main/res/values-lt-rLT/strings.xml | 4 +- .../ui/src/main/res/values-it-rIT/strings.xml | 8 ++++ .../ui/src/main/res/values-lt-rLT/strings.xml | 22 +++++------ .../src/main/res/values-lt-rLT/strings.xml | 18 ++++----- .../src/main/res/values-bg-rBG/strings.xml | 1 - .../src/main/res/values-cs-rCZ/strings.xml | 3 +- .../src/main/res/values-da-rDK/strings.xml | 1 - .../src/main/res/values-de-rDE/strings.xml | 1 - .../src/main/res/values-el-rGR/strings.xml | 1 - .../src/main/res/values-es-rES/strings.xml | 1 + .../src/main/res/values-fr-rFR/strings.xml | 1 - .../src/main/res/values-hr-rHR/strings.xml | 1 - .../src/main/res/values-it-rIT/strings.xml | 3 ++ .../src/main/res/values-iw-rIL/strings.xml | 3 +- .../src/main/res/values-ko-rKR/strings.xml | 1 - .../src/main/res/values-lt-rLT/strings.xml | 3 +- .../src/main/res/values-nb-rNO/strings.xml | 15 ++++---- .../src/main/res/values-nl-rNL/strings.xml | 3 +- .../src/main/res/values-pl-rPL/strings.xml | 3 +- .../src/main/res/values-pt-rBR/strings.xml | 1 - .../src/main/res/values-pt-rPT/strings.xml | 1 - .../src/main/res/values-ro-rRO/strings.xml | 3 +- .../src/main/res/values-ru-rRU/strings.xml | 3 +- .../src/main/res/values-sk-rSK/strings.xml | 1 - .../src/main/res/values-sv-rSE/strings.xml | 1 - .../src/main/res/values-tr-rTR/strings.xml | 3 +- .../src/main/res/values-lt-rLT/strings.xml | 4 +- .../src/main/res/values-nb-rNO/strings.xml | 4 +- .../src/main/res/values-lt-rLT/strings.xml | 24 ++++++------ .../src/main/res/values-nb-rNO/strings.xml | 2 +- .../src/main/res/values-it-rIT/exam.xml | 9 +++-- .../src/main/res/values-it-rIT/objectives.xml | 2 +- .../src/main/res/values-lt-rLT/exam.xml | 2 +- .../src/main/res/values-lt-rLT/objectives.xml | 4 +- .../src/main/res/values-lt-rLT/strings.xml | 8 ++-- .../src/main/res/values-lt-rLT/strings.xml | 20 +++++----- .../src/main/res/values-lt-rLT/strings.xml | 32 ++++++++-------- .../src/main/res/values-cs-rCZ/strings.xml | 1 + .../src/main/res/values-es-rES/strings.xml | 1 + .../src/main/res/values-it-rIT/strings.xml | 6 +++ .../src/main/res/values-iw-rIL/strings.xml | 3 +- .../src/main/res/values-lt-rLT/oh_strings.xml | 8 ++-- .../src/main/res/values-lt-rLT/strings.xml | 38 +++++++++---------- .../src/main/res/values-nb-rNO/strings.xml | 1 + .../src/main/res/values-nl-rNL/strings.xml | 1 + .../src/main/res/values-pl-rPL/strings.xml | 1 + .../src/main/res/values-ro-rRO/strings.xml | 1 + .../src/main/res/values-ru-rRU/strings.xml | 1 + .../src/main/res/values-tr-rTR/strings.xml | 1 + .../src/main/res/values-lt-rLT/strings.xml | 2 +- .../src/main/res/values-lt-rLT/strings.xml | 8 ++-- .../src/main/res/values-lt-rLT/strings.xml | 10 ++--- .../src/main/res/values-cs-rCZ/strings.xml | 1 + .../src/main/res/values-es-rES/strings.xml | 1 + .../src/main/res/values-fr-rFR/strings.xml | 1 + .../src/main/res/values-it-rIT/strings.xml | 14 +++++++ .../src/main/res/values-iw-rIL/strings.xml | 1 + .../src/main/res/values-nb-rNO/strings.xml | 1 + .../src/main/res/values-nl-rNL/strings.xml | 1 + .../src/main/res/values-pl-rPL/strings.xml | 1 + .../src/main/res/values-ro-rRO/strings.xml | 1 + .../src/main/res/values-ru-rRU/strings.xml | 1 + .../src/main/res/values-sk-rSK/strings.xml | 1 + .../src/main/res/values-tr-rTR/strings.xml | 1 + .../src/main/res/values-it-rIT/strings.xml | 5 +++ .../src/main/res/values-lt-rLT/strings.xml | 10 ++--- .../src/main/res/values-lt-rLT/strings.xml | 4 +- .../src/main/res/values-lt-rLT/strings.xml | 4 +- ui/src/main/res/values-lt-rLT/strings.xml | 2 +- wear/src/main/res/values-it-rIT/strings.xml | 3 ++ 72 files changed, 211 insertions(+), 151 deletions(-) diff --git a/app/src/main/res/values-lt-rLT/strings.xml b/app/src/main/res/values-lt-rLT/strings.xml index 0b5fa59d98..5d9cbc0dd7 100644 --- a/app/src/main/res/values-lt-rLT/strings.xml +++ b/app/src/main/res/values-lt-rLT/strings.xml @@ -17,8 +17,8 @@ Apie Trūksta telefono būsenos leidimo Aliarmų nustatymai - Sukurti pranešimus iš NS aliarmų - Sukurkite pranešimus iš NS perspėjimų + Kurti pranešimus iš NS aliarmų + Kurti pranešimus iš NS perspėjimų Seni duomenys, riba [min] Kritiškai seni duomenys, riba [min] Įjungę Autosens funkciją nepamirškite įvedinėti visus valgomus angliavandenius. To nedarant, angliavandenių sukeliami glikemijos svyravimai bus klaidingai identifikuojami kaip jautrumo pasikeitimai! @@ -48,7 +48,7 @@ Valyti filtrą Kaniulė El. pašto adresas - Pašalinti KG duomenis + Pašalinti glikemijos duomenis Kūrėjo režime tapatybė nenustatyta dialogas diff --git a/core/interfaces/src/main/res/values-it-rIT/strings.xml b/core/interfaces/src/main/res/values-it-rIT/strings.xml index 2033fbf949..7d993786e9 100644 --- a/core/interfaces/src/main/res/values-it-rIT/strings.xml +++ b/core/interfaces/src/main/res/values-it-rIT/strings.xml @@ -57,6 +57,8 @@ Mostra BGI Mostra frecce direzionali Mostra Indietro + Mostra numeri della settimana + Mostra la data Watchface predefinita, puoi fare click sul tasto ESPORTA WATCHFACE per generare un template Watchface predefinita Immagine sfondo @@ -83,6 +85,7 @@ AM o PM Nome del giorno della settimana Giorno (DD) + Numero settimana (ww) Nome del mese (breve) Stato loop e indietro Freccia direzionale diff --git a/core/interfaces/src/main/res/values-lt-rLT/strings.xml b/core/interfaces/src/main/res/values-lt-rLT/strings.xml index ea9d7b79e4..5d1e22e0a4 100644 --- a/core/interfaces/src/main/res/values-lt-rLT/strings.xml +++ b/core/interfaces/src/main/res/values-lt-rLT/strings.xml @@ -53,7 +53,7 @@ Rodyti įrenginio bateriją Rodyti valandinę bazę Rodyti Ciklo statusą - Rodyti KG + Rodyti glikemiją Rodyti GĮ Rodyti krypties rodyklę Laikas nuo pask. vertės @@ -76,7 +76,7 @@ Telefono baterija (%) Baterija (%) Bazė - KGI vertė + BGI vertė Laikas (val:min arba val:min:sek) Val. Min. diff --git a/core/ui/src/main/res/values-it-rIT/strings.xml b/core/ui/src/main/res/values-it-rIT/strings.xml index e01c9f4b87..7a52770ca0 100644 --- a/core/ui/src/main/res/values-it-rIT/strings.xml +++ b/core/ui/src/main/res/values-it-rIT/strings.xml @@ -51,6 +51,7 @@ Bolo esteso In pausa TDD totale + Dati vecchi Sto per erogare %1$.2f U In attesa del micro AAPS avviato @@ -167,6 +168,8 @@ Carica stato micro su NS o Tidepool Loop disabilitato/sospeso Insulina attiva (IOB) + TARGET: + RISULTATO OAPS: Password errata PIN errato @@ -462,6 +465,8 @@ Il bolo sarà solo registrato (non erogato dal micro) Esegui allarme quando è tempo di mangiare Nessuna azione selezionata, non succederà nulla + CHO = 0. Nessuna azione intrapresa! + Insulina non necessaria! Nessun recente valore BG su cui basare il calcolo! Nessun profilo attivo! Valore COB sconosciuto! Lettura BG mancante o recente riavvio dell\'app? @@ -581,6 +586,7 @@ Vuoi pulire il database?\nIl processo rimuoverà i cambiamenti tracciati e i dati dello storico più vecchi di 3 mesi.\nFarlo velocizzerà considerevolmente la sincronizzazione completa. Elementi cancellati + Dom Sab Ven Gio @@ -596,4 +602,6 @@ S D + %1$.1f U + %1$.2f U diff --git a/core/ui/src/main/res/values-lt-rLT/strings.xml b/core/ui/src/main/res/values-lt-rLT/strings.xml index c2b090cc8e..07a7f8aaf6 100644 --- a/core/ui/src/main/res/values-lt-rLT/strings.xml +++ b/core/ui/src/main/res/values-lt-rLT/strings.xml @@ -33,14 +33,14 @@ Rezultatas Parametrai Būklės indikatoriai - Perduoti KG duomenis į NS + Siųsti glikemijos duomenis į NS Insulinas n/a Pagrindinis slaptažodis Eksportuoti naudotojo įrašus į Excel (csv) Patvirtinti Pompa - Negauti KG duomenys + Negauti glikemijos duomenys AIO: Nutildyti 5 minutėms Nutildyti @@ -109,10 +109,10 @@ Pridėti naują Pridėti naują aukščiau Duomenys gaunami iš kitos pompos. Pakeiskite pompos valdiklį. - KG + Glikemija Kalibravimas Pranešti po %1$d min - Boluso suleidimo klaida. Rankiniu būdu patikrinkite faktiškai suleistą kiekį + Boluso suleidimo klaida. Patikrinkite faktiškai suleistą kiekį Priminimas apie bolusą Trukmė g @@ -135,7 +135,7 @@ ribose žemas Vidurkis - LNR + LTR ]]> PAŠALINTI Aktyvuoti profilį @@ -146,7 +146,7 @@ Ar tikrai norite pašalinti %1$d elementus Terapija Kurti naują profilį iš šito profilio? - Vedlio nustatymai + Skaičiuotuvo nustatymai 15 min tendencija AAO Bolusų AIO @@ -194,8 +194,8 @@ %1$d min. Priežiūra - KG testas - KG iš kraujo arba kalibracija + Gliukomatis + Gliukomačio rodmenys Pranešimas Pastaba Klausimas @@ -305,7 +305,7 @@ ATNAUJINTI TERAPIJĄ NS ATNAUJINTI LAIKINĄ TIKSLĄ NS AUTOMATIZAVIMAS PAŠALINTAS - KG PAŠALINTA + PAŠALINTA TERAPIJOS PORTALAS PAŠALINTAS BOLUSAS PAŠALINTAS AV PAŠALINTI @@ -469,7 +469,7 @@ Kalk (IA: %1$.1f, JIF: %2$.1f) AV: %1$.2fv AAO: %1$.0fg %2$.2fv - KG: %1$.2fv + Glikemija: %1$.2fv AIO: %1$.2fv Superbolus: %1$.2fv 15\' tendencija: %1$.2fv @@ -557,7 +557,7 @@ Vietovės nustatymas neįjungtas Vietos nustatymo paslauga turi būti įjungta, kad Bluetooth aptikimas veiktų naujesniuose įrenginiuose. AAPS neseka Jūsų lokacijos, o vietos nustatymo paslauga gali būti išjungta po sėkmingo įrenginių susiejimo. - Įskiepių nustatymai + Pradžios ekrano nustatymai Trūksta leidimo SMS diff --git a/implementation/src/main/res/values-lt-rLT/strings.xml b/implementation/src/main/res/values-lt-rLT/strings.xml index abdc0509ad..f3fcc307b9 100644 --- a/implementation/src/main/res/values-lt-rLT/strings.xml +++ b/implementation/src/main/res/values-lt-rLT/strings.xml @@ -1,24 +1,24 @@ - KG + Glikemija Komanda vykdoma Valandinės bazės vertė mažesnė už minimalią. Profilis nenustatytas! Leidimas - %1$s įtraukite į baterijos neoptimizavimo sąrašą tinkamam veikimui užtikrinti - Programai reikia vietos nustatymo leidimo, kad būtų galima naudoti Bluetooth ir WiFi - Aplikacijai reikia leidimo prieigai prie saugyklos, kad galėtų išsaugoti žurnalo įrašus ir eksportavimo nustatymus + Įtraukite %1$s į baterijos optimizavimo išimčių sąrašą tinkamam veikimui užtikrinti + Reikalingas vietovės leidimas, kad būtų galima naudoti Bluetooth ir WiFi + Reikalingas saugyklos leidimas, kad būtų išsaugomi žurnalo įrašai ir nustatymų eksportai Labai žemas - Žemas - Aukštas - Labai aukštas + Žema + Aukšta + Labai aukšta Žemiau Ribose Virš HbA1c: SD: %1$s 14 d. detaliai - Dienos LNR - Nakties LNR + Dienos LTR + Nakties LTR AV diff --git a/plugins/aps/src/main/res/values-bg-rBG/strings.xml b/plugins/aps/src/main/res/values-bg-rBG/strings.xml index c4bbc0100f..b1aba36a56 100644 --- a/plugins/aps/src/main/res/values-bg-rBG/strings.xml +++ b/plugins/aps/src/main/res/values-bg-rBG/strings.xml @@ -1,6 +1,5 @@ - Настройка на чувствителност и кръвна захар Настройка на динамична инсулинова чувствителност % Настройка на динамична инсулинова чувствителност. Настройте над 100% за по-агресивни корекционни дози и под 100% за по-не агресивни корекции. Високите временни цели да вдигат ли чувствителността? diff --git a/plugins/aps/src/main/res/values-cs-rCZ/strings.xml b/plugins/aps/src/main/res/values-cs-rCZ/strings.xml index cd740f57e9..5e09f1e2ce 100644 --- a/plugins/aps/src/main/res/values-cs-rCZ/strings.xml +++ b/plugins/aps/src/main/res/values-cs-rCZ/strings.xml @@ -1,6 +1,7 @@ - Upravit citlivost a glykémii + Upravuje citlivost a bazál + Je-li aktivován plugin DynISF, používá 24h CDD / 7denní CDD jako základ pro výpočet upravené citlivosti a také pro zvyšování/snižování bazálu, stejně jako to dělá standardní funkce Autosens Korekční faktor pro DynamicISF v % Korekční faktor pro DynamicISF. Pro agresivnější korekční dávky nastavte hodnoty vyšší než 100 %, pro méně agresivní korekce nižší než 100 %. Vysoký dočasný cíl zvýší senzitivitu diff --git a/plugins/aps/src/main/res/values-da-rDK/strings.xml b/plugins/aps/src/main/res/values-da-rDK/strings.xml index 4e9a7c55e3..9392ef3f5a 100644 --- a/plugins/aps/src/main/res/values-da-rDK/strings.xml +++ b/plugins/aps/src/main/res/values-da-rDK/strings.xml @@ -1,6 +1,5 @@ - Justér følsomhed og BG DynamiskISF-justeringsfaktor % Justeringsfaktor for DynamiskISF. Indstil mere end 100% for mere aggressive korrektionsdoser og mindre end 100% for mindre aggressive korrektioner. Høj midlertidig basal øger sensitivitet diff --git a/plugins/aps/src/main/res/values-de-rDE/strings.xml b/plugins/aps/src/main/res/values-de-rDE/strings.xml index fe67818a1e..207eb5be31 100644 --- a/plugins/aps/src/main/res/values-de-rDE/strings.xml +++ b/plugins/aps/src/main/res/values-de-rDE/strings.xml @@ -1,6 +1,5 @@ - Empfindlichkeit und BZ anpassen DynamicISF Anpassungsfaktor % Anpassungsfaktor für DynamicISF. Stelle mehr als 100 % für aggressivere Korrekturdosen ein, und weniger als 100 % für weniger aggressive Korrekturen. Hohe temporäre Ziele erhöhen die Sensitivität diff --git a/plugins/aps/src/main/res/values-el-rGR/strings.xml b/plugins/aps/src/main/res/values-el-rGR/strings.xml index 631415502a..b1c6f94094 100644 --- a/plugins/aps/src/main/res/values-el-rGR/strings.xml +++ b/plugins/aps/src/main/res/values-el-rGR/strings.xml @@ -1,6 +1,5 @@ - Ρύθμιση ευαισθησίας και γλυκόζης αίματος DynamicISF Συντελεστής Προσαρμογής % Συντελεστής Προσαρμογής για το DynamicISF. Ρυθμίστε περισσότερο από 100% για πιο επιθετικές διορθωτικές δόσεις και λιγότερο από 100% για λιγότερο επιθετικές διορθώσεις. Ο υψηλός προσωρινός στόχος ανεβάζει την ευαισθησία diff --git a/plugins/aps/src/main/res/values-es-rES/strings.xml b/plugins/aps/src/main/res/values-es-rES/strings.xml index 33d4d77b19..fcd6f101f9 100644 --- a/plugins/aps/src/main/res/values-es-rES/strings.xml +++ b/plugins/aps/src/main/res/values-es-rES/strings.xml @@ -1,6 +1,7 @@ Ajustar sensibilidad y glucosa + Si se activa, ISF Dinámico, utiliza las últimas 24h TDD/7D TDD como base para ajustar el ISF calculado y también para aumentar y disminuir la tasa basal, de la misma manera que lo hace el Autosens estándar Factor de ajuste de ISF Dinámico % Factor de ajuste para ISF Dinámico. Establezca más de 100% para una corrección más agresiva, y menos de 100% para correcciones más susves. Objetivo temporal alto aumenta la sensibilidad diff --git a/plugins/aps/src/main/res/values-fr-rFR/strings.xml b/plugins/aps/src/main/res/values-fr-rFR/strings.xml index bf5098394e..f4eebd4873 100644 --- a/plugins/aps/src/main/res/values-fr-rFR/strings.xml +++ b/plugins/aps/src/main/res/values-fr-rFR/strings.xml @@ -1,6 +1,5 @@ - Ajuster la sensibilité et la glycémie Facteur d\'ajustement Si dynamique % Facteur d\'ajustement pour Si dynamique. Définissez plus de 100 % pour des corrections plus agressives et moins de 100 % pour des corrections moins agressives. Cible temp. haute élève la sensibilité diff --git a/plugins/aps/src/main/res/values-hr-rHR/strings.xml b/plugins/aps/src/main/res/values-hr-rHR/strings.xml index 06257cb01e..8b430e1c00 100644 --- a/plugins/aps/src/main/res/values-hr-rHR/strings.xml +++ b/plugins/aps/src/main/res/values-hr-rHR/strings.xml @@ -1,6 +1,5 @@ - Podesite osjetljivost i GUK Nema dostupnih podataka o glukozi Stanje algoritma iz 2017. Najnoviji algoritam za napredne korisnike diff --git a/plugins/aps/src/main/res/values-it-rIT/strings.xml b/plugins/aps/src/main/res/values-it-rIT/strings.xml index 15a659e294..1c613179ea 100644 --- a/plugins/aps/src/main/res/values-it-rIT/strings.xml +++ b/plugins/aps/src/main/res/values-it-rIT/strings.xml @@ -1,6 +1,7 @@ Regola sensibilità e BG + Se attivata, DynISF utilizza le ultime 24h TDD/7D TDD come base per aggiustare l\'ISF calcolato e anche per aumentare e diminuire la velocità basale, nello stesso modo in cui fa Autosens Fattore di regolazione per ISF Dinamico (%) Fattore di regolazione per ISF Dinamico. Imposta più del 100% per dosi di correzione più aggressive e meno del 100% per correzioni meno aggressive. Target temporaneo \"alto\" aumenta la sensibilità @@ -83,6 +84,7 @@ SMB disabilitato nelle preferenze UAM disabilitato nelle preferenze Autosens disabilitato nelle preferenze + Autosens disabilitato in ISFdin Limitazione IOB a %1$.1f U a causa di: %2$s valore max nelle preferenze @@ -114,4 +116,5 @@ SMB impostato dal micro Richiesta minima di modifica [%] Il loop aperto mostrerà una nuova richiesta di modifica solo se la modifica è maggiore di questo valore in %. Il valore predefinito è 20% + Ripiego a SMB. Dati TDD insufficienti. diff --git a/plugins/aps/src/main/res/values-iw-rIL/strings.xml b/plugins/aps/src/main/res/values-iw-rIL/strings.xml index 3841e48caf..f413f56ed3 100644 --- a/plugins/aps/src/main/res/values-iw-rIL/strings.xml +++ b/plugins/aps/src/main/res/values-iw-rIL/strings.xml @@ -1,6 +1,7 @@ - כיוונון הרגישות והסוכר בדם + כיוונון הרגישות והמינון הבזאלי + הרגישות הדינמית תשתמש בסך מינון האינסולין של 24 השעות האחרונות או של השבוע האחרון כדי לכוונן את יחס הרגישות ואת המינון הבזאלי, בדומה לדרך בה Autosens עושה זאת כיוונון פקטור הרגישות הדינאמית % כיוונון פקטור הרגישות הדינאמית. הגדירו יותר מ-100% לקבלת תיקונים אגרסיביים יותר ופחות מ-100% לקבלת תיקונים עדינים יותר. ערך מטרה זמני גבוה מעלה את הרגישות diff --git a/plugins/aps/src/main/res/values-ko-rKR/strings.xml b/plugins/aps/src/main/res/values-ko-rKR/strings.xml index 324269f8bb..892240f4d5 100644 --- a/plugins/aps/src/main/res/values-ko-rKR/strings.xml +++ b/plugins/aps/src/main/res/values-ko-rKR/strings.xml @@ -1,6 +1,5 @@ - 감도 및 BG 조정 동적ISF 조정 계수 % 동적ISF 에 대한 조정 계수. 더 호전적인 보정 양인 경우 100% 이상으로 설정하고, 덜 호전적인 보정의 경우 100% 미만으로 설정합니다. 높은 임시목표는 민감도를 올립니다. diff --git a/plugins/aps/src/main/res/values-lt-rLT/strings.xml b/plugins/aps/src/main/res/values-lt-rLT/strings.xml index 0d6379ab16..e9ec49b34b 100644 --- a/plugins/aps/src/main/res/values-lt-rLT/strings.xml +++ b/plugins/aps/src/main/res/values-lt-rLT/strings.xml @@ -1,6 +1,5 @@ - Derinti jautrumą ir KG Dinaminio JIF derinimo faktorius % Dinaminio JIF derinimo faktorius. Nustatykite daugiau nei 100% agresyvesniam koregavimui arba mažiau nei 100% švelnesniam koregavimui. Intensyvus laikinas tikslas didina jautrumą @@ -61,7 +60,7 @@ Naudoti Super Mikro Bolusus vietoj laikinos bazės greitesniam veikimui Nedeklaruoto maisto (NDM) aptikimas Įjungti SMB visada - Leisti SMB visada, nepriklausomai nuo bolusų. Įmanoma tik naudojant patikimų, filtruotų KG duomenų šaltinį, pvz.: Dexcom G5 + Leisti SMB visada, nepriklausomai nuo bolusų. Įmanoma tik naudojant patikimų, filtruotų glikemijos duomenų šaltinį, pvz.: Dexcom. Įjungti SMB su angliavandeniais Leisti SMB iki 6 val po angliavandenių įvedimo, net jei AAO yra 0. Įmanoma tik naudojant patikimų, filtruotų glikemijos duomenų šaltinį, pvz.: Dexcom Įjungti SMB su AAO diff --git a/plugins/aps/src/main/res/values-nb-rNO/strings.xml b/plugins/aps/src/main/res/values-nb-rNO/strings.xml index e508c95944..4e28382e08 100644 --- a/plugins/aps/src/main/res/values-nb-rNO/strings.xml +++ b/plugins/aps/src/main/res/values-nb-rNO/strings.xml @@ -1,6 +1,7 @@ - Juster sensitivitet og BS + Juster sensitivitet og basal + Hvis aktivert bruker DynISF de siste 24t TDD/7D TDD som grunnlag for justering av kalkulert ISF og også for økning og reduksjon av basaldose, på samme måte som standard Autosens gjør Dynamisk ISF justeringsfaktor % Justeringsfaktor for dynamisk ISF. Verdier over 100% vil gi mer aggressive korreksjonsdoser, mens verdier under 100% vil gi mildere korreksjonsdoser. Høyt midl. mål øker sensitiviteten @@ -17,7 +18,7 @@ Plugin er deaktivert Ingen BS data tilgjengelig Ingen data tilgjengelig for autosens - DYNISF + DISF Utfører OpenAPS AMA Liste med %1$d elementer.\nFaktisk verdi: @@ -39,7 +40,7 @@ Autosens-data Script feilsøking Bruk Autosens-funksjon - Max E/t en midl. basal kan settes til + Maks E/t en midlertidig basal kan settes til Denne verdien kalles max basal i OpenAPS Maksimum basal IOB som OpenAPS kan levere [E] Denne verdien kalles Max IOB i OpenAPS.\nDet er maks insulinmengde i [E] som APS kan levere i en dose. @@ -58,7 +59,7 @@ Denne verdien kalles Maks IOB av OpenAPS\nAAPS vil ikke gi mere insulin hvis mengden insulin ombord (IOB) overstiger denne verdien Aktiver UAM Aktiver SMB - Bruk Supermikrobolus i stedet for midl. basal for raskere resultat + Bruk Super Micro Boluser i kombinasjon med midlertidig basal for raskere resultat Oppdage uannonsert måltid (UAM) Aktiver SMB alltid Aktiver SMB alltid uavhengig av boluser. Bare mulig med en bra filtrert BS kilde som f.eks. Dexcom G5/G6 @@ -66,10 +67,10 @@ Aktiver SMB i 6t etter karbohydratinntak, selv med 0 COB. Bare mulig med en bra filtrert BS kilde som f. eks. Dexcom G5/G6 Aktiver SMB med COB Aktiver SMB når COB (karbohydrater ombord) er aktiv. - Aktiver SMB med midl. målverdi - Aktiver SMB når midl. målverdi er aktivert (spise snart, trening) + Aktiver SMB med midlertidig målverdi + Aktiver SMB når midlertidig målverdi er aktivert (spise snart, aktivitet) Aktiver SMB ved høy midl. målverdi - Aktiver SMB når det er aktiv midl. målverdi (trening, over 100 mg/dl eller 5,5 mmol/l) + Aktiver SMB når det er en høy aktiv midlertidig målverdi (trening, over 100 mg/dl eller 5,5 mmol/l) Maks antall minutter med basal som kan bli SMB UAM SMB maks minutter Maks antall minutter basal som kan bli SMB ved UAM diff --git a/plugins/aps/src/main/res/values-nl-rNL/strings.xml b/plugins/aps/src/main/res/values-nl-rNL/strings.xml index 9af6444b74..4a0cde27c0 100644 --- a/plugins/aps/src/main/res/values-nl-rNL/strings.xml +++ b/plugins/aps/src/main/res/values-nl-rNL/strings.xml @@ -1,6 +1,7 @@ - Wijzig gevoeligheid en BG + Wijzig gevoeligheid en basaal + Wanneer geactiveerd, gebruikt DynISF de laatste 24-uurs TDD/7D TDD als basis voor het aanpassen van de berekende ISF en ook voor het verhogen en verlagen van de basaalstand, op dezelfde manier als standaard Autosens doet Dynamische Isf aanpassingsfactor % Aanpassingsfactor voor DynamicISF. Stel meer dan 100% in voor een agressievere correctie en minder dan 100% voor minder agressieve correctie. Hoog tijdelijk streefdoel verhoogt gevoeligheid diff --git a/plugins/aps/src/main/res/values-pl-rPL/strings.xml b/plugins/aps/src/main/res/values-pl-rPL/strings.xml index 2eeff79fb8..93ab7e090a 100644 --- a/plugins/aps/src/main/res/values-pl-rPL/strings.xml +++ b/plugins/aps/src/main/res/values-pl-rPL/strings.xml @@ -1,6 +1,7 @@ - Dostosuj wrażliwość i glikemię + Dostosuj wrażliwość i bazę + Jeśli aktywowano wtyczkę DynISF, wykorzystuje ona 24-godzinną DDI / 7-dniową DDI jako podstawę do dostosowania obliczonego ISF oraz do zwiększania i zmniejszania dawek bazowych, w taki sam sposób jak standardowe Autosens Współczynnik korygujący dynamicznego ISF % Współczynnik korygujący dla DynamicISF. Ustaw więcej niż 100% dla bardziej agresywnych dawek korekcyjnych i mniej niż 100% dla mniej agresywnych korekt. Wysoki tymczasowy cel zwiększy wrażliwość diff --git a/plugins/aps/src/main/res/values-pt-rBR/strings.xml b/plugins/aps/src/main/res/values-pt-rBR/strings.xml index e7fbbf68c3..ad37202440 100644 --- a/plugins/aps/src/main/res/values-pt-rBR/strings.xml +++ b/plugins/aps/src/main/res/values-pt-rBR/strings.xml @@ -1,6 +1,5 @@ - Ajustar sensibilidade e GLIC Fator de Ajuste FSI dinâmico % Fator de ajuste para FSI dinâmico. Defina mais de 100%% para doses de correção mais agressivas e menos de 100%% para correções menos agressivas. Alto alvotempo aumenta sensibilidade diff --git a/plugins/aps/src/main/res/values-pt-rPT/strings.xml b/plugins/aps/src/main/res/values-pt-rPT/strings.xml index c06356e81b..bfa7aefbb7 100644 --- a/plugins/aps/src/main/res/values-pt-rPT/strings.xml +++ b/plugins/aps/src/main/res/values-pt-rPT/strings.xml @@ -1,6 +1,5 @@ - Ajustar sensibilidade e glicemia % do fator de Ajuste DynamicISF Fator de ajuste para DynamicISF. Defina mais de 100% para doses de correção mais agressivas e menos de 100% para correções menos agressivas. Alto alvotempo aumenta sensibilidade diff --git a/plugins/aps/src/main/res/values-ro-rRO/strings.xml b/plugins/aps/src/main/res/values-ro-rRO/strings.xml index 88efe641a2..766efdb061 100644 --- a/plugins/aps/src/main/res/values-ro-rRO/strings.xml +++ b/plugins/aps/src/main/res/values-ro-rRO/strings.xml @@ -1,6 +1,7 @@ - Reglaţi sensibilitatea şi valoarea glicemiei + Ajustează sensibilitatea și bazala + Dacă este activat DynISF utilizează ultimele 24h TDD/7zile TDD ca bază pentru ajustarea ISF calculat şi, de asemenea, pentru creşterea şi scăderea ratei bazale, în acelaşi mod în care face Autosens standard Factor de ajustare dinamic % Factorul de ajustare pentru DynamicISF. Setează mai mult de 100% pentru doze de corecție mai agresive și mai puțin de 100% pentru corecții mai puțin agresive. Ținte temporare mai mari cresc sensibilitatea diff --git a/plugins/aps/src/main/res/values-ru-rRU/strings.xml b/plugins/aps/src/main/res/values-ru-rRU/strings.xml index 4c19f9fedd..87aad38b3f 100644 --- a/plugins/aps/src/main/res/values-ru-rRU/strings.xml +++ b/plugins/aps/src/main/res/values-ru-rRU/strings.xml @@ -1,6 +1,7 @@ - Настроить чувствительность относительно ГК + Подстроить чувствительность и базал + При активации DynISF использует TDD за сутки/ TDD за неделю в качестве основы для корректировки ISF, а также для увеличения и снижения базы, таким же образом, как и стандартный Autosens Коэффициент регулировки динамического диапазона чувствительности ISF % Коэффициент корректировки динамического диапазона чувствительности ISF. Установите более 100% для агрессивных доз коррекции и менее 100% для менее агрессивной коррекции. Высокая ВЦ повышает чувствительность diff --git a/plugins/aps/src/main/res/values-sk-rSK/strings.xml b/plugins/aps/src/main/res/values-sk-rSK/strings.xml index ee7b42745a..606aceb1d2 100644 --- a/plugins/aps/src/main/res/values-sk-rSK/strings.xml +++ b/plugins/aps/src/main/res/values-sk-rSK/strings.xml @@ -1,6 +1,5 @@ - Upraviť citlivosť a glykémiu Korekčný faktor pre Dynamickú ISF v % Korekčný faktor pre dynamickú ISF. Pre agresivnejšie korekčné dávky nastavte hodnoty väčšie ako 100%, pre menej agresívne korekcie, menšie než 100%. Vysoký dočasný cieľ zvýši citlivosť diff --git a/plugins/aps/src/main/res/values-sv-rSE/strings.xml b/plugins/aps/src/main/res/values-sv-rSE/strings.xml index 62bb97b82d..c95e7ec12e 100644 --- a/plugins/aps/src/main/res/values-sv-rSE/strings.xml +++ b/plugins/aps/src/main/res/values-sv-rSE/strings.xml @@ -1,6 +1,5 @@ - Justera känslighet och BG DynamicISF justeringsfaktor % Justeringsfaktor för DynamicISF. Ställ in mer än 100% för mer aggressiva korrigeringsdoser, och mindre än 100% för mindre aggressiva korrigeringar. Högt målvärde höjer känsligheten diff --git a/plugins/aps/src/main/res/values-tr-rTR/strings.xml b/plugins/aps/src/main/res/values-tr-rTR/strings.xml index f7741e9635..e75073e001 100644 --- a/plugins/aps/src/main/res/values-tr-rTR/strings.xml +++ b/plugins/aps/src/main/res/values-tr-rTR/strings.xml @@ -1,6 +1,7 @@ - Duyarlılığı ve KŞ\'ni ayarlayın + Duyarlılığı ve bazalı ayarlayın + Etkinleştirilmişse DinİDF, standart Otoduyarlılığın yaptığı gibi hesaplanan İDF\'yi ayarlamak ve ayrıca bazal oranı artırmak ve azaltmak için temel olarak son 24 saatlik TGD/7G TGD\'yi kullanır. DinamikİDF Ayar Faktörü % DinamikİDF için ayarlama faktörü. Daha agresif düzeltme dozları için %100\'den fazla ve daha az agresif düzeltmeler için %100\'den az ayarlayın. Yüksek geçici hedefler duyarlılığı artırır diff --git a/plugins/automation/src/main/res/values-lt-rLT/strings.xml b/plugins/automation/src/main/res/values-lt-rLT/strings.xml index 01b0035fa5..c8f0e3f1cb 100644 --- a/plugins/automation/src/main/res/values-lt-rLT/strings.xml +++ b/plugins/automation/src/main/res/values-lt-rLT/strings.xml @@ -73,8 +73,8 @@ Autosens %1$s %2$s %% Autosens % %3$s %1$s %2$s - KG skirtumas - KG skirtumas [%1$s] + Glikemijos skirtumas + Glikemijos skirtumas [%1$s] Dabartinė vieta Vieta Platuma: diff --git a/plugins/automation/src/main/res/values-nb-rNO/strings.xml b/plugins/automation/src/main/res/values-nb-rNO/strings.xml index 6a838824ae..37200c7ce6 100644 --- a/plugins/automation/src/main/res/values-nb-rNO/strings.xml +++ b/plugins/automation/src/main/res/values-nb-rNO/strings.xml @@ -27,7 +27,7 @@ Send SMS: %1$s Send SMS til alle numre Send SMS med tekst - Start midl. mål + Start midlertidig mål er mindre enn er lik eller mindre enn er lik som @@ -37,7 +37,7 @@ BS-data er ikke tilgjengelig BS %1$s %2$.0f %3$s BS %1$s %2$.1f %3$s - Midl. mål finnes ikke + Midlertidig mål finnes ikke Midl. mål %1$s %2$.0f %3$s Midl. mål %1$s %2$.1f %3$s Profilprosent %1$s %2$d diff --git a/plugins/configuration/src/main/res/values-lt-rLT/strings.xml b/plugins/configuration/src/main/res/values-lt-rLT/strings.xml index 625eaf023f..a70e5f2001 100644 --- a/plugins/configuration/src/main/res/values-lt-rLT/strings.xml +++ b/plugins/configuration/src/main/res/values-lt-rLT/strings.xml @@ -1,9 +1,9 @@ Vienetai - Pasirinkite vienetus, kurių vertes norite parodyti - Kitas - Ankstesnis + Pasirinkite glikemijos matavimo vienetus + Toliau + Atgal Sąrankos vedlys UŽBAIGTI Sveiki @@ -17,22 +17,22 @@ Mažiausia tikslinės srities vertė (tik rodymui) Didžiausia tikslinės srities vertė (tik rodymui) Leidimas - Norint gauti pranešimus, programai reikalingas sisteminio lango leidimas + Programai reikalingas leidimas rodyti virš kitų programų Programai reikia vietos nustatymo leidimo, kad būtų galima naudoti Bluetooth ir WiFi - Aplikacijai reikia leidimo prieigai prie saugyklos, kad galėtų išsaugoti žurnalo įrašus ir eksportavimo nustatymus + Programai reikia leidimo prieigai prie saugyklos, kad būtų išsaugomi žurnalo įrašai ir nustatymų eksportai Prašyti leidimo - %1$s įtraukite į baterijos neoptimizavimo sąrašą tinkamam veikimui užtikrinti + Įtraukite %1$s į baterijos optimizavimo išimčių sąrašą tinkamam veikimui užtikrinti Rasti išsaugoti nustatymai - Pagrindinis slaptažodis naudojamas atsarginiam šifravimui ir programos saugumo ignoravimui. Atsiminkite jį arba laikykite užsirašę saugioje vietoje. + Pagrindinis slaptažodis naudojamas atsarginės nustatymų kopijos šifravimui ir programos saugumui užtikrinti. Atsiminkite jį arba užsirašykite saugioje vietoje. Dabartinis pagrindinis slaptažodis Naudokite gausiausio patiekalo, kurį paprastai valgote, reikšmes\n Sinchronizuokite duomenis debesyje. Jūs galite kol kas praleisti šį veiksmą, bet negalėsite baigti mokymosi programos, kol nenustatysite duomenų perdavimo į Nightscout arba Tidepool. Statusas: Paciento vardas - Pateikite paciento vardą arba slapyvardį, kad galima būtų atskirti tarp skirtingų konfigūracijų. + Įrašykite paciento vardą arba slapyvardį, kad galima būtų atskirti tarp skirtingų konfigūracijų. Privatumo nuostatos - Nurodykite el. pašto adresą (neprivaloma), jei norite gauti informaciją apie programos strigimus. Tai nėra automatizuota paslauga. Kūrėjai susisieks esant pavojingoms situacijoms. - Atminkite: DKS profiliams reikia IVT bent 5 val. IVT = 5 - 6 val DKS profilyje atitinka IVT = 3 val sename (pompos terapijos) insulino profilyje. + Nurodykite el. pašto adresą (neprivaloma), jei norite gauti informaciją apie programos klaidas. Tai nėra automatizuota paslauga. Kūrėjai susisieks esant pavojingoms situacijoms. + Svarbu: DKS profiliuose IVT turi būti bent 5 val. Tai atitinka 3 val. IVT įprastoje pompos terapijoje. Profilis Profilio keitimas Praleisti sąrankos vedlį @@ -48,7 +48,7 @@ Duomenų pasirinkimas Duomenų perdavimas kūrėjams Leisti automatinį pranešimų apie programos trikdžius ir funkcijų naudojimo duomenų siuntimą kūrėjams, naudojant fabric.io servisą. - Šis identifikatorius bus pridėtas prie gedimų ataskaitų, kad skubiais atvejais galėtume su jumis susisiekti. Jis neprivalomas. + Šis identifikatorius bus pridėtas prie gedimų ataskaitų, kad skubiais atvejais galėtume su Jumis susisiekti. Jis neprivalomas. Identifikacija (el. paštas, FB, Discord slapyvardis ar kt.) Užklausa DKS režimas @@ -155,7 +155,7 @@ Pasirinkite laikrodžio ekraną - Prašome perkrauti telefoną arba sistemos nustatymuose iš naujo paleisti AAPS \nkitaip AndroidAPS negalės registruoti prisijungimų (svarbu stebėti ir tikrinti, ar algoritmai veikia tinkamai)! + Iš naujo paleiskite telefoną arba sistemos nustatymuose iš naujo paleiskite AAPS \nkitaip AAPS negalės registruoti žurnalo įrašų (jie svarbūs stebint ir tikrinant, ar algoritmai veikia tinkamai)! Failo formatas Sukurta diff --git a/plugins/configuration/src/main/res/values-nb-rNO/strings.xml b/plugins/configuration/src/main/res/values-nb-rNO/strings.xml index 2b0b279c4c..3a59233718 100644 --- a/plugins/configuration/src/main/res/values-nb-rNO/strings.xml +++ b/plugins/configuration/src/main/res/values-nb-rNO/strings.xml @@ -153,7 +153,7 @@ Mangler krypteringsinformasjon, formatet på innstillinger er ugyldig! Ugyldig eller ikke spesifisert krypteringsalgoritme! - Velg tilpasset klokkebakgrunn + Velg tilpasset urskive Vennligst start mobilen på nytt eller restart AAPS fra Innstillinger \nellers vil ikke AAPS ha aktivert loggføring (viktig for å spore og kontrollere at algoritmene fungerer riktig)! diff --git a/plugins/constraints/src/main/res/values-it-rIT/exam.xml b/plugins/constraints/src/main/res/values-it-rIT/exam.xml index 3a0a3b091a..165bbc2c57 100644 --- a/plugins/constraints/src/main/res/values-it-rIT/exam.xml +++ b/plugins/constraints/src/main/res/values-it-rIT/exam.xml @@ -95,7 +95,7 @@ Seleziona tutte le risposte corrette. Devi avere Git installato e configurato sul tuo computer. Quando vengono rilasciate versioni aggiornate di AAPS, le precedenti potrebbero essere limitate da remoto dopo un determinato periodo di tempo. - Dovresti salvare e annotare la posizione del tuo archivio chiavi e usare per gli aggiornamenti la stessa chiave di firma della tua installazione precedente. + Dovresti salvare e annotare la posizione delle tue chiavi di firma e usare per gli aggiornamenti la stessa chiave di firma della tua installazione precedente. Non aggiornare mai se il sistema funziona bene. Se hai difficoltà a costruire l\'apk, puoi installare un apk che è stato costruito da un amico. https://wiki.aaps.app/en/latest/Installing-AndroidAPS/Update-to-new-version.html#update-to-a-new-version-or-branch @@ -132,7 +132,7 @@ Errori erogazione/inserimento insulina Cosa dovresti fare se hai ricevuto meno insulina di quanto lo storico del micro suggerisce? Ad esempio a causa di un\'occlusione, una cannula difettosa o l\'aver dimenticato di riattaccare il micro dopo una doccia? Eliminare dal portale Nightscout i dati relativi all\'insulina per rimuoverli dallo storico del micro. - Compara i valori in AAPS con lo storico micro (se supportato). + Comparare i valori in AAPS con lo storico micro (se supportato). Erogare un bolo con parte della tua insulina calcolata \"mancante\" usando una siringa/penna o la funzione caricamento. Non fare nulla e permettere ad AAPS di correggere eventuali glicemie alte. CHO attivi (COB) @@ -148,10 +148,11 @@ Impostare il profilo al 150% renderà più lungo il tempo dell\'assorbimento calcolato dei CHO Impostare il profilo al 150% renderà più breve il tempo dell\'assorbimento calcolato dei CHO Impostare il profilo al 150% non influirà sull\'assorbimento calcolato dei CHO + https://wiki.aaps.app/en/latest/Usage/COB-calculation.html#how-does-aaps-calculate-the-cob-value Il valore IOB è influenzato dalle basali temporanee emesse. Non verrà emessa una basale temporanea alta quando la tua glicemia è al di sotto del target. - IOB negativo per un periodo considerevole in assenza di esercizio fisico suggerisce che il tuo profilo è troppo incisivo e che è necessaria meno insulina nelle tue impostazioni. - IOB positivo per un periodo considerevole suggerisce resistenza all\'insulina o pasti non annunciati. + L\'IOB negativo per un periodo considerevole in assenza di esercizio fisico suggerisce che il tuo profilo è troppo incisivo e che è necessaria meno insulina nelle tue impostazioni. + L\'IOB positivo per un periodo considerevole suggerisce resistenza all\'insulina o pasti non annunciati. Inserimento CHO e boli Solo i grammi dovrebbero essere utilizzati per stimare e registrare i carboidrati consumati. I carboidrati consumati possono essere registrati utilizzando un sistema di scambio appropriato (ad esempio: gli scambi CHO \"DAFNE\" o le unità di pane europee \"Bread Units\"). diff --git a/plugins/constraints/src/main/res/values-it-rIT/objectives.xml b/plugins/constraints/src/main/res/values-it-rIT/objectives.xml index 0c7e772175..f834047d14 100644 --- a/plugins/constraints/src/main/res/values-it-rIT/objectives.xml +++ b/plugins/constraints/src/main/res/values-it-rIT/objectives.xml @@ -7,7 +7,7 @@ Obiettivo %1$d non terminato Impostazione della visualizzazione e del monitoraggio. Analisi di basali e rapporti Verifica che la glicemia sia disponibile su Nightscout e che i dati sull\'insulina del micro siano in fase di caricamento - Hai fatto la configurazione di base dell\'ecosistema AAPS. Nightscout non è necessario per il funzionamento di AAPS, ma è molto utile per i report o il monitoraggio di altri pazienti. Non è necessario essere connessi a NS tutto il tempo se usi NS solo per te stesso. È possibile impostare il caricameno, per esempio, solo sul wifi domestico e risparmiare batteria. + Hai fatto la configurazione di base dell\'ecosistema AAPS. Nightscout non è necessario per il funzionamento di AAPS, ma è molto utile per i report o il monitoraggio di altri pazienti. Non è necessario essere connessi a NS tutto il tempo se usi NS solo per te stesso. È possibile impostare il caricamento, per esempio, solo sul wifi domestico e risparmiare batteria. Avvio in un loop aperto Esegui l\'applicazione in modalità loop aperto per alcuni giorni. Attiva manualmente il maggior numero possibile di basali temporanee suggerite. Imposta e usa i target temporanei, anche quelli predefiniti (ad esempio per l\'attività fisica o il trattamento dell\'ipoglicemia con carboidrati) Il loop aperto può essere usato per ricevere consigli se non hai un micro compatibile o non sei pronto a usare il loop chiuso. diff --git a/plugins/constraints/src/main/res/values-lt-rLT/exam.xml b/plugins/constraints/src/main/res/values-lt-rLT/exam.xml index 5ad84e1365..47b7c7fdaa 100644 --- a/plugins/constraints/src/main/res/values-lt-rLT/exam.xml +++ b/plugins/constraints/src/main/res/values-lt-rLT/exam.xml @@ -170,7 +170,7 @@ Kaip galite stebėti AndroidAPS (pavyzdžiui, Jūsų vaiko) nuotoliniu būdu? Nuotoliniu būdu stebėti AndroidAPS galite per AAPSClient, Nightscout programėlę bei Nightscout svetainę. Kitos programėlės (pvz. Dexcom follow, Xdrip follow) leidžia sekti kai kuriuos parametrus (pvz. glikemiją) nuotoliniu būdu, tačiau naudoja kitus algoritmus, todėl gali pateikti neteisingas AIO ir AAO reikšmes. - Norint nuotoliniu būdu stebėti AndroidAPS, abu prietaisai turi turėti interneto prieigą (per Wi-Fi arba mobilius duomenis). + Norint nuotoliniu būdu stebėti AndroidAPS, abu prietaisai turi turėti interneto prieigą (per Wi-Fi arba mobiliuosius duomenis). AAPSClient naudojamas nuotoliniam stebėjimui ir pilnai AndroidAPS kontrolei. https://wiki.aaps.app/en/latest/Children/Children.html Jautrumo insulinui faktorius (JIF) diff --git a/plugins/constraints/src/main/res/values-lt-rLT/objectives.xml b/plugins/constraints/src/main/res/values-lt-rLT/objectives.xml index a2ec2c1976..f6bbfaf8af 100644 --- a/plugins/constraints/src/main/res/values-lt-rLT/objectives.xml +++ b/plugins/constraints/src/main/res/values-lt-rLT/objectives.xml @@ -38,8 +38,8 @@ Įvykdyta: %1$s Išmokite valdyti AAPS Atlikite įvairius veiksmus su AAPS - Sužinojote AAPS valdymo pagrindus. Pagrindiniai valdikliai yra Pradžios lange, pasiekiami spustelėjus arba ilgai spustelėjus, daugiau valdiklių yra Veiksmų lange. Turite mokėti, kaip įdėti įskiepio langą į viršutinį slenkantį meniu arba leisti jį rodyti viršutiniame kairiajame įgalintų įskiepių sąraše. - Nustatykite profilį 90% 10 min (ilgai paspauskite profilio pavadinimą Pradžios ekrane) + Sužinojote AAPS valdymo pagrindus. Pagrindiniai valdikliai yra Pradžios lange, pasiekiami spustelėjus arba ilgai spustelėjus. Daugiau valdiklių yra Veiksmų lange. Sužinojote, kaip iškelti įskiepio langą į viršutinį slenkantį meniu arba leisti jį rodyti viršutiniame kairiajame įgalintų įskiepių sąraše. + Nustatykite profilį 90% 10 min (ilgai paspauskite profilio mygtuką pradžios ekrane) Imituokite maudynes duše. Atjunkite pompą 1 valandai (ilgai paspauskite Atviras Ciklas) ... ir iš naujo prisijunkite tuo pačiu būdu Nustatykite 10 min trukmės laikiną tikslą (ilgai spausti ant dabartinio tikslo) diff --git a/plugins/constraints/src/main/res/values-lt-rLT/strings.xml b/plugins/constraints/src/main/res/values-lt-rLT/strings.xml index bdccf28b40..73862e4813 100644 --- a/plugins/constraints/src/main/res/values-lt-rLT/strings.xml +++ b/plugins/constraints/src/main/res/values-lt-rLT/strings.xml @@ -17,7 +17,7 @@ Naudojami perskaičiuoti duomenys - KG dubliuojasi:\n%1$s\n%2$s + Glikemija dubliuojasi:\n%1$s\n%2$s perskaičiuota reikšmės dubliuojasi Duomenys nekinta. Jie galimai klaidingi @@ -38,7 +38,7 @@ Dar nebaigta Praėjo laiko Maksimalus AIO nustatytas tinkamai - KG šaltinis pasirinktas teisingai + Glikemijos šaltinis pasirinktas teisingai Sinchronizacijos servisas turi įrašymo leidimą Ciklas aktyvuotas DKS pasirinkta @@ -46,8 +46,8 @@ TIKSL Mokymosi programa Ar norite iš naujo nustatyti tikslų pradžią? Jūs galite prarasti jau pasiektus. - Kitas - Ankstesnis + Toliau + Atgal Išvalyti užbaigtus Išvalyti pradėtus diff --git a/plugins/main/src/main/res/values-lt-rLT/strings.xml b/plugins/main/src/main/res/values-lt-rLT/strings.xml index bdfa9f23c2..8aeeba7969 100644 --- a/plugins/main/src/main/res/values-lt-rLT/strings.xml +++ b/plugins/main/src/main/res/values-lt-rLT/strings.xml @@ -11,17 +11,17 @@ Kodas patikrinimui: OTP + PIN Patvirtinimo kodą sudaro 6 skaitmenys, kuriuos rodo Authenticator programa (dar vadinama OTP), po 3 ar daugiau privalomo PIN skaitmenų. - Atstatyti tapatybės nustatymą + Atstatyti autentikatorius Atstatyti autentifikatoriaus kodą Ar tikrai norite iš naujo nustatyti autentifikatoriaus raktą? Dėl to visi šiuo metu konfigūruojami autentifikatoriai negalios, ir jums reikės juos nustatyti dar kartą. Sukurtas naujas autentifikavimo raktas! Autentifikatoriams pateikti naudokite atnaujintą QR kodą. Eksportuojamas OTP kodas - Ar tikrai norite nukopijuoti OTP slaptažodį į mainų sritį?\n\nTai gali būti reikalinga tik tuo atveju, jei Jūsų programai kyla problemų identifikuojant nuskaitant QR kodą. Arba norite jį įvesti rankiniu būdu ar sukonfigūruoti įrangos OTP prieigos raktą naudodami specialią programą. + Ar tikrai norite nukopijuoti OTP slaptažodį į mainų sritį?\n\nTai gali būti reikalinga tik tuo atveju, jei Jūsų programai kyla problemų nuskaitant QR kodą. Arba norite jį įvesti rankiniu būdu ar sukonfigūruoti įrangos OTP prieigos raktą naudodami specialią programą. OTP kodas (Base32 formatas) eksportuotas ir nukopijuotas į mainų sritį. Įklijuokite jį į autentifikatorių arba OTP programą! 1. Įdiegti Authenticator 2. Skanuokite kodą AndroidAPS OTP kodų nustatymui 3. Patikrinti vienkartinį slaptažodį - Atstatyti tapatybės nustatymą + Atstatyti autentikatorius Kiekviename telefone, palaikančiame RFC 6238 TOTP prieigos raktus, įdiekite autentifikavimo programą. Populiariausios nemokamos programos yra:\n • Authy\n • Google Authenticator\n • LastPass Authenticator\n • FreeOTP Authenticator Jei iš naujo nustatysite autentifikavimo priemonę, visi esami autentifikatoriai taps negaliojantys. Turėsite juos vėl nustatyti! OK @@ -40,7 +40,7 @@ SMS nuotolinio valdymo funkcija sustojo. Norėdami ją atnaujinti, naudokite AAPS pagrindinį išmanųjį telefoną. Norėdami nusiųsti kalibraciją %1$.2f, atsakykite kodu %2$s Bolusas nesuleistas - Minimalus minučių skaičius, kuris turi praeiti nuo vieno boluso, suleisto nuotoliniu būdu iki kito + Minimalus minučių skaičius, kuris turi praeiti nuo vieno nuotolinio boluso iki kito Kiek mažiausiai minučių turi praeiti tarp vieno ir kito boluso Jūsų saugumui, norėdami redaguoti šį pasirinkimą, jums reikia pridėti ne mažiau kaip 2 telefono numerius. %1$.2f vv bolusas sėkmingai suleistas @@ -97,7 +97,7 @@ Dabartinis ciklo režimas: %1$s Neteisingas formatas BG: - Paskutinė KG: + Pask. glikemija: Pokytis: AIO: Bolusas: @@ -211,7 +211,7 @@ Pakeiskite įvestus duomenis! AtviraDKS Siuntėjas - KG duomenų statusas + Glikemijos statusas Greitojo patarėjo nustatymai Laikyti ekraną įjungtą Neleidžia Android sistemai išjungti ekrano. Naudojama daug energijos, jei telefonas neprijungtas prie maitinimo šaltinio. @@ -237,7 +237,7 @@ Mygtukas 2 Mygtukas 3 Vizualizacijos diapazonas - Aukštoji ir žemoji riba Pradžios lango grafikuose bei išmaniuosiuose laikrodžiuose + Aukštoji ir žemoji riba Pradžios ekrano grafike bei išmaniuosiuose laikrodžiuose Žemoji riba Aukštoji riba Naudoti sutrumpintus skirtukų pavadinimus @@ -245,7 +245,7 @@ Boluso skaičiuoklė atlieka skaičiavimus, tačiau tik dalis apskaičiuoto insulino yra suleidžiama. Naudinga kartu su SMB algoritmu. Suleisti 100% bolusą, jei glikemijos duomenys senesni nei Įgalinti boluso patarėją - Galimybė priminti jums valgyti vėliau (pvz., esant aukštai glikemijai) boliuso vedlyje („po susileidimo palaukti ir valgyti vėliau“) + Naudokite valgio priminimą, o ne patarėjo rezultatą, jei glikemija aukšta (\"prebolusas\") Įgalinti superbolusus skaičiuoklėje Įgalina superbolusų naudojimą insulino skaičiuoklėje. Nenaudokite, kol nesuprantate, ką superbolus funkcija atlieka. NAUDODAMI AKLAI GALITE PERDOZUOTI INSULINO! Įgalinti priminimą apie bolusą @@ -257,7 +257,7 @@ Pulsas Nuokrypiai Aktyvumas - KG įtaka + Glikemijos įtaka Jautrumas insulinui Nuokrypiai Aktyvūs angliavandeniai @@ -268,7 +268,7 @@ VB DEV VEIKS - -KGS + -BGI ABS DEVSLOPE ĮRAŠ diff --git a/plugins/source/src/main/res/values-lt-rLT/strings.xml b/plugins/source/src/main/res/values-lt-rLT/strings.xml index 5eeb2c1cb2..97a30f2738 100644 --- a/plugins/source/src/main/res/values-lt-rLT/strings.xml +++ b/plugins/source/src/main/res/values-lt-rLT/strings.xml @@ -1,38 +1,38 @@ - NSClient KG - NS KG + NSClient + NS Glik Gauti glikemijos duomenis iš Nightscout - xDrip+ KG - Gauti glikemijos duomenis iš xDrip+. + xDrip+ + Gauti glikemijos duomenis iš xDrip+ BYODA BYODA - Gauti glikemijos duomenis iš \'Build Your Own Dexcom App\'. + Gauti glikemijos duomenis iš \'Build Your Own Dexcom App\' Eversense programėlė (modifikuota) - Gauti glikemijos duomenis iš modifikuotos Eversense programėlės. + Gauti glikemijos duomenis iš modifikuotos Eversense programėlės Glimp - Gauti glikemijos duomenis iš Glimp. + Gauti glikemijos duomenis iš Glimp MM640g - Gauti glikemijos duomenis iš 600SeriesAndroidUploader. + Gauti glikemijos duomenis iš 600SeriesAndroidUploader Poctech - Gauti KG vertes iš Poctech programėlės + Gauti glikemijos duomenis iš Poctech Glunovo - Gauti KG reikšmes iš Glunovo programos + Gauti glikemijos duomenis iš Glunovo Intelligo - Gauti KG reikšmes iš Intelligo programos + Gauti glikemijos duomenis iš Intelligo Tomato (MiaoMiao) Tomato - Gauti KG vertes iš Tomato programėlės (MiaoMiao) + Gauti glikemijos duomenis iš Tomato (MiaoMiao) GlucoRx Aidex Aidex - Gauti KG reikšmes iš GlucoRx Aidex CGMS programos. - Atsitiktinė KG + Gauti glikemijos duomenis iš GlucoRx Aidex CGMS + Atsitiktinė glikemija Generuoti atsitiktinę glikemiją (tik demo režime) - KG + AG Siųsti glikemijos duomenis į xDrip+ Xdrip+ pasirinkite 640g/Eversense kaip duomenų šaltinį - KG duomenų perdavimo nustatymai + Glikemijos perdavimo nustatymai Registruoti sensoriaus keitimą NS Sukurti įvykį \"Sensoriaus keitimas\" NS automatiškai, startavus sensorių kryptis diff --git a/plugins/sync/src/main/res/values-cs-rCZ/strings.xml b/plugins/sync/src/main/res/values-cs-rCZ/strings.xml index 7a4f5469a3..870a05b4af 100644 --- a/plugins/sync/src/main/res/values-cs-rCZ/strings.xml +++ b/plugins/sync/src/main/res/values-cs-rCZ/strings.xml @@ -17,6 +17,7 @@ Synchronizuje vaše data s Nightscoutem pomocí v3 API Zablokováno možností nabíjení Zablokováno možností připojení + Žádné připojení Nepodporovaná verze Nightscoutu OAPS UPLD diff --git a/plugins/sync/src/main/res/values-es-rES/strings.xml b/plugins/sync/src/main/res/values-es-rES/strings.xml index fd015beade..05ce3e3902 100644 --- a/plugins/sync/src/main/res/values-es-rES/strings.xml +++ b/plugins/sync/src/main/res/values-es-rES/strings.xml @@ -17,6 +17,7 @@ Sincroniza tus datos con Nightscout usando API v3 Bloqueado por opciones de carga Bloqueado por opciones de conectividad + Sin conectividad Versión de Nightscout no soportada OAPS UPLD diff --git a/plugins/sync/src/main/res/values-it-rIT/strings.xml b/plugins/sync/src/main/res/values-it-rIT/strings.xml index 7558878f23..1e821f5299 100644 --- a/plugins/sync/src/main/res/values-it-rIT/strings.xml +++ b/plugins/sync/src/main/res/values-it-rIT/strings.xml @@ -17,6 +17,7 @@ Sincronizza i tuoi dati con Nightscout usando API v3 Bloccato dalle opzioni di ricarica Bloccato dalle opzioni di connettività + Connettività assente Versione non supportata di Nightscout OAPS UPLD @@ -116,7 +117,12 @@ Invia dati glicemia e trattamenti a xDrip+. La sorgente dati \"xDrip+ Sync Follower\" deve essere selezionata e l\'accettazione dei dati deve essere abilitata in: Settings - Inter-app settings - Accept Glucose/Treatments Abilita trasmissioni a xDrip+. + DBRO + Trasmetti i dati all\'app G-Watch Wear di Garmin + Garmin + Connessione al dispositivo Garmin (Fenix, Edge, …) + Impostazioni Garmin SMWA Monitora e controlla AAPS usando il tuo smartwatch WearOS. diff --git a/plugins/sync/src/main/res/values-iw-rIL/strings.xml b/plugins/sync/src/main/res/values-iw-rIL/strings.xml index a164f68308..c789838a7a 100644 --- a/plugins/sync/src/main/res/values-iw-rIL/strings.xml +++ b/plugins/sync/src/main/res/values-iw-rIL/strings.xml @@ -17,6 +17,7 @@ מסנכרן את הנתונים עם נייטסקאוט באמצעות v3 API חסום ע\"י הגדרות טעינה חסום ע\"י הגדרות חיבור + אין חיבור גרסה לא נתמכת של Nightscout OAPS מעלה @@ -48,7 +49,7 @@ סנכרון מלא? זה ייקח שעות מרובות ולא תוכלו לראות נתונים חדשים בנייטסקאוט. סינכרון פרופילים, בולוסים, פחמימות ומינונים בזאליים זמניים נטענים לנייטסקאוט - טוען נתוני סוכר לנייטסקאוט + טוען נתוני טיפול לנייטסקאוט אחזר פרופילים שמורים סינכרון פרופילים מעורך הפרופיל של נייטסקאוט לפרופיל מקומי קבלת ערכי מטרה זמניים diff --git a/plugins/sync/src/main/res/values-lt-rLT/oh_strings.xml b/plugins/sync/src/main/res/values-lt-rLT/oh_strings.xml index 8d4cb5b6a4..77bcd032b9 100644 --- a/plugins/sync/src/main/res/values-lt-rLT/oh_strings.xml +++ b/plugins/sync/src/main/res/values-lt-rLT/oh_strings.xml @@ -15,13 +15,13 @@ AAPS įkelia duomenis į Open Humans. Tai gali šiek tiek užtrukti. Jūs buvote atjungtas iš Open Humans Spustelėkite čia, kad prisijungtumėte dar kartą, jei tai atsitiko netyčia. - Kitas + Toliau Sveiki atvykę į Open Humans - Norėdami nustatyti duomenų perdavimą, spauskite \'Kitas\'. + Norėdami nustatyti duomenų perdavimą, spauskite \'Toliau\'. Sutikimas Naudojimosi sąlygos Norėdami tęsti, atidžiai perskaitykite toliau pateiktą informaciją ir sutikite su naudojimo sąlygomis. - Tai yra atviro kodo įrankis, kuris nukopijuoja Jūsų duomenis į Open Humans. Mes neturime teisės perduoti Jūsų duomenų trečiosioms šalims be aiškaus jūsų sutikimo. Duomenys, kuriuos gauna projektas ir programa, identifikuojami pagal atsitiktinį naudotojo ID ir tik tada saugiai perkeliami į Open Humans paskyrą, jei gautas Jūsų sutikimas. Galite bet kada sustabdyti įkėlimą ir ištrinti savo įkeltus duomenis apsilankę www.openhumans.org. + Tai yra atviro kodo įrankis, kuris nukopijuoja Jūsų duomenis į Open Humans. Mes neturime teisės perduoti Jūsų duomenų trečiosioms šalims be Jūsų sutikimo. Duomenys, kuriuos gauna projektas ir programa, identifikuojami pagal atsitiktinį naudotojo ID ir tik tada saugiai perkeliami į Open Humans paskyrą, jei gautas Jūsų sutikimas. Galite bet kada sustabdyti įkėlimą ir ištrinti savo įkeltus duomenis apsilankę www.openhumans.org. Duomenys įkelti Glikemijos duomenys Bolusai @@ -51,6 +51,6 @@ Baigiama... Gali užtrukti kelias sekundes. Užbaigta! - Nuo šiol telefonas kartkartėmis tyliai fone įkels duomenis. + Nuo šiol telefonas kartkartėmis fone įkels duomenis. Uždaryti diff --git a/plugins/sync/src/main/res/values-lt-rLT/strings.xml b/plugins/sync/src/main/res/values-lt-rLT/strings.xml index c744786e4a..8e98e7243c 100644 --- a/plugins/sync/src/main/res/values-lt-rLT/strings.xml +++ b/plugins/sync/src/main/res/values-lt-rLT/strings.xml @@ -1,18 +1,18 @@ - Naudoti Cellular sąsają - Naudoti WiFi ryšį + Naudoti mobiliuosius duomenis + Naudoti WiFi WiFi pavadinimas Įkrovimo metu - Maitina akumuliatorius + Naudojant akumuliatorių Ryšio nustatymai Leidžiami tinklai (atskirti kabliataškiais) Leisti sujungimą tarptinkliniu ryšiu Kurti klaidų pranešimus - Sukurkite pranešimus apie būtinų angliavandenių įspėjimus - Sukurti Nightscout pranešimus apie klaidas ir vietinius įspėjimus (taip pat matomi Priežiūroje prie Terapijos) - Sukurkite NS pranešimus apie būtinų angliavandenių įspėjimus + Kurti pranešimus apie būtinų angliavandenių įspėjimus + Kurti Nightscout pranešimus apie klaidas ir vietinius perspėjimus (matomus Terapijoje) + Kurti NS pranešimus apie būtinų angliavandenių įspėjimus Sinchronizuoja duomenis su Nightscout Sinchronizuoja duomenis su Nightscout naudojant V3 API Užblokuota dėl įkrovimo parinkčių @@ -23,7 +23,7 @@ NSClient sutrikimas. Reikėtų paleisti iš naujo NS ir NSClient. NSCLIENT neturi įrašymo teisių. Ar teisingai įvedėte API secret? - NS Klientas V3 + NSClientV3 NS V3 NSClient NSCI @@ -35,9 +35,9 @@ NS API secret NS API secret Įveskite NS API secret (min. 12 simbolių) - NS prieigos raktas - Prieigos raktas - Prieigos raktas sukurtas NS administratoriaus puslapyje (min. 17 simbolių) + NS access token + NS access token + Access token sukuriamas NS administratoriaus puslapyje (min. 17 simbolių) Suleisti dabar Išvalyti eilę Rodyti eilę @@ -47,7 +47,7 @@ Pilna sinchronizacija Vykdyti pilną sinchronizaciją? Tai gali užtrukti nemažai valandų ir kol ji nebus užbaigta, nematysite atnaujintų NS duomenų. Sinchronizacija - Profiliai, bolusai, angliavandeniai, laikinos bazės įkeltos į NS + Profiliai, bolusai, angliavandeniai, laikinos bazės bus įkeliami į NS Įkelti duomenis į NS Priimti profilių saugyklą Sinchronizuoti profilius iš NS @@ -65,12 +65,12 @@ Priimti angliavandenių duomenis, įvestus per NS arba NSClient Gauti terapijos įvykius Priimti terapijos įvykius (kaniulės, insulino, baterijos keitimą ir pan.), įvestus per NS arba NSClient - Gauti/užpildyti atgaline data NGJ duomenis + Gauti istorinius glikemijos duomenis Priimti NGJ duomenis iš NS Sulėtinti įkėlimus Aliarmų nustatymai - Sukurti pranešimus iš NS aliarmų - Sukurkite pranešimus iš NS perspėjimų + Kurti pranešimus iš NS aliarmų + Kurti pranešimus iš NS perspėjimų Seni duomenys, riba [min] Kritiškai seni duomenys, riba [min] Siųsti programos paleidimo žymę į NS @@ -92,7 +92,7 @@ Įkelti terapijas (insulinas, angliavandeniai) Perkelti laikiną bazę Perduoti profilio pokyčius, laikinas bazes - Perduoti KG testus + Perduoti gliukomačio testus Pašalinti visus Pradėti iš naujo Įkelti dabar @@ -106,14 +106,14 @@ Siųsti duomenis į xDrip+ Rodyti detalų AIO Laikrodyje rodyti bolusų ir bazės AIO - Rodyti GĮ + Rodyti BGI Prie statuso linijos pridėti glikemijos įtaką Išplėstinė xDrip+ statuso linija Ciklas išjungtas Siųsti statuso liniją į xDrip+ xDrip+ neinstaliuota Kalibracija nusiųsta į xDrip+ - Siųsti glikemijos ir terapijos duomenis į xDrip+. Turi būti pasirinktas duomenų šaltinis „xDrip+ Sync Follower“, o duomenų priėmimas turi būti įjungtas skiltyje Nustatymai – Inter-app settings – Accept Glucose/Treatments + Siųsti glikemijos ir terapijos duomenis į xDrip+. Turi būti pasirinktas duomenų šaltinis „xDrip+ Sync Follower“, o duomenų priėmimas turi būti įjungtas skiltyje Nustatymai – Programų sąveikos nustatymai – Priimti glikemiją/terapiją Įjungti duomenų perdavimą į xDrip+. Data Broadcaster @@ -138,8 +138,8 @@ Bandymas nesėkmingas - pasitikrinkite telefoną Išmaniojo laikrodžio nustatymai Laikrodžio valdikliai - Nustatyti Laikinus Tikslus ir įvesti terapinius įrašus iš laikrodžio. - Skaičiavimai, įtraukti į Patarėjo rezultatą: + Nustatyti laikinus tikslus ir įvesti bolusus bei AV iš laikrodžio. + Skaičiavimai, įtraukiami į rezultatą: Bendrieji nustatymai Pranešti apie SMB Rodyti SMB laikrodyje kaip standartinį bolusą. diff --git a/plugins/sync/src/main/res/values-nb-rNO/strings.xml b/plugins/sync/src/main/res/values-nb-rNO/strings.xml index a8ed13d158..f1108632c1 100644 --- a/plugins/sync/src/main/res/values-nb-rNO/strings.xml +++ b/plugins/sync/src/main/res/values-nb-rNO/strings.xml @@ -17,6 +17,7 @@ Synkroniserer dine data med Nightscout v3 API Blokkert på grunn av ladealternativer Blokkert på grunn av tilkoblingsalternativer + Ingen internettforbindelse Versjonen av Nightscout støttes ikke OpenAPS Opplaster diff --git a/plugins/sync/src/main/res/values-nl-rNL/strings.xml b/plugins/sync/src/main/res/values-nl-rNL/strings.xml index 442817ec94..477feec8a6 100644 --- a/plugins/sync/src/main/res/values-nl-rNL/strings.xml +++ b/plugins/sync/src/main/res/values-nl-rNL/strings.xml @@ -17,6 +17,7 @@ Synchroniseert je data met Nightscout via de v3 API Geblokkeerd door oplaad instellingen Geblokkeerd door verbindings instellingen + Geen verbinding Niet ondersteunde versie van Nightscout OAPS UPLD diff --git a/plugins/sync/src/main/res/values-pl-rPL/strings.xml b/plugins/sync/src/main/res/values-pl-rPL/strings.xml index ce1b6cd1ab..d444294137 100644 --- a/plugins/sync/src/main/res/values-pl-rPL/strings.xml +++ b/plugins/sync/src/main/res/values-pl-rPL/strings.xml @@ -17,6 +17,7 @@ Synchronizuje twoje dane z Nightscout używając API w wersji 3 Zablokowane przez opcje ładowania Zablokowane przez opcje połączenia z internetem + Brak połączenia Niewspierana wersja Nightscout OAPS UPLD diff --git a/plugins/sync/src/main/res/values-ro-rRO/strings.xml b/plugins/sync/src/main/res/values-ro-rRO/strings.xml index 39563a4dd1..712f43398e 100644 --- a/plugins/sync/src/main/res/values-ro-rRO/strings.xml +++ b/plugins/sync/src/main/res/values-ro-rRO/strings.xml @@ -17,6 +17,7 @@ Sincronizează datele cu Nightscout folosind v3 API Blocat de opțiunile de încărcare Blocat de opțiunile de conectivitate + Fără conexiune Versiune incompatibilă de Nightscout OAPS UPLD diff --git a/plugins/sync/src/main/res/values-ru-rRU/strings.xml b/plugins/sync/src/main/res/values-ru-rRU/strings.xml index af4483a28a..a2498c8e08 100644 --- a/plugins/sync/src/main/res/values-ru-rRU/strings.xml +++ b/plugins/sync/src/main/res/values-ru-rRU/strings.xml @@ -17,6 +17,7 @@ Синхронизирует данные с Nightscout при помощи API v3 Заблокировано опциями зарядки Заблокировано настройками подключения + Нет подключения Неподдерживаемая версия Nightscout OAPS ЗАГРУЗ diff --git a/plugins/sync/src/main/res/values-tr-rTR/strings.xml b/plugins/sync/src/main/res/values-tr-rTR/strings.xml index 06c6066a7a..c90441313e 100644 --- a/plugins/sync/src/main/res/values-tr-rTR/strings.xml +++ b/plugins/sync/src/main/res/values-tr-rTR/strings.xml @@ -17,6 +17,7 @@ Verilerinizi v3 API kullanarak Nightscout ile senkronize eder Şarj seçenekleri tarafından engellendi Bağlantı seçenekleri tarafından engellendi + Bağlantı yok Nightscout\'un desteklenmeyen sürümü OAPS UPLD diff --git a/pump/dana/src/main/res/values-lt-rLT/strings.xml b/pump/dana/src/main/res/values-lt-rLT/strings.xml index 8154d242b0..a212040c95 100644 --- a/pump/dana/src/main/res/values-lt-rLT/strings.xml +++ b/pump/dana/src/main/res/values-lt-rLT/strings.xml @@ -75,7 +75,7 @@ Abu Ekrano aktyvumo laikas [seconds] Ekrano apšvietimo laikas [seconds] - KG vienetai + Glikemijos vienetai Išjungimas [hours] Žemas rezervuaro lygis [Units] Išsaugoti nustatymus pompoje diff --git a/pump/eopatch/src/main/res/values-lt-rLT/strings.xml b/pump/eopatch/src/main/res/values-lt-rLT/strings.xml index 760bb7f97d..901935d368 100644 --- a/pump/eopatch/src/main/res/values-lt-rLT/strings.xml +++ b/pump/eopatch/src/main/res/values-lt-rLT/strings.xml @@ -46,7 +46,7 @@ Vienpusiškai deaktyvavus, dėl ryšio klaidos rezervuaro aliarmo garsas gali nesustoti. Tokiu atveju Jūs galite jį visiškai nutildyti, pradurdami rankinio aliarmo atšaukimo prievadą, kaip nurodyta toliau: 1. Pašalinkite rezervuarą nuo kūno ir nulupkite lipnią juostą. - 2. Naudodami smeigtuką tvirtai pradurkite skylę šalia insulino užpildymo porto. + 2. Naudodami smeigtuką pradurkite skylę šalia insulino užpildymo porto. Pildomas insulinas 1/6 1. @@ -59,7 +59,7 @@ Naujas rezervuaras susietas.\nLaikykite telefoną ir rezervuarą taip arti, kaip tik įmanoma. Pasiruoškite priklijuoti rezervuarą 3/6 - Nuimkite pleistro apsaugą ir paspauskite \'Kitas\'. + Nuimkite pleistro apsaugą ir paspauskite \'Toliau\'. [Caution1] Jei adata kyšo, spauskite \'Išjungti\'. [Caution2] Jei rezervuaras yra šlapias ar purvinas, arba pleistras susiraukšlėjęs, spauskite \'Išjungti\'. Rezervuaro prijungimas @@ -74,7 +74,7 @@ Adatos įvedimas 6/6 Norėdami įdurti adatą, pasukite adatos įvedimo svirtelę daugiau 100 °, po to pilnai pasukite ir pašalinkite ją - Sulaukite 1 pyptelėjimo ir spauskite \'Kitas\'. + Sulaukite 1 pyptelėjimo ir spauskite \'Toliau\'. Sulaukite 1 pyptelėjimo ir spauskite \'Kartoti\'. Rezervuaras aktyvuotas! \'%1$s\' programa įgalinta. @@ -125,7 +125,7 @@ Insulino tiekimas atnaujintas. Užbaigti liko laiko: %1$s:%2$s - Kitas + Toliau Bandykite dar kartą po ryšio patikrinimo. Sustabdyti nepavyko. Atnaujinti nepavyko. diff --git a/pump/medtronic/src/main/res/values-lt-rLT/strings.xml b/pump/medtronic/src/main/res/values-lt-rLT/strings.xml index 588cdaa0ae..ed9b992482 100644 --- a/pump/medtronic/src/main/res/values-lt-rLT/strings.xml +++ b/pump/medtronic/src/main/res/values-lt-rLT/strings.xml @@ -52,7 +52,7 @@ Medtronic pompos istorija - Atšaukėte bolusą, kuris jau buvo nustatytas pompoje. Medronic pompa nepalaiko šio atšaukimo, todėl turite jį atšaukti rankiniu būdu. Sustabdykite pompą ir vėl ją paleiskite (jei vis dar norite atšaukti bolusą). Aplikacija perims pokyčius su kitu atnaujinimu (per mažiau nei 5 minutes). + Atšaukėte bolusą, kuris jau buvo nustatytas pompoje. Medronic pompa nepalaiko šio atšaukimo, todėl turite jį atšaukti rankiniu būdu. Sustabdykite pompą ir vėl ją paleiskite (jei vis dar norite atšaukti bolusą). Programa perims pokyčius su kitu atnaujinimu (per mažiau nei 5 minutes). Negalima sužinoti dabartinės laikinos bazės. Negalima atšaukti dabartinės laikinos bazės. Operacija stabdoma. Profilio nustatymas nepavyko dėl per didelės nustatytos bazės: %1$s @@ -62,12 +62,12 @@ Negalima atšaukti dabartinės laikinos bazės. Bazės profilis nenustatytas. Bazės profilis toks pat, todėl nenustatomas pakartotinai. - Gauti istoriją - Lapas %1$d (%2$d/16) - Gauti istoriją - Lapas %1$d + Gauti istoriją - lapas %1$d (%2$d/16) + Gauti istoriją - lapas %1$d Gauti pompos laiką Nustatyti pompos laiką Parodyti baterijos statusą - Gauti parametrus + Gauti nustatymus Gauti pompos modelį Gauti bazės profilį Nustatyti bazės profilį @@ -90,7 +90,7 @@ Nustatyti neutralią laikiną bazę Jei įjungta, laikina valandinė bazė bus anuliuota iki kiekvienos valandos pabaigos. Šis metodas gali padėti išvengti kai kurių pompų pypsėjimo ar vibravimo. %1$.1f vv/h (liko %2$d min) - Aptikti neteisingi pompos istorijos duomenys. Sukurkite naują problemos įrašą ir pateikite žurnalus. + Aptikti neteisingi pompos istorijos duomenys. Sukurkite naują problemos įrašą ir pateikite logus. RL statistika Tipas: Paspausta atnaujinti diff --git a/pump/medtrum/src/main/res/values-cs-rCZ/strings.xml b/pump/medtrum/src/main/res/values-cs-rCZ/strings.xml index 2cf4e15177..55f5a1415e 100644 --- a/pump/medtrum/src/main/res/values-cs-rCZ/strings.xml +++ b/pump/medtrum/src/main/res/values-cs-rCZ/strings.xml @@ -12,6 +12,7 @@ Pumpa je pozastavena kvůli překročení maximálního množství inzulínu za den Patch není aktivován Načtení uživatelského nastavení do pumpy selhalo! + Chyba při synchronizaci historie z pumpy, záznam byl přeskočen. Zkontrolujte, zda je bolus správně synchronizován. Potvrďte, a pokud se chyba vrátí, změňte patch nebo pumpu. Stav BLE Naposledy připojeno diff --git a/pump/medtrum/src/main/res/values-es-rES/strings.xml b/pump/medtrum/src/main/res/values-es-rES/strings.xml index 1bdb9fc0b8..4ed947aa0b 100644 --- a/pump/medtrum/src/main/res/values-es-rES/strings.xml +++ b/pump/medtrum/src/main/res/values-es-rES/strings.xml @@ -12,6 +12,7 @@ Bomba suspendida por superar el máximo diario de insulina Parche no activado Error al configurar los ajustes del usuario en la bomba + Error al sincronizar el historial de la bomba, se ha omitido un registro. Verifique la pestaña de tratamientos para asegurarse de que el bolo se haya sincronizado correctamente. Silencia y si el error sigue apareciendo, cambia el parche o la base de la bomba. Estado BLE Última conexión diff --git a/pump/medtrum/src/main/res/values-fr-rFR/strings.xml b/pump/medtrum/src/main/res/values-fr-rFR/strings.xml index 6846c7fe20..57e82fd0c0 100644 --- a/pump/medtrum/src/main/res/values-fr-rFR/strings.xml +++ b/pump/medtrum/src/main/res/values-fr-rFR/strings.xml @@ -12,6 +12,7 @@ La pompe est suspendue, la quantité maximum d\'insuline par jour est dépassée Patch non activé La configuration des paramètres de la pompe a échoué! + Erreur lors de la synchronisation de l\'historique de la pompe, un enregistrement a été ignoré. Vérifiez l\'onglet de traitement pour vérifier si le bolus est correctement synchronisé. Mettez en veille et si l\'erreur continue d\'apparaître, changer le patch ou la pompe. État BT Dernière connexion diff --git a/pump/medtrum/src/main/res/values-it-rIT/strings.xml b/pump/medtrum/src/main/res/values-it-rIT/strings.xml index b5de1d6fea..f00d13f672 100644 --- a/pump/medtrum/src/main/res/values-it-rIT/strings.xml +++ b/pump/medtrum/src/main/res/values-it-rIT/strings.xml @@ -3,16 +3,20 @@ Medtrum MT + Integrazione micro per Medtrum Nano e Medtrum 300U Impostazioni micro Medtrum Errore micro: %1$s!! + Avviso micro: %1$s Il micro è sospeso Il micro è sospeso a causa del superamento della massima insulina oraria Il micro è sospeso a causa del superamento della massima insulina giornaliera Patch non attivata Errore nella configurazione delle impostazioni utente sul micro! + Errore durante la sincronizzazione della cronologia del micro, un record è stato saltato. Controllare la scheda trattamenti per verificare se il bolo è stato sincronizzato correttamente. Posporre l\'allarme e se l\'errore continua a riproporsi cambiare patch o pompa. Stato BLE Ultima connessione + Bolo attivo Stato micro Attiva allarmi %.2f U @@ -50,6 +54,7 @@ Batteria scarica No calibrazione Impossibile aggiornare il fuso orario del microinfusore, posticipare il messaggio e aggiornare manualmente. + Errore bolo Riprova Avanti @@ -68,6 +73,7 @@ Attivazione in corso Stato inaspettato: %1$s Nessun profilo selezionato. Seleziona un profilo e riprova. + Nessun numero di serie noto. Inserisci il numero di serie del micro nelle impostazioni e riprova. Seriale base micro: %1$X Nessuna patch attiva. Premi Avanti per iniziare il processo di attivazione. La base del micro non deve essere collegata alla patch fino alla fase successiva! @@ -97,15 +103,23 @@ Premi Avanti per riprendere l\'attivazione o Scarta per resettare lo stato di attivazione. Attendere, lettura dello stato di attivazione dal micro. + Abilitazione avviso irraggiungibilità forzato perché Medtrum patch può fallire e non essere raggiungibile. + Consigliata l\'impostazione a 30 minuti, perché Medtrum patch può fallire e non essere raggiungibile. Numero seriale Inserisci il numero di serie della base del micro. Numero di serie non valido! Micro non testato: %1$d! Contattaci su discord o github per supporto Impostazioni allarmi Seleziona le tue impostazioni di allarme del micro preferite. + Notifica di avviso del micro + Mostra notifica sugli avvisi non critici del micro: batteria bassa, serbatoio basso (20 unità) e scadenza a breve. Si consiglia di lasciare abilitato quando gli avvisi del micro sono impostati in modalità silenziosa. + Avviso di scadenza micro [hours] + Mostra notifica all\'ora specificata dopo l\'attivazione. Scadenza patch Una volta abilitata, la patch scadrà dopo 3 giorni, con un periodo di grazia di 8 ore. + Insulina massima oraria [Units] Specificare le unità massime di insulina consentite per ora. Se superate, il micro sarà sospeso. + Insulina massima giornaliera [Units] Specificare le unità massime di insulina consentite per giorno. Se superate, il micro sarà sospeso. Ricezione stato micro diff --git a/pump/medtrum/src/main/res/values-iw-rIL/strings.xml b/pump/medtrum/src/main/res/values-iw-rIL/strings.xml index 618b82acf9..33714d540c 100644 --- a/pump/medtrum/src/main/res/values-iw-rIL/strings.xml +++ b/pump/medtrum/src/main/res/values-iw-rIL/strings.xml @@ -2,6 +2,7 @@ תמיכה במשאבת Medtrum Nano ו-Medtrum 300U + חלה שגיאה בזמן סינכרון ההיסטוריה מהמשאבה, רשומה דולגה. בדקו ב-\"טיפולים\" האם הבולוסים סונכרנו כיאות. אשרו את ההתראה ואם השגיאה חוזרת על עצמה, החליפו את המשאבה. בולוס פעיל diff --git a/pump/medtrum/src/main/res/values-nb-rNO/strings.xml b/pump/medtrum/src/main/res/values-nb-rNO/strings.xml index 6b546ba0aa..f93ca06046 100644 --- a/pump/medtrum/src/main/res/values-nb-rNO/strings.xml +++ b/pump/medtrum/src/main/res/values-nb-rNO/strings.xml @@ -12,6 +12,7 @@ Pumpe er pauset fordi maksimal insulinleveranse per dag er overskredet Patch ikke aktivert Kunne ikke sende brukerinnstillinger til pumpen! + Feil ved synkronisering av historikk fra pumpe, en post har blitt hoppet over. Sjekk behandlingsfanen for å kontrollere om bolusdosen er synkronisert riktig. Slumre og hvis feilen kommer tilbake bytt patch eller pumpebase. Bluetooth Status Siste tilkobling diff --git a/pump/medtrum/src/main/res/values-nl-rNL/strings.xml b/pump/medtrum/src/main/res/values-nl-rNL/strings.xml index 8e3a1d6826..5813c5d0a1 100644 --- a/pump/medtrum/src/main/res/values-nl-rNL/strings.xml +++ b/pump/medtrum/src/main/res/values-nl-rNL/strings.xml @@ -12,6 +12,7 @@ Pomp is onderbroken als gevolg van overschrijding max insuline per dag Patch niet geactiveerd Gebruikersinstellingen instellen op de pomp mislukt! + Fout bij het synchroniseren van de geschiedenis van de pomp: een record is overgeslagen. Controleer in het behandeling tabblad of de bolus correct is gesynchroniseerd. Stel het alarm uit en vervang als de fout blijft terugkomen de patch of pompbasis. BLE Status Laatste verbinding diff --git a/pump/medtrum/src/main/res/values-pl-rPL/strings.xml b/pump/medtrum/src/main/res/values-pl-rPL/strings.xml index 301d071ecd..0b4fdea3a2 100644 --- a/pump/medtrum/src/main/res/values-pl-rPL/strings.xml +++ b/pump/medtrum/src/main/res/values-pl-rPL/strings.xml @@ -12,6 +12,7 @@ Pompa jest wstrzymana z powodu przekroczenia maksymalnej dziennej dawki insuliny Patch nie został aktywowany Wpisanie ustawień użytkownika do pompy nie powiodło się! + Wystąpił błąd podczas synchronizacji historii z pompy, rekord został pominięty. Zajżyj to dialogu Terapia, aby sprawdzić, czy bolus został poprawnie zsynchronizowany. Wycisz to powiadomienie, a jeśli błąd nadal występuje zmień patch lub bazę pompy. Status Bluetooth Low Energy Ostatnie połączenie diff --git a/pump/medtrum/src/main/res/values-ro-rRO/strings.xml b/pump/medtrum/src/main/res/values-ro-rRO/strings.xml index 1ea49a7620..38eee6723f 100644 --- a/pump/medtrum/src/main/res/values-ro-rRO/strings.xml +++ b/pump/medtrum/src/main/res/values-ro-rRO/strings.xml @@ -12,6 +12,7 @@ Pompă suspendată din cauza depăşirii valorii maxime zilnice a insulinei Patch neactivat Setarea setărilor utilizatorului pe pompă a eșuat! + Eroare la sincronizarea istoricului de la pompă, o înregistrare a fost omisă. Verifică fila de tratament pentru a vedea dacă bolusul este sincronizat corect. Amână alarma și, dacă eroarea reapare, schimbă patch-ul sau baza pompei. Stare BLE Ultima conexiune diff --git a/pump/medtrum/src/main/res/values-ru-rRU/strings.xml b/pump/medtrum/src/main/res/values-ru-rRU/strings.xml index 5a18717b55..8ea58e1dca 100644 --- a/pump/medtrum/src/main/res/values-ru-rRU/strings.xml +++ b/pump/medtrum/src/main/res/values-ru-rRU/strings.xml @@ -12,6 +12,7 @@ Помпа приостановлена в связи с превышением максимального допустимого количества инсулина в сутки Патч не активирован Сбой передачи пользовательских настроек на помпу! + Ошибка при синхронизации журнала с помпы, запись пропущена. Проверьте вкладку терапии, правильно ли синхронизированы болюсы. Уберите предупреждение, а если ошибка повторится, замените патч или базу помпы. Статус BT Последнее подключение diff --git a/pump/medtrum/src/main/res/values-sk-rSK/strings.xml b/pump/medtrum/src/main/res/values-sk-rSK/strings.xml index 445e778cc3..28bdad848b 100644 --- a/pump/medtrum/src/main/res/values-sk-rSK/strings.xml +++ b/pump/medtrum/src/main/res/values-sk-rSK/strings.xml @@ -12,6 +12,7 @@ Pumpa je pozastavená kvôli prekročeniu maximálneho množstva inzulínu za deň Patch nie je aktivovaný Načítanie uživateľského nastavenia do pumpy zlyhalo! + Chyba pri synchronizácii histórie z pumpy, záznam bol preskočený. Skontrolujte zoznam ošetrení, či je bolus správne synchronizovaný. Potvrďte a pokiaľ sa znovu ukáže chyba, vymeňte patch, alebo základňu pumpy. Stav BLE Naposledy pripojené diff --git a/pump/medtrum/src/main/res/values-tr-rTR/strings.xml b/pump/medtrum/src/main/res/values-tr-rTR/strings.xml index 1c6af42aad..7f89e9c47c 100644 --- a/pump/medtrum/src/main/res/values-tr-rTR/strings.xml +++ b/pump/medtrum/src/main/res/values-tr-rTR/strings.xml @@ -12,6 +12,7 @@ Günlük maksimum insülinin aşılması nedeniyle pompa askıya alındı Patch etkinleştirilemedi Kullanıcı ayarlarının pompada ayarlanması başarısız oldu! + Geçmiş senkronize edilirken hata oluştu; bir kayıt atlandı. Bolusun doğru şekilde senkronize edilip edilmediğini kontrol etmek için tedavi sekmesini kontrol edin. Erteleyin ve hata tekrarlanmaya devam ederse patch veya pompa tabanını değiştirin. BLE Durumu Son bağlantı diff --git a/pump/omnipod-common/src/main/res/values-it-rIT/strings.xml b/pump/omnipod-common/src/main/res/values-it-rIT/strings.xml index 6e4cd2fe9e..b07a3c89e4 100644 --- a/pump/omnipod-common/src/main/res/values-it-rIT/strings.xml +++ b/pump/omnipod-common/src/main/res/values-it-rIT/strings.xml @@ -104,6 +104,11 @@ Mostra tasto \"sospendi erogazione\" nella scheda Omnipod Rilevamento ora legale/fuso orario abilitato Promemoria scadenza abilitato + Se abilitato il pod emetterà 1 bip quando il tempo impostato sarà raggiunto + Promemoria orario prima della scadenza (72 ore) + Allarme scadenza abilitato + Se abilitato il pod emetterà 1 bip quando il tempo specificato sarà raggiunto e un\'ora prima dello spegnimento + Allarme orario prima dello spegnimento (80 ore) Avviso livello serbatoio basso abilitato Numero di unità Silenzia automaticamente avvisi pod diff --git a/pump/omnipod-common/src/main/res/values-lt-rLT/strings.xml b/pump/omnipod-common/src/main/res/values-lt-rLT/strings.xml index f70721fedf..672631b8e4 100644 --- a/pump/omnipod-common/src/main/res/values-lt-rLT/strings.xml +++ b/pump/omnipod-common/src/main/res/values-lt-rLT/strings.xml @@ -69,7 +69,7 @@ Atšaukti Užbaigti - Kitas + Toliau Kartoti Deaktyvuoti Pod Išjungti Pod @@ -79,17 +79,17 @@ Užpildykite Pod Inicijuoti Pod Prijunkite Pod - Paruoškite infuzijos vietą. Nuimkite adatos apsauginį dangtelį, pleistro apsaugą ir priklijuokite Pod infuzijos vietoje.\n\nJei kaniulė iššoko, paspauskite Atšaukti ir pakeiskite Pod.\n\nSpauskite Kitas, norėdami įvesti kaniulę ir pradėti leisti insuliną. + Paruoškite infuzijos vietą. Nuimkite adatos apsauginį dangtelį, pleistro apsaugą ir priklijuokite Pod infuzijos vietoje.\n\nJei kaniulė iššoko, paspauskite Atšaukti ir pakeiskite Pod.\n\nSpauskite Toliau, norėdami įvesti kaniulę ir pradėti leisti insuliną. Kai paspausite OK, kaniulė bus įvesta. Įsitikinkite, kad Pod pritvirtinote infuzijos vietoje. Įvesti kaniulę - Nustatomas pradinis bazės profilis ir įvedama kaniulė.\n\nKai kaniulė bus sėkmingai įvesta, spauskite Kitas. + Nustatomas pradinis bazės profilis ir įvedama kaniulė.\n\nKai kaniulė bus sėkmingai įvesta, spauskite Toliau. Pod aktyvuotas Naujasis Pod yra aktyvus.\n\nJūsų bazės profilis yra suprogramuotas ir kaniulė įvesta.\n\nPatikrinkite, ar kaniulė buvo tinkamai įvesta, jei taip nėra, pakeiskite Pod. Deaktyvuoti Pod - SpustelėkiteKitas, kad deaktyvuotumėte Pod.\n\nPastaba: Tai sustabdys insulino leidimą ir išjungs Pod. + SpustelėkiteToliau, kad deaktyvuotumėte Pod.\n\nPastaba: Tai sustabdys insulino leidimą ir išjungs Pod. Pod deaktyvuojamas - Pod deaktyvuojamas.\n\nKai veiksmas bus sėkmingai baigtas, spauskite Kitas. + Pod deaktyvuojamas.\n\nKai veiksmas bus sėkmingai baigtas, spauskite Toliau. Pod deaktyvuotas Pod deaktyvuotas.\n\nNuimkite Pod nuo kūno ir jį išmeskite. Pod išjungtas diff --git a/pump/omnipod-dash/src/main/res/values-lt-rLT/strings.xml b/pump/omnipod-dash/src/main/res/values-lt-rLT/strings.xml index e8157603c0..88b4c995ba 100644 --- a/pump/omnipod-dash/src/main/res/values-lt-rLT/strings.xml +++ b/pump/omnipod-dash/src/main/res/values-lt-rLT/strings.xml @@ -19,8 +19,8 @@ Ryšio kokybė Insulino statusas - Užpildykite naują Pod insulinu, kurio pakaktų 3 dienoms.\n\nTaip pat atkreipkite dėmesį į du pyptelėjimus iš Pod, kai pildote. Tai rodo, kad rezervuaras buvo užpildytas mažiausiai 80 v. Visiškai ištuštinkite švirkštą, net jei girdėjote du pyptelėjimus.\n\nUžpildę Pod, spustelėkite Kitas.\n\nPastaba: vykdant šiuos veiksmus, nenuimkite Pod adatos apsauginio dangtelio. - Vyksta naujo Pod susiejimas ir užpildymas.\n\nSėkmingai užsibaigus inicijavimo procesui, spauskite Kitas. + Užpildykite naują Pod insulinu, kurio pakaktų 3 dienoms.\n\nTaip pat atkreipkite dėmesį į du pyptelėjimus iš Pod, kai pildote. Tai rodo, kad rezervuaras buvo užpildytas mažiausiai 80 v. Visiškai ištuštinkite švirkštą, net jei girdėjote du pyptelėjimus.\n\nUžpildę Pod, spustelėkite Toliau.\n\nPastaba: vykdant šiuos veiksmus, nenuimkite Pod adatos apsauginio gaubtelio. + Vyksta naujo Pod susiejimas ir užpildymas.\n\nSėkmingai užsibaigus inicijavimo procesui, spauskite Toliau. Įjungtas pranešimų apie sustabdytą insulino tiekimą garsas Nepavyko prisijungti prie Pod diff --git a/pump/omnipod-eros/src/main/res/values-lt-rLT/strings.xml b/pump/omnipod-eros/src/main/res/values-lt-rLT/strings.xml index f968bf071e..bfe4522846 100644 --- a/pump/omnipod-eros/src/main/res/values-lt-rLT/strings.xml +++ b/pump/omnipod-eros/src/main/res/values-lt-rLT/strings.xml @@ -65,8 +65,8 @@ Pulse žurnalas Pulse žurnalas (nukopijuotas į mainų sritį) - Užpildykite naują Pod insulinu, kurio pakaktų 3 dienoms.\n\nTaip pat atkreipkite dėmesį į du pyptelėjimus iš Pod, kai pildote. Tai rodo, kad rezervuaras buvo užpildytas mažiausiai 80 v. Visiškai ištuštinkite švirkštą, net jei girdėjote du pyptelėjimus.\n\nUžpildę Pod, spustelėkite Kitas.\n\nPastaba: vykdant šiuos veiksmus, nenuimkite Pod adatos apsauginio dangtelio.\nPastaba: padėkite RileyLink vertikalioje pozicijoje ir Pod kelių cm atstumu vienas nuo kito. - Vyksta naujo Pod susiejimas ir užpildymas.\n\nSėkmingai užsibaigus inicijavimo procesui, spauskite Kitas.\n\n Pastaba: padėkite RileyLink vertikalioje pozicijoje ir Pod kelių cm atstumu vienas nuo kito. + Užpildykite naują Pod insulinu, kurio pakaktų 3 dienoms.\n\nTaip pat atkreipkite dėmesį į du pyptelėjimus iš Pod, kai pildote. Tai rodo, kad rezervuaras buvo užpildytas mažiausiai 80 v. Visiškai ištuštinkite švirkštą, net jei girdėjote du pyptelėjimus.\n\nUžpildę Pod, spustelėkite Toliau.\n\nPastaba: vykdant šiuos veiksmus, nenuimkite Pod adatos apsauginio gaubtelio.\nPastaba: padėkite RileyLink vertikalioje pozicijoje ir Pod kelių cm atstumu vienas nuo kito. + Vyksta naujo Pod susiejimas ir užpildymas.\n\nSėkmingai užsibaigus inicijavimo procesui, spauskite Toliau.\n\n Pastaba: padėkite RileyLink vertikalioje pozicijoje ir Pod kelių cm atstumu vienas nuo kito. neaišku diff --git a/ui/src/main/res/values-lt-rLT/strings.xml b/ui/src/main/res/values-lt-rLT/strings.xml index 809caf6e8e..78ff4b9dec 100644 --- a/ui/src/main/res/values-lt-rLT/strings.xml +++ b/ui/src/main/res/values-lt-rLT/strings.xml @@ -137,7 +137,7 @@ Pridėti Redaguoti Rodyti įrašą įrenginyje: - KG apskaičiavimas + Glikemija Bolusų AIO apskaičiavimas Bazės AIO apskaičiavimas Tendencijos apskaičiavimas diff --git a/wear/src/main/res/values-it-rIT/strings.xml b/wear/src/main/res/values-it-rIT/strings.xml index cc7a279f9a..5e0076a4bb 100644 --- a/wear/src/main/res/values-it-rIT/strings.xml +++ b/wear/src/main/res/values-it-rIT/strings.xml @@ -40,6 +40,9 @@ Mostra BGI Mostra frecce direzionali Mostra Indietro + Mostra TBR + Mostra boli & SMB + Mostra griglia Scuro Evidenzia basali Visualizza previsioni From 113f51126972a132ef505fb4d175ecf8210de080 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Wed, 1 Nov 2023 15:41:31 +0100 Subject: [PATCH 34/60] Unify check in deliverTreatment, fix DanaRKorean --- .../nightscout/pump/combov2/ComboV2Plugin.kt | 12 +-- .../danaRKorean/DanaRKoreanPlugin.kt | 70 +++++++------- .../androidaps/danaRv2/DanaRv2Plugin.java | 90 +++++++++--------- .../androidaps/danar/DanaRPlugin.java | 70 +++++++------- .../nightscout/pump/danars/DanaRSPlugin.kt | 83 ++++++++-------- .../pump/diaconn/DiaconnG8Plugin.kt | 51 +++++----- .../plugins/pump/eopatch/EopatchPumpPlugin.kt | 95 +++++++++---------- .../nightscout/pump/medtrum/MedtrumPlugin.kt | 40 ++++---- .../omnipod/dash/OmnipodDashPumpPlugin.kt | 14 +-- .../omnipod/eros/OmnipodErosPumpPlugin.java | 26 +---- .../pump/common/PumpPluginAbstract.kt | 27 +----- .../aaps/pump/virtual/VirtualPumpPlugin.kt | 4 + 12 files changed, 254 insertions(+), 328 deletions(-) diff --git a/pump/combov2/src/main/kotlin/info/nightscout/pump/combov2/ComboV2Plugin.kt b/pump/combov2/src/main/kotlin/info/nightscout/pump/combov2/ComboV2Plugin.kt index cf7def4f64..9f04934b82 100644 --- a/pump/combov2/src/main/kotlin/info/nightscout/pump/combov2/ComboV2Plugin.kt +++ b/pump/combov2/src/main/kotlin/info/nightscout/pump/combov2/ComboV2Plugin.kt @@ -1012,6 +1012,10 @@ class ComboV2Plugin @Inject constructor( } override fun deliverTreatment(detailedBolusInfo: DetailedBolusInfo): PumpEnactResult { + // Insulin value must be greater than 0 + require(detailedBolusInfo.carbs == 0.0) { detailedBolusInfo.toString() } + require(detailedBolusInfo.insulin > 0) { detailedBolusInfo.toString() } + val oldInsulinAmount = detailedBolusInfo.insulin detailedBolusInfo.insulin = constraintChecker .applyBolusConstraints(ConstraintObject(detailedBolusInfo.insulin, aapsLogger)) @@ -1021,14 +1025,6 @@ class ComboV2Plugin @Inject constructor( "Applied bolus constraints: old insulin amount: $oldInsulinAmount new: ${detailedBolusInfo.insulin}" ) - // Carbs are not allowed because the Combo does not record carbs. - // This is defined in the ACCU_CHEK_COMBO PumpType enum's - // pumpCapability field, so AndroidAPS is informed about this - // lack of carb storage capability. We therefore do not expect - // nonzero carbs here. - // (Also, a zero insulin value makes no sense when bolusing.) - require((detailedBolusInfo.insulin > 0) && (detailedBolusInfo.carbs <= 0.0)) { detailedBolusInfo.toString() } - val acquiredPump = getAcquiredPump() val requestedBolusAmount = detailedBolusInfo.insulin.iuToCctlBolus() diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/DanaRKoreanPlugin.kt b/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/DanaRKoreanPlugin.kt index 3676a77d3e..04920c92a4 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/DanaRKoreanPlugin.kt +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danaRKorean/DanaRKoreanPlugin.kt @@ -147,45 +147,41 @@ class DanaRKoreanPlugin @Inject constructor( } override fun deliverTreatment(detailedBolusInfo: DetailedBolusInfo): PumpEnactResult { + // Insulin value must be greater than 0 + require(detailedBolusInfo.carbs == 0.0) { detailedBolusInfo.toString() } + require(detailedBolusInfo.insulin > 0) { detailedBolusInfo.toString() } + detailedBolusInfo.insulin = constraintChecker.applyBolusConstraints(ConstraintObject(detailedBolusInfo.insulin, aapsLogger)).value() - require(detailedBolusInfo.carbs > 0) - return if (detailedBolusInfo.insulin > 0) { - val t = EventOverviewBolusProgress.Treatment(0.0, 0, detailedBolusInfo.bolusType == DetailedBolusInfo.BolusType.SMB, detailedBolusInfo.id) - var connectionOK = false - if (detailedBolusInfo.insulin > 0) - connectionOK = sExecutionService.bolus( - detailedBolusInfo.insulin, detailedBolusInfo.carbs.toInt(), detailedBolusInfo.carbsTimestamp - ?: detailedBolusInfo.timestamp, t - ) - val result = PumpEnactResult(injector) - result.success(connectionOK && abs(detailedBolusInfo.insulin - t.insulin) < pumpDescription.bolusStep) - .bolusDelivered(t.insulin) - if (!result.success) result.comment( - rh.gs( - info.nightscout.pump.dana.R.string.boluserrorcode, - detailedBolusInfo.insulin, - t.insulin, - danaPump.bolusStartErrorCode - ) - ) else result.comment(app.aaps.core.ui.R.string.ok) - aapsLogger.debug(LTag.PUMP, "deliverTreatment: OK. Asked: " + detailedBolusInfo.insulin + " Delivered: " + result.bolusDelivered) - detailedBolusInfo.insulin = t.insulin - detailedBolusInfo.timestamp = dateUtil.now() - if (detailedBolusInfo.insulin > 0) pumpSync.syncBolusWithPumpId( - detailedBolusInfo.timestamp, - detailedBolusInfo.insulin, - detailedBolusInfo.bolusType, - dateUtil.now(), - PumpType.DANA_R_KOREAN, - serialNumber() + val t = EventOverviewBolusProgress.Treatment(0.0, 0, detailedBolusInfo.bolusType == DetailedBolusInfo.BolusType.SMB, detailedBolusInfo.id) + var connectionOK = false + if (detailedBolusInfo.insulin > 0) + connectionOK = sExecutionService.bolus( + detailedBolusInfo.insulin, detailedBolusInfo.carbs.toInt(), detailedBolusInfo.carbsTimestamp + ?: detailedBolusInfo.timestamp, t ) - result - } else { - val result = PumpEnactResult(injector) - result.success(false).bolusDelivered(0.0).comment(app.aaps.core.ui.R.string.invalid_input) - aapsLogger.error("deliverTreatment: Invalid input") - result - } + val result = PumpEnactResult(injector) + result.success(connectionOK && abs(detailedBolusInfo.insulin - t.insulin) < pumpDescription.bolusStep) + .bolusDelivered(t.insulin) + if (!result.success) result.comment( + rh.gs( + info.nightscout.pump.dana.R.string.boluserrorcode, + detailedBolusInfo.insulin, + t.insulin, + danaPump.bolusStartErrorCode + ) + ) else result.comment(app.aaps.core.ui.R.string.ok) + aapsLogger.debug(LTag.PUMP, "deliverTreatment: OK. Asked: " + detailedBolusInfo.insulin + " Delivered: " + result.bolusDelivered) + detailedBolusInfo.insulin = t.insulin + detailedBolusInfo.timestamp = dateUtil.now() + if (detailedBolusInfo.insulin > 0) pumpSync.syncBolusWithPumpId( + detailedBolusInfo.timestamp, + detailedBolusInfo.insulin, + detailedBolusInfo.bolusType, + dateUtil.now(), + PumpType.DANA_R_KOREAN, + serialNumber() + ) + return result } // This is called from APS diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/DanaRv2Plugin.java b/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/DanaRv2Plugin.java index 8c6649f95d..e3474f695c 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/DanaRv2Plugin.java +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danaRv2/DanaRv2Plugin.java @@ -159,54 +159,50 @@ public class DanaRv2Plugin extends AbstractDanaRPlugin { // Pump interface @NonNull @Override public PumpEnactResult deliverTreatment(DetailedBolusInfo detailedBolusInfo) { - detailedBolusInfo.insulin = constraintChecker.applyBolusConstraints(new ConstraintObject<>(detailedBolusInfo.insulin, getAapsLogger())).value(); - if (detailedBolusInfo.insulin > 0 || detailedBolusInfo.carbs > 0) { - // v2 stores end time for bolus, we need to adjust time - // default delivery speed is 12 sec/U - int preferencesSpeed = sp.getInt(info.nightscout.pump.dana.R.string.key_danars_bolusspeed, 0); - int speed = 12; - switch (preferencesSpeed) { - case 0: - speed = 12; - break; - case 1: - speed = 30; - break; - case 2: - speed = 60; - break; - } - detailedBolusInfo.timestamp = dateUtil.now() + (long) (speed * detailedBolusInfo.insulin * 1000); - // clean carbs to prevent counting them as twice because they will picked up as another record - // I don't think it's necessary to copy DetailedBolusInfo right now for carbs records - double carbs = detailedBolusInfo.carbs; - detailedBolusInfo.carbs = 0; - long carbTimeStamp = detailedBolusInfo.getCarbsTimestamp() != null ? detailedBolusInfo.getCarbsTimestamp() : detailedBolusInfo.timestamp; - if (carbTimeStamp == detailedBolusInfo.timestamp) carbTimeStamp -= T.Companion.mins(1).msecs(); // better set 1 min back to prevents clash with insulin - - detailedBolusInfoStorage.add(detailedBolusInfo); // will be picked up on reading history - - EventOverviewBolusProgress.Treatment t = new EventOverviewBolusProgress.Treatment(0, 0, detailedBolusInfo.getBolusType() == DetailedBolusInfo.BolusType.SMB, detailedBolusInfo.getId()); - boolean connectionOK = false; - if (detailedBolusInfo.insulin > 0 || carbs > 0) - connectionOK = sExecutionService.bolus(detailedBolusInfo.insulin, (int) carbs, carbTimeStamp, t); - PumpEnactResult result = new PumpEnactResult(getInjector()); - result.success(connectionOK && Math.abs(detailedBolusInfo.insulin - t.getInsulin()) < pumpDescription.getBolusStep()) - .bolusDelivered(t.getInsulin()); - if (!result.getSuccess()) - result.comment(rh.gs(info.nightscout.pump.dana.R.string.boluserrorcode, detailedBolusInfo.insulin, t.getInsulin(), - danaPump.getBolusStartErrorCode())); - else - result.comment(app.aaps.core.ui.R.string.ok); - aapsLogger.debug(LTag.PUMP, "deliverTreatment: OK. Asked: " + detailedBolusInfo.insulin + " Delivered: " + result.getBolusDelivered()); - // remove carbs because it's get from history separately - return result; - } else { - PumpEnactResult result = new PumpEnactResult(getInjector()); - result.success(false).bolusDelivered(0d).comment(app.aaps.core.ui.R.string.invalid_input); - aapsLogger.error("deliverTreatment: Invalid input"); - return result; + if (detailedBolusInfo.insulin == 0 || detailedBolusInfo.carbs > 0) { + throw new IllegalArgumentException(detailedBolusInfo.toString(), new Exception()); } + detailedBolusInfo.insulin = constraintChecker.applyBolusConstraints(new ConstraintObject<>(detailedBolusInfo.insulin, getAapsLogger())).value(); + // v2 stores end time for bolus, we need to adjust time + // default delivery speed is 12 sec/U + int preferencesSpeed = sp.getInt(info.nightscout.pump.dana.R.string.key_danars_bolusspeed, 0); + int speed = 12; + switch (preferencesSpeed) { + case 0: + speed = 12; + break; + case 1: + speed = 30; + break; + case 2: + speed = 60; + break; + } + detailedBolusInfo.timestamp = dateUtil.now() + (long) (speed * detailedBolusInfo.insulin * 1000); + // clean carbs to prevent counting them as twice because they will picked up as another record + // I don't think it's necessary to copy DetailedBolusInfo right now for carbs records + double carbs = detailedBolusInfo.carbs; + detailedBolusInfo.carbs = 0; + long carbTimeStamp = detailedBolusInfo.getCarbsTimestamp() != null ? detailedBolusInfo.getCarbsTimestamp() : detailedBolusInfo.timestamp; + if (carbTimeStamp == detailedBolusInfo.timestamp) carbTimeStamp -= T.Companion.mins(1).msecs(); // better set 1 min back to prevents clash with insulin + + detailedBolusInfoStorage.add(detailedBolusInfo); // will be picked up on reading history + + EventOverviewBolusProgress.Treatment t = new EventOverviewBolusProgress.Treatment(0, 0, detailedBolusInfo.getBolusType() == DetailedBolusInfo.BolusType.SMB, detailedBolusInfo.getId()); + boolean connectionOK = false; + if (detailedBolusInfo.insulin > 0 || carbs > 0) + connectionOK = sExecutionService.bolus(detailedBolusInfo.insulin, (int) carbs, carbTimeStamp, t); + PumpEnactResult result = new PumpEnactResult(getInjector()); + result.success(connectionOK && Math.abs(detailedBolusInfo.insulin - t.getInsulin()) < pumpDescription.getBolusStep()) + .bolusDelivered(t.getInsulin()); + if (!result.getSuccess()) + result.comment(rh.gs(info.nightscout.pump.dana.R.string.boluserrorcode, detailedBolusInfo.insulin, t.getInsulin(), + danaPump.getBolusStartErrorCode())); + else + result.comment(app.aaps.core.ui.R.string.ok); + aapsLogger.debug(LTag.PUMP, "deliverTreatment: OK. Asked: " + detailedBolusInfo.insulin + " Delivered: " + result.getBolusDelivered()); + // remove carbs because it's get from history separately + return result; } @Override diff --git a/pump/danar/src/main/java/info/nightscout/androidaps/danar/DanaRPlugin.java b/pump/danar/src/main/java/info/nightscout/androidaps/danar/DanaRPlugin.java index 9463c6c121..59434f381e 100644 --- a/pump/danar/src/main/java/info/nightscout/androidaps/danar/DanaRPlugin.java +++ b/pump/danar/src/main/java/info/nightscout/androidaps/danar/DanaRPlugin.java @@ -160,44 +160,40 @@ public class DanaRPlugin extends AbstractDanaRPlugin { @NonNull @Override public PumpEnactResult deliverTreatment(DetailedBolusInfo detailedBolusInfo) { - detailedBolusInfo.insulin = constraintChecker.applyBolusConstraints(new ConstraintObject<>(detailedBolusInfo.insulin, getAapsLogger())).value(); - if (detailedBolusInfo.insulin > 0 || detailedBolusInfo.carbs > 0) { - EventOverviewBolusProgress.Treatment t = new EventOverviewBolusProgress.Treatment(0, 0, detailedBolusInfo.getBolusType() == DetailedBolusInfo.BolusType.SMB, detailedBolusInfo.getId()); - boolean connectionOK = false; - if (detailedBolusInfo.insulin > 0 || detailedBolusInfo.carbs > 0) - connectionOK = sExecutionService.bolus(detailedBolusInfo.insulin, (int) detailedBolusInfo.carbs, detailedBolusInfo.getCarbsTimestamp() != null ? detailedBolusInfo.getCarbsTimestamp() : detailedBolusInfo.timestamp, t); - PumpEnactResult result = new PumpEnactResult(getInjector()); - result.success(connectionOK && Math.abs(detailedBolusInfo.insulin - t.getInsulin()) < pumpDescription.getBolusStep()) - .bolusDelivered(t.getInsulin()); - if (!result.getSuccess()) - result.comment(rh.gs(info.nightscout.pump.dana.R.string.boluserrorcode, detailedBolusInfo.insulin, t.getInsulin(), danaPump.getBolusStartErrorCode())); - else - result.comment(app.aaps.core.ui.R.string.ok); - aapsLogger.debug(LTag.PUMP, "deliverTreatment: OK. Asked: " + detailedBolusInfo.insulin + " Delivered: " + result.getBolusDelivered()); - detailedBolusInfo.insulin = t.getInsulin(); - detailedBolusInfo.timestamp = System.currentTimeMillis(); - if (detailedBolusInfo.insulin > 0) - pumpSync.syncBolusWithPumpId( - detailedBolusInfo.timestamp, - detailedBolusInfo.insulin, - detailedBolusInfo.getBolusType(), - dateUtil.now(), - PumpType.DANA_R, - serialNumber()); - if (detailedBolusInfo.carbs > 0) - pumpSync.syncCarbsWithTimestamp( - detailedBolusInfo.getCarbsTimestamp() != null ? detailedBolusInfo.getCarbsTimestamp() : detailedBolusInfo.timestamp, - detailedBolusInfo.carbs, - null, - PumpType.DANA_R, - serialNumber()); - return result; - } else { - PumpEnactResult result = new PumpEnactResult(getInjector()); - result.success(false).bolusDelivered(0d).comment(app.aaps.core.ui.R.string.invalid_input); - aapsLogger.error("deliverTreatment: Invalid input"); - return result; + if (detailedBolusInfo.insulin == 0 || detailedBolusInfo.carbs > 0) { + throw new IllegalArgumentException(detailedBolusInfo.toString(), new Exception()); } + detailedBolusInfo.insulin = constraintChecker.applyBolusConstraints(new ConstraintObject<>(detailedBolusInfo.insulin, getAapsLogger())).value(); + EventOverviewBolusProgress.Treatment t = new EventOverviewBolusProgress.Treatment(0, 0, detailedBolusInfo.getBolusType() == DetailedBolusInfo.BolusType.SMB, detailedBolusInfo.getId()); + boolean connectionOK = false; + if (detailedBolusInfo.insulin > 0) + connectionOK = sExecutionService.bolus(detailedBolusInfo.insulin, (int) detailedBolusInfo.carbs, detailedBolusInfo.getCarbsTimestamp() != null ? detailedBolusInfo.getCarbsTimestamp() : detailedBolusInfo.timestamp, t); + PumpEnactResult result = new PumpEnactResult(getInjector()); + result.success(connectionOK && Math.abs(detailedBolusInfo.insulin - t.getInsulin()) < pumpDescription.getBolusStep()) + .bolusDelivered(t.getInsulin()); + if (!result.getSuccess()) + result.comment(rh.gs(info.nightscout.pump.dana.R.string.boluserrorcode, detailedBolusInfo.insulin, t.getInsulin(), danaPump.getBolusStartErrorCode())); + else + result.comment(app.aaps.core.ui.R.string.ok); + aapsLogger.debug(LTag.PUMP, "deliverTreatment: OK. Asked: " + detailedBolusInfo.insulin + " Delivered: " + result.getBolusDelivered()); + detailedBolusInfo.insulin = t.getInsulin(); + detailedBolusInfo.timestamp = System.currentTimeMillis(); + if (detailedBolusInfo.insulin > 0) + pumpSync.syncBolusWithPumpId( + detailedBolusInfo.timestamp, + detailedBolusInfo.insulin, + detailedBolusInfo.getBolusType(), + dateUtil.now(), + PumpType.DANA_R, + serialNumber()); + if (detailedBolusInfo.carbs > 0) + pumpSync.syncCarbsWithTimestamp( + detailedBolusInfo.getCarbsTimestamp() != null ? detailedBolusInfo.getCarbsTimestamp() : detailedBolusInfo.timestamp, + detailedBolusInfo.carbs, + null, + PumpType.DANA_R, + serialNumber()); + return result; } // This is called from APS diff --git a/pump/danars/src/main/java/info/nightscout/pump/danars/DanaRSPlugin.kt b/pump/danars/src/main/java/info/nightscout/pump/danars/DanaRSPlugin.kt index acd242c277..7f5f481452 100644 --- a/pump/danars/src/main/java/info/nightscout/pump/danars/DanaRSPlugin.kt +++ b/pump/danars/src/main/java/info/nightscout/pump/danars/DanaRSPlugin.kt @@ -288,52 +288,47 @@ class DanaRSPlugin @Inject constructor( @Synchronized override fun deliverTreatment(detailedBolusInfo: DetailedBolusInfo): PumpEnactResult { + // Insulin value must be greater than 0 + require(detailedBolusInfo.carbs == 0.0) { detailedBolusInfo.toString() } + require(detailedBolusInfo.insulin > 0) { detailedBolusInfo.toString() } + detailedBolusInfo.insulin = constraintChecker.applyBolusConstraints(ConstraintObject(detailedBolusInfo.insulin, aapsLogger)).value() - return if (detailedBolusInfo.insulin > 0 || detailedBolusInfo.carbs > 0) { - val preferencesSpeed = sp.getInt(info.nightscout.pump.dana.R.string.key_danars_bolusspeed, 0) - var speed = 12 - when (preferencesSpeed) { - 0 -> speed = 12 - 1 -> speed = 30 - 2 -> speed = 60 - } - // RS stores end time for bolus, we need to adjust time - // default delivery speed is 12 sec/U - detailedBolusInfo.timestamp = dateUtil.now() + (speed * detailedBolusInfo.insulin * 1000).toLong() - // clean carbs to prevent counting them as twice because they will picked up as another record - // I don't think it's necessary to copy DetailedBolusInfo right now for carbs records - val carbs = detailedBolusInfo.carbs - detailedBolusInfo.carbs = 0.0 - var carbTimeStamp = detailedBolusInfo.carbsTimestamp ?: detailedBolusInfo.timestamp - if (carbTimeStamp == detailedBolusInfo.timestamp) carbTimeStamp -= T.mins(1).msecs() // better set 1 min back to prevents clash with insulin - detailedBolusInfoStorage.add(detailedBolusInfo) // will be picked up on reading history - val t = EventOverviewBolusProgress.Treatment(0.0, 0, detailedBolusInfo.bolusType == DetailedBolusInfo.BolusType.SMB, detailedBolusInfo.id) - var connectionOK = false - if (detailedBolusInfo.insulin > 0 || carbs > 0) connectionOK = danaRSService?.bolus(detailedBolusInfo.insulin, carbs.toInt(), carbTimeStamp, t) - ?: false - val result = PumpEnactResult(injector) - result.success = connectionOK && abs(detailedBolusInfo.insulin - t.insulin) < pumpDescription.bolusStep - result.bolusDelivered = t.insulin - if (!result.success) { - var error = "" + danaPump.bolusStartErrorCode - when (danaPump.bolusStartErrorCode) { - 0x10 -> error = rh.gs(info.nightscout.pump.dana.R.string.maxbolusviolation) - 0x20 -> error = rh.gs(info.nightscout.pump.dana.R.string.commanderror) - 0x40 -> error = rh.gs(info.nightscout.pump.dana.R.string.speederror) - 0x80 -> error = rh.gs(info.nightscout.pump.dana.R.string.insulinlimitviolation) - } - result.comment = rh.gs(info.nightscout.pump.dana.R.string.boluserrorcode, detailedBolusInfo.insulin, t.insulin, error) - } else result.comment = rh.gs(app.aaps.core.ui.R.string.ok) - aapsLogger.debug(LTag.PUMP, "deliverTreatment: OK. Asked: " + detailedBolusInfo.insulin + " Delivered: " + result.bolusDelivered) - result - } else { - val result = PumpEnactResult(injector) - result.success = false - result.bolusDelivered = 0.0 - result.comment = rh.gs(app.aaps.core.ui.R.string.invalid_input) - aapsLogger.error("deliverTreatment: Invalid input") - result + val preferencesSpeed = sp.getInt(info.nightscout.pump.dana.R.string.key_danars_bolusspeed, 0) + var speed = 12 + when (preferencesSpeed) { + 0 -> speed = 12 + 1 -> speed = 30 + 2 -> speed = 60 } + // RS stores end time for bolus, we need to adjust time + // default delivery speed is 12 sec/U + detailedBolusInfo.timestamp = dateUtil.now() + (speed * detailedBolusInfo.insulin * 1000).toLong() + // clean carbs to prevent counting them as twice because they will picked up as another record + // I don't think it's necessary to copy DetailedBolusInfo right now for carbs records + val carbs = detailedBolusInfo.carbs + detailedBolusInfo.carbs = 0.0 + var carbTimeStamp = detailedBolusInfo.carbsTimestamp ?: detailedBolusInfo.timestamp + if (carbTimeStamp == detailedBolusInfo.timestamp) carbTimeStamp -= T.mins(1).msecs() // better set 1 min back to prevents clash with insulin + detailedBolusInfoStorage.add(detailedBolusInfo) // will be picked up on reading history + val t = EventOverviewBolusProgress.Treatment(0.0, 0, detailedBolusInfo.bolusType == DetailedBolusInfo.BolusType.SMB, detailedBolusInfo.id) + var connectionOK = false + if (detailedBolusInfo.insulin > 0 || carbs > 0) connectionOK = danaRSService?.bolus(detailedBolusInfo.insulin, carbs.toInt(), carbTimeStamp, t) + ?: false + val result = PumpEnactResult(injector) + result.success = connectionOK && abs(detailedBolusInfo.insulin - t.insulin) < pumpDescription.bolusStep + result.bolusDelivered = t.insulin + if (!result.success) { + var error = "" + danaPump.bolusStartErrorCode + when (danaPump.bolusStartErrorCode) { + 0x10 -> error = rh.gs(info.nightscout.pump.dana.R.string.maxbolusviolation) + 0x20 -> error = rh.gs(info.nightscout.pump.dana.R.string.commanderror) + 0x40 -> error = rh.gs(info.nightscout.pump.dana.R.string.speederror) + 0x80 -> error = rh.gs(info.nightscout.pump.dana.R.string.insulinlimitviolation) + } + result.comment = rh.gs(info.nightscout.pump.dana.R.string.boluserrorcode, detailedBolusInfo.insulin, t.insulin, error) + } else result.comment = rh.gs(app.aaps.core.ui.R.string.ok) + aapsLogger.debug(LTag.PUMP, "deliverTreatment: OK. Asked: " + detailedBolusInfo.insulin + " Delivered: " + result.bolusDelivered) + return result } override fun stopBolusDelivering() { diff --git a/pump/diaconn/src/main/java/info/nightscout/pump/diaconn/DiaconnG8Plugin.kt b/pump/diaconn/src/main/java/info/nightscout/pump/diaconn/DiaconnG8Plugin.kt index 96ebe852ac..1ebe750078 100644 --- a/pump/diaconn/src/main/java/info/nightscout/pump/diaconn/DiaconnG8Plugin.kt +++ b/pump/diaconn/src/main/java/info/nightscout/pump/diaconn/DiaconnG8Plugin.kt @@ -271,35 +271,30 @@ class DiaconnG8Plugin @Inject constructor( @Synchronized override fun deliverTreatment(detailedBolusInfo: DetailedBolusInfo): PumpEnactResult { - detailedBolusInfo.insulin = constraintChecker.applyBolusConstraints(ConstraintObject(detailedBolusInfo.insulin, aapsLogger)).value() - return if (detailedBolusInfo.insulin > 0 || detailedBolusInfo.carbs > 0) { - val carbs = detailedBolusInfo.carbs - detailedBolusInfo.carbs = 0.0 - var carbTimeStamp = detailedBolusInfo.carbsTimestamp ?: detailedBolusInfo.timestamp - if (carbTimeStamp == detailedBolusInfo.timestamp) carbTimeStamp -= T.mins(1).msecs() // better set 1 min back to prevents clash with insulin - detailedBolusInfoStorage.add(detailedBolusInfo) // will be picked up on reading history - val t = EventOverviewBolusProgress.Treatment(0.0, 0, detailedBolusInfo.bolusType == DetailedBolusInfo.BolusType.SMB, detailedBolusInfo.id) - var connectionOK = false - if (detailedBolusInfo.insulin > 0 || carbs > 0) connectionOK = diaconnG8Service?.bolus(detailedBolusInfo.insulin, carbs.toInt(), carbTimeStamp, t) - ?: false - val result = PumpEnactResult(injector) - result.success = connectionOK - result.bolusDelivered = t.insulin + // Insulin value must be greater than 0 + require(detailedBolusInfo.carbs == 0.0) { detailedBolusInfo.toString() } + require(detailedBolusInfo.insulin > 0) { detailedBolusInfo.toString() } - if (result.success) result.enacted = true - if (!result.success) { - setErrorMsg(diaconnG8Pump.resultErrorCode, result) - } else result.comment = rh.gs(app.aaps.core.ui.R.string.ok) - aapsLogger.debug(LTag.PUMP, "deliverTreatment: OK. Asked: " + detailedBolusInfo.insulin + " Delivered: " + result.bolusDelivered) - result - } else { - val result = PumpEnactResult(injector) - result.success = false - result.bolusDelivered = 0.0 - result.comment = rh.gs(app.aaps.core.ui.R.string.invalid_input) - aapsLogger.error("deliverTreatment: Invalid input") - result - } + detailedBolusInfo.insulin = constraintChecker.applyBolusConstraints(ConstraintObject(detailedBolusInfo.insulin, aapsLogger)).value() + val carbs = detailedBolusInfo.carbs + detailedBolusInfo.carbs = 0.0 + var carbTimeStamp = detailedBolusInfo.carbsTimestamp ?: detailedBolusInfo.timestamp + if (carbTimeStamp == detailedBolusInfo.timestamp) carbTimeStamp -= T.mins(1).msecs() // better set 1 min back to prevents clash with insulin + detailedBolusInfoStorage.add(detailedBolusInfo) // will be picked up on reading history + val t = EventOverviewBolusProgress.Treatment(0.0, 0, detailedBolusInfo.bolusType == DetailedBolusInfo.BolusType.SMB, detailedBolusInfo.id) + var connectionOK = false + if (detailedBolusInfo.insulin > 0 || carbs > 0) connectionOK = diaconnG8Service?.bolus(detailedBolusInfo.insulin, carbs.toInt(), carbTimeStamp, t) + ?: false + val result = PumpEnactResult(injector) + result.success = connectionOK + result.bolusDelivered = t.insulin + + if (result.success) result.enacted = true + if (!result.success) { + setErrorMsg(diaconnG8Pump.resultErrorCode, result) + } else result.comment = rh.gs(app.aaps.core.ui.R.string.ok) + aapsLogger.debug(LTag.PUMP, "deliverTreatment: OK. Asked: " + detailedBolusInfo.insulin + " Delivered: " + result.bolusDelivered) + return result } override fun stopBolusDelivering() { diff --git a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/EopatchPumpPlugin.kt b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/EopatchPumpPlugin.kt index 89d28165fd..a183f3b064 100644 --- a/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/EopatchPumpPlugin.kt +++ b/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/EopatchPumpPlugin.kt @@ -270,61 +270,58 @@ class EopatchPumpPlugin @Inject constructor( } override fun deliverTreatment(detailedBolusInfo: DetailedBolusInfo): PumpEnactResult { + // Insulin value must be greater than 0 + require(detailedBolusInfo.carbs == 0.0) { detailedBolusInfo.toString() } + require(detailedBolusInfo.insulin > 0) { detailedBolusInfo.toString() } val askedInsulin = detailedBolusInfo.insulin - if (detailedBolusInfo.insulin > 0.0) { - var isSuccess = true - val result = BehaviorSubject.createDefault(true) - val disposable = result.hide() - .subscribe { - isSuccess = it - } - - mDisposables.add(patchManager.startCalculatorBolus(detailedBolusInfo) - .doOnSuccess { - mLastDataTime = System.currentTimeMillis() - }.subscribe({ - result.onNext(it.isSuccess) - }, { - result.onNext(false) - }) - ) - - val tr = detailedBolusInfo.let { - EventOverviewBolusProgress.Treatment(it.insulin, it.carbs.toInt(), it.bolusType === DetailedBolusInfo.BolusType.SMB, it.id) + var isSuccess = true + val result = BehaviorSubject.createDefault(true) + val disposable = result.hide() + .subscribe { + isSuccess = it } - do { - SystemClock.sleep(100) - if (patchManager.patchConnectionState.isConnected) { - val delivering = patchManager.bolusCurrent.nowBolus.injected - rxBus.send(EventOverviewBolusProgress.apply { - status = rh.gs(app.aaps.core.ui.R.string.bolus_delivering, delivering) - percent = min((delivering / detailedBolusInfo.insulin * 100).toInt(), 100) - t = tr - }) - } - } while (!patchManager.bolusCurrent.nowBolus.endTimeSynced && isSuccess) + mDisposables.add(patchManager.startCalculatorBolus(detailedBolusInfo) + .doOnSuccess { + mLastDataTime = System.currentTimeMillis() + }.subscribe({ + result.onNext(it.isSuccess) + }, { + result.onNext(false) + }) + ) - rxBus.send(EventOverviewBolusProgress.apply { - status = rh.gs(app.aaps.core.ui.R.string.bolus_delivered_successfully, detailedBolusInfo.insulin) - percent = 100 - }) - - detailedBolusInfo.insulin = patchManager.bolusCurrent.nowBolus.injected.toDouble() - patchManager.addBolusToHistory(detailedBolusInfo) - - disposable.dispose() - - return if (isSuccess && abs(askedInsulin - detailedBolusInfo.insulin) < pumpDescription.bolusStep) - PumpEnactResult(injector).success(true).enacted(true).bolusDelivered(askedInsulin) - else - PumpEnactResult(injector).success(false)/*.enacted(false)*/.bolusDelivered(Round.roundTo(detailedBolusInfo.insulin, 0.01)) - - } else { - // no bolus required - return PumpEnactResult(injector).success(false).enacted(false).bolusDelivered(0.0).comment(rh.gs(app.aaps.core.ui.R.string.error)) + val tr = detailedBolusInfo.let { + EventOverviewBolusProgress.Treatment(it.insulin, it.carbs.toInt(), it.bolusType === DetailedBolusInfo.BolusType.SMB, it.id) } + + do { + SystemClock.sleep(100) + if (patchManager.patchConnectionState.isConnected) { + val delivering = patchManager.bolusCurrent.nowBolus.injected + rxBus.send(EventOverviewBolusProgress.apply { + status = rh.gs(app.aaps.core.ui.R.string.bolus_delivering, delivering) + percent = min((delivering / detailedBolusInfo.insulin * 100).toInt(), 100) + t = tr + }) + } + } while (!patchManager.bolusCurrent.nowBolus.endTimeSynced && isSuccess) + + rxBus.send(EventOverviewBolusProgress.apply { + status = rh.gs(app.aaps.core.ui.R.string.bolus_delivered_successfully, detailedBolusInfo.insulin) + percent = 100 + }) + + detailedBolusInfo.insulin = patchManager.bolusCurrent.nowBolus.injected.toDouble() + patchManager.addBolusToHistory(detailedBolusInfo) + + disposable.dispose() + + return if (isSuccess && abs(askedInsulin - detailedBolusInfo.insulin) < pumpDescription.bolusStep) + PumpEnactResult(injector).success(true).enacted(true).bolusDelivered(askedInsulin) + else + PumpEnactResult(injector).success(false)/*.enacted(false)*/.bolusDelivered(Round.roundTo(detailedBolusInfo.insulin, 0.01)) } override fun stopBolusDelivering() { diff --git a/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/MedtrumPlugin.kt b/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/MedtrumPlugin.kt index c237d9c2fd..bf15b3a240 100644 --- a/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/MedtrumPlugin.kt +++ b/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/MedtrumPlugin.kt @@ -268,7 +268,7 @@ import kotlin.math.abs val patchExpirationPref = preferenceFragment.findPreference(rh.gs(R.string.key_patch_expiration)) val pumpWarningNotificationPref = preferenceFragment.findPreference(rh.gs(R.string.key_pump_warning_notification)) val pumpWarningExpiryHourPref = preferenceFragment.findPreference(rh.gs(R.string.key_pump_warning_expiry_hour)) - + pumpWarningExpiryHourPref?.isEnabled = patchExpirationPref?.isChecked == true && pumpWarningNotificationPref?.isChecked == true } @@ -377,33 +377,27 @@ import kotlin.math.abs @Synchronized override fun deliverTreatment(detailedBolusInfo: DetailedBolusInfo): PumpEnactResult { + // Insulin value must be greater than 0 + require(detailedBolusInfo.carbs == 0.0) { detailedBolusInfo.toString() } + require(detailedBolusInfo.insulin > 0) { detailedBolusInfo.toString() } + aapsLogger.debug(LTag.PUMP, "deliverTreatment: " + detailedBolusInfo.insulin + "U") if (!isInitialized()) return PumpEnactResult(injector).success(false).enacted(false) detailedBolusInfo.insulin = constraintChecker.applyBolusConstraints(ConstraintObject(detailedBolusInfo.insulin, aapsLogger)).value() - return if (detailedBolusInfo.insulin > 0 && detailedBolusInfo.carbs == 0.0) { - aapsLogger.debug(LTag.PUMP, "deliverTreatment: Delivering bolus: " + detailedBolusInfo.insulin + "U") - val t = EventOverviewBolusProgress.Treatment(0.0, 0, detailedBolusInfo.bolusType == DetailedBolusInfo.BolusType.SMB, detailedBolusInfo.id) - val connectionOK = medtrumService?.setBolus(detailedBolusInfo, t) ?: false - val result = PumpEnactResult(injector) - result.success = connectionOK && abs(detailedBolusInfo.insulin - t.insulin) < pumpDescription.bolusStep - result.bolusDelivered = t.insulin - if (!result.success) { - // Note: There are no error codes - result.comment = "failed" - } else { - result.comment = "ok" - } - aapsLogger.debug(LTag.PUMP, "deliverTreatment: OK. Success: ${result.success} Asked: ${detailedBolusInfo.insulin} Delivered: ${result.bolusDelivered}") - result + aapsLogger.debug(LTag.PUMP, "deliverTreatment: Delivering bolus: " + detailedBolusInfo.insulin + "U") + val t = EventOverviewBolusProgress.Treatment(0.0, 0, detailedBolusInfo.bolusType == DetailedBolusInfo.BolusType.SMB, detailedBolusInfo.id) + val connectionOK = medtrumService?.setBolus(detailedBolusInfo, t) ?: false + val result = PumpEnactResult(injector) + result.success = connectionOK && abs(detailedBolusInfo.insulin - t.insulin) < pumpDescription.bolusStep + result.bolusDelivered = t.insulin + if (!result.success) { + // Note: There are no error codes + result.comment = "failed" } else { - aapsLogger.debug(LTag.PUMP, "deliverTreatment: Invalid input") - val result = PumpEnactResult(injector) - result.success = false - result.bolusDelivered = 0.0 - result.comment = rh.gs(app.aaps.core.ui.R.string.invalid_input) - aapsLogger.error("deliverTreatment: Invalid input") - result + result.comment = "ok" } + aapsLogger.debug(LTag.PUMP, "deliverTreatment: OK. Success: ${result.success} Asked: ${detailedBolusInfo.insulin} Delivered: ${result.bolusDelivered}") + return result } override fun stopBolusDelivering() { diff --git a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/OmnipodDashPumpPlugin.kt b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/OmnipodDashPumpPlugin.kt index 47a3f9c819..39cd00ef9a 100644 --- a/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/OmnipodDashPumpPlugin.kt +++ b/pump/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/OmnipodDashPumpPlugin.kt @@ -554,19 +554,13 @@ class OmnipodDashPumpPlugin @Inject constructor( get() = 0 override fun deliverTreatment(detailedBolusInfo: DetailedBolusInfo): PumpEnactResult { + // Insulin value must be greater than 0 + require(detailedBolusInfo.carbs == 0.0) { detailedBolusInfo.toString() } + require(detailedBolusInfo.insulin > 0) { detailedBolusInfo.toString() } + try { bolusDeliveryInProgress = true aapsLogger.info(LTag.PUMP, "Delivering treatment: $detailedBolusInfo $bolusCanceled") - if (detailedBolusInfo.carbs > 0 || - detailedBolusInfo.insulin == 0.0 - ) { - // Accept only valid insulin requests - return PumpEnactResult(injector) - .success(false) - .enacted(false) - .bolusDelivered(0.0) - .comment("Invalid input") - } val requestedBolusAmount = detailedBolusInfo.insulin if (requestedBolusAmount > reservoirLevel) { return PumpEnactResult(injector) diff --git a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/OmnipodErosPumpPlugin.java b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/OmnipodErosPumpPlugin.java index a308bb6b10..902d8829b9 100644 --- a/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/OmnipodErosPumpPlugin.java +++ b/pump/omnipod-eros/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/eros/OmnipodErosPumpPlugin.java @@ -22,7 +22,6 @@ import org.json.JSONException; import org.json.JSONObject; import java.util.List; -import java.util.Locale; import java.util.Objects; import java.util.Optional; import java.util.function.Supplier; @@ -661,29 +660,10 @@ public class OmnipodErosPumpPlugin extends PumpPluginBase implements Pump, Riley @NonNull @Override public PumpEnactResult deliverTreatment(DetailedBolusInfo detailedBolusInfo) { - if (detailedBolusInfo.insulin == 0 && detailedBolusInfo.carbs == 0) { - // neither carbs nor bolus requested - aapsLogger.error("deliverTreatment: Invalid input: neither carbs nor insulin are set in treatment"); - return new PumpEnactResult(getInjector()).success(false).enacted(false).bolusDelivered(0d) - .comment(app.aaps.core.ui.R.string.invalid_input); - } else if (detailedBolusInfo.insulin > 0) { - // bolus needed, ask pump to deliver it - return deliverBolus(detailedBolusInfo); - } else { - // no bolus required, carb only treatment - boolean result = pumpSync.syncCarbsWithTimestamp( - detailedBolusInfo.timestamp, - detailedBolusInfo.carbs, - null, - model(), - serialNumber()); - - aapsLogger.debug(LTag.PUMP, String.format(Locale.ENGLISH, "syncCarbsWithTimestamp " + - "[date=%d, carbs=%.2f, pumpSerial=%s] - Result: %b", - detailedBolusInfo.timestamp, detailedBolusInfo.carbs, serialNumber(), result)); - - return new PumpEnactResult(getInjector()).success(true).enacted(true).bolusDelivered(0d); + if (detailedBolusInfo.insulin == 0 || detailedBolusInfo.carbs > 0) { + throw new IllegalArgumentException(detailedBolusInfo.toString(), new Exception()); } + return deliverBolus(detailedBolusInfo); } @Override diff --git a/pump/pump-common/src/main/java/info/nightscout/pump/common/PumpPluginAbstract.kt b/pump/pump-common/src/main/java/info/nightscout/pump/common/PumpPluginAbstract.kt index b204793e3a..eda3246426 100644 --- a/pump/pump-common/src/main/java/info/nightscout/pump/common/PumpPluginAbstract.kt +++ b/pump/pump-common/src/main/java/info/nightscout/pump/common/PumpPluginAbstract.kt @@ -25,7 +25,6 @@ import app.aaps.core.interfaces.rx.AapsSchedulers import app.aaps.core.interfaces.rx.bus.RxBus import app.aaps.core.interfaces.rx.events.EventAppExit import app.aaps.core.interfaces.rx.events.EventCustomActionsChanged -import app.aaps.core.interfaces.rx.events.EventOverviewBolusProgress import app.aaps.core.interfaces.sharedPreferences.SP import app.aaps.core.interfaces.utils.DateUtil import app.aaps.core.interfaces.utils.DecimalFormatter @@ -35,7 +34,6 @@ import com.google.gson.GsonBuilder import dagger.android.HasAndroidInjector import info.nightscout.pump.common.data.PumpStatus import info.nightscout.pump.common.defs.PumpDriverState -import info.nightscout.pump.common.sync.PumpDbEntryCarbs import info.nightscout.pump.common.sync.PumpSyncEntriesCreator import info.nightscout.pump.common.sync.PumpSyncStorage import io.reactivex.rxjava3.disposables.CompositeDisposable @@ -303,27 +301,12 @@ abstract class PumpPluginAbstract protected constructor( @Synchronized override fun deliverTreatment(detailedBolusInfo: DetailedBolusInfo): PumpEnactResult { + // Insulin value must be greater than 0 + require(detailedBolusInfo.carbs == 0.0) { detailedBolusInfo.toString() } + require(detailedBolusInfo.insulin > 0) { detailedBolusInfo.toString() } + return try { - if (detailedBolusInfo.insulin == 0.0 && detailedBolusInfo.carbs == 0.0) { - // neither carbs nor bolus requested - aapsLogger.error("deliverTreatment: Invalid input") - PumpEnactResult(injector).success(false).enacted(false).bolusDelivered(0.0).comment(app.aaps.core.ui.R.string.invalid_input) - } else if (detailedBolusInfo.insulin > 0) { - // bolus needed, ask pump to deliver it - deliverBolus(detailedBolusInfo) - } else { - detailedBolusInfo.timestamp = System.currentTimeMillis() - - // no bolus required, carb only treatment - pumpSyncStorage.addCarbs(PumpDbEntryCarbs(detailedBolusInfo, this)) - - val bolusingEvent = EventOverviewBolusProgress - bolusingEvent.t = EventOverviewBolusProgress.Treatment(0.0, detailedBolusInfo.carbs.toInt(), detailedBolusInfo.bolusType === DetailedBolusInfo.BolusType.SMB, detailedBolusInfo.id) - bolusingEvent.percent = 100 - rxBus.send(bolusingEvent) - aapsLogger.debug(LTag.PUMP, "deliverTreatment: Carb only treatment.") - PumpEnactResult(injector).success(true).enacted(true).bolusDelivered(0.0).comment(R.string.common_resultok) - } + deliverBolus(detailedBolusInfo) } finally { triggerUIChange() } diff --git a/pump/virtual/src/main/kotlin/app/aaps/pump/virtual/VirtualPumpPlugin.kt b/pump/virtual/src/main/kotlin/app/aaps/pump/virtual/VirtualPumpPlugin.kt index 48d9eff923..dbb679cc66 100644 --- a/pump/virtual/src/main/kotlin/app/aaps/pump/virtual/VirtualPumpPlugin.kt +++ b/pump/virtual/src/main/kotlin/app/aaps/pump/virtual/VirtualPumpPlugin.kt @@ -181,6 +181,10 @@ open class VirtualPumpPlugin @Inject constructor( get() = batteryPercent override fun deliverTreatment(detailedBolusInfo: DetailedBolusInfo): PumpEnactResult { + // Insulin value must be greater than 0 + require(detailedBolusInfo.carbs == 0.0) { detailedBolusInfo.toString() } + require(detailedBolusInfo.insulin > 0) { detailedBolusInfo.toString() } + val result = PumpEnactResult(injector) .success(true) .bolusDelivered(detailedBolusInfo.insulin) From c8377edf9d7330246177d5fce31e5dc6d737f046 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Thu, 2 Nov 2023 17:07:37 +0100 Subject: [PATCH 35/60] List import files properly --- .../maintenance/PrefFileListProvider.kt | 2 +- .../core/interfaces/maintenance/PrefsFile.kt | 1 - .../interfaces/maintenance/PrefsImportDir.kt | 6 --- .../maintenance/PrefFileListProviderImpl.kt | 48 ++++++------------- .../activities/PrefImportListActivity.kt | 2 +- 5 files changed, 16 insertions(+), 43 deletions(-) delete mode 100644 core/interfaces/src/main/kotlin/app/aaps/core/interfaces/maintenance/PrefsImportDir.kt diff --git a/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/maintenance/PrefFileListProvider.kt b/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/maintenance/PrefFileListProvider.kt index 263cf8e052..184a7048be 100644 --- a/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/maintenance/PrefFileListProvider.kt +++ b/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/maintenance/PrefFileListProvider.kt @@ -13,7 +13,7 @@ interface PrefFileListProvider { fun newExportFile(): File fun newExportCsvFile(): File fun newCwfFile(filename: String, withDate: Boolean = true): File - fun listPreferenceFiles(loadMetadata: Boolean = false): MutableList + fun listPreferenceFiles(): MutableList fun listCustomWatchfaceFiles(): MutableList fun checkMetadata(metadata: Map): Map fun formatExportedAgo(utcTime: String): String diff --git a/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/maintenance/PrefsFile.kt b/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/maintenance/PrefsFile.kt index b832474a6b..77268ae638 100644 --- a/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/maintenance/PrefsFile.kt +++ b/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/maintenance/PrefsFile.kt @@ -10,7 +10,6 @@ data class PrefsFile( val name: String, val file: File, val baseDir: File, - val dirKind: PrefsImportDir, // metadata here is used only for list display val metadata: @RawValue Map diff --git a/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/maintenance/PrefsImportDir.kt b/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/maintenance/PrefsImportDir.kt deleted file mode 100644 index 17c8863257..0000000000 --- a/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/maintenance/PrefsImportDir.kt +++ /dev/null @@ -1,6 +0,0 @@ -package app.aaps.core.interfaces.maintenance - -enum class PrefsImportDir { - ROOT_DIR, - AAPS_DIR -} \ No newline at end of file diff --git a/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/PrefFileListProviderImpl.kt b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/PrefFileListProviderImpl.kt index a98c17402a..ea67da02a3 100644 --- a/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/PrefFileListProviderImpl.kt +++ b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/PrefFileListProviderImpl.kt @@ -7,7 +7,6 @@ import app.aaps.core.interfaces.configuration.Config import app.aaps.core.interfaces.maintenance.PrefFileListProvider import app.aaps.core.interfaces.maintenance.PrefMetadata import app.aaps.core.interfaces.maintenance.PrefsFile -import app.aaps.core.interfaces.maintenance.PrefsImportDir import app.aaps.core.interfaces.maintenance.PrefsMetadataKey import app.aaps.core.interfaces.resources.ResourceHelper import app.aaps.core.interfaces.rx.bus.RxBus @@ -59,44 +58,29 @@ class PrefFileListProviderImpl @Inject constructor( } /** - * This function tries to list possible preference files from main SDCard root dir and AAPS/preferences dir + * This function tries to list possible preference files from AAPS/preferences dir * and tries to do quick assessment for preferences format plausibility. - * It does NOT load full metadata or is 100% accurate - it tries to do QUICK detection, based on: - * - file name and extension - * - predicted file contents */ - override fun listPreferenceFiles(loadMetadata: Boolean): MutableList { + override fun listPreferenceFiles(): MutableList { val prefFiles = mutableListOf() - // searching rood dir for legacy files - path.walk().maxDepth(1).filter { it.isFile && (it.name.endsWith(".json") || it.name.contains("Preferences")) }.forEach { - val contents = storage.getFileContents(it) - val detectedNew = encryptedPrefsFormat.isPreferencesFile(it, contents) - if (detectedNew) { - prefFiles.add(PrefsFile(it.name, it, path, PrefsImportDir.ROOT_DIR, metadataFor(loadMetadata, contents))) - } - } - // searching dedicated dir, only for new JSON format aapsPath.walk().filter { it.isFile && it.name.endsWith(".json") }.forEach { val contents = storage.getFileContents(it) if (encryptedPrefsFormat.isPreferencesFile(it, contents)) { - prefFiles.add(PrefsFile(it.name, it, aapsPath, PrefsImportDir.AAPS_DIR, metadataFor(loadMetadata, contents))) + prefFiles.add(PrefsFile(it.name, it, aapsPath, metadataFor(contents))) } } - // we sort only if we have metadata to be used for that - if (loadMetadata) { - prefFiles - .filter { it.metadata[PrefsMetadataKeyImpl.AAPS_FLAVOUR]?.status != null } - .toMutableList() - .sortWith( - compareByDescending { it.metadata[PrefsMetadataKeyImpl.AAPS_FLAVOUR]?.status as PrefsStatusImpl } - .thenByDescending { it.metadata[PrefsMetadataKeyImpl.CREATED_AT]?.value } - ) - } - - return prefFiles + val filtered = prefFiles + .filter { it.metadata[PrefsMetadataKeyImpl.AAPS_FLAVOUR]?.status != null } + .filter { (it.metadata[PrefsMetadataKeyImpl.AAPS_FLAVOUR]?.status as PrefsStatusImpl) != PrefsStatusImpl.ERROR } + .toMutableList() + filtered.sortWith( + compareByDescending { it.metadata[PrefsMetadataKeyImpl.AAPS_FLAVOUR]?.status as PrefsStatusImpl } + .thenByDescending { it.metadata[PrefsMetadataKeyImpl.CREATED_AT]?.value } + ) + return filtered } override fun listCustomWatchfaceFiles(): MutableList { @@ -127,12 +111,8 @@ class PrefFileListProviderImpl @Inject constructor( return customWatchfaceFiles } - private fun metadataFor(loadMetadata: Boolean, contents: String): PrefMetadataMap { - if (!loadMetadata) { - return mapOf() - } - return checkMetadata(encryptedPrefsFormat.loadMetadata(contents)) - } + private fun metadataFor(contents: String): PrefMetadataMap = + checkMetadata(encryptedPrefsFormat.loadMetadata(contents)) override fun ensureExportDirExists(): File { if (!aapsPath.exists()) { diff --git a/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/activities/PrefImportListActivity.kt b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/activities/PrefImportListActivity.kt index 6e5149203d..a605dd3fcd 100644 --- a/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/activities/PrefImportListActivity.kt +++ b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/maintenance/activities/PrefImportListActivity.kt @@ -39,7 +39,7 @@ class PrefImportListActivity : TranslatedDaggerAppCompatActivity() { supportActionBar?.setDisplayShowTitleEnabled(true) binding.recyclerview.layoutManager = LinearLayoutManager(this) - binding.recyclerview.adapter = RecyclerViewAdapter(prefFileListProvider.listPreferenceFiles(loadMetadata = true)) + binding.recyclerview.adapter = RecyclerViewAdapter(prefFileListProvider.listPreferenceFiles()) } inner class RecyclerViewAdapter internal constructor(private var prefFileList: List) : RecyclerView.Adapter() { From 2b351c35ff56d2631c596f29bb11eff29dcbf4eb Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Thu, 2 Nov 2023 20:25:36 +0100 Subject: [PATCH 36/60] SMB: Fix showing preferences --- .../app/aaps/plugins/aps/openAPSSMB/OpenAPSSMBPlugin.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/openAPSSMB/OpenAPSSMBPlugin.kt b/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/openAPSSMB/OpenAPSSMBPlugin.kt index a8e3bd68cd..d54a5b0f6c 100644 --- a/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/openAPSSMB/OpenAPSSMBPlugin.kt +++ b/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/openAPSSMB/OpenAPSSMBPlugin.kt @@ -107,9 +107,10 @@ open class OpenAPSSMBPlugin @Inject constructor( override fun preprocessPreferences(preferenceFragment: PreferenceFragmentCompat) { super.preprocessPreferences(preferenceFragment) val smbAlwaysEnabled = sp.getBoolean(R.string.key_enableSMB_always, false) - preferenceFragment.findPreference(rh.gs(R.string.key_enableSMB_with_COB))?.isVisible = !smbAlwaysEnabled - preferenceFragment.findPreference(rh.gs(R.string.key_enableSMB_with_temptarget))?.isVisible = !smbAlwaysEnabled - preferenceFragment.findPreference(rh.gs(R.string.key_enableSMB_after_carbs))?.isVisible = !smbAlwaysEnabled + val advancedFiltering = activePlugin.activeBgSource.advancedFilteringSupported() + preferenceFragment.findPreference(rh.gs(R.string.key_enableSMB_with_COB))?.isVisible = !smbAlwaysEnabled || !advancedFiltering + preferenceFragment.findPreference(rh.gs(R.string.key_enableSMB_with_temptarget))?.isVisible = !smbAlwaysEnabled || !advancedFiltering + preferenceFragment.findPreference(rh.gs(R.string.key_enableSMB_after_carbs))?.isVisible = !smbAlwaysEnabled || !advancedFiltering } override fun invoke(initiator: String, tempBasalFallback: Boolean) { From a6a84121da5918789c96a13e8448d603c3f91956 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Thu, 2 Nov 2023 20:49:06 +0100 Subject: [PATCH 37/60] NSCv3: better error logging --- .../aaps/core/nssdk/NSAndroidClientImpl.kt | 84 +++++++------------ .../DateHeaderOutOfToleranceException.kt | 2 +- .../exceptions/InvalidAccessTokenException.kt | 2 +- .../InvalidFormatNightscoutException.kt | 7 +- .../InvalidParameterNightscoutException.kt | 7 +- .../nssdk/exceptions/NightscoutException.kt | 7 +- .../UnknownResponseNightscoutException.kt | 2 +- .../UnsuccessfulNightscoutException.kt | 3 + .../UnsuccessfullNightscoutException.kt | 8 -- .../nssdk/networking/NSAuthInterceptor.kt | 4 +- 10 files changed, 41 insertions(+), 85 deletions(-) create mode 100644 core/nssdk/src/main/kotlin/app/aaps/core/nssdk/exceptions/UnsuccessfulNightscoutException.kt delete mode 100644 core/nssdk/src/main/kotlin/app/aaps/core/nssdk/exceptions/UnsuccessfullNightscoutException.kt diff --git a/core/nssdk/src/main/kotlin/app/aaps/core/nssdk/NSAndroidClientImpl.kt b/core/nssdk/src/main/kotlin/app/aaps/core/nssdk/NSAndroidClientImpl.kt index 6c28f19b63..ffc5a24d4b 100644 --- a/core/nssdk/src/main/kotlin/app/aaps/core/nssdk/NSAndroidClientImpl.kt +++ b/core/nssdk/src/main/kotlin/app/aaps/core/nssdk/NSAndroidClientImpl.kt @@ -7,7 +7,7 @@ import app.aaps.core.nssdk.exceptions.InvalidAccessTokenException import app.aaps.core.nssdk.exceptions.InvalidFormatNightscoutException import app.aaps.core.nssdk.exceptions.InvalidParameterNightscoutException import app.aaps.core.nssdk.exceptions.UnknownResponseNightscoutException -import app.aaps.core.nssdk.exceptions.UnsuccessfullNightscoutException +import app.aaps.core.nssdk.exceptions.UnsuccessfulNightscoutException import app.aaps.core.nssdk.interfaces.NSAndroidClient import app.aaps.core.nssdk.localmodel.Status import app.aaps.core.nssdk.localmodel.devicestatus.NSDeviceStatus @@ -108,11 +108,11 @@ class NSAndroidClientImpl( val response = api.lastModified() if (response.isSuccessful) { - return@callWrapper response.body()?.result ?: throw UnsuccessfullNightscoutException() + return@callWrapper response.body()?.result ?: throw UnsuccessfulNightscoutException("Unsuccessful") } else if (response.code() in 400..499) throw InvalidParameterNightscoutException(response.errorBody()?.string() ?: response.message()) else - throw UnsuccessfullNightscoutException() + throw UnsuccessfulNightscoutException("Unsuccessful") } override suspend fun getSgvs(): NSAndroidClient.ReadResponse> = callWrapper(dispatcher) { @@ -127,7 +127,7 @@ class NSAndroidClientImpl( } else if (response.code() in 400..499) throw InvalidParameterNightscoutException(response.errorBody()?.string() ?: response.message()) else - throw UnsuccessfullNightscoutException() + throw UnsuccessfulNightscoutException("Unsuccessful") } override suspend fun getSgvsModifiedSince(from: Long, limit: Int): NSAndroidClient.ReadResponse> = callWrapper(dispatcher) { @@ -144,7 +144,7 @@ class NSAndroidClientImpl( } else if (response.code() in 400..499) throw InvalidParameterNightscoutException(response.errorBody()?.string() ?: response.message()) else - throw UnsuccessfullNightscoutException() + throw UnsuccessfulNightscoutException("Unsuccessful") } override suspend fun getSgvsNewerThan(from: Long, limit: Int): NSAndroidClient.ReadResponse> = callWrapper(dispatcher) { @@ -159,7 +159,7 @@ class NSAndroidClientImpl( } else if (response.code() in 400..499) throw InvalidParameterNightscoutException(response.errorBody()?.string() ?: response.message()) else - throw UnsuccessfullNightscoutException() + throw UnsuccessfulNightscoutException("Unsuccessful") } override suspend fun createSgv(nsSgvV3: NSSgvV3): CreateUpdateResponse = callWrapper(dispatcher) { @@ -197,7 +197,7 @@ class NSAndroidClientImpl( errorResponse = errorResponse ?: response.message() ) } else - throw UnsuccessfullNightscoutException(errorResponse ?: response.message()) + throw UnsuccessfulNightscoutException(errorResponse ?: response.message()) } override suspend fun updateSvg(nsSgvV3: NSSgvV3): CreateUpdateResponse = callWrapper(dispatcher) { @@ -206,19 +206,11 @@ class NSAndroidClientImpl( nsSgvV3.utcOffset = null nsSgvV3.date = null val remoteEntry = nsSgvV3.toRemoteEntry() - val identifier = remoteEntry.identifier ?: throw InvalidFormatNightscoutException() + val identifier = remoteEntry.identifier ?: throw InvalidFormatNightscoutException("Invalid format") val response = if (nsSgvV3.isValid) api.updateEntry(remoteEntry, identifier) else api.deleteEntry(identifier) - if (response.isSuccessful) { - return@callWrapper CreateUpdateResponse( - response = response.code(), - identifier = null, - isDeduplication = false, - deduplicatedIdentifier = null, - lastModified = null - ) - } else if (response.code() == 404) { // not found + if (response.isSuccessful || response.code() == 404) { // OK or not found return@callWrapper CreateUpdateResponse( response = response.code(), identifier = null, @@ -233,7 +225,7 @@ class NSAndroidClientImpl( errorResponse = response.errorBody()?.string() ?: response.message() ) } else - throw UnsuccessfullNightscoutException(response.errorBody()?.string() ?: response.message()) + throw UnsuccessfulNightscoutException(response.errorBody()?.string() ?: response.message()) } override suspend fun getTreatmentsNewerThan(createdAt: String, limit: Int): NSAndroidClient.ReadResponse> = callWrapper(dispatcher) { @@ -248,7 +240,7 @@ class NSAndroidClientImpl( } else if (response.code() in 400..499) throw InvalidParameterNightscoutException(response.errorBody()?.string() ?: response.message()) else - throw UnsuccessfullNightscoutException() + throw UnsuccessfulNightscoutException("Unsuccessful") } override suspend fun getTreatmentsModifiedSince(from: Long, limit: Int): NSAndroidClient.ReadResponse> = callWrapper(dispatcher) { @@ -264,7 +256,7 @@ class NSAndroidClientImpl( } else if (response.code() in 400..499) throw InvalidParameterNightscoutException(response.errorBody()?.string() ?: response.message()) else - throw UnsuccessfullNightscoutException() + throw UnsuccessfulNightscoutException("Unsuccessful") } override suspend fun getDeviceStatusModifiedSince(from: Long): List = callWrapper(dispatcher) { @@ -275,7 +267,7 @@ class NSAndroidClientImpl( } else if (response.code() in 400..499) throw InvalidParameterNightscoutException(response.errorBody()?.string() ?: response.message()) else - throw UnsuccessfullNightscoutException() + throw UnsuccessfulNightscoutException("Unsuccessful") } override suspend fun createDeviceStatus(nsDeviceStatus: NSDeviceStatus): CreateUpdateResponse = callWrapper(dispatcher) { @@ -291,7 +283,7 @@ class NSAndroidClientImpl( deduplicatedIdentifier = response.body()?.deduplicatedIdentifier, lastModified = response.body()?.lastModified ) - } else throw UnknownResponseNightscoutException() + } else throw UnknownResponseNightscoutException("Unsuccessful") } else return@callWrapper CreateUpdateResponse( response = response.code(), identifier = null, @@ -301,7 +293,7 @@ class NSAndroidClientImpl( override suspend fun createTreatment(nsTreatment: NSTreatment): CreateUpdateResponse = callWrapper(dispatcher) { - val remoteTreatment = nsTreatment.toRemoteTreatment() ?: throw InvalidFormatNightscoutException() + val remoteTreatment = nsTreatment.toRemoteTreatment() ?: throw InvalidFormatNightscoutException("Invalid format") remoteTreatment.app = "AAPS" val response = api.createTreatment(remoteTreatment) val errorResponse = response.errorBody()?.string() @@ -333,7 +325,7 @@ class NSAndroidClientImpl( errorResponse = errorResponse ?: response.message() ) } else - throw UnsuccessfullNightscoutException(errorResponse ?: response.message()) + throw UnsuccessfulNightscoutException(errorResponse ?: response.message()) } override suspend fun updateTreatment(nsTreatment: NSTreatment): CreateUpdateResponse = callWrapper(dispatcher) { @@ -341,20 +333,12 @@ class NSAndroidClientImpl( // following cannot be updated nsTreatment.utcOffset = null nsTreatment.date = null - val remoteTreatment = nsTreatment.toRemoteTreatment() ?: throw InvalidFormatNightscoutException() - val identifier = remoteTreatment.identifier ?: throw InvalidFormatNightscoutException() + val remoteTreatment = nsTreatment.toRemoteTreatment() ?: throw InvalidFormatNightscoutException("Invalid format") + val identifier = remoteTreatment.identifier ?: throw InvalidFormatNightscoutException("Invalid format") val response = if (nsTreatment.isValid) api.updateTreatment(remoteTreatment, identifier) else api.deleteTreatment(identifier) - if (response.isSuccessful) { - return@callWrapper CreateUpdateResponse( - response = response.code(), - identifier = null, - isDeduplication = false, - deduplicatedIdentifier = null, - lastModified = null - ) - } else if (response.code() == 404) { // not found + if (response.isSuccessful || response.code() == 404) { // OK or not found return@callWrapper CreateUpdateResponse( response = response.code(), identifier = null, @@ -369,7 +353,7 @@ class NSAndroidClientImpl( errorResponse = response.errorBody()?.string() ?: response.message() ) } else - throw UnsuccessfullNightscoutException(response.errorBody()?.string() ?: response.message()) + throw UnsuccessfulNightscoutException(response.errorBody()?.string() ?: response.message()) } override suspend fun getFoods(limit: Int): NSAndroidClient.ReadResponse> = callWrapper(dispatcher) { @@ -384,7 +368,7 @@ class NSAndroidClientImpl( } else if (response.code() in 400..499) throw InvalidParameterNightscoutException(response.errorBody()?.string() ?: response.message()) else - throw UnsuccessfullNightscoutException() + throw UnsuccessfulNightscoutException("Unsuccessful") } /* @@ -414,7 +398,7 @@ class NSAndroidClientImpl( deduplicatedIdentifier = response.body()?.deduplicatedIdentifier, lastModified = response.body()?.lastModified ) - } else throw UnsuccessfullNightscoutException() + } else throw UnsuccessfulNightscoutException("Unsuccessful") } else if (response.code() in 400..499) { return@callWrapper CreateUpdateResponse( response = response.code(), @@ -422,25 +406,17 @@ class NSAndroidClientImpl( errorResponse = response.errorBody()?.string() ?: response.message() ) } else - throw UnsuccessfullNightscoutException(response.errorBody()?.string() ?: response.message()) + throw UnsuccessfulNightscoutException(response.errorBody()?.string() ?: response.message()) } override suspend fun updateFood(nsFood: NSFood): CreateUpdateResponse = callWrapper(dispatcher) { val remoteFood = nsFood.toRemoteFood() - val identifier = nsFood.identifier ?: throw InvalidFormatNightscoutException() + val identifier = nsFood.identifier ?: throw InvalidFormatNightscoutException("Invalid format") val response = if (nsFood.isValid) api.updateFood(remoteFood, identifier) else api.deleteFood(identifier) - if (response.isSuccessful) { - return@callWrapper CreateUpdateResponse( - response = response.code(), - identifier = null, - isDeduplication = false, - deduplicatedIdentifier = null, - lastModified = null - ) - } else if (response.code() == 404) { // not found + if (response.isSuccessful || response.code() == 404) { // OK or not found return@callWrapper CreateUpdateResponse( response = response.code(), identifier = null, @@ -455,7 +431,7 @@ class NSAndroidClientImpl( errorResponse = response.errorBody()?.string() ?: response.message() ) } else - throw UnsuccessfullNightscoutException(response.errorBody()?.string() ?: response.message()) + throw UnsuccessfulNightscoutException(response.errorBody()?.string() ?: response.message()) } override suspend fun createProfileStore(remoteProfileStore: JSONObject): CreateUpdateResponse = callWrapper(dispatcher) { @@ -470,7 +446,7 @@ class NSAndroidClientImpl( deduplicatedIdentifier = response.body()?.deduplicatedIdentifier, lastModified = response.body()?.lastModified ) - } else throw UnsuccessfullNightscoutException() + } else throw UnsuccessfulNightscoutException("Unsuccessful") } else if (response.code() in 400..499) { return@callWrapper CreateUpdateResponse( response = response.code(), @@ -478,7 +454,7 @@ class NSAndroidClientImpl( errorResponse = response.errorBody()?.string() ?: response.message() ) } else - throw UnsuccessfullNightscoutException(response.errorBody()?.string() ?: response.message()) + throw UnsuccessfulNightscoutException(response.errorBody()?.string() ?: response.message()) } override suspend fun getLastProfileStore(): NSAndroidClient.ReadResponse> = callWrapper(dispatcher) { @@ -491,7 +467,7 @@ class NSAndroidClientImpl( } else if (response.code() in 400..499) throw InvalidParameterNightscoutException(response.errorBody()?.string() ?: response.message()) else - throw UnsuccessfullNightscoutException() + throw UnsuccessfulNightscoutException("Unsuccessful") } override suspend fun getProfileModifiedSince(from: Long): NSAndroidClient.ReadResponse> = callWrapper(dispatcher) { @@ -504,7 +480,7 @@ class NSAndroidClientImpl( } else if (response.code() in 400..499) throw InvalidParameterNightscoutException(response.errorBody()?.string() ?: response.message()) else - throw UnsuccessfullNightscoutException() + throw UnsuccessfulNightscoutException("Unsuccessful") } private suspend fun callWrapper(dispatcher: CoroutineDispatcher, block: suspend () -> T): T = diff --git a/core/nssdk/src/main/kotlin/app/aaps/core/nssdk/exceptions/DateHeaderOutOfToleranceException.kt b/core/nssdk/src/main/kotlin/app/aaps/core/nssdk/exceptions/DateHeaderOutOfToleranceException.kt index 3682dd65be..2ce3b399ab 100644 --- a/core/nssdk/src/main/kotlin/app/aaps/core/nssdk/exceptions/DateHeaderOutOfToleranceException.kt +++ b/core/nssdk/src/main/kotlin/app/aaps/core/nssdk/exceptions/DateHeaderOutOfToleranceException.kt @@ -6,4 +6,4 @@ package app.aaps.core.nssdk.exceptions * In practice this will happen if the server time and the phone time are off. * */ -class DateHeaderOutOfToleranceException : NightscoutException() +class DateHeaderOutOfToleranceException(message: String) : NightscoutException(message) diff --git a/core/nssdk/src/main/kotlin/app/aaps/core/nssdk/exceptions/InvalidAccessTokenException.kt b/core/nssdk/src/main/kotlin/app/aaps/core/nssdk/exceptions/InvalidAccessTokenException.kt index 2fc0ccd4ca..26046c1958 100644 --- a/core/nssdk/src/main/kotlin/app/aaps/core/nssdk/exceptions/InvalidAccessTokenException.kt +++ b/core/nssdk/src/main/kotlin/app/aaps/core/nssdk/exceptions/InvalidAccessTokenException.kt @@ -1,3 +1,3 @@ package app.aaps.core.nssdk.exceptions -class InvalidAccessTokenException : NightscoutException() +class InvalidAccessTokenException(message: String) : NightscoutException(message) diff --git a/core/nssdk/src/main/kotlin/app/aaps/core/nssdk/exceptions/InvalidFormatNightscoutException.kt b/core/nssdk/src/main/kotlin/app/aaps/core/nssdk/exceptions/InvalidFormatNightscoutException.kt index bf9d55c28a..5f088f3324 100644 --- a/core/nssdk/src/main/kotlin/app/aaps/core/nssdk/exceptions/InvalidFormatNightscoutException.kt +++ b/core/nssdk/src/main/kotlin/app/aaps/core/nssdk/exceptions/InvalidFormatNightscoutException.kt @@ -1,9 +1,4 @@ package app.aaps.core.nssdk.exceptions @Suppress("unused") -class InvalidFormatNightscoutException : NightscoutException { - constructor() : super() - constructor(message: String) : super(message) - constructor(message: String, cause: Throwable) : super(message, cause) - constructor(cause: Throwable?) : super(cause) -} +class InvalidFormatNightscoutException(message: String) : NightscoutException(message) \ No newline at end of file diff --git a/core/nssdk/src/main/kotlin/app/aaps/core/nssdk/exceptions/InvalidParameterNightscoutException.kt b/core/nssdk/src/main/kotlin/app/aaps/core/nssdk/exceptions/InvalidParameterNightscoutException.kt index 155530aaad..a78ce929c2 100644 --- a/core/nssdk/src/main/kotlin/app/aaps/core/nssdk/exceptions/InvalidParameterNightscoutException.kt +++ b/core/nssdk/src/main/kotlin/app/aaps/core/nssdk/exceptions/InvalidParameterNightscoutException.kt @@ -1,9 +1,4 @@ package app.aaps.core.nssdk.exceptions @Suppress("unused") -class InvalidParameterNightscoutException : NightscoutException { - constructor() : super() - constructor(message: String) : super(message) - constructor(message: String, cause: Throwable) : super(message, cause) - constructor(cause: Throwable?) : super(cause) -} +class InvalidParameterNightscoutException(message: String) : NightscoutException(message) \ No newline at end of file diff --git a/core/nssdk/src/main/kotlin/app/aaps/core/nssdk/exceptions/NightscoutException.kt b/core/nssdk/src/main/kotlin/app/aaps/core/nssdk/exceptions/NightscoutException.kt index 3975fa2ce6..a0c0fceab2 100644 --- a/core/nssdk/src/main/kotlin/app/aaps/core/nssdk/exceptions/NightscoutException.kt +++ b/core/nssdk/src/main/kotlin/app/aaps/core/nssdk/exceptions/NightscoutException.kt @@ -2,9 +2,4 @@ package app.aaps.core.nssdk.exceptions import java.io.IOException -abstract class NightscoutException : IOException { - constructor() : super() - constructor(message: String) : super(message) - constructor(message: String, cause: Throwable) : super(message, cause) - constructor(cause: Throwable?) : super(cause) -} +abstract class NightscoutException(message: String, cause: Throwable? = null) : IOException(message, cause) \ No newline at end of file diff --git a/core/nssdk/src/main/kotlin/app/aaps/core/nssdk/exceptions/UnknownResponseNightscoutException.kt b/core/nssdk/src/main/kotlin/app/aaps/core/nssdk/exceptions/UnknownResponseNightscoutException.kt index f676bdaec6..c909b01597 100644 --- a/core/nssdk/src/main/kotlin/app/aaps/core/nssdk/exceptions/UnknownResponseNightscoutException.kt +++ b/core/nssdk/src/main/kotlin/app/aaps/core/nssdk/exceptions/UnknownResponseNightscoutException.kt @@ -1,3 +1,3 @@ package app.aaps.core.nssdk.exceptions -class UnknownResponseNightscoutException : NightscoutException() +class UnknownResponseNightscoutException(override val message: String) : NightscoutException(message) diff --git a/core/nssdk/src/main/kotlin/app/aaps/core/nssdk/exceptions/UnsuccessfulNightscoutException.kt b/core/nssdk/src/main/kotlin/app/aaps/core/nssdk/exceptions/UnsuccessfulNightscoutException.kt new file mode 100644 index 0000000000..046e7f95ba --- /dev/null +++ b/core/nssdk/src/main/kotlin/app/aaps/core/nssdk/exceptions/UnsuccessfulNightscoutException.kt @@ -0,0 +1,3 @@ +package app.aaps.core.nssdk.exceptions + +class UnsuccessfulNightscoutException(message: String) : NightscoutException(message) \ No newline at end of file diff --git a/core/nssdk/src/main/kotlin/app/aaps/core/nssdk/exceptions/UnsuccessfullNightscoutException.kt b/core/nssdk/src/main/kotlin/app/aaps/core/nssdk/exceptions/UnsuccessfullNightscoutException.kt deleted file mode 100644 index b342c109c5..0000000000 --- a/core/nssdk/src/main/kotlin/app/aaps/core/nssdk/exceptions/UnsuccessfullNightscoutException.kt +++ /dev/null @@ -1,8 +0,0 @@ -package app.aaps.core.nssdk.exceptions - -class UnsuccessfullNightscoutException : NightscoutException { - constructor() : super() - constructor(message: String) : super(message) - constructor(message: String, cause: Throwable) : super(message, cause) - constructor(cause: Throwable?) : super(cause) -} diff --git a/core/nssdk/src/main/kotlin/app/aaps/core/nssdk/networking/NSAuthInterceptor.kt b/core/nssdk/src/main/kotlin/app/aaps/core/nssdk/networking/NSAuthInterceptor.kt index 781321a4ea..1816169e9d 100644 --- a/core/nssdk/src/main/kotlin/app/aaps/core/nssdk/networking/NSAuthInterceptor.kt +++ b/core/nssdk/src/main/kotlin/app/aaps/core/nssdk/networking/NSAuthInterceptor.kt @@ -49,7 +49,7 @@ internal class NSAuthInterceptor(private val refreshToken: String, private val r return when { authResponseResponse == null -> initialResponse - authResponseResponse.code() in listOf(401, 403) -> throw InvalidAccessTokenException() + authResponseResponse.code() in listOf(401, 403) -> throw InvalidAccessTokenException("Invalid access token") authResponseResponse.code() != 200 -> initialResponse else -> { authResponseResponse.body()?.token?.let { jwtToken = it } @@ -62,7 +62,7 @@ internal class NSAuthInterceptor(private val refreshToken: String, private val r private fun testCanRefresh(initialResponse: Response) { // Todo: use proper reason code once it is supplied by remote if (initialResponse.body?.string()?.contains(MESSAGE_DATE_HEADER_OUT_OF_TOLERANCE) == true) { - throw DateHeaderOutOfToleranceException() + throw DateHeaderOutOfToleranceException("Data header out of tolerance") } } } From bfacfd925590d458d08fd29ddbf09dcc3fd91996 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Thu, 2 Nov 2023 21:46:32 +0100 Subject: [PATCH 38/60] DanaRS: make pairing dialog scrollable --- .../res/layout/danars_enter_pin_activity.xml | 109 ++++++++++-------- 1 file changed, 61 insertions(+), 48 deletions(-) diff --git a/pump/danars/src/main/res/layout/danars_enter_pin_activity.xml b/pump/danars/src/main/res/layout/danars_enter_pin_activity.xml index e5f9bc28d6..9ba223c3b8 100644 --- a/pump/danars/src/main/res/layout/danars_enter_pin_activity.xml +++ b/pump/danars/src/main/res/layout/danars_enter_pin_activity.xml @@ -34,59 +34,72 @@ - + android:layout_height="match_parent"> - + - + - + - + - + + + + + + + + + From 2e8dd257c6152dbc8ddcade19fea77b1ebf05ce3 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Thu, 2 Nov 2023 22:22:21 +0100 Subject: [PATCH 39/60] Fix displaying adjusted target --- .../app/aaps/plugins/main/general/overview/OverviewFragment.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt b/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt index e8d576feec..382741bc69 100644 --- a/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt +++ b/plugins/main/src/main/kotlin/app/aaps/plugins/main/general/overview/OverviewFragment.kt @@ -966,7 +966,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList // If the target is not the same as set in the profile then oref has overridden it val targetUsed = if (config.APS) loop.lastRun?.constraintsProcessed?.targetBG ?: 0.0 - else if (config.NSCLIENT) JsonHelper.safeGetDouble(processedDeviceStatusData.getAPSResult().json, "targetBg") + else if (config.NSCLIENT) JsonHelper.safeGetDouble(processedDeviceStatusData.getAPSResult().json, "targetBG") else 0.0 if (targetUsed != 0.0 && abs(profile.getTargetMgdl() - targetUsed) > 0.01) { From a8fc73c8adedae57b2ea089df7ece7999dff0ba9 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Fri, 3 Nov 2023 10:56:46 +0100 Subject: [PATCH 40/60] NSC: allow 1 min time diff between AAPS and AAPSC --- .../sync/nsShared/NsIncomingDataProcessor.kt | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsShared/NsIncomingDataProcessor.kt b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsShared/NsIncomingDataProcessor.kt index 88dd660b88..96c6a65c55 100644 --- a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsShared/NsIncomingDataProcessor.kt +++ b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsShared/NsIncomingDataProcessor.kt @@ -98,18 +98,24 @@ class NsIncomingDataProcessor @Inject constructor( if (sgvs is JSONArray) { // V1 client for (i in 0 until sgvs.length()) { val sgv = toGv(sgvs.getJSONObject(i)) ?: continue - if (sgv.timestamp < dateUtil.now() && sgv.timestamp > latestDateInReceivedData) latestDateInReceivedData = sgv.timestamp - glucoseValues += sgv + // allow 1 min in the future + if (sgv.timestamp < dateUtil.now() + T.mins(1).msecs() && sgv.timestamp > latestDateInReceivedData) { + latestDateInReceivedData = sgv.timestamp + glucoseValues += sgv + } } } else if (sgvs is List<*>) { // V3 client for (i in 0 until sgvs.size) { val sgv = (sgvs[i] as NSSgvV3).toTransactionGlucoseValue() - if (sgv.timestamp < dateUtil.now() && sgv.timestamp > latestDateInReceivedData) latestDateInReceivedData = sgv.timestamp - glucoseValues += sgv + // allow 1 min in the future + if (sgv.timestamp < dateUtil.now() + T.mins(1).msecs() && sgv.timestamp > latestDateInReceivedData) { + latestDateInReceivedData = sgv.timestamp + glucoseValues += sgv + } } } - if (latestDateInReceivedData > 0) { + if (glucoseValues.isNotEmpty()) { activePlugin.activeNsClient?.updateLatestBgReceivedIfNewer(latestDateInReceivedData) // Was that sgv more less 5 mins ago ? if (T.msecs(dateUtil.now() - latestDateInReceivedData).mins() < 5L) { @@ -118,7 +124,7 @@ class NsIncomingDataProcessor @Inject constructor( } storeDataForDb.glucoseValues.addAll(glucoseValues) } - return latestDateInReceivedData > 0 + return glucoseValues.isNotEmpty() } /** From 538a267f1ec359013d76c9cc9ac24d635a27d54c Mon Sep 17 00:00:00 2001 From: Samuele Mancuso Date: Fri, 3 Nov 2023 11:37:02 +0100 Subject: [PATCH 41/60] Fix NSClient Logo --- .../src/main/res/drawable/ic_nsclient_bg.xml | 38 +++++++++++-------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/core/main/src/main/res/drawable/ic_nsclient_bg.xml b/core/main/src/main/res/drawable/ic_nsclient_bg.xml index fff0a558f6..01063f7501 100644 --- a/core/main/src/main/res/drawable/ic_nsclient_bg.xml +++ b/core/main/src/main/res/drawable/ic_nsclient_bg.xml @@ -1,22 +1,30 @@ + android:viewportHeight="64" + android:width="64dp" + android:height="64dp"> + android:pathData="M48.9 43.7c0.9 -0.2 3.8 4 5.8 8s-1.1 9.1 -5.8 9.2c-3.9 0.1 -8 -5.1 -5.5 -9.8C44.7 48.6 47.4 44 48.9 43.7zM47.6 50c-1.2 -0.4 -3.5 2.2 -2.9 4.7c0.6 2.3 2.9 4.8 3.5 4.6c1.4 -0.5 -1.4 -3.8 -1.5 -5.2C46.5 52.3 48.3 50.3 47.6 50z" + android:fillColor="?attr/colorControlNormal" /> + android:pathData="M46.9 22.5c0 1.7 -0.2 3.9 -0.3 4.6c-0.3 2 -0.8 3.9 -1.4 5.8c-0.8 2.5 -1.8 4.8 -3.1 7.1c-0.8 1.4 -1.6 2.8 -2.4 4.1c-0.9 1.4 -1.9 2.8 -3 4.2c-1 1.3 -2 2.5 -3.1 3.8c-0.4 0.4 -0.7 0.8 -1.1 1.2c-0.7 0.8 -1.3 1.4 -2.1 2.1c-1.7 1.6 -4.3 1.5 -5.8 -0.2c-1.1 -1.1 -2.2 -2.3 -3.3 -3.5c-1.3 -1.5 -2.5 -3 -3.7 -4.6c-1.7 -2.3 -3.3 -4.8 -4.7 -7.4c-1 -1.8 -1.8 -3.8 -2.5 -5.7c-0.9 -2.7 -1.7 -5.4 -1.9 -8.2c0 -0.3 -0.1 -1.7 -0.1 -3.2c0 -1.6 0.2 -2.8 0.2 -3.3c0.3 -1.8 0.9 -3.5 1.7 -5.2c0.6 -1.4 1.5 -2.6 2.4 -3.8c0.9 -1.1 2 -2.1 3.1 -3c1.3 -1 2.6 -1.8 4.1 -2.4c1.6 -0.7 3.3 -1.2 5 -1.4c0.3 0 1.4 -0.2 2.8 -0.2c1.8 0 3.5 0.3 4.3 0.4c1.8 0.4 3.5 1.1 5.1 2c2.3 1.3 4.2 2.9 5.8 5c1.1 1.5 2.1 3.1 2.7 4.8c0.5 1.2 0.8 2.5 1.1 3.8C46.7 19.6 46.9 21 46.9 22.5zM27.8 6.2c-0.8 0 -1.5 0.1 -2.2 0.2c-1.6 0.2 -3 0.6 -4.5 1.3c-2.4 1.1 -4.5 2.7 -6.1 4.8c-1.2 1.5 -2 3.1 -2.6 4.8c-0.3 1 -0.6 1.9 -0.7 2.9c-0.1 0.8 -0.2 1.7 -0.2 2.5c0 1 0.1 1.9 0.2 2.9c0.1 0.9 0.2 1.9 0.5 2.8c0.6 2.6 1.5 5.2 2.6 7.6c1 2.1 2.1 4.2 3.4 6.1c1.3 2 2.7 3.9 4.2 5.7c1.4 1.7 2.8 3.3 4.3 4.8c0.6 0.6 1.3 0.6 1.9 0c1.5 -1.5 3.7 -4 4.7 -5.3c1 -1.2 1.9 -2.4 2.7 -3.6c1.1 -1.6 2.1 -3.2 3.1 -4.9c1 -1.9 2 -3.9 2.7 -5.9c0.7 -1.8 1.2 -3.7 1.5 -5.6c0.3 -1.4 0.4 -2.8 0.5 -4.3c0 -0.8 -0.1 -1.7 -0.2 -2.5c-0.2 -1.6 -0.6 -3.1 -1.3 -4.5c-0.9 -2 -2.2 -3.8 -3.9 -5.4c-1.2 -1.1 -2.6 -2 -4.1 -2.8C32.3 6.8 30.1 6.3 27.8 6.2z" + android:fillColor="?attr/colorControlNormal" /> + android:pathData="M26.2 26c0 1.2 0 2.4 0 3.6c0 0.6 0.2 0.9 0.8 0.8c0.4 0 0.9 0 1.3 0c0.7 0 0.8 -0.1 0.8 -0.8c0 -2.3 -0.1 -4.7 0 -7c0.1 -2.1 1 -3.7 2.8 -4.8c1.9 -1.1 3.9 -1.1 5.8 -0.2c1.6 0.8 2.6 2.1 3 3.9c0.4 1.5 0 3 -0.3 4.5c-0.4 1.8 -1.3 3.4 -2.5 4.9c-1.8 2.2 -4 3.6 -6.7 4.4c-1.6 0.4 -3.1 0.6 -4.7 0.5c-2.5 -0.2 -4.7 -1.1 -6.7 -2.5c-1.6 -1.1 -2.8 -2.5 -3.7 -4.2c-0.7 -1.2 -1.2 -2.6 -1.4 -4c-0.1 -0.8 -0.3 -1.5 -0.2 -2.3c0.1 -2.7 1.9 -5.2 4.7 -5.6c1.6 -0.3 3.1 -0.1 4.5 0.8c1.3 0.8 2.1 2 2.5 3.5c0.1 0.5 0.2 1 0.2 1.5C26.2 24 26.2 25 26.2 26zM35 17.7c-2.8 0 -5.1 2.2 -5.1 5c0 2.9 2.3 5.2 5.1 5.2c2.9 0 5.1 -2.2 5.1 -5C40.1 19.9 37.8 17.7 35 17.7zM25.4 22.7c0 -2.8 -2.3 -5 -4.9 -5c-3.1 -0.1 -5.3 2.3 -5.3 5c0 2.9 2.2 5.1 5.1 5.1C23 27.8 25.3 25.7 25.4 22.7z" + android:fillColor="?attr/colorControlNormal" /> + android:pathData="M38.5 14.8c-0.5 -0.1 -0.9 -0.2 -1.3 -0.3c-2.8 -0.6 -5.4 -0.1 -7.7 1.6c-0.6 0.5 -1.2 1 -1.6 1.7c-0.2 0.4 -0.4 0.2 -0.5 0c-0.3 -0.4 -0.6 -0.8 -1 -1.1c-1.4 -1.3 -2.9 -2 -4.8 -2.3c-1.4 -0.2 -2.8 -0.1 -4.2 0.3c-0.2 0.1 -0.3 0.1 -0.5 0.2c0 0 -0.1 0 -0.2 0C19.6 11 23.5 9 28.2 9.2C32.5 9.3 36 11.3 38.5 14.8z" + android:fillColor="?attr/colorControlNormal" /> - + android:pathData="M27.6 49.6c-0.9 -1 -1.8 -2 -2.7 -3c-0.4 -0.4 -0.7 -0.9 -1.1 -1.3c-0.1 -0.2 -0.1 -0.2 0 -0.4c1.1 -1.6 2.2 -3.2 3.2 -4.9c0.2 -0.4 0.4 -0.7 0.6 -1.1c0.1 -0.2 0.2 -0.2 0.4 -0.3c2.6 -0.1 5 -0.7 7.2 -2c0.8 -0.4 1.6 -0.9 2.3 -1.5C35.2 40.6 31.7 45.2 27.6 49.6z" + android:fillColor="?attr/colorControlNormal" /> + + + + \ No newline at end of file From 47758b6b27c6e8562d598e5c63ba0ffde6593cb3 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Fri, 3 Nov 2023 14:03:57 +0100 Subject: [PATCH 42/60] calculated day's difference over DST correctly --- .../core/interfaces/utils/MidnightTime.kt | 102 +++++++++++------- .../core/interfaces/utils/MidnightTimeTest.kt | 36 +++++-- .../stats/DexcomTirCalculatorImpl.kt | 3 +- .../implementation/stats/TddCalculatorImpl.kt | 3 +- .../implementation/stats/TirCalculatorImpl.kt | 3 +- .../plugins/aps/autotune/AutotunePlugin.kt | 35 +++--- .../plugins/automation/elements/InputTime.kt | 2 +- .../automation/elements/InputTimeRange.kt | 2 +- .../triggers/TriggerRecurringTime.kt | 6 +- .../automation/triggers/TriggerTimeRange.kt | 2 +- .../triggers/TriggerTimeRangeTest.kt | 2 +- 11 files changed, 117 insertions(+), 79 deletions(-) diff --git a/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/utils/MidnightTime.kt b/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/utils/MidnightTime.kt index caab607afc..265aab9074 100644 --- a/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/utils/MidnightTime.kt +++ b/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/utils/MidnightTime.kt @@ -1,64 +1,86 @@ package app.aaps.core.interfaces.utils import android.util.LongSparseArray -import java.util.Calendar +import androidx.annotation.VisibleForTesting +import java.time.Instant +import java.time.LocalDateTime +import java.time.LocalTime +import java.time.ZoneId object MidnightTime { + @VisibleForTesting val times = LongSparseArray() - private var hits: Long = 0 - private var misses: Long = 0 private const val THRESHOLD = 100000 - fun calc(): Long { - val c = Calendar.getInstance() - c[Calendar.HOUR_OF_DAY] = 0 - c[Calendar.MINUTE] = 0 - c[Calendar.SECOND] = 0 - c[Calendar.MILLISECOND] = 0 - return c.timeInMillis - } + /** + * Epoch time of last midnight + * + * @return epoch millis + */ + fun calc(): Long = + LocalDateTime.now().atZone(ZoneId.systemDefault()) + .with(LocalTime.of(0, 0, 0, 0)) + .toInstant().toEpochMilli() - fun calcPlusMinutes(minutes: Int): Long { - val h = minutes / 60 + /** + * Today's time with 'minutes' from midnight + * + * @param minutes minutes to add + * @return epoch millis of today with hh:mm:00 + */ + fun calcMidnightPlusMinutes(minutes: Int): Long { + val h = (minutes / 60) % 24 val m = minutes % 60 - val c = Calendar.getInstance() - c[Calendar.HOUR_OF_DAY] = h - c[Calendar.MINUTE] = m - c[Calendar.SECOND] = 0 - c[Calendar.MILLISECOND] = 0 - return c.timeInMillis + return LocalDateTime.now().atZone(ZoneId.systemDefault()) + .with(LocalTime.of(h, m, 0, 0)) + .toInstant().toEpochMilli() } + /** + * Epoch time of last midnight before 'time' + * + * @param time time of the day + * @return epoch millis + */ fun calc(time: Long): Long { - var m: Long? synchronized(times) { - m = times[time] - if (m != null) { - ++hits - return m!! - } - val c = Calendar.getInstance() - c.timeInMillis = time - c[Calendar.HOUR_OF_DAY] = 0 - c[Calendar.MINUTE] = 0 - c[Calendar.SECOND] = 0 - c[Calendar.MILLISECOND] = 0 - m = c.timeInMillis - times.append(time, m) - ++misses + val m = times[time] ?: Instant.ofEpochMilli(time).atZone(ZoneId.systemDefault()) + .with(LocalTime.of(0, 0, 0, 0)) + .toInstant().toEpochMilli() if (times.size() > THRESHOLD) resetCache() + return m } - return m!! } + /** + * Epoch time of last midnight 'days' back + * + * @param daysBack how many days back + * @return epoch millis of midnight + */ + fun calcDaysBack(daysBack: Long): Long = + LocalDateTime.now().atZone(ZoneId.systemDefault()) + .with(LocalTime.of(0, 0, 0, 0)) + .minusDays(daysBack) + .toInstant().toEpochMilli() + + /** + * Epoch time of last midnight 'days' back from time + * + * @param time start time + * @param daysBack how many days back + * @return epoch millis of midnight + */ + fun calcDaysBack(time: Long, daysBack: Long): Long = + Instant.ofEpochMilli(time).atZone(ZoneId.systemDefault()) + .with(LocalTime.of(0, 0, 0, 0)) + .minusDays(daysBack) + .toInstant().toEpochMilli() + + @VisibleForTesting fun resetCache() { - hits = 0 - misses = 0 times.clear() } - - fun log(): String = - "Hits: " + hits + " misses: " + misses + " stored: " + times.size() } \ No newline at end of file diff --git a/core/main/src/test/kotlin/app/aaps/core/interfaces/utils/MidnightTimeTest.kt b/core/main/src/test/kotlin/app/aaps/core/interfaces/utils/MidnightTimeTest.kt index 79c9ccb624..a4e86b2259 100644 --- a/core/main/src/test/kotlin/app/aaps/core/interfaces/utils/MidnightTimeTest.kt +++ b/core/main/src/test/kotlin/app/aaps/core/interfaces/utils/MidnightTimeTest.kt @@ -25,24 +25,40 @@ class MidnightTimeTest { assertThat(midnight).isAtMost(now) val c = Calendar.getInstance() c.timeInMillis = MidnightTime.calc(now) - assertThat(c[Calendar.HOUR_OF_DAY].toLong()).isEqualTo(0L) - assertThat(c[Calendar.MINUTE].toLong()).isEqualTo(0L) - assertThat(c[Calendar.SECOND].toLong()).isEqualTo(0L) - assertThat(c[Calendar.MILLISECOND].toLong()).isEqualTo(0L) + assertThat(c[Calendar.HOUR_OF_DAY]).isEqualTo(0) + assertThat(c[Calendar.MINUTE]).isEqualTo(0) + assertThat(c[Calendar.SECOND]).isEqualTo(0) + assertThat(c[Calendar.MILLISECOND]).isEqualTo(0) // Assure we get the same time from cache assertThat(midnight).isEqualTo(MidnightTime.calc(now)) } + @Test fun calcMidnightPlusMinutesTest() { + val c = Calendar.getInstance() + c.timeInMillis = MidnightTime.calcMidnightPlusMinutes(121) + assertThat(c[Calendar.HOUR_OF_DAY]).isEqualTo(2) + assertThat(c[Calendar.MINUTE]).isEqualTo(1) + assertThat(c[Calendar.SECOND]).isEqualTo(0) + assertThat(c[Calendar.MILLISECOND]).isEqualTo(0) + } + + @Test fun calcDaysBackTest() { + // We get real midnight + val now = System.currentTimeMillis() + val c = Calendar.getInstance() + c.timeInMillis = MidnightTime.calc(now) + c.add(Calendar.DAY_OF_MONTH, -5) + assertThat(c[Calendar.HOUR_OF_DAY]).isEqualTo(0) + assertThat(c[Calendar.MINUTE]).isEqualTo(0) + assertThat(c[Calendar.SECOND]).isEqualTo(0) + assertThat(c[Calendar.MILLISECOND]).isEqualTo(0) + assertThat(MidnightTime.calcDaysBack(5)).isEqualTo(c.timeInMillis) + } + @Test fun resetCache() { val now = System.currentTimeMillis() MidnightTime.calc(now) MidnightTime.resetCache() assertThat(MidnightTime.times.size().toLong()).isEqualTo(0L) } - - @Test fun log() { - val now = System.currentTimeMillis() - MidnightTime.calc(now) - assertThat(MidnightTime.log()).startsWith("Hits:") - } } diff --git a/implementation/src/main/kotlin/app/aaps/implementation/stats/DexcomTirCalculatorImpl.kt b/implementation/src/main/kotlin/app/aaps/implementation/stats/DexcomTirCalculatorImpl.kt index f262c18d7b..9927f6ea15 100644 --- a/implementation/src/main/kotlin/app/aaps/implementation/stats/DexcomTirCalculatorImpl.kt +++ b/implementation/src/main/kotlin/app/aaps/implementation/stats/DexcomTirCalculatorImpl.kt @@ -9,7 +9,6 @@ import app.aaps.core.interfaces.stats.DexcomTIR import app.aaps.core.interfaces.stats.DexcomTirCalculator import app.aaps.core.interfaces.utils.DateUtil import app.aaps.core.interfaces.utils.MidnightTime -import app.aaps.core.interfaces.utils.T import app.aaps.database.impl.AppRepository import javax.inject.Inject import javax.inject.Singleton @@ -24,7 +23,7 @@ class DexcomTirCalculatorImpl @Inject constructor( val days = 14L override fun calculate(): DexcomTIR { - val startTime = MidnightTime.calc(dateUtil.now() - T.days(days).msecs()) + val startTime = MidnightTime.calcDaysBack(days) val endTime = MidnightTime.calc(dateUtil.now()) val bgReadings = repository.compatGetBgReadingsDataFromTime(startTime, endTime, true).blockingGet() diff --git a/implementation/src/main/kotlin/app/aaps/implementation/stats/TddCalculatorImpl.kt b/implementation/src/main/kotlin/app/aaps/implementation/stats/TddCalculatorImpl.kt index 6cd60c4ec9..c017d163cb 100644 --- a/implementation/src/main/kotlin/app/aaps/implementation/stats/TddCalculatorImpl.kt +++ b/implementation/src/main/kotlin/app/aaps/implementation/stats/TddCalculatorImpl.kt @@ -39,9 +39,8 @@ class TddCalculatorImpl @Inject constructor( ) : TddCalculator { override fun calculate(days: Long, allowMissingDays: Boolean): LongSparseArray? { - var startTime = MidnightTime.calc(dateUtil.now() - T.days(days).msecs()) + var startTime = MidnightTime.calcDaysBack(days) val endTime = MidnightTime.calc(dateUtil.now()) - //val stepSize = T.hours(24).msecs() // this is not true on DST change val result = LongSparseArray() // Try to load cached values diff --git a/implementation/src/main/kotlin/app/aaps/implementation/stats/TirCalculatorImpl.kt b/implementation/src/main/kotlin/app/aaps/implementation/stats/TirCalculatorImpl.kt index a88454bbed..935561f5bf 100644 --- a/implementation/src/main/kotlin/app/aaps/implementation/stats/TirCalculatorImpl.kt +++ b/implementation/src/main/kotlin/app/aaps/implementation/stats/TirCalculatorImpl.kt @@ -15,7 +15,6 @@ import app.aaps.core.interfaces.stats.TIR import app.aaps.core.interfaces.stats.TirCalculator import app.aaps.core.interfaces.utils.DateUtil import app.aaps.core.interfaces.utils.MidnightTime -import app.aaps.core.interfaces.utils.T import app.aaps.database.impl.AppRepository import javax.inject.Inject import javax.inject.Singleton @@ -31,7 +30,7 @@ class TirCalculatorImpl @Inject constructor( override fun calculate(days: Long, lowMgdl: Double, highMgdl: Double): LongSparseArray { if (lowMgdl < 39) throw RuntimeException("Low below 39") if (lowMgdl > highMgdl) throw RuntimeException("Low > High") - val startTime = MidnightTime.calc(dateUtil.now() - T.days(days).msecs()) + val startTime = MidnightTime.calcDaysBack(days) val endTime = MidnightTime.calc(dateUtil.now()) val bgReadings = repository.compatGetBgReadingsDataFromTime(startTime, endTime, true).blockingGet() diff --git a/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/autotune/AutotunePlugin.kt b/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/autotune/AutotunePlugin.kt index 623ceb64f2..c608a01b40 100644 --- a/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/autotune/AutotunePlugin.kt +++ b/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/autotune/AutotunePlugin.kt @@ -331,18 +331,21 @@ class AutotunePlugin @Inject constructor( jsonSettings.put("tune_insulin_curve", false) val peakTime: Int = insulinInterface.peak - if (insulinInterface.id === Insulin.InsulinType.OREF_ULTRA_RAPID_ACTING) - jsonSettings.put("curve", "ultra-rapid") - else if (insulinInterface.id === Insulin.InsulinType.OREF_RAPID_ACTING) - jsonSettings.put("curve", "rapid-acting") - else if (insulinInterface.id === Insulin.InsulinType.OREF_LYUMJEV) { - jsonSettings.put("curve", "ultra-rapid") - jsonSettings.put("useCustomPeakTime", true) - jsonSettings.put("insulinPeakTime", peakTime) - } else if (insulinInterface.id === Insulin.InsulinType.OREF_FREE_PEAK) { - jsonSettings.put("curve", if (peakTime > 55) "rapid-acting" else "ultra-rapid") - jsonSettings.put("useCustomPeakTime", true) - jsonSettings.put("insulinPeakTime", peakTime) + when { + insulinInterface.id === Insulin.InsulinType.OREF_ULTRA_RAPID_ACTING -> jsonSettings.put("curve", "ultra-rapid") + insulinInterface.id === Insulin.InsulinType.OREF_RAPID_ACTING -> jsonSettings.put("curve", "rapid-acting") + + insulinInterface.id === Insulin.InsulinType.OREF_LYUMJEV -> { + jsonSettings.put("curve", "ultra-rapid") + jsonSettings.put("useCustomPeakTime", true) + jsonSettings.put("insulinPeakTime", peakTime) + } + + insulinInterface.id === Insulin.InsulinType.OREF_FREE_PEAK -> { + jsonSettings.put("curve", if (peakTime > 55) "rapid-acting" else "ultra-rapid") + jsonSettings.put("useCustomPeakTime", true) + jsonSettings.put("insulinPeakTime", peakTime) + } } jsonString = jsonSettings.toString(4).replace("\\/", "/") } catch (e: JSONException) { @@ -392,7 +395,7 @@ class AutotunePlugin @Inject constructor( } } for (i in days.weekdays.indices) { - json.put(WeekDay.DayOfWeek.values()[i].name, days.weekdays[i]) + json.put(WeekDay.DayOfWeek.entries[i].name, days.weekdays[i]) } json.put("result", result) json.put("updateButtonVisibility", updateButtonVisibility) @@ -429,7 +432,7 @@ class AutotunePlugin @Inject constructor( } } for (i in days.weekdays.indices) - days.weekdays[i] = JsonHelper.safeGetBoolean(json, WeekDay.DayOfWeek.values()[i].name, true) + days.weekdays[i] = JsonHelper.safeGetBoolean(json, WeekDay.DayOfWeek.entries[i].name, true) result = JsonHelper.safeGetString(json, "result", "") updateButtonVisibility = JsonHelper.safeGetInt(json, "updateButtonVisibility") lastRunSuccess = true @@ -440,8 +443,8 @@ class AutotunePlugin @Inject constructor( fun calcDays(daysBack: Int): Int { var endTime = MidnightTime.calc(dateUtil.now()) + autotuneStartHour * 60 * 60 * 1000L - if (endTime > dateUtil.now()) endTime -= T.days(1).msecs() // Check if 4 AM is before now - val startTime = endTime - daysBack * T.days(1).msecs() + if (endTime > dateUtil.now()) endTime = MidnightTime.calcDaysBack(1) // Check if 4 AM is before now + val startTime = MidnightTime.calcDaysBack(endTime, daysBack.toLong()) var result = 0 for (i in 0 until daysBack) { if (days.isSet(startTime + i * T.days(1).msecs())) diff --git a/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/elements/InputTime.kt b/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/elements/InputTime.kt index 4174bdb988..8052c8bf3e 100644 --- a/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/elements/InputTime.kt +++ b/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/elements/InputTime.kt @@ -57,7 +57,7 @@ class InputTime(private val rh: ResourceHelper, private val dateUtil: DateUtil) }) } - private fun toMills(minutesSinceMidnight: Int): Long = MidnightTime.calcPlusMinutes(minutesSinceMidnight) + private fun toMills(minutesSinceMidnight: Int): Long = MidnightTime.calcMidnightPlusMinutes(minutesSinceMidnight) private fun getMinSinceMidnight(time: Long): Int = MidnightUtils.secondsFromMidnight(time) / 60 diff --git a/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/elements/InputTimeRange.kt b/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/elements/InputTimeRange.kt index c8810d75e2..989318855e 100644 --- a/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/elements/InputTimeRange.kt +++ b/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/elements/InputTimeRange.kt @@ -83,7 +83,7 @@ class InputTimeRange(private val rh: ResourceHelper, private val dateUtil: DateU }) } - private fun toMills(minutesSinceMidnight: Int): Long = MidnightTime.calcPlusMinutes(minutesSinceMidnight) + private fun toMills(minutesSinceMidnight: Int): Long = MidnightTime.calcMidnightPlusMinutes(minutesSinceMidnight) private fun getMinSinceMidnight(time: Long): Int = MidnightUtils.secondsFromMidnight(time) / 60 diff --git a/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/triggers/TriggerRecurringTime.kt b/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/triggers/TriggerRecurringTime.kt index a12086445b..aa7ead4bc3 100644 --- a/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/triggers/TriggerRecurringTime.kt +++ b/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/triggers/TriggerRecurringTime.kt @@ -50,7 +50,7 @@ class TriggerRecurringTime(injector: HasAndroidInjector) : Trigger(injector) { val data = JSONObject() .put("time", time.value) for (i in days.weekdays.indices) { - data.put(WeekDay.DayOfWeek.values()[i].name, days.weekdays[i]) + data.put(WeekDay.DayOfWeek.entries[i].name, days.weekdays[i]) } return data } @@ -58,7 +58,7 @@ class TriggerRecurringTime(injector: HasAndroidInjector) : Trigger(injector) { override fun fromJSON(data: String): Trigger { val o = JSONObject(data) for (i in days.weekdays.indices) - days.weekdays[i] = JsonHelper.safeGetBoolean(o, WeekDay.DayOfWeek.values()[i].name) + days.weekdays[i] = JsonHelper.safeGetBoolean(o, WeekDay.DayOfWeek.entries[i].name) if (o.has("hour")) { // do conversion from 2.5.1 format val hour = JsonHelper.safeGetInt(o, "hour") @@ -90,7 +90,7 @@ class TriggerRecurringTime(injector: HasAndroidInjector) : Trigger(injector) { override fun duplicate(): Trigger = TriggerRecurringTime(injector, this) - private fun toMills(minutesSinceMidnight: Int): Long = MidnightTime.calcPlusMinutes(minutesSinceMidnight) + private fun toMills(minutesSinceMidnight: Int): Long = MidnightTime.calcMidnightPlusMinutes(minutesSinceMidnight) private fun getMinSinceMidnight(time: Long): Int = MidnightUtils.secondsFromMidnight(time) / 60 diff --git a/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/triggers/TriggerTimeRange.kt b/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/triggers/TriggerTimeRange.kt index 0bd6e39f04..afc0111f30 100644 --- a/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/triggers/TriggerTimeRange.kt +++ b/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/triggers/TriggerTimeRange.kt @@ -70,7 +70,7 @@ class TriggerTimeRange(injector: HasAndroidInjector) : Trigger(injector) { override fun duplicate(): Trigger = TriggerTimeRange(injector, range.start, range.end) - private fun toMills(minutesSinceMidnight: Int): Long = MidnightTime.calcPlusMinutes(minutesSinceMidnight) + private fun toMills(minutesSinceMidnight: Int): Long = MidnightTime.calcMidnightPlusMinutes(minutesSinceMidnight) private fun getMinSinceMidnight(time: Long): Int = MidnightUtils.secondsFromMidnight(time) / 60 diff --git a/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/triggers/TriggerTimeRangeTest.kt b/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/triggers/TriggerTimeRangeTest.kt index 5eb4f3bca1..8ce0dbdbe6 100644 --- a/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/triggers/TriggerTimeRangeTest.kt +++ b/plugins/automation/src/test/kotlin/app/aaps/plugins/automation/triggers/TriggerTimeRangeTest.kt @@ -16,7 +16,7 @@ class TriggerTimeRangeTest : TriggerTestBase() { @BeforeEach fun mock() { now = 754 // in minutes from midnight - val nowMills = MidnightTime.calcPlusMinutes(now.toInt()) + val nowMills = MidnightTime.calcMidnightPlusMinutes(now.toInt()) `when`(dateUtil.now()).thenReturn(nowMills) `when`(rh.gs(R.string.timerange_value)).thenReturn("Time is between %1\$s and %2\$s") } From 29356e0b2cb84b67ae4a4982ee170ccc85b8b819 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Fri, 3 Nov 2023 17:41:04 +0100 Subject: [PATCH 43/60] Wear: fix display value --- .../aaps/plugins/sync/wear/wearintegration/DataHandlerMobile.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/wear/wearintegration/DataHandlerMobile.kt b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/wear/wearintegration/DataHandlerMobile.kt index a967c33b82..ae0920e33d 100644 --- a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/wear/wearintegration/DataHandlerMobile.kt +++ b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/wear/wearintegration/DataHandlerMobile.kt @@ -978,7 +978,7 @@ class DataHandlerMobile @Inject constructor( return EventData.SingleBg( timeStamp = glucoseValue.timestamp, - sgvString = profileUtil.stringInCurrentUnitsDetect(glucoseValue.value), + sgvString = profileUtil.stringInCurrentUnitsDetect(glucoseValue.recalculated), glucoseUnits = units.asText, slopeArrow = (autosensDataStore?.let { ads -> trendCalculator.getTrendArrow(ads) } ?: GlucoseValue.TrendArrow.NONE).symbol, delta = glucoseStatus?.let { deltaString(it.delta, it.delta * Constants.MGDL_TO_MMOLL, units) } ?: "--", From 6a587ff3572be5973a4c6248ccd9e65153041044 Mon Sep 17 00:00:00 2001 From: Robert Buessow Date: Sun, 5 Nov 2023 11:15:05 +0100 Subject: [PATCH 44/60] Make random bg interval configurable. Need to test Abott's minutely interval. --- .../app/aaps/plugins/source/RandomBgPlugin.kt | 18 +++++++++++---- .../source/src/main/res/xml/pref_randombg.xml | 23 +++++++++++++++++++ 2 files changed, 36 insertions(+), 5 deletions(-) create mode 100644 plugins/source/src/main/res/xml/pref_randombg.xml diff --git a/plugins/source/src/main/kotlin/app/aaps/plugins/source/RandomBgPlugin.kt b/plugins/source/src/main/kotlin/app/aaps/plugins/source/RandomBgPlugin.kt index 211af3245c..526ab0a244 100644 --- a/plugins/source/src/main/kotlin/app/aaps/plugins/source/RandomBgPlugin.kt +++ b/plugins/source/src/main/kotlin/app/aaps/plugins/source/RandomBgPlugin.kt @@ -14,6 +14,7 @@ import app.aaps.core.interfaces.plugin.PluginDescription import app.aaps.core.interfaces.plugin.PluginType import app.aaps.core.interfaces.pump.VirtualPump import app.aaps.core.interfaces.resources.ResourceHelper +import app.aaps.core.interfaces.sharedPreferences.SP import app.aaps.core.interfaces.source.BgSource import app.aaps.core.interfaces.utils.T import app.aaps.core.utils.isRunningTest @@ -40,13 +41,14 @@ class RandomBgPlugin @Inject constructor( aapsLogger: AAPSLogger, private val repository: AppRepository, private val virtualPump: VirtualPump, + private val sp: SP, private val config: Config ) : PluginBase( PluginDescription() .mainType(PluginType.BGSOURCE) .fragmentClass(BGSourceFragment::class.java.name) .pluginIcon(R.drawable.ic_dice) - .preferencesId(R.xml.pref_bgsource) + .preferencesId(R.xml.pref_randombg) .pluginName(R.string.random_bg) .shortName(R.string.random_bg_short) .description(R.string.description_source_random_bg), @@ -56,10 +58,10 @@ class RandomBgPlugin @Inject constructor( private val handler = Handler(HandlerThread(this::class.simpleName + "Handler").also { it.start() }.looper) private lateinit var refreshLoop: Runnable private var wakeLock: PowerManager.WakeLock? = null + private var interval = 5L // minutes companion object { - const val interval = 5L // minutes const val min = 70 // mgdl const val max = 190 // mgdl const val period = 120.0 // minutes @@ -67,11 +69,16 @@ class RandomBgPlugin @Inject constructor( init { refreshLoop = Runnable { + updateInterval() handler.postDelayed(refreshLoop, T.mins(interval).msecs()) handleNewData() } } + private fun updateInterval() { + interval = sp.getInt("randombg_interval_min", 5).toLong() + } + private val disposable = CompositeDisposable() override fun advancedFilteringSupported(): Boolean = true @@ -79,11 +86,12 @@ class RandomBgPlugin @Inject constructor( @SuppressLint("WakelockTimeout") override fun onStart() { super.onStart() + updateInterval() val cal = GregorianCalendar() cal[Calendar.MILLISECOND] = 0 cal[Calendar.SECOND] = 0 - cal[Calendar.MINUTE] -= cal[Calendar.MINUTE] % 5 - handler.postAtTime(refreshLoop, SystemClock.uptimeMillis() + cal.timeInMillis + T.mins(5).msecs() + 1000 - System.currentTimeMillis()) + cal[Calendar.MINUTE] -= cal[Calendar.MINUTE] % interval.toInt() + handler.postAtTime(refreshLoop, SystemClock.uptimeMillis() + cal.timeInMillis + T.mins(interval).msecs() + 1000 - System.currentTimeMillis()) disposable.clear() wakeLock = (context.getSystemService(Context.POWER_SERVICE) as PowerManager).newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "AAPS:RandomBgPlugin") wakeLock?.acquire() @@ -108,7 +116,7 @@ class RandomBgPlugin @Inject constructor( cal[Calendar.MILLISECOND] = 0 cal[Calendar.SECOND] = 0 - cal[Calendar.MINUTE] -= cal[Calendar.MINUTE] % 5 + cal[Calendar.MINUTE] -= cal[Calendar.MINUTE] % interval.toInt() val glucoseValues = mutableListOf() glucoseValues += TransactionGlucoseValue( timestamp = cal.timeInMillis, diff --git a/plugins/source/src/main/res/xml/pref_randombg.xml b/plugins/source/src/main/res/xml/pref_randombg.xml new file mode 100644 index 0000000000..7264bc9be3 --- /dev/null +++ b/plugins/source/src/main/res/xml/pref_randombg.xml @@ -0,0 +1,23 @@ + + + + + + + + + + From c7e15fed22f2b1602a473f29d5fe24c7428b98f6 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Sun, 5 Nov 2023 16:46:00 +0100 Subject: [PATCH 45/60] change logging tag --- app/src/main/kotlin/app/aaps/receivers/DataReceiver.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/app/aaps/receivers/DataReceiver.kt b/app/src/main/kotlin/app/aaps/receivers/DataReceiver.kt index 87116cfa14..d506ef8917 100644 --- a/app/src/main/kotlin/app/aaps/receivers/DataReceiver.kt +++ b/app/src/main/kotlin/app/aaps/receivers/DataReceiver.kt @@ -32,7 +32,7 @@ open class DataReceiver : DaggerBroadcastReceiver() { override fun onReceive(context: Context, intent: Intent) { super.onReceive(context, intent) val bundle = intent.extras ?: return - aapsLogger.debug(LTag.DATABASE, "onReceive ${intent.action} ${BundleLogger.log(bundle)}") + aapsLogger.debug(LTag.CORE, "onReceive ${intent.action} ${BundleLogger.log(bundle)}") when (intent.action) { Intents.ACTION_NEW_BG_ESTIMATE -> From 2bb9b846062e22ced4d34302f97dd192f4c7b494 Mon Sep 17 00:00:00 2001 From: olorinmaia Date: Tue, 7 Nov 2023 22:17:34 +0100 Subject: [PATCH 46/60] Adjust option and summary text of setting dynisf_adjust_sensitivity and also make sensitivity/resistance altering target options dependent of dynisf_adjust_sensitivity --- plugins/aps/src/main/res/values/strings.xml | 4 ++-- .../res/xml/pref_openapssmbdynamicisf.xml | 24 +++++++++++-------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/plugins/aps/src/main/res/values/strings.xml b/plugins/aps/src/main/res/values/strings.xml index fa718b1246..b7560597de 100644 --- a/plugins/aps/src/main/res/values/strings.xml +++ b/plugins/aps/src/main/res/values/strings.xml @@ -23,8 +23,8 @@ DynISFAdjust dynisf_adjust_sensitivity - Adjust sensitivity and basal - If activated DynISF uses the last 24h TDD/7D TDD as the basis for adjusting calculated ISF and also for increasing and decreasing basal rate, in the same way that standard Autosens does + Enable TDD based sensitivity ratio for basal and glucose target modification + Uses the last 24h TDD/7D TDD to calculate sensitivity ratio used for increasing or decreasing basal rate, and also adjust glucose target if these options are enabled, in the same way Autosens does. It is recommended to start with this option turned off DynamicISF Adjustment Factor % Adjustment factor for DynamicISF. Set more than 100% for more aggressive correction doses, and less than 100% for less aggressive corrections. High temptarget raises sensitivity diff --git a/plugins/aps/src/main/res/xml/pref_openapssmbdynamicisf.xml b/plugins/aps/src/main/res/xml/pref_openapssmbdynamicisf.xml index 6c6a192efe..3dfd281e91 100644 --- a/plugins/aps/src/main/res/xml/pref_openapssmbdynamicisf.xml +++ b/plugins/aps/src/main/res/xml/pref_openapssmbdynamicisf.xml @@ -55,6 +55,20 @@ android:summary="@string/dynisf_adjust_sensitivity_summary" android:title="@string/dynisf_adjust_sensitivity" /> + + + + - - Profil lavt mål Profil høyt mål - Nedre grense for midl. mål - Øvre grense for midl. mål - Midl. målverdi + Nedre grense for midlertidig mål + Øvre grense for midlertidig mål + Midlertidig målverdi Profil DIA verdi Profilens insulinfølsomhet Maksimal profil basalverdi @@ -480,7 +480,7 @@ 15\' trend: %1$.2fE Prosent: %1$.2fE x %2$d%% ≈ %3$.2fE Insulinbegrensning nådd!\nKan ikke levere %1$.2fE - TempT: %1$s + Midl. mål: %1$s %1$s til %2$s Ingen pumpe tilgjengelig! Hurtigknapp diff --git a/plugins/aps/src/main/res/values-nb-rNO/strings.xml b/plugins/aps/src/main/res/values-nb-rNO/strings.xml index 4e28382e08..a42b215f3b 100644 --- a/plugins/aps/src/main/res/values-nb-rNO/strings.xml +++ b/plugins/aps/src/main/res/values-nb-rNO/strings.xml @@ -1,13 +1,13 @@ - Juster sensitivitet og basal - Hvis aktivert bruker DynISF de siste 24t TDD/7D TDD som grunnlag for justering av kalkulert ISF og også for økning og reduksjon av basaldose, på samme måte som standard Autosens gjør + Juster sensitivitet ved hjelp av TDD + Benytter de siste 24t TDD/7D TDD til å beregne sensitivitet som grunnlag til å øke eller redusere basaldose og i tillegg justere blodsukkermål hvis valgene for dette er aktivert, på samme måte som Autosens gjør. Anbefalt å starte med dette valget slått av Dynamisk ISF justeringsfaktor % Justeringsfaktor for dynamisk ISF. Verdier over 100% vil gi mer aggressive korreksjonsdoser, mens verdier under 100% vil gi mildere korreksjonsdoser. - Høyt midl. mål øker sensitiviteten - = 100]]> - Lavt midl. mål reduserer sensitiviteten - + Høyt midlertidig mål øker sensitiviteten + = 5,6]]> + Lavt midlertidig mål reduserer sensitiviteten + OpenAPS SMB Dynamisk ISF Minste antall minutter mellom hver SMB @@ -64,16 +64,16 @@ Aktiver SMB alltid Aktiver SMB alltid uavhengig av boluser. Bare mulig med en bra filtrert BS kilde som f.eks. Dexcom G5/G6 Aktiver SMB etter karbohydrater - Aktiver SMB i 6t etter karbohydratinntak, selv med 0 COB. Bare mulig med en bra filtrert BS kilde som f. eks. Dexcom G5/G6 + Aktiver SMB i 6 timer etter inntak av karbohydrater, selv med 0 COB (Karbo ombord). Bare mulig med en bra filtrert BS-kilde som f. eks. Dexcom G5/G6 Aktiver SMB med COB Aktiver SMB når COB (karbohydrater ombord) er aktiv. Aktiver SMB med midlertidig målverdi Aktiver SMB når midlertidig målverdi er aktivert (spise snart, aktivitet) - Aktiver SMB ved høy midl. målverdi + Aktiver SMB ved høy midlertidig målverdi Aktiver SMB når det er en høy aktiv midlertidig målverdi (trening, over 100 mg/dl eller 5,5 mmol/l) Maks antall minutter med basal som kan bli SMB UAM SMB maks minutter - Maks antall minutter basal som kan bli SMB ved UAM + Maks antall minutter med basal som kan bli SMB ved UAM Minimumsgrense for KH-forslag Minste KH-mengde i gram som kreves for å vise varsel. Karbohydrater under denne mengden vil ikke utløse et varsel. Terskelverdi for BS hvor all insulintilførsel stoppes. Bruker kan definere verdier mellom 3.3mmol/l (60mg/dl) og 5.5mmol/l (100mg/dl). Verdier under 3.6/65 bruker standardmodell diff --git a/plugins/automation/src/main/res/values-nb-rNO/strings.xml b/plugins/automation/src/main/res/values-nb-rNO/strings.xml index 37200c7ce6..e855980278 100644 --- a/plugins/automation/src/main/res/values-nb-rNO/strings.xml +++ b/plugins/automation/src/main/res/values-nb-rNO/strings.xml @@ -38,8 +38,8 @@ BS %1$s %2$.0f %3$s BS %1$s %2$.1f %3$s Midlertidig mål finnes ikke - Midl. mål %1$s %2$.0f %3$s - Midl. mål %1$s %2$.1f %3$s + Midlertidig mål %1$s %2$.0f %3$s + Midlertidig mål %1$s %2$.1f %3$s Profilprosent %1$s %2$d IOB %1$s %2$.1f Eller @@ -66,7 +66,7 @@ SLETT LEGG TIL KOPIER - Midl. mål %1$s + Midlertidig mål %1$s Bluetoothtilkobling til enheten %1$s %2$s Tilkobling til Bluetoothenhet WiFi SSID %1$s %2$s diff --git a/plugins/constraints/src/main/res/values-nb-rNO/exam.xml b/plugins/constraints/src/main/res/values-nb-rNO/exam.xml index b11346f829..efbd22e9ed 100644 --- a/plugins/constraints/src/main/res/values-nb-rNO/exam.xml +++ b/plugins/constraints/src/main/res/values-nb-rNO/exam.xml @@ -52,7 +52,7 @@ La profilen være på 100%. Pause loop. https://wiki.aaps.app/en/latest/Usage/temptarget.html#activity-temp-target - Trening og midlertidige målverdier (temp targets) + Trening og midlertidige målverdier Hvordan kan du bruke midlertidige målverdier til å hjelpe systemet å håndtere aerobic trening? Sett et midlertidig mål for blodsukkeret som starter en passende tid før treningen begynner. Angi et midlertidig mål for Aktivitet etter at du har avsluttet treningen. diff --git a/plugins/constraints/src/main/res/values-nb-rNO/objectives.xml b/plugins/constraints/src/main/res/values-nb-rNO/objectives.xml index 9663716381..61fd7db702 100644 --- a/plugins/constraints/src/main/res/values-nb-rNO/objectives.xml +++ b/plugins/constraints/src/main/res/values-nb-rNO/objectives.xml @@ -38,7 +38,7 @@ Utført: %1$s Lær hvordan du kontrollerer AAPS Utfør forskjellige handlinger i AAPS - Du har lært hvordan du skal håndtere grunnleggende AAPS. Hovedkontrollene er på oversiktsskjermen som er tilgjengelig ved klikk eller lang-klikk, og flere kontroller er på Aksjon skjermen. Du bør vite hvordan du legger inn en skjermen til en plugin på menylinjen i toppen eller lar den vises i liste over aktiverte programtillegg øverst til venstre. + Du har lært hvordan du skal håndtere det grunnleggende ved AAPS. Hovedkontrollene er på oversikt-skjermen som er tilgjengelig ved klikk eller lang-klikk, og flere kontroller er på handlinger-skjermen. Du bør vite hvordan du legger inn skjermen til en plugin på menylinjen i toppen eller lar den vises i liste over aktiverte plugins øverst til venstre ved å trykke på hamburgermeny. Angi profil 90% for 10 min (langt-trykk på profilnavn i Oversikt) Simuler dusjing. Frakoble pumpen i 1t (langt trykk på Åpen Loop) ... og koble til igjen på samme måte diff --git a/plugins/main/src/main/res/values-lt-rLT/strings.xml b/plugins/main/src/main/res/values-lt-rLT/strings.xml index 8aeeba7969..d9c5776d82 100644 --- a/plugins/main/src/main/res/values-lt-rLT/strings.xml +++ b/plugins/main/src/main/res/values-lt-rLT/strings.xml @@ -282,7 +282,7 @@ Mygtukai visada rodomi ekrano apačioje Didelis ekranas Išvaizda - naudojimas: + naud: Siųsti šios dienos žurnalo įrašus kūrėjams dabar. Netikėta situacija. diff --git a/plugins/main/src/main/res/values-nb-rNO/strings.xml b/plugins/main/src/main/res/values-nb-rNO/strings.xml index 25c85b54f3..f12a2a69a2 100644 --- a/plugins/main/src/main/res/values-nb-rNO/strings.xml +++ b/plugins/main/src/main/res/values-nb-rNO/strings.xml @@ -34,8 +34,8 @@ +XXXXXXXXXX;+YYYYYYYYYY For å levere bolus på %1$.2fE, svar med kode %2$s For å levere måltidsbolus på %1$.2fE, svar med kode %2$s - For å sette midl. mål på %1$s, svar med kode %2$s - For å avbryte midl. mål, svar med kode %1$s + For å sette midlertidig mål på %1$s, svar med kode %2$s + For å avbryte midlertidig mål, svar med kode %1$s For å deaktivere fjernstyring via SMS-meldinger, svar med kode %1$s.\n\nHusk at du vil kunne reaktivere den igjen kun fra AAPS hovedtelefon. Fjernstyring via SMS-meldinger er stanset. For å reaktivere, bruk AAPS på hovedtelefonen. For å sende kalibrering %1$.2f, svar med kode %2$s @@ -46,8 +46,8 @@ Bolus %1$.2f E ble levert Måltidsbolus på %1$.2f E er levert Mål %1$s i %2$d minutter - Midl. mål på %1$s i %2$d minutter ble lagret - Midl. mål ble fjernet + Midlertidig mål på %1$s i %2$d minutter ble lagret + Midlertidig mål ble fjernet Tillat fjernstyring via SMS-meldinger Loop har blitt deaktivert Loop har blitt aktivert @@ -241,7 +241,7 @@ Lav verdi Høy verdi Korte navn i menyfaner - Vis merknadsfelt i dialogvindu for boluskalkulator + Vis merknadsfelt i dialogvindu for behandlinger, sensorbytte, profilbytte og BS-kontroll Boluskalkulator utfører beregninger, men bare denne del av beregnet insulin leveres. Nyttig ved bruk av SMB-algoritmen. Gi full bolus (100 %) dersom blodsukker er eldre enn Aktiver bolusveileder @@ -268,11 +268,11 @@ BAS AVVIK AKT - -BGI + BGI ABS DEVSLOPE BEH - HR + PULS SENS Graf-skala Graf diff --git a/plugins/source/src/main/res/values-es-rES/strings.xml b/plugins/source/src/main/res/values-es-rES/strings.xml index 1fabe8028d..53c1202552 100644 --- a/plugins/source/src/main/res/values-es-rES/strings.xml +++ b/plugins/source/src/main/res/values-es-rES/strings.xml @@ -1,7 +1,7 @@ - NSClient Glucosa + NSClient BG NS BG Recibir los datos de glucosa de Nightscout xDrip+ BG diff --git a/plugins/sync/src/main/res/values-lt-rLT/strings.xml b/plugins/sync/src/main/res/values-lt-rLT/strings.xml index 8e98e7243c..fd27843caf 100644 --- a/plugins/sync/src/main/res/values-lt-rLT/strings.xml +++ b/plugins/sync/src/main/res/values-lt-rLT/strings.xml @@ -17,6 +17,7 @@ Sinchronizuoja duomenis su Nightscout naudojant V3 API Užblokuota dėl įkrovimo parinkčių Užblokuota dėl ryšio parinkčių + Nėra ryšio Nepalaikoma Nightscout versija OAPS Siunt @@ -118,6 +119,9 @@ Data Broadcaster + Garmin + Susiejimas su Garmin (Fenix, Edge, …) + Garmin nustatymai Stebėti ir kontroliuoti AndroidAPS naudojant WearOS laikrodį. (nėra prijungto laikrodžio) diff --git a/plugins/sync/src/main/res/values-nb-rNO/strings.xml b/plugins/sync/src/main/res/values-nb-rNO/strings.xml index f1108632c1..0e99568379 100644 --- a/plugins/sync/src/main/res/values-nb-rNO/strings.xml +++ b/plugins/sync/src/main/res/values-nb-rNO/strings.xml @@ -27,7 +27,7 @@ NSClientV3 NSV3 NSClient - NSCI + NSV1 URL: Omstart NSClient @@ -92,7 +92,7 @@ Last opp CGM data Last opp behandlinger (insulin, karbohydrater) Last opp midl. basaler - Last opp profilbytter, midl. mål + Last opp profilbytter, midlertidig mål Last opp BS tester Fjern alt Tilbakestill start @@ -106,7 +106,7 @@ XD Send data til xDrip+ Vis detaljert IOB - Splitt IOB i bolus- og basal-IOB på klokken + Splitt IOB i bolus- og basal-IOB på urskiven Vis BGI Legg til BGI i statuslinje xDrip+ avansert statuslinje @@ -132,35 +132,35 @@ Boluskalkulator:\nBolus: %1$.2fE\nKarbo: %2$dg Den valgte hurtigknappen er ikke lenger tilgjengelig, oppdater klokkeflis Hurtigknapp: %1$s\nBolus: %2$.2fE\nKarbo: %3$dg - Ukjent forhåndsinnstilling midl. mål: %1$s - Avbryt gjeldende midl. mål? + Ukjent forhåndsinnstilling midlertidig mål: %1$s + Avbryt gjeldende midlertidig mål? Forskjellige enheter brukt på klokke og telefon! - Null-midl.mål - skal gjeldende midl. mål avbrytes? + Null-midl.mål - skal gjeldende midlertidig mål avbrytes? Min-BS utenfor område! Maks-BS utenfor område! - Midl. mål:\nMin: %1$s\nMaks: %2$s\nVarighet: %3$s - Midl. mål:\nMål: %1$s\nVarighet: %2$s - Midl. mål:\nÅrsak: %1$s\nMål: %2$s\nVarighet: %3$s + Midlertidig mål:\nMin: %1$s\nMaks: %2$s\nVarighet: %3$s + Midlertidig mål:\nMål: %1$s\nVarighet: %2$s + Midlertidig mål:\nÅrsak: %1$s\nMål: %2$s\nVarighet: %3$s feilet - sjekk telefonen Klokkeinnstillinger Kontroller fra klokke - Sett midl. mål og angi behandlinger fra klokken. + Sett midlertidig mål og angi behandlinger fra klokken. Beregninger inkludert i resultatet fra kalkulator: Generelle innstillinger Varsle ved SMB Vis SMB på klokken som en standard bolus. - Innstillinger for tilpasset klokkebakgrunn - Godkjenning for tilpasset klokkebakgrunn - Godkjenne at tilpasset klokkebakgrunn endrer AAPS- og klokkeinnstillinger i henhold til klokkebakgrunnens design - Tilpasset klokkebakgrunn: %1$s - Last inn klokkebakgrunn + Innstillinger for tilpasset urskive + Godkjenning for tilpasset urskive + Godkjenn at innlastet tilpasset urskive endrer og låser noen visningsinnstillinger i henhold til urskivens design + Tilpasset urskive: %1$s + Last inn urskive Info urskive Eksporter mal - Tilpasset klokkebakgrunn eksportert + Tilpasset urskive-mal eksportert Send alle data på nytt Åpne Innstillinger på klokken Liste over forhåndsvalg låst av urskive - Liste over innstillinger som kreves av klokkebakgrunnen + Liste over innstillinger som kreves av urskiven Liste over felt som er inkludert i urskive prøver å lese data fra pumpen. TDD: Fortsatt gamle data! Kan ikke lese fra pumpe. @@ -171,7 +171,7 @@ Profil:\n\nTidsforskyving: %1$d\nProsent: %2$d%% Mål gjelder bare i APS-modus! Ingen historikkdata! - Midl. mål + Midlertidig mål inntil STANDARD OMRÅDE målverdi diff --git a/pump/medtrum/src/main/res/values-lt-rLT/strings.xml b/pump/medtrum/src/main/res/values-lt-rLT/strings.xml index da7983f437..af430e0ac7 100644 --- a/pump/medtrum/src/main/res/values-lt-rLT/strings.xml +++ b/pump/medtrum/src/main/res/values-lt-rLT/strings.xml @@ -6,6 +6,7 @@ Medtrum Nano ir Medtrum 300U integracija Medtrum pompos nustatymai Pompos klaida: %1$s !! + Pompos įspėjimas: %1$s Pompa sustabdyta Pompa sustabdyta dėl viršyto valandos insulino limito Pompa sustabdyta dėl viršyto paros insulino limito @@ -52,6 +53,7 @@ Tuščia baterija Nėra kalibracijos Laiko juosta pompoje neatnaujinta, nutildykite ir atnaujinkite rankiniu būdu. + Boluso klaida Kartoti Kitas diff --git a/ui/src/main/res/values-nb-rNO/strings.xml b/ui/src/main/res/values-nb-rNO/strings.xml index 35ae9e2eb5..5a26087af8 100644 --- a/ui/src/main/res/values-nb-rNO/strings.xml +++ b/ui/src/main/res/values-nb-rNO/strings.xml @@ -92,7 +92,7 @@ Måltid Prime Profilendringer - Midl. Mål + Midlertidig mål Karbo og bolus Vis ugyldige / slettede registreringer Skjul ugyldige / slettede registreringer diff --git a/wear/src/main/res/values-nb-rNO/strings.xml b/wear/src/main/res/values-nb-rNO/strings.xml index 091489607e..d8894dec03 100644 --- a/wear/src/main/res/values-nb-rNO/strings.xml +++ b/wear/src/main/res/values-nb-rNO/strings.xml @@ -92,7 +92,7 @@ Meny XL Varighet - Midl. mål forespurt + Midlertidig mål forespurt Hurtigknapp forespurt Behandling forespurt Bolus forespurt From 04bd666a3f02dc66876e4ac2e732bea4b6505181 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Wed, 8 Nov 2023 10:42:52 +0100 Subject: [PATCH 49/60] gradle 8.1.3 for buildSrc --- buildSrc/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index c7ac53bd42..7cd2f0a647 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -1,6 +1,6 @@ object KtsBuildVersions { - const val gradle = "8.1.2" + const val gradle = "8.1.3" const val kotlin = "1.9.0" } From 50b7263acd0f4d68460001fa62a6a768396efaff Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Wed, 8 Nov 2023 11:11:19 +0100 Subject: [PATCH 50/60] DynISF: add notification on SMB fallback --- .../aaps/implementations/UiInteractionImpl.kt | 2 +- .../interfaces/notifications/Notification.kt | 1 + .../aaps/core/interfaces/ui/UiInteraction.kt | 3 +-- .../plugins/aps/openAPSSMB/OpenAPSSMBPlugin.kt | 2 +- .../OpenAPSSMBDynamicISFPlugin.kt | 17 ++++++++++++++--- .../constraints/ConstraintsCheckerImplTest.kt | 3 ++- .../sync/nsclient/services/NSClientService.kt | 6 +++--- .../nsclientV3/services/NSClientV3Service.kt | 14 ++++++-------- 8 files changed, 29 insertions(+), 19 deletions(-) diff --git a/app/src/main/kotlin/app/aaps/implementations/UiInteractionImpl.kt b/app/src/main/kotlin/app/aaps/implementations/UiInteractionImpl.kt index 5672ea7650..0cdba33ce2 100644 --- a/app/src/main/kotlin/app/aaps/implementations/UiInteractionImpl.kt +++ b/app/src/main/kotlin/app/aaps/implementations/UiInteractionImpl.kt @@ -190,7 +190,7 @@ class UiInteractionImpl @Inject constructor( rxBus.send(EventNewNotification(Notification(id, System.currentTimeMillis(), text, level, validTo))) } - override fun addNotificationWithAction(injector: HasAndroidInjector, nsAlarm: NSAlarm) { + override fun addNotificationWithAction(nsAlarm: NSAlarm) { rxBus.send(EventNewNotification(NotificationWithAction(injector, nsAlarm))) } diff --git a/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/notifications/Notification.kt b/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/notifications/Notification.kt index 336b16afe5..eac3ee624a 100644 --- a/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/notifications/Notification.kt +++ b/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/notifications/Notification.kt @@ -140,6 +140,7 @@ open class Notification { const val BLUETOOTH_NOT_SUPPORTED = 86 const val PUMP_WARNING = 87 const val PUMP_SYNC_ERROR = 88 + const val SMB_FALLBACK = 89 const val USER_MESSAGE = 1000 diff --git a/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/ui/UiInteraction.kt b/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/ui/UiInteraction.kt index e56d83adce..82c924e0c3 100644 --- a/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/ui/UiInteraction.kt +++ b/core/interfaces/src/main/kotlin/app/aaps/core/interfaces/ui/UiInteraction.kt @@ -5,7 +5,6 @@ import androidx.annotation.RawRes import androidx.annotation.StringRes import androidx.fragment.app.FragmentManager import app.aaps.core.interfaces.nsclient.NSAlarm -import dagger.android.HasAndroidInjector /** * Interface to use activities located in different modules @@ -73,7 +72,7 @@ interface UiInteraction { fun addNotificationValidFor(id: Int, text: String, level: Int, validMinutes: Int) fun addNotificationWithSound(id: Int, text: String, level: Int, @RawRes soundId: Int?) fun addNotificationValidTo(id: Int, date: Long, text: String, level: Int, validTo: Long) - fun addNotificationWithAction(injector: HasAndroidInjector, nsAlarm: NSAlarm) + fun addNotificationWithAction(nsAlarm: NSAlarm) fun addNotificationWithAction(id: Int, text: String, level: Int, buttonText: Int, action: Runnable, @RawRes soundId: Int? = null, date: Long = System.currentTimeMillis()) fun showToastAndNotification(ctx: Context?, string: String?, @RawRes soundID: Int) diff --git a/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/openAPSSMB/OpenAPSSMBPlugin.kt b/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/openAPSSMB/OpenAPSSMBPlugin.kt index d54a5b0f6c..84e8d6ca4e 100644 --- a/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/openAPSSMB/OpenAPSSMBPlugin.kt +++ b/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/openAPSSMB/OpenAPSSMBPlugin.kt @@ -58,7 +58,7 @@ open class OpenAPSSMBPlugin @Inject constructor( private val hardLimits: HardLimits, private val profiler: Profiler, private val sp: SP, - private val dateUtil: DateUtil, + protected val dateUtil: DateUtil, private val repository: AppRepository, private val glucoseStatusProvider: GlucoseStatusProvider, private val bgQualityCheck: BgQualityCheck, diff --git a/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/openAPSSMBDynamicISF/OpenAPSSMBDynamicISFPlugin.kt b/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/openAPSSMBDynamicISF/OpenAPSSMBDynamicISFPlugin.kt index c8f3dc1d64..fcf0a249ef 100644 --- a/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/openAPSSMBDynamicISF/OpenAPSSMBDynamicISFPlugin.kt +++ b/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/openAPSSMBDynamicISF/OpenAPSSMBDynamicISFPlugin.kt @@ -9,6 +9,7 @@ import app.aaps.core.interfaces.constraints.ConstraintsChecker import app.aaps.core.interfaces.iob.GlucoseStatusProvider import app.aaps.core.interfaces.iob.IobCobCalculator import app.aaps.core.interfaces.logging.AAPSLogger +import app.aaps.core.interfaces.notifications.Notification import app.aaps.core.interfaces.plugin.ActivePlugin import app.aaps.core.interfaces.profile.ProfileFunction import app.aaps.core.interfaces.profiling.Profiler @@ -16,8 +17,10 @@ import app.aaps.core.interfaces.resources.ResourceHelper import app.aaps.core.interfaces.rx.bus.RxBus import app.aaps.core.interfaces.sharedPreferences.SP import app.aaps.core.interfaces.stats.TddCalculator +import app.aaps.core.interfaces.ui.UiInteraction import app.aaps.core.interfaces.utils.DateUtil import app.aaps.core.interfaces.utils.HardLimits +import app.aaps.core.interfaces.utils.T import app.aaps.database.impl.AppRepository import app.aaps.plugins.aps.R import app.aaps.plugins.aps.openAPSSMB.DetermineBasalAdapterSMBJS @@ -46,7 +49,8 @@ class OpenAPSSMBDynamicISFPlugin @Inject constructor( repository: AppRepository, glucoseStatusProvider: GlucoseStatusProvider, bgQualityCheck: BgQualityCheck, - tddCalculator: TddCalculator + tddCalculator: TddCalculator, + private val uiInteraction: UiInteraction ) : OpenAPSSMBPlugin( injector, aapsLogger, @@ -78,9 +82,16 @@ class OpenAPSSMBDynamicISFPlugin @Inject constructor( // If there is no TDD data fallback to SMB as ISF calculation may be really off override fun provideDetermineBasalAdapter(): DetermineBasalAdapter = - if (tdd1D == null || tdd7D == null || tddLast4H == null || tddLast8to4H == null || tddLast24H == null || !dynIsfEnabled.value()) + if (tdd1D == null || tdd7D == null || tddLast4H == null || tddLast8to4H == null || tddLast24H == null || !dynIsfEnabled.value()) { + uiInteraction.addNotificationValidTo( + Notification.SMB_FALLBACK, dateUtil.now(), + rh.gs(R.string.fallback_smb_no_tdd), Notification.INFO, dateUtil.now() + T.mins(1).msecs() + ) DetermineBasalAdapterSMBJS(ScriptReader(context), injector) - else DetermineBasalAdapterSMBDynamicISFJS(ScriptReader(context), injector) + } else { + uiInteraction.dismissNotification(Notification.SMB_FALLBACK) + DetermineBasalAdapterSMBDynamicISFJS(ScriptReader(context), injector) + } override fun isAutosensModeEnabled(value: Constraint): Constraint { value.set(false, rh.gs(R.string.autosens_disabled_in_dyn_isf), this) diff --git a/plugins/constraints/src/test/kotlin/app/aaps/plugins/constraints/ConstraintsCheckerImplTest.kt b/plugins/constraints/src/test/kotlin/app/aaps/plugins/constraints/ConstraintsCheckerImplTest.kt index 932a6d89c0..58bd58cb4c 100644 --- a/plugins/constraints/src/test/kotlin/app/aaps/plugins/constraints/ConstraintsCheckerImplTest.kt +++ b/plugins/constraints/src/test/kotlin/app/aaps/plugins/constraints/ConstraintsCheckerImplTest.kt @@ -188,7 +188,8 @@ class ConstraintsCheckerImplTest : TestBaseWithProfile() { repository, glucoseStatusProvider, bgQualityCheck, - tddCalculator + tddCalculator, + uiInteraction ) openAPSAMAPlugin = OpenAPSAMAPlugin( diff --git a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclient/services/NSClientService.kt b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclient/services/NSClientService.kt index c6ddabc390..bac58bc0ed 100644 --- a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclient/services/NSClientService.kt +++ b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclient/services/NSClientService.kt @@ -642,7 +642,7 @@ class NSClientService : DaggerService() { val defaultVal = config.NSCLIENT if (sp.getBoolean(app.aaps.core.utils.R.string.key_ns_announcements, defaultVal)) { val nsAlarm = NSAlarmObject(announcement) - uiInteraction.addNotificationWithAction(injector, nsAlarm) + uiInteraction.addNotificationWithAction(nsAlarm) rxBus.send(EventNSClientNewLog("◄ ANNOUNCEMENT", safeGetString(announcement, "message", "received"))) aapsLogger.debug(LTag.NSCLIENT, announcement.toString()) } @@ -654,7 +654,7 @@ class NSClientService : DaggerService() { val snoozedTo = sp.getLong(rh.gs(app.aaps.core.utils.R.string.key_snoozed_to) + alarm.optString("level"), 0L) if (snoozedTo == 0L || System.currentTimeMillis() > snoozedTo) { val nsAlarm = NSAlarmObject(alarm) - uiInteraction.addNotificationWithAction(injector, nsAlarm) + uiInteraction.addNotificationWithAction(nsAlarm) } rxBus.send(EventNSClientNewLog("◄ ALARM", safeGetString(alarm, "message", "received"))) aapsLogger.debug(LTag.NSCLIENT, alarm.toString()) @@ -667,7 +667,7 @@ class NSClientService : DaggerService() { val snoozedTo = sp.getLong(rh.gs(app.aaps.core.utils.R.string.key_snoozed_to) + alarm.optString("level"), 0L) if (snoozedTo == 0L || System.currentTimeMillis() > snoozedTo) { val nsAlarm = NSAlarmObject(alarm) - uiInteraction.addNotificationWithAction(injector, nsAlarm) + uiInteraction.addNotificationWithAction(nsAlarm) } rxBus.send(EventNSClientNewLog("◄ URGENTALARM", safeGetString(alarm, "message", "received"))) aapsLogger.debug(LTag.NSCLIENT, alarm.toString()) diff --git a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclientV3/services/NSClientV3Service.kt b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclientV3/services/NSClientV3Service.kt index e2e766cecf..27a8bb7366 100644 --- a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclientV3/services/NSClientV3Service.kt +++ b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclientV3/services/NSClientV3Service.kt @@ -4,8 +4,6 @@ import android.annotation.SuppressLint import android.content.Context import android.content.Intent import android.os.Binder -import android.os.Handler -import android.os.HandlerThread import android.os.IBinder import android.os.PowerManager import app.aaps.core.interfaces.configuration.Config @@ -63,7 +61,6 @@ class NSClientV3Service : DaggerService() { private var wakeLock: PowerManager.WakeLock? = null private val binder: IBinder = LocalBinder() - private val handler = Handler(HandlerThread(this::class.simpleName + "Handler").also { it.start() }.looper) @SuppressLint("WakelockTimeout") override fun onCreate() { @@ -94,7 +91,7 @@ class NSClientV3Service : DaggerService() { private var alarmSocket: Socket? = null internal var wsConnected = false - internal fun shutdownWebsockets() { + private fun shutdownWebsockets() { storageSocket?.on(Socket.EVENT_CONNECT, onConnectStorage) storageSocket?.on(Socket.EVENT_DISCONNECT, onDisconnectStorage) storageSocket?.on("create", onDataCreateUpdate) @@ -113,7 +110,8 @@ class NSClientV3Service : DaggerService() { alarmSocket = null } - internal fun initializeWebSockets(reason: String) { + @Suppress("SameParameterValue") + private fun initializeWebSockets(reason: String) { if (sp.getString(app.aaps.core.utils.R.string.key_nsclientinternal_url, "").isEmpty()) return val urlStorage = sp.getString(app.aaps.core.utils.R.string.key_nsclientinternal_url, "").lowercase().replace(Regex("/$"), "") + "/storage" val urlAlarm = sp.getString(app.aaps.core.utils.R.string.key_nsclientinternal_url, "").lowercase().replace(Regex("/$"), "") + "/alarm" @@ -277,7 +275,7 @@ class NSClientV3Service : DaggerService() { rxBus.send(EventNSClientNewLog("◄ ANNOUNCEMENT", data.optString("message"))) aapsLogger.debug(LTag.NSCLIENT, data.toString()) if (sp.getBoolean(app.aaps.core.utils.R.string.key_ns_announcements, config.NSCLIENT)) - uiInteraction.addNotificationWithAction(injector, NSAlarmObject(data)) + uiInteraction.addNotificationWithAction(NSAlarmObject(data)) } private val onAlarm = Emitter.Listener { args -> @@ -300,7 +298,7 @@ class NSClientV3Service : DaggerService() { if (sp.getBoolean(app.aaps.core.utils.R.string.key_ns_alarms, config.NSCLIENT)) { val snoozedTo = sp.getLong(rh.gs(app.aaps.core.utils.R.string.key_snoozed_to) + data.optString("level"), 0L) if (snoozedTo == 0L || System.currentTimeMillis() > snoozedTo) - uiInteraction.addNotificationWithAction(injector, NSAlarmObject(data)) + uiInteraction.addNotificationWithAction(NSAlarmObject(data)) } } @@ -311,7 +309,7 @@ class NSClientV3Service : DaggerService() { if (sp.getBoolean(app.aaps.core.utils.R.string.key_ns_alarms, config.NSCLIENT)) { val snoozedTo = sp.getLong(rh.gs(app.aaps.core.utils.R.string.key_snoozed_to) + data.optString("level"), 0L) if (snoozedTo == 0L || System.currentTimeMillis() > snoozedTo) - uiInteraction.addNotificationWithAction(injector, NSAlarmObject(data)) + uiInteraction.addNotificationWithAction(NSAlarmObject(data)) } } From 8070cac85046add22442adf50711f52fd3ad35c7 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Wed, 8 Nov 2023 11:11:59 +0100 Subject: [PATCH 51/60] 3.2.0.1-dev-a --- buildSrc/src/main/kotlin/Versions.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/src/main/kotlin/Versions.kt b/buildSrc/src/main/kotlin/Versions.kt index b5ce446d61..c1fd0a0603 100644 --- a/buildSrc/src/main/kotlin/Versions.kt +++ b/buildSrc/src/main/kotlin/Versions.kt @@ -2,7 +2,7 @@ import org.gradle.api.JavaVersion object Versions { - const val appVersion = "3.2.0.1-dev" + const val appVersion = "3.2.0.1-dev-a" const val versionCode = 1500 const val ndkVersion = "21.1.6352462" From b5e00f9c1de850035d6fdd5dedc88d5445c7a4ef Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Wed, 8 Nov 2023 13:21:02 +0100 Subject: [PATCH 52/60] Do not allow select DynISF without objective started --- .../aps/openAPSSMBDynamicISF/OpenAPSSMBDynamicISFPlugin.kt | 7 ++++++- .../plugins/constraints/di/PluginsConstraintsModule.kt | 3 +++ .../plugins/constraints/objectives/ObjectivesPlugin.kt | 4 +--- .../aaps/plugins/constraints/ConstraintsCheckerImplTest.kt | 4 +++- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/openAPSSMBDynamicISF/OpenAPSSMBDynamicISFPlugin.kt b/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/openAPSSMBDynamicISF/OpenAPSSMBDynamicISFPlugin.kt index fcf0a249ef..60b120c0c0 100644 --- a/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/openAPSSMBDynamicISF/OpenAPSSMBDynamicISFPlugin.kt +++ b/plugins/aps/src/main/kotlin/app/aaps/plugins/aps/openAPSSMBDynamicISF/OpenAPSSMBDynamicISFPlugin.kt @@ -6,6 +6,7 @@ import app.aaps.core.interfaces.aps.DetermineBasalAdapter import app.aaps.core.interfaces.bgQualityCheck.BgQualityCheck import app.aaps.core.interfaces.constraints.Constraint import app.aaps.core.interfaces.constraints.ConstraintsChecker +import app.aaps.core.interfaces.constraints.Objectives import app.aaps.core.interfaces.iob.GlucoseStatusProvider import app.aaps.core.interfaces.iob.IobCobCalculator import app.aaps.core.interfaces.logging.AAPSLogger @@ -50,7 +51,8 @@ class OpenAPSSMBDynamicISFPlugin @Inject constructor( glucoseStatusProvider: GlucoseStatusProvider, bgQualityCheck: BgQualityCheck, tddCalculator: TddCalculator, - private val uiInteraction: UiInteraction + private val uiInteraction: UiInteraction, + private val objectives: Objectives ) : OpenAPSSMBPlugin( injector, aapsLogger, @@ -80,6 +82,9 @@ class OpenAPSSMBDynamicISFPlugin @Inject constructor( .setDefault(false) } + override fun specialEnableCondition(): Boolean = + objectives.isStarted(Objectives.DYN_ISF_OBJECTIVE) + // If there is no TDD data fallback to SMB as ISF calculation may be really off override fun provideDetermineBasalAdapter(): DetermineBasalAdapter = if (tdd1D == null || tdd7D == null || tddLast4H == null || tddLast8to4H == null || tddLast24H == null || !dynIsfEnabled.value()) { diff --git a/plugins/constraints/src/main/kotlin/app/aaps/plugins/constraints/di/PluginsConstraintsModule.kt b/plugins/constraints/src/main/kotlin/app/aaps/plugins/constraints/di/PluginsConstraintsModule.kt index 2893e33526..3b9078ac7f 100644 --- a/plugins/constraints/src/main/kotlin/app/aaps/plugins/constraints/di/PluginsConstraintsModule.kt +++ b/plugins/constraints/src/main/kotlin/app/aaps/plugins/constraints/di/PluginsConstraintsModule.kt @@ -2,11 +2,13 @@ package app.aaps.plugins.constraints.di import app.aaps.core.interfaces.bgQualityCheck.BgQualityCheck import app.aaps.core.interfaces.constraints.ConstraintsChecker +import app.aaps.core.interfaces.constraints.Objectives import app.aaps.core.interfaces.versionChecker.VersionCheckerUtils import dagger.Binds import dagger.Module import app.aaps.plugins.constraints.ConstraintsCheckerImpl import app.aaps.plugins.constraints.bgQualityCheck.BgQualityCheckPlugin +import app.aaps.plugins.constraints.objectives.ObjectivesPlugin import app.aaps.plugins.constraints.versionChecker.VersionCheckerUtilsImpl @Module( @@ -25,5 +27,6 @@ abstract class PluginsConstraintsModule { @Binds fun bindVersionCheckerUtils(versionCheckerUtils: VersionCheckerUtilsImpl): VersionCheckerUtils @Binds fun bindBgQualityCheck(bgQualityCheck: BgQualityCheckPlugin): BgQualityCheck @Binds fun bindsConstraintChecker(constraintsCheckerImpl: ConstraintsCheckerImpl): ConstraintsChecker + @Binds fun bindsObjectives(objectivesPlugin: ObjectivesPlugin): Objectives } } \ No newline at end of file diff --git a/plugins/constraints/src/main/kotlin/app/aaps/plugins/constraints/objectives/ObjectivesPlugin.kt b/plugins/constraints/src/main/kotlin/app/aaps/plugins/constraints/objectives/ObjectivesPlugin.kt index de159b20f2..2430e4bcdf 100644 --- a/plugins/constraints/src/main/kotlin/app/aaps/plugins/constraints/objectives/ObjectivesPlugin.kt +++ b/plugins/constraints/src/main/kotlin/app/aaps/plugins/constraints/objectives/ObjectivesPlugin.kt @@ -58,11 +58,9 @@ class ObjectivesPlugin @Inject constructor( var objectives: MutableList = ArrayList() - public override fun onStart() { - super.onStart() + init { setupObjectives() } - override fun specialEnableCondition(): Boolean = activePlugin.activePump.pumpDescription.isTempBasalCapable diff --git a/plugins/constraints/src/test/kotlin/app/aaps/plugins/constraints/ConstraintsCheckerImplTest.kt b/plugins/constraints/src/test/kotlin/app/aaps/plugins/constraints/ConstraintsCheckerImplTest.kt index 58bd58cb4c..7cd8932f79 100644 --- a/plugins/constraints/src/test/kotlin/app/aaps/plugins/constraints/ConstraintsCheckerImplTest.kt +++ b/plugins/constraints/src/test/kotlin/app/aaps/plugins/constraints/ConstraintsCheckerImplTest.kt @@ -138,6 +138,7 @@ class ConstraintsCheckerImplTest : TestBaseWithProfile() { insightDbHelper = InsightDbHelper(insightDatabaseDao) danaPump = DanaPump(aapsLogger, sp, dateUtil, instantiator, decimalFormatter) objectivesPlugin = ObjectivesPlugin(injector, aapsLogger, rh, activePlugin, sp, config) + objectivesPlugin.onStart() comboPlugin = ComboPlugin(injector, aapsLogger, rxBus, rh, profileFunction, sp, commandQueue, pumpSync, dateUtil, ruffyScripter, uiInteraction) danaRPlugin = DanaRPlugin( injector, aapsLogger, aapsSchedulers, rxBus, context, rh, constraintChecker, activePlugin, sp, commandQueue, danaPump, dateUtil, fabricPrivacy, pumpSync, @@ -189,7 +190,8 @@ class ConstraintsCheckerImplTest : TestBaseWithProfile() { glucoseStatusProvider, bgQualityCheck, tddCalculator, - uiInteraction + uiInteraction, + objectivesPlugin ) openAPSAMAPlugin = OpenAPSAMAPlugin( From 617d722edda0b09e54795648082449c66df37aa3 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Wed, 8 Nov 2023 14:08:58 +0100 Subject: [PATCH 53/60] show BG value in treatments --- .../fragments/TreatmentsCareportalFragment.kt | 4 ++++ ui/src/main/res/layout/treatments_careportal_item.xml | 11 ++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ui/src/main/kotlin/app/aaps/ui/activities/fragments/TreatmentsCareportalFragment.kt b/ui/src/main/kotlin/app/aaps/ui/activities/fragments/TreatmentsCareportalFragment.kt index 2552e260d0..b2594caa3e 100644 --- a/ui/src/main/kotlin/app/aaps/ui/activities/fragments/TreatmentsCareportalFragment.kt +++ b/ui/src/main/kotlin/app/aaps/ui/activities/fragments/TreatmentsCareportalFragment.kt @@ -18,6 +18,7 @@ import app.aaps.core.interfaces.extensions.toVisibility import app.aaps.core.interfaces.logging.AAPSLogger import app.aaps.core.interfaces.logging.LTag import app.aaps.core.interfaces.logging.UserEntryLogger +import app.aaps.core.interfaces.profile.ProfileUtil import app.aaps.core.interfaces.resources.ResourceHelper import app.aaps.core.interfaces.rx.AapsSchedulers import app.aaps.core.interfaces.rx.bus.RxBus @@ -60,6 +61,7 @@ class TreatmentsCareportalFragment : DaggerFragment(), MenuProvider { @Inject lateinit var aapsSchedulers: AapsSchedulers @Inject lateinit var repository: AppRepository @Inject lateinit var uel: UserEntryLogger + @Inject lateinit var profileUtil: ProfileUtil private var _binding: TreatmentsCareportalFragmentBinding? = null @@ -157,6 +159,8 @@ class TreatmentsCareportalFragment : DaggerFragment(), MenuProvider { holder.binding.time.text = dateUtil.timeString(therapyEvent.timestamp) holder.binding.duration.text = if (therapyEvent.duration == 0L) "" else dateUtil.niceTimeScalar(therapyEvent.duration, rh) holder.binding.note.text = therapyEvent.note + if (therapyEvent.type == TherapyEvent.Type.FINGER_STICK_BG_VALUE) + therapyEvent.glucose?.let { holder.binding.bg.text = profileUtil.stringInCurrentUnitsDetect(it) } holder.binding.type.text = translator.translate(therapyEvent.type) holder.binding.cbRemove.visibility = (therapyEvent.isValid && actionHelper.isRemoving).toVisibility() holder.binding.cbRemove.setOnCheckedChangeListener { _, value -> diff --git a/ui/src/main/res/layout/treatments_careportal_item.xml b/ui/src/main/res/layout/treatments_careportal_item.xml index 2ca272195c..dc557d02e3 100644 --- a/ui/src/main/res/layout/treatments_careportal_item.xml +++ b/ui/src/main/res/layout/treatments_careportal_item.xml @@ -109,13 +109,22 @@ + + + tools:text="" /> Date: Wed, 8 Nov 2023 18:45:22 +0100 Subject: [PATCH 54/60] fix tests --- .../app/aaps/plugins/constraints/ConstraintsCheckerImplTest.kt | 2 -- .../aaps/plugins/constraints/objectives/ObjectivesPluginTest.kt | 1 - 2 files changed, 3 deletions(-) diff --git a/plugins/constraints/src/test/kotlin/app/aaps/plugins/constraints/ConstraintsCheckerImplTest.kt b/plugins/constraints/src/test/kotlin/app/aaps/plugins/constraints/ConstraintsCheckerImplTest.kt index 7cd8932f79..4cee8ab1da 100644 --- a/plugins/constraints/src/test/kotlin/app/aaps/plugins/constraints/ConstraintsCheckerImplTest.kt +++ b/plugins/constraints/src/test/kotlin/app/aaps/plugins/constraints/ConstraintsCheckerImplTest.kt @@ -138,7 +138,6 @@ class ConstraintsCheckerImplTest : TestBaseWithProfile() { insightDbHelper = InsightDbHelper(insightDatabaseDao) danaPump = DanaPump(aapsLogger, sp, dateUtil, instantiator, decimalFormatter) objectivesPlugin = ObjectivesPlugin(injector, aapsLogger, rh, activePlugin, sp, config) - objectivesPlugin.onStart() comboPlugin = ComboPlugin(injector, aapsLogger, rxBus, rh, profileFunction, sp, commandQueue, pumpSync, dateUtil, ruffyScripter, uiInteraction) danaRPlugin = DanaRPlugin( injector, aapsLogger, aapsSchedulers, rxBus, context, rh, constraintChecker, activePlugin, sp, commandQueue, danaPump, dateUtil, fabricPrivacy, pumpSync, @@ -227,7 +226,6 @@ class ConstraintsCheckerImplTest : TestBaseWithProfile() { constraintsPluginsList.add(openAPSAMAPlugin) constraintsPluginsList.add(openAPSSMBPlugin) `when`(activePlugin.getSpecificPluginsListByInterface(PluginConstraints::class.java)).thenReturn(constraintsPluginsList) - objectivesPlugin.onStart() } // Combo & Objectives diff --git a/plugins/constraints/src/test/kotlin/app/aaps/plugins/constraints/objectives/ObjectivesPluginTest.kt b/plugins/constraints/src/test/kotlin/app/aaps/plugins/constraints/objectives/ObjectivesPluginTest.kt index 19160d8196..dade40841c 100644 --- a/plugins/constraints/src/test/kotlin/app/aaps/plugins/constraints/objectives/ObjectivesPluginTest.kt +++ b/plugins/constraints/src/test/kotlin/app/aaps/plugins/constraints/objectives/ObjectivesPluginTest.kt @@ -40,7 +40,6 @@ class ObjectivesPluginTest : TestBase() { @BeforeEach fun prepareMock() { objectivesPlugin = ObjectivesPlugin(injector, aapsLogger, rh, activePlugin, sp, config) - objectivesPlugin.onStart() `when`(rh.gs(R.string.objectivenotstarted, 9)).thenReturn("Objective 9 not started") `when`(rh.gs(R.string.objectivenotstarted, 8)).thenReturn("Objective 8 not started") `when`(rh.gs(R.string.objectivenotstarted, 6)).thenReturn("Objective 6 not started") From 26024dc7e139769aa0ba5f887e8c70917855b51a Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Thu, 9 Nov 2023 16:03:49 +0100 Subject: [PATCH 55/60] use default insulin during initialization --- .../main/kotlin/app/aaps/implementation/plugin/PluginStore.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/implementation/src/main/kotlin/app/aaps/implementation/plugin/PluginStore.kt b/implementation/src/main/kotlin/app/aaps/implementation/plugin/PluginStore.kt index 7b4a97e7d7..8d6efee558 100644 --- a/implementation/src/main/kotlin/app/aaps/implementation/plugin/PluginStore.kt +++ b/implementation/src/main/kotlin/app/aaps/implementation/plugin/PluginStore.kt @@ -181,7 +181,7 @@ class PluginStore @Inject constructor( get() = activeProfile ?: checkNotNull(activeProfile) { "No profile selected" } override val activeInsulin: Insulin - get() = activeInsulinStore ?: checkNotNull(activeInsulinStore) { "No insulin selected" } + get() = activeInsulinStore ?: getDefaultPlugin(PluginType.INSULIN) as Insulin override val activeAPS: APS get() = activeAPSStore ?: checkNotNull(activeAPSStore) { "No APS selected" } From 27355c18a2acc217401b7d70624df95d0eadd918 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Fri, 10 Nov 2023 14:11:00 +0100 Subject: [PATCH 56/60] Automation: set precision level for comparsion to mgdl int values --- .../kotlin/app/aaps/plugins/automation/triggers/TriggerBg.kt | 3 ++- .../plugins/automation/triggers/TriggerProfilePercent.kt | 5 +++-- .../plugins/automation/triggers/TriggerTempTargetValue.kt | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/triggers/TriggerBg.kt b/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/triggers/TriggerBg.kt index 83d0a7c3a3..b7f2fd696f 100644 --- a/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/triggers/TriggerBg.kt +++ b/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/triggers/TriggerBg.kt @@ -13,6 +13,7 @@ import app.aaps.plugins.automation.elements.StaticLabel import dagger.android.HasAndroidInjector import org.json.JSONObject import java.util.Optional +import kotlin.math.roundToInt class TriggerBg(injector: HasAndroidInjector) : Trigger(injector) { @@ -54,7 +55,7 @@ class TriggerBg(injector: HasAndroidInjector) : Trigger(injector) { aapsLogger.debug(LTag.AUTOMATION, "NOT ready for execution: " + friendlyDescription()) return false } - if (comparator.value.check(glucoseStatus.glucose, profileUtil.convertToMgdl(bg.value, bg.units))) { + if (comparator.value.check(glucoseStatus.glucose.roundToInt(), profileUtil.convertToMgdl(bg.value, bg.units).roundToInt())) { aapsLogger.debug(LTag.AUTOMATION, "Ready for execution: " + friendlyDescription()) return true } diff --git a/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/triggers/TriggerProfilePercent.kt b/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/triggers/TriggerProfilePercent.kt index d13dcc9c49..a60d94c585 100644 --- a/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/triggers/TriggerProfilePercent.kt +++ b/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/triggers/TriggerProfilePercent.kt @@ -13,6 +13,7 @@ import app.aaps.plugins.automation.elements.StaticLabel import dagger.android.HasAndroidInjector import org.json.JSONObject import java.util.Optional +import kotlin.math.roundToInt class TriggerProfilePercent(injector: HasAndroidInjector) : Trigger(injector) { @@ -54,13 +55,13 @@ class TriggerProfilePercent(injector: HasAndroidInjector) : Trigger(injector) { return false } if (profile is ProfileSealed.EPS) { - if (comparator.value.check(profile.value.originalPercentage.toDouble(), pct.value)) { + if (comparator.value.check(profile.value.originalPercentage, pct.value.roundToInt())) { aapsLogger.debug(LTag.AUTOMATION, "Ready for execution: " + friendlyDescription()) return true } } if (profile is ProfileSealed.Pure) { - if (comparator.value.check(100.0, pct.value)) { + if (comparator.value.check(100, pct.value.roundToInt())) { aapsLogger.debug(LTag.AUTOMATION, "Ready for execution: " + friendlyDescription()) return true } diff --git a/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/triggers/TriggerTempTargetValue.kt b/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/triggers/TriggerTempTargetValue.kt index 4defa7c6eb..7c38fd3755 100644 --- a/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/triggers/TriggerTempTargetValue.kt +++ b/plugins/automation/src/main/kotlin/app/aaps/plugins/automation/triggers/TriggerTempTargetValue.kt @@ -14,6 +14,7 @@ import app.aaps.plugins.automation.elements.StaticLabel import dagger.android.HasAndroidInjector import org.json.JSONObject import java.util.Optional +import kotlin.math.roundToInt class TriggerTempTargetValue(injector: HasAndroidInjector) : Trigger(injector) { @@ -51,7 +52,7 @@ class TriggerTempTargetValue(injector: HasAndroidInjector) : Trigger(injector) { aapsLogger.debug(LTag.AUTOMATION, "Ready for execution: " + friendlyDescription()) return true } - if (tt is ValueWrapper.Existing && comparator.value.check(tt.value.lowTarget, profileUtil.convertToMgdl(ttValue.value, ttValue.units))) { + if (tt is ValueWrapper.Existing && comparator.value.check(tt.value.lowTarget.roundToInt(), profileUtil.convertToMgdl(ttValue.value, ttValue.units).roundToInt())) { aapsLogger.debug(LTag.AUTOMATION, "Ready for execution: " + friendlyDescription()) return true } From f519d37ac3d8d6541a4f6be9d0ed56bc6367e3fe Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Sat, 11 Nov 2023 10:14:58 +0100 Subject: [PATCH 57/60] VirtualPump: don't ask for BT permission --- .../configuration/AndroidPermissionImpl.kt | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/AndroidPermissionImpl.kt b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/AndroidPermissionImpl.kt index bb1f7a1a0a..71f6dbdd9c 100644 --- a/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/AndroidPermissionImpl.kt +++ b/plugins/configuration/src/main/kotlin/app/aaps/plugins/configuration/AndroidPermissionImpl.kt @@ -17,6 +17,7 @@ import app.aaps.core.interfaces.androidPermissions.AndroidPermission import app.aaps.core.interfaces.configuration.Config import app.aaps.core.interfaces.notifications.Notification import app.aaps.core.interfaces.plugin.ActivePlugin +import app.aaps.core.interfaces.pump.VirtualPump import app.aaps.core.interfaces.resources.ResourceHelper import app.aaps.core.interfaces.smsCommunicator.SmsCommunicator import app.aaps.core.ui.dialogs.OKDialog @@ -105,20 +106,21 @@ class AndroidPermissionImpl @Inject constructor( @SuppressLint("MissingPermission") @Synchronized override fun notifyForBtConnectPermission(activity: FragmentActivity) { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { - // Manifest.permission.BLUETOOTH_CONNECT - if (permissionNotGranted(activity, Manifest.permission.BLUETOOTH_CONNECT) || permissionNotGranted(activity, Manifest.permission.BLUETOOTH_SCAN)) - activePlugin.activeOverview.addNotification( - id = Notification.PERMISSION_BT, - text = rh.gs(app.aaps.core.ui.R.string.need_connect_permission), - level = Notification.URGENT, - actionButtonId = R.string.request - ) { askForPermission(activity, arrayOf(Manifest.permission.BLUETOOTH_SCAN, Manifest.permission.BLUETOOTH_CONNECT)) } - else { - activity.startActivity(Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE)) - activePlugin.activeOverview.dismissNotification(Notification.PERMISSION_BT) + if (activePlugin.activePump !is VirtualPump) + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { + // Manifest.permission.BLUETOOTH_CONNECT + if (permissionNotGranted(activity, Manifest.permission.BLUETOOTH_CONNECT) || permissionNotGranted(activity, Manifest.permission.BLUETOOTH_SCAN)) + activePlugin.activeOverview.addNotification( + id = Notification.PERMISSION_BT, + text = rh.gs(app.aaps.core.ui.R.string.need_connect_permission), + level = Notification.URGENT, + actionButtonId = R.string.request + ) { askForPermission(activity, arrayOf(Manifest.permission.BLUETOOTH_SCAN, Manifest.permission.BLUETOOTH_CONNECT)) } + else { + activity.startActivity(Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE)) + activePlugin.activeOverview.dismissNotification(Notification.PERMISSION_BT) + } } - } } @Synchronized From 3e681ef219ceb11b6a185548ef735c8e43bd97ea Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Sun, 12 Nov 2023 11:08:48 +0100 Subject: [PATCH 58/60] Xdrip: round incomming b values --- .../main/kotlin/app/aaps/plugins/source/XdripSourcePlugin.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/source/src/main/kotlin/app/aaps/plugins/source/XdripSourcePlugin.kt b/plugins/source/src/main/kotlin/app/aaps/plugins/source/XdripSourcePlugin.kt index f38272a0be..7bcdddc2d0 100644 --- a/plugins/source/src/main/kotlin/app/aaps/plugins/source/XdripSourcePlugin.kt +++ b/plugins/source/src/main/kotlin/app/aaps/plugins/source/XdripSourcePlugin.kt @@ -22,6 +22,7 @@ import dagger.android.HasAndroidInjector import kotlinx.coroutines.Dispatchers import javax.inject.Inject import javax.inject.Singleton +import kotlin.math.round @Singleton class XdripSourcePlugin @Inject constructor( @@ -76,8 +77,8 @@ class XdripSourcePlugin @Inject constructor( val glucoseValues = mutableListOf() glucoseValues += TransactionGlucoseValue( timestamp = bundle.getLong(Intents.EXTRA_TIMESTAMP, 0), - value = bundle.getDouble(Intents.EXTRA_BG_ESTIMATE, 0.0), - raw = bundle.getDouble(Intents.EXTRA_RAW, 0.0), + value = round(bundle.getDouble(Intents.EXTRA_BG_ESTIMATE, 0.0)), + raw = round(bundle.getDouble(Intents.EXTRA_RAW, 0.0)), noise = null, trendArrow = GlucoseValue.TrendArrow.fromString(bundle.getString(Intents.EXTRA_BG_SLOPE_NAME)), sourceSensor = GlucoseValue.SourceSensor.fromString( From 084aa201fdc967a9f35825bd345be47ae47c8fea Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Sun, 12 Nov 2023 11:36:20 +0100 Subject: [PATCH 59/60] 3.2.0.2 --- buildSrc/src/main/kotlin/Versions.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/buildSrc/src/main/kotlin/Versions.kt b/buildSrc/src/main/kotlin/Versions.kt index c1fd0a0603..80f8350075 100644 --- a/buildSrc/src/main/kotlin/Versions.kt +++ b/buildSrc/src/main/kotlin/Versions.kt @@ -2,7 +2,7 @@ import org.gradle.api.JavaVersion object Versions { - const val appVersion = "3.2.0.1-dev-a" + const val appVersion = "3.2.0.2" const val versionCode = 1500 const val ndkVersion = "21.1.6352462" @@ -15,4 +15,4 @@ object Versions { val javaVersion = JavaVersion.VERSION_11 const val jacoco = "0.8.11" -} \ No newline at end of file +} From 91280026b1f5731fa490020d6ef7fcec9d53fca4 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Sun, 12 Nov 2023 11:38:24 +0100 Subject: [PATCH 60/60] New Crowdin updates (#3046) * Update source file strings.xml * New translations strings.xml (Romanian) * New translations strings.xml (Spanish) * New translations strings.xml (Czech) * New translations strings.xml (Hebrew) * New translations strings.xml (Italian) * New translations strings.xml (Dutch) * New translations strings.xml (Polish) * New translations strings.xml (Russian) * New translations strings.xml (Turkish) * New translations strings.xml (Norwegian Bokmal) * Update source file strings.xml * New translations strings.xml (Norwegian Bokmal) * New translations strings.xml (Czech) * New translations strings.xml (Turkish) * New translations strings.xml (Polish) * New translations strings.xml (Spanish) * New translations strings.xml (Italian) * New translations strings.xml (Norwegian Bokmal) * New translations strings.xml (Norwegian Bokmal) * New translations exam.xml (Korean) * New translations strings.xml (Korean) * New translations strings.xml (Korean) * New translations strings.xml (Korean) * New translations strings.xml (Korean) * New translations exam.xml (Korean) * New translations strings.xml (Russian) * New translations strings.xml (Russian) * New translations strings.xml (Norwegian Bokmal) --- core/interfaces/src/main/res/values-ko-rKR/strings.xml | 4 ++++ core/ui/src/main/res/values-ko-rKR/strings.xml | 8 ++++++++ plugins/aps/src/main/res/values-cs-rCZ/strings.xml | 4 ++-- plugins/aps/src/main/res/values-es-rES/strings.xml | 4 ++-- plugins/aps/src/main/res/values-it-rIT/strings.xml | 4 ++-- plugins/aps/src/main/res/values-iw-rIL/strings.xml | 2 -- plugins/aps/src/main/res/values-ko-rKR/strings.xml | 4 ++++ plugins/aps/src/main/res/values-nb-rNO/strings.xml | 4 ++-- plugins/aps/src/main/res/values-nl-rNL/strings.xml | 2 -- plugins/aps/src/main/res/values-pl-rPL/strings.xml | 4 ++-- plugins/aps/src/main/res/values-ro-rRO/strings.xml | 2 -- plugins/aps/src/main/res/values-ru-rRU/strings.xml | 4 ++-- plugins/aps/src/main/res/values-tr-rTR/strings.xml | 4 ++-- .../configuration/src/main/res/values-nb-rNO/strings.xml | 2 +- plugins/constraints/src/main/res/values-ko-rKR/exam.xml | 8 ++++---- wear/src/main/res/values-ko-rKR/strings.xml | 9 +++++++++ 16 files changed, 44 insertions(+), 25 deletions(-) diff --git a/core/interfaces/src/main/res/values-ko-rKR/strings.xml b/core/interfaces/src/main/res/values-ko-rKR/strings.xml index 4a9f9cc4ba..cdc420c260 100644 --- a/core/interfaces/src/main/res/values-ko-rKR/strings.xml +++ b/core/interfaces/src/main/res/values-ko-rKR/strings.xml @@ -42,6 +42,7 @@ 파일 이름: %1$s 플러그인 버전: %1$s 이름: %1$s (%2$s) + 정보: %1$s IOB 표시 IOB 자세히 표시하기 COB 표시 @@ -56,6 +57,8 @@ BGI 표시하기 화살표 표시하기 이전 표시하기 + 몇 번째 주인지 표시 + 날짜 표시 기본 시계, 워치페이스 내보내기 버튼을 클릭하여 템플릿을 생성할 수 있습니다. 기본 워치페이스 배경화면 이미지 @@ -82,6 +85,7 @@ 오전 또는 오후 요일 일 (DD) + 주 번호 (ww) 월명 (짧게) 루프 상태 및 이전 방향 화살표 diff --git a/core/ui/src/main/res/values-ko-rKR/strings.xml b/core/ui/src/main/res/values-ko-rKR/strings.xml index c8ac03bc06..e61cbf0c93 100644 --- a/core/ui/src/main/res/values-ko-rKR/strings.xml +++ b/core/ui/src/main/res/values-ko-rKR/strings.xml @@ -51,6 +51,7 @@ 확장 Bolus 일시중지 TDD Total + 오래된 데이터 %1$.2f U을 주입합니다. 펌프를 기다리는 중 AAPS 시작 @@ -167,6 +168,8 @@ NS에 펌프상태 업로드하기 중지 또는 일시중지된 loop 활성 인슐린 (IOB) + 목표: + OAPS 결과: 잘못된 비밀번호 잘못된 PIN @@ -462,6 +465,8 @@ Bolus는 이 경우(펌프를 통해 공급되지 않음) 에만 기록됩니다 식사 시간이 되면 알람을 울리기 선택한 실행이 없습니다. 아무런 실행이 되지 않습니다. + 탄수화물= 0. 아무런 조치도 취하지 않았습니다! + 인슐린이 필요하지 않습니다! 기저 계산에는 최근 BG가 없습니다! 활성화된 프로파일 설정이 없습니다! 알 수 없는 COB입니다! BG 판독이 누락되었거나, 최근 앱을 다시 시작하였습니까? @@ -578,6 +583,7 @@ 데이터베이스를 정리하시겠습니까?\n3개월 이상 경과한 추적된 변경 내용 및 기록 데이터가 제거됩니다.\n이 작업을 수행하면 전체 동기화 속도가 크게 향상됩니다. 입력된 내용 제거됨 + @@ -593,4 +599,6 @@ + %1$.1f U + %1$.2f U diff --git a/plugins/aps/src/main/res/values-cs-rCZ/strings.xml b/plugins/aps/src/main/res/values-cs-rCZ/strings.xml index 5e09f1e2ce..92505258ac 100644 --- a/plugins/aps/src/main/res/values-cs-rCZ/strings.xml +++ b/plugins/aps/src/main/res/values-cs-rCZ/strings.xml @@ -1,7 +1,7 @@ - Upravuje citlivost a bazál - Je-li aktivován plugin DynISF, používá 24h CDD / 7denní CDD jako základ pro výpočet upravené citlivosti a také pro zvyšování/snižování bazálu, stejně jako to dělá standardní funkce Autosens + Povolit, aby citlivost založená na CDD mohla upravovat bazál a cílovou glykémii + K výpočtu citlivosti použité pro zvýšení nebo snížení bazálu se používá CDD za posledních 24 h / 7 D a také upravuje cílovou glykémii, pokud je tato možnost povolena, stejně jako to dělá Autosens. Tuto možnost je doporučeno pro začátek vypnout. Korekční faktor pro DynamicISF v % Korekční faktor pro DynamicISF. Pro agresivnější korekční dávky nastavte hodnoty vyšší než 100 %, pro méně agresivní korekce nižší než 100 %. Vysoký dočasný cíl zvýší senzitivitu diff --git a/plugins/aps/src/main/res/values-es-rES/strings.xml b/plugins/aps/src/main/res/values-es-rES/strings.xml index fcd6f101f9..b9b3566744 100644 --- a/plugins/aps/src/main/res/values-es-rES/strings.xml +++ b/plugins/aps/src/main/res/values-es-rES/strings.xml @@ -1,7 +1,7 @@ - Ajustar sensibilidad y glucosa - Si se activa, ISF Dinámico, utiliza las últimas 24h TDD/7D TDD como base para ajustar el ISF calculado y también para aumentar y disminuir la tasa basal, de la misma manera que lo hace el Autosens estándar + Habilitar la relación de sensibilidad basada en TDD para modificar las basales y el objetivo de glucosa + Utiliza las últimas 24h TDD/7D TDD para calcular el ratio de sensibilidad utilizado para aumentar o disminuir la tasa basal, y también ajustar el objetivo de glucosa si estas opciones están activadas, de la misma forma que lo hace Autosens. Se recomienda comenzar con esta opción desactivada Factor de ajuste de ISF Dinámico % Factor de ajuste para ISF Dinámico. Establezca más de 100% para una corrección más agresiva, y menos de 100% para correcciones más susves. Objetivo temporal alto aumenta la sensibilidad diff --git a/plugins/aps/src/main/res/values-it-rIT/strings.xml b/plugins/aps/src/main/res/values-it-rIT/strings.xml index 1c613179ea..5e25e1f840 100644 --- a/plugins/aps/src/main/res/values-it-rIT/strings.xml +++ b/plugins/aps/src/main/res/values-it-rIT/strings.xml @@ -1,7 +1,7 @@ - Regola sensibilità e BG - Se attivata, DynISF utilizza le ultime 24h TDD/7D TDD come base per aggiustare l\'ISF calcolato e anche per aumentare e diminuire la velocità basale, nello stesso modo in cui fa Autosens + Abilita il rapporto di sensibilità basato sul TDD per la modifica della basale e del target del glucosio + Usa le ultime 24h TDD/7D TDD per calcolare il rapporto di sensibilità utilizzato per aumentare o diminuire la velocità basale e anche per regolare il target di glucosio se le relative opzioni sono abilitate, allo stesso modo in cui fa Autosens. Si consiglia di iniziare con questa opzione disattivata Fattore di regolazione per ISF Dinamico (%) Fattore di regolazione per ISF Dinamico. Imposta più del 100% per dosi di correzione più aggressive e meno del 100% per correzioni meno aggressive. Target temporaneo \"alto\" aumenta la sensibilità diff --git a/plugins/aps/src/main/res/values-iw-rIL/strings.xml b/plugins/aps/src/main/res/values-iw-rIL/strings.xml index f413f56ed3..9e5a0e2956 100644 --- a/plugins/aps/src/main/res/values-iw-rIL/strings.xml +++ b/plugins/aps/src/main/res/values-iw-rIL/strings.xml @@ -1,7 +1,5 @@ - כיוונון הרגישות והמינון הבזאלי - הרגישות הדינמית תשתמש בסך מינון האינסולין של 24 השעות האחרונות או של השבוע האחרון כדי לכוונן את יחס הרגישות ואת המינון הבזאלי, בדומה לדרך בה Autosens עושה זאת כיוונון פקטור הרגישות הדינאמית % כיוונון פקטור הרגישות הדינאמית. הגדירו יותר מ-100% לקבלת תיקונים אגרסיביים יותר ופחות מ-100% לקבלת תיקונים עדינים יותר. ערך מטרה זמני גבוה מעלה את הרגישות diff --git a/plugins/aps/src/main/res/values-ko-rKR/strings.xml b/plugins/aps/src/main/res/values-ko-rKR/strings.xml index 892240f4d5..41d3a7ebfb 100644 --- a/plugins/aps/src/main/res/values-ko-rKR/strings.xml +++ b/plugins/aps/src/main/res/values-ko-rKR/strings.xml @@ -1,5 +1,7 @@ + Basal 및 혈당 목표 수정을 위한 TDD 기반 민감도 비율 활성화 + 지난 24시간 TDD/7일 TDD를 사용하여 Basal 증가 또는 감소에 사용되는 민감도 비율을 계산하고, 이 옵션이 활성화된 경우 Autosens와 동일한 방식으로 혈당 목표도 조정합니다. 이 옵션을 끈 상태에서 시작하는 것이 좋습니다. 동적ISF 조정 계수 % 동적ISF 에 대한 조정 계수. 더 호전적인 보정 양인 경우 100% 이상으로 설정하고, 덜 호전적인 보정의 경우 100% 미만으로 설정합니다. 높은 임시목표는 민감도를 올립니다. @@ -82,6 +84,7 @@ 설정에서 SMB가 비활성화 되었습니다. 설정에서 UAM이 비활성화 되었습니다. 설정에서 Autosens가 비활성화 되었습니다. + DynISF에서 Autosens 비활성화 %2$s로 인해 IOB가 %1$.1f U으로 제한됩니다. 설정에서의 최대값 @@ -113,4 +116,5 @@ 펌프에 의한 SMB 설정 최소 요청 변경 [%] 변경 사항이 %의 값보다 큰 경우에만 열린 루프의 새 변경 요청을 팝업합니다. 기본값은 20%입니다. + SMB로 폴백. TDD 데이터가 충분하지 않습니다. diff --git a/plugins/aps/src/main/res/values-nb-rNO/strings.xml b/plugins/aps/src/main/res/values-nb-rNO/strings.xml index a42b215f3b..e53146b801 100644 --- a/plugins/aps/src/main/res/values-nb-rNO/strings.xml +++ b/plugins/aps/src/main/res/values-nb-rNO/strings.xml @@ -1,7 +1,7 @@ - Juster sensitivitet ved hjelp av TDD - Benytter de siste 24t TDD/7D TDD til å beregne sensitivitet som grunnlag til å øke eller redusere basaldose og i tillegg justere blodsukkermål hvis valgene for dette er aktivert, på samme måte som Autosens gjør. Anbefalt å starte med dette valget slått av + Aktiver TDD-basert sensitivitetsberegning for justering av basal og blodsukkermål + Bruker de siste 24t TDD/7D TDD til å beregne sensitivitet som grunnlag til å øke eller redusere basaldosen, samt justere blodsukkermål hvis disse valgene er aktivert, på samme måte som Autosens gjør. Det er anbefalt å starte med dette valget slått av Dynamisk ISF justeringsfaktor % Justeringsfaktor for dynamisk ISF. Verdier over 100% vil gi mer aggressive korreksjonsdoser, mens verdier under 100% vil gi mildere korreksjonsdoser. Høyt midlertidig mål øker sensitiviteten diff --git a/plugins/aps/src/main/res/values-nl-rNL/strings.xml b/plugins/aps/src/main/res/values-nl-rNL/strings.xml index 4a0cde27c0..1b23289673 100644 --- a/plugins/aps/src/main/res/values-nl-rNL/strings.xml +++ b/plugins/aps/src/main/res/values-nl-rNL/strings.xml @@ -1,7 +1,5 @@ - Wijzig gevoeligheid en basaal - Wanneer geactiveerd, gebruikt DynISF de laatste 24-uurs TDD/7D TDD als basis voor het aanpassen van de berekende ISF en ook voor het verhogen en verlagen van de basaalstand, op dezelfde manier als standaard Autosens doet Dynamische Isf aanpassingsfactor % Aanpassingsfactor voor DynamicISF. Stel meer dan 100% in voor een agressievere correctie en minder dan 100% voor minder agressieve correctie. Hoog tijdelijk streefdoel verhoogt gevoeligheid diff --git a/plugins/aps/src/main/res/values-pl-rPL/strings.xml b/plugins/aps/src/main/res/values-pl-rPL/strings.xml index 93ab7e090a..4277dec5b1 100644 --- a/plugins/aps/src/main/res/values-pl-rPL/strings.xml +++ b/plugins/aps/src/main/res/values-pl-rPL/strings.xml @@ -1,7 +1,7 @@ - Dostosuj wrażliwość i bazę - Jeśli aktywowano wtyczkę DynISF, wykorzystuje ona 24-godzinną DDI / 7-dniową DDI jako podstawę do dostosowania obliczonego ISF oraz do zwiększania i zmniejszania dawek bazowych, w taki sam sposób jak standardowe Autosens + Włącz współczynnik czułości oparty na DDI dla modyfikacji docelowej dawki bazowej i docelowej glikemii + Używa 24-godzinną DDI / 7-dniową DDI do obliczenia współczynnika czułości używanego do zwiększania lub zmniejszania dawki bazowej, a także do dostosowania docelowej glikemii, jeśli te opcje są włączone, w ten sam sposób, w jaki robi to Autosens. Zalecane jest rozpoczęcie przy wyłączonej tej opcji Współczynnik korygujący dynamicznego ISF % Współczynnik korygujący dla DynamicISF. Ustaw więcej niż 100% dla bardziej agresywnych dawek korekcyjnych i mniej niż 100% dla mniej agresywnych korekt. Wysoki tymczasowy cel zwiększy wrażliwość diff --git a/plugins/aps/src/main/res/values-ro-rRO/strings.xml b/plugins/aps/src/main/res/values-ro-rRO/strings.xml index 766efdb061..51754ad6c4 100644 --- a/plugins/aps/src/main/res/values-ro-rRO/strings.xml +++ b/plugins/aps/src/main/res/values-ro-rRO/strings.xml @@ -1,7 +1,5 @@ - Ajustează sensibilitatea și bazala - Dacă este activat DynISF utilizează ultimele 24h TDD/7zile TDD ca bază pentru ajustarea ISF calculat şi, de asemenea, pentru creşterea şi scăderea ratei bazale, în acelaşi mod în care face Autosens standard Factor de ajustare dinamic % Factorul de ajustare pentru DynamicISF. Setează mai mult de 100% pentru doze de corecție mai agresive și mai puțin de 100% pentru corecții mai puțin agresive. Ținte temporare mai mari cresc sensibilitatea diff --git a/plugins/aps/src/main/res/values-ru-rRU/strings.xml b/plugins/aps/src/main/res/values-ru-rRU/strings.xml index 87aad38b3f..9b405486f5 100644 --- a/plugins/aps/src/main/res/values-ru-rRU/strings.xml +++ b/plugins/aps/src/main/res/values-ru-rRU/strings.xml @@ -1,7 +1,7 @@ - Подстроить чувствительность и базал - При активации DynISF использует TDD за сутки/ TDD за неделю в качестве основы для корректировки ISF, а также для увеличения и снижения базы, таким же образом, как и стандартный Autosens + Включить коэффициент чувствительности на основе суточной дозировки инсулина TDD для изменения базальной скорости и целевых значений гликемии + Если эти опции включены, AAPS использует последние 24 часа TDD/7D TDD для расчета коэффициента чувствительности, на основе которого производится увеличение или снижение скорости базала, а также коррекция целевой гликемии, как и при работе Autosens. Рекомендуется начинать при выключенной опции Коэффициент регулировки динамического диапазона чувствительности ISF % Коэффициент корректировки динамического диапазона чувствительности ISF. Установите более 100% для агрессивных доз коррекции и менее 100% для менее агрессивной коррекции. Высокая ВЦ повышает чувствительность diff --git a/plugins/aps/src/main/res/values-tr-rTR/strings.xml b/plugins/aps/src/main/res/values-tr-rTR/strings.xml index e75073e001..a5846ec0bb 100644 --- a/plugins/aps/src/main/res/values-tr-rTR/strings.xml +++ b/plugins/aps/src/main/res/values-tr-rTR/strings.xml @@ -1,7 +1,7 @@ - Duyarlılığı ve bazalı ayarlayın - Etkinleştirilmişse DinİDF, standart Otoduyarlılığın yaptığı gibi hesaplanan İDF\'yi ayarlamak ve ayrıca bazal oranı artırmak ve azaltmak için temel olarak son 24 saatlik TGD/7G TGD\'yi kullanır. + Bazal ve glikoz hedefi değişikliği için TGD bazlı duyarlılık oranını etkinleştirin + Bazal oranı artırmak veya azaltmak için kullanılan duyarlılık oranını hesaplamak için son 24 saatlik TGD/7Gün TGD\'yi kullanır ve aynı zamanda bu seçenek etkinse Otoduyarlılığın yaptığı gibi glikoz hedefini ayarlar. Bu seçenek kapalıyken başlamanız önerilir DinamikİDF Ayar Faktörü % DinamikİDF için ayarlama faktörü. Daha agresif düzeltme dozları için %100\'den fazla ve daha az agresif düzeltmeler için %100\'den az ayarlayın. Yüksek geçici hedefler duyarlılığı artırır diff --git a/plugins/configuration/src/main/res/values-nb-rNO/strings.xml b/plugins/configuration/src/main/res/values-nb-rNO/strings.xml index 3a59233718..3f4dc58c55 100644 --- a/plugins/configuration/src/main/res/values-nb-rNO/strings.xml +++ b/plugins/configuration/src/main/res/values-nb-rNO/strings.xml @@ -46,7 +46,7 @@ RileyLink status: Lesestatus Datavalg - Innlesing av fabrikkinnstillinger + Send krasjrapporter automatisk Tillat automatisk rapportering av appkrasj og bruksdata til utviklerne via fabrioc.io-tjenesten. Denne e-postadressen vedlegges krasjrapporter slik at vi kan kontakte deg i akutte tilfeller. Det er valgfritt. Identifikasjon (e-post, Facebook eller Discord-nick osv.) diff --git a/plugins/constraints/src/main/res/values-ko-rKR/exam.xml b/plugins/constraints/src/main/res/values-ko-rKR/exam.xml index f8ea3675d3..c186cf8675 100644 --- a/plugins/constraints/src/main/res/values-ko-rKR/exam.xml +++ b/plugins/constraints/src/main/res/values-ko-rKR/exam.xml @@ -144,10 +144,10 @@ IC가 증가하면 계산된 탄소 흡수 시간이 길어집니다 IC가 증가하면 계산된 탄소 흡수 시간이 짧아집니다 IC의 증가가 계산된 탄수화물 흡수에 영향을 주지 않습니다 - 프로파일 백분율 변경이 COB 계싼에 어떤 영향을 미칩니까? - 프로파일을 150%로 설정하면 계산된 탄소 흡수 시간이 길어집니다 - 프로파일을 150%로 설정하면 계산된 탄소 흡수 시간이 짧아집니다 - 프로파일을 150%로 설정하면 계산된 탄소 흡수 시간이 길어집니다 + 프로파일 백분율 변경이 COB 계산에 어떤 영향을 미칩니까? + 프로파일을 150%로 설정하면 계산된 탄수화물 흡수 시간이 길어집니다 + 프로파일을 150%로 설정하면 계산된 탄수화물 흡수 시간이 짧아집니다 + 프로파일을 150%로 설정해도 탄수화물 흡수시간에 영향을 주지 않습니다. IOB 값은 실행된 임시 basal의 영향을 받습니다. 혈당이 목표보다 낮을 경우 높은 임시 basal은 실행되지 않습니다. 운동 없이도 음수의 IOB (마이너스 IOB) 구간이 많을 경우, 프로파일이 너무 강한 것이며 인슐린 양을 적게 설정해야 합니다. diff --git a/wear/src/main/res/values-ko-rKR/strings.xml b/wear/src/main/res/values-ko-rKR/strings.xml index 13ea7a0dab..50dddb0c7d 100644 --- a/wear/src/main/res/values-ko-rKR/strings.xml +++ b/wear/src/main/res/values-ko-rKR/strings.xml @@ -20,6 +20,11 @@ Bolus 주입시 진동 단위 U + 화면 + 그래프 + 인터페이스 + 기타 + Complication 날짜 표시 IOB 표시 IOB 자세히 표시하기 @@ -35,8 +40,12 @@ BGI 표시하기 화살표 표시 \'분전\' 표시 + TBR 표시하기 + Bolus & SMB 표시하기 + 격자 표시하기 어두움 Basal 강조 + 예측 표시하기 경계선 색상매칭 차트 기간 1시간