From 5f6a6dbbbc4e929748fa06ac654fc5074ddb0364 Mon Sep 17 00:00:00 2001 From: AdrianLxM Date: Fri, 22 Jun 2018 21:00:59 +0200 Subject: [PATCH 1/2] update determine-basal --- app/src/main/assets/OpenAPSSMB/determine-basal.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/assets/OpenAPSSMB/determine-basal.js b/app/src/main/assets/OpenAPSSMB/determine-basal.js index 84bd684cf6..c2db0f270b 100644 --- a/app/src/main/assets/OpenAPSSMB/determine-basal.js +++ b/app/src/main/assets/OpenAPSSMB/determine-basal.js @@ -406,8 +406,8 @@ var determine_basal = function determine_basal(glucose_status, currenttemp, iob_ } else { console.error("SMB disabled (no enableSMB preferences active)"); } - // enable UAM (if enabled in preferences) if SMB is enabled - var enableUAM=(profile.enableUAM && enableSMB); + // enable UAM (if enabled in preferences) + var enableUAM=(profile.enableUAM); //console.error(meal_data); @@ -942,10 +942,10 @@ var determine_basal = function determine_basal(glucose_status, currenttemp, iob_ var durationReq = round(60*worstCaseInsulinReq / profile.current_basal); if (durationReq < 0) { durationReq = 0; - // don't set a temp longer than 120 minutes + // don't set an SMB zero temp longer than 60 minutess } else { durationReq = round(durationReq/30)*30; - durationReq = Math.min(120,Math.max(0,durationReq)); + durationReq = Math.min(60,Math.max(0,durationReq)); } //console.error(durationReq); //rT.reason += "insulinReq " + insulinReq + "; " From a8d783874c03f5f6b38173026b9da490406f2eeb Mon Sep 17 00:00:00 2001 From: Johannes Mockenhaupt Date: Sun, 24 Jun 2018 11:45:25 +0200 Subject: [PATCH 2/2] Rename "Lock screen" -> "Keep screen on". --- .../info/nightscout/androidaps/MainActivity.java | 12 ++++++------ app/src/main/res/values-bg/strings.xml | 1 - app/src/main/res/values-cs/strings.xml | 3 --- app/src/main/res/values-de/strings.xml | 1 - app/src/main/res/values-el/strings.xml | 1 - app/src/main/res/values-es/strings.xml | 1 - app/src/main/res/values-fr/strings.xml | 1 - app/src/main/res/values-ko/strings.xml | 1 - app/src/main/res/values-nl/strings.xml | 1 - app/src/main/res/values-pl/strings.xml | 1 - app/src/main/res/values-ro/strings.xml | 1 - app/src/main/res/values-ru/strings.xml | 1 - app/src/main/res/values-sv/strings.xml | 1 - app/src/main/res/values/strings.xml | 6 +++--- app/src/main/res/xml/pref_overview.xml | 6 +++--- 15 files changed, 12 insertions(+), 26 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/MainActivity.java b/app/src/main/java/info/nightscout/androidaps/MainActivity.java index 9c0d68d778..ea8948abdd 100644 --- a/app/src/main/java/info/nightscout/androidaps/MainActivity.java +++ b/app/src/main/java/info/nightscout/androidaps/MainActivity.java @@ -88,7 +88,7 @@ public class MainActivity extends AppCompatActivity { actionBarDrawerToggle.syncState(); // initialize screen wake lock - onEventPreferenceChange(new EventPreferenceChange(R.string.key_lockscreen)); + onEventPreferenceChange(new EventPreferenceChange(R.string.key_keep_screen_on)); doMigrations(); @@ -157,10 +157,10 @@ public class MainActivity extends AppCompatActivity { @Subscribe public void onEventPreferenceChange(final EventPreferenceChange ev) { - if (ev.isChanged(R.string.key_lockscreen)) { - boolean lock = SP.getBoolean(R.string.key_lockscreen, false); + if (ev.isChanged(R.string.key_keep_screen_on)) { + boolean keepScreenOn = SP.getBoolean(R.string.key_keep_screen_on, false); final PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE); - if (lock) { + if (keepScreenOn) { mWakeLock = pm.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK, "AAPS"); if (!mWakeLock.isHeld()) mWakeLock.acquire(); @@ -187,8 +187,8 @@ public class MainActivity extends AppCompatActivity { } } - boolean lockScreen = BuildConfig.NSCLIENTOLNY && SP.getBoolean(R.string.key_lockscreen, false); - if (lockScreen) + boolean keepScreenOn = BuildConfig.NSCLIENTOLNY && SP.getBoolean(R.string.key_keep_screen_on, false); + if (keepScreenOn) getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); else getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); diff --git a/app/src/main/res/values-bg/strings.xml b/app/src/main/res/values-bg/strings.xml index aa9c5ca4ad..6e2e2c2261 100644 --- a/app/src/main/res/values-bg/strings.xml +++ b/app/src/main/res/values-bg/strings.xml @@ -560,7 +560,6 @@ UPLD БАЗА УД. - Заключен екран Когато включите Autosense feature трябва да въвеждате ВСИЧКИ въглехидрати. В противен случай те ще се изчисляват грешно като повишена чувствителност!! чрез Среднопретеглената стойност OK diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml index 8787438c6a..4467475051 100644 --- a/app/src/main/res/values-cs/strings.xml +++ b/app/src/main/res/values-cs/strings.xml @@ -525,7 +525,6 @@ hodin Chybný profil !!! IOB - Zámek obrazovky Zrušit OK Nastavení alarmů @@ -774,8 +773,6 @@ Rumunština Čínština Dospělý s nízkou citlivostí - Accu-Chek Combo - COMBO %d vyprší %s Stav keep-alive Statistika diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index cf87d3649f..417675e587 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -403,7 +403,6 @@ Ungültiges oder defektes Profil! IOB Lokales Profil - Sperrbildschirm Superbolus (%1$d Min.) Loop pausiert Pausiert (%1$d Min.) diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml index 3629df19aa..8d1c007e40 100644 --- a/app/src/main/res/values-el/strings.xml +++ b/app/src/main/res/values-el/strings.xml @@ -558,7 +558,6 @@ UPLD BAS EXT - Κλείδωμα οθόνης Ενεργοποιώντας το autosense θυμιθείτε να εισάγετε όλους τους υδατ. Διαφορετικά, οι αποκλίσεις των υδατανθράκων θα εντοπιστούν λανθασμένα ως αλλαγή ευαισθησίας Σταθμισμένος μέσος όρος ευαισθησίας OK diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 032b0c9ad9..7fca6a88df 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -577,7 +577,6 @@ UPLD BAS EXT - Bloqueo de pantalla Al activar autosens recuerda editar todos carbohidratos comidos. Si no, sensibilidad será calculada incorrectamente !!! Sensitivity WeightedAverage OK diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 6185f01b8f..ae9884ede7 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -556,7 +556,6 @@ UPLD BAS EXT - Écran verrouillé En activant la fonction Autosens, n’oubliez pas de rentrer tout les glucides consommés. Sinon les déviations de glucides seront incorrectement identifiées alors que la sensibilité change !! Sensibilité avec moyenne pondérée OK diff --git a/app/src/main/res/values-ko/strings.xml b/app/src/main/res/values-ko/strings.xml index eb8df19fb6..71c4c59087 100644 --- a/app/src/main/res/values-ko/strings.xml +++ b/app/src/main/res/values-ko/strings.xml @@ -570,7 +570,6 @@ UPLD BAS EXT - 화면 잠금 Autosense 기능을 켜면 모든 섭취된 탄수화물양을 입력하십시오. 그렇지 않으면 탄수화물 편차(deviations)가 민감도 변화로 잘못 인식될것입니다!! 민감도 가중평균 OK diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml index 24043aa080..2b64c7e16a 100644 --- a/app/src/main/res/values-nl/strings.xml +++ b/app/src/main/res/values-nl/strings.xml @@ -202,7 +202,6 @@ Taal Lokaal profiel LP - Vergrendel scherm Loop APS Berekening met toepassing van limieten diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml index f16db85809..c213e2c1a6 100644 --- a/app/src/main/res/values-pl/strings.xml +++ b/app/src/main/res/values-pl/strings.xml @@ -594,7 +594,6 @@ UPLD BAS EXT - Zablokuj obraz Przy włączonej funkcji Autosens pamiętaj, żeby wprowadzać wszystkie węglowodany. W innym wypadku odchylenia węglowodanów będą błędnie identyfikowane jako zmiany wrażliwości !! Wrażliwość ŚredniaWażona OK diff --git a/app/src/main/res/values-ro/strings.xml b/app/src/main/res/values-ro/strings.xml index 94acd4df08..f50e2bb919 100644 --- a/app/src/main/res/values-ro/strings.xml +++ b/app/src/main/res/values-ro/strings.xml @@ -589,7 +589,6 @@ UPLD BAZ EXT - Ecran blocare Trebuie introduși toți carbo la pornirea Autosens. În caz contrar, acțiunea carbo va fi percepută ca schimbare a sensibilității! Mediană sensibilitate OK diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 6bd26be624..4951687c76 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -554,7 +554,6 @@ время пика (в мин.) НЕВЕРНО Неверный профиль !!! - блокировка экрана отмена OK Голландский diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 509c292023..79f99310c1 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -538,7 +538,6 @@ Ändra grund-ISF: MUST NOT BE USED TO MAKE MEDICAL DECISIONS. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. ISF saknas i profilen. Använder standardvärde. - Lås skärm mmol/l %d m mg/dl diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 40bde1c0de..fcf93fa75d 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -685,8 +685,8 @@ UPLD BAS EXT - Lock screen - Prevent Android to turn screen off. It will consume lot of energy when not plugged to power outlet. + Keep screen on + Prevent Android to turn screen off. It will consume lot of energy when not plugged to power outlet. By turning on Autosense feature remember to enter all eated carbs. Otherwise carbs deviations will be identified wrong as sensitivity change !! Sensitivity WeightedAverage OK @@ -1171,7 +1171,7 @@ Invalid pump setup, check the docs and verify that the Quick Info menu is named "QUICK INFO" using the 360 configuration software. Custom - lockscreen + keep_screen_on Clean AndroidAPS started diff --git a/app/src/main/res/xml/pref_overview.xml b/app/src/main/res/xml/pref_overview.xml index 4076b2f2df..5ea72547b7 100644 --- a/app/src/main/res/xml/pref_overview.xml +++ b/app/src/main/res/xml/pref_overview.xml @@ -6,9 +6,9 @@ + android:key="@string/key_keep_screen_on" + android:title="@string/keep_screen_on_title" + android:summary="@string/keep_screen_on_summary"/>