Merge branch 'dev' into rs-sync-warn

This commit is contained in:
Milos Kozak 2018-06-24 14:03:12 +02:00 committed by GitHub
commit c5841063a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 16 additions and 29 deletions

View file

@ -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 + "; "

View file

@ -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);

View file

@ -560,7 +560,6 @@
<string name="uploader_short">UPLD</string>
<string name="basal_short">БАЗА</string>
<string name="virtualpump_extendedbolus_label_short">УД.</string>
<string name="lock_screen">Заключен екран</string>
<string name="sensitivity_warning">Когато включите Autosense feature трябва да въвеждате ВСИЧКИ въглехидрати. В противен случай те ще се изчисляват грешно като повишена чувствителност!!</string>
<string name="sensitivityweightedaverage">чрез Среднопретеглената стойност</string>
<string name="mdtp_ok">OK</string>

View file

@ -525,7 +525,6 @@
<string name="hours">hodin</string>
<string name="invalidprofile">Chybný profil !!!</string>
<string name="iob">IOB</string>
<string name="lock_screen">Zámek obrazovky</string>
<string name="mdtp_cancel">Zrušit</string>
<string name="mdtp_ok">OK</string>
<string name="ns_alarmoptions">Nastavení alarmů</string>
@ -774,8 +773,6 @@
<string name="ro_lang">Rumunština</string>
<string name="zh_lang">Čínština</string>
<string name="resistantadult">Dospělý s nízkou citlivostí</string>
<string name="combopump">Accu-Chek Combo</string>
<string name="combopump_shortname">COMBO</string>
<string name="insight_keepalive_format_string">%d vyprší %s</string>
<string name="insight_keep_alive_status">Stav keep-alive</string>
<string name="statistics">Statistika</string>

View file

@ -403,7 +403,6 @@
<string name="invalidprofile">Ungültiges oder defektes Profil!</string>
<string name="iob">IOB</string>
<string name="localprofile">Lokales Profil</string>
<string name="lock_screen">Sperrbildschirm</string>
<string name="loopsuperbolusfor">Superbolus (%1$d Min.)</string>
<string name="loopsuspended">Loop pausiert</string>
<string name="loopsuspendedfor">Pausiert (%1$d Min.)</string>

View file

@ -558,7 +558,6 @@
<string name="uploader_short">UPLD</string>
<string name="basal_short">BAS</string>
<string name="virtualpump_extendedbolus_label_short">EXT</string>
<string name="lock_screen">Κλείδωμα οθόνης</string>
<string name="sensitivity_warning">Ενεργοποιώντας το autosense θυμιθείτε να εισάγετε όλους τους υδατ. Διαφορετικά, οι αποκλίσεις των υδατανθράκων θα εντοπιστούν λανθασμένα ως αλλαγή ευαισθησίας</string>
<string name="sensitivityweightedaverage">Σταθμισμένος μέσος όρος ευαισθησίας</string>
<string name="mdtp_ok">OK</string>

View file

@ -577,7 +577,6 @@
<string name="uploader_short">UPLD</string>
<string name="basal_short">BAS</string>
<string name="virtualpump_extendedbolus_label_short">EXT</string>
<string name="lock_screen">Bloqueo de pantalla</string>
<string name="sensitivity_warning">Al activar autosens recuerda editar todos carbohidratos comidos. Si no, sensibilidad será calculada incorrectamente !!!</string>
<string name="sensitivityweightedaverage">Sensitivity WeightedAverage</string>
<string name="mdtp_ok">OK</string>

View file

@ -556,7 +556,6 @@
<string name="uploader_short">UPLD</string>
<string name="basal_short">BAS</string>
<string name="virtualpump_extendedbolus_label_short">EXT</string>
<string name="lock_screen">Écran verrouillé</string>
<string name="sensitivity_warning">En activant la fonction Autosens, noubliez pas de rentrer tout les glucides consommés. Sinon les déviations de glucides seront incorrectement identifiées alors que la sensibilité change !!</string>
<string name="sensitivityweightedaverage">Sensibilité avec moyenne pondérée</string>
<string name="mdtp_ok">OK</string>

View file

@ -570,7 +570,6 @@
<string name="uploader_short">UPLD</string>
<string name="basal_short">BAS</string>
<string name="virtualpump_extendedbolus_label_short">EXT</string>
<string name="lock_screen">화면 잠금</string>
<string name="sensitivity_warning">Autosense 기능을 켜면 모든 섭취된 탄수화물양을 입력하십시오. 그렇지 않으면 탄수화물 편차(deviations)가 민감도 변화로 잘못 인식될것입니다!!</string>
<string name="sensitivityweightedaverage">민감도 가중평균</string>
<string name="mdtp_ok">OK</string>

