diff --git a/app/build.gradle b/app/build.gradle
index b26de46f91..f4f4ca7add 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -10,6 +10,9 @@ buildscript {
}
}
apply plugin: "com.android.application"
+apply plugin: 'kotlin-android-extensions'
+apply plugin: 'kotlin-android'
+apply plugin: 'com.google.gms.google-services'
apply plugin: "io.fabric"
apply plugin: "jacoco-android"
apply plugin: 'com.jakewharton.butterknife'
@@ -26,6 +29,7 @@ ext {
repositories {
maven { url 'https://maven.fabric.io/public' }
jcenter { url "https://jcenter.bintray.com/" }
+ mavenCentral()
}
def generateGitBuild = { ->
@@ -44,6 +48,22 @@ def generateGitBuild = { ->
return stringBuilder.toString()
}
+def generateGitRemote = { ->
+ StringBuilder stringBuilder = new StringBuilder();
+ try {
+ def stdout = new ByteArrayOutputStream()
+ exec {
+ commandLine 'git', 'remote', 'get-url', 'origin'
+ standardOutput = stdout
+ }
+ String commitObject = stdout.toString().trim()
+ stringBuilder.append(commitObject)
+ } catch (ignored) {
+ stringBuilder.append('NoGitSystemAvailable')
+ }
+ return stringBuilder.toString()
+}
+
def generateDate = { ->
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append((new Date()).format('yyyy.MM.dd-HH:mm'))
@@ -63,9 +83,10 @@ android {
targetSdkVersion 25
multiDexEnabled true
versionCode 1500
- version "2.2.2"
+ version "2.3"
buildConfigField "String", "VERSION", '"' + version + '"'
buildConfigField "String", "BUILDVERSION", '"' + generateGitBuild() + '-' + generateDate() + '"'
+ buildConfigField "String", "REMOTE", '"' + generateGitRemote()+ '"'
buildConfigField "String", "HEAD", '"' + generateGitBuild() + '"'
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
// if you change minSdkVersion to less than 11, you need to change executeTask for wear
@@ -74,6 +95,9 @@ android {
moduleName "BleCommandUtil"
}
}
+ kotlinOptions {
+ jvmTarget = '1.8'
+ }
lintOptions {
// TODO remove once wear dependency com.google.android.gms:play-services-wearable:7.3.0
// has been upgraded (requiring significant code changes), which currently fails release
@@ -167,12 +191,11 @@ dependencies {
wearApp project(':wear')
implementation fileTree(include: ['*.jar'], dir: 'libs')
+ implementation 'com.google.android.gms:play-services-wearable:16.0.1'
+ implementation 'com.google.firebase:firebase-core:16.0.8'
implementation("com.crashlytics.sdk.android:crashlytics:2.9.9@aar") {
transitive = true;
}
- implementation("com.crashlytics.sdk.android:answers:1.4.7@aar") {
- transitive = true;
- }
libs "MilosKozak:danars-support-lib:master@zip"
implementation "com.android.support:appcompat-v7:${supportLibraryVersion}"
@@ -192,11 +215,11 @@ dependencies {
}
implementation "org.apache.commons:commons-lang3:3.7"
implementation "org.slf4j:slf4j-api:1.7.21"
+ // Graphview cannot be upgraded
implementation "com.jjoe64:graphview:4.0.1"
implementation "com.joanzapata.iconify:android-iconify-fontawesome:2.1.1"
- implementation 'com.google.android.gms:play-services-wearable:10.2.1'
+ implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation(name: "android-edittext-validator-v1.3.4-mod", ext: "aar")
- implementation(name: "sightparser-release", ext: "aar")
implementation 'com.madgag.spongycastle:core:1.58.0.0'
implementation("com.google.android:flexbox:0.3.0") {
@@ -232,6 +255,7 @@ dependencies {
androidTestImplementation "org.mockito:mockito-core:2.8.47"
androidTestImplementation "com.google.dexmaker:dexmaker:${dexmakerVersion}"
androidTestImplementation "com.google.dexmaker:dexmaker-mockito:${dexmakerVersion}"
+ implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
task unzip(type: Copy) {
diff --git a/app/google-services.json b/app/google-services.json
new file mode 100644
index 0000000000..42db6f4289
--- /dev/null
+++ b/app/google-services.json
@@ -0,0 +1,107 @@
+{
+ "project_info": {
+ "project_number": "477603612366",
+ "firebase_url": "https://androidaps-c34f8.firebaseio.com",
+ "project_id": "androidaps-c34f8",
+ "storage_bucket": "androidaps-c34f8.appspot.com"
+ },
+ "client": [
+ {
+ "client_info": {
+ "mobilesdk_app_id": "1:477603612366:android:aef229914e3e5448",
+ "android_client_info": {
+ "package_name": "info.nightscout.aapspumpcontrol"
+ }
+ },
+ "oauth_client": [],
+ "api_key": [
+ {
+ "current_key": "AIzaSyDcZpDRMaGjdhihXp531cVYM6LkEL8KbgM"
+ }
+ ],
+ "services": {
+ "appinvite_service": {
+ "other_platform_oauth_client": [
+ {
+ "client_id": "477603612366-a925drvlvs7qn7gt73r585erbqto8c79.apps.googleusercontent.com",
+ "client_type": 3
+ }
+ ]
+ }
+ }
+ },
+ {
+ "client_info": {
+ "mobilesdk_app_id": "1:477603612366:android:efc956f55b281623",
+ "android_client_info": {
+ "package_name": "info.nightscout.androidaps"
+ }
+ },
+ "oauth_client": [],
+ "api_key": [
+ {
+ "current_key": "AIzaSyDcZpDRMaGjdhihXp531cVYM6LkEL8KbgM"
+ }
+ ],
+ "services": {
+ "appinvite_service": {
+ "other_platform_oauth_client": [
+ {
+ "client_id": "477603612366-a925drvlvs7qn7gt73r585erbqto8c79.apps.googleusercontent.com",
+ "client_type": 3
+ }
+ ]
+ }
+ }
+ },
+ {
+ "client_info": {
+ "mobilesdk_app_id": "1:477603612366:android:b38d6e7351f73cc0",
+ "android_client_info": {
+ "package_name": "info.nightscout.nsclient"
+ }
+ },
+ "oauth_client": [],
+ "api_key": [
+ {
+ "current_key": "AIzaSyDcZpDRMaGjdhihXp531cVYM6LkEL8KbgM"
+ }
+ ],
+ "services": {
+ "appinvite_service": {
+ "other_platform_oauth_client": [
+ {
+ "client_id": "477603612366-a925drvlvs7qn7gt73r585erbqto8c79.apps.googleusercontent.com",
+ "client_type": 3
+ }
+ ]
+ }
+ }
+ },
+ {
+ "client_info": {
+ "mobilesdk_app_id": "1:477603612366:android:2dc8cf3acd3332e7",
+ "android_client_info": {
+ "package_name": "info.nightscout.nsclient2"
+ }
+ },
+ "oauth_client": [],
+ "api_key": [
+ {
+ "current_key": "AIzaSyDcZpDRMaGjdhihXp531cVYM6LkEL8KbgM"
+ }
+ ],
+ "services": {
+ "appinvite_service": {
+ "other_platform_oauth_client": [
+ {
+ "client_id": "477603612366-a925drvlvs7qn7gt73r585erbqto8c79.apps.googleusercontent.com",
+ "client_type": 3
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "configuration_version": "1"
+}
\ No newline at end of file
diff --git a/app/libs/sightparser-release.aar b/app/libs/sightparser-release.aar
deleted file mode 100644
index 1f0c16ee34..0000000000
Binary files a/app/libs/sightparser-release.aar and /dev/null differ
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index dc9201d86c..3eaa81ba45 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -38,6 +38,7 @@
+
@@ -46,10 +47,10 @@
@@ -72,30 +73,40 @@
+
+ android:name=".receivers.DataReceiver"
+ android:enabled="true"
+ android:exported="true">
-
-
-
-
+
-
+
-
+
-
-
-
+
+
+
-
+
-
+
+
+
+
+
+
+
+
+
@@ -175,57 +186,57 @@
+ android:pathPrefix="/nightscout_watch_data"
+ android:scheme="wear" />
+ android:pathPrefix="/nightscout_watch_data_resend"
+ android:scheme="wear" />
+ android:pathPrefix="/nightscout_watch_cancel_bolus"
+ android:scheme="wear" />
+ android:pathPrefix="/nightscout_watch_confirmactionstring"
+ android:scheme="wear" />
+ android:pathPrefix="/nightscout_watch_initiateactionstring"
+ android:scheme="wear" />
+ android:pathPrefix="/openwearsettings"
+ android:scheme="wear" />
+ android:pathPrefix="/sendstatustowear"
+ android:scheme="wear" />
+ android:pathPrefix="/sendpreferencestowear"
+ android:scheme="wear" />
+ android:pathPrefix="/nightscout_watch_basal"
+ android:scheme="wear" />
+ android:pathPrefix="/nightscout_watch_bolusprogress"
+ android:scheme="wear" />
+ android:pathPrefix="/nightscout_watch_actionconfirmationrequest"
+ android:scheme="wear" />
+ android:pathPrefix="/nightscout_watch_changeconfirmationrequest"
+ android:scheme="wear" />
+ android:pathPrefix="/nightscout_watch_cancelnotificationrequest"
+ android:scheme="wear" />
-
+
+ android:label="@string/insight_pairing"
+ android:theme="@style/AppTheme" />
+ android:label="@string/pairing_information"
+ android:theme="@style/AppTheme" />
diff --git a/app/src/main/java/info/nightscout/androidaps/MainActivity.java b/app/src/main/java/info/nightscout/androidaps/MainActivity.java
index ad4a28c1f3..6779b0a467 100644
--- a/app/src/main/java/info/nightscout/androidaps/MainActivity.java
+++ b/app/src/main/java/info/nightscout/androidaps/MainActivity.java
@@ -48,17 +48,20 @@ import info.nightscout.androidaps.events.EventFeatureRunning;
import info.nightscout.androidaps.events.EventPreferenceChange;
import info.nightscout.androidaps.events.EventRefreshGui;
import info.nightscout.androidaps.interfaces.PluginBase;
+import info.nightscout.androidaps.interfaces.PluginType;
import info.nightscout.androidaps.logging.L;
+import info.nightscout.androidaps.plugins.aps.loop.LoopPlugin;
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
import info.nightscout.androidaps.plugins.general.nsclient.data.NSSettingsStatus;
+import info.nightscout.androidaps.plugins.general.versionChecker.VersionCheckerUtilsKt;
import info.nightscout.androidaps.setupwizard.SetupWizardActivity;
import info.nightscout.androidaps.tabs.TabPageAdapter;
import info.nightscout.androidaps.utils.AndroidPermission;
+import info.nightscout.androidaps.utils.FabricPrivacy;
import info.nightscout.androidaps.utils.LocaleHelper;
import info.nightscout.androidaps.utils.OKDialog;
import info.nightscout.androidaps.utils.PasswordProtection;
import info.nightscout.androidaps.utils.SP;
-import info.nightscout.androidaps.utils.VersionChecker;
public class MainActivity extends AppCompatActivity {
private static Logger log = LoggerFactory.getLogger(L.CORE);
@@ -114,7 +117,12 @@ public class MainActivity extends AppCompatActivity {
public void onPageScrollStateChanged(int state) {
}
});
- VersionChecker.check();
+
+ //Check here if loop plugin is disabled. Else check via constraints
+ if (!LoopPlugin.getPlugin().isEnabled(PluginType.LOOP))
+ VersionCheckerUtilsKt.triggerCheckVersion();
+
+ FabricPrivacy.setUserStats();
}
private void checkPluginPreferences(ViewPager viewPager) {
@@ -170,7 +178,7 @@ public class MainActivity extends AppCompatActivity {
boolean keepScreenOn = SP.getBoolean(R.string.key_keep_screen_on, false);
final PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
if (keepScreenOn) {
- mWakeLock = pm.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK, "AAPS");
+ mWakeLock = pm.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK, "AndroidAPS:MainActivity_onEventPreferenceChange");
if (!mWakeLock.isHeld())
mWakeLock.acquire();
} else {
diff --git a/app/src/main/java/info/nightscout/androidaps/MainApp.java b/app/src/main/java/info/nightscout/androidaps/MainApp.java
index eca527543c..3259483033 100644
--- a/app/src/main/java/info/nightscout/androidaps/MainApp.java
+++ b/app/src/main/java/info/nightscout/androidaps/MainApp.java
@@ -9,7 +9,7 @@ import android.support.annotation.PluralsRes;
import android.support.v4.content.LocalBroadcastManager;
import com.crashlytics.android.Crashlytics;
-import com.crashlytics.android.answers.Answers;
+import com.google.firebase.analytics.FirebaseAnalytics;
import com.j256.ormlite.android.apptools.OpenHelperManager;
import com.squareup.otto.Bus;
import com.squareup.otto.LoggingBus;
@@ -50,6 +50,7 @@ import info.nightscout.androidaps.plugins.general.nsclient.receivers.DBAccessRec
import info.nightscout.androidaps.plugins.general.overview.OverviewPlugin;
import info.nightscout.androidaps.plugins.general.persistentNotification.PersistentNotificationPlugin;
import info.nightscout.androidaps.plugins.general.smsCommunicator.SmsCommunicatorPlugin;
+import info.nightscout.androidaps.plugins.general.versionChecker.VersionCheckerPlugin;
import info.nightscout.androidaps.plugins.general.wear.WearPlugin;
import info.nightscout.androidaps.plugins.general.xdripStatusline.StatuslinePlugin;
import info.nightscout.androidaps.plugins.insulin.InsulinOrefFreePeakPlugin;
@@ -88,6 +89,8 @@ import info.nightscout.androidaps.services.Intents;
import info.nightscout.androidaps.utils.FabricPrivacy;
import io.fabric.sdk.android.Fabric;
+import static info.nightscout.androidaps.plugins.general.versionChecker.VersionCheckerUtilsKt.triggerCheckVersion;
+
public class MainApp extends Application {
private static Logger log = LoggerFactory.getLogger(L.CORE);
@@ -97,6 +100,8 @@ public class MainApp extends Application {
private static MainApp sInstance;
public static Resources sResources;
+ private static FirebaseAnalytics mFirebaseAnalytics;
+
private static DatabaseHelper sDatabaseHelper = null;
private static ConstraintChecker sConstraintsChecker = null;
@@ -117,23 +122,24 @@ public class MainApp extends Application {
log.debug("onCreate");
sInstance = this;
sResources = getResources();
- sConstraintsChecker = new ConstraintChecker(this);
+ sConstraintsChecker = new ConstraintChecker();
sDatabaseHelper = OpenHelperManager.getHelper(sInstance, DatabaseHelper.class);
try {
if (FabricPrivacy.fabricEnabled()) {
Fabric.with(this, new Crashlytics());
- Fabric.with(this, new Answers());
- Crashlytics.setString("BUILDVERSION", BuildConfig.BUILDVERSION);
}
} catch (Exception e) {
log.error("Error with Fabric init! " + e);
}
+ mFirebaseAnalytics = FirebaseAnalytics.getInstance(this);
+
JodaTimeAndroid.init(this);
log.info("Version: " + BuildConfig.VERSION_NAME);
log.info("BuildVersion: " + BuildConfig.BUILDVERSION);
+ log.info("Remote: " + BuildConfig.REMOTE);
String extFilesDir = LoggerUtils.getLogDirectory();
File engineeringModeSemaphore = new File(extFilesDir, "engineering_mode");
@@ -145,6 +151,9 @@ public class MainApp extends Application {
registerLocalBroadcastReceiver();
+ //trigger here to see the new version on app start after an update
+ triggerCheckVersion();
+
if (pluginsList == null) {
pluginsList = new ArrayList<>();
// Register all tabs in app here
@@ -176,6 +185,7 @@ public class MainApp extends Application {
if (Config.OTHERPROFILES) pluginsList.add(LocalProfilePlugin.getPlugin());
pluginsList.add(TreatmentsPlugin.getPlugin());
if (Config.SAFETY) pluginsList.add(SafetyPlugin.getPlugin());
+ if (Config.SAFETY) pluginsList.add(VersionCheckerPlugin.INSTANCE);
if (Config.SAFETY) pluginsList.add(StorageConstraintPlugin.getPlugin());
if (Config.APS) pluginsList.add(ObjectivesPlugin.getPlugin());
pluginsList.add(SourceXdripPlugin.getPlugin());
@@ -307,6 +317,10 @@ public class MainApp extends Application {
}
}
+ public static FirebaseAnalytics getFirebaseAnalytics() {
+ return mFirebaseAnalytics;
+ }
+
public static ConstraintChecker getConstraintChecker() {
return sConstraintsChecker;
}
diff --git a/app/src/main/java/info/nightscout/androidaps/data/ConstraintChecker.java b/app/src/main/java/info/nightscout/androidaps/data/ConstraintChecker.java
index 68664033d0..b1267e81bc 100644
--- a/app/src/main/java/info/nightscout/androidaps/data/ConstraintChecker.java
+++ b/app/src/main/java/info/nightscout/androidaps/data/ConstraintChecker.java
@@ -1,7 +1,11 @@
package info.nightscout.androidaps.data;
+import android.support.annotation.NonNull;
+
import java.util.ArrayList;
+import javax.annotation.Nonnull;
+
import info.nightscout.androidaps.Constants;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.interfaces.Constraint;
@@ -15,13 +19,6 @@ import info.nightscout.androidaps.interfaces.PluginType;
public class ConstraintChecker implements ConstraintsInterface {
- private MainApp mainApp;
-
- public ConstraintChecker(MainApp mainApp) {
- this.mainApp = mainApp;
- }
-
-
public Constraint isLoopInvokationAllowed() {
return isLoopInvocationAllowed(new Constraint<>(true));
}
@@ -79,9 +76,9 @@ public class ConstraintChecker implements ConstraintsInterface {
}
@Override
- public Constraint isLoopInvocationAllowed(Constraint value) {
+ public Constraint isLoopInvocationAllowed(@NonNull Constraint value) {
- ArrayList constraintsPlugins = mainApp.getSpecificPluginsListByInterface(ConstraintsInterface.class);
+ ArrayList constraintsPlugins = MainApp.getSpecificPluginsListByInterface(ConstraintsInterface.class);
for (PluginBase p : constraintsPlugins) {
ConstraintsInterface constraint = (ConstraintsInterface) p;
if (!p.isEnabled(PluginType.CONSTRAINTS)) continue;
@@ -91,9 +88,9 @@ public class ConstraintChecker implements ConstraintsInterface {
}
@Override
- public Constraint isClosedLoopAllowed(Constraint value) {
+ public Constraint isClosedLoopAllowed(@NonNull Constraint value) {
- ArrayList constraintsPlugins = mainApp.getSpecificPluginsListByInterface(ConstraintsInterface.class);
+ ArrayList constraintsPlugins = MainApp.getSpecificPluginsListByInterface(ConstraintsInterface.class);
for (PluginBase p : constraintsPlugins) {
ConstraintsInterface constraint = (ConstraintsInterface) p;
if (!p.isEnabled(PluginType.CONSTRAINTS)) continue;
@@ -103,9 +100,9 @@ public class ConstraintChecker implements ConstraintsInterface {
}
@Override
- public Constraint isAutosensModeEnabled(Constraint value) {
+ public Constraint isAutosensModeEnabled(@NonNull Constraint value) {
- ArrayList constraintsPlugins = mainApp.getSpecificPluginsListByInterface(ConstraintsInterface.class);
+ ArrayList constraintsPlugins = MainApp.getSpecificPluginsListByInterface(ConstraintsInterface.class);
for (PluginBase p : constraintsPlugins) {
ConstraintsInterface constraint = (ConstraintsInterface) p;
if (!p.isEnabled(PluginType.CONSTRAINTS)) continue;
@@ -115,9 +112,9 @@ public class ConstraintChecker implements ConstraintsInterface {
}
@Override
- public Constraint isAMAModeEnabled(Constraint value) {
+ public Constraint isAMAModeEnabled(@NonNull Constraint value) {
- ArrayList constraintsPlugins = mainApp.getSpecificPluginsListByInterface(ConstraintsInterface.class);
+ ArrayList constraintsPlugins = MainApp.getSpecificPluginsListByInterface(ConstraintsInterface.class);
for (PluginBase p : constraintsPlugins) {
ConstraintsInterface constrain = (ConstraintsInterface) p;
if (!p.isEnabled(PluginType.CONSTRAINTS)) continue;
@@ -127,9 +124,9 @@ public class ConstraintChecker implements ConstraintsInterface {
}
@Override
- public Constraint isSMBModeEnabled(Constraint value) {
+ public Constraint isSMBModeEnabled(@NonNull Constraint value) {
- ArrayList constraintsPlugins = mainApp.getSpecificPluginsListByInterface(ConstraintsInterface.class);
+ ArrayList constraintsPlugins = MainApp.getSpecificPluginsListByInterface(ConstraintsInterface.class);
for (PluginBase p : constraintsPlugins) {
ConstraintsInterface constraint = (ConstraintsInterface) p;
if (!p.isEnabled(PluginType.CONSTRAINTS)) continue;
@@ -139,9 +136,9 @@ public class ConstraintChecker implements ConstraintsInterface {
}
@Override
- public Constraint isUAMEnabled(Constraint value) {
+ public Constraint isUAMEnabled(@NonNull Constraint value) {
- ArrayList constraintsPlugins = mainApp.getSpecificPluginsListByInterface(ConstraintsInterface.class);
+ ArrayList constraintsPlugins = MainApp.getSpecificPluginsListByInterface(ConstraintsInterface.class);
for (PluginBase p : constraintsPlugins) {
ConstraintsInterface constraint = (ConstraintsInterface) p;
if (!p.isEnabled(PluginType.CONSTRAINTS)) continue;
@@ -151,8 +148,8 @@ public class ConstraintChecker implements ConstraintsInterface {
}
@Override
- public Constraint isAdvancedFilteringEnabled(Constraint value) {
- ArrayList constraintsPlugins = mainApp.getSpecificPluginsListByInterface(ConstraintsInterface.class);
+ public Constraint isAdvancedFilteringEnabled(@NonNull Constraint value) {
+ ArrayList constraintsPlugins = MainApp.getSpecificPluginsListByInterface(ConstraintsInterface.class);
for (PluginBase p : constraintsPlugins) {
ConstraintsInterface constraint = (ConstraintsInterface) p;
if (!p.isEnabled(PluginType.CONSTRAINTS)) continue;
@@ -162,8 +159,8 @@ public class ConstraintChecker implements ConstraintsInterface {
}
@Override
- public Constraint isSuperBolusEnabled(Constraint value) {
- ArrayList constraintsPlugins = mainApp.getSpecificPluginsListByInterface(ConstraintsInterface.class);
+ public Constraint isSuperBolusEnabled(@NonNull Constraint value) {
+ ArrayList constraintsPlugins = MainApp.getSpecificPluginsListByInterface(ConstraintsInterface.class);
for (PluginBase p : constraintsPlugins) {
ConstraintsInterface constraint = (ConstraintsInterface) p;
if (!p.isEnabled(PluginType.CONSTRAINTS)) continue;
@@ -173,8 +170,8 @@ public class ConstraintChecker implements ConstraintsInterface {
}
@Override
- public Constraint applyBasalConstraints(Constraint absoluteRate, Profile profile) {
- ArrayList constraintsPlugins = mainApp.getSpecificPluginsListByInterface(ConstraintsInterface.class);
+ public Constraint applyBasalConstraints(@NonNull Constraint absoluteRate, Profile profile) {
+ ArrayList constraintsPlugins = MainApp.getSpecificPluginsListByInterface(ConstraintsInterface.class);
for (PluginBase p : constraintsPlugins) {
ConstraintsInterface constraint = (ConstraintsInterface) p;
if (!p.isEnabled(PluginType.CONSTRAINTS)) continue;
@@ -184,8 +181,8 @@ public class ConstraintChecker implements ConstraintsInterface {
}
@Override
- public Constraint applyBasalPercentConstraints(Constraint percentRate, Profile profile) {
- ArrayList constraintsPlugins = mainApp.getSpecificPluginsListByInterface(ConstraintsInterface.class);
+ public Constraint applyBasalPercentConstraints(@NonNull Constraint percentRate, Profile profile) {
+ ArrayList constraintsPlugins = MainApp.getSpecificPluginsListByInterface(ConstraintsInterface.class);
for (PluginBase p : constraintsPlugins) {
ConstraintsInterface constrain = (ConstraintsInterface) p;
if (!p.isEnabled(PluginType.CONSTRAINTS)) continue;
@@ -195,8 +192,8 @@ public class ConstraintChecker implements ConstraintsInterface {
}
@Override
- public Constraint applyBolusConstraints(Constraint insulin) {
- ArrayList constraintsPlugins = mainApp.getSpecificPluginsListByInterface(ConstraintsInterface.class);
+ public Constraint applyBolusConstraints(@NonNull Constraint insulin) {
+ ArrayList constraintsPlugins = MainApp.getSpecificPluginsListByInterface(ConstraintsInterface.class);
for (PluginBase p : constraintsPlugins) {
ConstraintsInterface constrain = (ConstraintsInterface) p;
if (!p.isEnabled(PluginType.CONSTRAINTS)) continue;
@@ -206,8 +203,8 @@ public class ConstraintChecker implements ConstraintsInterface {
}
@Override
- public Constraint applyExtendedBolusConstraints(Constraint insulin) {
- ArrayList constraintsPlugins = mainApp.getSpecificPluginsListByInterface(ConstraintsInterface.class);
+ public Constraint applyExtendedBolusConstraints(@NonNull Constraint insulin) {
+ ArrayList constraintsPlugins = MainApp.getSpecificPluginsListByInterface(ConstraintsInterface.class);
for (PluginBase p : constraintsPlugins) {
ConstraintsInterface constrain = (ConstraintsInterface) p;
if (!p.isEnabled(PluginType.CONSTRAINTS)) continue;
@@ -217,8 +214,8 @@ public class ConstraintChecker implements ConstraintsInterface {
}
@Override
- public Constraint applyCarbsConstraints(Constraint carbs) {
- ArrayList constraintsPlugins = mainApp.getSpecificPluginsListByInterface(ConstraintsInterface.class);
+ public Constraint applyCarbsConstraints(@NonNull Constraint carbs) {
+ ArrayList constraintsPlugins = MainApp.getSpecificPluginsListByInterface(ConstraintsInterface.class);
for (PluginBase p : constraintsPlugins) {
ConstraintsInterface constrain = (ConstraintsInterface) p;
if (!p.isEnabled(PluginType.CONSTRAINTS)) continue;
@@ -228,8 +225,8 @@ public class ConstraintChecker implements ConstraintsInterface {
}
@Override
- public Constraint applyMaxIOBConstraints(Constraint maxIob) {
- ArrayList constraintsPlugins = mainApp.getSpecificPluginsListByInterface(ConstraintsInterface.class);
+ public Constraint applyMaxIOBConstraints(@NonNull Constraint maxIob) {
+ ArrayList constraintsPlugins = MainApp.getSpecificPluginsListByInterface(ConstraintsInterface.class);
for (PluginBase p : constraintsPlugins) {
ConstraintsInterface constrain = (ConstraintsInterface) p;
if (!p.isEnabled(PluginType.CONSTRAINTS)) continue;
diff --git a/app/src/main/java/info/nightscout/androidaps/data/GlucoseStatus.java b/app/src/main/java/info/nightscout/androidaps/data/GlucoseStatus.java
deleted file mode 100644
index d7895e518a..0000000000
--- a/app/src/main/java/info/nightscout/androidaps/data/GlucoseStatus.java
+++ /dev/null
@@ -1,166 +0,0 @@
-package info.nightscout.androidaps.data;
-
-import android.support.annotation.Nullable;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import info.nightscout.androidaps.MainApp;
-import info.nightscout.androidaps.R;
-import info.nightscout.androidaps.db.BgReading;
-import info.nightscout.androidaps.plugins.iob.iobCobCalculator.IobCobCalculatorPlugin;
-import info.nightscout.androidaps.utils.DateUtil;
-import info.nightscout.androidaps.utils.DecimalFormatter;
-import info.nightscout.androidaps.utils.Round;
-
-/**
- * Created by mike on 04.01.2017.
- */
-
-public class GlucoseStatus {
- private static Logger log = LoggerFactory.getLogger(GlucoseStatus.class);
- public double glucose = 0d;
- public double delta = 0d;
- public double avgdelta = 0d;
- public double short_avgdelta = 0d;
- public double long_avgdelta = 0d;
- public long date = 0L;
-
-
- @Override
- public String toString() {
- return MainApp.gs(R.string.glucose) + " " + DecimalFormatter.to0Decimal(glucose) + " mg/dl\n" +
- MainApp.gs(R.string.delta) + " " + DecimalFormatter.to0Decimal(delta) + " mg/dl\n" +
- MainApp.gs(R.string.short_avgdelta) + " " + DecimalFormatter.to2Decimal(short_avgdelta) + " mg/dl\n" +
- MainApp.gs(R.string.long_avgdelta) + " " + DecimalFormatter.to2Decimal(long_avgdelta) + " mg/dl";
- }
-
- public GlucoseStatus() {
- }
-
- public GlucoseStatus round() {
- this.glucose = Round.roundTo(this.glucose, 0.1);
- this.delta = Round.roundTo(this.delta, 0.01);
- this.avgdelta = Round.roundTo(this.avgdelta, 0.01);
- this.short_avgdelta = Round.roundTo(this.short_avgdelta, 0.01);
- this.long_avgdelta = Round.roundTo(this.long_avgdelta, 0.01);
- return this;
- }
-
-
- @Nullable
- public static GlucoseStatus getGlucoseStatusData() {
- return getGlucoseStatusData(false);
- }
-
- @Nullable
- public static GlucoseStatus getGlucoseStatusData(boolean allowOldData) {
- // load 45min
- //long fromtime = DateUtil.now() - 60 * 1000L * 45;
- //List data = MainApp.getDbHelper().getBgreadingsDataFromTime(fromtime, false);
-
- List data = IobCobCalculatorPlugin.getPlugin().getBgReadings();
-
- if (data == null)
- return null;
-
- int sizeRecords = data.size();
- if (sizeRecords == 0) {
- return null;
- }
-
- if (data.get(0).date < DateUtil.now() - 7 * 60 * 1000L && !allowOldData) {
- return null;
- }
-
- BgReading now = data.get(0);
- long now_date = now.date;
- double change;
-
- if (sizeRecords == 1) {
- GlucoseStatus status = new GlucoseStatus();
- status.glucose = now.value;
- status.short_avgdelta = 0d;
- status.delta = 0d;
- status.long_avgdelta = 0d;
- status.avgdelta = 0d; // for OpenAPS MA
- status.date = now_date;
- return status.round();
- }
-
- ArrayList now_value_list = new ArrayList();
- ArrayList last_deltas = new ArrayList();
- ArrayList short_deltas = new ArrayList();
- ArrayList long_deltas = new ArrayList();
-
- // Use the latest sgv value in the now calculations
- now_value_list.add(now.value);
-
- for (int i = 1; i < sizeRecords; i++) {
- if (data.get(i).value > 38) {
- BgReading then = data.get(i);
- long then_date = then.date;
- double avgdelta = 0;
- long minutesago;
-
- minutesago = Math.round((now_date - then_date) / (1000d * 60));
- // multiply by 5 to get the same units as delta, i.e. mg/dL/5m
- change = now.value - then.value;
- avgdelta = change / minutesago * 5;
-
- // use the average of all data points in the last 2.5m for all further "now" calculations
- if (0 < minutesago && minutesago < 2.5) {
- // Keep and average all values within the last 2.5 minutes
- now_value_list.add(then.value);
- now.value = average(now_value_list);
- // short_deltas are calculated from everything ~5-15 minutes ago
- } else if (2.5 < minutesago && minutesago < 17.5) {
- //console.error(minutesago, avgdelta);
- short_deltas.add(avgdelta);
- // last_deltas are calculated from everything ~5 minutes ago
- if (2.5 < minutesago && minutesago < 7.5) {
- last_deltas.add(avgdelta);
- }
- // long_deltas are calculated from everything ~20-40 minutes ago
- } else if (17.5 < minutesago && minutesago < 42.5) {
- long_deltas.add(avgdelta);
- } else {
- // Do not process any more records after >= 42.5 minutes
- break;
- }
- }
- }
-
- GlucoseStatus status = new GlucoseStatus();
- status.glucose = now.value;
- status.date = now_date;
-
- status.short_avgdelta = average(short_deltas);
-
- if (last_deltas.isEmpty()) {
- status.delta = status.short_avgdelta;
- } else {
- status.delta = average(last_deltas);
- }
-
- status.long_avgdelta = average(long_deltas);
- status.avgdelta = status.short_avgdelta; // for OpenAPS MA
-
- return status.round();
- }
-
- public static double average(ArrayList array) {
- double sum = 0d;
-
- if (array.size() == 0)
- return 0d;
-
- for (Double value : array) {
- sum += value;
- }
- return sum / array.size();
- }
-}
diff --git a/app/src/main/java/info/nightscout/androidaps/data/QuickWizardEntry.java b/app/src/main/java/info/nightscout/androidaps/data/QuickWizardEntry.java
index 4262fe2133..0bfcbb1002 100644
--- a/app/src/main/java/info/nightscout/androidaps/data/QuickWizardEntry.java
+++ b/app/src/main/java/info/nightscout/androidaps/data/QuickWizardEntry.java
@@ -12,6 +12,7 @@ import info.nightscout.androidaps.db.BgReading;
import info.nightscout.androidaps.db.TempTarget;
import info.nightscout.androidaps.interfaces.TreatmentsInterface;
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.CobInfo;
+import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatus;
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.IobCobCalculatorPlugin;
import info.nightscout.androidaps.plugins.aps.loop.LoopPlugin;
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin;
diff --git a/app/src/main/java/info/nightscout/androidaps/db/DatabaseHelper.java b/app/src/main/java/info/nightscout/androidaps/db/DatabaseHelper.java
index c23d797c8c..1f071a2f18 100644
--- a/app/src/main/java/info/nightscout/androidaps/db/DatabaseHelper.java
+++ b/app/src/main/java/info/nightscout/androidaps/db/DatabaseHelper.java
@@ -35,7 +35,7 @@ import info.nightscout.androidaps.data.ProfileStore;
import info.nightscout.androidaps.events.EventCareportalEventChange;
import info.nightscout.androidaps.events.EventExtendedBolusChange;
import info.nightscout.androidaps.events.EventNewBG;
-import info.nightscout.androidaps.events.EventProfileSwitchChange;
+import info.nightscout.androidaps.events.EventProfileNeedsUpdate;
import info.nightscout.androidaps.events.EventRefreshOverview;
import info.nightscout.androidaps.events.EventReloadProfileSwitchData;
import info.nightscout.androidaps.events.EventReloadTempBasalData;
@@ -45,9 +45,9 @@ import info.nightscout.androidaps.events.EventTempTargetChange;
import info.nightscout.androidaps.interfaces.ProfileInterface;
import info.nightscout.androidaps.logging.L;
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
+import info.nightscout.androidaps.plugins.general.nsclient.NSUpload;
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.IobCobCalculatorPlugin;
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventNewHistoryData;
-import info.nightscout.androidaps.plugins.general.nsclient.NSUpload;
import info.nightscout.androidaps.plugins.pump.danaR.activities.DanaRNSHistorySync;
import info.nightscout.androidaps.plugins.pump.danaR.comm.RecordTypes;
import info.nightscout.androidaps.plugins.pump.insight.database.InsightBolusID;
@@ -83,7 +83,7 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
public static final String DATABASE_INSIGHT_BOLUS_IDS = "InsightBolusIDs";
public static final String DATABASE_INSIGHT_PUMP_IDS = "InsightPumpIDs";
- private static final int DATABASE_VERSION = 10;
+ private static final int DATABASE_VERSION = 11;
public static Long earliestDataChange = null;
@@ -131,6 +131,10 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
TableUtils.createTableIfNotExists(connectionSource, InsightHistoryOffset.class);
TableUtils.createTableIfNotExists(connectionSource, InsightBolusID.class);
TableUtils.createTableIfNotExists(connectionSource, InsightPumpID.class);
+ database.execSQL("INSERT INTO sqlite_sequence (name, seq) SELECT \"" + DATABASE_INSIGHT_BOLUS_IDS + "\", " + System.currentTimeMillis() + " " +
+ "WHERE NOT EXISTS (SELECT 1 FROM sqlite_sequence WHERE name = \"" + DATABASE_INSIGHT_BOLUS_IDS + "\")");
+ database.execSQL("INSERT INTO sqlite_sequence (name, seq) SELECT \"" + DATABASE_INSIGHT_PUMP_IDS + "\", " + System.currentTimeMillis() + " " +
+ "WHERE NOT EXISTS (SELECT 1 FROM sqlite_sequence WHERE name = \"" + DATABASE_INSIGHT_PUMP_IDS + "\")");
} catch (SQLException e) {
log.error("Can't create database", e);
throw new RuntimeException(e);
@@ -143,15 +147,7 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
this.oldVersion = oldVersion;
this.newVersion = newVersion;
- if (oldVersion == 7 && newVersion == 8) {
- log.debug("Upgrading database from v7 to v8");
- } else if (oldVersion == 8 && newVersion == 9) {
- log.debug("Upgrading database from v8 to v9");
- } else if (oldVersion == 9 && newVersion == 10) {
- TableUtils.createTableIfNotExists(connectionSource, InsightHistoryOffset.class);
- TableUtils.createTableIfNotExists(connectionSource, InsightBolusID.class);
- TableUtils.createTableIfNotExists(connectionSource, InsightPumpID.class);
- } else {
+ if (oldVersion < 7) {
log.info(DatabaseHelper.class.getName(), "onUpgrade");
TableUtils.dropTable(connectionSource, TempTarget.class, true);
TableUtils.dropTable(connectionSource, BgReading.class, true);
@@ -162,6 +158,17 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
TableUtils.dropTable(connectionSource, CareportalEvent.class, true);
TableUtils.dropTable(connectionSource, ProfileSwitch.class, true);
onCreate(database, connectionSource);
+ } else if (oldVersion < 10) {
+ TableUtils.createTableIfNotExists(connectionSource, InsightHistoryOffset.class);
+ TableUtils.createTableIfNotExists(connectionSource, InsightBolusID.class);
+ TableUtils.createTableIfNotExists(connectionSource, InsightPumpID.class);
+ database.execSQL("INSERT INTO sqlite_sequence (name, seq) SELECT \"" + DATABASE_INSIGHT_BOLUS_IDS + "\", " + System.currentTimeMillis() + " " +
+ "WHERE NOT EXISTS (SELECT 1 FROM sqlite_sequence WHERE name = \"" + DATABASE_INSIGHT_BOLUS_IDS + "\")");
+ database.execSQL("INSERT INTO sqlite_sequence (name, seq) SELECT \"" + DATABASE_INSIGHT_PUMP_IDS + "\", " + System.currentTimeMillis() + " " +
+ "WHERE NOT EXISTS (SELECT 1 FROM sqlite_sequence WHERE name = \"" + DATABASE_INSIGHT_PUMP_IDS + "\")");
+ } else if (oldVersion < 11) {
+ database.execSQL("UPDATE sqlite_sequence SET seq = " + System.currentTimeMillis() + " WHERE name = \"" + DATABASE_INSIGHT_BOLUS_IDS + "\"");
+ database.execSQL("UPDATE sqlite_sequence SET seq = " + System.currentTimeMillis() + " WHERE name = \"" + DATABASE_INSIGHT_PUMP_IDS + "\"");
}
} catch (SQLException e) {
log.error("Can't drop databases", e);
@@ -1574,9 +1581,9 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
class PostRunnable implements Runnable {
public void run() {
if (L.isEnabled(L.DATABASE))
- log.debug("Firing EventProfileSwitchChange");
+ log.debug("Firing EventProfileNeedsUpdate");
MainApp.bus().post(new EventReloadProfileSwitchData());
- MainApp.bus().post(new EventProfileSwitchChange());
+ MainApp.bus().post(new EventProfileNeedsUpdate());
scheduledProfileSwitchEventPost = null;
}
}
diff --git a/app/src/main/java/info/nightscout/androidaps/events/EventProfileSwitchChange.java b/app/src/main/java/info/nightscout/androidaps/events/EventProfileNeedsUpdate.java
similarity index 62%
rename from app/src/main/java/info/nightscout/androidaps/events/EventProfileSwitchChange.java
rename to app/src/main/java/info/nightscout/androidaps/events/EventProfileNeedsUpdate.java
index 7bab9d4518..9e3f3b08c7 100644
--- a/app/src/main/java/info/nightscout/androidaps/events/EventProfileSwitchChange.java
+++ b/app/src/main/java/info/nightscout/androidaps/events/EventProfileNeedsUpdate.java
@@ -4,5 +4,5 @@ package info.nightscout.androidaps.events;
* Created by mike on 02.06.2017.
*/
-public class EventProfileSwitchChange extends Event {
+public class EventProfileNeedsUpdate extends Event {
}
diff --git a/app/src/main/java/info/nightscout/androidaps/logging/L.java b/app/src/main/java/info/nightscout/androidaps/logging/L.java
index 583969c739..f685bbd424 100644
--- a/app/src/main/java/info/nightscout/androidaps/logging/L.java
+++ b/app/src/main/java/info/nightscout/androidaps/logging/L.java
@@ -78,6 +78,7 @@ public class L {
public static final String CORE = "CORE";
public static final String AUTOSENS = "AUTOSENS";
public static final String EVENTS = "EVENTS";
+ public static final String GLUCOSE = "GLUCOSE";
public static final String BGSOURCE = "BGSOURCE";
public static final String OVERVIEW = "OVERVIEW";
public static final String NOTIFICATION = "NOTIFICATION";
@@ -102,6 +103,7 @@ public class L {
logElements.add(new LogElement(APS, true));
logElements.add(new LogElement(AUTOSENS, false));
logElements.add(new LogElement(BGSOURCE, true));
+ logElements.add(new LogElement(GLUCOSE, false));
logElements.add(new LogElement(CONFIGBUILDER, false));
logElements.add(new LogElement(CONSTRAINTS, true));
logElements.add(new LogElement(CORE, true));
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/aps/loop/LoopFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/aps/loop/LoopFragment.java
index 0b11dd0ac3..951631eb0c 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/aps/loop/LoopFragment.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/aps/loop/LoopFragment.java
@@ -10,7 +10,6 @@ import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;
-import com.crashlytics.android.answers.CustomEvent;
import com.squareup.otto.Subscribe;
import butterknife.BindView;
@@ -19,9 +18,9 @@ import butterknife.OnClick;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R;
import info.nightscout.androidaps.interfaces.Constraint;
-import info.nightscout.androidaps.plugins.common.SubscriberFragment;
import info.nightscout.androidaps.plugins.aps.loop.events.EventLoopSetLastRunGui;
import info.nightscout.androidaps.plugins.aps.loop.events.EventLoopUpdateGui;
+import info.nightscout.androidaps.plugins.common.SubscriberFragment;
import info.nightscout.androidaps.utils.FabricPrivacy;
public class LoopFragment extends SubscriberFragment {
@@ -62,7 +61,6 @@ public class LoopFragment extends SubscriberFragment {
void onRunClick() {
lastRunView.setText(MainApp.gs(R.string.executing));
new Thread(() -> LoopPlugin.getPlugin().invoke("Loop button", true)).start();
- FabricPrivacy.getInstance().logCustom(new CustomEvent("Loop_Run"));
}
@Subscribe
@@ -75,7 +73,11 @@ public class LoopFragment extends SubscriberFragment {
clearGUI();
final Activity activity = getActivity();
if (activity != null)
- activity.runOnUiThread(() -> { synchronized (LoopFragment.this) { if (lastRunView != null) lastRunView.setText(ev.text); } });
+ activity.runOnUiThread(() -> {
+ synchronized (LoopFragment.this) {
+ if (lastRunView != null) lastRunView.setText(ev.text);
+ }
+ });
}
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/aps/loop/LoopPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/aps/loop/LoopPlugin.java
index 91bbccc515..92378a1d6b 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/aps/loop/LoopPlugin.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/aps/loop/LoopPlugin.java
@@ -13,7 +13,6 @@ import android.os.SystemClock;
import android.support.annotation.NonNull;
import android.support.v4.app.NotificationCompat;
-import com.crashlytics.android.answers.CustomEvent;
import com.squareup.otto.Subscribe;
import org.slf4j.Logger;
@@ -33,6 +32,7 @@ import info.nightscout.androidaps.db.CareportalEvent;
import info.nightscout.androidaps.db.DatabaseHelper;
import info.nightscout.androidaps.db.Source;
import info.nightscout.androidaps.db.TemporaryBasal;
+import info.nightscout.androidaps.events.EventAcceptOpenLoopChange;
import info.nightscout.androidaps.events.EventNewBG;
import info.nightscout.androidaps.events.EventTempTargetChange;
import info.nightscout.androidaps.interfaces.APSInterface;
@@ -44,18 +44,17 @@ import info.nightscout.androidaps.interfaces.PumpDescription;
import info.nightscout.androidaps.interfaces.PumpInterface;
import info.nightscout.androidaps.interfaces.TreatmentsInterface;
import info.nightscout.androidaps.logging.L;
-import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
-import info.nightscout.androidaps.plugins.constraints.objectives.ObjectivesPlugin;
-import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
-import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventAutosensCalculationFinished;
import info.nightscout.androidaps.plugins.aps.loop.events.EventLoopSetLastRunGui;
import info.nightscout.androidaps.plugins.aps.loop.events.EventLoopUpdateGui;
import info.nightscout.androidaps.plugins.aps.loop.events.EventNewOpenLoopNotification;
+import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
+import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
+import info.nightscout.androidaps.plugins.constraints.objectives.ObjectivesPlugin;
import info.nightscout.androidaps.plugins.general.nsclient.NSUpload;
+import info.nightscout.androidaps.plugins.general.wear.ActionStringHandler;
+import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventAutosensCalculationFinished;
import info.nightscout.androidaps.plugins.pump.virtual.VirtualPumpPlugin;
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin;
-import info.nightscout.androidaps.plugins.general.wear.ActionStringHandler;
-import info.nightscout.androidaps.events.EventAcceptOpenLoopChange;
import info.nightscout.androidaps.queue.Callback;
import info.nightscout.androidaps.queue.commands.Command;
import info.nightscout.androidaps.utils.FabricPrivacy;
@@ -179,11 +178,9 @@ public class LoopPlugin extends PluginBase {
@Subscribe
public void onStatusEvent(final EventTempTargetChange ev) {
new Thread(() -> invoke("EventTempTargetChange", true)).start();
- FabricPrivacy.getInstance().logCustom(new CustomEvent("TT_Loop_Run"));
}
-
public void suspendTo(long endTime) {
loopSuspendedTill = endTime;
isSuperBolus = false;
@@ -376,7 +373,7 @@ public class LoopPlugin extends PluginBase {
if (resultAfterConstraints.bolusRequested)
lastRun.smbSetByPump = waiting;
MainApp.bus().post(new EventLoopUpdateGui());
- FabricPrivacy.getInstance().logCustom(new CustomEvent("APSRequest"));
+ FabricPrivacy.getInstance().logCustom("APSRequest");
applyTBRRequest(resultAfterConstraints, profile, new Callback() {
@Override
public void run() {
@@ -395,7 +392,6 @@ public class LoopPlugin extends PluginBase {
SystemClock.sleep(1000);
LoopPlugin.getPlugin().invoke("tempBasalFallback", allowNotification, true);
}).start();
- FabricPrivacy.getInstance().logCustom(new CustomEvent("Loop_Run_TempBasalFallback"));
}
MainApp.bus().post(new EventLoopUpdateGui());
}
@@ -482,7 +478,7 @@ public class LoopPlugin extends PluginBase {
MainApp.bus().post(new EventAcceptOpenLoopChange());
}
});
- FabricPrivacy.getInstance().logCustom(new CustomEvent("AcceptTemp"));
+ FabricPrivacy.getInstance().logCustom("AcceptTemp");
}
/**
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSAMA/DetermineBasalAdapterAMAJS.java b/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSAMA/DetermineBasalAdapterAMAJS.java
index 7eb9a2d81d..5b5c8cb63d 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSAMA/DetermineBasalAdapterAMAJS.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSAMA/DetermineBasalAdapterAMAJS.java
@@ -20,7 +20,7 @@ import java.lang.reflect.InvocationTargetException;
import info.nightscout.androidaps.Constants;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R;
-import info.nightscout.androidaps.data.GlucoseStatus;
+import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatus;
import info.nightscout.androidaps.data.IobTotal;
import info.nightscout.androidaps.data.MealData;
import info.nightscout.androidaps.data.Profile;
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSAMA/OpenAPSAMAFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSAMA/OpenAPSAMAFragment.java
index f73a66bbfe..0aadf52cbd 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSAMA/OpenAPSAMAFragment.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSAMA/OpenAPSAMAFragment.java
@@ -8,7 +8,6 @@ import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;
-import com.crashlytics.android.answers.CustomEvent;
import com.squareup.otto.Subscribe;
import org.json.JSONArray;
@@ -19,11 +18,10 @@ import org.slf4j.LoggerFactory;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R;
import info.nightscout.androidaps.logging.L;
-import info.nightscout.androidaps.plugins.common.SubscriberFragment;
import info.nightscout.androidaps.plugins.aps.openAPSMA.events.EventOpenAPSUpdateGui;
import info.nightscout.androidaps.plugins.aps.openAPSMA.events.EventOpenAPSUpdateResultGui;
+import info.nightscout.androidaps.plugins.common.SubscriberFragment;
import info.nightscout.androidaps.utils.DateUtil;
-import info.nightscout.androidaps.utils.FabricPrivacy;
import info.nightscout.androidaps.utils.JSONFormatter;
public class OpenAPSAMAFragment extends SubscriberFragment implements View.OnClickListener {
@@ -68,7 +66,6 @@ public class OpenAPSAMAFragment extends SubscriberFragment implements View.OnCli
switch (view.getId()) {
case R.id.openapsma_run:
OpenAPSAMAPlugin.getPlugin().invoke("OpenAPSAMA button", false);
- FabricPrivacy.getInstance().logCustom(new CustomEvent("OpenAPS_AMA_Run"));
break;
}
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSAMA/OpenAPSAMAPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSAMA/OpenAPSAMAPlugin.java
index 3447c7c4f4..1f7deebea4 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSAMA/OpenAPSAMAPlugin.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSAMA/OpenAPSAMAPlugin.java
@@ -6,7 +6,7 @@ import org.slf4j.LoggerFactory;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R;
-import info.nightscout.androidaps.data.GlucoseStatus;
+import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatus;
import info.nightscout.androidaps.data.IobTotal;
import info.nightscout.androidaps.data.MealData;
import info.nightscout.androidaps.data.Profile;
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSMA/DetermineBasalAdapterMAJS.java b/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSMA/DetermineBasalAdapterMAJS.java
index 4baabf22ab..ae1f390ded 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSMA/DetermineBasalAdapterMAJS.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSMA/DetermineBasalAdapterMAJS.java
@@ -17,7 +17,7 @@ import java.lang.reflect.InvocationTargetException;
import info.nightscout.androidaps.Constants;
import info.nightscout.androidaps.R;
-import info.nightscout.androidaps.data.GlucoseStatus;
+import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatus;
import info.nightscout.androidaps.data.IobTotal;
import info.nightscout.androidaps.data.MealData;
import info.nightscout.androidaps.data.Profile;
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSMA/OpenAPSMAFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSMA/OpenAPSMAFragment.java
index 257a4abcb2..5d632a44fc 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSMA/OpenAPSMAFragment.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSMA/OpenAPSMAFragment.java
@@ -8,13 +8,12 @@ import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;
-import com.crashlytics.android.answers.CustomEvent;
import com.squareup.otto.Subscribe;
import info.nightscout.androidaps.R;
-import info.nightscout.androidaps.plugins.common.SubscriberFragment;
import info.nightscout.androidaps.plugins.aps.openAPSMA.events.EventOpenAPSUpdateGui;
import info.nightscout.androidaps.plugins.aps.openAPSMA.events.EventOpenAPSUpdateResultGui;
+import info.nightscout.androidaps.plugins.common.SubscriberFragment;
import info.nightscout.androidaps.utils.DateUtil;
import info.nightscout.androidaps.utils.FabricPrivacy;
import info.nightscout.androidaps.utils.JSONFormatter;
@@ -61,7 +60,6 @@ public class OpenAPSMAFragment extends SubscriberFragment implements View.OnClic
switch (view.getId()) {
case R.id.openapsma_run:
OpenAPSMAPlugin.getPlugin().invoke("OpenAPSMA button", false);
- FabricPrivacy.getInstance().logCustom(new CustomEvent("OpenAPS_MA_Run"));
break;
}
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSMA/OpenAPSMAPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSMA/OpenAPSMAPlugin.java
index 24b4cb7929..2dd78bdb82 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSMA/OpenAPSMAPlugin.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSMA/OpenAPSMAPlugin.java
@@ -6,7 +6,7 @@ import org.slf4j.LoggerFactory;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R;
-import info.nightscout.androidaps.data.GlucoseStatus;
+import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatus;
import info.nightscout.androidaps.data.IobTotal;
import info.nightscout.androidaps.data.MealData;
import info.nightscout.androidaps.data.Profile;
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMB/DetermineBasalAdapterSMBJS.java b/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMB/DetermineBasalAdapterSMBJS.java
index edaddd62c9..bfb75503c1 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMB/DetermineBasalAdapterSMBJS.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMB/DetermineBasalAdapterSMBJS.java
@@ -20,7 +20,7 @@ import java.lang.reflect.InvocationTargetException;
import info.nightscout.androidaps.Constants;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R;
-import info.nightscout.androidaps.data.GlucoseStatus;
+import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatus;
import info.nightscout.androidaps.data.IobTotal;
import info.nightscout.androidaps.data.MealData;
import info.nightscout.androidaps.data.Profile;
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMB/OpenAPSSMBFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMB/OpenAPSSMBFragment.java
index 87572e2ad6..18828e840e 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMB/OpenAPSSMBFragment.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMB/OpenAPSSMBFragment.java
@@ -8,7 +8,6 @@ import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;
-import com.crashlytics.android.answers.CustomEvent;
import com.squareup.otto.Subscribe;
import org.json.JSONArray;
@@ -22,11 +21,10 @@ import butterknife.OnClick;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R;
import info.nightscout.androidaps.logging.L;
-import info.nightscout.androidaps.plugins.common.SubscriberFragment;
import info.nightscout.androidaps.plugins.aps.openAPSMA.events.EventOpenAPSUpdateGui;
import info.nightscout.androidaps.plugins.aps.openAPSMA.events.EventOpenAPSUpdateResultGui;
+import info.nightscout.androidaps.plugins.common.SubscriberFragment;
import info.nightscout.androidaps.utils.DateUtil;
-import info.nightscout.androidaps.utils.FabricPrivacy;
import info.nightscout.androidaps.utils.JSONFormatter;
public class OpenAPSSMBFragment extends SubscriberFragment {
@@ -69,7 +67,6 @@ public class OpenAPSSMBFragment extends SubscriberFragment {
@OnClick(R.id.openapsma_run)
public void onRunClick() {
OpenAPSSMBPlugin.getPlugin().invoke("OpenAPSSMB button", false);
- FabricPrivacy.getInstance().logCustom(new CustomEvent("OpenAPS_SMB_Run"));
}
@Subscribe
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMB/OpenAPSSMBPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMB/OpenAPSSMBPlugin.java
index 73914662d7..728e3145d6 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMB/OpenAPSSMBPlugin.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/aps/openAPSSMB/OpenAPSSMBPlugin.java
@@ -6,7 +6,7 @@ import org.slf4j.LoggerFactory;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R;
-import info.nightscout.androidaps.data.GlucoseStatus;
+import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatus;
import info.nightscout.androidaps.data.IobTotal;
import info.nightscout.androidaps.data.MealData;
import info.nightscout.androidaps.data.Profile;
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/ConfigBuilderFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/ConfigBuilderFragment.java
index b374c78413..47b5d49357 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/ConfigBuilderFragment.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/ConfigBuilderFragment.java
@@ -16,8 +16,6 @@ import android.widget.RadioButton;
import android.widget.ScrollView;
import android.widget.TextView;
-import com.crashlytics.android.answers.CustomEvent;
-
import java.util.ArrayList;
import java.util.List;
@@ -26,8 +24,8 @@ import butterknife.ButterKnife;
import butterknife.OnClick;
import butterknife.Unbinder;
import info.nightscout.androidaps.MainApp;
-import info.nightscout.androidaps.activities.PreferencesActivity;
import info.nightscout.androidaps.R;
+import info.nightscout.androidaps.activities.PreferencesActivity;
import info.nightscout.androidaps.events.EventConfigBuilderChange;
import info.nightscout.androidaps.events.EventRefreshGui;
import info.nightscout.androidaps.interfaces.APSInterface;
@@ -42,7 +40,6 @@ import info.nightscout.androidaps.interfaces.SensitivityInterface;
import info.nightscout.androidaps.plugins.common.SubscriberFragment;
import info.nightscout.androidaps.plugins.insulin.InsulinOrefRapidActingPlugin;
import info.nightscout.androidaps.plugins.profile.ns.NSProfilePlugin;
-
import info.nightscout.androidaps.plugins.pump.virtual.VirtualPumpPlugin;
import info.nightscout.androidaps.plugins.sensitivity.SensitivityOref0Plugin;
import info.nightscout.androidaps.utils.FabricPrivacy;
@@ -276,7 +273,6 @@ public class ConfigBuilderFragment extends SubscriberFragment {
MainApp.bus().post(new EventRefreshGui());
MainApp.bus().post(new EventConfigBuilderChange());
ConfigBuilderPlugin.getPlugin().logPluginStatus();
- FabricPrivacy.getInstance().logCustom(new CustomEvent("ConfigurationChange"));
}
public void cancel(){
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/ProfileFunctions.java b/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/ProfileFunctions.java
index 6b9b353979..0360ba4a68 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/ProfileFunctions.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/configBuilder/ProfileFunctions.java
@@ -1,9 +1,10 @@
package info.nightscout.androidaps.plugins.configBuilder;
import android.content.Intent;
+import android.os.Bundle;
import android.support.annotation.Nullable;
-import com.crashlytics.android.answers.CustomEvent;
+import com.google.firebase.analytics.FirebaseAnalytics;
import com.squareup.otto.Subscribe;
import org.slf4j.Logger;
@@ -18,11 +19,11 @@ import info.nightscout.androidaps.data.ProfileStore;
import info.nightscout.androidaps.db.ProfileSwitch;
import info.nightscout.androidaps.db.Source;
import info.nightscout.androidaps.events.EventNewBasalProfile;
-import info.nightscout.androidaps.events.EventProfileSwitchChange;
+import info.nightscout.androidaps.events.EventProfileNeedsUpdate;
import info.nightscout.androidaps.interfaces.ProfileInterface;
import info.nightscout.androidaps.interfaces.TreatmentsInterface;
import info.nightscout.androidaps.logging.L;
-import info.nightscout.androidaps.plugins.general.overview.Dialogs.ErrorHelperActivity;
+import info.nightscout.androidaps.plugins.general.overview.dialogs.ErrorHelperActivity;
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin;
import info.nightscout.androidaps.queue.Callback;
import info.nightscout.androidaps.utils.FabricPrivacy;
@@ -47,7 +48,7 @@ public class ProfileFunctions {
}
@Subscribe
- public void onProfileSwitch(EventProfileSwitchChange ignored) {
+ public void onProfileSwitch(EventProfileNeedsUpdate ignored) {
if (L.isEnabled(L.PROFILE))
log.debug("onProfileSwitch");
ConfigBuilderPlugin.getPlugin().getCommandQueue().setProfile(getProfile(), new Callback() {
@@ -61,7 +62,8 @@ public class ProfileFunctions {
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
MainApp.instance().startActivity(i);
}
- MainApp.bus().post(new EventNewBasalProfile());
+ if (result.enacted)
+ MainApp.bus().post(new EventNewBasalProfile());
}
});
}
@@ -129,12 +131,12 @@ public class ProfileFunctions {
}
}
if (activeTreatments.getProfileSwitchesFromHistory().size() > 0) {
- FabricPrivacy.getInstance().logCustom(new CustomEvent("CatchedError")
- .putCustomAttribute("buildversion", BuildConfig.BUILDVERSION)
- .putCustomAttribute("version", BuildConfig.VERSION)
- .putCustomAttribute("time", time)
- .putCustomAttribute("getProfileSwitchesFromHistory", activeTreatments.getProfileSwitchesFromHistory().toString())
- );
+ Bundle bundle = new Bundle();
+ bundle.putString(FirebaseAnalytics.Param.ITEM_ID, "CatchedError");
+ bundle.putString(FirebaseAnalytics.Param.ITEM_CATEGORY, BuildConfig.BUILDVERSION);
+ bundle.putString(FirebaseAnalytics.Param.START_DATE, String.valueOf(time));
+ bundle.putString(FirebaseAnalytics.Param.VALUE, activeTreatments.getProfileSwitchesFromHistory().toString());
+ FabricPrivacy.getInstance().logCustom(bundle);
}
log.error("getProfile at the end: returning null");
return null;
@@ -157,7 +159,6 @@ public class ProfileFunctions {
public static void doProfileSwitch(final ProfileStore profileStore, final String profileName, final int duration, final int percentage, final int timeshift) {
ProfileSwitch profileSwitch = prepareProfileSwitch(profileStore, profileName, duration, percentage, timeshift, System.currentTimeMillis());
TreatmentsPlugin.getPlugin().addToHistoryProfileSwitch(profileSwitch);
- FabricPrivacy.getInstance().logCustom(new CustomEvent("ProfileSwitch"));
}
public static void doProfileSwitch(final int duration, final int percentage, final int timeshift) {
@@ -174,7 +175,6 @@ public class ProfileFunctions {
profileSwitch.timeshift = timeshift;
profileSwitch.percentage = percentage;
TreatmentsPlugin.getPlugin().addToHistoryProfileSwitch(profileSwitch);
- FabricPrivacy.getInstance().logCustom(new CustomEvent("ProfileSwitch"));
} else {
log.error("No profile switch existing");
}
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/ActionsFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/ActionsFragment.java
index 02ff6e6b5c..ff99978fed 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/ActionsFragment.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/ActionsFragment.java
@@ -12,7 +12,6 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
-import com.crashlytics.android.answers.CustomEvent;
import com.squareup.otto.Subscribe;
import java.util.ArrayList;
@@ -21,9 +20,9 @@ import java.util.List;
import java.util.Map;
import info.nightscout.androidaps.Config;
-import info.nightscout.androidaps.activities.HistoryBrowseActivity;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R;
+import info.nightscout.androidaps.activities.HistoryBrowseActivity;
import info.nightscout.androidaps.activities.TDDStatsActivity;
import info.nightscout.androidaps.db.ExtendedBolus;
import info.nightscout.androidaps.db.TemporaryBasal;
@@ -35,7 +34,6 @@ import info.nightscout.androidaps.interfaces.PumpInterface;
import info.nightscout.androidaps.plugins.common.SubscriberFragment;
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
-import info.nightscout.androidaps.plugins.general.actions.ActionsPlugin;
import info.nightscout.androidaps.plugins.general.actions.defs.CustomAction;
import info.nightscout.androidaps.plugins.general.actions.dialogs.FillDialog;
import info.nightscout.androidaps.plugins.general.actions.dialogs.NewExtendedBolusDialog;
@@ -70,7 +68,7 @@ public class ActionsFragment extends SubscriberFragment implements View.OnClickL
SingleClickButton tddStats;
SingleClickButton history;
- private Map pumpCustomActions = new HashMap<>();
+ private Map pumpCustomActions = new HashMap<>();
private List pumpCustomButtons = new ArrayList<>();
public ActionsFragment() {
@@ -222,7 +220,7 @@ public class ActionsFragment extends SubscriberFragment implements View.OnClickL
View.OnClickListener pumpCustomActionsListener = v -> {
- SingleClickButton btn = (SingleClickButton)v;
+ SingleClickButton btn = (SingleClickButton) v;
CustomAction customAction = this.pumpCustomActions.get(btn.getText().toString());
@@ -243,7 +241,7 @@ public class ActionsFragment extends SubscriberFragment implements View.OnClickL
List customActions = activePump.getCustomActions();
- if (customActions != null && customActions.size()>0) {
+ if (customActions != null && customActions.size() > 0) {
LinearLayout ll = actionsFragmentView.findViewById(R.id.action_buttons_layout);
@@ -275,7 +273,7 @@ public class ActionsFragment extends SubscriberFragment implements View.OnClickL
private void removePumpCustomActions() {
- if (pumpCustomActions.size()==0)
+ if (pumpCustomActions.size() == 0)
return;
LinearLayout ll = actionsFragmentView.findViewById(R.id.action_buttons_layout);
@@ -314,13 +312,11 @@ public class ActionsFragment extends SubscriberFragment implements View.OnClickL
case R.id.actions_extendedbolus_cancel:
if (TreatmentsPlugin.getPlugin().isInHistoryExtendedBoluslInProgress()) {
ConfigBuilderPlugin.getPlugin().getCommandQueue().cancelExtended(null);
- FabricPrivacy.getInstance().logCustom(new CustomEvent("CancelExtended"));
}
break;
case R.id.actions_canceltempbasal:
if (TreatmentsPlugin.getPlugin().isTempBasalInProgress()) {
ConfigBuilderPlugin.getPlugin().getCommandQueue().cancelTempBasal(true, null);
- FabricPrivacy.getInstance().logCustom(new CustomEvent("CancelTemp"));
}
break;
case R.id.actions_settempbasal:
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/dialogs/FillDialog.java b/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/dialogs/FillDialog.java
index 45333040e1..94d548a444 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/dialogs/FillDialog.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/dialogs/FillDialog.java
@@ -19,7 +19,6 @@ import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.LinearLayout;
-import com.crashlytics.android.answers.CustomEvent;
import com.google.common.base.Joiner;
import org.slf4j.Logger;
@@ -35,11 +34,10 @@ import info.nightscout.androidaps.db.CareportalEvent;
import info.nightscout.androidaps.db.Source;
import info.nightscout.androidaps.interfaces.Constraint;
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
-import info.nightscout.androidaps.plugins.general.overview.Dialogs.ErrorHelperActivity;
+import info.nightscout.androidaps.plugins.general.nsclient.NSUpload;
+import info.nightscout.androidaps.plugins.general.overview.dialogs.ErrorHelperActivity;
import info.nightscout.androidaps.queue.Callback;
import info.nightscout.androidaps.utils.DecimalFormatter;
-import info.nightscout.androidaps.utils.FabricPrivacy;
-import info.nightscout.androidaps.plugins.general.nsclient.NSUpload;
import info.nightscout.androidaps.utils.NumberPicker;
import info.nightscout.androidaps.utils.SP;
import info.nightscout.androidaps.utils.SafeParse;
@@ -190,7 +188,7 @@ public class FillDialog extends DialogFragment implements OnClickListener {
}
if (pumpSiteChangeCheckbox.isChecked())
- confirmMessage.add("" + "" + MainApp.gs(R.string.record_pump_site_change) + "");
+ confirmMessage.add("" + "" + MainApp.gs(R.string.record_pump_site_change) + "");
if (insulinCartridgeChangeCheckbox.isChecked())
confirmMessage.add("" + "" + MainApp.gs(R.string.record_insulin_cartridge_change) + "");
@@ -236,7 +234,6 @@ public class FillDialog extends DialogFragment implements OnClickListener {
}
}
});
- FabricPrivacy.getInstance().logCustom(new CustomEvent("Fill"));
}
if (pumpSiteChangeCheckbox.isChecked())
NSUpload.uploadEvent(CareportalEvent.SITECHANGE, now(), notes);
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/dialogs/NewExtendedBolusDialog.java b/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/dialogs/NewExtendedBolusDialog.java
index 3ba1ff3177..579e9e2f06 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/dialogs/NewExtendedBolusDialog.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/dialogs/NewExtendedBolusDialog.java
@@ -10,8 +10,6 @@ import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
-import com.crashlytics.android.answers.CustomEvent;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -21,9 +19,8 @@ import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R;
import info.nightscout.androidaps.interfaces.Constraint;
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
-import info.nightscout.androidaps.plugins.general.overview.Dialogs.ErrorHelperActivity;
+import info.nightscout.androidaps.plugins.general.overview.dialogs.ErrorHelperActivity;
import info.nightscout.androidaps.queue.Callback;
-import info.nightscout.androidaps.utils.FabricPrivacy;
import info.nightscout.androidaps.utils.NumberPicker;
import info.nightscout.androidaps.utils.SafeParse;
@@ -99,7 +96,6 @@ public class NewExtendedBolusDialog extends DialogFragment implements View.OnCli
}
}
});
- FabricPrivacy.getInstance().logCustom(new CustomEvent("ExtendedBolus"));
}
});
builder.setNegativeButton(MainApp.gs(R.string.cancel), null);
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/dialogs/NewTempBasalDialog.java b/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/dialogs/NewTempBasalDialog.java
index ae8ca782d1..80969b51b0 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/dialogs/NewTempBasalDialog.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/actions/dialogs/NewTempBasalDialog.java
@@ -12,8 +12,6 @@ import android.widget.LinearLayout;
import android.widget.RadioButton;
import android.widget.RadioGroup;
-import com.crashlytics.android.answers.CustomEvent;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -26,9 +24,8 @@ import info.nightscout.androidaps.interfaces.Constraint;
import info.nightscout.androidaps.interfaces.PumpDescription;
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
-import info.nightscout.androidaps.plugins.general.overview.Dialogs.ErrorHelperActivity;
+import info.nightscout.androidaps.plugins.general.overview.dialogs.ErrorHelperActivity;
import info.nightscout.androidaps.queue.Callback;
-import info.nightscout.androidaps.utils.FabricPrivacy;
import info.nightscout.androidaps.utils.NumberPicker;
import info.nightscout.androidaps.utils.SafeParse;
@@ -167,7 +164,6 @@ public class NewTempBasalDialog extends DialogFragment implements View.OnClickLi
} else {
ConfigBuilderPlugin.getPlugin().getCommandQueue().tempBasalAbsolute(finalBasal, finalDurationInMinutes, true, profile, callback);
}
- FabricPrivacy.getInstance().logCustom(new CustomEvent("TempBasal"));
}
});
builder.setNegativeButton(MainApp.gs(R.string.cancel), null);
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/careportal/Dialogs/NewNSTreatmentDialog.java b/app/src/main/java/info/nightscout/androidaps/plugins/general/careportal/Dialogs/NewNSTreatmentDialog.java
index e4eccd18d9..57414927b4 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/general/careportal/Dialogs/NewNSTreatmentDialog.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/careportal/Dialogs/NewNSTreatmentDialog.java
@@ -20,7 +20,6 @@ import android.widget.RadioButton;
import android.widget.Spinner;
import android.widget.TextView;
-import com.crashlytics.android.answers.CustomEvent;
import com.google.common.collect.Lists;
import com.wdullaer.materialdatetimepicker.date.DatePickerDialog;
import com.wdullaer.materialdatetimepicker.time.RadialPickerLayout;
@@ -40,7 +39,7 @@ import java.util.List;
import info.nightscout.androidaps.Constants;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R;
-import info.nightscout.androidaps.data.GlucoseStatus;
+import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatus;
import info.nightscout.androidaps.data.Profile;
import info.nightscout.androidaps.data.ProfileStore;
import info.nightscout.androidaps.db.BgReading;
@@ -48,14 +47,13 @@ import info.nightscout.androidaps.db.CareportalEvent;
import info.nightscout.androidaps.db.ProfileSwitch;
import info.nightscout.androidaps.db.Source;
import info.nightscout.androidaps.db.TempTarget;
-import info.nightscout.androidaps.plugins.general.careportal.OptionsToShow;
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
+import info.nightscout.androidaps.plugins.general.careportal.OptionsToShow;
import info.nightscout.androidaps.plugins.general.nsclient.NSUpload;
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin;
import info.nightscout.androidaps.utils.DateUtil;
import info.nightscout.androidaps.utils.DefaultValueHelper;
-import info.nightscout.androidaps.utils.FabricPrivacy;
import info.nightscout.androidaps.utils.HardLimits;
import info.nightscout.androidaps.utils.JsonHelper;
import info.nightscout.androidaps.utils.NumberPicker;
@@ -742,7 +740,6 @@ public class NewNSTreatmentDialog extends DialogFragment implements View.OnClick
tempTarget.low(0).high(0);
}
TreatmentsPlugin.getPlugin().addToHistoryTempTarget(tempTarget);
- FabricPrivacy.getInstance().logCustom(new CustomEvent("TempTarget"));
}
} else {
if (JsonHelper.safeGetString(data, "eventType").equals(CareportalEvent.PROFILESWITCH)) {
@@ -758,7 +755,6 @@ public class NewNSTreatmentDialog extends DialogFragment implements View.OnClick
} else {
NSUpload.uploadCareportalEntryToNS(data);
}
- FabricPrivacy.getInstance().logCustom(new CustomEvent("NSTreatment"));
}
}
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/MaintenancePlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/MaintenancePlugin.java
index bd5e67345d..35bd9f9d06 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/MaintenancePlugin.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/maintenance/MaintenancePlugin.java
@@ -222,6 +222,7 @@ public class MaintenancePlugin extends PluginBase {
builder.append("NSCLIENT" + System.lineSeparator());
builder.append("Build: " + BuildConfig.BUILDVERSION + System.lineSeparator());
+ builder.append("Remote: " + BuildConfig.REMOTE + System.lineSeparator());
builder.append("Flavor: " + BuildConfig.FLAVOR + BuildConfig.BUILD_TYPE + System.lineSeparator());
builder.append(MainApp.gs(R.string.configbuilder_nightscoutversion_label) + " " + NSSettingsStatus.getInstance().nightscoutVersionName + System.lineSeparator());
if (MainApp.engineeringMode)
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/NSClientFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/NSClientFragment.java
index dc384a7378..50674c5a94 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/NSClientFragment.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/NSClientFragment.java
@@ -17,7 +17,6 @@ import android.widget.CompoundButton;
import android.widget.ScrollView;
import android.widget.TextView;
-import com.crashlytics.android.answers.CustomEvent;
import com.squareup.otto.Subscribe;
import info.nightscout.androidaps.MainApp;
@@ -91,11 +90,11 @@ public class NSClientFragment extends SubscriberFragment implements View.OnClick
switch (view.getId()) {
case R.id.nsclientinternal_restart:
MainApp.bus().post(new EventNSClientRestart());
- FabricPrivacy.getInstance().logCustom(new CustomEvent("NSClientRestart"));
+ FabricPrivacy.getInstance().logCustom("NSClientRestart");
break;
case R.id.nsclientinternal_delivernow:
NSClientPlugin.getPlugin().resend("GUI");
- FabricPrivacy.getInstance().logCustom(new CustomEvent("NSClientDeliverNow"));
+ FabricPrivacy.getInstance().logCustom("NSClientDeliverNow");
break;
case R.id.nsclientinternal_clearlog:
NSClientPlugin.getPlugin().clearLog();
@@ -110,7 +109,7 @@ public class NSClientFragment extends SubscriberFragment implements View.OnClick
public void onClick(DialogInterface dialog, int id) {
UploadQueue.clearQueue();
updateGUI();
- FabricPrivacy.getInstance().logCustom(new CustomEvent("NSClientClearQueue"));
+ FabricPrivacy.getInstance().logCustom("NSClientClearQueue");
}
});
builder.setNegativeButton(MainApp.gs(R.string.cancel), null);
@@ -118,7 +117,6 @@ public class NSClientFragment extends SubscriberFragment implements View.OnClick
break;
case R.id.nsclientinternal_showqueue:
MainApp.bus().post(new EventNSClientNewLog("QUEUE", NSClientPlugin.getPlugin().queue().textList()));
- FabricPrivacy.getInstance().logCustom(new CustomEvent("NSClientShowQueue"));
break;
}
}
@@ -129,7 +127,7 @@ public class NSClientFragment extends SubscriberFragment implements View.OnClick
case R.id.nsclientinternal_paused:
NSClientPlugin.getPlugin().pause(isChecked);
updateGUI();
- FabricPrivacy.getInstance().logCustom(new CustomEvent("NSClientPause"));
+ FabricPrivacy.getInstance().logCustom("NSClientPause");
break;
case R.id.nsclientinternal_autoscroll:
SP.putBoolean(R.string.key_nsclientinternal_autoscroll, isChecked);
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/services/NSClientService.java b/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/services/NSClientService.java
index 359c224158..c14a3382b3 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/services/NSClientService.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/nsclient/services/NSClientService.java
@@ -120,7 +120,7 @@ public class NSClientService extends Service {
}
PowerManager powerManager = (PowerManager) MainApp.instance().getApplicationContext().getSystemService(Context.POWER_SERVICE);
- mWakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "NSClientService");
+ mWakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "AndroidAPS:NSClientService");
initialize();
}
@@ -499,7 +499,7 @@ public class NSClientService extends Service {
public void run() {
PowerManager powerManager = (PowerManager) MainApp.instance().getApplicationContext().getSystemService(Context.POWER_SERVICE);
PowerManager.WakeLock wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,
- "onDataUpdate");
+ "AndroidAPS:NSClientService_onDataUpdate");
wakeLock.acquire();
try {
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.java
index 59d3e50728..6d41303540 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/OverviewFragment.java
@@ -34,7 +34,6 @@ import android.widget.ImageButton;
import android.widget.LinearLayout;
import android.widget.TextView;
-import com.crashlytics.android.answers.CustomEvent;
import com.jjoe64.graphview.GraphView;
import com.squareup.otto.Subscribe;
@@ -46,6 +45,7 @@ import org.slf4j.LoggerFactory;
import java.text.DecimalFormat;
import java.util.Calendar;
import java.util.Date;
+import java.util.Locale;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledFuture;
@@ -56,7 +56,7 @@ import info.nightscout.androidaps.Constants;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R;
import info.nightscout.androidaps.data.DetailedBolusInfo;
-import info.nightscout.androidaps.data.GlucoseStatus;
+import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatus;
import info.nightscout.androidaps.data.IobTotal;
import info.nightscout.androidaps.data.Profile;
import info.nightscout.androidaps.data.QuickWizardEntry;
@@ -72,7 +72,7 @@ import info.nightscout.androidaps.events.EventCareportalEventChange;
import info.nightscout.androidaps.events.EventExtendedBolusChange;
import info.nightscout.androidaps.events.EventInitializationChanged;
import info.nightscout.androidaps.events.EventPreferenceChange;
-import info.nightscout.androidaps.events.EventProfileSwitchChange;
+import info.nightscout.androidaps.events.EventProfileNeedsUpdate;
import info.nightscout.androidaps.events.EventPumpStatusChanged;
import info.nightscout.androidaps.events.EventRefreshOverview;
import info.nightscout.androidaps.events.EventTempBasalChange;
@@ -83,44 +83,43 @@ import info.nightscout.androidaps.interfaces.PluginType;
import info.nightscout.androidaps.interfaces.PumpDescription;
import info.nightscout.androidaps.interfaces.PumpInterface;
import info.nightscout.androidaps.logging.L;
+import info.nightscout.androidaps.plugins.aps.loop.APSResult;
+import info.nightscout.androidaps.plugins.aps.loop.LoopPlugin;
+import info.nightscout.androidaps.plugins.aps.loop.events.EventNewOpenLoopNotification;
+import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
+import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
import info.nightscout.androidaps.plugins.general.careportal.CareportalFragment;
import info.nightscout.androidaps.plugins.general.careportal.Dialogs.NewNSTreatmentDialog;
import info.nightscout.androidaps.plugins.general.careportal.OptionsToShow;
-import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
-import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
+import info.nightscout.androidaps.plugins.general.nsclient.NSUpload;
+import info.nightscout.androidaps.plugins.general.nsclient.data.NSDeviceStatus;
+import info.nightscout.androidaps.plugins.general.nsclient.data.NSSettingsStatus;
+import info.nightscout.androidaps.plugins.general.overview.dialogs.CalibrationDialog;
+import info.nightscout.androidaps.plugins.general.overview.dialogs.ErrorHelperActivity;
+import info.nightscout.androidaps.plugins.general.overview.dialogs.NewCarbsDialog;
+import info.nightscout.androidaps.plugins.general.overview.dialogs.NewInsulinDialog;
+import info.nightscout.androidaps.plugins.general.overview.dialogs.NewTreatmentDialog;
+import info.nightscout.androidaps.plugins.general.overview.dialogs.WizardDialog;
+import info.nightscout.androidaps.plugins.general.overview.activities.QuickWizardListActivity;
+import info.nightscout.androidaps.plugins.general.overview.graphData.GraphData;
+import info.nightscout.androidaps.plugins.general.overview.notifications.NotificationRecyclerViewAdapter;
+import info.nightscout.androidaps.plugins.general.overview.notifications.NotificationStore;
+import info.nightscout.androidaps.plugins.general.wear.ActionStringHandler;
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.AutosensData;
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.CobInfo;
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.IobCobCalculatorPlugin;
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventAutosensCalculationFinished;
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventIobCalculationProgress;
-import info.nightscout.androidaps.plugins.aps.loop.APSResult;
-import info.nightscout.androidaps.plugins.aps.loop.LoopPlugin;
-import info.nightscout.androidaps.plugins.aps.loop.events.EventNewOpenLoopNotification;
-import info.nightscout.androidaps.plugins.general.nsclient.NSUpload;
-import info.nightscout.androidaps.plugins.general.nsclient.data.NSDeviceStatus;
-import info.nightscout.androidaps.plugins.general.nsclient.data.NSSettingsStatus;
-import info.nightscout.androidaps.plugins.general.overview.Dialogs.CalibrationDialog;
-import info.nightscout.androidaps.plugins.general.overview.Dialogs.ErrorHelperActivity;
-import info.nightscout.androidaps.plugins.general.overview.Dialogs.NewCarbsDialog;
-import info.nightscout.androidaps.plugins.general.overview.Dialogs.NewInsulinDialog;
-import info.nightscout.androidaps.plugins.general.overview.Dialogs.NewTreatmentDialog;
-import info.nightscout.androidaps.plugins.general.overview.Dialogs.WizardDialog;
-import info.nightscout.androidaps.plugins.general.overview.activities.QuickWizardListActivity;
-import info.nightscout.androidaps.plugins.general.overview.graphData.GraphData;
-import info.nightscout.androidaps.plugins.general.overview.notifications.NotificationRecyclerViewAdapter;
-import info.nightscout.androidaps.plugins.general.overview.notifications.NotificationStore;
import info.nightscout.androidaps.plugins.source.SourceDexcomG5Plugin;
import info.nightscout.androidaps.plugins.source.SourceDexcomG6Plugin;
import info.nightscout.androidaps.plugins.source.SourceXdripPlugin;
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin;
import info.nightscout.androidaps.plugins.treatments.fragments.ProfileViewerDialog;
-import info.nightscout.androidaps.plugins.general.wear.ActionStringHandler;
import info.nightscout.androidaps.queue.Callback;
import info.nightscout.androidaps.utils.BolusWizard;
import info.nightscout.androidaps.utils.DateUtil;
import info.nightscout.androidaps.utils.DecimalFormatter;
import info.nightscout.androidaps.utils.DefaultValueHelper;
-import info.nightscout.androidaps.utils.FabricPrivacy;
import info.nightscout.androidaps.utils.OKDialog;
import info.nightscout.androidaps.utils.Profiler;
import info.nightscout.androidaps.utils.SP;
@@ -268,15 +267,15 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
sage = (TextView) view.findViewById(R.id.careportal_sensorage);
pbage = (TextView) view.findViewById(R.id.careportal_pbage);
- iageView = (TextView) view.findViewById(R.id.overview_insulinage);
- cageView = (TextView) view.findViewById(R.id.overview_canulaage);
- reservoirView = (TextView) view.findViewById(R.id.overview_reservoirlevel);
- sageView = (TextView) view.findViewById(R.id.overview_sensorage);
- batteryView = (TextView) view.findViewById(R.id.overview_batterylevel);
- statuslightsLayout = (LinearLayout) view.findViewById(R.id.overview_statuslights);
+ iageView = (TextView) view.findViewById(R.id.overview_insulinage);
+ cageView = (TextView) view.findViewById(R.id.overview_canulaage);
+ reservoirView = (TextView) view.findViewById(R.id.overview_reservoirlevel);
+ sageView = (TextView) view.findViewById(R.id.overview_sensorage);
+ batteryView = (TextView) view.findViewById(R.id.overview_batterylevel);
+ statuslightsLayout = (LinearLayout) view.findViewById(R.id.overview_statuslights);
- bgGraph = (GraphView) view.findViewById(R.id.overview_bggraph);
- iobGraph = (GraphView) view.findViewById(R.id.overview_iobgraph);
+ bgGraph = (GraphView) view.findViewById(R.id.overview_bggraph);
+ iobGraph = (GraphView) view.findViewById(R.id.overview_iobgraph);
treatmentButton = (SingleClickButton) view.findViewById(R.id.overview_treatmentbutton);
treatmentButton.setOnClickListener(this);
@@ -475,7 +474,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
menu.add(MainApp.gs(R.string.suspendloopfor2h));
menu.add(MainApp.gs(R.string.suspendloopfor3h));
menu.add(MainApp.gs(R.string.suspendloopfor10h));
- } else {
+ } else {
if (!loopPlugin.isDisconnected()) {
menu.add(MainApp.gs(R.string.resume));
}
@@ -488,7 +487,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
if (!loopPlugin.isDisconnected()) {
showSuspendtPump(menu, pumpDescription);
- } else {
+ } else {
menu.add(MainApp.gs(R.string.reconnect));
}
@@ -892,7 +891,6 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
} else {
TreatmentsPlugin.getPlugin().addToHistoryTreatment(detailedBolusInfo, false);
}
- FabricPrivacy.getInstance().logCustom(new CustomEvent("QuickWizard"));
}
}
});
@@ -984,8 +982,8 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
}
@Subscribe
- public void onStatusEvent(final EventProfileSwitchChange ev) {
- scheduleUpdateGUI("EventProfileSwitchChange");
+ public void onStatusEvent(final EventProfileNeedsUpdate ev) {
+ scheduleUpdateGUI("EventProfileNeedsUpdate");
}
@Subscribe
@@ -1461,7 +1459,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
if (sensitivityView != null) {
AutosensData autosensData = IobCobCalculatorPlugin.getPlugin().getLastAutosensData("Overview");
if (autosensData != null)
- sensitivityView.setText(String.format("%.0f%%", autosensData.autosensResult.ratio * 100));
+ sensitivityView.setText(String.format(Locale.ENGLISH, "%.0f%%", autosensData.autosensResult.ratio * 100));
else
sensitivityView.setText("");
}
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/activities/QuickWizardListActivity.java b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/activities/QuickWizardListActivity.java
index 0bea854c19..d7eb9c86dd 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/activities/QuickWizardListActivity.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/activities/QuickWizardListActivity.java
@@ -18,7 +18,7 @@ import com.squareup.otto.Subscribe;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R;
import info.nightscout.androidaps.data.QuickWizard;
-import info.nightscout.androidaps.plugins.general.overview.Dialogs.EditQuickWizardDialog;
+import info.nightscout.androidaps.plugins.general.overview.dialogs.EditQuickWizardDialog;
import info.nightscout.androidaps.plugins.general.overview.OverviewPlugin;
import info.nightscout.androidaps.plugins.general.overview.events.EventQuickWizardChange;
import info.nightscout.androidaps.utils.DateUtil;
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/Dialogs/BolusProgressDialog.java b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/BolusProgressDialog.java
similarity index 99%
rename from app/src/main/java/info/nightscout/androidaps/plugins/general/overview/Dialogs/BolusProgressDialog.java
rename to app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/BolusProgressDialog.java
index 6cb5a1bc82..4189fcdcdb 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/Dialogs/BolusProgressDialog.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/BolusProgressDialog.java
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.general.overview.Dialogs;
+package info.nightscout.androidaps.plugins.general.overview.dialogs;
import android.app.Activity;
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/Dialogs/BolusProgressHelperActivity.java b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/BolusProgressHelperActivity.java
similarity index 92%
rename from app/src/main/java/info/nightscout/androidaps/plugins/general/overview/Dialogs/BolusProgressHelperActivity.java
rename to app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/BolusProgressHelperActivity.java
index b0bc7e96f5..fd1de6ce8c 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/Dialogs/BolusProgressHelperActivity.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/BolusProgressHelperActivity.java
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.general.overview.Dialogs;
+package info.nightscout.androidaps.plugins.general.overview.dialogs;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/Dialogs/CalibrationDialog.java b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/CalibrationDialog.java
similarity index 90%
rename from app/src/main/java/info/nightscout/androidaps/plugins/general/overview/Dialogs/CalibrationDialog.java
rename to app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/CalibrationDialog.java
index b950414237..0ab1b98ff6 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/Dialogs/CalibrationDialog.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/CalibrationDialog.java
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.general.overview.Dialogs;
+package info.nightscout.androidaps.plugins.general.overview.dialogs;
import android.content.Context;
@@ -11,8 +11,6 @@ import android.view.Window;
import android.view.WindowManager;
import android.widget.TextView;
-import com.crashlytics.android.answers.CustomEvent;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -20,10 +18,9 @@ import java.text.DecimalFormat;
import info.nightscout.androidaps.Constants;
import info.nightscout.androidaps.R;
-import info.nightscout.androidaps.data.GlucoseStatus;
+import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatus;
import info.nightscout.androidaps.data.Profile;
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
-import info.nightscout.androidaps.utils.FabricPrivacy;
import info.nightscout.androidaps.utils.NumberPicker;
import info.nightscout.androidaps.utils.SafeParse;
import info.nightscout.androidaps.utils.XdripCalibrations;
@@ -88,7 +85,6 @@ public class CalibrationDialog extends DialogFragment implements View.OnClickLis
final Double bg = SafeParse.stringToDouble(bgNumber.getText());
XdripCalibrations.confirmAndSendCalibration(bg, context);
dismiss();
- FabricPrivacy.getInstance().logCustom(new CustomEvent("Calibration"));
break;
case R.id.cancel:
dismiss();
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/Dialogs/EditQuickWizardDialog.java b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/EditQuickWizardDialog.java
similarity index 99%
rename from app/src/main/java/info/nightscout/androidaps/plugins/general/overview/Dialogs/EditQuickWizardDialog.java
rename to app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/EditQuickWizardDialog.java
index 053337e356..9cd1277961 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/Dialogs/EditQuickWizardDialog.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/EditQuickWizardDialog.java
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.general.overview.Dialogs;
+package info.nightscout.androidaps.plugins.general.overview.dialogs;
import android.os.Bundle;
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/Dialogs/ErrorDialog.java b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/ErrorDialog.java
similarity index 98%
rename from app/src/main/java/info/nightscout/androidaps/plugins/general/overview/Dialogs/ErrorDialog.java
rename to app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/ErrorDialog.java
index 549653f400..209a585384 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/Dialogs/ErrorDialog.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/ErrorDialog.java
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.general.overview.Dialogs;
+package info.nightscout.androidaps.plugins.general.overview.dialogs;
import android.content.Intent;
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/Dialogs/ErrorHelperActivity.java b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/ErrorHelperActivity.java
similarity index 94%
rename from app/src/main/java/info/nightscout/androidaps/plugins/general/overview/Dialogs/ErrorHelperActivity.java
rename to app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/ErrorHelperActivity.java
index 1107cf1a9f..667cadf2b1 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/Dialogs/ErrorHelperActivity.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/ErrorHelperActivity.java
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.general.overview.Dialogs;
+package info.nightscout.androidaps.plugins.general.overview.dialogs;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/Dialogs/NewCarbsDialog.java b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/NewCarbsDialog.java
similarity index 99%
rename from app/src/main/java/info/nightscout/androidaps/plugins/general/overview/Dialogs/NewCarbsDialog.java
rename to app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/NewCarbsDialog.java
index 44d13fa570..789ced1df3 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/Dialogs/NewCarbsDialog.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/NewCarbsDialog.java
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.general.overview.Dialogs;
+package info.nightscout.androidaps.plugins.general.overview.dialogs;
import android.os.Bundle;
import android.os.HandlerThread;
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/Dialogs/NewInsulinDialog.java b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/NewInsulinDialog.java
similarity index 96%
rename from app/src/main/java/info/nightscout/androidaps/plugins/general/overview/Dialogs/NewInsulinDialog.java
rename to app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/NewInsulinDialog.java
index f326805ba2..27e2e33ba7 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/Dialogs/NewInsulinDialog.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/NewInsulinDialog.java
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.general.overview.Dialogs;
+package info.nightscout.androidaps.plugins.general.overview.dialogs;
import android.content.Context;
import android.content.Intent;
@@ -20,7 +20,6 @@ import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.LinearLayout;
-import com.crashlytics.android.answers.CustomEvent;
import com.google.common.base.Joiner;
import org.slf4j.Logger;
@@ -46,7 +45,6 @@ import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin;
import info.nightscout.androidaps.queue.Callback;
import info.nightscout.androidaps.utils.DateUtil;
import info.nightscout.androidaps.utils.DecimalFormatter;
-import info.nightscout.androidaps.utils.FabricPrivacy;
import info.nightscout.androidaps.utils.NumberPicker;
import info.nightscout.androidaps.utils.SP;
import info.nightscout.androidaps.utils.SafeParse;
@@ -170,8 +168,8 @@ public class NewInsulinDialog extends DialogFragment implements OnClickListener
insulinDialogState.putBoolean("recordOnlyCheckbox", recordOnlyCheckbox.isChecked());
insulinDialogState.putDouble("editTime", editTime.getValue());
insulinDialogState.putDouble("editInsulin", editInsulin.getValue());
- insulinDialogState.putString("notesEdit",notesEdit.getText().toString());
- log.debug("Instance state saved:"+insulinDialogState.toString());
+ insulinDialogState.putString("notesEdit", notesEdit.getText().toString());
+ log.debug("Instance state saved:" + insulinDialogState.toString());
super.onSaveInstanceState(insulinDialogState);
}
@@ -227,7 +225,7 @@ public class NewInsulinDialog extends DialogFragment implements OnClickListener
}
}
- if (Math.abs(insulinAfterConstraints - insulin) > pump.getPumpDescription().pumpType.determineCorrectBolusSize(insulinAfterConstraints))
+ if (Math.abs(insulinAfterConstraints - insulin) > pump.getPumpDescription().pumpType.determineCorrectBolusSize(insulinAfterConstraints))
actions.add("" + MainApp.gs(R.string.bolusconstraintapplied) + "");
int eatingSoonTTDuration = SP.getInt(R.string.key_eatingsoon_duration, Constants.defaultEatingSoonTTDuration);
@@ -306,7 +304,6 @@ public class NewInsulinDialog extends DialogFragment implements OnClickListener
}
}
});
- FabricPrivacy.getInstance().logCustom(new CustomEvent("Bolus"));
}
}
}
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/Dialogs/NewTreatmentDialog.java b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/NewTreatmentDialog.java
similarity index 97%
rename from app/src/main/java/info/nightscout/androidaps/plugins/general/overview/Dialogs/NewTreatmentDialog.java
rename to app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/NewTreatmentDialog.java
index b5e7b1dd74..837d206fb3 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/Dialogs/NewTreatmentDialog.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/NewTreatmentDialog.java
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.general.overview.Dialogs;
+package info.nightscout.androidaps.plugins.general.overview.dialogs;
import android.content.Context;
import android.content.DialogInterface;
@@ -17,8 +17,6 @@ import android.view.Window;
import android.view.WindowManager;
import android.widget.CheckBox;
-import com.crashlytics.android.answers.CustomEvent;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -36,7 +34,6 @@ import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin;
import info.nightscout.androidaps.queue.Callback;
import info.nightscout.androidaps.utils.DecimalFormatter;
-import info.nightscout.androidaps.utils.FabricPrivacy;
import info.nightscout.androidaps.utils.NumberPicker;
import info.nightscout.androidaps.utils.SafeParse;
import info.nightscout.androidaps.utils.ToastUtils;
@@ -194,7 +191,6 @@ public class NewTreatmentDialog extends DialogFragment implements OnClickListene
} else {
TreatmentsPlugin.getPlugin().addToHistoryTreatment(detailedBolusInfo, false);
}
- FabricPrivacy.getInstance().logCustom(new CustomEvent("Bolus"));
}
}
}
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/Dialogs/WizardDialog.java b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/WizardDialog.java
similarity index 99%
rename from app/src/main/java/info/nightscout/androidaps/plugins/general/overview/Dialogs/WizardDialog.java
rename to app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/WizardDialog.java
index 33b3019668..b4a3de4271 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/Dialogs/WizardDialog.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/dialogs/WizardDialog.java
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.general.overview.Dialogs;
+package info.nightscout.androidaps.plugins.general.overview.dialogs;
import android.app.Activity;
import android.content.Context;
@@ -26,7 +26,6 @@ import android.widget.LinearLayout;
import android.widget.Spinner;
import android.widget.TextView;
-import com.crashlytics.android.answers.CustomEvent;
import com.squareup.otto.Subscribe;
import org.json.JSONException;
@@ -66,7 +65,6 @@ import info.nightscout.androidaps.queue.Callback;
import info.nightscout.androidaps.utils.BolusWizard;
import info.nightscout.androidaps.utils.DateUtil;
import info.nightscout.androidaps.utils.DecimalFormatter;
-import info.nightscout.androidaps.utils.FabricPrivacy;
import info.nightscout.androidaps.utils.NumberPicker;
import info.nightscout.androidaps.utils.SP;
import info.nightscout.androidaps.utils.SafeParse;
@@ -398,7 +396,6 @@ public class WizardDialog extends DialogFragment implements OnClickListener, Com
} else {
TreatmentsPlugin.getPlugin().addToHistoryTreatment(detailedBolusInfo, false);
}
- FabricPrivacy.getInstance().logCustom(new CustomEvent("Wizard"));
}
}
}
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/notifications/Notification.java b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/notifications/Notification.java
index 3b6bcf615d..f7a4c32360 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/notifications/Notification.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/overview/notifications/Notification.java
@@ -74,6 +74,7 @@ public class Notification {
public static final int DST_LOOP_DISABLED = 49;
public static final int DST_IN_24H = 50;
public static final int DISKFULL = 51;
+ public static final int OLDVERSION = 52;
public int id;
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/persistentNotification/PersistentNotificationPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/general/persistentNotification/PersistentNotificationPlugin.java
index 0287c21260..987d9374bd 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/general/persistentNotification/PersistentNotificationPlugin.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/persistentNotification/PersistentNotificationPlugin.java
@@ -20,7 +20,7 @@ import info.nightscout.androidaps.Constants;
import info.nightscout.androidaps.MainActivity;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R;
-import info.nightscout.androidaps.data.GlucoseStatus;
+import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatus;
import info.nightscout.androidaps.data.IobTotal;
import info.nightscout.androidaps.db.BgReading;
import info.nightscout.androidaps.db.DatabaseHelper;
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/smsCommunicator/SmsCommunicatorPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/general/smsCommunicator/SmsCommunicatorPlugin.java
index 70af65bfcf..181bdd86d2 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/general/smsCommunicator/SmsCommunicatorPlugin.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/smsCommunicator/SmsCommunicatorPlugin.java
@@ -20,7 +20,7 @@ import info.nightscout.androidaps.Constants;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R;
import info.nightscout.androidaps.data.DetailedBolusInfo;
-import info.nightscout.androidaps.data.GlucoseStatus;
+import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatus;
import info.nightscout.androidaps.data.IobTotal;
import info.nightscout.androidaps.data.Profile;
import info.nightscout.androidaps.data.ProfileStore;
@@ -118,7 +118,7 @@ public class SmsCommunicatorPlugin extends PluginBase {
}
boolean isCommand(String command, String number) {
- switch(command.toUpperCase()) {
+ switch (command.toUpperCase()) {
case "BG":
case "LOOP":
case "TREATMENTS":
@@ -760,11 +760,18 @@ public class SmsCommunicatorPlugin extends PluginBase {
void sendSMS(Sms sms) {
SmsManager smsManager = SmsManager.getDefault();
sms.text = stripAccents(sms.text);
- if (sms.text.length() > 140) sms.text = sms.text.substring(0, 139);
+
try {
if (L.isEnabled(L.SMS))
log.debug("Sending SMS to " + sms.phoneNumber + ": " + sms.text);
- smsManager.sendTextMessage(sms.phoneNumber, null, sms.text, null, null);
+ if (sms.text.getBytes().length <= 140)
+ smsManager.sendTextMessage(sms.phoneNumber, null, sms.text, null, null);
+ else {
+ ArrayList parts = smsManager.divideMessage(sms.text);
+ smsManager.sendMultipartTextMessage(sms.phoneNumber, null, parts,
+ null, null);
+ }
+
messages.add(sms);
} catch (IllegalArgumentException e) {
Notification notification = new Notification(Notification.INVALID_PHONE_NUMBER, MainApp.gs(R.string.smscommunicator_invalidphonennumber), Notification.NORMAL);
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/versionChecker/VersionCheckerPlugin.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/versionChecker/VersionCheckerPlugin.kt
new file mode 100644
index 0000000000..2a4c08a585
--- /dev/null
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/versionChecker/VersionCheckerPlugin.kt
@@ -0,0 +1,65 @@
+package info.nightscout.androidaps.plugins.general.versionChecker
+
+import info.nightscout.androidaps.MainApp
+import info.nightscout.androidaps.R
+import info.nightscout.androidaps.interfaces.*
+import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification
+import info.nightscout.androidaps.plugins.general.overview.notifications.Notification
+import info.nightscout.androidaps.utils.SP
+import java.util.concurrent.TimeUnit
+
+/**
+ * Usually we would have a class here.
+ * Instead of having a class we can use an object directly inherited from PluginBase.
+ * This is a lazy loading singleton only loaded when actually used.
+ * */
+
+object VersionCheckerPlugin : PluginBase(PluginDescription()
+ .mainType(PluginType.CONSTRAINTS)
+ .neverVisible(true)
+ .alwaysEnabled(true)
+ .showInList(false)
+ .pluginName(R.string.versionChecker)), ConstraintsInterface {
+
+ override fun isClosedLoopAllowed(value: Constraint): Constraint {
+ checkWarning()
+ triggerCheckVersion()
+ return if (isOldVersion(GRACE_PERIOD_VERY_OLD))
+ value.set(false, MainApp.gs(R.string.very_old_version), this)
+ else
+ value
+ }
+
+ private fun checkWarning() {
+ val now = System.currentTimeMillis()
+ if (isOldVersion(GRACE_PERIOD_WARNING) && shouldWarnAgain(now)) {
+ // store last notification time
+ SP.putLong(R.string.key_last_versionchecker_plugin_warning, now)
+
+ //notify
+ val message = MainApp.gs(R.string.new_version_warning, Math.round((now - SP.getLong(R.string.key_last_time_this_version_detected, now)) / TimeUnit.DAYS.toMillis(1).toDouble()))
+ val notification = Notification(Notification.OLDVERSION, message, Notification.NORMAL)
+ MainApp.bus().post(EventNewNotification(notification))
+ }
+ }
+
+ private fun shouldWarnAgain(now: Long) =
+ now > SP.getLong(R.string.key_last_versionchecker_plugin_warning, 0) + WARN_EVERY
+
+ override fun applyMaxIOBConstraints(maxIob: Constraint): Constraint =
+ if (isOldVersion(GRACE_PERIOD_OLD))
+ maxIob.set(0.toDouble(), MainApp.gs(R.string.old_version), this)
+ else
+ maxIob
+
+ private fun isOldVersion(gracePeriod: Long): Boolean {
+ val now = System.currentTimeMillis()
+ return now > SP.getLong(R.string.key_last_time_this_version_detected, 0) + gracePeriod
+ }
+
+ val WARN_EVERY = TimeUnit.DAYS.toMillis(1)
+ val GRACE_PERIOD_WARNING = TimeUnit.DAYS.toMillis(30)
+ val GRACE_PERIOD_OLD = TimeUnit.DAYS.toMillis(60)
+ val GRACE_PERIOD_VERY_OLD = TimeUnit.DAYS.toMillis(90)
+
+}
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/versionChecker/VersionCheckerUtils.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/versionChecker/VersionCheckerUtils.kt
new file mode 100644
index 0000000000..8791030abb
--- /dev/null
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/versionChecker/VersionCheckerUtils.kt
@@ -0,0 +1,111 @@
+package info.nightscout.androidaps.plugins.general.versionChecker
+
+import android.content.Context
+import android.net.ConnectivityManager
+import info.nightscout.androidaps.BuildConfig
+import info.nightscout.androidaps.MainApp
+import info.nightscout.androidaps.R
+import info.nightscout.androidaps.logging.L
+import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification
+import info.nightscout.androidaps.plugins.general.overview.notifications.Notification
+import info.nightscout.androidaps.utils.SP
+import org.apache.http.HttpResponse
+import org.apache.http.client.methods.HttpGet
+import org.apache.http.impl.client.DefaultHttpClient
+import org.slf4j.LoggerFactory
+import java.io.IOException
+import java.io.InputStream
+import java.util.concurrent.TimeUnit
+
+// check network connection
+fun isConnected(): Boolean {
+ val connMgr = MainApp.instance().applicationContext.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
+ return connMgr.activeNetworkInfo?.isConnected ?: false
+}
+
+// convert inputstream to String
+@Throws(IOException::class)
+inline fun InputStream.findVersion(): String? {
+ val regex = "(.*)version(.*)\"(((\\d+)\\.)+(\\d+))\"(.*)".toRegex()
+ return bufferedReader()
+ .readLines()
+ .filter { regex.matches(it) }
+ .mapNotNull { regex.matchEntire(it)?.groupValues?.getOrNull(3) }
+ .firstOrNull()
+}
+
+private val log = LoggerFactory.getLogger(L.CORE)
+
+
+fun triggerCheckVersion() {
+
+ if(!SP.contains(R.string.key_last_time_this_version_detected)) {
+ // On a new installation, set it as 30 days old in order to warn that there is a new version.
+ SP.putLong(R.string.key_last_time_this_version_detected, System.currentTimeMillis() - TimeUnit.DAYS.toMillis(30))
+ }
+
+ // If we are good, only check once every day.
+ if(System.currentTimeMillis() > SP.getLong(R.string.key_last_time_this_version_detected, 0) + CHECK_EVERY){
+ checkVersion()
+ }
+}
+
+@Suppress("DEPRECATION")
+private fun checkVersion() = if (isConnected()) {
+ Thread {
+ try {
+ val request = HttpGet("https://raw.githubusercontent.com/MilosKozak/AndroidAPS/master/app/build.gradle")
+ val response: HttpResponse = DefaultHttpClient().execute(request)
+ val version: String? = response.entity.content?.findVersion()
+ compareWithCurrentVersion(version, BuildConfig.VERSION_NAME)
+ } catch (e: IOException) {
+ log.debug("Github master version check error: $e")
+ }
+ }.start()
+} else
+ log.debug("Github master version no checked. No connectivity")
+
+fun compareWithCurrentVersion(newVersion: String?, currentVersion: String) {
+ val comparison: Int? = newVersion?.versionStrip()?.compareTo(currentVersion.versionStrip())
+ when {
+ comparison == null -> onVersionNotDetectable()
+ comparison == 0 -> onSameVersionDetected()
+ comparison > 0 -> onNewVersionDetected(currentVersion = currentVersion, newVersion = newVersion)
+ else -> onOlderVersionDetected()
+ }
+}
+
+private fun onOlderVersionDetected() {
+ log.debug("Version newer than master. Are you developer?")
+ SP.putLong(R.string.key_last_time_this_version_detected, System.currentTimeMillis())
+}
+
+fun onSameVersionDetected() {
+ SP.putLong(R.string.key_last_time_this_version_detected, System.currentTimeMillis())
+}
+
+fun onVersionNotDetectable() {
+ log.debug("fetch failed, ignore and smartcast to non-null")
+}
+
+fun onNewVersionDetected(currentVersion: String, newVersion: String?) {
+ val now = System.currentTimeMillis()
+ if(now > SP.getLong(R.string.key_last_versionchecker_warning, 0) + WARN_EVERY) {
+ log.debug("Version ${currentVersion} outdated. Found $newVersion")
+ val notification = Notification(Notification.NEWVERSIONDETECTED, String.format(MainApp.gs(R.string.versionavailable), newVersion.toString()), Notification.LOW)
+ MainApp.bus().post(EventNewNotification(notification))
+ SP.putLong(R.string.key_last_versionchecker_warning, now)
+ }
+}
+
+fun String.versionStrip() = this.mapNotNull {
+ when (it) {
+ in '0'..'9' -> it
+ '.' -> it
+ else -> null
+ }
+}.joinToString(separator = "")
+
+
+val CHECK_EVERY = TimeUnit.DAYS.toMillis(1)
+val WARN_EVERY = TimeUnit.DAYS.toMillis(1)
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/ActionStringHandler.java b/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/ActionStringHandler.java
index b92410d67f..1a01a783cd 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/ActionStringHandler.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/ActionStringHandler.java
@@ -625,10 +625,12 @@ public class ActionStringHandler {
}
generateTempTarget(duration, low, high);
} else if ("wizard2".equals(act[0])) {
- //use last calculation as confirmed string matches
+ if (lastBolusWizard != null) {
+ //use last calculation as confirmed string matches
- doBolus(lastBolusWizard.calculatedTotalInsulin, lastBolusWizard.carbs);
- lastBolusWizard = null;
+ doBolus(lastBolusWizard.calculatedTotalInsulin, lastBolusWizard.carbs);
+ lastBolusWizard = null;
+ }
} else if ("bolus".equals(act[0])) {
double insulin = SafeParse.stringToDouble(act[1]);
int carbs = SafeParse.stringToInt(act[2]);
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/wearintegration/WatchUpdaterService.java b/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/wearintegration/WatchUpdaterService.java
index 52dbeed75c..d121c5c55d 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/wearintegration/WatchUpdaterService.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/wear/wearintegration/WatchUpdaterService.java
@@ -32,17 +32,11 @@ import com.google.android.gms.wearable.PutDataRequest;
import com.google.android.gms.wearable.Wearable;
import com.google.android.gms.wearable.WearableListenerService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.ArrayList;
-import java.util.List;
-
import info.nightscout.androidaps.Config;
import info.nightscout.androidaps.Constants;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R;
-import info.nightscout.androidaps.data.GlucoseStatus;
+import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatus;
import info.nightscout.androidaps.data.IobTotal;
import info.nightscout.androidaps.data.Profile;
import info.nightscout.androidaps.db.BgReading;
@@ -55,15 +49,11 @@ import info.nightscout.androidaps.interfaces.PluginType;
import info.nightscout.androidaps.interfaces.TreatmentsInterface;
import info.nightscout.androidaps.plugins.aps.loop.LoopPlugin;
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
-import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
import info.nightscout.androidaps.plugins.general.nsclient.data.NSDeviceStatus;
import info.nightscout.androidaps.plugins.general.overview.OverviewPlugin;
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin;
import info.nightscout.androidaps.plugins.general.wear.ActionStringHandler;
import info.nightscout.androidaps.plugins.general.wear.WearPlugin;
-import info.nightscout.androidaps.plugins.iob.iobCobCalculator.IobCobCalculatorPlugin;
-import info.nightscout.androidaps.plugins.treatments.Treatment;
-import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin;
import info.nightscout.androidaps.utils.DecimalFormatter;
import info.nightscout.androidaps.utils.SP;
import info.nightscout.androidaps.utils.SafeParse;
@@ -482,6 +472,8 @@ public class WatchUpdaterService extends WearableListenerService implements Goog
for (; runningTime < now; runningTime += 5 * 60 * 1000) {
Profile profileTB = ProfileFunctions.getInstance().getProfile(runningTime);
+ if (profileTB == null)
+ return;
//basal rate
endBasalValue = profile.getBasal(runningTime);
if (endBasalValue != beginBasalValue) {
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/AutosensData.java b/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/AutosensData.java
index 6a32c1084b..4b47602f33 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/AutosensData.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/AutosensData.java
@@ -6,6 +6,7 @@ import org.slf4j.LoggerFactory;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
+import java.util.Locale;
import info.nightscout.androidaps.Constants;
import info.nightscout.androidaps.MainApp;
@@ -66,7 +67,7 @@ public class AutosensData implements DataPointWithLabelInterface {
@Override
public String toString() {
- return String.format("CarbsInPast: time: %s carbs: %.02f min5minCI: %.02f remaining: %.2f", new Date(time).toLocaleString(), carbs, min5minCarbImpact, remaining);
+ return String.format(Locale.ENGLISH, "CarbsInPast: time: %s carbs: %.02f min5minCI: %.02f remaining: %.2f", new Date(time).toLocaleString(), carbs, min5minCarbImpact, remaining);
}
}
@@ -101,7 +102,7 @@ public class AutosensData implements DataPointWithLabelInterface {
@Override
public String toString() {
- return String.format("AutosensData: %s pastSensitivity=%s delta=%.02f avgDelta=%.02f bgi=%.02f deviation=%.02f avgDeviation=%.02f absorbed=%.02f carbsFromBolus=%.02f cob=%.02f autosensRatio=%.02f slopeFromMaxDeviation=%.02f slopeFromMinDeviation=%.02f activeCarbsList=%s",
+ return String.format(Locale.ENGLISH, "AutosensData: %s pastSensitivity=%s delta=%.02f avgDelta=%.02f bgi=%.02f deviation=%.02f avgDeviation=%.02f absorbed=%.02f carbsFromBolus=%.02f cob=%.02f autosensRatio=%.02f slopeFromMaxDeviation=%.02f slopeFromMinDeviation=%.02f activeCarbsList=%s",
new Date(time).toLocaleString(), pastSensitivity, delta, avgDelta, bgi, deviation, avgDeviation, absorbed, carbsFromBolus, cob, autosensResult.ratio, slopeFromMaxDeviation, slopeFromMinDeviation, activeCarbsList.toString());
}
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/GlucoseStatus.java b/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/GlucoseStatus.java
new file mode 100644
index 0000000000..191ce9e1cd
--- /dev/null
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/GlucoseStatus.java
@@ -0,0 +1,180 @@
+package info.nightscout.androidaps.plugins.iob.iobCobCalculator;
+
+import android.support.annotation.Nullable;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import info.nightscout.androidaps.db.BgReading;
+import info.nightscout.androidaps.logging.L;
+import info.nightscout.androidaps.utils.DateUtil;
+import info.nightscout.androidaps.utils.DecimalFormatter;
+import info.nightscout.androidaps.utils.Round;
+
+/**
+ * Created by mike on 04.01.2017.
+ */
+
+public class GlucoseStatus {
+ private static Logger log = LoggerFactory.getLogger(GlucoseStatus.class);
+ public double glucose = 0d;
+ public double delta = 0d;
+ public double avgdelta = 0d;
+ public double short_avgdelta = 0d;
+ public double long_avgdelta = 0d;
+ public long date = 0L;
+
+
+ public String log() {
+ return "Glucose: " + DecimalFormatter.to0Decimal(glucose) + " mg/dl " +
+ "Delta: " + DecimalFormatter.to0Decimal(delta) + " mg/dl" +
+ "Short avg. delta: " + " " + DecimalFormatter.to2Decimal(short_avgdelta) + " mg/dl " +
+ "Long avg. delta: " + DecimalFormatter.to2Decimal(long_avgdelta) + " mg/dl";
+ }
+
+ public GlucoseStatus() {
+ }
+
+ public GlucoseStatus round() {
+ this.glucose = Round.roundTo(this.glucose, 0.1);
+ this.delta = Round.roundTo(this.delta, 0.01);
+ this.avgdelta = Round.roundTo(this.avgdelta, 0.01);
+ this.short_avgdelta = Round.roundTo(this.short_avgdelta, 0.01);
+ this.long_avgdelta = Round.roundTo(this.long_avgdelta, 0.01);
+ return this;
+ }
+
+
+ @Nullable
+ public static GlucoseStatus getGlucoseStatusData() {
+ return getGlucoseStatusData(false);
+ }
+
+ @Nullable
+ public static GlucoseStatus getGlucoseStatusData(boolean allowOldData) {
+ // load 45min
+ //long fromtime = DateUtil.now() - 60 * 1000L * 45;
+ //List data = MainApp.getDbHelper().getBgreadingsDataFromTime(fromtime, false);
+
+ synchronized (IobCobCalculatorPlugin.getPlugin().getDataLock()) {
+
+ List data = IobCobCalculatorPlugin.getPlugin().getBgReadings();
+
+ if (data == null) {
+ if (L.isEnabled(L.GLUCOSE))
+ log.debug("data=null");
+ return null;
+ }
+
+ int sizeRecords = data.size();
+ if (sizeRecords == 0) {
+ if (L.isEnabled(L.GLUCOSE))
+ log.debug("sizeRecords==0");
+ return null;
+ }
+
+ if (data.get(0).date < DateUtil.now() - 7 * 60 * 1000L && !allowOldData) {
+ if (L.isEnabled(L.GLUCOSE))
+ log.debug("olddata");
+ return null;
+ }
+
+ BgReading now = data.get(0);
+ long now_date = now.date;
+ double change;
+
+ if (sizeRecords == 1) {
+ GlucoseStatus status = new GlucoseStatus();
+ status.glucose = now.value;
+ status.short_avgdelta = 0d;
+ status.delta = 0d;
+ status.long_avgdelta = 0d;
+ status.avgdelta = 0d; // for OpenAPS MA
+ status.date = now_date;
+ if (L.isEnabled(L.GLUCOSE))
+ log.debug("sizeRecords==1");
+ return status.round();
+ }
+
+ ArrayList now_value_list = new ArrayList<>();
+ ArrayList last_deltas = new ArrayList<>();
+ ArrayList short_deltas = new ArrayList<>();
+ ArrayList long_deltas = new ArrayList<>();
+
+ // Use the latest sgv value in the now calculations
+ now_value_list.add(now.value);
+
+ for (int i = 1; i < sizeRecords; i++) {
+ if (data.get(i).value > 38) {
+ BgReading then = data.get(i);
+ long then_date = then.date;
+ double avgdelta;
+ long minutesago;
+
+ minutesago = Math.round((now_date - then_date) / (1000d * 60));
+ // multiply by 5 to get the same units as delta, i.e. mg/dL/5m
+ change = now.value - then.value;
+ avgdelta = change / minutesago * 5;
+
+ if (L.isEnabled(L.GLUCOSE))
+ log.debug(then.toString() + " minutesago=" + minutesago + " avgdelta=" + avgdelta);
+
+ // use the average of all data points in the last 2.5m for all further "now" calculations
+ if (0 < minutesago && minutesago < 2.5) {
+ // Keep and average all values within the last 2.5 minutes
+ now_value_list.add(then.value);
+ now.value = average(now_value_list);
+ // short_deltas are calculated from everything ~5-15 minutes ago
+ } else if (2.5 < minutesago && minutesago < 17.5) {
+ //console.error(minutesago, avgdelta);
+ short_deltas.add(avgdelta);
+ // last_deltas are calculated from everything ~5 minutes ago
+ if (2.5 < minutesago && minutesago < 7.5) {
+ last_deltas.add(avgdelta);
+ }
+ // long_deltas are calculated from everything ~20-40 minutes ago
+ } else if (17.5 < minutesago && minutesago < 42.5) {
+ long_deltas.add(avgdelta);
+ } else {
+ // Do not process any more records after >= 42.5 minutes
+ break;
+ }
+ }
+ }
+
+ GlucoseStatus status = new GlucoseStatus();
+ status.glucose = now.value;
+ status.date = now_date;
+
+ status.short_avgdelta = average(short_deltas);
+
+ if (last_deltas.isEmpty()) {
+ status.delta = status.short_avgdelta;
+ } else {
+ status.delta = average(last_deltas);
+ }
+
+ status.long_avgdelta = average(long_deltas);
+ status.avgdelta = status.short_avgdelta; // for OpenAPS MA
+
+ if (L.isEnabled(L.GLUCOSE))
+ log.debug(status.log());
+ return status.round();
+ }
+ }
+
+ public static double average(ArrayList array) {
+ double sum = 0d;
+
+ if (array.size() == 0)
+ return 0d;
+
+ for (Double value : array) {
+ sum += value;
+ }
+ return sum / array.size();
+ }
+}
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobCalculatorPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobCalculatorPlugin.java
index aac0985fba..94b687b863 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobCalculatorPlugin.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobCalculatorPlugin.java
@@ -65,7 +65,7 @@ public class IobCobCalculatorPlugin extends PluginBase {
private volatile List bgReadings = null; // newest at index 0
private volatile List bucketed_data = null;
- final Object dataLock = new Object();
+ private final Object dataLock = new Object();
boolean stopCalculationTrigger = false;
private Thread thread = null;
@@ -108,6 +108,10 @@ public class IobCobCalculatorPlugin extends PluginBase {
return bucketed_data;
}
+ public Object getDataLock() {
+ return dataLock;
+ }
+
// roundup to whole minute
public static long roundUpTime(long time) {
if (time % 60000 == 0)
@@ -496,6 +500,10 @@ public class IobCobCalculatorPlugin extends PluginBase {
log.debug("AUTOSENSDATA null: Exception catched (" + reason + ")");
return null;
}
+ if (data == null) {
+ log.debug("AUTOSENSDATA null: data==null");
+ return null;
+ }
if (data.time < System.currentTimeMillis() - 11 * 60 * 1000) {
if (L.isEnabled(L.AUTOSENS))
log.debug("AUTOSENSDATA null: data is old (" + reason + ") size()=" + autosensDataTable.size() + " lastdata=" + DateUtil.dateAndTimeString(data.time));
@@ -626,6 +634,7 @@ public class IobCobCalculatorPlugin extends PluginBase {
log.debug("Invalidating cached data because of new profile. IOB: " + iobTable.size() + " Autosens: " + autosensDataTable.size() + " records");
iobTable = new LongSparseArray<>();
autosensDataTable = new LongSparseArray<>();
+ basalDataTable = new LongSparseArray<>();
}
runCalculation("onNewProfile", System.currentTimeMillis(), false, true, ev);
}
@@ -648,9 +657,10 @@ public class IobCobCalculatorPlugin extends PluginBase {
stopCalculation("onEventPreferenceChange");
synchronized (dataLock) {
if (L.isEnabled(L.AUTOSENS))
- log.debug("Invalidating cached data because of preference change. IOB: " + iobTable.size() + " Autosens: " + autosensDataTable.size() + " records");
+ log.debug("Invalidating cached data because of preference change. IOB: " + iobTable.size() + " Autosens: " + autosensDataTable.size() + " records" + " BasalData: " + basalDataTable.size() + " records");
iobTable = new LongSparseArray<>();
autosensDataTable = new LongSparseArray<>();
+ basalDataTable = new LongSparseArray<>();
}
runCalculation("onEventPreferenceChange", System.currentTimeMillis(), false, true, ev);
}
@@ -726,6 +736,7 @@ public class IobCobCalculatorPlugin extends PluginBase {
log.debug("Clearing cached data.");
iobTable = new LongSparseArray<>();
autosensDataTable = new LongSparseArray<>();
+ basalDataTable = new LongSparseArray<>();
}
}
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobOref1Thread.java b/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobOref1Thread.java
index 6dcb35ef9b..c483ffd2a6 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobOref1Thread.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobOref1Thread.java
@@ -5,8 +5,6 @@ import android.os.PowerManager;
import android.os.SystemClock;
import android.support.v4.util.LongSparseArray;
-import com.crashlytics.android.answers.CustomEvent;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -16,7 +14,6 @@ import java.util.Date;
import java.util.GregorianCalendar;
import java.util.List;
-import info.nightscout.androidaps.BuildConfig;
import info.nightscout.androidaps.Constants;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R;
@@ -26,13 +23,13 @@ import info.nightscout.androidaps.db.BgReading;
import info.nightscout.androidaps.db.TempTarget;
import info.nightscout.androidaps.events.Event;
import info.nightscout.androidaps.logging.L;
+import info.nightscout.androidaps.plugins.aps.openAPSSMB.SMBDefaults;
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
-import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventAutosensCalculationFinished;
-import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventIobCalculationProgress;
-import info.nightscout.androidaps.plugins.aps.openAPSSMB.SMBDefaults;
import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification;
import info.nightscout.androidaps.plugins.general.overview.notifications.Notification;
+import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventAutosensCalculationFinished;
+import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventIobCalculationProgress;
import info.nightscout.androidaps.plugins.treatments.Treatment;
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin;
import info.nightscout.androidaps.utils.DateUtil;
@@ -99,7 +96,7 @@ public class IobCobOref1Thread extends Thread {
long oldestTimeWithData = iobCobCalculatorPlugin.calculateDetectionStart(end, limitDataToOldestAvailable);
- synchronized (iobCobCalculatorPlugin.dataLock) {
+ synchronized (iobCobCalculatorPlugin.getDataLock()) {
if (bgDataReload) {
iobCobCalculatorPlugin.loadBgData(end);
iobCobCalculatorPlugin.createBucketedData();
@@ -224,13 +221,6 @@ public class IobCobOref1Thread extends Thread {
} catch (Exception e) {
log.error("Unhandled exception", e);
FabricPrivacy.logException(e);
- FabricPrivacy.getInstance().logCustom(new CustomEvent("CatchedError")
- .putCustomAttribute("buildversion", BuildConfig.BUILDVERSION)
- .putCustomAttribute("version", BuildConfig.VERSION)
- .putCustomAttribute("autosensDataTable", iobCobCalculatorPlugin.getAutosensDataTable().toString())
- .putCustomAttribute("for_data", ">>>>> bucketed_data.size()=" + bucketed_data.size() + " i=" + i + "hourAgoData=" + hourAgoData.toString())
- .putCustomAttribute("past", past)
- );
log.debug(autosensDataTable.toString());
log.debug(bucketed_data.toString());
log.debug(IobCobCalculatorPlugin.getPlugin().getBgReadings().toString());
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobThread.java b/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobThread.java
index 2970f07aca..9ddf18abb0 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobThread.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/iob/iobCobCalculator/IobCobThread.java
@@ -5,8 +5,6 @@ import android.os.PowerManager;
import android.os.SystemClock;
import android.support.v4.util.LongSparseArray;
-import com.crashlytics.android.answers.CustomEvent;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -14,7 +12,6 @@ import java.util.ArrayList;
import java.util.Date;
import java.util.List;
-import info.nightscout.androidaps.BuildConfig;
import info.nightscout.androidaps.Constants;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R;
@@ -24,13 +21,13 @@ import info.nightscout.androidaps.db.BgReading;
import info.nightscout.androidaps.events.Event;
import info.nightscout.androidaps.interfaces.PluginType;
import info.nightscout.androidaps.logging.L;
+import info.nightscout.androidaps.plugins.aps.openAPSSMB.SMBDefaults;
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
-import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventAutosensCalculationFinished;
-import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventIobCalculationProgress;
-import info.nightscout.androidaps.plugins.aps.openAPSSMB.SMBDefaults;
import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification;
import info.nightscout.androidaps.plugins.general.overview.notifications.Notification;
+import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventAutosensCalculationFinished;
+import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventIobCalculationProgress;
import info.nightscout.androidaps.plugins.sensitivity.SensitivityAAPSPlugin;
import info.nightscout.androidaps.plugins.sensitivity.SensitivityWeightedAveragePlugin;
import info.nightscout.androidaps.plugins.treatments.Treatment;
@@ -98,7 +95,7 @@ public class IobCobThread extends Thread {
long oldestTimeWithData = iobCobCalculatorPlugin.calculateDetectionStart(end, limitDataToOldestAvailable);
- synchronized (iobCobCalculatorPlugin.dataLock) {
+ synchronized (iobCobCalculatorPlugin.getDataLock()) {
if (bgDataReload) {
iobCobCalculatorPlugin.loadBgData(end);
iobCobCalculatorPlugin.createBucketedData();
@@ -223,13 +220,6 @@ public class IobCobThread extends Thread {
} catch (Exception e) {
log.error("Unhandled exception", e);
FabricPrivacy.logException(e);
- FabricPrivacy.getInstance().logCustom(new CustomEvent("CatchedError")
- .putCustomAttribute("buildversion", BuildConfig.BUILDVERSION)
- .putCustomAttribute("version", BuildConfig.VERSION)
- .putCustomAttribute("autosensDataTable", iobCobCalculatorPlugin.getAutosensDataTable().toString())
- .putCustomAttribute("for_data", ">>>>> bucketed_data.size()=" + bucketed_data.size() + " i=" + i + "hourAgoData=" + hourAgoData.toString())
- .putCustomAttribute("past", past)
- );
log.debug(autosensDataTable.toString());
log.debug(bucketed_data.toString());
log.debug(IobCobCalculatorPlugin.getPlugin().getBgReadings().toString());
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingBasal.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingBasal.java
index dc05848b34..68dcf089c0 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingBasal.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingBasal.java
@@ -3,6 +3,8 @@ package info.nightscout.androidaps.plugins.pump.danaR.comm;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.util.Locale;
+
import info.nightscout.androidaps.logging.L;
import info.nightscout.androidaps.plugins.pump.danaR.DanaRPlugin;
import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump;
@@ -31,7 +33,7 @@ public class MsgSettingBasal extends MessageBase {
if (L.isEnabled(L.PUMPCOMM))
for (int index = 0; index < 24; index++) {
- log.debug("Basal " + String.format("%02d", index) + "h: " + pump.pumpProfiles[pump.activeProfile][index]);
+ log.debug("Basal " + String.format(Locale.ENGLISH, "%02d", index) + "h: " + pump.pumpProfiles[pump.activeProfile][index]);
}
}
}
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingBasalProfileAll.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingBasalProfileAll.java
index 89a4228ab7..9c471a3a00 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingBasalProfileAll.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingBasalProfileAll.java
@@ -3,6 +3,8 @@ package info.nightscout.androidaps.plugins.pump.danaR.comm;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.util.Locale;
+
import info.nightscout.androidaps.logging.L;
import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump;
@@ -55,7 +57,7 @@ public class MsgSettingBasalProfileAll extends MessageBase {
for (int profile = 0; profile < 4; profile++) {
for (int index = 0; index < 48; index++) {
try {
- log.debug("Basal profile " + profile + ": " + String.format("%02d", index) + "h: " + pump.pumpProfiles[profile][index]);
+ log.debug("Basal profile " + profile + ": " + String.format(Locale.ENGLISH, "%02d", index) + "h: " + pump.pumpProfiles[profile][index]);
} catch (Exception e){
log.error("Unhandled exception" , e);
}
@@ -67,8 +69,8 @@ public class MsgSettingBasalProfileAll extends MessageBase {
//this is absurd pump.pumpProfiles[profile][index] returns nullPointerException
try {
log.debug("Basal profile " + profile + ": " +
- String.format("%02d", (index / 2)) +
- ":" + String.format("%02d", (index % 2) * 30) + " : " +
+ String.format(Locale.ENGLISH, "%02d", (index / 2)) +
+ ":" + String.format(Locale.ENGLISH, "%02d", (index % 2) * 30) + " : " +
pump.pumpProfiles[profile][index]);
} catch (Exception e){
log.error("Unhandled exception" , e);
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/services/DanaRExecutionService.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/services/DanaRExecutionService.java
index 4c61c92a4f..22d98368a6 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/services/DanaRExecutionService.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/services/DanaRExecutionService.java
@@ -18,14 +18,14 @@ import info.nightscout.androidaps.data.PumpEnactResult;
import info.nightscout.androidaps.events.EventAppExit;
import info.nightscout.androidaps.events.EventInitializationChanged;
import info.nightscout.androidaps.events.EventPreferenceChange;
-import info.nightscout.androidaps.events.EventProfileSwitchChange;
+import info.nightscout.androidaps.events.EventProfileNeedsUpdate;
import info.nightscout.androidaps.events.EventPumpStatusChanged;
import info.nightscout.androidaps.interfaces.PumpInterface;
import info.nightscout.androidaps.logging.L;
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
import info.nightscout.androidaps.plugins.general.nsclient.NSUpload;
-import info.nightscout.androidaps.plugins.general.overview.Dialogs.BolusProgressDialog;
+import info.nightscout.androidaps.plugins.general.overview.dialogs.BolusProgressDialog;
import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification;
import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress;
import info.nightscout.androidaps.plugins.general.overview.notifications.Notification;
@@ -166,7 +166,7 @@ public class DanaRExecutionService extends AbstractDanaRExecutionService {
MainApp.bus().post(new EventPumpStatusChanged(MainApp.gs(R.string.gettingpumpsettings)));
mSerialIOThread.sendMessage(new MsgSettingBasal());
if (!pump.isThisProfileSet(profile) && !ConfigBuilderPlugin.getPlugin().getCommandQueue().isRunning(Command.CommandType.BASALPROFILE)) {
- MainApp.bus().post(new EventProfileSwitchChange());
+ MainApp.bus().post(new EventProfileNeedsUpdate());
}
}
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/comm/MsgSettingBasalProfileAll_k.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/comm/MsgSettingBasalProfileAll_k.java
index cb131634ec..85591d4655 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/comm/MsgSettingBasalProfileAll_k.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/comm/MsgSettingBasalProfileAll_k.java
@@ -3,6 +3,8 @@ package info.nightscout.androidaps.plugins.pump.danaRKorean.comm;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.util.Locale;
+
import info.nightscout.androidaps.logging.L;
import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump;
import info.nightscout.androidaps.plugins.pump.danaR.comm.MessageBase;
@@ -55,15 +57,15 @@ public class MsgSettingBasalProfileAll_k extends MessageBase {
if (pump.basal48Enable) {
for (int profile = 0; profile < 4; profile++) {
for (int index = 0; index < 24; index++) {
- log.debug("Basal profile " + profile + ": " + String.format("%02d", index) + "h: " + pump.pumpProfiles[profile][index]);
+ log.debug("Basal profile " + profile + ": " + String.format(Locale.ENGLISH, "%02d", index) + "h: " + pump.pumpProfiles[profile][index]);
}
}
} else {
for (int profile = 0; profile < 4; profile++) {
for (int index = 0; index < 48; index++) {
log.debug("Basal profile " + profile + ": " +
- String.format("%02d", (index / 2)) +
- ":" + String.format("%02d", (index % 2) * 30) + " : " +
+ String.format(Locale.ENGLISH, "%02d", (index / 2)) +
+ ":" + String.format(Locale.ENGLISH, "%02d", (index % 2) * 30) + " : " +
pump.pumpProfiles[profile][index]);
}
}
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/comm/MsgSettingBasal_k.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/comm/MsgSettingBasal_k.java
index 99ad848289..b3ba918a4a 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/comm/MsgSettingBasal_k.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/comm/MsgSettingBasal_k.java
@@ -3,6 +3,8 @@ package info.nightscout.androidaps.plugins.pump.danaRKorean.comm;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.util.Locale;
+
import info.nightscout.androidaps.logging.L;
import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump;
import info.nightscout.androidaps.plugins.pump.danaR.comm.MessageBase;
@@ -32,7 +34,7 @@ public class MsgSettingBasal_k extends MessageBase {
if (L.isEnabled(L.PUMPCOMM))
for (int index = 0; index < 24; index++) {
- log.debug("Basal " + String.format("%02d", index) + "h: " + pump.pumpProfiles[pump.activeProfile][index]);
+ log.debug("Basal " + String.format(Locale.ENGLISH, "%02d", index) + "h: " + pump.pumpProfiles[pump.activeProfile][index]);
}
}
}
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/services/DanaRKoreanExecutionService.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/services/DanaRKoreanExecutionService.java
index 056d336805..749b977c2c 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/services/DanaRKoreanExecutionService.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/services/DanaRKoreanExecutionService.java
@@ -18,14 +18,14 @@ import info.nightscout.androidaps.data.PumpEnactResult;
import info.nightscout.androidaps.events.EventAppExit;
import info.nightscout.androidaps.events.EventInitializationChanged;
import info.nightscout.androidaps.events.EventPreferenceChange;
-import info.nightscout.androidaps.events.EventProfileSwitchChange;
+import info.nightscout.androidaps.events.EventProfileNeedsUpdate;
import info.nightscout.androidaps.events.EventPumpStatusChanged;
import info.nightscout.androidaps.interfaces.PumpInterface;
import info.nightscout.androidaps.logging.L;
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
import info.nightscout.androidaps.plugins.general.nsclient.NSUpload;
-import info.nightscout.androidaps.plugins.general.overview.Dialogs.BolusProgressDialog;
+import info.nightscout.androidaps.plugins.general.overview.dialogs.BolusProgressDialog;
import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification;
import info.nightscout.androidaps.plugins.general.overview.notifications.Notification;
import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump;
@@ -171,7 +171,7 @@ public class DanaRKoreanExecutionService extends AbstractDanaRExecutionService {
MainApp.bus().post(new EventPumpStatusChanged(MainApp.gs(R.string.gettingpumpsettings)));
mSerialIOThread.sendMessage(new MsgSettingBasal());
if (!pump.isThisProfileSet(profile) && !ConfigBuilderPlugin.getPlugin().getCommandQueue().isRunning(Command.CommandType.BASALPROFILE)) {
- MainApp.bus().post(new EventProfileSwitchChange());
+ MainApp.bus().post(new EventProfileNeedsUpdate());
}
}
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Get_Basal_Rate.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Get_Basal_Rate.java
index 5cbda121ce..eb89cd5d10 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Get_Basal_Rate.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Get_Basal_Rate.java
@@ -6,6 +6,8 @@ import com.cozmo.danar.util.BleCommandUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.util.Locale;
+
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R;
import info.nightscout.androidaps.logging.L;
@@ -49,7 +51,7 @@ public class DanaRS_Packet_Basal_Get_Basal_Rate extends DanaRS_Packet {
log.debug("Max basal: " + pump.maxBasal + " U");
log.debug("Basal step: " + pump.basalStep + " U");
for (int index = 0; index < 24; index++)
- log.debug("Basal " + String.format("%02d", index) + "h: " + pump.pumpProfiles[pump.activeProfile][index]);
+ log.debug("Basal " + String.format(Locale.ENGLISH, "%02d", index) + "h: " + pump.pumpProfiles[pump.activeProfile][index]);
}
if (pump.basalStep != 0.01d) {
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Get_Profile_Basal_Rate.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Get_Profile_Basal_Rate.java
index 04aa4cefb3..778b794b2a 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Get_Profile_Basal_Rate.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Get_Profile_Basal_Rate.java
@@ -5,6 +5,8 @@ import com.cozmo.danar.util.BleCommandUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.util.Locale;
+
import info.nightscout.androidaps.logging.L;
import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump;
@@ -51,7 +53,7 @@ public class DanaRS_Packet_Basal_Get_Profile_Basal_Rate extends DanaRS_Packet {
}
if (L.isEnabled(L.PUMPCOMM)) {
for (int index = 0; index < 24; index++)
- log.debug("Basal " + String.format("%02d", index) + "h: " + pump.pumpProfiles[profileNumber][index]);
+ log.debug("Basal " + String.format(Locale.ENGLISH, "%02d", index) + "h: " + pump.pumpProfiles[profileNumber][index]);
}
}
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/services/DanaRSService.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/services/DanaRSService.java
index 47b1fbfe2a..06a3a651ca 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/services/DanaRSService.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/services/DanaRSService.java
@@ -20,14 +20,14 @@ import info.nightscout.androidaps.data.Profile;
import info.nightscout.androidaps.data.PumpEnactResult;
import info.nightscout.androidaps.events.EventAppExit;
import info.nightscout.androidaps.events.EventInitializationChanged;
-import info.nightscout.androidaps.events.EventProfileSwitchChange;
+import info.nightscout.androidaps.events.EventProfileNeedsUpdate;
import info.nightscout.androidaps.events.EventPumpStatusChanged;
import info.nightscout.androidaps.interfaces.PumpInterface;
import info.nightscout.androidaps.logging.L;
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
-import info.nightscout.androidaps.plugins.general.overview.Dialogs.BolusProgressDialog;
-import info.nightscout.androidaps.plugins.general.overview.Dialogs.ErrorHelperActivity;
+import info.nightscout.androidaps.plugins.general.overview.dialogs.BolusProgressDialog;
+import info.nightscout.androidaps.plugins.general.overview.dialogs.ErrorHelperActivity;
import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification;
import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress;
import info.nightscout.androidaps.plugins.general.overview.notifications.Notification;
@@ -149,7 +149,7 @@ public class DanaRSService extends Service {
MainApp.bus().post(new EventPumpStatusChanged(MainApp.gs(R.string.gettingpumpsettings)));
bleComm.sendMessage(new DanaRS_Packet_Basal_Get_Basal_Rate()); // basal profile, basalStep, maxBasal
if (!pump.isThisProfileSet(profile) && !ConfigBuilderPlugin.getPlugin().getCommandQueue().isRunning(Command.CommandType.BASALPROFILE)) {
- MainApp.bus().post(new EventProfileSwitchChange());
+ MainApp.bus().post(new EventProfileNeedsUpdate());
}
}
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRv2/services/DanaRv2ExecutionService.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRv2/services/DanaRv2ExecutionService.java
index 8cabb8959d..2d2d2526dd 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRv2/services/DanaRv2ExecutionService.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRv2/services/DanaRv2ExecutionService.java
@@ -19,15 +19,15 @@ import info.nightscout.androidaps.data.PumpEnactResult;
import info.nightscout.androidaps.events.EventAppExit;
import info.nightscout.androidaps.events.EventInitializationChanged;
import info.nightscout.androidaps.events.EventPreferenceChange;
-import info.nightscout.androidaps.events.EventProfileSwitchChange;
+import info.nightscout.androidaps.events.EventProfileNeedsUpdate;
import info.nightscout.androidaps.events.EventPumpStatusChanged;
import info.nightscout.androidaps.interfaces.PumpInterface;
import info.nightscout.androidaps.logging.L;
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
import info.nightscout.androidaps.plugins.general.nsclient.NSUpload;
-import info.nightscout.androidaps.plugins.general.overview.Dialogs.BolusProgressDialog;
-import info.nightscout.androidaps.plugins.general.overview.Dialogs.ErrorHelperActivity;
+import info.nightscout.androidaps.plugins.general.overview.dialogs.BolusProgressDialog;
+import info.nightscout.androidaps.plugins.general.overview.dialogs.ErrorHelperActivity;
import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification;
import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress;
import info.nightscout.androidaps.plugins.general.overview.notifications.Notification;
@@ -188,7 +188,7 @@ public class DanaRv2ExecutionService extends AbstractDanaRExecutionService {
MainApp.bus().post(new EventPumpStatusChanged(MainApp.gs(R.string.gettingpumpsettings)));
mSerialIOThread.sendMessage(new MsgSettingBasal());
if (!pump.isThisProfileSet(profile) && !ConfigBuilderPlugin.getPlugin().getCommandQueue().isRunning(Command.CommandType.BASALPROFILE)) {
- MainApp.bus().post(new EventProfileSwitchChange());
+ MainApp.bus().post(new EventProfileNeedsUpdate());
}
}
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/treatments/CarbsGenerator.java b/app/src/main/java/info/nightscout/androidaps/plugins/treatments/CarbsGenerator.java
index 33b58e46cf..ac9be50a23 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/treatments/CarbsGenerator.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/treatments/CarbsGenerator.java
@@ -9,7 +9,7 @@ import info.nightscout.androidaps.data.DetailedBolusInfo;
import info.nightscout.androidaps.db.CareportalEvent;
import info.nightscout.androidaps.db.Source;
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
-import info.nightscout.androidaps.plugins.general.overview.Dialogs.ErrorHelperActivity;
+import info.nightscout.androidaps.plugins.general.overview.dialogs.ErrorHelperActivity;
import info.nightscout.androidaps.queue.Callback;
import info.nightscout.androidaps.utils.T;
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/treatments/TreatmentsPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/treatments/TreatmentsPlugin.java
index e176553a6a..2c94d6713d 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/treatments/TreatmentsPlugin.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/treatments/TreatmentsPlugin.java
@@ -1,9 +1,10 @@
package info.nightscout.androidaps.plugins.treatments;
import android.content.Intent;
+import android.os.Bundle;
import android.support.annotation.Nullable;
-import com.crashlytics.android.answers.CustomEvent;
+import com.google.firebase.analytics.FirebaseAnalytics;
import com.squareup.otto.Subscribe;
import org.slf4j.Logger;
@@ -37,20 +38,21 @@ import info.nightscout.androidaps.interfaces.InsulinInterface;
import info.nightscout.androidaps.interfaces.PluginBase;
import info.nightscout.androidaps.interfaces.PluginDescription;
import info.nightscout.androidaps.interfaces.PluginType;
+import info.nightscout.androidaps.interfaces.PumpInterface;
import info.nightscout.androidaps.interfaces.TreatmentsInterface;
import info.nightscout.androidaps.logging.L;
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
-import info.nightscout.androidaps.plugins.iob.iobCobCalculator.AutosensData;
-import info.nightscout.androidaps.plugins.iob.iobCobCalculator.IobCobCalculatorPlugin;
-import info.nightscout.androidaps.plugins.general.overview.Dialogs.ErrorHelperActivity;
+import info.nightscout.androidaps.plugins.general.nsclient.NSUpload;
+import info.nightscout.androidaps.plugins.general.overview.dialogs.ErrorHelperActivity;
import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification;
import info.nightscout.androidaps.plugins.general.overview.notifications.Notification;
+import info.nightscout.androidaps.plugins.iob.iobCobCalculator.AutosensData;
+import info.nightscout.androidaps.plugins.iob.iobCobCalculator.IobCobCalculatorPlugin;
import info.nightscout.androidaps.plugins.sensitivity.SensitivityAAPSPlugin;
import info.nightscout.androidaps.plugins.sensitivity.SensitivityWeightedAveragePlugin;
import info.nightscout.androidaps.utils.DateUtil;
import info.nightscout.androidaps.utils.FabricPrivacy;
-import info.nightscout.androidaps.plugins.general.nsclient.NSUpload;
import info.nightscout.androidaps.utils.SP;
import info.nightscout.androidaps.utils.T;
@@ -184,7 +186,11 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
InsulinInterface insulinInterface = ConfigBuilderPlugin.getPlugin().getActiveInsulin();
if (insulinInterface == null)
- return total;
+ return total;
+
+ PumpInterface pumpInterface = ConfigBuilderPlugin.getPlugin().getActivePump();
+ if (pumpInterface == null)
+ return total;
double dia = profile.getDia();
@@ -209,7 +215,7 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
}
}
- if (!ConfigBuilderPlugin.getPlugin().getActivePump().isFakingTempsByExtendedBoluses())
+ if (!pumpInterface.isFakingTempsByExtendedBoluses())
synchronized (extendedBoluses) {
for (Integer pos = 0; pos < extendedBoluses.size(); pos++) {
ExtendedBolus e = extendedBoluses.get(pos);
@@ -259,7 +265,7 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
if (t > absorptionTime_ago && t <= now) {
if (treatment.carbs >= 1) {
result.carbs += treatment.carbs;
- if(t > result.lastCarbTime)
+ if (t > result.lastCarbTime)
result.lastCarbTime = t;
}
}
@@ -312,7 +318,7 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
}
}
if (L.isEnabled(L.DATATREATMENTS))
- log.debug("Last bolus time: " + new Date(last).toLocaleString());
+ log.debug("Last bolus time: " + new Date(last).toLocaleString());
return last;
}
@@ -341,7 +347,7 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
@Subscribe
public void onStatusEvent(final EventReloadTreatmentData ev) {
if (L.isEnabled(L.DATATREATMENTS))
- log.debug("EventReloadTreatmentData");
+ log.debug("EventReloadTreatmentData");
initializeTreatmentData();
initializeExtendedBolusData();
updateTotalIOBTreatments();
@@ -352,7 +358,7 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
@SuppressWarnings("unused")
public void onStatusEvent(final EventReloadTempBasalData ev) {
if (L.isEnabled(L.DATATREATMENTS))
- log.debug("EventReloadTempBasalData");
+ log.debug("EventReloadTempBasalData");
initializeTempBasalData();
updateTotalIOBTempBasals();
}
@@ -372,14 +378,14 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
InsulinInterface insulinInterface = ConfigBuilderPlugin.getPlugin().getActiveInsulin();
if (insulinInterface == null)
- return total;
+ return total;
synchronized (tempBasals) {
for (Integer pos = 0; pos < tempBasals.size(); pos++) {
TemporaryBasal t = tempBasals.get(pos);
if (t.date > time) continue;
IobTotal calc;
- if(truncate && t.end() > truncateTime){
+ if (truncate && t.end() > truncateTime) {
TemporaryBasal dummyTemp = new TemporaryBasal();
dummyTemp.copyFrom(t);
dummyTemp.cutEndTo(truncateTime);
@@ -398,7 +404,7 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
ExtendedBolus e = extendedBoluses.get(pos);
if (e.date > time) continue;
IobTotal calc;
- if(truncate && e.end() > truncateTime){
+ if (truncate && e.end() > truncateTime) {
ExtendedBolus dummyExt = new ExtendedBolus();
dummyExt.copyFrom(e);
dummyExt.cutEndTo(truncateTime);
@@ -535,9 +541,10 @@ public class TreatmentsPlugin extends PluginBase implements TreatmentsInterface
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
MainApp.instance().startActivity(i);
- CustomEvent customEvent = new CustomEvent("TreatmentClash");
- customEvent.putCustomAttribute("status", status);
- FabricPrivacy.getInstance().logCustom(customEvent);
+ Bundle bundle = new Bundle();
+ bundle.putString(FirebaseAnalytics.Param.ITEM_ID, "TreatmentClash");
+ bundle.putString(FirebaseAnalytics.Param.VALUE, status);
+ FabricPrivacy.getInstance().logCustom(bundle);
}
return newRecordCreated;
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/treatments/fragments/TreatmentsBolusFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/treatments/fragments/TreatmentsBolusFragment.java
index 64e93f3f95..26a8494dd7 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/treatments/fragments/TreatmentsBolusFragment.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/treatments/fragments/TreatmentsBolusFragment.java
@@ -18,7 +18,6 @@ import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;
-import com.crashlytics.android.answers.CustomEvent;
import com.squareup.otto.Subscribe;
import java.util.List;
@@ -40,7 +39,6 @@ import info.nightscout.androidaps.plugins.treatments.dialogs.WizardInfoDialog;
import info.nightscout.androidaps.services.Intents;
import info.nightscout.androidaps.utils.DateUtil;
import info.nightscout.androidaps.utils.DecimalFormatter;
-import info.nightscout.androidaps.utils.FabricPrivacy;
import info.nightscout.androidaps.utils.SP;
import static info.nightscout.androidaps.utils.DateUtil.now;
@@ -165,7 +163,6 @@ public class TreatmentsBolusFragment extends SubscriberFragment implements View.
TreatmentsPlugin.getPlugin().getService().delete(treatment);
}
updateGUI();
- FabricPrivacy.getInstance().logCustom(new CustomEvent("RemoveTreatment"));
}
});
builder.setNegativeButton(MainApp.gs(R.string.cancel), null);
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/treatments/fragments/TreatmentsExtendedBolusesFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/treatments/fragments/TreatmentsExtendedBolusesFragment.java
index 93f2a64006..766190e378 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/treatments/fragments/TreatmentsExtendedBolusesFragment.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/treatments/fragments/TreatmentsExtendedBolusesFragment.java
@@ -15,7 +15,6 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
-import com.crashlytics.android.answers.CustomEvent;
import com.squareup.otto.Subscribe;
import info.nightscout.androidaps.MainApp;
@@ -32,7 +31,6 @@ import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventAutos
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin;
import info.nightscout.androidaps.utils.DateUtil;
import info.nightscout.androidaps.utils.DecimalFormatter;
-import info.nightscout.androidaps.utils.FabricPrivacy;
public class TreatmentsExtendedBolusesFragment extends SubscriberFragment {
@@ -150,7 +148,6 @@ public class TreatmentsExtendedBolusesFragment extends SubscriberFragment {
UploadQueue.removeID("dbAdd", _id);
}
MainApp.getDbHelper().delete(extendedBolus);
- FabricPrivacy.getInstance().logCustom(new CustomEvent("RemoveExtendedBolus"));
}
});
builder.setNegativeButton(MainApp.gs(R.string.cancel), null);
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/treatments/fragments/TreatmentsProfileSwitchFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/treatments/fragments/TreatmentsProfileSwitchFragment.java
index 5da86217f0..c59d5e1836 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/treatments/fragments/TreatmentsProfileSwitchFragment.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/treatments/fragments/TreatmentsProfileSwitchFragment.java
@@ -27,13 +27,13 @@ import java.util.List;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R;
+import info.nightscout.androidaps.events.EventProfileNeedsUpdate;
import info.nightscout.androidaps.logging.L;
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
import info.nightscout.androidaps.services.Intents;
import info.nightscout.androidaps.data.Profile;
import info.nightscout.androidaps.db.ProfileSwitch;
import info.nightscout.androidaps.db.Source;
-import info.nightscout.androidaps.events.EventProfileSwitchChange;
import info.nightscout.androidaps.plugins.common.SubscriberFragment;
import info.nightscout.androidaps.plugins.general.nsclient.UploadQueue;
import info.nightscout.androidaps.utils.DateUtil;
@@ -216,7 +216,7 @@ public class TreatmentsProfileSwitchFragment extends SubscriberFragment implemen
}
@Subscribe
- public void onStatusEvent(final EventProfileSwitchChange ev) {
+ public void onStatusEvent(final EventProfileNeedsUpdate ev) {
updateGUI();
}
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/treatments/fragments/TreatmentsTemporaryBasalsFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/treatments/fragments/TreatmentsTemporaryBasalsFragment.java
index b928263ed5..7b935d354e 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/treatments/fragments/TreatmentsTemporaryBasalsFragment.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/treatments/fragments/TreatmentsTemporaryBasalsFragment.java
@@ -15,7 +15,6 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
-import com.crashlytics.android.answers.CustomEvent;
import com.squareup.otto.Subscribe;
import info.nightscout.androidaps.MainApp;
@@ -34,7 +33,6 @@ import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventAutos
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin;
import info.nightscout.androidaps.utils.DateUtil;
import info.nightscout.androidaps.utils.DecimalFormatter;
-import info.nightscout.androidaps.utils.FabricPrivacy;
public class TreatmentsTemporaryBasalsFragment extends SubscriberFragment {
@@ -175,7 +173,6 @@ public class TreatmentsTemporaryBasalsFragment extends SubscriberFragment {
UploadQueue.removeID("dbAdd", _id);
}
MainApp.getDbHelper().delete(tempBasal);
- FabricPrivacy.getInstance().logCustom(new CustomEvent("RemoveTempBasal"));
});
builder.setNegativeButton(MainApp.gs(R.string.cancel), null);
builder.show();
diff --git a/app/src/main/java/info/nightscout/androidaps/queue/CommandQueue.java b/app/src/main/java/info/nightscout/androidaps/queue/CommandQueue.java
index eee92177ab..e4fbacc43c 100644
--- a/app/src/main/java/info/nightscout/androidaps/queue/CommandQueue.java
+++ b/app/src/main/java/info/nightscout/androidaps/queue/CommandQueue.java
@@ -23,8 +23,8 @@ import info.nightscout.androidaps.interfaces.PumpInterface;
import info.nightscout.androidaps.logging.L;
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
-import info.nightscout.androidaps.plugins.general.overview.Dialogs.BolusProgressDialog;
-import info.nightscout.androidaps.plugins.general.overview.Dialogs.BolusProgressHelperActivity;
+import info.nightscout.androidaps.plugins.general.overview.dialogs.BolusProgressDialog;
+import info.nightscout.androidaps.plugins.general.overview.dialogs.BolusProgressHelperActivity;
import info.nightscout.androidaps.plugins.general.overview.events.EventDismissBolusprogressIfRunning;
import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification;
import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification;
@@ -381,7 +381,7 @@ public class CommandQueue {
Notification notification = new Notification(Notification.NOT_ENG_MODE_OR_RELEASE, MainApp.gs(R.string.not_eng_mode_or_release), Notification.URGENT);
MainApp.bus().post(new EventNewNotification(notification));
if (callback != null)
- callback.result(new PumpEnactResult().success(false).comment(MainApp.gs(R.string.not_eng_mode_or_release))).run();
+ callback.result(new PumpEnactResult().success(false).enacted(false).comment(MainApp.gs(R.string.not_eng_mode_or_release))).run();
return false;
}
@@ -394,7 +394,7 @@ public class CommandQueue {
Notification notification = new Notification(Notification.BASAL_VALUE_BELOW_MINIMUM, MainApp.gs(R.string.basalvaluebelowminimum), Notification.URGENT);
MainApp.bus().post(new EventNewNotification(notification));
if (callback != null)
- callback.result(new PumpEnactResult().success(false).comment(MainApp.gs(R.string.basalvaluebelowminimum))).run();
+ callback.result(new PumpEnactResult().success(false).enacted(false).comment(MainApp.gs(R.string.basalvaluebelowminimum))).run();
return false;
}
}
diff --git a/app/src/main/java/info/nightscout/androidaps/queue/QueueThread.java b/app/src/main/java/info/nightscout/androidaps/queue/QueueThread.java
index c6aaab43b7..0962952221 100644
--- a/app/src/main/java/info/nightscout/androidaps/queue/QueueThread.java
+++ b/app/src/main/java/info/nightscout/androidaps/queue/QueueThread.java
@@ -18,6 +18,7 @@ import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
import info.nightscout.androidaps.plugins.general.overview.events.EventDismissBolusprogressIfRunning;
import info.nightscout.androidaps.queue.events.EventQueueChanged;
import info.nightscout.androidaps.utils.SP;
+import info.nightscout.androidaps.utils.T;
/**
* Created by mike on 09.11.2017.
@@ -28,9 +29,8 @@ public class QueueThread extends Thread {
private CommandQueue queue;
- private long lastCommandTime = 0;
private boolean connectLogged = false;
- public boolean waitingForDisconnect = false;
+ boolean waitingForDisconnect = false;
private PowerManager.WakeLock mWakeLock;
@@ -41,14 +41,17 @@ public class QueueThread extends Thread {
Context context = MainApp.instance().getApplicationContext();
if (context != null) {
PowerManager powerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
- mWakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "QueueThread");
+ if (powerManager != null)
+ mWakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "AndroidAPS:QueueThread");
}
}
@Override
public final void run() {
- mWakeLock.acquire();
+ if (mWakeLock != null)
+ mWakeLock.acquire(T.mins(10).msecs());
MainApp.bus().post(new EventQueueChanged());
+ long lastCommandTime;
long connectionStartTime = lastCommandTime = System.currentTimeMillis();
try {
@@ -72,7 +75,7 @@ public class QueueThread extends Thread {
//BLUETOOTH-WATCHDOG
boolean watchdog = SP.getBoolean(R.string.key_btwatchdog, false);
- long last_watchdog = SP.getLong(R.string.key_btwatchdog_lastbark, 0l);
+ long last_watchdog = SP.getLong(R.string.key_btwatchdog_lastbark, 0L);
watchdog = watchdog && System.currentTimeMillis() - last_watchdog > (Constants.MIN_WATCHDOG_INTERVAL_IN_SECONDS * 1000);
if (watchdog) {
if (L.isEnabled(L.PUMPQUEUE))
@@ -170,7 +173,8 @@ public class QueueThread extends Thread {
}
}
} finally {
- mWakeLock.release();
+ if (mWakeLock != null)
+ mWakeLock.release();
if (L.isEnabled(L.PUMPQUEUE))
log.debug("thread end");
}
diff --git a/app/src/main/java/info/nightscout/androidaps/queue/commands/CommandBolus.java b/app/src/main/java/info/nightscout/androidaps/queue/commands/CommandBolus.java
index 1ce11dd359..4dc132e128 100644
--- a/app/src/main/java/info/nightscout/androidaps/queue/commands/CommandBolus.java
+++ b/app/src/main/java/info/nightscout/androidaps/queue/commands/CommandBolus.java
@@ -8,7 +8,7 @@ import info.nightscout.androidaps.data.DetailedBolusInfo;
import info.nightscout.androidaps.data.PumpEnactResult;
import info.nightscout.androidaps.logging.L;
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
-import info.nightscout.androidaps.plugins.general.overview.Dialogs.BolusProgressDialog;
+import info.nightscout.androidaps.plugins.general.overview.dialogs.BolusProgressDialog;
import info.nightscout.androidaps.plugins.general.overview.events.EventDismissBolusprogressIfRunning;
import info.nightscout.androidaps.queue.Callback;
import info.nightscout.androidaps.utils.DecimalFormatter;
diff --git a/app/src/main/java/info/nightscout/androidaps/receivers/KeepAliveReceiver.java b/app/src/main/java/info/nightscout/androidaps/receivers/KeepAliveReceiver.java
index d6d9bb5fcb..7a9aa31c46 100644
--- a/app/src/main/java/info/nightscout/androidaps/receivers/KeepAliveReceiver.java
+++ b/app/src/main/java/info/nightscout/androidaps/receivers/KeepAliveReceiver.java
@@ -7,15 +7,13 @@ import android.content.Context;
import android.content.Intent;
import android.os.PowerManager;
-import com.crashlytics.android.answers.CustomEvent;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import info.nightscout.androidaps.Constants;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.data.Profile;
-import info.nightscout.androidaps.events.EventProfileSwitchChange;
+import info.nightscout.androidaps.events.EventProfileNeedsUpdate;
import info.nightscout.androidaps.interfaces.PumpInterface;
import info.nightscout.androidaps.logging.L;
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
@@ -46,13 +44,12 @@ public class KeepAliveReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent rIntent) {
PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
- PowerManager.WakeLock wl = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "");
+ PowerManager.WakeLock wl = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "AndroidAPS:KeepAliveReciever");
wl.acquire();
LocalAlertUtils.shortenSnoozeInterval();
LocalAlertUtils.checkStaleBGAlert();
checkPump();
- FabricPrivacy.uploadDailyStats();
if (L.isEnabled(L.CORE))
log.debug("KeepAlive received");
@@ -76,7 +73,7 @@ public class KeepAliveReceiver extends BroadcastReceiver {
}
if (!pump.isThisProfileSet(profile) && !ConfigBuilderPlugin.getPlugin().getCommandQueue().isRunning(Command.CommandType.BASALPROFILE)) {
- MainApp.bus().post(new EventProfileSwitchChange());
+ MainApp.bus().post(new EventProfileNeedsUpdate());
} else if (isStatusOutdated && !pump.isBusy()) {
lastReadStatus = System.currentTimeMillis();
ConfigBuilderPlugin.getPlugin().getCommandQueue().readStatus("KeepAlive. Status outdated.", null);
@@ -87,7 +84,7 @@ public class KeepAliveReceiver extends BroadcastReceiver {
}
if (lastRun != 0 && System.currentTimeMillis() - lastRun > T.mins(10).msecs()) {
log.error("KeepAlive fail");
- FabricPrivacy.getInstance().logCustom(new CustomEvent("KeepAliveFail"));
+ FabricPrivacy.getInstance().logCustom("KeepAliveFail");
}
lastRun = System.currentTimeMillis();
}
diff --git a/app/src/main/java/info/nightscout/androidaps/receivers/SmsReceiver.java b/app/src/main/java/info/nightscout/androidaps/receivers/SmsReceiver.java
new file mode 100644
index 0000000000..f527375349
--- /dev/null
+++ b/app/src/main/java/info/nightscout/androidaps/receivers/SmsReceiver.java
@@ -0,0 +1,7 @@
+package info.nightscout.androidaps.receivers;
+
+/**
+ * Forward received SMS intents. This is a separate class, because unlike local broadcasts handled by DataReceiver,
+ * receiving SMS requires a special permission in the manifest, which necessitates a separate receiver.
+ */
+public class SmsReceiver extends DataReceiver {}
diff --git a/app/src/main/java/info/nightscout/androidaps/services/AlarmSoundService.java b/app/src/main/java/info/nightscout/androidaps/services/AlarmSoundService.java
index e95cd7c479..4917789db1 100644
--- a/app/src/main/java/info/nightscout/androidaps/services/AlarmSoundService.java
+++ b/app/src/main/java/info/nightscout/androidaps/services/AlarmSoundService.java
@@ -75,8 +75,11 @@ public class AlarmSoundService extends Service {
@Override
public void onDestroy() {
- player.stop();
- player.release();
+ if (player != null) {
+ player.stop();
+ player.release();
+ }
+
if (L.isEnabled(L.CORE))
log.debug("onDestroy");
}
diff --git a/app/src/main/java/info/nightscout/androidaps/setupwizard/SetupWizardActivity.java b/app/src/main/java/info/nightscout/androidaps/setupwizard/SetupWizardActivity.java
index 3dad4535ac..9049ad7463 100644
--- a/app/src/main/java/info/nightscout/androidaps/setupwizard/SetupWizardActivity.java
+++ b/app/src/main/java/info/nightscout/androidaps/setupwizard/SetupWizardActivity.java
@@ -22,7 +22,7 @@ import info.nightscout.androidaps.MainActivity;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.R;
import info.nightscout.androidaps.events.EventProfileStoreChanged;
-import info.nightscout.androidaps.events.EventProfileSwitchChange;
+import info.nightscout.androidaps.events.EventProfileNeedsUpdate;
import info.nightscout.androidaps.events.EventPumpStatusChanged;
import info.nightscout.androidaps.plugins.constraints.objectives.events.EventObjectivesSaved;
import info.nightscout.androidaps.plugins.general.nsclient.events.EventNSClientStatus;
@@ -115,7 +115,7 @@ public class SetupWizardActivity extends AppCompatActivity {
}
@Subscribe
- public void onEventProfileSwitchChange(EventProfileSwitchChange ignored) {
+ public void onEventProfileSwitchChange(EventProfileNeedsUpdate ignored) {
updateButtons();
}
diff --git a/app/src/main/java/info/nightscout/androidaps/utils/BolusWizard.java b/app/src/main/java/info/nightscout/androidaps/utils/BolusWizard.java
index e47a74e17f..cd789ee225 100644
--- a/app/src/main/java/info/nightscout/androidaps/utils/BolusWizard.java
+++ b/app/src/main/java/info/nightscout/androidaps/utils/BolusWizard.java
@@ -3,7 +3,7 @@ package info.nightscout.androidaps.utils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import info.nightscout.androidaps.data.GlucoseStatus;
+import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatus;
import info.nightscout.androidaps.data.IobTotal;
import info.nightscout.androidaps.data.Profile;
import info.nightscout.androidaps.db.TempTarget;
diff --git a/app/src/main/java/info/nightscout/androidaps/utils/FabricPrivacy.java b/app/src/main/java/info/nightscout/androidaps/utils/FabricPrivacy.java
index 0a0d559c55..54f06bfaf0 100644
--- a/app/src/main/java/info/nightscout/androidaps/utils/FabricPrivacy.java
+++ b/app/src/main/java/info/nightscout/androidaps/utils/FabricPrivacy.java
@@ -1,16 +1,17 @@
package info.nightscout.androidaps.utils;
+import android.os.Bundle;
+
import com.crashlytics.android.Crashlytics;
-import com.crashlytics.android.answers.Answers;
-import com.crashlytics.android.answers.CustomEvent;
+import com.google.firebase.analytics.FirebaseAnalytics;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import info.nightscout.androidaps.BuildConfig;
-import info.nightscout.androidaps.Config;
import info.nightscout.androidaps.MainApp;
-import info.nightscout.androidaps.R;
-import info.nightscout.androidaps.interfaces.PluginBase;
-
-import java.util.Date;
+import info.nightscout.androidaps.logging.L;
+import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
/**
* Created by jamorham on 21/02/2018.
@@ -21,8 +22,8 @@ import java.util.Date;
*/
public class FabricPrivacy {
+ private static Logger log = LoggerFactory.getLogger(L.CORE);
- private static final String TAG = "FabricPrivacy";
private static volatile FabricPrivacy instance;
@@ -45,7 +46,8 @@ public class FabricPrivacy {
final Crashlytics crashlytics = Crashlytics.getInstance();
crashlytics.core.logException(throwable);
} catch (NullPointerException | IllegalStateException e) {
- android.util.Log.d(TAG, "Ignoring opted out non-initialized log: " + throwable);
+ if (L.isEnabled(L.CORE))
+ log.debug("Ignoring opted out non-initialized log: " + throwable);
}
}
@@ -55,7 +57,8 @@ public class FabricPrivacy {
final Crashlytics crashlytics = Crashlytics.getInstance();
crashlytics.core.log(msg);
} catch (NullPointerException | IllegalStateException e) {
- android.util.Log.d(TAG, "Ignoring opted out non-initialized log: " + msg);
+ if (L.isEnabled(L.CORE))
+ log.debug("Ignoring opted out non-initialized log: " + msg);
}
}
@@ -65,7 +68,8 @@ public class FabricPrivacy {
final Crashlytics crashlytics = Crashlytics.getInstance();
crashlytics.core.log(priority, tag, msg);
} catch (NullPointerException | IllegalStateException e) {
- android.util.Log.d(TAG, "Ignoring opted out non-initialized log: " + msg);
+ if (L.isEnabled(L.CORE))
+ log.debug("Ignoring opted out non-initialized log: " + msg);
}
}
@@ -73,68 +77,67 @@ public class FabricPrivacy {
return SP.getBoolean("enable_fabric", true);
}
- // Answers logCustom
- public void logCustom(CustomEvent event) {
+ // Analytics logCustom
+ public void logCustom(Bundle event) {
try {
- final Answers answers = Answers.getInstance();
if (fabricEnabled()) {
- answers.logCustom(event);
+ MainApp.getFirebaseAnalytics().logEvent(FirebaseAnalytics.Event.SELECT_CONTENT, event);
} else {
- android.util.Log.d(TAG, "Ignoring recently opted-out event: " + event.toString());
+ if (L.isEnabled(L.CORE))
+ log.debug("Ignoring recently opted-out event: " + event.toString());
}
} catch (NullPointerException | IllegalStateException e) {
- android.util.Log.d(TAG, "Ignoring opted-out non-initialized event: " + event.toString());
+ if (L.isEnabled(L.CORE))
+ log.debug("Ignoring opted-out non-initialized event: " + event.toString());
}
}
- public static void uploadDailyStats() {
+ // Analytics logCustom
+ public void logCustom(String event) {
+ try {
+ if (fabricEnabled()) {
+ MainApp.getFirebaseAnalytics().logEvent(event, new Bundle());
+ } else {
+ if (L.isEnabled(L.CORE))
+ log.debug("Ignoring recently opted-out event: " + event);
+ }
+ } catch (NullPointerException | IllegalStateException e) {
+ if (L.isEnabled(L.CORE))
+ log.debug("Ignoring opted-out non-initialized event: " + event);
+ }
+ }
+
+ public static void setUserStats() {
if (!fabricEnabled()) return;
- long lastUploadDay = SP.getLong(MainApp.gs(R.string.key_plugin_stats_report_timestamp), 0L);
+ String closedLoopEnabled = MainApp.getConstraintChecker().isClosedLoopAllowed().value() ? "CLOSED_LOOP_ENABLED" : "CLOSED_LOOP_DISABLED";
+ // Size is limited to 36 chars
+ String remote = BuildConfig.REMOTE
+ .replace("https://","")
+ .replace("http://","")
+ .replace(".git", "")
+ .replace(".com/", ":")
+ .replace(".org/", ":")
+ .replace(".net/", ":");
- Date date = new Date();
- date.setHours(0);
- date.setMinutes(0);
- date.setSeconds(0);
- long today = date.getTime() - date.getTime() % 1000;
+ MainApp.getFirebaseAnalytics().setUserProperty("Mode", BuildConfig.APPLICATION_ID + "-" + closedLoopEnabled);
+ MainApp.getFirebaseAnalytics().setUserProperty("Language", LocaleHelper.getLanguage(MainApp.instance()));
+ MainApp.getFirebaseAnalytics().setUserProperty("Version", BuildConfig.VERSION);
+ MainApp.getFirebaseAnalytics().setUserProperty("HEAD", BuildConfig.HEAD);
+ MainApp.getFirebaseAnalytics().setUserProperty("Remote", remote);
+ if (ConfigBuilderPlugin.getPlugin().getActivePump() != null)
+ MainApp.getFirebaseAnalytics().setUserProperty("Pump", ConfigBuilderPlugin.getPlugin().getActivePump().getClass().getSimpleName());
+ if (ConfigBuilderPlugin.getPlugin().getActiveAPS() != null)
+ MainApp.getFirebaseAnalytics().setUserProperty("Aps", ConfigBuilderPlugin.getPlugin().getActiveAPS().getClass().getSimpleName());
+ if (ConfigBuilderPlugin.getPlugin().getActiveBgSource() != null)
+ MainApp.getFirebaseAnalytics().setUserProperty("BgSource", ConfigBuilderPlugin.getPlugin().getActiveBgSource().getClass().getSimpleName());
+ if (ConfigBuilderPlugin.getPlugin().getActiveProfileInterface() != null)
+ MainApp.getFirebaseAnalytics().setUserProperty("Profile", ConfigBuilderPlugin.getPlugin().getActiveProfileInterface().getClass().getSimpleName());
+ if (ConfigBuilderPlugin.getPlugin().getActiveSensitivity() != null)
+ MainApp.getFirebaseAnalytics().setUserProperty("Sensitivity", ConfigBuilderPlugin.getPlugin().getActiveSensitivity().getClass().getSimpleName());
+ if (ConfigBuilderPlugin.getPlugin().getActiveInsulin() != null)
+ MainApp.getFirebaseAnalytics().setUserProperty("Insulin", ConfigBuilderPlugin.getPlugin().getActiveInsulin().getClass().getSimpleName());
- if (today > lastUploadDay) {
- uploadAppUsageType();
- uploadPluginStats();
-
- SP.putLong(MainApp.gs(R.string.key_plugin_stats_report_timestamp), today);
- }
- }
-
- private static void uploadPluginStats() {
- CustomEvent pluginStats = new CustomEvent("PluginStats");
- pluginStats.putCustomAttribute("version", BuildConfig.VERSION);
- pluginStats.putCustomAttribute("HEAD", BuildConfig.HEAD);
- pluginStats.putCustomAttribute("language", SP.getString(R.string.key_language,"default"));
- for (PluginBase plugin : MainApp.getPluginsList()) {
- if (plugin.isEnabled(plugin.getType()) && !plugin.pluginDescription.alwaysEnabled) {
- // Fabric allows no more than 20 attributes attached to an event. By reporting disabled plugins as
- // well, we would exceed that threshold, so only report what is enabled
- // TODO >2.0: consider reworking this to upload an event per enabled plugin instead.
- pluginStats.putCustomAttribute(plugin.getClass().getSimpleName(), "enabled");
- }
- }
-
- getInstance().logCustom(pluginStats);
- }
-
- private static void uploadAppUsageType() {
- CustomEvent type = new CustomEvent("AppUsageType");
- if (Config.NSCLIENT)
- type.putCustomAttribute("type", "NSClient");
- else if (Config.PUMPCONTROL)
- type.putCustomAttribute("type", "PumpControl");
- else if (MainApp.getConstraintChecker().isClosedLoopAllowed().value())
- type.putCustomAttribute("type", "ClosedLoop");
- else
- type.putCustomAttribute("type", "OpenLoop");
-
- getInstance().logCustom(type);
}
}
diff --git a/app/src/main/java/info/nightscout/androidaps/utils/MidnightTime.java b/app/src/main/java/info/nightscout/androidaps/utils/MidnightTime.java
index 668ca02e96..235bb9c6e9 100644
--- a/app/src/main/java/info/nightscout/androidaps/utils/MidnightTime.java
+++ b/app/src/main/java/info/nightscout/androidaps/utils/MidnightTime.java
@@ -5,11 +5,13 @@ import android.util.LongSparseArray;
import java.util.Calendar;
public class MidnightTime {
- private static final LongSparseArray times = new LongSparseArray<>();
+ static final LongSparseArray times = new LongSparseArray<>();
private static long hits = 0;
private static long misses = 0;
+ private static final int THRESHOLD = 100000;
+
public static long calc() {
Calendar c = Calendar.getInstance();
c.set(Calendar.HOUR_OF_DAY, 0);
@@ -36,10 +38,17 @@ public class MidnightTime {
m = c.getTimeInMillis();
times.append(time, m);
++misses;
+ if (times.size() > THRESHOLD) resetCache();
}
return m;
}
+ static void resetCache() {
+ hits = 0;
+ misses = 0;
+ times.clear();
+ }
+
public static String log() {
return "Hits: " + hits + " misses: " + misses + " stored: " + times.size();
}
diff --git a/app/src/main/java/info/nightscout/androidaps/utils/VersionChecker.java b/app/src/main/java/info/nightscout/androidaps/utils/VersionChecker.java
deleted file mode 100644
index fd636b4596..0000000000
--- a/app/src/main/java/info/nightscout/androidaps/utils/VersionChecker.java
+++ /dev/null
@@ -1,100 +0,0 @@
-package info.nightscout.androidaps.utils;
-
-import android.net.ConnectivityManager;
-import android.net.NetworkInfo;
-
-import org.apache.http.HttpResponse;
-import org.apache.http.client.HttpClient;
-import org.apache.http.client.methods.HttpGet;
-import org.apache.http.impl.client.DefaultHttpClient;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import info.nightscout.androidaps.BuildConfig;
-import info.nightscout.androidaps.MainApp;
-import info.nightscout.androidaps.R;
-import info.nightscout.androidaps.logging.L;
-import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification;
-import info.nightscout.androidaps.plugins.general.overview.notifications.Notification;
-
-import static android.content.Context.CONNECTIVITY_SERVICE;
-
-public class VersionChecker {
- private static Logger log = LoggerFactory.getLogger(L.CORE);
-
- public static void check() {
- if (isConnected())
- new Thread(() -> {
- HttpClient client = new DefaultHttpClient();
- HttpGet request = new HttpGet("https://raw.githubusercontent.com/MilosKozak/AndroidAPS/master/app/build.gradle");
- HttpResponse response;
-
- try {
- response = client.execute(request);
- InputStream inputStream = response.getEntity().getContent();
-
- if (inputStream != null) {
- String result = findLine(inputStream);
- if (result != null) {
- int compare = result.compareTo(BuildConfig.VERSION_NAME.replace("\"", ""));
- if (compare == 0) {
- log.debug("Version equal to master");
- return;
- } else if (compare > 0) {
- log.debug("Version outdated. Found " + result);
- Notification notification = new Notification(Notification.NEWVERSIONDETECTED, String.format(MainApp.gs(R.string.versionavailable), result), Notification.LOW);
- MainApp.bus().post(new EventNewNotification(notification));
- return;
- } else {
- log.debug("Version newer than master. Are you developer?");
- return;
- }
- }
- }
-
- log.debug("Github master version not found");
-
- } catch (IOException e) {
- e.printStackTrace();
- log.debug("Github master version check error");
- }
- }).start();
- else
- log.debug("Github master version no checked. No connectivity");
- }
-
- // convert inputstream to String
- private static String findLine(InputStream inputStream) throws IOException {
- BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream));
- String line;
- String regex = "(.*)version(.*)\"(((\\d+)\\.)+(\\d+))\"(.*)";
- Pattern p = Pattern.compile(regex);
-
- while ((line = bufferedReader.readLine()) != null) {
- Matcher m = p.matcher(line);
- if (m.matches()) {
- log.debug("+++ " + line);
- return m.group(3);
- } else {
- log.debug("--- " + line);
- }
- }
- inputStream.close();
- return null;
- }
-
- // check network connection
- public static boolean isConnected() {
- ConnectivityManager connMgr = (ConnectivityManager) MainApp.instance().getApplicationContext().getSystemService(CONNECTIVITY_SERVICE);
- NetworkInfo networkInfo = connMgr.getActiveNetworkInfo();
- return networkInfo != null && networkInfo.isConnected();
- }
-
-}
diff --git a/app/src/main/java/org/monkey/d/ruffy/ruffy/driver/display/menu/MenuDate.java b/app/src/main/java/org/monkey/d/ruffy/ruffy/driver/display/menu/MenuDate.java
index 05cc741413..6e3d54f3bb 100644
--- a/app/src/main/java/org/monkey/d/ruffy/ruffy/driver/display/menu/MenuDate.java
+++ b/app/src/main/java/org/monkey/d/ruffy/ruffy/driver/display/menu/MenuDate.java
@@ -1,5 +1,7 @@
package org.monkey.d.ruffy.ruffy.driver.display.menu;
+import java.util.Locale;
+
/**
* Created by fishermen21 on 24.05.17.
*/
@@ -30,6 +32,6 @@ public class MenuDate {
@Override
public String toString() {
- return day+"."+String.format("%02d",month)+".";
+ return day+"."+String.format(Locale.ENGLISH, "%02d",month)+".";
}
}
diff --git a/app/src/main/java/org/monkey/d/ruffy/ruffy/driver/display/menu/MenuTime.java b/app/src/main/java/org/monkey/d/ruffy/ruffy/driver/display/menu/MenuTime.java
index 147aafc8eb..356f9e5ddf 100644
--- a/app/src/main/java/org/monkey/d/ruffy/ruffy/driver/display/menu/MenuTime.java
+++ b/app/src/main/java/org/monkey/d/ruffy/ruffy/driver/display/menu/MenuTime.java
@@ -1,5 +1,7 @@
package org.monkey.d.ruffy.ruffy.driver.display.menu;
+import java.util.Locale;
+
/**
* Created by fishermen21 on 22.05.17.
*/
@@ -31,6 +33,6 @@ public class MenuTime {
@Override
public String toString() {
- return hour+":"+String.format("%02d",minute);
+ return hour+":"+String.format(Locale.ENGLISH, "%02d",minute);
}
}
diff --git a/app/src/main/res/layout/activity_insight_alert.xml b/app/src/main/res/layout/activity_insight_alert.xml
index 043fbaebe3..6bc3dc1565 100644
--- a/app/src/main/res/layout/activity_insight_alert.xml
+++ b/app/src/main/res/layout/activity_insight_alert.xml
@@ -1,6 +1,5 @@
diff --git a/app/src/main/res/layout/activity_logsetting.xml b/app/src/main/res/layout/activity_logsetting.xml
index 41ca05f95f..feee7bd38a 100644
--- a/app/src/main/res/layout/activity_logsetting.xml
+++ b/app/src/main/res/layout/activity_logsetting.xml
@@ -21,7 +21,7 @@
android:id="@+id/logsettings_placeholder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:orientation="vertical">
+ android:orientation="vertical" />
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index c0f382fbb8..94d7917e06 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -1,7 +1,6 @@
+ android:width="180dp"
+ android:inputType="text" />
diff --git a/app/src/main/res/layout/careportal_stats_fragment.xml b/app/src/main/res/layout/careportal_stats_fragment.xml
index 2162a2d502..2532a6f198 100644
--- a/app/src/main/res/layout/careportal_stats_fragment.xml
+++ b/app/src/main/res/layout/careportal_stats_fragment.xml
@@ -1,5 +1,4 @@
+ tools:context="info.nightscout.androidaps.plugins.pump.insight.LocalInsightFragment">
diff --git a/app/src/main/res/layout/overview_calibration_dialog.xml b/app/src/main/res/layout/overview_calibration_dialog.xml
index 66661a3b83..2b50ad88fb 100644
--- a/app/src/main/res/layout/overview_calibration_dialog.xml
+++ b/app/src/main/res/layout/overview_calibration_dialog.xml
@@ -1,10 +1,9 @@
+ tools:context=".plugins.general.overview.dialogs.CalibrationDialog">
+ tools:context=".plugins.general.overview.dialogs.EditQuickWizardDialog">
diff --git a/app/src/main/res/layout/overview_newcarbs_dialog.xml b/app/src/main/res/layout/overview_newcarbs_dialog.xml
index 65013b80df..67ae96354a 100644
--- a/app/src/main/res/layout/overview_newcarbs_dialog.xml
+++ b/app/src/main/res/layout/overview_newcarbs_dialog.xml
@@ -1,11 +1,10 @@
+ tools:context=".plugins.general.overview.dialogs.NewCarbsDialog">
+ tools:context=".plugins.general.overview.dialogs.NewInsulinDialog">
diff --git a/app/src/main/res/layout/overview_newtreatment_dialog.xml b/app/src/main/res/layout/overview_newtreatment_dialog.xml
index efb9c41aa5..4a899fbd9b 100644
--- a/app/src/main/res/layout/overview_newtreatment_dialog.xml
+++ b/app/src/main/res/layout/overview_newtreatment_dialog.xml
@@ -1,11 +1,10 @@
+ tools:context=".plugins.general.overview.dialogs.NewTreatmentDialog">
\ No newline at end of file
+ android:textColor="#FFFFFF" />
\ No newline at end of file
diff --git a/app/src/main/res/layout/timelistedit_element.xml b/app/src/main/res/layout/timelistedit_element.xml
index c65fc0855b..b9e473d34e 100644
--- a/app/src/main/res/layout/timelistedit_element.xml
+++ b/app/src/main/res/layout/timelistedit_element.xml
@@ -1,5 +1,4 @@
Herstel databasisWil jy regtig die databasis herstel?Gaan uit
- Gebruik verlengde boluses vir >200%
+ Gebruik verlengde boluses vir >200%%DanaR Bluetooth-toestelGebruik altyd absolute basale aardesHerlaai jou foon of herlaai AndroidAPS met die stelsel instellings \nanders sal AndroidAPS nie geskiedenis hê nie! (Belangrik om te spoor en te verifieer dat die algoritmes korrek werk)!
@@ -147,8 +147,6 @@
Beperkings skendingBolus aflewering foutTempbasal aflewering fout
- Basale waarde [%]
- % (100% =huidig)Aanvaar nuwe tydelike basale:BehandelingRekenaar
@@ -248,7 +246,6 @@
Pomp IABDaaglikse eenhedeLaaste bolus
- %.1fh geledeOngeldige invoerWaarde nie behoorlik gestelHerlaai profiel
@@ -314,7 +311,7 @@
StaakSTAAK GEDRUKWag vir pomp
- Gaan %.2fU lewer
+ Gaan %1$.2fU lewerOpstel van visualisering en monitering, en ontleed basale en verhoudingsVerifieer dat BG beskikbaar is in Nightscout, en dat pomp insulien data opgelaai wordBegin op \'n oop lus
@@ -337,7 +334,7 @@
Loop is gedeaktiveerLus geaktiveer%1$.2f beperk tot %2$.2f
- Waarde %s is uit harde perke
+ Waarde %1$s is uit harde perkeAfstandbeheerde bevel word nie toegelaat nieAfstandbeheerde bolus nie beskikbaar nie. Probeer later weer.Om %1$.2fU basale vir %2$d min te aktiveer antwoord met kode %3$s
@@ -464,7 +461,7 @@
ProfielVerstek waarde: 3 dit is \'n sleutel OpenAPS veiligheidsdrumpels. Wat dit doen is om jou basale te berk tot 3 x (in hierdie mense) jou grootste basale koers. Jy sal waarskynlik nooit dit hoef te verander, maar jy moet bewus wees wat bespreek is oor \"3 x max daaglikse; 4 x huidige\"vir veiligheidsdrumpels.Verstek waarde: 4 dit is die helfte van die sleutel OpenAPS veiligheid limiete, en die ander helfte van \"3 x maks daaglikse; 4 x huidige\"van die veiligheid limiet. Dit beteken jou basale, ongeag max basale stel op jou pomp, kan enige hoër wees as hierdie nommer tye die huidige vlak van jou basale. Dit is om te verhoed dat mense in gevaarlike gebied deur instelling buitensporig hoë max basals voor om te verstaan hoe die algoritme werk. Weer, die verstek is 4 x; die meeste mense sal nooit moet dit aanpas en is eerder meer geneig om te moet aanpas ander instellings as hulle voel hulle \"loop in\" hierdie veiligheid limiet.
- Verstek waarde: 1.2\nThis is \'n vermenigvuldiger cap vir autosens (en gou autotune) stel \'n 20% max limiet op hoe hoog die autosens verhouding kan wees, wat op sy beurt bepaal hoe hoog autosens basale kan aanpas, hoe laag dit ISF kan aanpas, en hoe laag dit die BG teiken kan stel.
+ Verstek waarde: 1.2\nThis is \'n vermenigvuldiger plafon vir autosens (en gou autotune) stel \'n 20%% max limiet op hoe hoog die autosens verhouding kan wees, wat op sy beurt bepaal hoe hoog autosens basale kan aanpas, hoe laag dit ISF kan aanpas, en hoe laag dit die BG teiken kan stel.Verstek waarde: 0.7\nDie ander kant van die autosens veiligheidsperke, sit \'n limiet op hoe laag autosens basals kan aanpas, en hoe hoog dit ISF en BG teikens kan verstel.Autosens Verstel doelwitte ookVerstek waarde: waar\nDit word gebruik om autosens toe te laat om BG teikens aan te pas, benewens ISF en basale.
@@ -477,7 +474,7 @@
Telefoonnommer ongeldigOngeldige SMS selfoon nommerKalibrasie
- Stuur kalibrasie %.1f to xDrip?
+ Stuur kalibrasie %1$.1f na xDrip?xDrip + nie geïnstalleerd nieKalibrasie gestuur na xDripKalibrasie gestuur. Ontvang moet geaktiveer word in xDrip.
@@ -528,7 +525,6 @@
Insulien weerstandige volwasseKies asseblief pasiënt ouderdom om veiligheids limiete te stelGlimp
- %s benodig battery optimisering whitelisting vir behoorlike prestasieLus opgeskortOpgeskort (%1$d m)Superbolus (%1$d m)
@@ -564,8 +560,6 @@
Wys status vlae vir cage, iage, sage, stoor en battery vlak op tuisskerm.Drempel waarskuwings stoor vlak [U]Drempel kritieke stoor vlak [U]
- Drempel waarskuwing battery vlak [%]
- Drempel kritieke battery vlak [%]IABKOBFirmware
@@ -618,7 +612,7 @@
Absorpsie instellingsMaaltyd max\ks absorpsie tyd [h]Tyd in ure waarna verwag word dat alle koolhidrate uit maaltyd geabsorbeer sal wees
- Visualiseer verlengde bolus as %
+ Visualiseer verlengde bolus as %%SAGEIAGECAGE
@@ -731,8 +725,8 @@
Stuur BG data na xDrip+Xdrip+ kies 640g/Eversense data bronNSClient BG
- Basale waarde vervang deur minimum ondersteunde waarde: %s
- Basale waarde vervang deur maksimum ondersteunde waarde: %s
+ Basale waarde vervang deur minimum ondersteunde waarde: %1$s
+ Basale waarde vervang deur maksimum ondersteunde waarde: %1$sBG berekeningBolus IAB berekeningBasale IAB berekening
@@ -750,8 +744,8 @@
Geslote modus geaktiveerMaksimum IAB behoorlik gestelBG beskikbaar vanaf geselekteerde bron
- Basale waardes nie in lyn met ure: %s
- Ongeldige profiel: %s
+ Basale waardes nie in lyn met ure: %1$s
+ Ongeldige profiel: %1$sProgrammeer pomp vir bolusingVerfrisStaat
@@ -764,7 +758,6 @@
Loop tansKanselleer TBRStel TBR (%1$d%% / %2$d min)
- Bolusing (%.1f U)VerfrisVersoekte bewerking nie ondersteun deur pompOnveilige gebruik: uitgebreide of multigolf boluses is aktief. Lus modus is gestel om laag te opskort net 6 ure. Net gewone boluses is ondersteun in lus modus
@@ -1093,7 +1086,7 @@
Log bedryf modus veranderingeLog alarmsSkakel TBR emulasie aan
- Gebruik uitgebreide boluses in plaas van TBRs om die 250% perk te omseil
+ Gebruik verlengde boluses in plaas van TBRs om die 250%% perk te omseilOntkoppel vertraging [s]ReeksnommerVrygestelde sagteware weergawe
diff --git a/app/src/main/res/values-bg/strings.xml b/app/src/main/res/values-bg/strings.xml
index 57e65d1350..8453a50ffe 100644
--- a/app/src/main/res/values-bg/strings.xml
+++ b/app/src/main/res/values-bg/strings.xml
@@ -9,7 +9,7 @@
Нулирай базата данниСигурни ли сте че искате да изтриете всички данни?Изход
- Използвай удължен болус за над 200%
+ Използвай удължени болуси при над >200%%DanaR Bluetooth устройствоИзползване на абсолютни стойности за базалРестартирайте телефона или AndroidAPS от системните настройки или Android APS няма да записва проблемите (което е важно за работата на алгоритъма)!
@@ -147,8 +147,8 @@
Нарушено ограничениеГрешка при подаване на болусГрешка при подаване на временен базал
- Стойност на базал [%]
- % (100% = текущ)
+ Базална стойност [%%]
+ %% (100%% = текущ)Приложи нов временен базал:БолусКалкулатор
@@ -248,7 +248,7 @@
IOB на помпатаИнсулин за деняПоследен болус:
- преди %.1fч
+ преди %1$.1fчГрешни входящи данниНеправилна стойностПрезареди профил
@@ -314,7 +314,7 @@
СприНатиснат е СТОП!Очаква помпата
- Ще достави %.2fЕ
+ Ще стартира %1$.2fЕ болусНастройка на визуализацията и наблюдението, а също и анализиране на базалните нужди и коефициентиПотвърждаване, че КЗ е достъпна в Найтскаут и данните за помпата се качват тамСтартиране в режим Отворен кръг (Open loop)
@@ -337,7 +337,7 @@
APS е изключенAPS е включен%1$.2f ограничен до %2$.2f
- Стойността %s е извън границите
+ Стойността %1$s е извън ограничениятаОтдалеченото управление е забраненоОтдалечено стартиране на болус не е възможно. Опитайте отново по-късно.За да стартирате базал от %1$.2fЕ/ч за %2$d мин отговорете с код %3$s
@@ -464,7 +464,7 @@
ПрофилПо подразбиране: 3 Това е основен параметър в сигурността на OpenAPS. Той ограничава максималният базал да бъде 3 пъти най-голямата стойност от дневните базали. Не би трябвало да има нужа от промяна, защото от опит сме проверили, че максимумите са “3x от най-високия дневен; 4x от текущия”.По подразбиране: 4\nТова е другият основен параметър в сигурността на OpenAPS, и другата половина от \"3x от най-високия дневен; 4x от текущия\". Това означава, че независимо от макс базал настроен в помпата, стойността на базала не може да е по-висока от тази стойност умножена по стойността на базала за текущият час от денонощието. Това е с цел да предпази от прекалено високи стойности на максималния базал преди да разбират как работи алгоритъма. Повечето от Вас няма да имат нужда от смяна на тази стойност и могат да се справят с настойки на другите параметри.
- По подразбиране: 1.2\nТова е максималният множител на autosens (а скоро autotune) за да позволи 20% максимален лимит на autosens коефициента, който от своя страна настройва базалите, колко може да намали ISF, и колко ниско може да свали целевата КЗ.
+ По подразбиране: 1.2\nТова е максималният множител на autosens (а скоро autotune), за да позволи 20%% максимален лимит на autosens коефициента, който от своя страна настройва базалите, колко може да намали инсулиновата чувствителност, и колко ниско може да свали целевата КЗ.По подразбиране: 0.7\nДругата част от сигурността на autosens, слагайки ограничение на колко ниско може да ограничи базалите, колко да повиши чувствителността (ISF) и целевите КЗ.Да променя ли autosens и целевата КЗПо подразбиране: разрешено\nТова позволява на autosens да променя и целевите КЗ(освен чувствителност и базал).
@@ -477,7 +477,7 @@
Телефонният номер не е валиденГрешен тел номер за SMSКалибрация
- Изпрати калибрация %.1f към xDrip?
+ Изпрати калибрация %1$.1f към xDrip?xDrip+ не е инсталиранКалибрацията е изпратена към xDripНеуспешно. Получаването трябва да е разрешено в xDrip.
@@ -528,7 +528,7 @@
Възрастни с голяма инсулинова резистентностИзберете възраст за определяне лимитите на безопасностGlimp
- %s се нуждае от зключване на оптимизиране на батерията за пълна функционалност
+ %1$s се нуждае от изключване от списъка за оптимизиране на батерията за пълна функционалностLoop изключенИзключен (%1$d мин)Суперболус (%1$d мин)
@@ -564,8 +564,8 @@
Покажи статус светлини за канула, инсулин, сензор, резервоар и батерията на началния екран.Ниво за аларма за останал инсулин в резервоара [Е]Критично ниво на останал инсулин в резервоар [Е]
- Аларма за заряд на батерия [%]
- Критично ниво на батерията под [%]
+ Ниско ниво на батерията под [%%]
+ Критично ниво на батерията под [%%]IOBСОВФърмуер
@@ -618,7 +618,7 @@
Настройки за абсорбцияМаксимално време за усвояване на храненето [ч]Брой часове, за които се очаква храненето да бъде напълно усвоено в организма
- Показвай удължените болуси като %
+ Показвай удължените болуси като %%ВСензВИнсВКан
@@ -731,8 +731,8 @@
Изпращай данни за КЗ към xDrip+В xDrip+ изберете 640g/Eversense за източник на данниКЗ от NS
- Базалната стойност е заместена от минимално поддържаната стойност %s
- Базалната стойност е заместена от максимално поддържаната стойност %s
+ Базалната стойност е заместена от минимално поддържаната стойност %1$s
+ Базалната стойност е заместена от максимално поддържаната стойност %1$sКалкулиране на КЗКалкулиране на Болус IOBКалкулиране на базален IOB
@@ -750,8 +750,8 @@
APS - Затворен кръг е позволенМаксимален IOB е зададен правилноИма данни за КЗ от избрания източник
- Няма базални стойности за някои часове: %s
- Невалиден профил: %s
+ Базалните стойности не са за кръгли часове: %1$s
+ Грешен профил: %1$sПрограмиране на помпа за болусОбновиСъстояние
@@ -764,7 +764,7 @@
ИзпълняваОтказва временен базалЗадава временен базал (%1$d%% / %2$d min)
- Болус (%.1f U)
+ Болус (%1$.1f Е)ОбновяваИсканата операция не се поддържа от помпатаОпасно използване: удължени или многовълнови болуси са активни. Помпата е изключена за само 6 часа. Само нормални болуси се поддържат.
@@ -1093,7 +1093,7 @@
Записвай промените в режимаЗаписвай алармиРазреши емулация на временни базали
- Използвайте разширената болуси вместо временни базали да се заобиколи ограничението от 250 %
+ Използвайте удължени болуси вместо временни базали да се заобиколи ограничението от 250%%Забавяне при прекъсване на връзката [сек]Сериен номерСофтуер версия
@@ -1156,6 +1156,10 @@
Грешен код. Командата не е изпълнена.Не е конфигуриранСъздаден запис - Промяна на профил
+ Проверка на версията
+ стара версия
+ много стара версия
+ Има нова версия от най-малко %1$d дни! Връщане към LGS след 60 дни, цикълът ще бъде изключен след 90 дни%1$d дeн%1$d дни
diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml
index b0822c1544..96a66c5b8b 100644
--- a/app/src/main/res/values-cs/strings.xml
+++ b/app/src/main/res/values-cs/strings.xml
@@ -9,7 +9,7 @@
Inicializovat databázeOpravdu resetovat všechny databáze?Konec
- Použít prodloužené bolusy pro >200%
+ Použít prodloužené bolusy pro >200%%DanaR Bluetooth zařízeníVždy použít absolutní hodnoty bazáluProsím restartujte Váš telefon nebo restartujte AndroidAPS z nastavení systému\njinak nebudou zaznamenány ladící informace (důležité pro sledování a kontrolu, zda algoritmus pracuje správně)!
@@ -147,8 +147,8 @@
Mimo povolený rozsahChyba podání bolusuChyba nastavování dočasného bazálu
- Hodnota bazálu [%]
- % (100% = současný)
+ Hodnota bazálu [%%]
+ %% (100%% = současný)Spustit nový dočasný bazál:BolusKalkulačka
@@ -248,7 +248,7 @@
IOB z pumpyJednotek za denPoslední bolus
- před %.1fh
+ před %1$.1fhChybná vstupní dataHodnota nenastavena správněObnovit profil
@@ -314,7 +314,7 @@
StopSTISKNUTO STOPČekání na pumpu
- Podávání %.2fU inzulínu
+ Podávání %1$.2fU inzulínuNastavit vizualizaci a monitoring, analyzovat bazály a koeficientyZkontrolovat, zda jsou glykémie a údaje z pumpy viditelné v NightscoutuZačít s otevřenou smyčkou
@@ -337,7 +337,7 @@
Smyčka je zakázánaSmyčka je povolena%1$.2f omezeno na %2$.2f
- Hodnota %s je mimo přednastavený rozsah
+ Hodnota %1$s je mimo přednastavený rozsahVzdálený příkaz není povolenVzdálený bolus není momentálně povolen. Zkuste to později.Pro spuštění bazálu %1$.2fU/h na %2$d min odpovězte SMS s kódem %3$s
@@ -464,8 +464,8 @@
ProfilVýchozí hodnota: 3 Toto je klíčová hodnota zabezpečení. Říká, že maximální nastavitelný bazál je trojnásobkem maximálního denního bazálu. Patrně to nebudete muset měnit, případně si přečtete o tématu \"3x max denní; 4x aktuální\".Výchozí hodnota: 4 Toto je druhá klíčová hodnota. Říká, že maximální hodnota dočasného bazálu nikdy nebude větší, než čtyřnásobek aktuálního bazálu. Je to proto, aby se lidé nedostali do nebezpečných hodnot dříve, než pochopí jak OpenAPS pracuje. Znovu, výchozí hodnota je 4 a většina lidí ji nikdy nebude muset změnit. Pokud nestačí, obvykle je problém někde jinde.
- Výchozí hodnota: 1.2 Toto je bezpečnostní nastavení pro detekci sensitivity. Říká, že autosens může zvýšit bazály, snížit ISF a snížit cílovou hodnotu glykémie o 20%
- Výchozí hodnota: 0.7 Toto je bezpečnostní nastavení pro detekci sensitivity. Říká, že autosens může snížit bazály, zvýšit ISF a zvýšit cílovou hodnotu glykémie na 70%
+ Výchozí hodnota: 1.2\nToto je bezpečnostní nastavení pro detekci sensitivity (a brzy autotune). Říká, že autosens může zvýšit bazály, snížit ISF a snížit cílovou hodnotu glykémie o 20%%.
+ Výchozí hodnota: 0.7\nToto je bezpečnostní nastavení pro detekci sensitivity. Říká, že autosens může snížit bazály, zvýšit ISF a zvýšit cílovou hodnotu glykémie na 70%%.Úprava cílové glykémie pomocí AutosensVýchozí hodnota: zapnuto\nToto nastavení říká, že autosens může měnit také cílové hodnoty glykémií.Výchozí hodnota: 2\nToto nastavení říká, po jakou část z hodnoty DIA smyčka po bolusu čeká a nereaguje na změny glykémií (zde 3DIA/2 = 1,5h).
@@ -477,7 +477,7 @@
Neplatné telefonní čísloŠpatné telefonní čísloKalibrace
- Poslat do xDripu kalibraci %.1f ?
+ Poslat do xDripu kalibraci %1$.1f?xDrip+ není nainstalovánKalibrace odeslána do xDripuKalibrace odeslána. Příjem musí být v xDripu povolený.
@@ -528,7 +528,7 @@
Dospělý s nízkou citlivostíVyberte věk pacienta pro nastavení bezpečnostních limitůGlimp
- %s potřebuje vypnout optimalizace baterie pro optimální výkon
+ %1$s potřebuje vypnout optimalizace baterie pro optimální výkonSmyčka pozastavenaPozastaveno (%1$d min)Superbolus (%1$d m)
@@ -564,8 +564,8 @@
Povolte stavové indikátory pro stáří kanyly, inzulínu, senzoru, zásobníku a baterie na domovské obrazovce.Úroveň varování stavu zásobníku [U]Úroveň kritického varování stavu zásobníku [U]
- Úroveň varování stavu baterie [%]
- Úroveň kritického varování stavu baterie [%]
+ Úroveň varování stavu baterie [%%]
+ Úroveň kritického varování stavu baterie [%%]IOBCOBFirmware
@@ -618,7 +618,7 @@
Nastavení absorpce sacharidůMax. doba absorpce sacharidů [h]Čas v hodinách, ve kterém předpokládáme, že všechny sacharidy budou strávené
- Zobrazovat prodloužený bolus v %
+ Zobrazovat prodloužený bolus v %%SENINZKAN
@@ -731,8 +731,8 @@
Odesílat data do xDrip+V xDrip+ vyberte zdroj dat 640g/EversenseGlykémie z NS
- Hodnota bazálu nahrazena minimální možnou: %s
- Hodnota bazálu nahrazena maximální možnou: %s
+ Hodnota bazálu nahrazena minimální možnou: %1$s
+ Hodnota bazálu nahrazena maximální možnou: %1$sKalkulace glykémieKalkulace bolusového IOBKalkulace bazálního IOB
@@ -750,8 +750,8 @@
Uzavřená smyčka povolenaMaximální IOB nastaveno správněGlykémie dostupné z vybraného zdroje
- Bazální hodnoty nejsou zarovnané na celé hodiny: %s
- Chybný profil: %s
+ Bazální hodnoty nejsou zarovnané na celé hodiny: %1$s
+ Chybný profil: %1$sProgramování pumpy pro bolusObnovitStav
@@ -764,7 +764,7 @@
BěžíRušení dočasného bazáluNastavování doč. bazálu (%1$d%% / %2$d min)
- Bolus (%.1f U)
+ Bolus (%1$.1f U)ObnovováníPožadovaná operace není pumpou podporovánaNebezpečné použití: extended nebo multiwave bolus je aktivní. Pumpa byla vypnuta jen na 6 hodin. Povolené jsou pouze normální bolusy.
@@ -1093,7 +1093,7 @@
Zaznamenat změnu režimu provozuZaznamenat výstrahyPovolit emulaci dočasných bazálů
- Používat prodloužené bolusy na obejití limitu dočasných bázalů 250%
+ Používat prodloužené bolusy na obejití limitu dočasných bazálů 250%%Limit pro odpojení [s]Sériové čísloVerze softwaru
@@ -1156,6 +1156,10 @@
Nesprávný kód. Příkaz zrušen.Není nakonfigurovánoPřepnutí profilu vytvořeno
+ Kontrola verze
+ stará verze
+ velmi stará verze
+ Nová verze je dostupná minimálně %1$d dní! Přepnutí na ochranu před nízkou glykémií po 60 dnech, vypnutí smyčky po 90 dnech%1$d den%1$d dnů
diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml
index a638d1434a..2d0a15d6ac 100644
--- a/app/src/main/res/values-de/strings.xml
+++ b/app/src/main/res/values-de/strings.xml
@@ -9,7 +9,7 @@
Datenbanken zurücksetzenMöchtest du die Datenbank wirklich zurücksetzen?Schließen
- Benutze verzögerten Bolus für hohe TBR (>200%).
+ Benutze verzögerten Bolus für hohe TBR >200%%DanaR Blueetooth--GerätVerwende absolute statt prozentuale Basalwerte beim Upload zu NightScout.Bitte starte dein Telefon neu oder starte AndroidAPS in den System-Einstellungen neu.\nAndernfalls wird AndroidAPS nichts protokollieren (wichtig zum Nachverfolgen und Verifizieren, dass der Algorithmus korrekt funktioniert)!
@@ -147,8 +147,8 @@
Beschränkungen wurden verletzt oder Limit erreicht.Bolus-AbgabefehlerTBR Abgabe-Fehler
- Basal-Wert [%]
- % (100% = aktuell)
+ Basal-Wert [%%]
+ %% (100%% = aktuell)Akzeptiere neue TBR:BolusRechner
@@ -248,7 +248,7 @@
Pumpen-IOBTägliche EinheitenLetzter Bolus:
- vor %.1f h
+ vor %1$.1f StundeUngültige EingabedatenWert nicht korrekt gesetztProfil neuladen
@@ -314,7 +314,7 @@
StoppSTOPP GEDRÜCKTWarte auf Pumpe
- %1$.2f IE werden abgegeben.
+ Werde %1$.2fU abgebenKonfiguriere die Anzeige und das Monitoring (Nightscout) und analysiere Basal-Raten und FaktorenVerifiziere, dass BZ- und Pumpen-Insulin-Daten erfolgreich zu Nightscout hochgeladen werden.Starte den Open Loop Modus
@@ -338,7 +338,7 @@ maxIOB = durchschnittlicher Essensbolus + 3 x maximale BasalrateLoop ist deaktiviert.Loop ist aktiviert.%1$.2f limitiert auf %2$.2f
- Wert %1$s ist außerhalb des festen Limits.
+ Wert %1$s ist außerhalb des festen Limits.Ferngesteuerte Befehle sind nicht erlaubt.Bolusabgabe aus der Ferne nicht verfügbar. Versuche es später erneut.Um eine Basalrate von %1$.2fU/h für %2$d Minuten zu setzen, antworte mit dem Code %3$s
@@ -465,7 +465,7 @@ maxIOB = durchschnittlicher Essensbolus + 3 x maximale BasalrateProfilStandardwert: 3\nDies ist eine wichtige Sicherheitseinstellung. Sie begrenzt das maximale Basal-IOB auf die dreifache Menge (im Standardfall) deiner größten Basalrate. In der Regel solltest Du diesen Wert nicht ändern. Aber Du solltest wissen, was \"3x max daily, 4x current\" als Sicherheitseinstellung bedeutet.Standardwert: 4\nDies ist die andere wichtige Sicherheitseinstellung, die zweite Hälfte von \"3x max daily, 4x current\". Diese Grenze beschränkt das Basal-IOB auf die (im Standardfall) vierfache Menge der aktuellen Basalrate. Dies ist wichtig, um Nutzer davor zu bewahren, zuviel Basal-Insulin zu verabreichen. Nochmals, der Standardwert ist 4x. Die meisten Nutzer werden niemals diese Einstellung verändern, sondern andere Einstellungen anpassen, um sich nicht dieser Sicherheitsgrenze zu nähern.
- Standardwert: 1.2\nDies ist eine Sicherheitsgrenze für Autosens (und bald auch Autotune), die besagt, wie hoch Autosens Basalraten anpassen darf und wie niedrig der ISF (Insulin-Sensitivitäts-Faktor) und der BZ-Zielwert eingestellt werden können. 1.2 ist dabei der Multiplikationsfaktor und erlaubt eine Anpassung um 20%.
+ Standardwert: 1.2\nDies ist eine Sicherheitsgrenze für Autosens (und bald auch Autotune), die besagt, wie hoch Autosens Basalraten anpassen darf und wie niedrig der ISF (Insulin-Sensitivitäts-Faktor) und der BZ-Zielwert eingestellt werden können. 1.2 ist dabei der Multiplikationsfaktor und erlaubt eine Anpassung um 20%%.Standardwert: 0.7\nDies ist die andere Sicherheitsgrenze für autosens. Sie beschränkt, wie weit Basalraten abgesenkt und wie sehr ISF und BZ-Zielwerte erhöht werden können.Autosens passt Zielwerte ebenfalls anVorgabe: erlaubt.\nErlaubt Autosens den Ziel-BZ-Bereich in Verbindung mit ISF und Basal anzupassen.
@@ -478,7 +478,7 @@ maxIOB = durchschnittlicher Essensbolus + 3 x maximale Basalrate
Telefonnummer ist nicht gültigFalsche/ungültige TelefonnummerKalibrierung
- Kalibrierung %1$.1f an xDrip+ senden?
+ Kalibrierung %1$.1f an xDrip+ senden?xDrip+ nicht installiertKalibrierung an xDrip+ gesendetKalibrierung gesendet. Das Empfangen von Kalbrierungen muss in xDrip+ aktiviert sein.
@@ -529,7 +529,7 @@ maxIOB = durchschnittlicher Essensbolus + 3 x maximale Basalrate
Insulinresistenter ErwachsenerBitte wähle das Patientenalter, um die Sicherheits-Limits festzulegenGlimp
- %s benötigt eine deaktivierte Akku-Leistungsoptimierung, um korrekt arbeiten zu können.
+ %1$s benötigt eine deaktivierte Akku-Leistungsoptimierung, um korrekt arbeiten zu können.Loop pausiertPausiert (%1$d min)Superbolus (%1$d m)
@@ -565,8 +565,8 @@ maxIOB = durchschnittlicher Essensbolus + 3 x maximale Basalrate
Statusanzeige für CAGE, IAGE, SAGE, Reservoir- und Batteriestand auf dem Homescreen.Warnschwelle Reservoirstand [IE]Warnschwelle kritischer Reservoirstand [IE]
- Warnschwelle Batteriestand [%]
- Warnschwelle kritischer Batteriestand [%]
+ Warnschwelle Batteriestand [%%]
+ Warnschwelle kritischer Batteriestand [%%]IOBCOBFirmware
@@ -619,7 +619,7 @@ maxIOB = durchschnittlicher Essensbolus + 3 x maximale Basalrate
Resorptions-EinstellungenMaximale Essens-Resorptionszeit [h]Zeit in Stunden, in der zu erwarten ist, dass alle Kohlenhydrate resorbiert sein werden.
- Zeige verzögerten Bolus als % an.
+ Zeige verzögerten Bolus als %% an.SAGEIAGECAGE
@@ -732,8 +732,8 @@ maxIOB = durchschnittlicher Essensbolus + 3 x maximale Basalrate
Sende BZ-Werte zu xDrip+Wähle in xDrip+ 640g/Eversense als Daten-Quelle.Nightscout-Client BZ
- Basal-Wert wurde durch den kleinst möglichen Wert ersetzt: %s
- Basal-Wert wurde durch größt möglichen Wert ersetzt: %s
+ Basal-Wert wurde durch den kleinst möglichen Wert ersetzt: %1$s
+ Basal-Wert wurde durch größt möglichen Wert ersetzt: %1$sBZ BerechnungBolus-IOB BerechnungBasal-IOB Berechnung
@@ -751,8 +751,8 @@ maxIOB = durchschnittlicher Essensbolus + 3 x maximale Basalrate
Closed mode aktiviertMaximales IOB richtig gesetztBZ verfügbar von gewählter Quelle
- Basalraten beginnen nicht zur vollen Stunde: %s
- Ungültiges Profil: %s
+ Basalraten beginnen nicht zur vollen Stunde: %1$s
+ Ungültiges Profil: %1$sBolusabgabe wird vorbereitetAktualisierenStatus
@@ -1095,7 +1095,7 @@ Unerwartetes Verhalten.
Wechsel des Betriebsmodus protokollierenAlarme protokollierenTBR-Emulation aktivieren
- Verzögerte Boli an Stelle von TBRs verwenden, um die Beschränkung auf 250% zu umgehen
+ Verzögerte Boli an Stelle von TBRs verwenden, um die Beschränkung auf 250%% zu umgehenVerbindungsabbau-Verzögerung [s]SeriennummerRelease-Softwareversion
@@ -1158,6 +1158,10 @@ Unerwartetes Verhalten.
Falscher Code. Befehl wurde abgebrochen.Nicht konfiguriertProfilwechsel wurde erstellt
+ Versionsprüfer
+ Vorherige Version
+ sehr alte Version
+ Neue Version für mindestens %1$d Tage verfügbar! Rückfall zur sensorunterstützten Pumpentherapie nach 60 Tagen, Loop wird nach 90 Tagen deaktiviert%1$d Tag%1$d Tage
diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml
index 66dc9f708b..9872c77080 100644
--- a/app/src/main/res/values-el/strings.xml
+++ b/app/src/main/res/values-el/strings.xml
@@ -9,7 +9,7 @@
Επαναφορά Βάσεων ΔεδομένωνΘέλετε πραγματικά να επαναφέρετε την βάση δεδομένων;Έξοδος
- Χρήση Εκτεταμένου Bolus για >200%
+ Χρησιμοποιήστε Εκτεταμένο bolus για >200%%DanaR συσκευή BluetoothΧρησιμοποιείτε πάντα απόλυτες τιμές βασικούΠαρακαλώ κάντε επανεκίνηση στο τηλέφώνο ή restart στο AndroidAPS από τις Ρυθμίσεις Συστήματος, \nαλλιώς το AndroidAPS δεν θα έχει καταγραφή (επαληθεύστε ότι οι αλγόριθμοι δουλεύουν σωστά)!
@@ -147,8 +147,8 @@
Παραβίαση ΠεριορισμώνΣφάλμα παράδοσης BolusΣφάλμα παράδοσης Προσ Ρυθμού
- Τιμή Βασικού [%]
- % (100% = τρέχων)
+ Τιμή Βασικού [%%]
+ %% (100%% = τρέχων)Αποδοχή νέου Προσ Ρυθμού:ΘεραπείαΥπολογιστής
@@ -248,7 +248,7 @@
IOB αντλίαςΜονάδες ανά ημέρα Τελευταίο Bolus:
- πριν από %.1fh
+ %1$.1fώρες πρινΜη έγκυρα δεδομέναΗ τιμή δεν μπήκε σωστάΞαναφορτώστε το προφίλ
@@ -314,7 +314,7 @@
StopΠιέστε STOPΑναμονή για αντλία
- Προς έγχυση %.2fU
+ Προς έγχυση %1$.2fUΔημιουργία παρακολούθησης και ανάλυση βασικού ρυθμού και αναλογιώνΕπιβεβαιώστε ότι η BG φαίνεται στο Nightscout και τα δεδομένα της αντλίας φορτώθηκανΞεκινήστε σε ανοιχτό κύκλωμα
@@ -337,7 +337,7 @@
Κύκλωμα απενεργοποιημένοΚύκλωμα ενεργοποιημένοΤο %1$.2f περιορίζεται σε %2$.2f
- Η τιμή %s είναι έξω από τα όρια
+ Η τιμή %1$s είναι έξω από τα όριαΔεν επιτρέπεται απομακρυσμένη εντολήΑπομακρυσμένο bolus μη διαθέσιμο. Δοκιμάστε ξανά αργότερα.Για έναρξη βασικού %1$.2fU/h για %2$d λεπτά στείλτε κωδικό %3$s
@@ -464,7 +464,7 @@
ΠροφίλΠροεπιλεγμένη τιμή: 3 Αυτό είναι ένα κλειδί ασφαλείας του OpenAPS. Αυτό περιορίζει την αύξηση του βασικού x3 (σε αυτούς τους ανθρώους) από την μεγαλύτερη τιμή του. Συνήθως δεν χρειάζεται να το αλλάξετε, αλλά πρέπει να ξέρετε τι σημαίνει “3x μέγιστο ημερήσιο; 4x τρέχων” για λόγους ασφαλείας.Προεπιλεγμένη τιμή: 4 Αυτό είναι το μισό του θέματος ασφαλείας του OpenAPS, και το άλλο μισό του «3 x μέγιστο ημέρας: 4 x τρέχων» των θεμάτων ασφαλείας. Αυτό σημαίνει ότι ο βασικός ρυθμός, ανεξάρτητα από την μέγιστη τιμή βασικού ρυθμού στην αντλία σας, δεν μπορεί να είναι υψηλότερος από το πολλαπλάσιο αυτού του αριθμού. Αυτό γίνεται για να αποτρέψει τους ανθρώπους από το να μπουν σε επικίνδυνες καταστάσεις θέτωντας υψηλό βασικό πριν κατανοήσουν πλήρως πώς λειτουργεί ο αλγόριθμος. Και πάλι, η προεπιλεγμένη τιμή είναι 4x: οι περισσότεροι άνθρωποι ποτέ δεν θα χρειαστεί να το προσαρμόσουν και αντίθετα είναι πιο πιθανό να χρειαστεί να προσαρμόσουν άλλες ρυθμίσεις αν αισθάνονται ότι κινούνται με ασφάλεια.
- Προεπιλεγμένη τιμή: 1.2\nΑυτός είναι ένας πολλαπλασιαστής για το autosens (και σύντομα autotune) για να ορίσετε ένα 20% ανώτατο όριο στο πόσο ψηλά μπορεί να είναι ο λόγος autosens, που με τη σειρά του καθορίζει πόσο ψηλά το autosens μπορεί να ρυθμίσει τον βασικό ρυθμό, πόσο χαμηλά μπορεί να ρυθμίσει την ISF, και πόσο χαμηλά μπορεί να ορίσει το στόχο της BG.
+ Προεπιλεγμένη τιμή: 1.2\nΑυτός είναι ένας πολλαπλασιαστής για το autosens (και σύντομα autotune) για να ορίσετε ένα 20%% ανώτατο όριο στο πόσο ψηλά μπορεί να είναι ο λόγος autosens, που με τη σειρά του καθορίζει πόσο ψηλά το autosens μπορεί να ρυθμίσει τον βασικό ρυθμό, πόσο χαμηλά μπορεί να ρυθμίσει την ISF, και πόσο χαμηλά μπορεί να ορίσει το στόχο της BG.Προεπιλεγμένη τιμή: 0.7\n H άλλη πλευρά από τα όρια ασφαλείας του autosens, θέτοντας ένα ανώτατο όριο στο πόσο χαμηλά to autosens μπορεί να προσαρμόσει τον βασικό ρυθμό και πόσο ψηλά μπορεί να ρυθμίσει τη ISF και τον στόχο του BG.Το autosens ρυθμίζει στόχουςΠροεπιλεγμένη τιμή: true\nΑυτό χρησιμοποιείται για να επιτρέψει στο autosens να προσαρμόσει τον στόχο BG, επιπρόσθετα από το ISF και βασικό ρυθμό.
@@ -477,7 +477,7 @@
Μη έγκυρος αριθμός τηλεφώνουΜη έγκυρος αριθμός τηλεφώνου για SMSΚαλιμπράρισμα
- Να στείλω το καλιμπράρισμα %.1f στο xDrip;
+ Να σταλεί η βαθμονόμηση %1$.1f στο xDrip;xDrip+ μη εγκατεστημένοΤο καλιμπράρισμα εστάλει στο xDripΤο καλιμπράρισμα στάλθηκε. Η λήψη πρέπει να είναι ενεργοποιημένη στο xDrip.
@@ -528,7 +528,7 @@
Αντίσταση ινσουλίνης ενηλίκωνΠαρακαλώ επιλέξτε ηλικία χρήστη για να ορισθούν όρια ασφαλείαςGlimp
- Το %s πρέπει να απενεργοποιήσει τη βελτιστοποίηση της μπαταρίας για βέλτιστη απόδοση
+ %1$s χρειάζεται λίστα βελτιστοποίησης μπαταρίας για σωστή απόδοσηΚύκλωμα σε αναστολήΑναστολή (%1$d m)Superbolus (%1$d m)
@@ -564,8 +564,8 @@
Ενεργοποίηση του φωτισμού κατάστασης για cage, iage, sage, reservoir και επίπεδο μπεταρίας στην αρχική οθόνη.Όριο προειδοποίησης χαμηλής αμπούλας [U]Όριο προειδοποίησης πολύ χαμηλής αμπούλας [U]
- Όριο προειδοποίησης χαμηλής μπαταρίας [%]
- Όριο προειδοποίησης πολύ χαμηλής μπαταρίας [%]
+ Όριο προειδοποίησης χαμηλής μπαταρίας [%%]
+ Όριο προειδοποίησης πολύ χαμηλής μπαταρίας [%%]IOBCOBΈκδοση
@@ -618,7 +618,7 @@
Ρύθμιση απορρόφησηςΜέγιστος χρόνος απορρόφησης γεύματος [h]Χρόνος σε ώρες που περιμένουμε να απορροφηθούν όλοι οι υδατάνθρακες ενός γεύματος
- Εμφάνιση εκτεταμένου bolus σε %
+ Εμφάνιση εκτεταμένου bolus σε %%SAGEIAGECAGE
@@ -731,8 +731,8 @@
Αποστολή δεδομένων BG στο xDrip+Στο xDrip+, επιλέξτε την πηγή δεδομένων 640g / EversenseNSClient BG
- Η τιμή του βασικού αντικαταστάθηκε από την ελάχιστη υποστηριζόμενη τιμή: %s
- Η τιμή του βασικού αντικαταστάθηκε από την μέγιστη υποστηριζόμενη τιμή: %s
+ Η τιμή του βασικού αντικαταστάθηκε από την ελάχιστη υποστηριζόμενη τιμή: %1$s
+ Η τιμή του βασικού αντικαταστάθηκε από την μέγιστη υποστηριζόμενη τιμή: %1$sΥπολογισμός BGΥπολογισμός του IOB bolusΥπολογισμός βασικού IOB
@@ -750,8 +750,8 @@
Ενεργοποιήθηκε η κλειστή λειτουργίαΤο μέγιστο IOB έχει ρυθμιστεί σωστάBG διαθέσιμη από επιλεγμένη πηγή
- Οι τιμές του βασικού ρυθμού δεν αντιστοιχούν σε ώρες: %s
- Μη έγκυρο προφίλ: %s
+ Οι τιμές του βασικού ρυθμού δεν αντιστοιχούν σε ώρες: %1$s
+ Μη έγκυρο προφίλ: %1$sΠρογραμματισμός της αντλίας για bolusΑνανέωσηΚατάσταση
@@ -764,7 +764,7 @@
ΕκτελείτεΑκυρώνεται TBRΡύθμιση TBR (%1$d%% / %2$d λεπτά)
- Bolus (%.1f U)
+ Bolus (%1$.1f U)ΑνανέωσηΗ λειτουργία που ζητήθηκε δεν υποστηρίζεται από την αντλίαΕπικίνδυνη χρήση: Εκτεταμένο ή πολλαπλά bolus είναι ενεργό. Το κύκλωμα απενεργοποιήθηκε λόγω low-suspend μόνο για 6 ώρες. Επιτρέπονται μόνο κανονικά bolus
@@ -1093,7 +1093,7 @@
Αλλαγές αρχείου κατάστασης λειτουργίαςΤοπικές ΕιδοποιήσειςΕνεργοποίηση εξομοίωσης TBR
- Χρησιμοποιείστε εκτεταμένα bolus αντί για TBR για παράκαμψη του ορίου 250%
+ Χρησιμοποιείστε εκτεταμένα bolus αντί για TBR για παράκαμψη του ορίου 250%%Αποσυνδέστε καθυστέρηση [s]Serial numberΑπελευθέρωση έκδοση λογισμικού
@@ -1156,6 +1156,10 @@
Λάθος κωδικός. Η εντολή ακυρώθηκε.Δεν έχει ρυθμιστείΔημιουργήθηκε αλλαγή προφίλ
+ Έλεγχος Έκδοσης
+ παλιά έκδοση
+ πολύ παλιά έκδοση
+ Νέα έκδοση για τουλάχιστον %1$d ημέρες διαθέσιμη! Επιστροφή σε LGS μετά από 60 ημέρες, το κύκλωμα θα απενεργοποιηθεί μετά από 90 ημέρες%1$d ημέρα%1$d ημέρες
diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml
index adec3a0d5c..93d2498e5a 100644
--- a/app/src/main/res/values-es/strings.xml
+++ b/app/src/main/res/values-es/strings.xml
@@ -7,7 +7,6 @@
Restablecer las bases de datos¿Realmente quiere restablecer las bases de datos?Salir
- Usar bolos extendidos para >200%Dispositivo Bluetooth DanaRUsar siempre valores basales absolutosPor favor reinicia el teléfono o AndroidAPS desde ajustes de sistema, sino AndroidAPS no guardará registros (importante para trazar y verificar que el algoritmo funcione correctamente)
@@ -144,8 +143,6 @@
Violación restriccionesError de administración del boloBasal Temporal no emitida
- Valor basal [%]
- % (100% = actual)Aceptar nueva basal temporal:TratamientoCalculadora
@@ -245,7 +242,6 @@
Bomba IOBUnidades diariasÚltimo bolo
- Hace %.1fhDatos inválidosValor no establecido correctamenteRecargar Perfil
@@ -307,7 +303,6 @@
DetenerDETENER PULSADOEsperando bomba
- Se entregará %.2fUConfiguración de visualización y monitorización, y análisis de basales y ratiosComprobar que los datos de BG están disponibles en Nightscout, y que los datos de la bomba de insulina se están subiendoEmpezar con lazo abierto
@@ -330,7 +325,6 @@
Lazo inactivoLazo activo%1$.2f limitado a %2$.2f
- Valor %s fuera de limitesComando remoto no permitidoPara cancelar lazo por %1$d minutos responde con código %2$sBasal temporal %1$.2fU/h para %2$d min iniciada correctamente
@@ -444,7 +438,6 @@
PerfilesValor predeterminado: 3 Esta es una protección de seguridad en OpenAPS. Lo que esto hace es limitar tus basales a 3x (en este caso) tu mayor índice basal. Probablemente no necesites cambiar esto, pero debes tener en cuenta las discusiones sobre \"3x max diaria; 4x actual\" para protecciones de seguridad.Ajuste pro defecto: 4 Esto es la otra mitad de los ajustes de seguridad de OpenAPS y la otra mitad de la protección de seguridad de \"3x max diaria, 4x actual\". Esto significa, que tu basal, independientemente de tu máxima basal ajustada en la bomba, no puede ser mas alta que este número de veces el actual nivel de basal. Esto es para evitar que las personas se encuentren en situaciones peligrosas por aumentar mucho la basal sin entender como trabaja el algoritmo. El ajuste por defecto es 4x; la mayoría de las personas nunca tendrá que cambiar estos ajustes, sino que debe modificar otros ajustes en la terapia si se encuentran cerca de este límite de seguridad.
- Ajuste por defecto: 1.2\nEste es un límite multiplicador para autosens (y pronto autotune) para establecer un límite máximo del 20% sobre lo alto que puede ser el ratio autosens, que a su vez determina como de altos puede ajustar autosens los ratios basales, como de bajos puede ajustar el ISF y como de bajo establecer el objetivo de glusosa en sangre (BG).Ajuste por defecto: 0.7\nEl otro lado de los límites de seguridad de autosens, limitando a cuanto puede autosens bajar la basal y a cuanto puede subir ISF y objetivo de glucosa en sangre (BG).Autosens también ajusta los objetivosAjuste por defecto: true\nEsto se usa para permitir a autosens el ajuste de objetivos BG además de ISF y bases.
@@ -457,7 +450,6 @@
Número de teléfono inválidoNúmero de teléfono incorrecto para SMSCalibración
- ¿Mandar calibración %.1f a xDrip?xDrip+ no instaladoCalibración mandada a xDripCalibración enviada. La recepción debe estar habilitada en xDrip.
@@ -508,7 +500,6 @@
Adulto resistente a la insulinaPor favor elige la edad del paciente para ajustar los límites de seguridadGlimp
- %s necesita optimización de batería lista blanca para funcionar bienLoop desactivadoDesactivado (%1$d m)Superbolo (%1$d m)
@@ -544,8 +535,6 @@
Habilitar las luces de estado para tiempo de la canula, tiempo de la insulina, tiempo del sensor y nivel de bateria en la pantalla de inicio.Umbral de advertencia de nivel de reservorio [U]Umbral crítico de nivel de reservorio [U]
- Umbral de advertencia de nivel de pila [%]
- Umbral crítico de nivel de batería [%]IOBCOBFirmware
@@ -598,7 +587,6 @@
Ajustes absorciónTiempo max absorción comida [h]Tiempo en horas en el que se espera que todos los carbohidratos hayan sido absorbidos
- Mostrar bolo extendido en %SAGEIAGECAGE
@@ -711,8 +699,6 @@
Mandar datos BG a xDrip+En xDrip+ elige 640g/Eversense como fuente de datosNSClient BG
- Valor basal reemplazado por el valor mínimo soportado: %s
- Valor basal reemplazado por valor máximo soportado: %sCálculo BGCálculo bolo IOBCálculo basal IOB
@@ -730,8 +716,6 @@
Lazo cerrado activadoMáximo IOB ajustado correctamenteBG disponible desde la fuente seleccionada
- Valores basales no alineados a las horas: %s
- Perfil inválido: %sProgramando bomba para emitir boloActualizarEstado
@@ -744,7 +728,6 @@
FuncionandoCancelando TBRPoniendo TBR (%1$d%% / %2$d min)
- Emitiendo bolo (%.1f U)ActualizandoAcción requerida no disponible por la bombaUso inseguro: bolo extendido o multionda activo. El modo del lazo ha sido fijado a sólo suspensión en baja glucosa durante 6 horas. En modo lazo sólo se soportan los bolo estándar.
@@ -1072,7 +1055,6 @@
Registro de cambio de modo de funcionamientoRegistro de alarmasActivar emulación de dosis basal temporal
- Usar bolos extendidos en lugar de tasas basales temporales para eludir el limite de 250%Desconectar el retraso [s]Número de serieVersión de software
diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml
index 46ccaf8303..0ae7423e5d 100644
--- a/app/src/main/res/values-fr/strings.xml
+++ b/app/src/main/res/values-fr/strings.xml
@@ -9,7 +9,7 @@
Réinitialiser les Bases de Données Voulez-vous vraiment réinitialiser les bases de données ?Quitter
- Utiliser les bolus étendus pour > 200%
+ Utiliser les bolus étendus pour > 200%%Dispositif Bluetooth DanaRUtiliser toujours les valeurs absolues du basalRedémarrez votre smartphone ou redémarrez AndroidAPS depuis les paramètres système \nsinon AndroidAPS ne sera pas connecté aux journaux (il est important de suivre et vérifier que les algorithmes fonctionnent correctement)!
@@ -147,8 +147,8 @@
Violation des restrictionsErreur injection bolusErreur injection basal temporaire
- Valeur Basal [%]
- % (100% = actuel)
+ Valeur de Basal [%%]
+ %% (100%% = actuel)Accepter nouveau basal temporaire :TraitementCalculatrice
@@ -249,7 +249,7 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
Insuline Active pompeUnités journalièresDernier bolus
- %.1fh passées
+ il y a %1$.1fhDonnées saisies invalidesValeur pas correctement définieActualiser le profil
@@ -315,7 +315,7 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
ArrêtBOUTON ARRÊT ACTIVÉAttente connection pompe
- %.2fU va être injecté
+ %1$.2fU vont être injectéesParamétrer la visualisation et la surveillance des données, analyser les débits de basal et les ratiosVérifiez que la Glycémie est disponible sur Nightscout et que les données d’insuline ont été téléchargées de la pompeCommencez par la configuration Boucle Ouverte
@@ -338,7 +338,7 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
La Boucle est désactivéeLa Boucle est activée%1$.2f limité à %2$.2f
- La valeur %s est hors des limites strictes
+ La valeur %1$s est en dehors des limitesLa commande à distance n\'est pas autoriséeBolus à distance non disponible. Réessayez plus tard.Pour démarrer Basal %1$.2fU/h pendant %2$d min, renvoyer le code %3$s
@@ -465,7 +465,7 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
ProfilValeur par défaut : 3 Ceci est un paramètre important de sécurité de l’OpenAPS. Ceci va limiter vos débits basal à 3 fois votre débit Basal maximum. Il est probable que vous n’aurez pas besoin de changer cela, mais vous devez être conscient de ce qui est discuté pour les limites de sécurité dans “3x max daily; 4x current”.Valeur par défaut : 4 Ceci est l’autre moitié des paramètres de sécurité limitant l’OpenAPS, et l’autre moitié de “3x max daily, 4x current” des paramètres de sécurité. Quel que soit le basal maximum prédéfini dans votre pompe, il ne pourra pas être plus haut que ce nombre multiplié par le Basal actuel. Ceci est fait pour ne pas mettre l’utilisateur en danger en programmant des débits Basal maximum trop élevés avant de comprendre comment l’algorithme fonctionne. Encore une fois, la valeur par défaut est 4x, la plupart des gens n’auront jamais besoin d’ajuster ce paramètre, plutôt ils auront tendance à ajuster d’autres paramètres s’ils voient qu’ils atteignent ce paramètre de limite de sécurité.
- Valeur par défaut: 1.2\nCeci est la limite du multiplicateur utilisé par Autosens (ensuite Autotune) pour definir +20% en limite maximale du ratio Autosens. En consequence, ceci dit va définir pour Autosens, la valeur limite maximale du Basal, la valeur limite minimale de la Sensibilité à l\'insuline (SI, ISF), et la valeur limite minimale de la cible glycémique.
+ Valeur par défaut: 1.2\nCeci est la limite du multiplicateur utilisé par Autosens (et bientôt Autotune) pour définir +20%% en limite maximale du ratio Autosens. En consequence, ceci dit va définir la valeur maximale du Basal pour Autosens, la valeur minimale de la Sensibilité à l\'Insuline (SI, ISF), et la valeur minimale de la cible glycémique.Valeur par défaut: 0.7\nL’autre aspect pour les limites de sécurité pour Autosens. Cette valeur va créer une limite qui définit jusqu\'à quelle valeur minimale Autosens va pouvoir ajuster le basal , et jusqu\'à quelles valeurs maximales Autosens pourra ajuster la Sensibilité à l\'Insuline (SI, ISF) et les cibles glycémiques.Autosens ajuste aussi les ciblesValeur par défaut : true\nCeci est utilisé pour autoriser Autosens à ajuster les cibles de glycémie en plus de SI et les basals.
@@ -478,7 +478,7 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
Le numéro de tél est invalideNum tél du SMS est invalideÉtalonnage
- Transmettre l\'étalonnage %.1f à xDrip ?
+ Envoyer la calibration %1$.1f à xDrip ?xDrip+ n\'est pas installéÉtalonnage envoyé à xDripÉtalonnage envoyé. La réception doit être activée dans xDrip.
@@ -529,7 +529,7 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
Adulte résistant à l\'insulineVeuillez svp sélectionner l’âge du patient pour définir les limites de sécuritéGlimp
- %s a besoin de la liste blanche de l’optimisation batterie pour une bonne performance
+ %1$s a besoin d\'optimisation de la batterie (whitelisting) pour une performance correcteLa Boucle est suspendueSuspendu (%1$d m)Superbolus (%1$d m)
@@ -565,8 +565,8 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
Activer les lumières d\'état pour AgeC, AgeI, AgeS, niveaux du réservoir et de batterie sur l\'écran d\'accueil.Seuil d\'avertissement de niveau du réservoir [U]Seuil critique de niveau du réservoir [U]
- Seuil d’avertissement du niveau de batterie [%]
- Seuil critique du niveau de la batterie [%]
+ Seuil d’avertissement du niveau de batterie [%%]
+ Seuil critique du niveau de la batterie [%%]IAGAFirmware
@@ -619,7 +619,7 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
Paramètres d’absorptionDurée maximale d’absorption pour un repasLe temps estimé en heures pour une absorbption totale des glucides d’un repas
- Afficher le bolus étendu en %
+ Afficher le bolus étendu en %%AgeCAgeIAgeC
@@ -732,8 +732,8 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
Transmettre les données G vers xDrip+Dans xDrip+ veuillez séléctionner 640g/Eversense comme source de donnéesGlycémie NSClient
- Valeur de basal remplacée par la valeur minimale autorisée : %s
- Valeur de basal remplacée par la valeur maximale autorisée : %s
+ Valeur de basal remplacée par la valeur minimale autorisée : %1$s
+ Valeur de basal remplacée par la valeur maximale autorisée : %1$sCalcul de GlycémieCalcul IA du BolusCalcul IA du Basal
@@ -751,8 +751,8 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
Mode boucle fermée activéMaximum IA réglé correctementGlycémie disponible depuis la source sélectionnée
- Les changements de Basal doivent être aux heures entières : %s
- Profile incorrect: %s
+ Les changements de Basal doivent être aux heures entières : %1$s
+ Profile incorrect : %1$sProgrammer la pompe pour injecter un bolusActualiserÉtat
@@ -765,7 +765,7 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
En cours d\'exécutionAnnulation en cours du TBRParamétrer TBR (%1$d%% / %2$d min)
- Injection du bolus en cours (%.1f U)
+ Injection du Bolus en cours (%1$.1f U)Actualisation en coursL\'opération demandée n\'est pas prise en charge par la pompeUtilisation dangereuse : les bolus étendus ou carrés sont actifs. Le mode Boucle a été programmé pour des suspensions seulement pour 6 heures. Uniquement les bolus normaux sont pris en charge par le mode Boucle
@@ -1094,7 +1094,7 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
Enreg. changement mode de fonctionnementEnreg. alertesActiver l’émulation de DBT
- Utilisez des Bolus étendus au lieu de DBTs pour contourner la limite de 250%
+ Utilisez des Bolus étendus au lieu de DBTs pour contourner la limite de 250%%Délai de déconnexion [s]Numéro de sérieVersion du logiciel
@@ -1157,6 +1157,10 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
Code incorrect. Commande annulée.Non configuréChangement de profil effectué
+ Vérificateur de version
+ ancienne version
+ très ancienne version
+ Une nouvelle version est disponible depuis au moins %1$d jours ! Retour au traitement par pompe assistée par capteur (Arrêt par Glycémie Basse (AGB), Low Glucose Suspend (LGS) ) après 60 jours et la Boucle sera désactivée après 90 jours%1$d jour%1$d jours
diff --git a/app/src/main/res/values-he/strings.xml b/app/src/main/res/values-he/strings.xml
index c4871e31c8..9b6d9033eb 100644
--- a/app/src/main/res/values-he/strings.xml
+++ b/app/src/main/res/values-he/strings.xml
@@ -2,7 +2,6 @@
רענן טיפול מ-Nightscout
- השתמש בבולוס מורחב של 200%בבקשה אתחל את הסמרטפון שלך או תרענן את אפלקצית AndroidAPS בהגדרות המערכת
אחרת AndroidAPS לא יוכל לבצע רישום (חשוב לעקוב אחר ולוודא כי האלגוריתמים פועלים כראוי)!מציג את ההגדרות הקבועות מראש עבור מזון המוגדר ב-Nightscout
diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml
index 12ead731c5..5d942f4818 100644
--- a/app/src/main/res/values-it/strings.xml
+++ b/app/src/main/res/values-it/strings.xml
@@ -9,7 +9,6 @@
Ripristinare i databaseVuoi davvero ripristinare le impostazioni?Uscita
- Usa esteso sup. 200%Dispositivo Bluetooh DanaRUtilizzare sempre valori assoluti basaliper favore riavvia il tuo telefonoo riavvia AndroidAPS dalle Impostazioni di Sistema o Android APS non lo registrera\'
@@ -144,8 +143,6 @@
Vincolo ViolatoErrore di erogazione del boloErrore di somministrazione basale temporale
- Valore Basale [%]
- % (100% = corrente)Accettare il nuovo basale tempBoliCalcolatore
@@ -245,7 +242,6 @@
IOB MicroinfusoreUnita\' giornalieraUltimo Bolo
- %.1fh faData ErrataValore non impostato correttamenteAggiorna Profilo
@@ -307,7 +303,6 @@
ArrestaPREMUTO STOPIn attesa del micro
- Erogando %.2fUImpostazione di visualizzazione, monitoraggio e analisi basali e rapportiVerifica che Bg sia disponibile in Nightscout, e la data micro e\' ben allineataPartenza con Open loop
@@ -330,7 +325,6 @@
Loop e\' disabilitatoLoop abilitato%1$.2f limitato a %2$.2f
- Valore %s è fuori limiti massimiil comando da remoto non e\' permessoSospendi il loop per %1$d minuti riprendi %2$sBasale temporanea %1$.2fU/h for %2$d min avviata con successo
@@ -443,7 +437,6 @@
ProfiloValore predefinito: 3 Questo è una chiave di sicurezza di OpenAPS. Ciò che fa è limitare le tue basali a essere 3 volte la quantità massima. Probabilmente non avrai bisogno di cambiarlo, ma dovresti essere consapevole di ciò che viene discusso in merito a \"3x max al giorno; Corrente 4x \"per sicurezza.Valore predefinito: 4 questo è l\'altra metà delle chiavi di sicurezza di OpenAPS e l\'altra metà del \"3 volte al giorno max; 4 x corrente\"le chiavi di sicurezza. Ciò significa che il tuo basale, indipendentemente dal basale di max impostato sulla pompa, non può essere più in alto di questo numero di volte il livello attuale del tuo basale. Si tratta di impedire alle persone di entrare in regime pericoloso da basals max eccessivamente alta prima di capire come funziona l\'algoritmo. Ancora una volta, il valore predefinito è 4x; maggior parte delle persone non sarà necessario modificare questo e invece sono più probabili avere bisogno di regolare le altre impostazioni se si sentono come sono \"in esecuzione in\" questo chiave di sicurezza.
- Valore predefinito: 1.2\n Questo è un valore di moltiplicatore per autosens (e presto autotune) per impostare un limite massimo del 20% su quanto in alto può essere il rapporto di autosens, che a sua volta determina quanto in alto autosens possibile regolare basals, quanto in basso può regolare ISF e quanto in basso è possibile impostare la destinazione di BG.Valore predefinito: 0,7\n L\'altro lato dei limiti di sicurezza di autosens, mettendo un limite su quanto in basso gli autosens possono regolare le basili e quanto alto può regolare i target CF e BG.Autosens regolare obiettiviValore predefinito: true\n viene utilizzato per consentire autosens regolare gli obiettivi di BG, oltre a Cf e basale.
@@ -456,7 +449,6 @@
Numero di telefono non correttoNumero non valido per SMSCalibrazione
- Invia calibrazione %.1f a xDrip?xDrip non installatoInvio calibrazione xDripLa calibrazione è stata inviata. La ricezione deve essere abilitata in xDrip.
@@ -507,7 +499,6 @@
Insulina resistenteSi prega di selezionare l\'età paziente e di impostare i limiti di sicurezzaGlimp
- %s ha bisogno di whitelisting di ottimizzazione della batteria per un buon funzionamentoSospensione LoopSospendi (%1$d m)Superbolo (%1$d m)
@@ -589,7 +580,6 @@
Impostazioni di assorbimentoAssorbimento max pasto tempo [h]Tempo in ore in cui è previsto che tutti i carboidrati del pasto vengano assorbiti
- Visualizza bolo esteso comeSAGEIAGECAGE
@@ -699,8 +689,6 @@
Inviare i dati di BG xDrip +In xDrip + selezionare origine dati 640g/EversenseNSClient BG
- Valore basale sostituito dal valore massimo: %s
- Valore basale sostituito dal valore massimo: %sCalcolo di BGCalcolo di bolo BoloCalcolo di bolo
@@ -718,8 +706,6 @@
Chiusa modalità attivataIOB massima impostata correttamenteBG disponibile da sorgente selezionata
- Valori basali non allineati alle ore: %s
- Profilo non valido: %sProgrammazione micro per bolusingAggiornaStato
@@ -732,7 +718,6 @@
In esecuzioneAnnullamento di TBRL\'impostazione di TBR (%1$d%% / %2$d min)
- Bolusing (%.1f U)AggiornandoRichiesta operazione non supportata dal microL\'utilizzo non sicuro: estesi o multiwave boli sono attivi. Modalità loop è stato impostato basso-sospendere solo 6 ore. Solo normali boli sono supportati in modalità loop
@@ -1035,6 +1020,7 @@
Violazione del limite di insulinaCambiare richiesta minima [%]Loop sarà nuova richiesta di modifica popup solo se il cambiamento è più grande di questo valore. Valore predefinito è 20%
+ Batt: %1$d%%%1$d giorni%1$d giorni
diff --git a/app/src/main/res/values-ko/strings.xml b/app/src/main/res/values-ko/strings.xml
index 05cb3f62f7..46b451b602 100644
--- a/app/src/main/res/values-ko/strings.xml
+++ b/app/src/main/res/values-ko/strings.xml
@@ -9,7 +9,6 @@
데이터베이스 초기화데이터 베이스를 정말 초기화하시겠습니까?종료
- >200% 주입위한 확장Bolus 사용다나R 블루투스Basal 절대값 사용하기폰을 재부팅하거나 AndroidAPS를 재시작하세요 \n그렇지 않으면 로그 기록이 되지 않습니다.(알고리즘이 정상적인 작동하는지 확인하기 위해 로그가 필요합니다.)!
@@ -144,8 +143,6 @@
제한 위반Bolus 주입 에러임시Basal 주입 에러
- Basal값[%]
- % (100% = 현재)새 임시Basal 적용:관리계산기
@@ -245,7 +242,6 @@
펌프 IOB일 인슐린 총량최근 Bolus:
- %.1f시간 전사용할수 없는 입력 데이터값이 제대로 설정되지 않았습니다프로파일 새로고침
@@ -307,7 +303,6 @@
정지정지 누름펌프를 기다리는 중
- %.2fU을 주입합니다표시설정과 모니터설정을 완료하고, Basal과 비율을 분석한다.나이트스카우트에서 혈당 데이터가 잘 들어오는지, 펌프데이터가 업로드 되는지 확인한다.Open Loop를 시작한다.
@@ -330,7 +325,6 @@
Loop가 중지중입니다.Loop가 실행중입니다.%1$.2f, %2$.2f으로 제한됨
- %s값이 하드한계(Hard Limit)를 벗어났습니다원격 명령이 허가되지 않았습니다%1$d분동안 Loop 일시중지하려면 %2$s 를 입력하고 답장하세요Temp Basal %1$.2fU/h for %2$d min started successfully
@@ -443,7 +437,6 @@
프로파일기본값: 3\n이 값은 중요한 OpenAPS 안전장치입니다. 이 값의 역할은 펌프에 설정되어 있는 최대Basal보다 3배를 초과할 수 없게 제한하는 것입니다. 이 값을 변경할 필요는 없을 것이지만, 안전을 위해 \"3x max daily; 4x current\"이 의미하는 바를 알고 있어야 합니다.기본값: 4\n이 값은 \"3x max daily; 4x current\"의 나머지 절반에 해당하는 또 다른 중요한 OpenAPS 안전장치입니다. 이것은, 펌프에 설정된 최대 Basal과는 관계없이, Basal이 설정된 현재시간의 Basal에 이 값을 곱한 양을 초과할 수 없다는 것을 의미합니다. 이는 알고리즘의 작동 방식을 이해하기 전에 과도하게 높은 최대 기본을 설정하여 위험한 상황에 빠지지 않도록 보호하기 위한 것입니다. 다시한번, 기본 값은 4배인 것을 알아두세요; 일반적으로 이것을 조정할 필요는 전혀 없으며, 대신 이 안전장치를 변경해야할것처럼 생각이 된다면, 다른 설정을 변경해야 할 가능성이 더 큽니다.
- 기본값: 1.2\n이 값은 autosens가 autosens 비율을 얼마나 높게 할 수 있는지에 대한 최대 한계를 20%로 설정하는 승수장치입니다. 이는 autosens가 얼마나 높게 Basal을 조절할수 있는지, ISF를 얼마나 낮게 조절할수 있는지, 혈당 목표범위를 얼마나 낮게 설정할수 있는지를 결정합니다.기본값: 0.7\nautosens 안전 제한의 나머지 부분입니다. 이는 Basal을 얼마나 낮게 조절할 수 있는지, ISF와 혈당 목표범위를 얼마나 높게 설정할 수 있는지를 결정합니다.Autosens가 목표도 조절합니다.기본값: 활성\n이것은 autosens가 ISF와 Basal뿐만 아니라, 혈당 목표범위를 조절할 수 있게 합니다.
@@ -456,7 +449,6 @@
폰번호가 유효하지 않습니다SMS폰번호가 유효하지 않습니다보정
- 보정값 %.1f을 xDrip에 전송하시겠습니까?xDrip+가 설치되지 않았습니다보정이 xDrip으로 전송되었습니다보정 전송됨. xDrip에서 수신이 되도록 설정되어 있어야 합니다.
@@ -507,7 +499,6 @@
인슐린 저항성 높은 성인안전제한을 설정하기 위해 당뇨인의 나이를 선택하세요Glimp
- 최적의 성능을 위해 %s에서 배터리 최적화를 해제해야합니다.Loop 일시중지일시중지중 (%d분)Superbolus (%1$d 분)
@@ -589,7 +580,6 @@
흡수 설정식사 최대 흡수 시간 [h]식사로 섭취한 탄수화물이 모두 흡수될기까지 예상되는 시간
- 확장Bolus를 %로 표시하기SAGEIAGECAGE
@@ -699,8 +689,6 @@
혈당 데이터를 xDrip+에 전송하기xDrip+ 데이터 소스에서 640g/Eversense을 선택하세요NSClient 혈당
- 지원되는 최소값으로 Basal값이 대체되었습니다:%s
- 지원되는 최대값으로 Basal값이 대체되었습니다:%s혈당 계산Bolus IOB 계산Basal IOB 계산
@@ -718,8 +706,6 @@
Closed 모드가 활성화됨최대 IOB가 바르게 설정됨선택한 소스에서 혈당이 들어옵니다.
- Basal값이 시간단위로 설정되지 않았습니다: %s
- 유효하지 않은 프로파일: %sBolus 주입을 위한 펌프 프로그래밍새로고침상태
@@ -732,7 +718,6 @@
실행중임시기초주입 취소중임시기초주입 설정중 (%1$d%% / %2$d분)
- Bolus 주입중(%.1f U)새로고침중요청하신 동작은 펌프에서 지원하지 않습니다.위험한 사용: 확장Bolus 혹은 멀티웨이브Bolus가 활성화 됩니다. Loop 모드가 저혈당 방지로 오직 6시간만 설정됩니다. Loop 모드에선 일반 Bolus만 지원합니다.
diff --git a/app/src/main/res/values-lt/strings.xml b/app/src/main/res/values-lt/strings.xml
index 3710f5492d..f95cd7627f 100644
--- a/app/src/main/res/values-lt/strings.xml
+++ b/app/src/main/res/values-lt/strings.xml
@@ -9,10 +9,10 @@
Iš naujo nustatyti duomenų bazęAr tikrai norite iš naujo nustatyti duomenų bazę?Išeiti
- Naudoti ištęstinį bolusą >200%
+ Naudoti ištęstinį bolusą >200%%DanaR Bluetooth įrenginysVisada naudoti bazės absoliučias vertes
- Prašome iš naujo paleisti telefoną arba sistemos nustatymuose iš naujo paleisti AndroidAPS \nkitaip AndroidAPS negalės registruoti prisijungimų (svarbu stebint ir tikrinant, ar algoritmai veikia tinkamai)!
+ Prašome iš naujo paleisti telefoną arba sistemos nustatymuose iš naujo paleisti AndroidAPS \nkitaip AndroidAPS negalės registruoti prisijungimų (svarbu stebėti ir tikrinti ar algoritmai veikia tinkamai)!Mygtukai greitesniam pagrindinių funkcijų paleidimuiPapildomų įrašų žurnalas.Naudojama aktyvių įskiepių konfigūravimui
@@ -147,8 +147,8 @@
Apribojimų pažeidimasBoluso suleidimo klaidaLaikinos bazės suleidimo klaida
- Valandinė bazė [%]
- % (100 % = dabartinis)
+ Valandinė bazė [%%]
+ %%(100%% - pasirinkta)Patvirtinti naują laikiną bazę:TerapijaSkaičiuotuvas
@@ -248,7 +248,7 @@
Pompos AIOParos insulinasPaskutinis bolusas
- prieš %.1fval
+ Prieš %1$.1f valandųNeteisingai įvesti duomenysVertė nėra tinkamai nustatytaAtnaujinti profilį
@@ -314,7 +314,7 @@
StopPaspausta STOPLaukiama ryšio su pompa
- Bus suleista %.2fvv
+ Bus suleista %1$.2fvvNustatymai vizualizacijai, monitoringui ir bazės verčių bei koeficientų analizeiĮsitikinkite, kad gliukozės duomenys rodomi Nightscout, o pompos insulino duomenys yra įkeltiAktyvuojamas atviras ciklas
@@ -337,7 +337,7 @@
Ciklas išjungtasCiklas įjungtas%1$.2f apribotas iki %2$.2f
- Vertė %s viršija griežtą limitą
+ Vertė %1$s viršija griežtą limitąNuotolinis valdymas negalimasNuotolinis bolusas negalimas. Bandykite vėliau.Norėdami aktyvuoti %1$.2fvv/val bazę, kurios trukmė %2$d min, atsakykite kodu %3$s
@@ -464,7 +464,7 @@
ProfilisNumatytoji reikšmė: 3 tai pagrindinis OpenAPS saugiklis. Jis apriboja Jūsų valandinę bazę iki trigubos maksimalios valandinės bazės (standartiniu atveju). Jums greičiausiai neprireiks šios reikšmės keisti, tačiau turėtumėte žinoti, kad ji naudojama kaip saugiklis apskaičiuojant \"3x maksimali dienos bazė; 4x dabartinė valandinė bazė\".Numatytoji reikšmė: 4 tai antras pagrindinis OpenAPS saugiklis, apskaičiuojant \"3x maksimali dienos bazė; 4x dabartinė valandinė bazė\". Jis reiškia, kad jūsų valandinė bazė, nepriklausomai nuo to, kokia maksimali valandinė bazė suprogramuota pompoje, negali būti didesnė, nei keturguba dabartinė valandinė bazė. Tai apsaugo Jus nuo pavojingų situacijų, kai nustatoma pernelyg didelė valandinė bazė, pilnai nesuprantant, kaip veikia algoritmas. Numatytoji reikšmė yra 4x; daugumai vartotojų niekada neprireikia šio skaičiaus keisti, o pajutus, kad \"atsitrenkiama\" į saugiklį, rekomenduojama peržiūrėti kitus nustatymus.
- Numatytoji reikšmė: 1.2\nTai daugiklis Autosens (ir netrukus Autotune) funkcijoje, kuris nustato, kad Autosens gali iki maksimalios 120 % ribos padidinti valandinę bazę bei sumažinti JIF ir tikslinę gliukozės vertę.
+ Numatytoji reikšmė: 1.2\nTai daugiklis Autosens (ir netrukus Autotune) funkcijoje, kuris nustato 20%% maksimalią ribą iki kurios Autosens gali padidinti valandinę bazę, sumažinti JIF ir tikslinę gliukozės vertę.Numatytoji reikšmė: 0.7\nTai antras daugiklis Autosens funkcijoje, kuris nustato, kad Autosens gali iki minimalios 70 % ribos sumažinti valandinę bazę bei padidinti JIF ir tikslinę gliukozės vertę.Autosens nustatomi tikslaiNumatytoji reikšmė: true\nTai suteikia Autosens funkcijai leidimą keisti tikslinės gliukozės vertes, JIF ir valandinę bazę.
@@ -477,7 +477,7 @@
Telefono numeris negaliojaNeteisingas SMS telefono numerisKalibravimas
- Siųsti kalibraciją %.1f į xDrip?
+ Siųsti kalibraciją %1$.1f į xDrip?xDrip+ neįdiegtaKalibracija nusiųsta į xDripKalibracija išsiųsta. xDrip programoje turi būti įgalintas gavimas.
@@ -528,7 +528,7 @@
Insulinui rezistentiškas suaugęsPasirinkite paciento amžių saugumo riboms nustatytiGlimp
- %s įtraukite baterijos optimizavimą į baltąjį sąrašą, tinkamam veikimui užtikrinti
+ %1$s įtraukite į baterijos optimizavimo baltąjį sąrašą tinkamam veikimui užtikrintiCiklas sustabdytasSustabdyta (%1$d m)Superbolusas (%1$d m)
@@ -564,8 +564,8 @@
Pradžios ekrane rodyti spalvotus indikatorius adatos, insulino, sensoriaus naudojimo trukmei bei baterijos įkrovimo lygiui.Įspėjimo apie žemą rezervuaro lygį riba [U]Įspėjimo apie kritiškai žemą rezervuaro lygį riba [U]
- Įspėjimo apie žemą baterijos įkrovimo lygį riba [%]
- Įspėjimo apie kritiškai žemą baterijos įkrovimo lygį riba [%]
+ Įspėjimo apie žemą baterijos įkrovimo lygį riba [%%]
+ Įspėjimo apie kritiškai žemą baterijos įkrovimo lygį riba [%%]AIOAAOPrograminė įranga
@@ -618,7 +618,7 @@
Angliavandenių įsisavinimo parametraiMaksimalus angliavandenių įsisavinimo laikas [h]Laikas, per kurį visi maisto angliavandeniai, tikėtina, bus įsisavinti
- Vizualizuoti ištęstinį boliusą %
+ Rodyti ištęstinį boliusą kaip %%SAMŽIAMŽKAMŽ
@@ -731,8 +731,8 @@
Siųsti KG duomenis į xDrip+Xdrip+ pasirinkite 640g/Eversense duomenų šaltinįNSClient KG
- Valandinė bazė pakeista mažiausia palaikoma verte: %s
- Valandinė bazė pakeista didžiausia palaikoma verte: %s
+ Valandinė bazė pakeista mažiausia palaikoma verte: %1$s
+ Valandinė bazė pakeista didžiausia palaikoma verte: %1$sKG apskaičiavimasBolusų AIO apskaičiavimasBazės AIO apskaičiavimas
@@ -750,8 +750,8 @@
Uždaras ciklas aktyvusMaksimalus AIO nustatytas tinkamaiKG šaltinis pasirinktas teisingai
- Bazės reikšmės nesuderintos su valandomis: %s
- Netinkamas profilis: %s
+ Bazės reikšmės nesuderintos su valandomis: %1$s
+ Netinkamas profilis: %1$sProgramuojamas bolusasAtnaujintiBūsena
@@ -764,7 +764,7 @@
VykdomaLaikina bazė atšaukiamaNustatyti laikiną bazę (%1$d%% / %2$d min)
- Bolusas (%.1f vv)
+ Leidžiamas bolusas (%1$.1f vv)AtnaujinamaPompa negali įvykdyti prašomos operacijosNesaugu: aktyvus ištęstinis arba dvibangis bolusas. Ciklas nustatytas stabdymui prie žemo tik 6 valandoms. Aktyvūs tik paprasti bolusai.
@@ -1093,7 +1093,7 @@
Įrašyti darbo režimo pakeitimusĮrašyti įspėjimusAktyvuoti LBD emuliaciją
- Naudokite ištęstinius bolusus vietoj laikinos bazės, kai viršijama 250% ribą
+ Naudoti ištęstinius bolusus vietoj laikinos bazės, kai viršijama 250%% ribaAtjungimo vėlavimas [s]Serijos numerisIšleistos programinės įrangos versija
@@ -1135,7 +1135,7 @@
Daugiabangis: %1$.2f / %2$.2f vv %3$d minBPD: %1$.2fRez.: %1$.2fvv
- Bat.: %1$d% %
+ Bat.: %1$d%%Didž. atkūrimo trukmė [s]Min. atkūrimo trukmė [s]Atkūrimo trukmė
@@ -1156,6 +1156,10 @@
Neteisingas kodas. Komanda atšaukta.NesukonfigūruotaProfilio perjungimas sukurtas
+ Versijos tikrintuvas
+ sena versija
+ labai sena versija
+ Nauja versija pasiekiama mažiausiai %1$d dienų! Po 60 d. grįšite prie stabdymo prie žemo, po 90 d. ciklas bus išjungtas.%1$d diena%1$d diena
diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml
index 42c567f870..313c3fdde5 100644
--- a/app/src/main/res/values-nl/strings.xml
+++ b/app/src/main/res/values-nl/strings.xml
@@ -9,7 +9,6 @@
Reset databaseWil je echt de database wissen?Afsluiten
- Gebruik vertraagde bolussen voor >200%DanaR Bluetooth apparaatGebruik altijd absolute basale waardenHerstart je telefoon of herstart AndroidAPS vanuit de systeem instellingen a. u. b. \nanders zal AndroidAPS geen logboek hebben (Belangrijk om te controleren of de algoritmes correct werken)!
@@ -146,8 +145,6 @@
In strijd met beperkingenBolus toedien storingTijdelijk basaal toedien storing
- Basale waarde [%]
- % (100% = actueel)Accepteer nieuw tijdelijk basaal:BolusBolus wizard
@@ -247,7 +244,6 @@
Pomp IOBDag totaalLaatste bolus
- %.1fu geledenVerkeerde ingaveWaarde niet correct ingesteldHerlaad profiel
@@ -309,7 +305,6 @@
StopSTOP INGEDRUKTWacht op pomp
- Er worden %.2fE toegediendOpzetten van visualisatie en monitoring en analyzeren van basaal en ratio\'sControleren van beschikbaarheid BG en insuline pomp data op NightscoutStarten met de Open Loop modus
@@ -333,7 +328,6 @@ Stel in en gebruik tijdelijk en standaard tijdelijke streefdoelen (bv. bij sport
Loop is uitgeschakeldLoop is ingeschakeld%1$.2f gelimiteerd tot %2$.2f
- Waarde %s is buiten de toegestane limietenCommando\'s op afstand zijn niet toegestaanOm de loop te onderbreken voor %1$d minuten antwoord met de code %2$sTijdelijk basaal %1$.2fE/u voor %2$d minuten succesvol gestart
@@ -447,7 +441,6 @@ Stel in en gebruik tijdelijk en standaard tijdelijke streefdoelen (bv. bij sport
ProfielStandaard waarde: 3.0 Dit is een belangrijke veiligheid parameter van OpenAPS. Dit limiteert je basaal met een max van 3 maal je hoogste basale dosis. Normaal hoef je deze niet te veranderen. Het is echter belangrijk dat je de ingebouwde limieten kent.Standaard waarde: 4 Dit is een combinatie van enerzijds het OpenAPS veiligheid limieten en anderzijds van “3 x max dagelijks basaal; 4x actueel”. Dit betekent dat het basaal niet hoger kan ingesteld worden dan het ingestelde nummer keer het actueel basaal waarbij de limiet in de pomp geen invloed heeft. Dit is een veiligheidsmaatregel om te voorkomen dat patiënten in gevaarlijke laag bereik komen zonder te snappen hoe het algoritme werkt. Nogmaals de standaard waarde is 4x; de meeste zullen deze waarde nooit moeten aanpassen maar zullen eerder andere waardes moeten aanpassen als ze tegen een limiet aanstoten.
- Standaard waarde: 1.2\nDit betekent dat de verhoging voor autosense ratio (en autotune ratio) is ingesteld op max 20%. Maw. een limiet in hoeverre je basaal kan worden verhoogd en hoeveel je ISF en BG doel verlaagd kan worden.Standaard waarde: 0.7\nDit is de andere kan van de autosens veiligheid limiet. Dit zet een limiet op hoe laag het basaal kan aangepast worden, en hoe hoog het ISF en het streef BG.Autosens past de streefwaardes ook aanStandaardwaarde: waar Dit wordt gebruikt om autosens de bevoegdheid te geven BG doelen aan te passen alsook ISF en basalen
@@ -460,7 +453,6 @@ Stel in en gebruik tijdelijk en standaard tijdelijke streefdoelen (bv. bij sport
Telefoon nummer niet conformFoutief SMS telefoon nummerKalibratie
- Verzend calibratie %.1f naar xDrip?xDrip+ niet geïnstalleerdKalibratie naar xDrip verzondenKalibratie verzonden. Het ontvangen van kalibraties moet actief zijn in xDrip.
@@ -511,7 +503,6 @@ Stel in en gebruik tijdelijk en standaard tijdelijke streefdoelen (bv. bij sport
insuline resistente volwasseneKies leeftijd van de patient voor veiligheids limietenGlimp
- %s benodigd batterij optimalistaie vrijwaring voor goede werkingLoop pauzerenGepauzeerd (%1$d m)Superbolus (%1$d m)
@@ -547,8 +538,6 @@ Stel in en gebruik tijdelijk en standaard tijdelijke streefdoelen (bv. bij sport
Statusindicatoren inschakelen voor cage, iage, sage, reservoir en batterijniveau op het beginscherm.Drempel waarschuwing reservoir niveau [E]Drempel alarm reservoir niveau [E]
- Drempel waarschuwing batterij niveau [%]
- Drempel alarm batterij niveau [%]IOBCOBFirmware
@@ -601,7 +590,6 @@ Stel in en gebruik tijdelijk en standaard tijdelijke streefdoelen (bv. bij sport
Opname instellingenMax absorptietijd maaltijd [uur]Verwachte tijd in uren totdat alle koolhydraten opgenomen zijn
- Toon vertraagde bolussen in % aanSAGEIAGECAGE
@@ -714,8 +702,6 @@ Stel in en gebruik tijdelijk en standaard tijdelijke streefdoelen (bv. bij sport
Stuur BG data naar xDrip+In xDrip+ kies 640g/Eversense data bronNSClient BG
- Basale waarde vervangen door minimaal ondersteunde waarde; %s
- Basale waarde vervangen door maximale ondersteunde waarde: %sBG berekeningBolus IOB berekeningBasaal IOB berekening
@@ -733,8 +719,6 @@ Stel in en gebruik tijdelijk en standaard tijdelijke streefdoelen (bv. bij sport
Closed modus actiefMaximum IOB juist ingesteldBG beschikbaar op gekozen bron
- Basale patroon niet geschikt op complete uren: %s
- Ongeldig profiel: %sBolus in pomp programmeren VernieuwStatus
@@ -747,7 +731,6 @@ Stel in en gebruik tijdelijk en standaard tijdelijke streefdoelen (bv. bij sport
ActiefAnnuleren van TBInstellen TBR (%1$d%% / %2$d min)
- Bolus (%.1f E)VernieuwenGevraagde is niet mogelijk met de pompOpgelet: verlengde en multi wave bolussen zijn actief. Loop is overgeschakeld naar low-suspend modus gedurende 6 uur. Alleen gewone bolussen worden ondersteund in loop modus
@@ -1075,7 +1058,6 @@ Stel in en gebruik tijdelijk en standaard tijdelijke streefdoelen (bv. bij sport
Werkingsmodus-wissel noterenAlarm noterenTBR-emulatie inschakelen
- Gebruik Vertraagde Bolus ipv TBRs om de limiet van 250% te omzeilenVerbindingsvertraging [s]SerienummerRelease softwareversie
diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml
index 576f6f20e3..b06da87522 100644
--- a/app/src/main/res/values-pl/strings.xml
+++ b/app/src/main/res/values-pl/strings.xml
@@ -9,7 +9,7 @@
Zresetuj bazy danychNa pewno chcesz zresetować bazy danych?Wyjście
- Używaj przedłużonych bolusów >200%
+ Używaj przedłużonych bolusów dla >200%%Urządzenie Bluetooth DanaRZawsze używaj wartości bezwzględnych bazyProszę uruchomić ponownie telefon lub zrestartować AndroidAPS w ustawieniach systemu telefonu \ninaczej AndroidAPS nie będzie otrzymywał logowań (ważne ze względu na śledzenie i sprawdzanie poprawności działania algorytmów)!
@@ -147,8 +147,8 @@
Naruszenie ograniczeńBłąd podania bolusaBłąd podania bazy tymczasowej
- Wartość bazy [%]
- % (100% = aktualny)
+ Wartość bazy [%%]
+ %% (100%% = aktualny)Akceptuj nową bazę tymczasową:LeczenieKalkulator
@@ -248,7 +248,7 @@
IOB w pompieJednostki dzienneOstatni bolus
- %.1fh temu
+ %1$.1fh temuBłędne dane wejścioweWartość ustawiona nieprawidłowoZaładuj profil ponownie
@@ -314,7 +314,7 @@
StopNACIŚNIĘTY STOPCzekam na pompę
- Zamierzam podać %.2fU
+ Zamierzam dostarczyć %1$.2fUKonfiguracja wizualizacji i monitorowania, analiza dawek i wartości bazowychSprawdź czy BG (pomiary cukru) są dostępne w Nightscout, i dane pompy insulinowej są ładowaneUruchamiam otwartą pętle (OpenLoop)
@@ -337,13 +337,26 @@
Pętla (Loop) jest wyłączonaPętla (Loop) jest włączona%1$.2f ograniczone do %2$.2f
- Wartość %s jest poza dopuszczalną granicą
+ Wartość %1$s jest poza dopuszczalną granicąZdalne komendy nie są dozwolone
+ Bolus zdalny niedostępny. Spróbuj ponownie później.
+ Aby rozpocząć bazę %1$.2fU/h przez %2$d min. odpowiedz kodem %3$s
+ Aby przełączyć profil na %1$s %2$d%% odpowiedz kodem %3$s
+ Aby rozpocząć bolus przedłużony %1$.2fU przez %2$d min. odpowiedz kodem %3$s
+ Aby rozpocząć bolus przedłużony %1$d%% przez %2$d min. odpowiedz kodem %3$sAby wstrzymać pętle na %1$d minut odpowiedz kodem %2$sTymczasowa baza %1$.2fU/h przez %2$d min rozpoczęta
+ Bolus przedłużony %1$.2fU na %2$d min. rozpoczęty pomyślnie
+ Tymczasowa baza %1$d%% przez %2$d min. pomyślnie rozpoczętaRozpoczęcie tymczasowej bazy nie powiodło się
+ Nie powiodło się podanie bolusa przedłużonego
+ Aby zatrzymać bazę tymczasową wprowadź kod %1$s
+ Aby zatrzymać bolus przedłużony wprowadź kod %1$sBaza tymczasowa anulowana
+ Przedłużony bolus anulowanoAnulowanie tymczasowej bazy nie powiodło się
+ Anulowanie bolusa przedłużonego nie powiodło się
+ Nieznane polecenie lub błędna odpowiedźBolus zdefiniowanyUstaw szybkie bolusyTekst przycisku:
@@ -451,7 +464,7 @@
ProfilWartość domyślna: 3 To jest kluczowy współczynnik bezpieczeństwa OpenAPS. Ogranicza dawki bazowe do 3x twojej największej dawki bazowej. Prawdopodobnie nie będziesz musiał tego zmieniać, ale powinieneś być świadomy tego, co się rozumie przez “3x max dzienna; 4x aktualna” dla współczynników bezpieczeństwa.Wartość domyślna: 4 To jest drugi kluczowy współczynnik bezpieczeństwa OpenAPS, i druga wartość z “3x max dzienna; 4x aktualna”. To oznacza, że Twoja dawka bazowa niezależnie od maksymalnej bazy ustawionej na pompie nie może być większa niż ta ustawiona wartość razy twoja aktualna dawka bazowa. To ma na celu przestrzec ludzi przed ustawieniem zbyt wysokiej dawki maksymalnej przed zrozumieniem jak działa algorytm. Ponownie, wartość domyślna to 4x; większość ludzi nie będzie potrzebowała tego zmienić i raczej będą potrzebować dostosować inne ustawienia, jeśli czują, że zbliżają się do współczynnika bezpieczeństwa.
- Wartość domyślna: 1.2\nTo jest mnożnik dla autosens (wkrótce autotune), ustawia 20% maks. limit dla najwyższej wartości jaką autosens może przyjąć, co z kolei określa jak wysoko autosens może zwiększyć bazę, jak nisko może ustawić współczynnik wrażliwości insuliny ISF, i jak nisko może ustawić docelową wartość glikemii.
+ Wartość domyślna: 1.2\nTo jest mnożnik dla autosens (wkrótce autotune), ustawia 20%% maks. limit dla najwyższej wartości jaką autosens może przyjąć, co z kolei określa jak wysoko autosens może zwiększyć bazę, jak nisko może ustawić współczynnik wrażliwości insuliny ISF, i jak nisko może ustawić docelową wartość glikemii.Wartość domyślna: 0.7\nDruga strona limitu bezpieczeństwa dla autosens, ustawia mnożnik minimalny dla wartości, do jakiej autosens może obniżyć bazę, i jak wysoko może ustawić ISF i wartość docelową BG.Autosens wpływa na wartości doceloweDomyślnie włączone\nTa funkcja pozwala wpływać na zmianę wartości docelowe BG, wartości bazy i oraz współczynnika wrażliwości na insulinę ISF.
@@ -464,7 +477,7 @@
Nieprawidłowy numer telefonuNieprawidłowy numer telefonu SMSKalibracja
- Wysłać kalibrację %.1f do xDrip?
+ Wysłać kalibrację %1$.1f do xDrip?xDrip+ nie zainstalowanyKalibracja przesłana do xDripKalibracja wysłana. Odbiór musi być dozwolony w xDrip.
@@ -515,7 +528,7 @@
Osoba dorosła insulino odpornaProszę wybierz wiek pacjenta w celu ustawienia wartości limitów bezpieczeństwaGlimp
- %s Potrzebuję wpisu na białą listę optymalizacji baterii, w celu zapewnienia poprawnego działania
+ %1$s potrzebuję wyłączenia z optymalizacji baterii, w celu zapewnienia poprawnego działaniaPętla wstrzymanaWstrzymana (%1$d m)Superbolus (%1$d m)
@@ -551,8 +564,8 @@
Włącz diody stanu dla cage, iage, sage, rezerwuar i poziom baterii na ekranie głównym.Próg ostrzeżenia o poziomie zbiornika [U]Próg ostrzeżenia o krytycznym poziomie zbiornika [U]
- Próg ostrzeżenia o poziomie baterii [%]
- Próg ostrzeżenia o krytycznym poziomie baterii [%]
+ Próg ostrzeżenia o poziomie baterii [%%]
+ Próg ostrzeżenia o krytycznym poziomie baterii [%%]IOBCOBFirmware
@@ -606,7 +619,7 @@
Ustawienia wchłanianiaMaks. czas wchłaniania posiłku [h]Oczekiwany czas w godzinach, w którym wszystkie węglowodany zostają wchłonięte
- Pokazuj bolus przedłużony w %
+ Wizualizacja bolusa przedłużonego jako %%SAGEIAGECAGE
@@ -719,8 +732,8 @@
Prześlij dane BG do xDrip+W xDrip+ wybierz źródło danych 640g/EversenseNSClient BG
- Wartość bazy zastąpiona minimalną obsługiwaną wartością: %s
- Wartość bazy zastąpiona maksymalną obsługiwaną wartością: %s
+ Wartość bazy zastąpiona minimalną obsługiwaną wartością: %1$s
+ Wartość bazy zastąpiona maksymalną obsługiwaną wartością: %1$sObliczenia BGObliczenia Bolus IOBObliczenia IOB
@@ -738,8 +751,8 @@
Tryb zamknięty włączonyMaks. IOB ustawione poprawnieBG dostępne z wybranego źródła
- Wartości bazy nie są ustawione w pełnych godzinach: %s
- Nieprawidłowy profil: %s
+ Wartości bazy nie są ustawione w pełnych godzinach: %1$s
+ Nieprawidłowy profil: %1$sProgramowanie pompy do podawania bolusaOdświeżStan
@@ -752,7 +765,7 @@
W działaniuAnulowanie TBRUstawianie TBR (%1$d%% / %2$d min)
- Podawanie bolusa (%.1f U)
+ Podawanie bolusa (%1$.1f U)OdświeżanieŻądana operacja nie jest obsługiwana przez pompęNiebezpieczne użycie: aktywne są bolusy przedłużone lub wielofalowe. Tryb pętli został ustawiony tylko na 6 godzinne zawieszenie z uwagi na niski poziom (BG). W trybie pętli obsługiwane są tylko normalne bolusy
@@ -1075,12 +1088,13 @@
WyciszAlarm pompyMelduj zmianę miejsca wkłucia
+ Zapisz zmianę zbiornikaMelduj zmianę drenuMelduj zmiany bateriiMelduj zmiany trybu pracyMelduj ostrzeżeniaWłącz emulację TBR
- Użyj rozszerzonych bolusów zamiast TBR by ominąć limit 250% bazy
+ Użyj rozszerzonych bolusów zamiast TBR by ominąć limit 250%% bazyOpóźnienie rozłączenie [s]Numer seryjnyWersja oprogramowania
@@ -1135,6 +1149,18 @@
Podaj \"Zmiana Sensora\" do NS do NS automatycznie przy uruchomieniu sensoraTomato (MiaoMiao)Tomato
+ Zmiana na czas letni w ciągu 24 godzin lub krócej
+ Zmiana czasu nastąpiła mniej niż 3 godziny temu - Zamknięta pętla wyłączona
+ limit wielkości pamięci wewnętrznej
+ Zwolnij co najmniej %1$d MB z pamięci wewnętrznej! Pętla zatrzymana!
+ Błędny format
+ Zły kod. Polecenie anulowano.
+ Nie skonfigurowano
+ Zmiana profilu wykonana
+ Kontroler wersji
+ stara wersja
+ bardzo stara wersja
+ Nowa wersja dostępna co najmniej %1$d dni! Powrót do LGS (zawieszania podawania bazy przy niskim poziomie) po 60 dniach, pętla zostanie wyłączona po 90 dniach%1$d dzień%1$d dni
diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml
index 9a18410854..36ffb7c5e9 100644
--- a/app/src/main/res/values-pt/strings.xml
+++ b/app/src/main/res/values-pt/strings.xml
@@ -9,7 +9,7 @@
Reinicializar base de dadosQuer realmente reiniciar a base de dados?Sair
- Usar bolus prolongado de >200%
+ Usar bólus prolongado de >200%%Dispositivo Bluetooth DanaRUsar sempre valores absolutos de basalPor favor, reinicie o seu telefone ou reinicie o AndroidAPS a partir das Configurações do Sistema \ncaso contrário, o AndroidAPS não terá registro (importante para controlar e verificar se os algoritmos estão a funcionar corretamente)!
@@ -147,8 +147,8 @@
Violação das restriçõesErro na entrega do bolusErro na entrega da basal temporária
- Valor da Basal [%]
- % (100% = atual)
+ Valor da Basal [%%]
+ %% (100%% = actual)Aceitar nova basal temporária:TratamentoCalculadora
@@ -248,7 +248,7 @@
IOB BombaUnidades diáriasÚltimo bólus
- %.1fh atrás
+ %1$.1fh atrásEntrada InválidaValor não definido corretamenteRecarregar perfil
@@ -314,7 +314,7 @@
PararSTOP PRESSIONADOÀ espera da bomba
- Vai ser enviado %.2fU
+ Vão ser administradas %1$.2fUConfiguração da visualização e monitoramento, e análise de rácios e basalsVerificar se a BG está disponível no Nightscout, e se os dados de insulina da bomba estão a ser carregadosA iniciar um open loop
@@ -337,12 +337,23 @@
Loop desactivadoLoop activado%1$.2f limitado a %2$.2f
- O valor %s está fora dos limites permitidos
+ O valor %1$s está fora dos limites permitidosO comando remoto não é permitido
+ O bólus remoto não está disponível. Tente novamente mais tarde.
+ Para começar a basal %1$.2fU/h durante%2$d min responda com o código %3$s
+ Para mudar o perfil para %1$s %2$d%% responda com o código %3$s
+ Para começar o bólus estendido %1$.2fU/h para %2$d min responda com o código %3$s
+ Para começar a basal %1$d% U/h durante %2$d min responda com o código %3$sPara suspender o loop por %1$d minutos resposta com código %2$sBasal temporária %1$.2fU/h para %2$d min iniciada com êxito
+ Bólus estendido %1$.2fU/h para %2$d min iniciado com êxito
+ Basal temporária %1$d% U/h durante%2$d min iniciada com êxitoInício basal temp falhou
+ Falha ao iniciar o bólus estendido
+ Para parar a basal temporária responda com o código %1$s
+ Para parar o bólus temporário responda com o código %1$sBasal temp cancelada
+ Bólus estendido canceladoNão foi possivel cancelar a basal tempFalhou o cancelamento do bolus extendidoComando desconhecido ou resposta errada
@@ -453,7 +464,7 @@
PerfilValor padrão: 3 Por segurança é o valor limite estabelecido por OpenAPS. O que faz é limitar a basal a x3 a basal mázima. Se necessário modificar este valor, por favor ter em conta que os dados apontam para que os limites de segurança sejam - 3 x max diario ou 4x valor actual (qual seja menor) como valores máximos.Valor padrão: 4 Esta é a outra parte dos valores limites de segurança - 3 x max diário ou 4x valor actual - do OpenAPS. Isto define que não importa o valor da basal máxima definido na bomba, o valor máximo da basal temporária não pode ser maior que 4 x o valor da basal definida na bomba. O objectivo é evitar que sejam determinadas basais temporárias demasiado elevadas antes que se perceba como o algoritmo funciona. 4x é um valor que a maior parte das pessoas nunca necessitará de alterar pois o mais provável é necessitar de alterar outras definições para não necessitar de \"ultrapassar\" este limite de segurança.
- Valor predefinido: 1.2\n Este é um multiplicador para autosens (e em breve autotune) que coloca um limite máximo de 20% aos rácios superiores e inferiores de autosens, o que por sua vez calcula o quão alto autosens pode ajustar a basal, quão pode baixar o Factor de Sensibilidade (ISF) e baixar o valor alvo de glucose no sangue (BG).
+ Valor predefinido: 1.2\n Este é um multiplicador para autosens (e em breve autotune) que coloca um limite máximo de 20%% aos rácios superiores e inferiores de autosens, o que por sua vez calcula o quão alto autosens pode ajustar a basal, quão pode baixar o Factor de Sensibilidade (FSI) e baixar o valor alvo de glicose no sangue.Valor padrão: 0.7\nO outro lado dos limites de segurança do autosens. Coloca um tecto no quão baixo autosens pode ajustar as basais, e quão alto pode ajustar os valores de ISF e valor alvo de glucose no sangue (BG).Autosens também ajusta os alvosValor padrão: true\nÉ usado para permitir que autosens possa ajustar os valores alvo de glucose no sangue (BG), além de ISF e basais.
@@ -466,7 +477,7 @@
Número de telefone não é válidoSMS número de telefone inválidoCalibração
- Enviar calibração %.1f para o xDrip?
+ Enviar calibração %1$.1f para o xDrip?xDrip+ não está instaladoCalibração enviada para o xDripCalibração enviada. Recepção têm de estar activada no xDrip.
@@ -517,7 +528,7 @@
Adulto resistente insulinaPor favor seleccione a idade do diabético para definir os limites de segurançaGlimp
- %s necessita de autorizar a não optimização da bateria para assegurar a performance necessária
+ %1$s necessita de autorizar a não optimização da bateria para assegurar a performance necessáriaLoop suspensoSuspendido (%1$d m)Superbólus (%1$d m)
@@ -553,8 +564,8 @@
Ativar as luzes de status para idade da cânula, idade da insulina, idade do sensor, reservatório e bateria no ecrã inicial.Limite de aviso de nível de reservatório [U]Limite crítico de nível de reservatório [U]
- Limite de aviso de nível de bateria [%]
- Limite crítico de nível de bateria [%]
+ Limite de aviso de nível de bateria [%%]
+ Limite crítico de nível de bateria [%%]IOBCOBFirmware
@@ -607,7 +618,7 @@
Configurações de absorçãoTempo máx. absorção refeição [h]Tempo em horas, espectável para que todos os hidratos de carbono da refeição sejam absorvidos
- Visualizar bólus estendido com %
+ Visualizar bólus prolongado como %%SAGEIAGECAGE
@@ -720,8 +731,8 @@
Enviar dados Glic. para xDrip+Seleccionar 640g/Eversense como fonte no xDrip+Glic NSCliente
- Valor da basal alterado para o valor mínimo suportado: %s
- Valor da basal alterado para o valor máximo suportado: %s
+ Valor da basal alterado para o valor mínimo suportado: %1$s
+ Valor da basal alterado para o valor máximo suportado: %1$sCálculos GlicCálculo de Bólus IOBCálculo de Basal IOB
@@ -739,8 +750,8 @@
Modo fechado ativadoIOB máxima definida correctamenteGlicemia disponivel desde a fonte selecionada
- Valores das basais não definidos por horas: %s
- Perfil inválido: %s
+ Valores das basais não definidos por horas: %1$s
+ Perfil inválido: %1$sA programar a bomba para injectar o bolusActualizarEstado
@@ -753,7 +764,7 @@
A correrCancelar TBRA definir TBR (%1$d%% / %2$d min)
- Injectando (%.1f U)
+ Injectando (%1$.1f U)A actualizarOperação solicitada não suportada pela bombaUltilização nao segura: bolus estendudos ou multionda estão activos. Modo do loop foi alterado para apenas suspender em limite inferior por 6h. Apenas são suportados bolus normais em modo loop
@@ -1082,7 +1093,7 @@
Alterações do modo de funcionamento de registoAlertas de registoAtivar a emulação TBR
- Usar bolus estendidos em vez de TBRs para contornar o limite de 250%
+ Usar bólus prolongados em vez de basais temporárias para contornar o limite de 250%%Atraso de desconexão [s]Número de sérieLançar versão de software
@@ -1118,15 +1129,17 @@
ActualizarIntegração de bomba para bombas Accu-Chek InsightNão inserido
- Última conexão:%1$d minutos atrás
+ Última ligação:%1$d minutos atrásBasal temporária: %1$d%% para %2$d / %3$d minutosEstendido: %1$.2f / %2$.2f U por %3$d minMultionda: %1$.2f / %2$.2f U por %3$d min
+ TDD: %1$.2fReser:%1$.2fUBat.: %1$d%%Duração máxima da recuperação [s]Duração mínima da recuperação [s]Duração da recuperação
+ Tempo de operação excedido - reinicar bluetooth== ∑ %1$s UU/hg/U
@@ -1135,12 +1148,18 @@
Criar evento \"Mudança de Sensor\" automaticamente no NS aquando do início do sensorTomato (MiaoMiao)Tomato
+ Horário de Verão em 24h ou menos
+ Horário de Verão a menos de 3 horas - Closed Loop desligadorestrição de armazenamento internoLiberte pelo menos %1$d MB do armazenamento interno! Loop desativado!Formato incorrectoCódigo errado. Comando cancelado.Não configuradoTroca de perfil criada
+ Verificador de Versão
+ versão antiga
+ versão muito antiga
+ Nova versão para pelo menos %1$d dias disponíveis! Voltar para o LGS após 60 dias, o loop será desativado após 90 dias%1$d dia%1$d dias
diff --git a/app/src/main/res/values-ro/strings.xml b/app/src/main/res/values-ro/strings.xml
index bca606bc90..12267b972b 100644
--- a/app/src/main/res/values-ro/strings.xml
+++ b/app/src/main/res/values-ro/strings.xml
@@ -9,7 +9,6 @@
Resetează bazele de dateSigur resetați bazele de date?Ieșire
- Folosiți bolusuri extinse pentru >200%Dispozitive bluetooth DanaRFolosește întotdeauna valori absolute ale bazaleiRestartați telefonul sau reporniți aplicația AndroidAPS din System Settings \naltfel AndroidAPS nu va putea face loguri (importante pentru verificarea corectitudinii funcționării algoritmilor)!
@@ -146,8 +145,6 @@
Încălcare a unei limiteEroare la livrarea bolusuluiEroare la setare bazală temporară
- Valoare bazală [%]
- % (100% = curent)Acceptă noua bazală temporară:TratamentCalculator
@@ -247,7 +244,6 @@
IOB din pompăUnități zilnicUltimul bolus
- %.1f o în urmăDate de intrare incorecteValoare setată incorectReîncarcă profilul
@@ -309,7 +305,6 @@
StopSTOP APĂSATSe așteaptă pompa
- Se vor livra %.2fUSe stabilesc vizualizările și monitorizarea și se analizează bazalele și valorile ratelorVerificați că vedeți glicemia în Nightscout și că datele despre insulină date de pompă sunt înregistrate în sitePornire în mod buclă deschisă
@@ -332,7 +327,6 @@
Bucla este dezactivatăBucla este activată%1$.2f este limitată la %2$.2f
- Valoarea %s este mai mare decât limita fizicăComanda de la distanță nu este permisăPentru suspendarea buclei pentru %1$d minute trimiteți codul %2$sBazala temporară %1$.2fU/h pentru %2$d minute a fost trimisă cu succes
@@ -446,7 +440,6 @@
ProfilValoare implicită: 3\nAceasta este o setare de critică de securitate a OpenAPS. Asta înseamnă că se limitează bazala lade 3x valoarea maximă a bazalelor tale.Cel mai probabil nu veți schimba această valoare, dar trebuie să țineți cont de ce se discută despre “3x max zilnic; 4x curent” ca valori de siguranță.Valoare implicită: 4\nAceasta este cealaltă jumătate a cheii de siguranță a OpenAPS și cealaltă jumătate a \"3x max zilnic; 4x curent\" al setărilor de siguranță.Aceasta înseamnă că bazala dumneavoastră, indiferent de bazala maximă configurată în pompă, nu poate fi mai mare de acest număr înmulțit cu nivelul curent al bazalei active. Această limitare este impusă pentru a evita posibilitatea de a intra pe un teritoriu periculos prin setarea unei bazale maxime excesiv de mari înainte de a înțelege funcționarea algoritmului. Din nou, valoarea implictă este 4x; majoritatea oamenilor nu vor trebui să ajusteze această valoare și vor modifica, mai degrabă, alte valori dacă vor simți că această valoare le stă în cale.
- Valoare implicită: 1.2\nAceasta este valoarea limită de multiplicare pentru autosens (și pentru autotune, în curând) pentru a seta o limită maximă de 20% din cât de mare poate fi raportul autosens, care, la rândul ei, determină cât de mult poate autosens să modifice bazalele, cât de jos poate modifica ISF și cât de jos poate pune ținta glicemiei.Valoare implicită: 0.7\nCealaltă parte a limitelor autosens, care limitează cât de jos poate ajusta bazalele și cât de mult poate mări ISF și țintele de glicemie.Autosens ajustează țintele laValoare implicită: adevărat\nAceasta se folosește pentru a permite autosens să ajusteze țintele de glicemie, pe lângă modificările asupra ISF și bazalelor.
@@ -459,7 +452,6 @@
Numărul de telefon este invalidNumăr de telefon SMS invalidCalibrare
- Trimite calibrarea %.1f către xDrip?xDrip+ nu este instalat.Calibrare trimisă către xDripCalibrare trimisă. Recepționarea trebuie să fie activată și în xDrip.
@@ -510,7 +502,6 @@
Adult rezistent la insulinăVă rog să selectați vârsta pacientului în vederea stabilirii valorilor maxime admise de siguranțăGlimp
- %s necesită excluderea din lista de optimizare a bateriei pentru funcționare corespunzătoareBuclă suspendatăSuspendat (%1$d min)Superbolus (%1$d min)
@@ -546,8 +537,6 @@
Activați indicatori pentru CAGE, IAGE, SAGE, nivel baterie și rezervor pe ecranul principal.Pragul de avertisment pentru insulina din rezervor [U]Pragul critic al nivelului insulinei în rezervor [U]
- Pragul de avertizare nivel baterie [%]
- Pragul critic al nivelului baterie [%]IOBCOBFirmware
@@ -600,7 +589,6 @@
Setări absorbțieTimp maxim absorbție masă [o]Timp în ore la care se presupune că toți carbohidrații sunt absorbiți
- Afișati bolusul extins ca %VSVIVC
@@ -713,8 +701,6 @@
Trimite date glicemie la xDrip+Selectați 640g/Eversense ca sursă de date în xDrip+Glicemie NSClient
- Valoarea bazalei a fost înlocuită cu valoarea minimă posibilă: %s
- Valoarea bazalei a fost înlocuită cu valoarea maximă posibilă: %sCalcul glicemieCalcul IOB bolusCalcul IOB bazală
@@ -732,8 +718,6 @@
Mod buclă închisă activatIOB maxim configurat corectGlicemie disponibilă din sursa selectată
- Valori bazale nealiniate la ore: %s
- Profil invalid: %sSe programează pompa pentru livrare bolusReîncarcăStare
@@ -746,7 +730,6 @@
RuleazăSe oprește TBRSe setează TBR (%1$d%% / %2$d min)
- Bolusare (%.1f U)ReîncărcareOperațiunea nu este suportată de pompăFolosire nesigură: un bolus extins sau multiwave este activ. Modul buclă este setat să funcționeze în low-suspend pentru 6 ore. Doar bolusurile normale sunt posibile.
@@ -1074,7 +1057,6 @@
Înregistrează schimbările modului de operareÎnregistrează alerteleActivează emularea RBT
- Folosește bolus extins în locul RBT pentru a trece de limita de 250%Întârziere a deconectării [s]Număr de serieVersiunea de software
diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml
index 3e0502ea9b..aaa07dfec0 100644
--- a/app/src/main/res/values-ru/strings.xml
+++ b/app/src/main/res/values-ru/strings.xml
@@ -1,15 +1,15 @@
- Безопасность назначений
+ Безопасность терапииМакс разрешенный болюс [U] ед.макс разрешенные углеводы (г)опции
- синхронисировать назначения с NS
+ Синхронизировать назначения с NSобнулить базыВы действительно хотите обнулить базы данных?Выход
- Для величин >200% пользуйтесь пролонгированным болюсом
+ Для величин >200%% пользуйтесь пролонгированным болюсомустройство блутус danaRВсегда пользуйтесь абсолютными величинами для базалаПожалуйста перезагрузите телефон или перезапустите AndroidAPS из системных настроек \иначе AndroidAPS не будет вести лог (важно для отслеживания и проверки алгоритмов)!
@@ -116,7 +116,7 @@
профиль NSпростой профильВремБазал
- назначения
+ Терапиявиртуальная помпаПортал лечения / назначенийпомпа
@@ -147,14 +147,14 @@
ограничение нарушеноОшибка подачи болюсаОшибка подачи врем базала
- величина базала (%)
- % (100% = текущий)
+ Величина базала [%%]
+ %% (100%% = текущее)принять новый врем базал:болюскалькуляторприменено ограничение!подтверждение
- введите новое назначение
+ Ввести новое назначение:болюсболюс:базал
@@ -248,7 +248,7 @@
активный инсулин на помпесуточные единицыпредыдущий болюс
- %.1fч назад
+ %1$.1fч назадвведенные данные невернывеличина не задана должным образомобновить профиль
@@ -314,7 +314,7 @@
стопнажат стопожидание помпы
- Будет доставлено %.2fU ед. инс
+ Начинается подача болюса %1$.2fед.настройка визуализации и мониторинга, анализ базала и коэффициентовубедитесь что СК и данные помпы передаются в NSстарт незамкнутого цикла
@@ -337,7 +337,7 @@
зцикл не работаетзцикл работает%1$.2f ограничено до %2$.2f
- величина %s недопустима
+ Величина %1$s недопустимаудаленная команда не разрешенаУдаленный болюс недоступен, повторите попытку позже.Чтобы подать базал %1$.2fед./ч в течение %2$d мин. ответьте кодом %3$s
@@ -464,7 +464,7 @@
профильзначение по умолчанию:3 Это ключевой ограничитель безопасности OpenAPS. Он ограничивает величину вашего базала максимум до 3x максимума. Вам вероятно не понадобится менять эту величину но вам следует понимать, что она входит в формулу дуэта \"максимум 3x ежедневное; 4x текущее\"значение по умолчанию: 4 . Это вторая половина обеспечения безопасности OpenAPS из дуэта \"максимум 3x ежедневное; 4x текущее\" Означает что ваша база независимо от установок помпы не может быть выше чем это число умноженное на текущее значение базала. Ограничение для того, чтобы предотвратить вторжение в опасную зону из-за высокого уровня установленных значений базы без понимания алгоритма работы приложения. Большинству людей никогда не потребуется изменять это значение, скорее всего нужно поменять другие настройки если вы чувствуете, что вам мешает это ограничение.
- знач по умолчанию:1,2. Это множитель для autosens (вскоре autotune) с лимитом 20% который определяет насколько высоко autosens может поднять базал, насколько низко опустиь ISF (чувствительность к инс)и целевые СК
+ Значение по умолчанию: 1,2\n Это множитель для autosens ( и вскоре autotune) с лимитом 20%% который определяет лимит верхнего значения autosens, который в свою очередь предопределяет верхнюю границу базала, границы изменения чувствительности к инсулину ISF и нижние границы целевой ГК.по умолчанию:0.7 Еще один параметр безопасности autosens, определяющий как низко он может опускать базал и как высоко поднимать ISF (чувств к инс) и целевые СКAutosens тоже подстроит целизначение по умолчанию : верно. используется чтобы разрешить юстировку целевых СК, а также ISF и базала
@@ -477,7 +477,7 @@
неверный номер телефонаневерный номер телефона для смскалибровка
- отправить калибровку %.1f на xdrip?
+ Отправить калибровку %1$.1f на xDrip?xdrip+ не установленкалибровка передается на xdripкалибровка отправлена. в xdrip должен быть активирован прием
@@ -528,7 +528,7 @@
Инсулинорезистентный взрослыйвыберите возраст пациента для определения ограничителей безопасностиGlimp
- %s необходимо включить в белый список для корректной работы
+ %1$s необходимо включить в белый список оптимизации батареи для корректной работыЗЦ остановленОстановлен на(%1$d m)Суперболюс(%1$d m)
@@ -564,8 +564,8 @@
Включить на главном экране индикаторы отработанного времени для канюли помпы, инсулина, сенсора, резервуара, а также показать уровень аккумулятора.Порог уровня наполненности резервуара для оповещения [ед.]Порог критического уровня наполненности резервуара [U]
- Порог предупреждения о разрядке батареи [%]
- Порог предупреждения о критическом уровне разрядки батареи [%]
+ Порог предупреждения о разрядке батареи [%%]
+ Порог предупреждения о критическом уровне разрядки батареи [%%]IOB акт инсакт углевпрошивка
@@ -618,7 +618,7 @@
Настройки усваиваемостиМаксимальное время усваимости пищи [h] (час)Ожидаемое время усваивания всех углеводов пищи в часах
- Просмотреть расширенный болюс %
+ Показать пролонгированный болюс в %%ВОЗРСенсВозрИнсВозрКан
@@ -690,7 +690,7 @@
Получение времени помпыповторное использованиеКонтроль с часов
- Поставить временные цели и ввести назначения с часов.
+ Ставить временные цели и вводить назначения с часов.Истекло время ожидания соединенияЕдаграмм
@@ -731,8 +731,8 @@
Отправить данные СК на xDrip+В xDrip + выберите источник данных 640g/EversenseСК с клиента Nightscout
- Значение базала заменено минимальной поддерживаемой величиной: %s
- Значение базала заменено максимальной поддерживаемой величиной: %s
+ Значение базала заменено минимальной поддерживаемой величиной: %1$s
+ Значение базала заменено максимальной поддерживаемой величиной: %1$sВычисление СКРасчет болюсного активного инсулина IOBРасчет базального активного инсулина IOB
@@ -750,8 +750,8 @@
Режим замкнутого цикла включенМаксимум активного инсулина IOB установлен правильноСК доступны из выбранного источника
- Базальные значения не выровнены по часам: %s
- Недопустимый профиль: %s
+ Базальные значения не выровнены по часам: %1$s
+ Недопустимый профиль: %1$sПомпа программируется для болюсаОбновитьСостояние
@@ -764,7 +764,7 @@
ВыполняетсяОтмена врем базала TBRУстановка врем базала TBR на (%1$d%% / %2$d мин)
- Введение болюса (%.1f ед)
+ Введение болюса (%1$.1f ед)ОбновлениеЗапрашиваемая операция не поддерживается помпойНебезопасное использование: Удлиненный или многоволновой болюс активны. Режим цикла Loop установлен на приостановку при низкой гликемии только на 6 часов. В режиме loop поддерживаются только обычные болюсы
@@ -1044,7 +1044,7 @@ Context | Edit Context
AndroidAPS перезапущенНайдены сохраненные параметрыВнимание: Если вы активируете подключение к невиртуальной помпе, AndroidAPS скопирует настройки базала в профиль помпы, перезаписывая существующие настройки, хранящиеся в ней. Убедитесь, что настройки базала в AndroidAPS корректны. Если вы не уверены или не хотите перезаписать настройки базала на помпу, нажмите отменить и повторите подключение в другое время.
- Данные назначений неполные
+ Данные терапии неполныеПараметры обслуживанияАдрес электронной почтыНедопустимый e-mail
@@ -1095,7 +1095,7 @@ Context | Edit Context
Журнал изменений режима работыЖурнал оповещенийВключить эмуляцию TBR
- Использовать пролонгированные болюсы вместо временных базалов TBR чтобы обойти лимит в 250%
+ Использовать пролонгированные болюсы вместо временных базалов TBR чтобы обойти лимит в 250%%Задержка разъединения [s]Серийный номерВерсия ПО
@@ -1158,4 +1158,8 @@ Context | Edit Context
Неверный код. Команда отменена.Не сконфигурированоПереключатель профиля создан
+ Проверка версии
+ старая версия
+ очень старая версия
+ Новая версия доступна не менее %1$d дней! После 60 дней переход на остановку при низкой гликемии LGS, замкнутый цикл будет отключен через 90 дней
diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml
index 570c108339..f9dacaef8b 100644
--- a/app/src/main/res/values-sk/strings.xml
+++ b/app/src/main/res/values-sk/strings.xml
@@ -9,7 +9,7 @@
Vymaž databázuNaozaj chcete vymazať databázu?Ukončiť
- Použiť predĺžené bolusy pre >200%
+ Použiť predĺžené bolusy pre >200%%DanaR Bluetooth zariadenieVždy používaj absolútne hodnoty bazálovProsím reštartuj svoj telefón, alebo reštartuj AndroidAPS zo systémových nastavení, v opačnom prípade AndroidAPS nebude mocť zapisovať údaje (dôležité kvôli sledovaniu a overovaniu, že algoritmus pracuje správne)!
@@ -147,8 +147,8 @@
Mimo povolený rozsahChyba podania bolusuChyba podávania dočasného bazálu
- Hodnota bazálu [%]
- % (100% = aktuálny)
+ Hodnota bazálu [%%]
+ %% (100%% = aktuálny)Povoliť nový dočasný bazál:BolusKalkulačka
@@ -248,7 +248,7 @@
IOB z pumpyJednotiek za deňPosledný bolus
- pred %.1fh
+ pred %1$.1fhChybné vstupné dátaHodnota nenastavená správneObnoviť profil
@@ -314,7 +314,7 @@
StopSTLAČENÝ STOPČakanie na pumpu
- %.2fU inzulínu bude podaných
+ Podávanie %1$.2fU inzulínuNastavenie vizualizácie a monitoringu (Nightscout), analyzovať bazály a prevodySkontrolovať, či sú glykémie a údaje z pumpy viditeľné v NightscouteZačať s otvoreným okruhom
@@ -337,7 +337,7 @@
Uzavretý okruh je deaktivovanýUzavretý okruh je aktivovaný%1$.2f obmedzené na %2$.2f
- Hodnota %s je mimo prednastavený rozsah
+ Hodnota %1$s je mimo prednastavený rozsahPríkazy na diaľku nie sú povolenéDiaľkovo ovládaný bolus nie je momentálne povolený. Skúste to neskôr.Pre spustenie bazálu %1$.2fU/h na %2$d min odpovedzte SMS s kódom %3$s
@@ -464,7 +464,7 @@
ProfilŠtandardná hodnota: 3 Toto je kľúčová hodnota zabezpečenia. Hovorí, že maximálny nastaviteľný bazál je trojnásobkom maximálneho denného bazálu. Spravidla to zrejme nebudete musieť meniť, prípadne si prečítate o téme \"3x max denný; 4x aktuálny\".Štandardná hodnota: 4 Toto je druhá kľúčová hodnota. Hovorí, že maximálna hodnota dočasného bazálu nikdy nebude väčšia, ako štvornásobok aktuálneho bazálu. Je to preto, aby se ľudia nedostali do nebezpečných hodnôt skôr, ako pochopia ako OpenAPS pracuje. Znovu, štandardná hodnota je 4 a väčšina ľudí ju nikdy nebude musieť meniť. Pokiaľ nestačí, obvykle je problém niekde inde.
- Štandardná hodnota: 1.2\nToto je bezpečnostné nastavenie pre automatickú detekciu citlivosti. Hovorí, že automatická detekcia citlivosti (a onedlho Autotune) môže zvýšiť bazály, znížiť ISF a znížiť cieľovú hodnotu glykémie o 20%.
+ Štandardná hodnota: 1.2\nToto je bezpečnostné nastavenie pre detekciu citlivosti (a čoskoro autotune). Hovorí, že autosens môže zvýšiť bazály, znížiť ISF a znížiť cieľovú hodnotu glykémie o 20%%.Štandardná hodnota: 0.7\nToto je bezpečnostné nastavenie pre automatickú detekciu citlivosti. Hovorí, že automatická detekcia citlivosti môže znížiť bazály, zvýšiť ISF a zvýšiť cieľovú hodnotu glykémie na 70%.Úprava cieľovej glykémie pomocou automatickej detekcie citlivostiŠtandardná hodnota: zapnuté\nToto nastavenie hovorí, že automatická detekcia citlivosti môže meniť tiež cieľové hodnoty glykémií.
@@ -477,7 +477,7 @@
Neplatné telefónne čisloChybné telefónne čísloKalibrácia
- Poslať kalibráciu %.1f do xDripu?
+ Poslať kalibráciu %1$.1f do xDripu?xDrip+ nie je nainštalovanýKalibrácia odoslaná do xDripuKalibrácia odoslaná. Príjem kalibrácií musí byť v xDripe povolený.
@@ -528,7 +528,7 @@
Dospelý z nízkou citlivosťouVyberte vek pacienta pre nastavenie bezpečnostných limitovGlimp
- %s potrebuje vypnúť optimalizáciu baterie pre optimálny výkon
+ %1$s potrebuje vypnúť optimalizáciu batérie pre optimálny výkonUzavretý okruh pozastavenýPozastavený (%1$d min)Superbolus (%1$d m)
@@ -564,8 +564,8 @@
Povoliť indikátory stavu pre CAGE, IAGE, SAGE, Reservoir a Battery Level na domovskej obrazovke.Prah upozornenia na úroveň hladiny zásobníka [U]Prah kritickej úrovne hladiny zásobníka [U]
- Prah upozornenia na úroveň batérie [%]
- Prah kritickej úrovne batérie [%]
+ Prah upozornenia na úroveň batérie [%%]
+ Prah kritickej úrovne batérie [%%]IOBCOBFirmware
@@ -618,7 +618,7 @@
Nastavenie vstrebávania sacharidovMax. doba vstrebávania sacharidov [h]Čas v hodinách, počas ktorého predpokladáme, že všetky sacharidy budú vstrebané
- Zobrazovať predĺžený bolus v %
+ Zobrazovať predĺžený bolus v %%SENZINZKAN
@@ -731,8 +731,8 @@
Odosielať glykémie do xDrip+V xDrip+ vyberte zdroj dát 640g/EversenseGlykémie z NS
- Hodnota bazálu nahradená minimálnou možnou
- Hodnota bazálu nahradená maximálnou možnou: %s
+ Hodnota bazálu nahradená minimálnou možnou: %1$s
+ Hodnota bazálu nahradená maximálnou možnou: %1$sVýpočet glykémieVýpočet bolusového IOBVýpočet bazálneho IOB
@@ -750,8 +750,8 @@
Uzavretý okruh povolenýMaximálne IOB nastavené správneGlykémie dostupné z vybraného zdroja
- Bazálne hodnoty nie sú zarovnané na celé hodiny: %s
- Chybný profil: %s
+ Bazálne hodnoty nie sú zarovnané na celé hodiny: %1$s
+ Chybný profil: %1$sProgramovanie pumpy pre bolusObnoviťStav
@@ -764,7 +764,7 @@
V prevádzkeRušenie dočasného bazáluNastavovanie doč. bazálu (%1$d%% / %2$d min)
- Podávanie bolusu (%.1f U)
+ Podávanie bolusu (%1$.1f U)Aktualizuje sa stavPožadovaná operácia nie je pumpou podporovanáNebezpečné použitie: predĺžený alebo multiwave bolus je aktívny. Pumpa bola vypnutá len na 6 hodín. Povolené sú iba normálne bolusy.
@@ -1093,7 +1093,7 @@
Zaznamenať zmenu režimu prevádzkyZaznamenať výstrahyPovoliť emuláciu dočasných bazálov
- Používať predĺžené bolusy namiesto dočasných bázalov, aby sme sa vyhli 250% limitu
+ Používať predĺžené bolusy namiesto dočasných bázalov, aby sme sa vyhli 250%% limituOneskorenie odpojenia [s]Sériové čísloVerzia softwaru
@@ -1156,6 +1156,10 @@
Nesprávný kód. Príkaz zrušený.Nie je nakonfigurovanéPrepnutie profilu vytvorené
+ Kontrola verzie
+ stará verzia
+ veľmi stará verzia
+ Nová verzia dostupná najmenej %1$d dní! Návrat k liečbe inzulínovou pumpou s podporou senzora po 60 dňoch, okruh bude deaktivovaný po 90 dňoch.%1$d deň%1$d dní
diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml
index 8c8a7ead52..409b7f21a6 100644
--- a/app/src/main/res/values-sv/strings.xml
+++ b/app/src/main/res/values-sv/strings.xml
@@ -55,6 +55,7 @@ Eversense-appen.
Följ och kontrollera din AndroidAPS med din WearOS-klockaVisa AAPS-information på din xDrip-urtavlaFjärrstyr AndroidAPS med SMS-kommandon.
+ BackaStartaGodkännEnheter
@@ -147,8 +148,6 @@ Eversense-appen.
Begränsning nåddFel vid bolusleveransFel vid justering av temp basal
- Basal [%]
- % (100% = profilens värde)Acceptera ny temp basal:BehandlingKalkylator
@@ -248,7 +247,6 @@ Eversense-appen.
Pumpens IOBEnheter per dagSenaste bolus
- %.1f tim sedanFel på inmatningMisslyckades med inställningLadda om profil
@@ -266,6 +264,10 @@ Eversense-appen.
För att ge bolus %1$.2f enheter, svara med kod %2$sFör att skicka kalibrering %1$.2f, svara med kod %2$sBolus misslyckades
+ Bolus %1$.2f enheter levererat
+ Kommer att leverera %1$.2f enheter
+ Bolus %1$.2f enheter levererat
+ Levererar %1$.2f enheterTillåt fjärrstyrning via SMSFingerSensor
@@ -310,7 +312,7 @@ Eversense-appen.
StoppStopp nedtrycktVäntar på pump
- Kommer att leverera %.2f enheter
+ Kommer att leverera %1$.2f enheterStäller in utseende och övervakning för att sedan kunna analysera basaler och kvoterKontrollera att BG syns i Nightscout och att insulindata från pumpen laddas uppStarta med open loop
@@ -333,13 +335,26 @@ Eversense-appen.
Loop är avstängdLoop är aktiverad%1$.2f begränsat till %2$.2f
- Värdet %s är utanför hård begränsning
+ Värdet %1$s är utanför hård begränsningOtillåtet fjärrkommando
+ Fjärrbolus inte tillgängligt. Försök igen senare.
+ För att starta temp basal %1$.2f enheter/tim i %2$d min, svara med kod %3$s
+ För att byta till profil %1$s %2$d%% svara med kod %3$s
+ För att starta förlängd bolus med %1$.2f enheter över %2$d min, svara med kod %3$s
+ För att starta temp basal %1$d%% i %2$d min, svara med kod %3$sFör att pausa loop i %1$d minuter, svara med kod %2$sTemp basal %1$.2f enheter/tim i %2$d min startad
+ Förlängd bolus %1$.2f enheter över %2$d min har startats
+ Temp basal %1$d%% enheter/tim i %2$d min startadFel vid start av temp basal
+ Lyckades inte starta förlängd bolus
+ För att stoppa temp basal, svara med kod %1$s
+ För att stoppa förlängd bolus, svara med kod %1$sTemp basal avbruten
+ Förlängd bolus avbrutenMisslyckades med att avbryta temp basal
+ Avbryter förlängd bolus
+ Okänt kommando eller fel svarKalkylatorKalkylatorinställningarKnapptext:
@@ -448,7 +463,7 @@ Eversense-appen.
Standardvärde: 3 Detta är en grundsten i OpenAPS säkerhet. Detta begränsar dina temp basaler till maximalt 3x din största basaldos. Du behöver oftast inte ändra detta värde. Läs på och förstå skillnaden mellan 3x nuvarande och 3x daglig max som säkerhetsinställningar.Standardvärde: 4 Detta är en grundsten i OpenAPS säkerhet. Detta begränsar dina tempbasaler till maximalt 4 gånger din nuvarande basaldos, oberoende av din maximala basaldos. Detta för att undvika att man av misstag gör farliga inställningar. Om man når taket i denna inställning så kanske ändringar i andra inställningar behövs. De flesta behöver inte ändra denna inställning.Standardvärde: 1.2\nDetta är en multiplikatorbegränsare för autosens/autotune som gör att automatiken kan justera upp basaler, sänka insulinkänslighet (ISF) och/eller målvärde med upp till 20%.
- Standardvärde: 0.7\nDetta är en multiplikatorbegränsare för autosens/autotune som gör att automatiken kan justera ner basaler, höja insulinkänslighet (ISF) och/eller målvärde med upp till 30% för att kompensera för t ex tillfällig hög insulinkänslighet.
+ Standardvärde: 0.7\nDetta är en multiplikatorbegränsare för autosens/autotune som gör att automatiken kan justera ner basaler, höja insulinkänslighet (ISF) och/eller målvärde med upp till 30%% för att kompensera för t ex tillfällig hög insulinkänslighet.Autosens justerar även mål-BGStandardvärde: sant. Detta för att tillåta autosens justera mål-BG utöver ISF och basaler.Standardvärde: 2 Bolus snooze är aktivt efter att du givit en måltidsbolus, detta för att inte loop ska lågtempa när du just ätit. I detta exempel och grundvärde är 2; innebär att DIA på 3 tim kommer bolus snooze kommer att fasas ut under 1,5 tim (3DIA/2).
@@ -460,7 +475,7 @@ Eversense-appen.
Ogiltigt telefonnummerOgiltigt telefonnummer för SMSKalibrering
- Skicka kalibrering %.1f till xDrip?
+ Skicka kalibrering %1$.1f till xDrip?xDrip+ inte installeratKalibrering skickad till xDripKalibrering skickad. Observera att xDrip måste vara inställd att ta emot kalibreringar.
@@ -511,7 +526,6 @@ Eversense-appen.
Insulinresistent vuxenVg ange personens ålder för inställningar av gränserGlimp
- %s behöver kunna kringgå batterisparfunktionerna för att fungera korrektLoop pausadPausad (%1$d min)Superbolus (%1$d min)
@@ -547,8 +561,6 @@ Eversense-appen.
Aktivera statusindikationerna för cage, iage, sage, reservoar och batterinivå på hemskärmen.Varningsnivå för reservoar [U]Akut varningsnivå för reservoar [U]
- Varningsnivå för batteri [%]
- Akut varningsnivå för batteri [%]IOBCOBFirmwareversion
@@ -601,7 +613,7 @@ Eversense-appen.
AbsorptionsinställningarMax absorptionstid för en måltid [tim]Tid i timmar när alla kolhydrater förväntas vara absorberade
- Visa förlängd bolus som %
+ Visa förlängd bolus som %%SAGEIAGECAGE
@@ -637,7 +649,7 @@ Eversense-appen.
Free-Peak OrefRapid-Acting OrefUltra-Rapid Oref
- %1$s tim DIA är för kort. Använder %2$s istället!
+ %1$f tim DIA är för kort. Använder %2$f istället!Aktivera profilDatumOGILTIG
@@ -714,8 +726,8 @@ Eversense-appen.
Skicka BG-data till xDrip+Välj \"640G/Eversense\" som datakälla i xDrip+NSClient BG
- Basalvärdet ersatt med det lägsta tillåtna: %s
- Basalvärdet ersatt med det maximala tillåtna: %s
+ Basalvärdet ersatt med det lägsta tillåtna: %1$s
+ Basalvärdet ersatt med det maximala tillåtna: %1$sAnvänd BGAnvänd bolus-IOBAnvänd basal-IOB
@@ -733,8 +745,8 @@ Eversense-appen.
Closed loop aktiveradMax IOB är korrekt angivetBG tillgängligt från vald källa
- Profilens basaler är inte satta på hel timme: %s
- Ogiltig profil: %s
+ Profilens basaler är inte satta på hel timme: %1$s
+ Ogiltig profil: %1$sProgrammerar bolus i pumpUppdateraLäge
@@ -747,7 +759,6 @@ Eversense-appen.
KörsAvbryter temp basalSätter temp basal (%1$d%% / %2$d min)
- Levererar bolus (%.1f enheter)UppdaterarÖnskad åtgärd stöds inte av pumpenOsäker användning: Förlängd- eller kombibolus är aktiv. Loop mode är satt till att bromsa vid lågt BG i 6 timmar. Endast normala bolusar tillåtna i loopläge.
@@ -1070,12 +1081,13 @@ Eversense-appen.
TystaPumpvarningLogga kanylbyten
+ Logga reservoarbytenLogga slangbytenLogga batteribytenLogga när driftsläge ändrasLogga varningarAktivera emulering av temp basal
- Använda utökade bolusar istället för temp basaler för att kringgå 250%-begränsningen
+ Använda förlängda bolusar istället för temp basaler för att kringgå 250%%-begränsningenFördröjning av frånkoppling [s]SerienummerMjukvaruversion Release
@@ -1130,6 +1142,14 @@ Eversense-appen.
Loggar automatiskt ett sensorbyte i NS när en sensor startasTomato (MiaoMiao)Tomato
+ Sommar/vintertid inträffar inom 24 timmar
+ Sommar/vintertid ändrades för mindre än 3 timmar sedan. Closed Loop avstängt
+ intern lagringsbegränsning
+ Frigör minst %1$d MB från internminnet. Loop inaktiverad!
+ Felaktigt format
+ Fel kod. Kommandot avbrutet.
+ Inte konfigurerad
+ Skapade ett profilbyte%1$d dag%1$d dagar
diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml
index e75625a663..d858630fff 100644
--- a/app/src/main/res/values-tr/strings.xml
+++ b/app/src/main/res/values-tr/strings.xml
@@ -9,7 +9,6 @@
Veritabanlarını sıfırlaVeritabanlarını gerçekten sıfırlamak istiyor musunuz?Çıkış
- Yayım bolus >200% için kullanınDanaR Bluetooth aygıtıHer zaman bazal mutlak değerleri kullanLütfen telefonunu yeniden başlat, yada Android APS sistem ayarları üzerinden yeniden başlat.\nAksi taktirde Android APS hiç bir günlük tutmayacak (takip ve doğrulama, algoritmanın düzenli çalışmasi için önemli)!
@@ -144,8 +143,6 @@
Kısıtlamalar ihlaliBolus teslimat hatasıGeçici Bazal teslimat hatası
- Bazal değeri [%]
- % ( 100% = aktuel)Yeni geçici bazal oranını kabul et:TedaviHesap makinesi
@@ -245,7 +242,6 @@
IOB(Aktif insülin) pompaGünlük birimleriSon bolus
- %.1fs önceGeçersiz bilgi girişiDeğer düzgün ayarlanmamışDosyayı yeniden yükle
@@ -307,7 +303,6 @@
DurDURDUR\'A BASTIĞINIZPompa bekleniyor
- %.2fU GönderilecekNightscout üzerinden izlemeyi ve görselleştirmeyi yapılandırın ve bazal oranlarını ve faktörleri düzenleyinNightscout\'ta KŞ\'nin bulunduğunu ve insülin verilerinin yüklenmekte olduğunu doğrulayınAçık Döngü modu başlatılıyor
@@ -330,7 +325,6 @@
Döngü devre dışıDöngü etkin%1$.2f dan %2$.2f olarak sınırlı
- Değer %s sabit sınırları dışında olduğunuUzaktan komuta izin verilmez%1$d dakika için Döngü\'yü askıya almak için %2$s kodunu yanıtlaGeçici bazal %1$.2fÜ/s %2$d dakika için başarıyla başlatıldı
@@ -443,7 +437,6 @@
ProfilVarsayılan değer: 3 Bu OpenAPS için önemli bir güvenlik ayarıdır. Maksimum bazal Iob\'u, en büyük bazal oranınızın üç katı (varsayılan olarak) ile sınırlar. Genel olarak, bu değeri değiştirmemelisiniz. Ama \"3x max günlük, 4x şuan\" ın bir güvenlik ayarı olarak ne anlama geldiğini bilmelisiniz.Varsayılan ayar: 4 Bu, OpenAPS güvenlik ayarlarının diğer yarısı ve \"3x max günlük, 4x akım\" güvenlik korumasının diğer yarısıdır. Bu, başlangıç değerinizin, pompada ayarlanan taban maksimum değerinizden bağımsız olarak, mevcut bazal seviyenin bu sayısından daha yüksek olamayacağı anlamına gelir. Bu, insanların, algoritmanın nasıl çalıştığını anlamadan temel çizgiyi büyük ölçüde artırarak kendilerini tehlikeli durumlarda bulmalarını engellemektir. Varsayılan ayar 4x\'dir; Çoğu insan bu ayarları asla değiştirmek zorunda kalmayacak, ancak bu güvenlik sınırına yakınsa diğer terapi ayarlarını ayarlamalıdırlar.
- Varsayılan değer: 1.2\nBu autosens oranının ne kadar yüksek olabileceği üzerine %20\'lik bir max limit belirlemek için autosens (ve yakında autotune) için bir çarpan faktörüdür. Bu sayede autosens İnsülin Duyarlılık Faktörünün ne kadar düşük tutulacağını ve KŞ hedefini ne kadar düşük tutulabileceğine karar verir.Varsayılan değer: 0.7\nBu autosens için diğer güvenlik önlemidir. Bazal oranların ne kadar düştüğünü ve İnsülin Duyarlılık Faktörü ve KŞ hedeflerini ne kadar yüksek tutabileceğini gösterir.Autosens hedefleri de ayarlarVarsayılan değer: true\nBu autosens in İnsülin Duyarlılık Faktörü ve bazallara ek olarak KŞ hedeflerinin ayarlanmasında kullanılır.
@@ -457,7 +450,6 @@ Aktif Karbonhidratın ne kadar hızlı sindirildiğine ve KŞ\'nin beklenenden d
Telefon numarası geçerli değilGeçersiz SMS telefon numarasıKalibrasyon
- Kalibrasyon %.1f xDrip\'e gönderilsin mi?xDrip+ uygulaması yüklenmemişKalibrasyon xDrip+ a gönderildiKalibrasyon gönderildi. Alma xDrip+\'ta etkinleştirilmelidir.
@@ -508,7 +500,6 @@ Aktif Karbonhidratın ne kadar hızlı sindirildiğine ve KŞ\'nin beklenenden d
Yetişkin İnsülin direnciGüvenlik sınırlarını ayarlamak için lütfen hasta yaşını seçinizGlimp
- %s, düzgün bir şekilde çalışması için devre dışı bırakılmış pil performans ayarlaması gerektirirDöngü durdulduAskıya alındı (%1$d m)Superbolus (%1$d m)
@@ -592,7 +583,6 @@ Aktif Karbonhidratın ne kadar hızlı sindirildiğine ve KŞ\'nin beklenenden d
Emilim ayarlarıBesinin maksimum emilim süresi [h]Tüm karbonhidratların emileceği beklenen saat cinsinden süre
- Yayım bolusu% olarak görselleştirSAGEIAGECAGE
@@ -702,8 +692,6 @@ Aktif Karbonhidratın ne kadar hızlı sindirildiğine ve KŞ\'nin beklenenden d
XDrip+\'a KŞ verilerini gönderXdrip+ içerisinde 640g/Eversense veri kaynağı seçNightscout Client KŞ
- Bazal değeri minimum desteklenen değerle değiştirilir: %s
- Bazal değeri maksimum desteklenen değerle değiştirilir: %sKŞ HesaplamasıBolus IOB (Aktif İnsülin) hesaplamasıBazal IOB hesaplaması
@@ -721,8 +709,6 @@ Aktif Karbonhidratın ne kadar hızlı sindirildiğine ve KŞ\'nin beklenenden d
Kapalı Döngü etkinleştirildiMaksimal IOB doğru şekilde ayarlandıSeçili kaynaktan KŞ kullanılabilir
- Bazal değerler saatlerle uyumlu değil: %s
- Geçersiz profil: %sPompa bolus vermek için hazırlanıyorYenileDurum
@@ -735,7 +721,6 @@ Aktif Karbonhidratın ne kadar hızlı sindirildiğine ve KŞ\'nin beklenenden d
ÇalışıyorTBR (Geçici Bazal Oranı) İptal ediliyorTBR(Geçici Bazal Oranı) ayarı (%1$d%% / %2$d dak)
- Bolus (%.1f U) teslim ediliyorYenileniyor...İstenen işlem pompası tarafından desteklenmiyorGüvensiz kullanım: yayım veya çoklu dalgalı (kare dalgalı) boluslar aktiftir. Döngü modu 6 saat içinde ekstra insülin vermeyecektir. Döngü modunda sadece normal boluslar desteklenir
diff --git a/app/src/main/res/values-zh/strings.xml b/app/src/main/res/values-zh/strings.xml
index a230e24174..7e4b22eacd 100644
--- a/app/src/main/res/values-zh/strings.xml
+++ b/app/src/main/res/values-zh/strings.xml
@@ -9,7 +9,6 @@
重置数据库你真的想重置数据库吗?退出
- 使用>200%的扩展大剂量(extended boluses)DanaR 蓝牙设备总是使用基础率的绝对值请重启你的手机或者从系统设置里重启AndroidAPS软件 \n 否则 Android APS将不会记录日志 (这对于跟踪和检查算法是否正确很重要)!
@@ -54,6 +53,7 @@
使用您的 WearOS 手表监视和控制 AndroidAPS。在 xDrip + 表盘上显示有关闭环的信息。远程控制 AndroidAPS 使用 SMS 短信命令。
+ 返回开始校验单位
@@ -146,8 +146,6 @@
违反约束条件大剂量输注错误临时基础输注错误
- 基础率数值 [%]
- % (100% = 当前)接受新的临时基础率治疗计算器
@@ -247,7 +245,6 @@
泵 IOB每日单位数上次大剂量
- %.1fh 前无效的输入数据数值设定的不正确重新加载配置文件
@@ -265,6 +262,10 @@
要输注大剂量胰岛素%1$.2fU 回复如下代码 %2$s要发送校准值 %1$.2f 回复如下代码 %2$s大剂量输注失败
+ 已经成功输注大剂量%1$.2fU
+ 将要输注 %1$.2fU
+ 已经成功输注大剂量%1$.2fU
+ 正在输注 %1$.2fU通过SMS短信允许远程命令手指传感器
@@ -309,7 +310,6 @@
停止停止键按下了正在等待泵
- 将要输注 %.2fU设置可视化和监视, 并分析基础率和比率验证 Nightscout 中的血糖是否可用, 并且正在上传泵的胰岛素数据开始开环
@@ -332,13 +332,25 @@
闭环被禁用闭环被启用%1$.2f 超过 %2$.2f的限制
- 值 %s 超过了硬限制远程命令没有被允许
+ 远程大剂量不可用。请稍后再试。
+ 要开始基础率 %1$.2fU/h 持续时间%2$d 分钟,请回复如下代码 %3$s
+ 要切换配置文件到 %1$s %2$d%% 请回复代码 %3$s
+ 要开始扩展大剂量 %1$.2fU/h 持续时间%2$d 分钟,请回复如下代码 %3$s
+ 要开始基础率 %1$d%% 持续时间%2$d 分钟,请回复如下代码 %3$s要暂停闭环 %1$d 分钟请回复如下代码 %2$s临时基础率 %1$.2fU/h 持续 %2$d 分钟启用成功了
+ 扩展大剂量 %1$.2fU/h 持续时间 %2$d 分钟已经启用成功了
+ 临时基础率 %1$d%% 持续时间 %2$d 分钟 启用成功了开始临时基础率失败了
+ 开始扩展大剂量失败了
+ 要停止临时基础率,请回复如下代码 %1$s
+ 要停止扩展大剂量,请回复如下代码 %1$s临时基础率取消了
+ 扩展大剂量已经取消了取消临时基础率失败
+ 取消扩展大剂量失败
+ 未知的命令或者错误的回复快速向导快速向导设置按钮文本:
@@ -446,7 +458,6 @@
配置文件默认值: 3 这是一个关键的 OpenAPS 安全阀值。这是限制你的闭环可以最大扩张3倍的日最大基础率。你可能不需要改变这个值 但你应该这个值的含义。日最大基础率的3倍,当前基础率的4倍,这是建议的安全阀值默认值: 4 这是另一个的关键 OpenAPS 安全阀值, 日最大基础率的3倍,当前基础率的4倍,这是建议的安全阀值。这意味着你的基础率, 无论你的泵上的最大基础率设置的多少,也 不能超过你的当前基础率的4倍。这是为了防止人们在了解该算法的工作原理之前进入危险的领域 。同样, 默认值为 4倍; 大多数人将永远不需要调整, 而是更有可能需要调整其他设置,
- 默认值: 1.2 \n 这是 autosens 的安全阀值 对 autosens ( 很快autotune) 比率的高值设置最大增加20% 最大限制, 这反过来决定了 autosens 可以调整的基础率的上限值, 可以调整的胰岛素敏感系数的下限值, 以及它可以设置血糖目标的下限值。默认值: 0.7 \n 这是autosens 的另一个安全阈值, 。这个值决定了 autosens 可以调整的基础率的下限值, 可以调整的胰岛素敏感系数的上限值, 以及它可以设置血糖目标的上限值。Autosens 也调整目标血糖缺省值:是\n 这是用来允许 autosens调整血糖目标,还有 ISF胰岛素敏感系数和基础率这些参数。
@@ -459,7 +470,6 @@
电话号码无效无效的SMS手机号码校准
- 确认将校准值 %.1f 发送到 xDrip 吗?没有安装xDrip+校准发送到 xDrip校准值发送了,必须在xDrip开启允许通过其他app使用它的校准功能
@@ -510,7 +520,6 @@
胰岛素抵抗成人请选择患者年龄以设置安全限制Glimp
- %s 需要加入电池优化白名单才能正常运行闭环暂停了暂停了 (%1$d m)超级大剂量 (%1$d m)
@@ -546,8 +555,6 @@
在主屏幕上启用cage(碳水时间)、iage(胰岛素时间)、sage(探头使用时间)、储药器和电池电量的状态指示灯。储药器药量低于阈值[U] 警告储药器药量低于阈值[U] 严重警告
- 电池电量低于阈值[%] 警告
- 电池电量低于阈值[%] 严重警告IOB活性胰岛素COB活性碳水固件
@@ -555,6 +562,7 @@
蓝牙状态关于缺少 SMS 短信权限
+ 缺少手机状态权限xDrip 状态 (手表)xDrip 状态线 (手表)xdrip
@@ -599,7 +607,6 @@
食物吸收设置膳食最大吸收时间 [h]预计膳食中所有的碳水化合物被吸收的时间,以小时为单位
- 用百分比的形式显示扩展大剂量探头AGE胰岛素AGE管路AGE
@@ -712,8 +719,6 @@
将血糖数据发送到 xDrip +在 xDrip + 选择640g/Eversense 数据源NSClient 血糖
- 基础率值被泵支持的最小值: %s 替换了
- 基础率值被泵支持的最大值:%s 替换了血糖计算大剂量IOB (活性胰岛素) 计算基础率IOB (活性胰岛素) 计算
@@ -731,8 +736,6 @@
闭环模式启用了合理地设置最大 IOB所选的血糖值来源的血糖是可用的
- 基础率值与小时不一致:%s
- 无效的配置文件:%s正在调用泵上的大剂量输注程序刷新状态
@@ -745,7 +748,6 @@
正在运行正在取消临时基础率正在设置临时基础率 (%1$d%% / %2$d 分钟)
- 正在输注大剂量 (%.1f U)正在刷新泵不支持请求的操作不安全的用法: 扩展大剂量(方波) 或者双波被启用了,闭环只支持常规大剂量, 闭环已经被设置为6个小时的低血糖暂停模式(low-suspend only 6 hours).
@@ -1011,6 +1013,7 @@
%1$d.目标Poctech从 Poctech app 接收血糖值。
+ 从番茄app(喵喵设备) 接收血糖值高临时目标增加灵敏度=100 mg/dl (5.5 mmol/l) 时提高灵敏度]]>低临时目标降低灵敏度
@@ -1067,12 +1070,12 @@
静音泵警报记录位置更换
+ 记录储药器更换记录管路更换记录电池更换记录操作模式更改记录报警启用 TBR (临时基础率) 模拟
- 使用扩展大剂量而不是TBRs(临时基础率) 绕过250%的限制断开连接延迟 [s]序列号发行软件版本
@@ -1111,6 +1114,7 @@
最后一次连接: %1$d 分钟前临时基础率: %1$d%% for %2$d / %3$d 分钟扩展: %1$.2f / %2$.2f U 为 %3$d 分钟
+ 多波: %1$.2f / %2$.2f U 持续时间 %3$d 分钟TDD(日输注总量): %1$.2fReser.: %1$.2fU电池: %1$d%%
@@ -1124,6 +1128,16 @@
/U记录传感器更换至NS服务器在传感器启动时在 NS服务器 自动创建事件 \"传感器更改\"
+ 番茄(喵喵)
+ 番茄
+ 在24小时内或更少时间内更夏令时时间
+ 不到3小时前夏令时时间变化了-已禁用闭环
+ 内部储存空间不足
+ 至少 剩余%1$d MB 内部存储!闭环已禁用!
+ 格式错误
+ 错误的代码。命令取消
+ 未配置
+ 配置文件切换已创建%1$d 天
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 576e599845..9620b64a50 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -8,7 +8,7 @@
Reset DatabasesDo you really want to reset the databases?Exit
- Use extended boluses for >200%
+ Use extended boluses for >200%%DanaR Bluetooth deviceAlways use basal absolute valuesPlease reboot your phone or restart AndroidAPS from the System Settings \notherwise Android APS will not have logging (important to track and verify that the algorithms are working correctly)!
@@ -152,8 +152,8 @@
Constraints violationBolus delivery errorTempbasal delivery error
- Basal value [%]
- % (100% = current)
+ Basal value [%%]
+ %% (100%% = current)Accept new temp basal:TreatmentCalculator
@@ -276,7 +276,7 @@
Pump IOBDaily unitsLast bolus
- %.1fh ago
+ %1$.1fh agoInvalid input dataValue not set properlyReload profile
@@ -342,7 +342,7 @@
StopSTOP PRESSEDWaiting for pump
- Going to deliver %.2fU
+ Going to deliver %1$.2fUSetting up visualization and monitoring, and analyzing basals and ratiosVerify that BG is available in Nightscout, and pump insulin data is being uploadedStarting on an open loop
@@ -365,7 +365,7 @@
Loop is disabledLoop is enabled%1$.2f limited to %2$.2f
- Value %s is out of hard limits
+ Value %1$s is out of hard limitsRemote command is not allowedRemote bolus not available. Try again later.To start basal %1$.2fU/h for %2$d min reply with code %3$s
@@ -496,7 +496,7 @@
Default value: 3 This is a key OpenAPS safety cap. What this does is limit your basals to be 3x (in this people) your biggest basal rate. You likely will not need to change this, but you should be aware that’s what is discussed about “3x max daily; 4x current” for safety caps.Default value: 4 This is the other half of the key OpenAPS safety caps, and the other half of “3x max daily; 4x current” of the safety caps. This means your basal, regardless of max basal set on your pump, cannot be any higher than this number times the current level of your basal. This is to prevent people from getting into dangerous territory by setting excessively high max basals before understanding how the algorithm works. Again, the default is 4x; most people will never need to adjust this and are instead more likely to need to adjust other settings if they feel like they are “running into” this safety cap.autosens_max
- Default value: 1.2\nThis is a multiplier cap for autosens (and soon autotune) to set a 20% max limit on how high the autosens ratio can be, which in turn determines how high autosens can adjust basals, how low it can adjust ISF, and how low it can set the BG target.
+ Default value: 1.2\nThis is a multiplier cap for autosens (and soon autotune) to set a 20%% max limit on how high the autosens ratio can be, which in turn determines how high autosens can adjust basals, how low it can adjust ISF, and how low it can set the BG target.autosens_minDefault value: 0.7\nThe other side of the autosens safety limits, putting a cap on how low autosens can adjust basals, and how high it can adjust ISF and BG targets.autosens_adjust_targets
@@ -514,7 +514,7 @@
Phone number not validInvalid SMS phone numberCalibration
- Send calibration %.1f to xDrip?
+ Send calibration %1$.1f to xDrip?xDrip+ not installedCalibration sent to xDripCalibration sent. Receiving must be enabled in xDrip.
@@ -582,7 +582,7 @@
Please select patient age to setup safety limitsI_understandGlimp
- %s needs battery optimalization whitelisting for proper performance
+ %1$s needs battery optimalization whitelisting for proper performanceLoop suspendedSuspended (%1$d m)Superbolus (%1$d m)
@@ -624,9 +624,9 @@
key_statuslights_res_criticalThreshold critical reservoir level [U]key_statuslights_bat_warning
- Threshold warning battery level [%]
+ Threshold warning battery level [%%]key_statuslights_bat_critical
- Threshold critical battery level [%]
+ Threshold critical battery level [%%]IOBCOBFirmware
@@ -695,7 +695,7 @@
Meal max absorption time [h]Time in hours where is expected all carbs from meal will be absorbedrangetodisplay
- Visualize extended bolus as %
+ Visualize extended bolus as %%SAGEIAGECAGE
@@ -835,8 +835,8 @@
dexcomg5_xdripuploadIn xDrip+ select 640g/Eversense data sourceNSClient BG
- Basal value replaced by minimal supported value: %s
- Basal value replaced by maximum supported value: %s
+ Basal value replaced by minimal supported value: %1$s
+ Basal value replaced by maximum supported value: %1$sBG calculationBolus IOB calculationBasal IOB calculation
@@ -854,8 +854,8 @@
Closed mode enabledMaximal IOB set properlyBG available from selected source
- Basal values not aligned to hours: %s
- Invalid profile: %s
+ Basal values not aligned to hours: %1$s
+ Invalid profile: %1$sProgramming pump for bolusingRefreshState
@@ -869,7 +869,7 @@
RunningCancelling TBRSetting TBR (%1$d%% / %2$d min)
- Bolusing (%.1f U)
+ Bolusing (%1$.1f U)RefreshingRequested operation not supported by pumpUnsafe usage: extended or multiwave boluses are active. Loop mode has been set to low-suspend only 6 hours. Only normal boluses are supported in loop mode
@@ -1216,7 +1216,6 @@
A treatment (insulin: %1$.2f, carbs: %2$d, at: %3$s) could not be added to treatments. Please check and manually add a record as appropriate.eCarbs: %1$d g (%2$d h), delay: %3$d m
- key_plugin_stats_report_timestampNo autosens data availableLog settingsReset to defaults
@@ -1259,7 +1258,7 @@
Log operating mode changesLog alertsEnable TBR emulation
- Use extended boluses instead of TBRs to bypass the 250% limit
+ Use extended boluses instead of TBRs to bypass the 250%% limitDisconnect delay [s]Serial numberRelease software version
@@ -1327,6 +1326,15 @@
Wrong code. Command cancelled.Not configuredProfile switch created
+ Version Checker
+ last_time_this_version_detected
+ last_versionchecker_waring
+ last_versionchecker_plugin_waring
+
+ old version
+ very old version
+ New version for at least %1$d days available! Fallback to LGS after 60 days, loop will be disabled after 90 days
+
%1$d day%1$d days
diff --git a/app/src/main/res/xml/filepaths.xml b/app/src/main/res/xml/filepaths.xml
index 7490f459d4..c9f65d8f56 100644
--- a/app/src/main/res/xml/filepaths.xml
+++ b/app/src/main/res/xml/filepaths.xml
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/app/src/main/res/xml/pref_others.xml b/app/src/main/res/xml/pref_others.xml
index 5d3b365cb6..cbe2b9c705 100644
--- a/app/src/main/res/xml/pref_others.xml
+++ b/app/src/main/res/xml/pref_others.xml
@@ -9,49 +9,49 @@
android:defaultValue="0"
android:inputType="number"
android:key="@string/key_eatingsoon_duration"
- android:title="@string/eatingsoon_duration">
+ android:title="@string/eatingsoon_duration" />
+ android:title="@string/eatingsoon_target" />
+ android:title="@string/activity_duration" />
+ android:title="@string/activity_target" />
+ android:title="@string/hypo_duration" />
+ android:title="@string/hypo_target" />
+ android:title="@string/button1" />
+ android:title="@string/button2" />
+ android:title="@string/button3" />
+ android:title="@string/low_mark" />
+ android:title="@string/high_mark" />
+ android:title="@string/nsalarm_staledatavalue_label" />
-
+ android:summary="@string/smscommunicator_allowednumbers_summary"
+ android:title="@string/smscommunicator_allowednumbers" />
Balls! No build.gradle here. Move along"""
+ val detectedVersion: String? = buildGradle.byteInputStream().findVersion()
+ assertEquals(null, detectedVersion)
+ }
+
+ @Test
+ fun testVersionStrip() {
+ assertEquals("2.2.2", "2.2.2".versionStrip())
+ assertEquals("2.2.2", "2.2.2-dev".versionStrip())
+ assertEquals("2.2.2", "2.2.2dev".versionStrip())
+ assertEquals("2.2.2", """"2.2.2"""".versionStrip())
+ }
+
+ @Test
+ @PrepareForTest(MainApp::class, L::class, SP::class)
+ fun `should find update1`() {
+ val bus = prepareBus()
+
+ compareWithCurrentVersion(newVersion = "2.2.3", currentVersion = "2.2.1")
+
+ verify(bus, times(1)).post(any())
+
+ PowerMockito.verifyStatic(SP::class.java, times(1))
+ SP.getLong(eq(R.string.key_last_versionchecker_warning), ArgumentMatchers.anyLong())
+ PowerMockito.verifyStatic(SP::class.java, times(1))
+ SP.putLong(eq(R.string.key_last_versionchecker_warning), ArgumentMatchers.anyLong())
+ PowerMockito.verifyNoMoreInteractions(SP::class.java)
+
+ }
+
+ @Test
+ @PrepareForTest(MainApp::class, L::class, SP::class)
+ fun `should find update2`() {
+ val bus = prepareBus()
+
+ compareWithCurrentVersion(newVersion = "2.2.3", currentVersion = "2.2.1-dev")
+
+ verify(bus, times(1)).post(any())
+
+ PowerMockito.verifyStatic(SP::class.java, times(1))
+ SP.getLong(eq(R.string.key_last_versionchecker_warning), ArgumentMatchers.anyLong())
+ PowerMockito.verifyStatic(SP::class.java, times(1))
+ SP.putLong(eq(R.string.key_last_versionchecker_warning), ArgumentMatchers.anyLong())
+ PowerMockito.verifyNoMoreInteractions(SP::class.java)
+ }
+
+ @Test
+ @PrepareForTest(MainApp::class, L::class, SP::class)
+ fun `should find update3`() {
+ val bus = prepareBus()
+
+ compareWithCurrentVersion(newVersion = "2.2.3", currentVersion = "2.1")
+
+ verify(bus, times(1)).post(any())
+
+ PowerMockito.verifyStatic(SP::class.java, times(1))
+ SP.getLong(eq(R.string.key_last_versionchecker_warning), ArgumentMatchers.anyLong())
+ PowerMockito.verifyStatic(SP::class.java, times(1))
+ SP.putLong(eq(R.string.key_last_versionchecker_warning), ArgumentMatchers.anyLong())
+ PowerMockito.verifyNoMoreInteractions(SP::class.java)
+ }
+
+ @Test
+ @PrepareForTest(MainApp::class, L::class, SP::class)
+ fun `should find update4`() {
+ val bus = prepareBus()
+
+ compareWithCurrentVersion(newVersion = "2.2", currentVersion = "2.1.1")
+
+ verify(bus, times(1)).post(any())
+
+ PowerMockito.verifyStatic(SP::class.java, times(1))
+ SP.getLong(eq(R.string.key_last_versionchecker_warning), ArgumentMatchers.anyLong())
+ PowerMockito.verifyStatic(SP::class.java, times(1))
+ SP.putLong(eq(R.string.key_last_versionchecker_warning), ArgumentMatchers.anyLong())
+ PowerMockito.verifyNoMoreInteractions(SP::class.java)
+ }
+
+ @Test
+ @PrepareForTest(MainApp::class, L::class, SP::class)
+ fun `should find update5`() {
+ val bus = prepareBus()
+ compareWithCurrentVersion(newVersion = "2.2.1", currentVersion = "2.2-dev")
+
+ verify(bus, times(1)).post(any())
+
+ PowerMockito.verifyStatic(SP::class.java, times(1))
+ SP.getLong(eq(R.string.key_last_versionchecker_warning), ArgumentMatchers.anyLong())
+ PowerMockito.verifyStatic(SP::class.java, times(1))
+ SP.putLong(eq(R.string.key_last_versionchecker_warning), ArgumentMatchers.anyLong())
+ PowerMockito.verifyNoMoreInteractions(SP::class.java)
+ }
+
+ @Test
+ @PrepareForTest(MainApp::class, L::class, SP::class)
+ fun `should find update6`() {
+ val bus = prepareBus()
+ compareWithCurrentVersion(newVersion = "2.2.1", currentVersion = "2.2dev")
+
+ verify(bus, times(1)).post(any())
+
+ PowerMockito.verifyStatic(SP::class.java, times(1))
+ SP.getLong(eq(R.string.key_last_versionchecker_warning), ArgumentMatchers.anyLong())
+ PowerMockito.verifyStatic(SP::class.java, times(1))
+ SP.putLong(eq(R.string.key_last_versionchecker_warning), ArgumentMatchers.anyLong())
+ PowerMockito.verifyNoMoreInteractions(SP::class.java)
+ }
+
+ @Test
+ @PrepareForTest(MainApp::class, L::class, SP::class)
+ fun `find same version`() {
+ val buildGradle = """blabla
+ | android {
+ | aosenuthoae
+ | }
+ | version = "2.2.2"
+ | appName = "Aaoeu"
+ """.trimMargin()
+ val bus = prepareBus()
+ compareWithCurrentVersion(buildGradle.byteInputStream().findVersion(), currentVersion = "2.2.2")
+
+ verify(bus, times(0)).post(any())
+
+ PowerMockito.verifyStatic(SP::class.java, times(1))
+ SP.putLong(eq(R.string.key_last_time_this_version_detected), ArgumentMatchers.anyLong())
+ PowerMockito.verifyNoMoreInteractions(SP::class.java)
+ }
+
+ @Test
+ @PrepareForTest(MainApp::class, L::class, SP::class)
+ fun `find higher version`() {
+ val buildGradle = """blabla
+ | android {
+ | aosenuthoae
+ | }
+ | version = "3.0"
+ | appName = "Aaoeu"
+ """.trimMargin()
+ val bus = prepareBus()
+ compareWithCurrentVersion(buildGradle.byteInputStream().findVersion(), currentVersion = "2.2.2")
+
+ verify(bus, times(1)).post(any())
+
+ PowerMockito.verifyStatic(SP::class.java, times(1))
+ SP.getLong(eq(R.string.key_last_versionchecker_warning), ArgumentMatchers.anyLong())
+ PowerMockito.verifyStatic(SP::class.java, times(1))
+ SP.putLong(eq(R.string.key_last_versionchecker_warning), ArgumentMatchers.anyLong())
+ PowerMockito.verifyNoMoreInteractions(SP::class.java)
+ }
+
+
+ @Test
+ @PrepareForTest(System::class)
+ fun `set time`() {
+ PowerMockito.spy(System::class.java)
+ PowerMockito.`when`(System.currentTimeMillis()).thenReturn(100L)
+
+ assertEquals(100L, System.currentTimeMillis())
+ }
+
+ private fun prepareBus(): Bus {
+ PowerMockito.mockStatic(MainApp::class.java)
+ val mainApp = mock(MainApp::class.java)
+ `when`(MainApp.instance()).thenReturn(mainApp)
+ val bus = mock(Bus::class.java)
+ `when`(MainApp.bus()).thenReturn(bus)
+ `when`(MainApp.gs(ArgumentMatchers.anyInt())).thenReturn("some dummy string")
+ prepareSP()
+ return bus
+ }
+
+ private fun prepareSP() {
+ PowerMockito.mockStatic(SP::class.java)
+ }
+
+ private fun prepareLogging() {
+ PowerMockito.mockStatic(L::class.java)
+ `when`(L.isEnabled(any())).thenReturn(true)
+ }
+
+}
\ No newline at end of file
diff --git a/app/src/test/java/info/nightscout/androidaps/data/GlucoseStatusTest.java b/app/src/test/java/info/nightscout/androidaps/plugins/iob/iobCobCalculatorPlugin/GlucoseStatusTest.java
similarity index 97%
rename from app/src/test/java/info/nightscout/androidaps/data/GlucoseStatusTest.java
rename to app/src/test/java/info/nightscout/androidaps/plugins/iob/iobCobCalculatorPlugin/GlucoseStatusTest.java
index b7a1d8b0b2..19e497b834 100644
--- a/app/src/test/java/info/nightscout/androidaps/data/GlucoseStatusTest.java
+++ b/app/src/test/java/info/nightscout/androidaps/plugins/iob/iobCobCalculatorPlugin/GlucoseStatusTest.java
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.data;
+package info.nightscout.androidaps.plugins.iob.iobCobCalculatorPlugin;
import org.json.JSONException;
import org.json.JSONObject;
@@ -16,6 +16,7 @@ import java.util.List;
import info.AAPSMocker;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.db.BgReading;
+import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatus;
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.IobCobCalculatorPlugin;
import info.nightscout.androidaps.plugins.general.nsclient.data.NSSgv;
import info.nightscout.androidaps.utils.DateUtil;
@@ -36,7 +37,7 @@ public class GlucoseStatusTest {
@Test
public void toStringShouldBeOverloaded() {
GlucoseStatus glucoseStatus = new GlucoseStatus();
- Assert.assertEquals(true, glucoseStatus.toString().contains("Delta"));
+ Assert.assertEquals(true, glucoseStatus.log().contains("Delta"));
}
@Test
@@ -133,10 +134,7 @@ public class GlucoseStatusTest {
public void initMocking() {
AAPSMocker.mockMainApp();
AAPSMocker.mockStrings();
-
- PowerMockito.mockStatic(IobCobCalculatorPlugin.class);
- iobCobCalculatorPlugin = mock(IobCobCalculatorPlugin.class);
- when(IobCobCalculatorPlugin.getPlugin()).thenReturn(iobCobCalculatorPlugin);
+ iobCobCalculatorPlugin = AAPSMocker.mockIobCobCalculatorPlugin();
PowerMockito.mockStatic(DateUtil.class);
when(DateUtil.now()).thenReturn(1514766900000L + T.mins(1).msecs());
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_APS_History_EventsTest.java b/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_APS_History_EventsTest.java
index 18527e0612..309644d7f0 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_APS_History_EventsTest.java
+++ b/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_APS_History_EventsTest.java
@@ -3,6 +3,7 @@ package info.nightscout.androidaps.plugins.pump.danaRS.comm;
import android.content.Context;
+import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.powermock.api.mockito.PowerMockito;
@@ -20,34 +21,26 @@ import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
import info.nightscout.androidaps.plugins.general.nsclient.NSUpload;
import info.nightscout.androidaps.plugins.treatments.TreatmentService;
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin;
+import info.nightscout.androidaps.utils.DateUtil;
import info.nightscout.androidaps.utils.SP;
import static org.junit.Assert.assertEquals;
+import static org.powermock.api.mockito.PowerMockito.when;
/**
* Created by Rumen on 31.07.2018.
*/
@RunWith(PowerMockRunner.class)
-@PrepareForTest({SP.class, MainApp.class, ConfigBuilderPlugin.class, Context.class, NSUpload.class, TreatmentsPlugin.class, TreatmentService.class, DatabaseHelper.class})
+@PrepareForTest({SP.class, MainApp.class, ConfigBuilderPlugin.class, Context.class, NSUpload.class, TreatmentsPlugin.class, TreatmentService.class, DatabaseHelper.class, DateUtil.class})
public class DanaRS_Packet_APS_History_EventsTest extends DanaRS_Packet_APS_History_Events {
@Test
public void runTest() {
- AAPSMocker.mockMainApp();
- AAPSMocker.mockApplicationContext();
- AAPSMocker.mockSP();
- AAPSMocker.mockBus();
- SPMocker.prepareMock();
- SP.putString("profile", AAPSMocker.getValidProfileStore().getData().toString());
- AAPSMocker.mockConfigBuilder();
- AAPSMocker.mockStrings();
- PowerMockito.mockStatic(NSUpload.class);
- AAPSMocker.mockDatabaseHelper();
- DanaRS_Packet_APS_History_Events testPacket = new DanaRS_Packet_APS_History_Events(System.currentTimeMillis());
+ DanaRS_Packet_APS_History_Events testPacket = new DanaRS_Packet_APS_History_Events(DateUtil.now());
// test getRequestedParams
byte[] returnedValues = testPacket.getRequestParams();
- byte[] expectedValues = getCalender(System.currentTimeMillis());
+ byte[] expectedValues = getCalender(DateUtil.now());
//year
assertEquals(expectedValues[0], returnedValues[0]);
//month
@@ -70,15 +63,15 @@ public class DanaRS_Packet_APS_History_EventsTest extends DanaRS_Packet_APS_Hist
assertEquals("APS_HISTORY_EVENTS", getFriendlyName());
}
- byte[] createArray(int length, byte fillWith){
+ byte[] createArray(int length, byte fillWith) {
byte[] ret = new byte[length];
- for(int i = 0; i
-