View file

@ -202,7 +202,6 @@
<string name="language">Taal</string>
<string name="localprofile">Lokaal profiel</string>
<string name="localprofile_shortname">LP</string>
<string name="lock_screen">Vergrendel scherm</string>
<string name="loop">Loop</string>
<string name="loop_aps_label">APS</string>
<string name="loop_constraintsprocessed_label">Berekening met toepassing van limieten</string>

View file

@ -594,7 +594,6 @@
<string name="uploader_short">UPLD</string>
<string name="basal_short">BAS</string>
<string name="virtualpump_extendedbolus_label_short">EXT</string>
<string name="lock_screen">Zablokuj obraz</string>
<string name="sensitivity_warning">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 !!</string>
<string name="sensitivityweightedaverage">Wrażliwość ŚredniaWażona</string>
<string name="mdtp_ok">OK</string>

View file

@ -589,7 +589,6 @@
<string name="uploader_short">UPLD</string>
<string name="basal_short">BAZ</string>
<string name="virtualpump_extendedbolus_label_short">EXT</string>
<string name="lock_screen">Ecran blocare</string>
<string name="sensitivity_warning">Trebuie introduși toți carbo la pornirea Autosens. În caz contrar, acțiunea carbo va fi percepută ca schimbare a sensibilității!</string>
<string name="sensitivityweightedaverage">Mediană sensibilitate</string>
<string name="mdtp_ok">OK</string>

View file

@ -554,7 +554,6 @@
<string name="insulin_peak_time">время пика (в мин.)</string>
<string name="invalid">НЕВЕРНО</string>
<string name="invalidprofile">Неверный профиль !!!</string>
<string name="lock_screen">блокировка экрана</string>
<string name="mdtp_cancel">отмена</string>
<string name="mdtp_ok">OK</string>
<string name="nl_lang">Голландский</string>

View file

@ -538,7 +538,6 @@
<string name="edit_base_isf">Ändra grund-ISF:</string>
<string name="end_user_license_agreement_text">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.</string>
<string name="isfmissing">ISF saknas i profilen. Använder standardvärde.</string>
<string name="lock_screen">Lås skärm</string>
<string name="mmol">mmol/l</string>
<string name="minago" formatted="false">%d&#160;m</string>
<string name="mgdl">mg/dl</string>

View file

@ -685,8 +685,8 @@
<string name="uploader_short">UPLD</string>
<string name="basal_short">BAS</string>
<string name="virtualpump_extendedbolus_label_short">EXT</string>
<string name="lock_screen">Lock screen</string>
<string name="lock_screen_summary">Prevent Android to turn screen off. It will consume lot of energy when not plugged to power outlet.</string>
<string name="keep_screen_on_title">Keep screen on</string>
<string name="keep_screen_on_summary">Prevent Android to turn screen off. It will consume lot of energy when not plugged to power outlet.</string>
<string name="sensitivity_warning">By turning on Autosense feature remember to enter all eated carbs. Otherwise carbs deviations will be identified wrong as sensitivity change !!</string>
<string name="sensitivityweightedaverage">Sensitivity WeightedAverage</string>
<string name="mdtp_ok">OK</string>
@ -1176,6 +1176,7 @@
<string name="key_lockscreen" translatable="false">lockscreen</string>
<string name="largetimedifftitle">Large Time Difference</string>
<string name="largetimediff">Large time difference:\nTime in pump is off by more than 1.5 hours.\nPlease adjust the time manually on the pump and make sure that reading the history from the pump does not cause unexpected behaviour.\nIf possible, remove the history from the pump before changing the time or disable the closed loop for one DIA after the last wrong history entry but minimum one DIA from now.</string>
<string name="key_keep_screen_on" translatable="false">keep_screen_on</string>
<string name="careportal_removestartedevents">Clean AndroidAPS started</string>
<plurals name="objective_days">

View file

@ -6,9 +6,9 @@
<SwitchPreference
android:defaultValue="false"
android:key="@string/key_lockscreen"
android:title="@string/lock_screen"
android:summary="@string/lock_screen_summary"/>
android:key="@string/key_keep_screen_on"
android:title="@string/keep_screen_on_title"
android:summary="@string/keep_screen_on_summary"/>
<PreferenceScreen android:title="@string/overview_buttons_selection">