Merge branch 'dev' into medtronic_andy
This commit is contained in:
commit
eb85cd2588
109 changed files with 5219 additions and 2433 deletions
|
@ -6,7 +6,7 @@ buildscript {
|
|||
|
||||
dependencies {
|
||||
classpath 'io.fabric.tools:gradle:1.+'
|
||||
classpath 'com.dicedmelon.gradle:jacoco-android:0.1.2'
|
||||
classpath 'com.dicedmelon.gradle:jacoco-android:0.1.3'
|
||||
}
|
||||
}
|
||||
apply plugin: "com.android.application"
|
||||
|
@ -15,7 +15,7 @@ apply plugin: "jacoco-android"
|
|||
apply plugin: 'com.jakewharton.butterknife'
|
||||
|
||||
ext {
|
||||
supportLibraryVersion = "27.1.0"
|
||||
supportLibraryVersion = "27.1.1"
|
||||
ormLiteVersion = "4.46"
|
||||
powermockVersion = "1.7.3"
|
||||
dexmakerVersion = "1.2"
|
||||
|
@ -63,14 +63,14 @@ android {
|
|||
targetSdkVersion 25
|
||||
multiDexEnabled true
|
||||
versionCode 1500
|
||||
// dev_version: 2.1
|
||||
// dev_version: 2.2.1-dev
|
||||
version "medtronic-0.8.2-SNAPSHOT"
|
||||
buildConfigField "String", "VERSION", '"' + version + '"'
|
||||
buildConfigField "String", "BUILDVERSION", '"' + generateGitBuild() + '-' + generateDate() + '"'
|
||||
buildConfigField "String", "HEAD", '"' + generateGitBuild() + '"'
|
||||
buildConfigField "String", "DEV_VERSION", '"2.1"'
|
||||
buildConfigField "String", "DEV_DATE", '"2.3.2019"'
|
||||
buildConfigField "String", "DEV_CHECKIN", '"f28d763ada9e6a8d7621b972e03edd980767e076"'
|
||||
buildConfigField "String", "DEV_VERSION", '"2.2.1-dev"'
|
||||
buildConfigField "String", "DEV_DATE", '"30.3.2019"'
|
||||
buildConfigField "String", "DEV_CHECKIN", '"361ffa91c8c66d3901b1e8ae92b8b54bf0e2a4ce"'
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
// if you change minSdkVersion to less than 11, you need to change executeTask for wear
|
||||
|
||||
|
@ -95,7 +95,7 @@ android {
|
|||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
debug {
|
||||
testCoverageEnabled(project.hasProperty('coverage') ? true : false)
|
||||
testCoverageEnabled(project.hasProperty('coverage'))
|
||||
}
|
||||
}
|
||||
productFlavors {
|
||||
|
@ -106,7 +106,7 @@ android {
|
|||
resValue "string", "app_name", "AndroidAPS"
|
||||
versionName version
|
||||
manifestPlaceholders = [
|
||||
appIcon : "@mipmap/ic_launcher",
|
||||
appIcon: "@mipmap/ic_launcher",
|
||||
appIconRound: "@mipmap/ic_launcher_round"
|
||||
]
|
||||
}
|
||||
|
@ -114,9 +114,9 @@ android {
|
|||
applicationId "info.nightscout.aapspumpcontrol"
|
||||
dimension "standard"
|
||||
resValue "string", "app_name", "Pumpcontrol"
|
||||
versionName version
|
||||
versionName version + "-pumpcontrol"
|
||||
manifestPlaceholders = [
|
||||
appIcon : "@mipmap/ic_pumpcontrol",
|
||||
appIcon: "@mipmap/ic_pumpcontrol",
|
||||
appIconRound: "@null"
|
||||
]
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ android {
|
|||
resValue "string", "app_name", "NSClient"
|
||||
versionName version + "-nsclient"
|
||||
manifestPlaceholders = [
|
||||
appIcon : "@mipmap/yellowowl",
|
||||
appIcon: "@mipmap/ic_yellowowl",
|
||||
appIconRound: "@null"
|
||||
]
|
||||
}
|
||||
|
@ -136,7 +136,7 @@ android {
|
|||
resValue "string", "app_name", "NSClient2"
|
||||
versionName version + "-nsclient"
|
||||
manifestPlaceholders = [
|
||||
appIcon : "@mipmap/yellowowl",
|
||||
appIcon: "@mipmap/ic_yellowowl",
|
||||
appIconRound: "@null"
|
||||
]
|
||||
}
|
||||
|
@ -151,7 +151,7 @@ android {
|
|||
unitTests.includeAndroidResources = true
|
||||
}
|
||||
|
||||
useLibrary "org.apache.http.legacy"
|
||||
useLibrary "org.apache.http.legacy"
|
||||
}
|
||||
|
||||
allprojects {
|
||||
|
@ -188,15 +188,14 @@ dependencies {
|
|||
implementation "com.android.support:design:${supportLibraryVersion}"
|
||||
implementation "com.android.support:percent:${supportLibraryVersion}"
|
||||
implementation "com.wdullaer:materialdatetimepicker:2.3.0"
|
||||
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
|
||||
implementation "com.squareup:otto:1.3.7"
|
||||
implementation "com.j256.ormlite:ormlite-core:${ormLiteVersion}"
|
||||
implementation "com.j256.ormlite:ormlite-android:${ormLiteVersion}"
|
||||
implementation("com.github.tony19:logback-android-classic:1.1.1-6") {
|
||||
exclude group: "com.google.android", module: "android"
|
||||
}
|
||||
implementation "org.apache.commons:commons-lang3:3.6"
|
||||
implementation "org.slf4j:slf4j-api:1.7.12"
|
||||
implementation "org.apache.commons:commons-lang3:3.7"
|
||||
implementation "org.slf4j:slf4j-api:1.7.21"
|
||||
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'
|
||||
|
@ -211,8 +210,8 @@ dependencies {
|
|||
// excluding org.json which is provided by Android
|
||||
exclude group: "org.json", module: "json"
|
||||
}
|
||||
implementation "com.google.code.gson:gson:2.7"
|
||||
implementation "com.google.guava:guava:20.0"
|
||||
implementation "com.google.code.gson:gson:2.8.2"
|
||||
implementation "com.google.guava:guava:24.1-jre"
|
||||
|
||||
implementation "net.danlew:android.joda:2.9.9.1"
|
||||
implementation "uk.com.robust-it:cloning:1.9.9"
|
||||
|
@ -224,19 +223,17 @@ dependencies {
|
|||
|
||||
testImplementation "junit:junit:4.12"
|
||||
testImplementation "org.json:json:20140107"
|
||||
testImplementation "org.mockito:mockito-core:2.7.22"
|
||||
testImplementation "org.mockito:mockito-core:2.8.47"
|
||||
testImplementation "org.powermock:powermock-api-mockito2:${powermockVersion}"
|
||||
testImplementation "org.powermock:powermock-module-junit4-rule-agent:${powermockVersion}"
|
||||
testImplementation "org.powermock:powermock-module-junit4-rule:${powermockVersion}"
|
||||
testImplementation "org.powermock:powermock-module-junit4:${powermockVersion}"
|
||||
testImplementation "joda-time:joda-time:2.9.4.2"
|
||||
testImplementation "joda-time:joda-time:2.9.9"
|
||||
testImplementation "com.google.truth:truth:0.39"
|
||||
testImplementation 'org.robolectric:robolectric:3.8'
|
||||
testImplementation "org.skyscreamer:jsonassert:1.5.0"
|
||||
testImplementation "org.hamcrest:hamcrest-all:1.3"
|
||||
testImplementation "uk.org.lidalia:slf4j-test:1.2.0"
|
||||
|
||||
androidTestImplementation "org.mockito:mockito-core:2.7.22"
|
||||
androidTestImplementation "org.mockito:mockito-core:2.8.47"
|
||||
androidTestImplementation "com.google.dexmaker:dexmaker:${dexmakerVersion}"
|
||||
androidTestImplementation "com.google.dexmaker:dexmaker-mockito:${dexmakerVersion}"
|
||||
}
|
||||
|
|
|
@ -298,4 +298,4 @@
|
|||
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
</manifest>
|
||||
|
|
|
@ -68,4 +68,7 @@ public class Constants {
|
|||
//SMS Communicator
|
||||
public static final long SMS_CONFIRM_TIMEOUT = T.mins(5).msecs();
|
||||
|
||||
//Storage [MB]
|
||||
public static final long MINIMUM_FREE_SPACE = 200;
|
||||
|
||||
}
|
||||
|
|
|
@ -1,25 +1,12 @@
|
|||
package info.nightscout.androidaps;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.danlew.android.joda.JodaTimeAndroid;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import android.app.Application;
|
||||
import android.bluetooth.BluetoothAdapter;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.content.res.Resources;
|
||||
import android.os.SystemClock;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.annotation.PluralsRes;
|
||||
import android.support.v4.content.LocalBroadcastManager;
|
||||
import android.util.Log;
|
||||
|
||||
import com.crashlytics.android.Crashlytics;
|
||||
import com.crashlytics.android.answers.Answers;
|
||||
|
@ -28,6 +15,14 @@ import com.squareup.otto.Bus;
|
|||
import com.squareup.otto.LoggingBus;
|
||||
import com.squareup.otto.ThreadEnforcer;
|
||||
|
||||
import net.danlew.android.joda.JodaTimeAndroid;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import info.nightscout.androidaps.data.ConstraintChecker;
|
||||
import info.nightscout.androidaps.db.DatabaseHelper;
|
||||
import info.nightscout.androidaps.interfaces.PluginBase;
|
||||
|
@ -42,6 +37,7 @@ import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
|
|||
import info.nightscout.androidaps.plugins.constraints.dstHelper.DstHelperPlugin;
|
||||
import info.nightscout.androidaps.plugins.constraints.objectives.ObjectivesPlugin;
|
||||
import info.nightscout.androidaps.plugins.constraints.safety.SafetyPlugin;
|
||||
import info.nightscout.androidaps.plugins.constraints.storage.StorageConstraintPlugin;
|
||||
import info.nightscout.androidaps.plugins.general.actions.ActionsFragment;
|
||||
import info.nightscout.androidaps.plugins.general.careportal.CareportalPlugin;
|
||||
import info.nightscout.androidaps.plugins.general.food.FoodPlugin;
|
||||
|
@ -97,8 +93,8 @@ import info.nightscout.androidaps.utils.FabricPrivacy;
|
|||
import info.nightscout.androidaps.utils.SP;
|
||||
import io.fabric.sdk.android.Fabric;
|
||||
|
||||
public class MainApp extends Application {
|
||||
|
||||
public class MainApp extends Application {
|
||||
private static Logger log = LoggerFactory.getLogger(L.CORE);
|
||||
private static KeepAliveReceiver keepAliveReceiver;
|
||||
|
||||
|
@ -121,7 +117,6 @@ public class MainApp extends Application {
|
|||
public static boolean devBranch;
|
||||
public static boolean engineeringMode;
|
||||
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
|
@ -163,8 +158,7 @@ public class MainApp extends Application {
|
|||
// Register all tabs in app here
|
||||
pluginsList.add(OverviewPlugin.getPlugin());
|
||||
pluginsList.add(IobCobCalculatorPlugin.getPlugin());
|
||||
if (Config.ACTION)
|
||||
pluginsList.add(ActionsFragment.getPlugin());
|
||||
if (Config.ACTION) pluginsList.add(ActionsFragment.getPlugin());
|
||||
pluginsList.add(InsulinOrefRapidActingPlugin.getPlugin());
|
||||
pluginsList.add(InsulinOrefUltraRapidActingPlugin.getPlugin());
|
||||
pluginsList.add(InsulinOrefFreePeakPlugin.getPlugin());
|
||||
|
@ -172,43 +166,29 @@ public class MainApp extends Application {
|
|||
pluginsList.add(SensitivityAAPSPlugin.getPlugin());
|
||||
pluginsList.add(SensitivityWeightedAveragePlugin.getPlugin());
|
||||
pluginsList.add(SensitivityOref1Plugin.getPlugin());
|
||||
if (Config.PUMPDRIVERS)
|
||||
pluginsList.add(DanaRPlugin.getPlugin());
|
||||
if (Config.PUMPDRIVERS)
|
||||
pluginsList.add(DanaRKoreanPlugin.getPlugin());
|
||||
if (Config.PUMPDRIVERS)
|
||||
pluginsList.add(DanaRv2Plugin.getPlugin());
|
||||
if (Config.PUMPDRIVERS)
|
||||
pluginsList.add(DanaRSPlugin.getPlugin());
|
||||
if (Config.PUMPDRIVERS)
|
||||
pluginsList.add(LocalInsightPlugin.getPlugin());
|
||||
if (Config.PUMPDRIVERS) pluginsList.add(DanaRPlugin.getPlugin());
|
||||
if (Config.PUMPDRIVERS) pluginsList.add(DanaRKoreanPlugin.getPlugin());
|
||||
if (Config.PUMPDRIVERS) pluginsList.add(DanaRv2Plugin.getPlugin());
|
||||
if (Config.PUMPDRIVERS) pluginsList.add(DanaRSPlugin.getPlugin());
|
||||
if (Config.PUMPDRIVERS) pluginsList.add(LocalInsightPlugin.getPlugin());
|
||||
pluginsList.add(CareportalPlugin.getPlugin());
|
||||
if (Config.PUMPDRIVERS)
|
||||
pluginsList.add(ComboPlugin.getPlugin());
|
||||
if (Config.MDI)
|
||||
pluginsList.add(MDIPlugin.getPlugin());
|
||||
if (Config.PUMPDRIVERS) pluginsList.add(ComboPlugin.getPlugin());
|
||||
if (Config.MDI) pluginsList.add(MDIPlugin.getPlugin());
|
||||
if (Config.PUMPDRIVERS && engineeringMode) {
|
||||
pluginsList.add(MedtronicPumpPlugin.getPlugin());
|
||||
}
|
||||
pluginsList.add(VirtualPumpPlugin.getPlugin());
|
||||
if (Config.APS)
|
||||
pluginsList.add(LoopPlugin.getPlugin());
|
||||
if (Config.APS)
|
||||
pluginsList.add(OpenAPSMAPlugin.getPlugin());
|
||||
if (Config.APS)
|
||||
pluginsList.add(OpenAPSAMAPlugin.getPlugin());
|
||||
if (Config.APS)
|
||||
pluginsList.add(OpenAPSSMBPlugin.getPlugin());
|
||||
if (Config.APS) pluginsList.add(LoopPlugin.getPlugin());
|
||||
if (Config.APS) pluginsList.add(OpenAPSMAPlugin.getPlugin());
|
||||
if (Config.APS) pluginsList.add(OpenAPSAMAPlugin.getPlugin());
|
||||
if (Config.APS) pluginsList.add(OpenAPSSMBPlugin.getPlugin());
|
||||
pluginsList.add(NSProfilePlugin.getPlugin());
|
||||
if (Config.OTHERPROFILES)
|
||||
pluginsList.add(SimpleProfilePlugin.getPlugin());
|
||||
if (Config.OTHERPROFILES)
|
||||
pluginsList.add(LocalProfilePlugin.getPlugin());
|
||||
if (Config.OTHERPROFILES) pluginsList.add(SimpleProfilePlugin.getPlugin());
|
||||
if (Config.OTHERPROFILES) pluginsList.add(LocalProfilePlugin.getPlugin());
|
||||
pluginsList.add(TreatmentsPlugin.getPlugin());
|
||||
if (Config.SAFETY)
|
||||
pluginsList.add(SafetyPlugin.getPlugin());
|
||||
if (Config.APS)
|
||||
pluginsList.add(ObjectivesPlugin.getPlugin());
|
||||
if (Config.SAFETY) pluginsList.add(SafetyPlugin.getPlugin());
|
||||
if (Config.SAFETY) pluginsList.add(StorageConstraintPlugin.getPlugin());
|
||||
if (Config.APS) pluginsList.add(ObjectivesPlugin.getPlugin());
|
||||
pluginsList.add(SourceXdripPlugin.getPlugin());
|
||||
pluginsList.add(SourceNSClientPlugin.getPlugin());
|
||||
pluginsList.add(SourceMM640gPlugin.getPlugin());
|
||||
|
@ -218,8 +198,7 @@ public class MainApp extends Application {
|
|||
pluginsList.add(SourcePoctechPlugin.getPlugin());
|
||||
pluginsList.add(SourceTomatoPlugin.getPlugin());
|
||||
pluginsList.add(SourceEversensePlugin.getPlugin());
|
||||
if (Config.SMSCOMMUNICATORENABLED)
|
||||
pluginsList.add(SmsCommunicatorPlugin.getPlugin());
|
||||
if (Config.SMSCOMMUNICATORENABLED) pluginsList.add(SmsCommunicatorPlugin.getPlugin());
|
||||
pluginsList.add(FoodPlugin.getPlugin());
|
||||
|
||||
pluginsList.add(WearPlugin.initPlugin(this));
|
||||
|
@ -232,6 +211,7 @@ public class MainApp extends Application {
|
|||
|
||||
pluginsList.add(DstHelperPlugin.getPlugin());
|
||||
|
||||
|
||||
ConfigBuilderPlugin.getPlugin().initialize();
|
||||
}
|
||||
|
||||
|
@ -247,7 +227,6 @@ public class MainApp extends Application {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
private void registerLocalBroadcastReceiver() {
|
||||
lbm = LocalBroadcastManager.getInstance(this);
|
||||
lbm.registerReceiver(dataReceiver, new IntentFilter(Intents.ACTION_NEW_TREATMENT));
|
||||
|
@ -263,16 +242,16 @@ public class MainApp extends Application {
|
|||
lbm.registerReceiver(dataReceiver, new IntentFilter(Intents.ACTION_NEW_DEVICESTATUS));
|
||||
lbm.registerReceiver(dataReceiver, new IntentFilter(Intents.ACTION_NEW_CAL));
|
||||
|
||||
// register alarms
|
||||
//register alarms
|
||||
lbm.registerReceiver(alarmReciever, new IntentFilter(Intents.ACTION_ALARM));
|
||||
lbm.registerReceiver(alarmReciever, new IntentFilter(Intents.ACTION_ANNOUNCEMENT));
|
||||
lbm.registerReceiver(alarmReciever, new IntentFilter(Intents.ACTION_CLEAR_ALARM));
|
||||
lbm.registerReceiver(alarmReciever, new IntentFilter(Intents.ACTION_URGENT_ALARM));
|
||||
|
||||
// register ack alarm
|
||||
//register ack alarm
|
||||
lbm.registerReceiver(ackAlarmReciever, new IntentFilter(Intents.ACTION_ACK_ALARM));
|
||||
|
||||
// register dbaccess
|
||||
//register dbaccess
|
||||
lbm.registerReceiver(dbAccessReciever, new IntentFilter(Intents.ACTION_DATABASE));
|
||||
}
|
||||
|
||||
|
@ -322,13 +301,11 @@ public class MainApp extends Application {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
public void stopKeepAliveService() {
|
||||
if (keepAliveReceiver != null)
|
||||
KeepAliveReceiver.cancelAlarm(this);
|
||||
}
|
||||
|
||||
|
||||
public static void subscribe(Object subscriber) {
|
||||
try {
|
||||
bus().register(subscriber);
|
||||
|
@ -337,7 +314,6 @@ public class MainApp extends Application {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
public static void unsubscribe(Object subscriber) {
|
||||
try {
|
||||
bus().unregister(subscriber);
|
||||
|
@ -346,42 +322,34 @@ public class MainApp extends Application {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
public static Bus bus() {
|
||||
return sBus;
|
||||
}
|
||||
|
||||
|
||||
public static String gs(int id) {
|
||||
return sResources.getString(id);
|
||||
}
|
||||
|
||||
|
||||
public static String gs(int id, Object... args) {
|
||||
return sResources.getString(id, args);
|
||||
}
|
||||
|
||||
|
||||
public static String gq(@PluralsRes int id, int quantity, Object... args) {
|
||||
return sResources.getQuantityString(id, quantity, args);
|
||||
}
|
||||
|
||||
|
||||
public static int gc(int id) {
|
||||
return sResources.getColor(id);
|
||||
}
|
||||
|
||||
|
||||
public static MainApp instance() {
|
||||
return sInstance;
|
||||
}
|
||||
|
||||
|
||||
public static DatabaseHelper getDbHelper() {
|
||||
return sDatabaseHelper;
|
||||
}
|
||||
|
||||
|
||||
public static void closeDbHelper() {
|
||||
if (sDatabaseHelper != null) {
|
||||
sDatabaseHelper.close();
|
||||
|
@ -389,17 +357,14 @@ public class MainApp extends Application {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
public static ConstraintChecker getConstraintChecker() {
|
||||
return sConstraintsChecker;
|
||||
}
|
||||
|
||||
|
||||
public static ArrayList<PluginBase> getPluginsList() {
|
||||
return pluginsList;
|
||||
}
|
||||
|
||||
|
||||
public static ArrayList<PluginBase> getSpecificPluginsList(PluginType type) {
|
||||
ArrayList<PluginBase> newList = new ArrayList<>();
|
||||
|
||||
|
@ -414,7 +379,6 @@ public class MainApp extends Application {
|
|||
return newList;
|
||||
}
|
||||
|
||||
|
||||
public static ArrayList<PluginBase> getSpecificPluginsVisibleInList(PluginType type) {
|
||||
ArrayList<PluginBase> newList = new ArrayList<>();
|
||||
|
||||
|
@ -430,7 +394,6 @@ public class MainApp extends Application {
|
|||
return newList;
|
||||
}
|
||||
|
||||
|
||||
public static ArrayList<PluginBase> getSpecificPluginsListByInterface(Class interfaceClass) {
|
||||
ArrayList<PluginBase> newList = new ArrayList<>();
|
||||
|
||||
|
@ -445,7 +408,6 @@ public class MainApp extends Application {
|
|||
return newList;
|
||||
}
|
||||
|
||||
|
||||
public static ArrayList<PluginBase> getSpecificPluginsVisibleInListByInterface(Class interfaceClass, PluginType type) {
|
||||
ArrayList<PluginBase> newList = new ArrayList<>();
|
||||
|
||||
|
@ -461,13 +423,12 @@ public class MainApp extends Application {
|
|||
return newList;
|
||||
}
|
||||
|
||||
|
||||
@Nullable
|
||||
public static <T extends PluginBase> T getSpecificPlugin(Class<T> pluginClass) {
|
||||
if (pluginsList != null) {
|
||||
for (PluginBase p : pluginsList) {
|
||||
if (pluginClass.isAssignableFrom(p.getClass()))
|
||||
return (T)p;
|
||||
return (T) p;
|
||||
}
|
||||
} else {
|
||||
log.error("pluginsList=null");
|
||||
|
@ -489,12 +450,10 @@ public class MainApp extends Application {
|
|||
return engineeringMode || !devBranch;
|
||||
}
|
||||
|
||||
|
||||
public static boolean isDev() {
|
||||
return devBranch;
|
||||
}
|
||||
|
||||
|
||||
public static int getIcon() {
|
||||
if (Config.NSCLIENT)
|
||||
return R.mipmap.ic_yellowowl;
|
||||
|
@ -504,7 +463,6 @@ public class MainApp extends Application {
|
|||
return R.mipmap.ic_launcher;
|
||||
}
|
||||
|
||||
|
||||
public static int getNotificationIcon() {
|
||||
if (Config.NSCLIENT)
|
||||
return R.drawable.ic_notif_nsclient;
|
||||
|
@ -514,7 +472,6 @@ public class MainApp extends Application {
|
|||
return R.drawable.ic_notif_aaps;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onTerminate() {
|
||||
if (L.isEnabled(L.CORE))
|
||||
|
|
|
@ -50,6 +50,10 @@ public class ConstraintChecker implements ConstraintsInterface {
|
|||
return isAdvancedFilteringEnabled(new Constraint<>(true));
|
||||
}
|
||||
|
||||
public Constraint<Boolean> isSuperBolusEnabled() {
|
||||
return isSuperBolusEnabled(new Constraint<>(true));
|
||||
}
|
||||
|
||||
public Constraint<Double> getMaxBasalAllowed(Profile profile) {
|
||||
return applyBasalConstraints(new Constraint<>(Constants.REALLYHIGHBASALRATE), profile);
|
||||
}
|
||||
|
@ -157,6 +161,17 @@ public class ConstraintChecker implements ConstraintsInterface {
|
|||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Constraint<Boolean> isSuperBolusEnabled(Constraint<Boolean> value) {
|
||||
ArrayList<PluginBase> constraintsPlugins = mainApp.getSpecificPluginsListByInterface(ConstraintsInterface.class);
|
||||
for (PluginBase p : constraintsPlugins) {
|
||||
ConstraintsInterface constraint = (ConstraintsInterface) p;
|
||||
if (!p.isEnabled(PluginType.CONSTRAINTS)) continue;
|
||||
constraint.isSuperBolusEnabled(value);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Constraint<Double> applyBasalConstraints(Constraint<Double> absoluteRate, Profile profile) {
|
||||
ArrayList<PluginBase> constraintsPlugins = mainApp.getSpecificPluginsListByInterface(ConstraintsInterface.class);
|
||||
|
|
|
@ -503,7 +503,7 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
|
|||
} catch (SQLException e) {
|
||||
log.error("Unhandled exception", e);
|
||||
}
|
||||
return new ArrayList<BgReading>();
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
|
||||
|
@ -521,7 +521,7 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
|
|||
} catch (SQLException e) {
|
||||
log.error("Unhandled exception", e);
|
||||
}
|
||||
return new ArrayList<BgReading>();
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -35,6 +35,10 @@ public interface ConstraintsInterface {
|
|||
return value;
|
||||
}
|
||||
|
||||
default Constraint<Boolean> isSuperBolusEnabled(Constraint<Boolean> value) {
|
||||
return value;
|
||||
}
|
||||
|
||||
default Constraint<Double> applyBasalConstraints(Constraint<Double> absoluteRate, Profile profile) {
|
||||
return absoluteRate;
|
||||
}
|
||||
|
|
|
@ -93,6 +93,8 @@ public abstract class PluginBase {
|
|||
return state == State.ENABLED && specialEnableCondition();
|
||||
if (type == PluginType.CONSTRAINTS && pluginDescription.mainType == PluginType.PUMP && isEnabled(PluginType.PUMP))
|
||||
return true;
|
||||
if (type == PluginType.CONSTRAINTS && pluginDescription.mainType == PluginType.APS && isEnabled(PluginType.APS))
|
||||
return true;
|
||||
if (type == PluginType.PROFILE && pluginDescription.mainType == PluginType.PUMP)
|
||||
return isProfileInterfaceEnabled;
|
||||
return false;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package info.nightscout.androidaps.interfaces;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import info.nightscout.androidaps.data.DetailedBolusInfo;
|
||||
import info.nightscout.androidaps.data.Profile;
|
||||
import info.nightscout.androidaps.data.PumpEnactResult;
|
||||
|
@ -16,105 +16,59 @@ import info.nightscout.androidaps.plugins.general.actions.defs.CustomActionType;
|
|||
public interface PumpInterface {
|
||||
|
||||
boolean isInitialized(); // true if pump status has been read and is ready to accept commands
|
||||
|
||||
|
||||
boolean isSuspended(); // true if suspended (not delivering insulin)
|
||||
|
||||
|
||||
boolean isBusy(); // if true pump is not ready to accept commands right now
|
||||
|
||||
|
||||
boolean isConnected(); // true if BT connection is established
|
||||
|
||||
|
||||
boolean isConnecting(); // true if BT connection is in progress
|
||||
|
||||
|
||||
boolean isSuspended(); // true if suspended (not delivering insulin)
|
||||
boolean isBusy(); // if true pump is not ready to accept commands right now
|
||||
boolean isConnected(); // true if BT connection is established
|
||||
boolean isConnecting(); // true if BT connection is in progress
|
||||
boolean isHandshakeInProgress(); // true if BT is connected but initial handshake is still in progress
|
||||
|
||||
|
||||
void finishHandshaking(); // set initial handshake completed
|
||||
|
||||
|
||||
void connect(String reason);
|
||||
|
||||
|
||||
void disconnect(String reason);
|
||||
|
||||
|
||||
void stopConnecting();
|
||||
|
||||
|
||||
void getPumpStatus();
|
||||
|
||||
|
||||
// Upload to pump new basal profile
|
||||
PumpEnactResult setNewBasalProfile(Profile profile);
|
||||
|
||||
|
||||
boolean isThisProfileSet(Profile profile);
|
||||
|
||||
|
||||
long lastDataTime();
|
||||
|
||||
|
||||
double getBaseBasalRate(); // base basal rate, not temp basal
|
||||
|
||||
|
||||
double getReservoirLevel();
|
||||
|
||||
|
||||
int getBatteryLevel(); // in percent as integer
|
||||
|
||||
int getBatteryLevel(); // in percent as integer
|
||||
|
||||
PumpEnactResult deliverTreatment(DetailedBolusInfo detailedBolusInfo);
|
||||
|
||||
|
||||
void stopBolusDelivering();
|
||||
|
||||
|
||||
PumpEnactResult setTempBasalAbsolute(Double absoluteRate, Integer durationInMinutes, Profile profile,
|
||||
boolean enforceNew);
|
||||
|
||||
|
||||
PumpEnactResult setTempBasalAbsolute(Double absoluteRate, Integer durationInMinutes, Profile profile, boolean enforceNew);
|
||||
PumpEnactResult setTempBasalPercent(Integer percent, Integer durationInMinutes, Profile profile, boolean enforceNew);
|
||||
|
||||
|
||||
PumpEnactResult setExtendedBolus(Double insulin, Integer durationInMinutes);
|
||||
|
||||
|
||||
// some pumps might set a very short temp close to 100% as cancelling a temp can be noisy
|
||||
// when the cancel request is requested by the user (forced), the pump should always do a real cancel
|
||||
//some pumps might set a very short temp close to 100% as cancelling a temp can be noisy
|
||||
//when the cancel request is requested by the user (forced), the pump should always do a real cancel
|
||||
PumpEnactResult cancelTempBasal(boolean enforceNew);
|
||||
|
||||
|
||||
PumpEnactResult cancelExtendedBolus();
|
||||
|
||||
|
||||
// Status to be passed to NS
|
||||
JSONObject getJSONStatus(Profile profile, String profileName);
|
||||
|
||||
|
||||
String deviceID();
|
||||
|
||||
|
||||
// Pump capabilities
|
||||
PumpDescription getPumpDescription();
|
||||
|
||||
|
||||
// Short info for SMS, Wear etc
|
||||
String shortStatus(boolean veryShort);
|
||||
|
||||
|
||||
boolean isFakingTempsByExtendedBoluses();
|
||||
|
||||
|
||||
PumpEnactResult loadTDDs();
|
||||
|
||||
public boolean canHandleDST();
|
||||
|
||||
List<CustomAction> getCustomActions();
|
||||
|
||||
|
||||
PumpEnactResult executeCustomAction(CustomActionType customActionType);
|
||||
void executeCustomAction(CustomActionType customActionType);
|
||||
|
||||
}
|
||||
|
|
|
@ -95,6 +95,7 @@ public class L {
|
|||
public static final String PROFILE = "PROFILE";
|
||||
public static final String CONFIGBUILDER = "CONFIGBUILDER";
|
||||
public static final String UI = "UI";
|
||||
public static final String SMS = "SMS";
|
||||
|
||||
private static void initialize() {
|
||||
logElements = new ArrayList<>();
|
||||
|
@ -117,6 +118,7 @@ public class L {
|
|||
logElements.add(new LogElement(PUMPBTCOMM, false));
|
||||
logElements.add(new LogElement(PUMPCOMM, true));
|
||||
logElements.add(new LogElement(PUMPQUEUE, true));
|
||||
logElements.add(new LogElement(SMS, true));
|
||||
logElements.add(new LogElement(UI, true));
|
||||
}
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@ import info.nightscout.androidaps.db.DatabaseHelper;
|
|||
import info.nightscout.androidaps.db.Source;
|
||||
import info.nightscout.androidaps.db.TemporaryBasal;
|
||||
import info.nightscout.androidaps.events.EventNewBG;
|
||||
import info.nightscout.androidaps.events.EventTempTargetChange;
|
||||
import info.nightscout.androidaps.interfaces.APSInterface;
|
||||
import info.nightscout.androidaps.interfaces.Constraint;
|
||||
import info.nightscout.androidaps.interfaces.PluginBase;
|
||||
|
@ -175,6 +176,14 @@ public class LoopPlugin extends PluginBase {
|
|||
return loopSuspendedTill;
|
||||
}
|
||||
|
||||
@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;
|
||||
|
|
|
@ -13,6 +13,7 @@ import info.nightscout.androidaps.data.Profile;
|
|||
import info.nightscout.androidaps.db.TempTarget;
|
||||
import info.nightscout.androidaps.interfaces.APSInterface;
|
||||
import info.nightscout.androidaps.interfaces.Constraint;
|
||||
import info.nightscout.androidaps.interfaces.ConstraintsInterface;
|
||||
import info.nightscout.androidaps.interfaces.PluginBase;
|
||||
import info.nightscout.androidaps.interfaces.PluginDescription;
|
||||
import info.nightscout.androidaps.interfaces.PluginType;
|
||||
|
@ -38,7 +39,7 @@ import info.nightscout.androidaps.utils.ToastUtils;
|
|||
/**
|
||||
* Created by mike on 05.08.2016.
|
||||
*/
|
||||
public class OpenAPSSMBPlugin extends PluginBase implements APSInterface {
|
||||
public class OpenAPSSMBPlugin extends PluginBase implements APSInterface, ConstraintsInterface {
|
||||
private static Logger log = LoggerFactory.getLogger(L.APS);
|
||||
|
||||
private static OpenAPSSMBPlugin openAPSSMBPlugin;
|
||||
|
@ -147,7 +148,9 @@ public class OpenAPSSMBPlugin extends PluginBase implements APSInterface {
|
|||
if (L.isEnabled(L.APS))
|
||||
Profiler.log(log, "getMealData()", startPart);
|
||||
|
||||
double maxIob = MainApp.getConstraintChecker().getMaxIOBAllowed().value();
|
||||
Constraint<Double> maxIOBAllowedConstraint = MainApp.getConstraintChecker().getMaxIOBAllowed();
|
||||
inputConstraints.copyReasons(maxIOBAllowedConstraint);
|
||||
double maxIob = maxIOBAllowedConstraint.value();
|
||||
|
||||
minBg = verifyHardLimits(minBg, "minBg", HardLimits.VERY_HARD_LIMIT_MIN_BG[0], HardLimits.VERY_HARD_LIMIT_MIN_BG[1]);
|
||||
maxBg = verifyHardLimits(maxBg, "maxBg", HardLimits.VERY_HARD_LIMIT_MAX_BG[0], HardLimits.VERY_HARD_LIMIT_MAX_BG[1]);
|
||||
|
@ -266,4 +269,9 @@ public class OpenAPSSMBPlugin extends PluginBase implements APSInterface {
|
|||
return newvalue;
|
||||
}
|
||||
|
||||
public Constraint<Boolean> isSuperBolusEnabled(Constraint<Boolean> value) {
|
||||
value.set(false);
|
||||
return value;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -42,6 +42,7 @@ 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;
|
||||
|
|
|
@ -16,6 +16,7 @@ import info.nightscout.androidaps.R;
|
|||
import info.nightscout.androidaps.data.Profile;
|
||||
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.interfaces.ProfileInterface;
|
||||
|
@ -139,4 +140,44 @@ public class ProfileFunctions {
|
|||
return null;
|
||||
}
|
||||
|
||||
public static ProfileSwitch prepareProfileSwitch(final ProfileStore profileStore, final String profileName, final int duration, final int percentage, final int timeshift, long date) {
|
||||
ProfileSwitch profileSwitch = new ProfileSwitch();
|
||||
profileSwitch.date = date;
|
||||
profileSwitch.source = Source.USER;
|
||||
profileSwitch.profileName = profileName;
|
||||
profileSwitch.profileJson = profileStore.getSpecificProfile(profileName).getData().toString();
|
||||
profileSwitch.profilePlugin = ConfigBuilderPlugin.getPlugin().getActiveProfileInterface().getClass().getName();
|
||||
profileSwitch.durationInMinutes = duration;
|
||||
profileSwitch.isCPP = percentage != 100 || timeshift != 0;
|
||||
profileSwitch.timeshift = timeshift;
|
||||
profileSwitch.percentage = percentage;
|
||||
return profileSwitch;
|
||||
}
|
||||
|
||||
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) {
|
||||
ProfileSwitch profileSwitch = TreatmentsPlugin.getPlugin().getProfileSwitchFromHistory(System.currentTimeMillis());
|
||||
if (profileSwitch != null) {
|
||||
profileSwitch = new ProfileSwitch();
|
||||
profileSwitch.date = System.currentTimeMillis();
|
||||
profileSwitch.source = Source.USER;
|
||||
profileSwitch.profileName = getInstance().getProfileName(System.currentTimeMillis(), false);
|
||||
profileSwitch.profileJson = getInstance().getProfile().getData().toString();
|
||||
profileSwitch.profilePlugin = ConfigBuilderPlugin.getPlugin().getActiveProfileInterface().getClass().getName();
|
||||
profileSwitch.durationInMinutes = duration;
|
||||
profileSwitch.isCPP = percentage != 100 || timeshift != 0;
|
||||
profileSwitch.timeshift = timeshift;
|
||||
profileSwitch.percentage = percentage;
|
||||
TreatmentsPlugin.getPlugin().addToHistoryProfileSwitch(profileSwitch);
|
||||
FabricPrivacy.getInstance().logCustom(new CustomEvent("ProfileSwitch"));
|
||||
} else {
|
||||
log.error("No profile switch existing");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -12,18 +12,17 @@ import info.nightscout.androidaps.interfaces.ConstraintsInterface;
|
|||
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.logging.L;
|
||||
import info.nightscout.androidaps.plugins.aps.loop.LoopPlugin;
|
||||
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
|
||||
import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification;
|
||||
import info.nightscout.androidaps.plugins.general.overview.notifications.Notification;
|
||||
import info.nightscout.androidaps.utils.T;
|
||||
|
||||
/**
|
||||
* Created by Rumen on 31.10.2018.
|
||||
*/
|
||||
public class DstHelperPlugin extends PluginBase implements ConstraintsInterface {
|
||||
public static final int DISABLE_TIMEFRAME_HOURS = -3;
|
||||
public static final int WARN_PRIOR_TIMEFRAME_HOURS = 24;
|
||||
private static Logger log = LoggerFactory.getLogger(L.CONSTRAINTS);
|
||||
private int minutesToChange = 0;
|
||||
|
||||
static DstHelperPlugin plugin = null;
|
||||
|
||||
|
@ -43,83 +42,53 @@ public class DstHelperPlugin extends PluginBase implements ConstraintsInterface
|
|||
);
|
||||
}
|
||||
|
||||
public int dstTest(Calendar c) throws Exception {
|
||||
// c = Calendar.getInstance(TimeZone.getDefault());
|
||||
// c = Calendar.getInstance(TimeZone.getTimeZone("Australia/Lord_Howe"));
|
||||
// c.setTimeInMillis(DateUtil.fromISODateString("2018-10-07T01:00:00Z").getTime());
|
||||
long zoneOffset = c.get(Calendar.ZONE_OFFSET);
|
||||
long d1 = c.getTimeInMillis() - zoneOffset;
|
||||
c.setTimeInMillis(d1);
|
||||
int offset1 = c.get(Calendar.DST_OFFSET);
|
||||
|
||||
c.add(Calendar.DATE, 1);
|
||||
long d2 = c.getTimeInMillis();
|
||||
|
||||
int diffInHours = (int) ((d1 - d2) / -T.hours(1).msecs());
|
||||
long offsetDetectedTime = 0;
|
||||
// comparing millis because change can be < 1 hour
|
||||
// log.debug("Starting from: "+startTimeString + " to "+endTimeString);
|
||||
// log.debug("start "+offset1+" end "+c.get(Calendar.DST_OFFSET));
|
||||
if (offset1 != c.get(Calendar.DST_OFFSET)) {
|
||||
//we have a time change in next 24 hours, but when exactly
|
||||
// log.debug("Daylight saving time detected between " + startTimeString + " and " + endTimeString);
|
||||
// log.debug("Diff in hours is: "+diffInHours);
|
||||
c.setTimeInMillis(d1 - zoneOffset);
|
||||
offset1 = c.get(Calendar.DST_OFFSET);
|
||||
for (int i = 0; i <= diffInHours * 4; i++) {
|
||||
|
||||
if (offset1 != c.get(Calendar.DST_OFFSET)) {
|
||||
log.debug("Detected offset in " + ((i / 4) - zoneOffset / T.hours(1).msecs()) + " hours value is " + (offset1 - c.get(Calendar.DST_OFFSET)) / T.mins(1).msecs() + " minutes");
|
||||
offsetDetectedTime = c.getTimeInMillis() - d1;
|
||||
break;
|
||||
}
|
||||
c.add(Calendar.MINUTE, 15);
|
||||
|
||||
}
|
||||
}
|
||||
int minutesLeft = (int) ((offsetDetectedTime / T.mins(1).msecs()));
|
||||
/*log.debug("zoneoffset(minutes):"+zoneOffset/T.mins(1).msecs());
|
||||
log.debug("Start offset: "+offset1/T.mins(1).msecs());
|
||||
log.debug("End offset :" + c.get(Calendar.DST_OFFSET)/T.mins(1).msecs());
|
||||
log.debug("Now is:"+startTimeString);
|
||||
log.debug("Detected in(min): "+(offsetDetectedTime/T.mins(1).msecs()));
|
||||
log.debug("Returning value of: " + minutesLeft); */
|
||||
minutesToChange = minutesLeft;
|
||||
return minutesLeft;
|
||||
|
||||
public static boolean wasDST(Calendar now) {
|
||||
Calendar ago = (Calendar) now.clone();
|
||||
ago.add(Calendar.HOUR, DISABLE_TIMEFRAME_HOURS);
|
||||
return now.get(Calendar.DST_OFFSET) != ago.get(Calendar.DST_OFFSET);
|
||||
}
|
||||
|
||||
//Return false if time to DST change is less than 91 and positive
|
||||
public static boolean willBeDST(Calendar now) {
|
||||
Calendar ago = (Calendar) now.clone();
|
||||
ago.add(Calendar.HOUR, WARN_PRIOR_TIMEFRAME_HOURS);
|
||||
return now.get(Calendar.DST_OFFSET) != ago.get(Calendar.DST_OFFSET);
|
||||
}
|
||||
|
||||
//Return false if time to DST change happened in the last 3 hours.
|
||||
@Override
|
||||
public Constraint<Boolean> isLoopInvocationAllowed(Constraint<Boolean> value) {
|
||||
try {
|
||||
this.dstTest(Calendar.getInstance());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (this.minutesToChange <= 90 && minutesToChange > 0 && value.value()) {
|
||||
try {
|
||||
LoopPlugin loopPlugin = LoopPlugin.getPlugin();
|
||||
if (loopPlugin.suspendedTo() == 0L) {
|
||||
// loopPlugin.suspendTo(System.currentTimeMillis() + minutesToChange * T.mins(1).msecs());
|
||||
warnUser(Notification.DST_LOOP_DISABLED, MainApp.gs(R.string.dst_loop_disabled_warning));
|
||||
} else
|
||||
log.debug("Loop already suspended");
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
value.set(false, "DST in 90 minutes or less", this);
|
||||
} else if (minutesToChange <= 24 * T.hours(1).mins() && minutesToChange > 0) {
|
||||
PumpInterface pump = ConfigBuilderPlugin.getPlugin().getActivePump();
|
||||
if (pump == null || pump.canHandleDST()) {
|
||||
log.debug("Pump can handle DST");
|
||||
return value;
|
||||
}
|
||||
|
||||
Calendar cal = Calendar.getInstance();
|
||||
|
||||
if (willBeDST(cal)) {
|
||||
warnUser(Notification.DST_IN_24H, MainApp.gs(R.string.dst_in_24h_warning));
|
||||
}
|
||||
|
||||
if (!value.value()) {
|
||||
log.debug("Already not allowed - don't check further");
|
||||
return value;
|
||||
}
|
||||
|
||||
if (wasDST(cal)) {
|
||||
LoopPlugin loopPlugin = LoopPlugin.getPlugin();
|
||||
if (!loopPlugin.isSuspended()) {
|
||||
warnUser(Notification.DST_LOOP_DISABLED, MainApp.gs(R.string.dst_loop_disabled_warning));
|
||||
} else {
|
||||
log.debug("Loop already suspended");
|
||||
}
|
||||
value.set(false, "DST in last 3 hours.", this);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
// display warning
|
||||
void warnUser(int id, String warningText) {
|
||||
private void warnUser(int id, String warningText) {
|
||||
Notification notification = new Notification(id, warningText, Notification.LOW);
|
||||
MainApp.bus().post(new EventNewNotification(notification));
|
||||
}
|
||||
|
||||
}
|
|
@ -120,6 +120,7 @@ public class ObjectivesFragment extends SubscriberFragment {
|
|||
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
|
||||
Objective objective = ObjectivesPlugin.getPlugin().getObjectives().get(position);
|
||||
holder.title.setText(MainApp.gs(R.string.nth_objective, position + 1));
|
||||
holder.revert.setVisibility(View.INVISIBLE);
|
||||
if (objective.getObjective() != 0) {
|
||||
holder.objective.setVisibility(View.VISIBLE);
|
||||
holder.objective.setText(MainApp.gs(objective.getObjective()));
|
||||
|
@ -145,6 +146,9 @@ public class ObjectivesFragment extends SubscriberFragment {
|
|||
holder.verify.setVisibility(View.VISIBLE);
|
||||
holder.verify.setEnabled(objective.isCompleted() || enableFake.isChecked());
|
||||
holder.start.setVisibility(View.GONE);
|
||||
if(objective.isRevertable()) {
|
||||
holder.revert.setVisibility(View.VISIBLE);
|
||||
}
|
||||
holder.progress.setVisibility(View.VISIBLE);
|
||||
holder.progress.removeAllViews();
|
||||
for (Objective.Task task : objective.getTasks()) {
|
||||
|
@ -169,8 +173,20 @@ public class ObjectivesFragment extends SubscriberFragment {
|
|||
scrollToCurrentObjective();
|
||||
startUpdateTimer();
|
||||
});
|
||||
holder.revert.setOnClickListener((view) -> {
|
||||
objective.setAccomplishedOn(null);
|
||||
objective.setStartedOn(null);
|
||||
if (position > 0) {
|
||||
Objective prevObj = ObjectivesPlugin.getPlugin().getObjectives().get(position - 1);
|
||||
prevObj.setAccomplishedOn(null);
|
||||
}
|
||||
notifyDataSetChanged();
|
||||
scrollToCurrentObjective();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return ObjectivesPlugin.getPlugin().getObjectives().size();
|
||||
|
@ -185,6 +201,7 @@ public class ObjectivesFragment extends SubscriberFragment {
|
|||
public LinearLayout progress;
|
||||
public Button verify;
|
||||
public Button start;
|
||||
public Button revert;
|
||||
|
||||
public ViewHolder(View itemView) {
|
||||
super(itemView);
|
||||
|
@ -195,6 +212,7 @@ public class ObjectivesFragment extends SubscriberFragment {
|
|||
progress = itemView.findViewById(R.id.objective_progress);
|
||||
verify = itemView.findViewById(R.id.objective_verify);
|
||||
start = itemView.findViewById(R.id.objective_start);
|
||||
revert = itemView.findViewById(R.id.objective_back);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,6 +42,10 @@ public abstract class Objective {
|
|||
return true;
|
||||
}
|
||||
|
||||
public boolean isRevertable() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isAccomplished() {
|
||||
return accomplishedOn != null;
|
||||
}
|
||||
|
|
|
@ -25,4 +25,9 @@ public class Objective4 extends Objective {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRevertable() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,76 @@
|
|||
package info.nightscout.androidaps.plugins.constraints.storage;
|
||||
|
||||
import android.os.Environment;
|
||||
import android.os.StatFs;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import info.nightscout.androidaps.Constants;
|
||||
import info.nightscout.androidaps.MainApp;
|
||||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.interfaces.Constraint;
|
||||
import info.nightscout.androidaps.interfaces.ConstraintsInterface;
|
||||
import info.nightscout.androidaps.interfaces.PluginBase;
|
||||
import info.nightscout.androidaps.interfaces.PluginDescription;
|
||||
import info.nightscout.androidaps.interfaces.PluginType;
|
||||
import info.nightscout.androidaps.logging.L;
|
||||
import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification;
|
||||
import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification;
|
||||
import info.nightscout.androidaps.plugins.general.overview.notifications.Notification;
|
||||
|
||||
/**
|
||||
* Created by Rumen on 06.03.2019.
|
||||
*/
|
||||
public class StorageConstraintPlugin extends PluginBase implements ConstraintsInterface {
|
||||
private static Logger log = LoggerFactory.getLogger(L.CONSTRAINTS);
|
||||
static StorageConstraintPlugin plugin = null;
|
||||
|
||||
public static StorageConstraintPlugin getPlugin() {
|
||||
if (plugin == null)
|
||||
plugin = new StorageConstraintPlugin();
|
||||
return plugin;
|
||||
}
|
||||
|
||||
public StorageConstraintPlugin() {
|
||||
super(new PluginDescription()
|
||||
.mainType(PluginType.CONSTRAINTS)
|
||||
.neverVisible(true)
|
||||
.alwaysEnabled(true)
|
||||
.showInList(false)
|
||||
.pluginName(R.string.storage)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constraints interface
|
||||
**/
|
||||
|
||||
@Override
|
||||
public Constraint<Boolean> isClosedLoopAllowed(Constraint<Boolean> value) {
|
||||
long diskfree = getAvailableInternalMemorySize();
|
||||
if (L.isEnabled(L.CONSTRAINTS))
|
||||
log.debug("Internal storage free (Mb):" + diskfree);
|
||||
if (diskfree < Constants.MINIMUM_FREE_SPACE) {
|
||||
value.set(false, MainApp.gs(R.string.diskfull, Constants.MINIMUM_FREE_SPACE), this);
|
||||
Notification notification = new Notification(Notification.DISKFULL, MainApp.gs(R.string.diskfull, Constants.MINIMUM_FREE_SPACE), Notification.NORMAL);
|
||||
MainApp.bus().post(new EventNewNotification(notification));
|
||||
} else {
|
||||
MainApp.bus().post(new EventDismissNotification(Notification.DISKFULL));
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
public static long getAvailableInternalMemorySize() {
|
||||
File path = Environment.getDataDirectory();
|
||||
StatFs stat = new StatFs(path.getPath());
|
||||
long blockSize = stat.getBlockSizeLong();
|
||||
long blocksAvailable = stat.getAvailableBlocksLong();
|
||||
int size = 1048576; // blocksize of 1 Mb
|
||||
return ((blocksAvailable * blockSize) / size);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,9 +1,5 @@
|
|||
package info.nightscout.androidaps.plugins.general.actions;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
|
@ -19,14 +15,18 @@ import android.widget.LinearLayout;
|
|||
import com.crashlytics.android.answers.CustomEvent;
|
||||
import com.squareup.otto.Subscribe;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
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;
|
||||
import info.nightscout.androidaps.events.EventCustomActionsChanged;
|
||||
import info.nightscout.androidaps.events.EventExtendedBolusChange;
|
||||
import info.nightscout.androidaps.events.EventInitializationChanged;
|
||||
import info.nightscout.androidaps.events.EventRefreshOverview;
|
||||
|
@ -35,17 +35,19 @@ 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;
|
||||
import info.nightscout.androidaps.plugins.general.actions.dialogs.NewTempBasalDialog;
|
||||
import info.nightscout.androidaps.plugins.general.careportal.CareportalFragment;
|
||||
import info.nightscout.androidaps.plugins.general.careportal.OptionsToShow;
|
||||
import info.nightscout.androidaps.plugins.general.careportal.Dialogs.NewNSTreatmentDialog;
|
||||
import info.nightscout.androidaps.plugins.general.careportal.OptionsToShow;
|
||||
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin;
|
||||
import info.nightscout.androidaps.utils.FabricPrivacy;
|
||||
import info.nightscout.androidaps.utils.SingleClickButton;
|
||||
|
||||
|
||||
/**
|
||||
* A simple {@link Fragment} subclass.
|
||||
*/
|
||||
|
@ -53,7 +55,6 @@ public class ActionsFragment extends SubscriberFragment implements View.OnClickL
|
|||
|
||||
static ActionsPlugin actionsPlugin = new ActionsPlugin();
|
||||
|
||||
|
||||
static public ActionsPlugin getPlugin() {
|
||||
return actionsPlugin;
|
||||
}
|
||||
|
@ -69,6 +70,8 @@ public class ActionsFragment extends SubscriberFragment implements View.OnClickL
|
|||
SingleClickButton tddStats;
|
||||
SingleClickButton history;
|
||||
|
||||
private Map<String,CustomAction> pumpCustomActions = new HashMap<>();
|
||||
private List<SingleClickButton> pumpCustomButtons = new ArrayList<>();
|
||||
|
||||
public ActionsFragment() {
|
||||
super();
|
||||
|
@ -76,17 +79,18 @@ public class ActionsFragment extends SubscriberFragment implements View.OnClickL
|
|||
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
try {
|
||||
View view = inflater.inflate(R.layout.actions_fragment, container, false);
|
||||
|
||||
profileSwitch = (SingleClickButton)view.findViewById(R.id.actions_profileswitch);
|
||||
tempTarget = (SingleClickButton)view.findViewById(R.id.actions_temptarget);
|
||||
extendedBolus = (SingleClickButton)view.findViewById(R.id.actions_extendedbolus);
|
||||
extendedBolusCancel = (SingleClickButton)view.findViewById(R.id.actions_extendedbolus_cancel);
|
||||
tempBasal = (SingleClickButton)view.findViewById(R.id.actions_settempbasal);
|
||||
tempBasalCancel = (SingleClickButton)view.findViewById(R.id.actions_canceltempbasal);
|
||||
fill = (SingleClickButton)view.findViewById(R.id.actions_fill);
|
||||
profileSwitch = (SingleClickButton) view.findViewById(R.id.actions_profileswitch);
|
||||
tempTarget = (SingleClickButton) view.findViewById(R.id.actions_temptarget);
|
||||
extendedBolus = (SingleClickButton) view.findViewById(R.id.actions_extendedbolus);
|
||||
extendedBolusCancel = (SingleClickButton) view.findViewById(R.id.actions_extendedbolus_cancel);
|
||||
tempBasal = (SingleClickButton) view.findViewById(R.id.actions_settempbasal);
|
||||
tempBasalCancel = (SingleClickButton) view.findViewById(R.id.actions_canceltempbasal);
|
||||
fill = (SingleClickButton) view.findViewById(R.id.actions_fill);
|
||||
tddStats = view.findViewById(R.id.actions_tddstats);
|
||||
history = view.findViewById(R.id.actions_historybrowser);
|
||||
|
||||
|
@ -111,25 +115,21 @@ public class ActionsFragment extends SubscriberFragment implements View.OnClickL
|
|||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Subscribe
|
||||
public void onStatusEvent(final EventInitializationChanged ev) {
|
||||
updateGUI();
|
||||
}
|
||||
|
||||
|
||||
@Subscribe
|
||||
public void onStatusEvent(final EventRefreshOverview ev) {
|
||||
updateGUI();
|
||||
}
|
||||
|
||||
|
||||
@Subscribe
|
||||
public void onStatusEvent(final EventExtendedBolusChange ev) {
|
||||
updateGUI();
|
||||
}
|
||||
|
||||
|
||||
@Subscribe
|
||||
public void onStatusEvent(final EventTempBasalChange ev) {
|
||||
updateGUI();
|
||||
|
@ -147,11 +147,9 @@ public class ActionsFragment extends SubscriberFragment implements View.OnClickL
|
|||
Activity activity = getActivity();
|
||||
if (activity != null)
|
||||
activity.runOnUiThread(new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
if (ConfigBuilderPlugin.getPlugin().getActiveProfileInterface() != null
|
||||
&& ConfigBuilderPlugin.getPlugin().getActiveProfileInterface().getProfile() != null) {
|
||||
if (ConfigBuilderPlugin.getPlugin().getActiveProfileInterface() != null && ConfigBuilderPlugin.getPlugin().getActiveProfileInterface().getProfile() != null) {
|
||||
profileSwitch.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
profileSwitch.setVisibility(View.GONE);
|
||||
|
@ -169,37 +167,34 @@ public class ActionsFragment extends SubscriberFragment implements View.OnClickL
|
|||
|
||||
final PumpInterface pump = ConfigBuilderPlugin.getPlugin().getActivePump();
|
||||
final boolean basalprofileEnabled = MainApp.isEngineeringModeOrRelease()
|
||||
&& pump.getPumpDescription().isSetBasalProfileCapable;
|
||||
&& pump.getPumpDescription().isSetBasalProfileCapable;
|
||||
|
||||
if (!basalprofileEnabled || !pump.isInitialized() || pump.isSuspended())
|
||||
profileSwitch.setVisibility(View.GONE);
|
||||
else
|
||||
profileSwitch.setVisibility(View.VISIBLE);
|
||||
|
||||
if (!pump.getPumpDescription().isExtendedBolusCapable || !pump.isInitialized()
|
||||
|| pump.isSuspended() || pump.isFakingTempsByExtendedBoluses()) {
|
||||
if (!pump.getPumpDescription().isExtendedBolusCapable || !pump.isInitialized() || pump.isSuspended() || pump.isFakingTempsByExtendedBoluses()) {
|
||||
extendedBolus.setVisibility(View.GONE);
|
||||
extendedBolusCancel.setVisibility(View.GONE);
|
||||
} else {
|
||||
ExtendedBolus activeExtendedBolus = TreatmentsPlugin.getPlugin().getExtendedBolusFromHistory(
|
||||
System.currentTimeMillis());
|
||||
ExtendedBolus activeExtendedBolus = TreatmentsPlugin.getPlugin().getExtendedBolusFromHistory(System.currentTimeMillis());
|
||||
if (activeExtendedBolus != null) {
|
||||
extendedBolus.setVisibility(View.GONE);
|
||||
extendedBolusCancel.setVisibility(View.VISIBLE);
|
||||
extendedBolusCancel.setText(MainApp.gs(R.string.cancel) + " "
|
||||
+ activeExtendedBolus.toString());
|
||||
extendedBolusCancel.setText(MainApp.gs(R.string.cancel) + " " + activeExtendedBolus.toString());
|
||||
} else {
|
||||
extendedBolus.setVisibility(View.VISIBLE);
|
||||
extendedBolusCancel.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!pump.getPumpDescription().isTempBasalCapable || !pump.isInitialized() || pump.isSuspended()) {
|
||||
tempBasal.setVisibility(View.GONE);
|
||||
tempBasalCancel.setVisibility(View.GONE);
|
||||
} else {
|
||||
final TemporaryBasal activeTemp = TreatmentsPlugin.getPlugin().getTempBasalFromHistory(
|
||||
System.currentTimeMillis());
|
||||
final TemporaryBasal activeTemp = TreatmentsPlugin.getPlugin().getTempBasalFromHistory(System.currentTimeMillis());
|
||||
if (activeTemp != null) {
|
||||
tempBasal.setVisibility(View.GONE);
|
||||
tempBasalCancel.setVisibility(View.VISIBLE);
|
||||
|
@ -220,45 +215,42 @@ public class ActionsFragment extends SubscriberFragment implements View.OnClickL
|
|||
else
|
||||
tempTarget.setVisibility(View.VISIBLE);
|
||||
|
||||
if (!ConfigBuilderPlugin.getPlugin().getActivePump().getPumpDescription().supportsTDDs)
|
||||
if (!pump.getPumpDescription().supportsTDDs)
|
||||
tddStats.setVisibility(View.GONE);
|
||||
else
|
||||
tddStats.setVisibility(View.VISIBLE);
|
||||
|
||||
checkCustomActions();
|
||||
checkPumpCustomActions();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private String activePumpName;
|
||||
private Map<String, CustomAction> currentCustomActions = new HashMap<>();
|
||||
private List<SingleClickButton> customButtons = new ArrayList<>();
|
||||
|
||||
View.OnClickListener customActionsListener = v -> {
|
||||
View.OnClickListener pumpCustomActionsListener = v -> {
|
||||
|
||||
SingleClickButton btn = (SingleClickButton)v;
|
||||
|
||||
CustomAction customAction = this.currentCustomActions.get(btn.getText().toString());
|
||||
CustomAction customAction = this.pumpCustomActions.get(btn.getText().toString());
|
||||
|
||||
ConfigBuilderPlugin.getPlugin().getActivePump().executeCustomAction(customAction.getCustomActionType());
|
||||
|
||||
};
|
||||
|
||||
|
||||
private void checkCustomActions() {
|
||||
private void checkPumpCustomActions() {
|
||||
|
||||
PumpInterface activePump = ConfigBuilderPlugin.getPlugin().getActivePump();
|
||||
|
||||
removeCustomActions();
|
||||
removePumpCustomActions();
|
||||
|
||||
if (activePump == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
// add new actions
|
||||
List<CustomAction> customActions = activePump.getCustomActions();
|
||||
|
||||
if (customActions != null) {
|
||||
if (customActions != null && customActions.size()>0) {
|
||||
|
||||
LinearLayout ll = actionsFragmentView.findViewById(R.id.action_buttons_layout);
|
||||
|
||||
|
@ -271,19 +263,19 @@ public class ActionsFragment extends SubscriberFragment implements View.OnClickL
|
|||
btn.setText(MainApp.gs(customAction.getName()));
|
||||
|
||||
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(
|
||||
LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT, 0.5f);
|
||||
LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT, 0.5f);
|
||||
layoutParams.setMargins(20, 8, 20, 8); // 10,3,10,3
|
||||
|
||||
btn.setLayoutParams(layoutParams);
|
||||
btn.setOnClickListener(customActionsListener);
|
||||
btn.setOnClickListener(pumpCustomActionsListener);
|
||||
|
||||
Drawable top = getResources().getDrawable(R.drawable.icon_actions_profileswitch);
|
||||
Drawable top = getResources().getDrawable(customAction.getIconResourceId());
|
||||
btn.setCompoundDrawablesWithIntrinsicBounds(null, top, null, null);
|
||||
|
||||
ll.addView(btn);
|
||||
|
||||
this.currentCustomActions.put(MainApp.gs(customAction.getName()), customAction);
|
||||
this.customButtons.add(btn);
|
||||
this.pumpCustomActions.put(MainApp.gs(customAction.getName()), customAction);
|
||||
this.pumpCustomButtons.add(btn);
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -291,19 +283,19 @@ public class ActionsFragment extends SubscriberFragment implements View.OnClickL
|
|||
}
|
||||
|
||||
|
||||
private void removeCustomActions() {
|
||||
private void removePumpCustomActions() {
|
||||
|
||||
if (currentCustomActions.size() == 0)
|
||||
if (pumpCustomActions.size()==0)
|
||||
return;
|
||||
|
||||
LinearLayout ll = actionsFragmentView.findViewById(R.id.action_buttons_layout);
|
||||
|
||||
for (SingleClickButton customButton : customButtons) {
|
||||
for (SingleClickButton customButton : pumpCustomButtons) {
|
||||
ll.removeView(customButton);
|
||||
}
|
||||
|
||||
customButtons.clear();
|
||||
currentCustomActions.clear();
|
||||
pumpCustomButtons.clear();
|
||||
pumpCustomActions.clear();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package info.nightscout.androidaps.plugins.general.actions.defs;
|
||||
|
||||
import info.nightscout.androidaps.R;
|
||||
|
||||
/**
|
||||
* Created by andy on 9/20/18.
|
||||
*/
|
||||
|
@ -9,13 +11,21 @@ public class CustomAction {
|
|||
private int name;
|
||||
private String iconName;
|
||||
private CustomActionType customActionType;
|
||||
private int iconResourceId;
|
||||
private boolean enabled = true;
|
||||
|
||||
|
||||
public CustomAction(int nameResourceId, CustomActionType actionType) {
|
||||
this(nameResourceId, actionType, true);
|
||||
this.name = nameResourceId;
|
||||
this.customActionType = actionType;
|
||||
this.iconResourceId = R.drawable.icon_actions_profileswitch;
|
||||
}
|
||||
|
||||
public CustomAction(int nameResourceId, CustomActionType actionType, int iconResourceId) {
|
||||
this.name = nameResourceId;
|
||||
this.customActionType = actionType;
|
||||
this.iconResourceId = iconResourceId;
|
||||
}
|
||||
|
||||
public CustomAction(int nameResourceId, CustomActionType actionType, boolean enabled) {
|
||||
this.name = nameResourceId;
|
||||
|
@ -30,16 +40,6 @@ public class CustomAction {
|
|||
}
|
||||
|
||||
|
||||
public String getIconName() {
|
||||
|
||||
return iconName;
|
||||
}
|
||||
|
||||
|
||||
public void setIconName(String iconName) {
|
||||
|
||||
this.iconName = iconName;
|
||||
}
|
||||
|
||||
|
||||
public CustomActionType getCustomActionType() {
|
||||
|
@ -48,12 +48,10 @@ public class CustomAction {
|
|||
}
|
||||
|
||||
|
||||
public void setCustomActionType(CustomActionType customActionType) {
|
||||
|
||||
this.customActionType = customActionType;
|
||||
public int getIconResourceId() {
|
||||
return iconResourceId;
|
||||
}
|
||||
|
||||
|
||||
public boolean isEnabled() {
|
||||
return enabled;
|
||||
}
|
||||
|
@ -62,4 +60,5 @@ public class CustomAction {
|
|||
public void setEnabled(boolean enabled) {
|
||||
this.enabled = enabled;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -229,8 +229,8 @@ public class CareportalFragment extends SubscriberFragment implements View.OnCli
|
|||
double sageWarn = nsSettings.getExtendedWarnValue("sage", "warn", 164);
|
||||
handleAge(sage, CareportalEvent.SENSORCHANGE, sageWarn, sageUrgent);
|
||||
|
||||
double pbageUrgent = nsSettings.getExtendedWarnValue("pgage", "urgent", 360);
|
||||
double pbageWarn = nsSettings.getExtendedWarnValue("pgage", "warn", 240);
|
||||
double pbageUrgent = nsSettings.getExtendedWarnValue("bage", "urgent", 360);
|
||||
double pbageWarn = nsSettings.getExtendedWarnValue("bage", "warn", 240);
|
||||
handleAge(pbage, CareportalEvent.PUMPBATTERYCHANGE, pbageWarn, pbageUrgent);
|
||||
}
|
||||
);
|
||||
|
|
|
@ -722,7 +722,7 @@ public class NewNSTreatmentDialog extends DialogFragment implements View.OnClick
|
|||
public void createNSTreatment(JSONObject data) {
|
||||
if (options.executeProfileSwitch) {
|
||||
if (data.has("profile")) {
|
||||
doProfileSwitch(profileStore, JsonHelper.safeGetString(data, "profile"), JsonHelper.safeGetInt(data, "duration"), JsonHelper.safeGetInt(data, "percentage"), JsonHelper.safeGetInt(data, "timeshift"));
|
||||
ProfileFunctions.doProfileSwitch(profileStore, JsonHelper.safeGetString(data, "profile"), JsonHelper.safeGetInt(data, "duration"), JsonHelper.safeGetInt(data, "percentage"), JsonHelper.safeGetInt(data, "timeshift"));
|
||||
}
|
||||
} else if (options.executeTempTarget) {
|
||||
final int duration = JsonHelper.safeGetInt(data, "duration");
|
||||
|
@ -746,7 +746,7 @@ public class NewNSTreatmentDialog extends DialogFragment implements View.OnClick
|
|||
}
|
||||
} else {
|
||||
if (JsonHelper.safeGetString(data, "eventType").equals(CareportalEvent.PROFILESWITCH)) {
|
||||
ProfileSwitch profileSwitch = prepareProfileSwitch(
|
||||
ProfileSwitch profileSwitch = ProfileFunctions.prepareProfileSwitch(
|
||||
profileStore,
|
||||
JsonHelper.safeGetString(data, "profile"),
|
||||
JsonHelper.safeGetInt(data, "duration"),
|
||||
|
@ -762,46 +762,6 @@ public class NewNSTreatmentDialog extends DialogFragment implements View.OnClick
|
|||
}
|
||||
}
|
||||
|
||||
public static ProfileSwitch prepareProfileSwitch(final ProfileStore profileStore, final String profileName, final int duration, final int percentage, final int timeshift, long date) {
|
||||
ProfileSwitch profileSwitch = new ProfileSwitch();
|
||||
profileSwitch.date = date;
|
||||
profileSwitch.source = Source.USER;
|
||||
profileSwitch.profileName = profileName;
|
||||
profileSwitch.profileJson = profileStore.getSpecificProfile(profileName).getData().toString();
|
||||
profileSwitch.profilePlugin = ConfigBuilderPlugin.getPlugin().getActiveProfileInterface().getClass().getName();
|
||||
profileSwitch.durationInMinutes = duration;
|
||||
profileSwitch.isCPP = percentage != 100 || timeshift != 0;
|
||||
profileSwitch.timeshift = timeshift;
|
||||
profileSwitch.percentage = percentage;
|
||||
return profileSwitch;
|
||||
}
|
||||
|
||||
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) {
|
||||
ProfileSwitch profileSwitch = TreatmentsPlugin.getPlugin().getProfileSwitchFromHistory(System.currentTimeMillis());
|
||||
if (profileSwitch != null) {
|
||||
profileSwitch = new ProfileSwitch();
|
||||
profileSwitch.date = System.currentTimeMillis();
|
||||
profileSwitch.source = Source.USER;
|
||||
profileSwitch.profileName = ProfileFunctions.getInstance().getProfileName(System.currentTimeMillis(), false);
|
||||
profileSwitch.profileJson = ProfileFunctions.getInstance().getProfile().getData().toString();
|
||||
profileSwitch.profilePlugin = ConfigBuilderPlugin.getPlugin().getActiveProfileInterface().getClass().getName();
|
||||
profileSwitch.durationInMinutes = duration;
|
||||
profileSwitch.isCPP = percentage != 100 || timeshift != 0;
|
||||
profileSwitch.timeshift = timeshift;
|
||||
profileSwitch.percentage = percentage;
|
||||
TreatmentsPlugin.getPlugin().addToHistoryProfileSwitch(profileSwitch);
|
||||
FabricPrivacy.getInstance().logCustom(new CustomEvent("ProfileSwitch"));
|
||||
} else {
|
||||
log.error("No profile switch existing");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSaveInstanceState(Bundle savedInstanceState) {
|
||||
savedInstanceState.putString("notesEdit", notesEdit.getText().toString());
|
||||
|
|
|
@ -48,9 +48,7 @@ class NsClientReceiverDelegate {
|
|||
bus.post(event);
|
||||
|
||||
context.registerReceiver(chargingStateReceiver,
|
||||
new IntentFilter(Intent.ACTION_POWER_CONNECTED));
|
||||
context.registerReceiver(chargingStateReceiver,
|
||||
new IntentFilter(Intent.ACTION_POWER_DISCONNECTED));
|
||||
new IntentFilter(Intent.ACTION_BATTERY_CHANGED));
|
||||
|
||||
EventChargingState eventChargingState = chargingStateReceiver.grabChargingState(context);
|
||||
if (eventChargingState != null)
|
||||
|
@ -97,7 +95,7 @@ class NsClientReceiverDelegate {
|
|||
}
|
||||
|
||||
void processStateChange() {
|
||||
boolean newAllowedState = allowedChargingState && allowedNetworkState;
|
||||
boolean newAllowedState = allowedChargingState && allowedNetworkState;
|
||||
if (newAllowedState != allowed) {
|
||||
allowed = newAllowedState;
|
||||
bus.post(new EventPreferenceChange(R.string.key_nsclientinternal_paused));
|
||||
|
@ -109,7 +107,9 @@ class NsClientReceiverDelegate {
|
|||
|
||||
boolean newAllowedState = true;
|
||||
|
||||
if (!ev.isCharging && chargingOnly) newAllowedState = false;
|
||||
if (!ev.isCharging && chargingOnly) {
|
||||
newAllowedState = false;
|
||||
}
|
||||
|
||||
return newAllowedState;
|
||||
}
|
||||
|
|
|
@ -51,17 +51,16 @@ import info.nightscout.androidaps.db.DatabaseHelper;
|
|||
import info.nightscout.androidaps.db.Source;
|
||||
import info.nightscout.androidaps.db.TempTarget;
|
||||
import info.nightscout.androidaps.events.EventFeatureRunning;
|
||||
import info.nightscout.androidaps.events.EventNewBG;
|
||||
import info.nightscout.androidaps.events.EventRefreshOverview;
|
||||
import info.nightscout.androidaps.interfaces.Constraint;
|
||||
import info.nightscout.androidaps.interfaces.PluginType;
|
||||
import info.nightscout.androidaps.interfaces.PumpInterface;
|
||||
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.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.aps.loop.LoopPlugin;
|
||||
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin;
|
||||
import info.nightscout.androidaps.queue.Callback;
|
||||
import info.nightscout.androidaps.utils.BolusWizard;
|
||||
|
@ -165,18 +164,6 @@ public class WizardDialog extends DialogFragment implements OnClickListener, Com
|
|||
}
|
||||
|
||||
|
||||
@Subscribe
|
||||
public void onStatusEvent(final EventNewBG e) {
|
||||
Activity activity = getActivity();
|
||||
if (activity != null)
|
||||
activity.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
calculateInsulin();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onStatusEvent(final EventAutosensCalculationFinished e) {
|
||||
Activity activity = getActivity();
|
||||
|
|
|
@ -73,6 +73,7 @@ public class Notification {
|
|||
public static final int INSIGHT_TIMEOUT_DURING_HANDSHAKE = 48;
|
||||
public static final int DST_LOOP_DISABLED = 49;
|
||||
public static final int DST_IN_24H = 50;
|
||||
public static final int DISKFULL = 51;
|
||||
|
||||
|
||||
public int id;
|
||||
|
|
|
@ -27,7 +27,6 @@ import info.nightscout.androidaps.db.DatabaseHelper;
|
|||
import info.nightscout.androidaps.db.TemporaryBasal;
|
||||
import info.nightscout.androidaps.events.EventExtendedBolusChange;
|
||||
import info.nightscout.androidaps.events.EventInitializationChanged;
|
||||
import info.nightscout.androidaps.events.EventNewBG;
|
||||
import info.nightscout.androidaps.events.EventNewBasalProfile;
|
||||
import info.nightscout.androidaps.events.EventPreferenceChange;
|
||||
import info.nightscout.androidaps.events.EventRefreshOverview;
|
||||
|
@ -39,6 +38,7 @@ import info.nightscout.androidaps.interfaces.PluginType;
|
|||
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
|
||||
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
|
||||
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.IobCobCalculatorPlugin;
|
||||
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventAutosensCalculationFinished;
|
||||
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin;
|
||||
import info.nightscout.androidaps.utils.DecimalFormatter;
|
||||
|
||||
|
@ -283,7 +283,7 @@ public class PersistentNotificationPlugin extends PluginBase {
|
|||
}
|
||||
|
||||
@Subscribe
|
||||
public void onStatusEvent(final EventNewBG ev) {
|
||||
public void onStatusEvent(final EventAutosensCalculationFinished ev) {
|
||||
triggerNotificationUpdate();
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,59 @@
|
|||
package info.nightscout.androidaps.plugins.general.smsCommunicator;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import info.nightscout.androidaps.Constants;
|
||||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.logging.L;
|
||||
import info.nightscout.androidaps.utils.DateUtil;
|
||||
|
||||
class AuthRequest {
|
||||
private static Logger log = LoggerFactory.getLogger(L.SMS);
|
||||
|
||||
Sms requester;
|
||||
String confirmCode;
|
||||
private Runnable action;
|
||||
|
||||
private long date;
|
||||
|
||||
private boolean processed;
|
||||
private SmsCommunicatorPlugin plugin;
|
||||
|
||||
AuthRequest(SmsCommunicatorPlugin plugin, Sms requester, String requestText, String confirmCode, SmsAction action) {
|
||||
this.requester = requester;
|
||||
this.confirmCode = confirmCode;
|
||||
this.action = action;
|
||||
this.plugin = plugin;
|
||||
|
||||
this.date = DateUtil.now();
|
||||
|
||||
plugin.sendSMS(new Sms(requester.phoneNumber, requestText));
|
||||
}
|
||||
|
||||
void action(String codeReceived) {
|
||||
if (processed) {
|
||||
if (L.isEnabled(L.SMS))
|
||||
log.debug("Already processed");
|
||||
return;
|
||||
}
|
||||
if (!confirmCode.equals(codeReceived)) {
|
||||
processed = true;
|
||||
if (L.isEnabled(L.SMS))
|
||||
log.debug("Wrong code");
|
||||
plugin.sendSMS(new Sms(requester.phoneNumber, R.string.sms_wrongcode));
|
||||
return;
|
||||
}
|
||||
if (DateUtil.now() - date < Constants.SMS_CONFIRM_TIMEOUT) {
|
||||
processed = true;
|
||||
if (L.isEnabled(L.SMS))
|
||||
log.debug("Processing confirmed SMS: " + requester.text);
|
||||
if (action != null)
|
||||
action.run();
|
||||
return;
|
||||
}
|
||||
if (L.isEnabled(L.SMS))
|
||||
log.debug("Timed out SMS: " + requester.text);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
package info.nightscout.androidaps.plugins.general.smsCommunicator;
|
||||
|
||||
import android.telephony.SmsMessage;
|
||||
|
||||
import info.nightscout.androidaps.MainApp;
|
||||
import info.nightscout.androidaps.utils.DateUtil;
|
||||
|
||||
class Sms {
|
||||
String phoneNumber;
|
||||
String text;
|
||||
long date;
|
||||
boolean received = false;
|
||||
boolean sent = false;
|
||||
boolean processed = false;
|
||||
boolean ignored = false;
|
||||
|
||||
Sms(SmsMessage message) {
|
||||
phoneNumber = message.getOriginatingAddress();
|
||||
text = message.getMessageBody();
|
||||
date = message.getTimestampMillis();
|
||||
received = true;
|
||||
}
|
||||
|
||||
Sms(String phoneNumber, String text) {
|
||||
this.phoneNumber = phoneNumber;
|
||||
this.text = text;
|
||||
this.date = DateUtil.now();
|
||||
sent = true;
|
||||
}
|
||||
|
||||
Sms(String phoneNumber, int textId) {
|
||||
this.phoneNumber = phoneNumber;
|
||||
this.text = MainApp.gs(textId);
|
||||
this.date = DateUtil.now();
|
||||
sent = true;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "SMS from " + phoneNumber + ": " + text;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
package info.nightscout.androidaps.plugins.general.smsCommunicator;
|
||||
|
||||
abstract class SmsAction implements Runnable {
|
||||
Double aDouble;
|
||||
Integer anInteger;
|
||||
Integer secondInteger;
|
||||
String aString;
|
||||
|
||||
SmsAction() {}
|
||||
|
||||
SmsAction(Double aDouble) {
|
||||
this.aDouble = aDouble;
|
||||
}
|
||||
|
||||
SmsAction(Double aDouble, Integer secondInteger) {
|
||||
this.aDouble = aDouble;
|
||||
this.secondInteger = secondInteger;
|
||||
}
|
||||
|
||||
SmsAction(String aString, Integer secondInteger) {
|
||||
this.aString = aString;
|
||||
this.secondInteger = secondInteger;
|
||||
}
|
||||
|
||||
SmsAction(Integer anInteger) {
|
||||
this.anInteger = anInteger;
|
||||
}
|
||||
|
||||
SmsAction(Integer anInteger, Integer secondInteger) {
|
||||
this.anInteger = anInteger;
|
||||
this.secondInteger = secondInteger;
|
||||
}
|
||||
}
|
|
@ -3,7 +3,6 @@ package info.nightscout.androidaps.plugins.general.smsCommunicator;
|
|||
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.text.Html;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
|
@ -12,9 +11,6 @@ import android.widget.TextView;
|
|||
|
||||
import com.squareup.otto.Subscribe;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
|
||||
|
@ -22,14 +18,8 @@ import info.nightscout.androidaps.R;
|
|||
import info.nightscout.androidaps.plugins.common.SubscriberFragment;
|
||||
import info.nightscout.androidaps.plugins.general.smsCommunicator.events.EventSmsCommunicatorUpdateGui;
|
||||
import info.nightscout.androidaps.utils.DateUtil;
|
||||
import info.nightscout.androidaps.utils.FabricPrivacy;
|
||||
|
||||
/**
|
||||
* A simple {@link Fragment} subclass.
|
||||
*/
|
||||
public class SmsCommunicatorFragment extends SubscriberFragment {
|
||||
private static Logger log = LoggerFactory.getLogger(SmsCommunicatorFragment.class);
|
||||
|
||||
TextView logView;
|
||||
|
||||
public SmsCommunicatorFragment() {
|
||||
|
@ -39,18 +29,11 @@ public class SmsCommunicatorFragment extends SubscriberFragment {
|
|||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||
Bundle savedInstanceState) {
|
||||
try {
|
||||
View view = inflater.inflate(R.layout.smscommunicator_fragment, container, false);
|
||||
View view = inflater.inflate(R.layout.smscommunicator_fragment, container, false);
|
||||
|
||||
logView = (TextView) view.findViewById(R.id.smscommunicator_log);
|
||||
logView = (TextView) view.findViewById(R.id.smscommunicator_log);
|
||||
|
||||
updateGUI();
|
||||
return view;
|
||||
} catch (Exception e) {
|
||||
FabricPrivacy.logException(e);
|
||||
}
|
||||
|
||||
return null;
|
||||
return view;
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
|
@ -58,35 +41,33 @@ public class SmsCommunicatorFragment extends SubscriberFragment {
|
|||
updateGUI();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void updateGUI() {
|
||||
Activity activity = getActivity();
|
||||
if (activity != null)
|
||||
activity.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
class CustomComparator implements Comparator<SmsCommunicatorPlugin.Sms> {
|
||||
public int compare(SmsCommunicatorPlugin.Sms object1, SmsCommunicatorPlugin.Sms object2) {
|
||||
return (int) (object1.date - object2.date);
|
||||
}
|
||||
activity.runOnUiThread(() -> {
|
||||
class CustomComparator implements Comparator<Sms> {
|
||||
public int compare(Sms object1, Sms object2) {
|
||||
return (int) (object1.date - object2.date);
|
||||
}
|
||||
Collections.sort(SmsCommunicatorPlugin.getPlugin().messages, new CustomComparator());
|
||||
int messagesToShow = 40;
|
||||
|
||||
int start = Math.max(0, SmsCommunicatorPlugin.getPlugin().messages.size() - messagesToShow);
|
||||
|
||||
String logText = "";
|
||||
for (int x = start; x < SmsCommunicatorPlugin.getPlugin().messages.size(); x++) {
|
||||
SmsCommunicatorPlugin.Sms sms = SmsCommunicatorPlugin.getPlugin().messages.get(x);
|
||||
if (sms.received) {
|
||||
logText += DateUtil.timeString(sms.date) + " <<< " + (sms.processed ? "● " : "○ ") + sms.phoneNumber + " <b>" + sms.text + "</b><br>";
|
||||
} else if (sms.sent) {
|
||||
logText += DateUtil.timeString(sms.date) + " >>> " + (sms.processed ? "● " : "○ ") + sms.phoneNumber + " <b>" + sms.text + "</b><br>";
|
||||
}
|
||||
}
|
||||
logView.setText(Html.fromHtml(logText));
|
||||
}
|
||||
Collections.sort(SmsCommunicatorPlugin.getPlugin().messages, new CustomComparator());
|
||||
int messagesToShow = 40;
|
||||
|
||||
int start = Math.max(0, SmsCommunicatorPlugin.getPlugin().messages.size() - messagesToShow);
|
||||
|
||||
String logText = "";
|
||||
for (int x = start; x < SmsCommunicatorPlugin.getPlugin().messages.size(); x++) {
|
||||
Sms sms = SmsCommunicatorPlugin.getPlugin().messages.get(x);
|
||||
if (sms.ignored) {
|
||||
logText += DateUtil.timeString(sms.date) + " <<< " + "░ " + sms.phoneNumber + " <b>" + sms.text + "</b><br>";
|
||||
} else if (sms.received) {
|
||||
logText += DateUtil.timeString(sms.date) + " <<< " + (sms.processed ? "● " : "○ ") + sms.phoneNumber + " <b>" + sms.text + "</b><br>";
|
||||
} else if (sms.sent) {
|
||||
logText += DateUtil.timeString(sms.date) + " >>> " + (sms.processed ? "● " : "○ ") + sms.phoneNumber + " <b>" + sms.text + "</b><br>";
|
||||
}
|
||||
}
|
||||
logView.setText(Html.fromHtml(logText));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -693,7 +693,7 @@ public class ActionStringHandler {
|
|||
|
||||
//send profile to pumpe
|
||||
new NewNSTreatmentDialog(); //init
|
||||
NewNSTreatmentDialog.doProfileSwitch(0, percentage, timeshift);
|
||||
ProfileFunctions.doProfileSwitch(0, percentage, timeshift);
|
||||
}
|
||||
|
||||
private static void generateTempTarget(int duration, double low, double high) {
|
||||
|
|
|
@ -10,7 +10,6 @@ import info.nightscout.androidaps.MainApp;
|
|||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.events.EventBolusRequested;
|
||||
import info.nightscout.androidaps.events.EventExtendedBolusChange;
|
||||
import info.nightscout.androidaps.events.EventNewBG;
|
||||
import info.nightscout.androidaps.events.EventNewBasalProfile;
|
||||
import info.nightscout.androidaps.events.EventPreferenceChange;
|
||||
import info.nightscout.androidaps.events.EventRefreshOverview;
|
||||
|
@ -24,6 +23,7 @@ import info.nightscout.androidaps.plugins.aps.openAPSMA.events.EventOpenAPSUpdat
|
|||
import info.nightscout.androidaps.plugins.general.overview.events.EventDismissBolusprogressIfRunning;
|
||||
import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress;
|
||||
import info.nightscout.androidaps.plugins.general.wear.wearintegration.WatchUpdaterService;
|
||||
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventAutosensCalculationFinished;
|
||||
import info.nightscout.androidaps.utils.SP;
|
||||
|
||||
/**
|
||||
|
@ -157,7 +157,7 @@ public class WearPlugin extends PluginBase {
|
|||
|
||||
|
||||
@Subscribe
|
||||
public void onStatusEvent(final EventNewBG ev) {
|
||||
public void onStatusEvent(final EventAutosensCalculationFinished ev) {
|
||||
sendDataToWatch(true, true, true);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
package info.nightscout.androidaps.plugins.general.wear.wearintegration;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
|
||||
import android.os.AsyncTask;
|
||||
import android.util.Log;
|
||||
|
||||
|
@ -15,11 +12,13 @@ import com.google.android.gms.wearable.PutDataMapRequest;
|
|||
import com.google.android.gms.wearable.PutDataRequest;
|
||||
import com.google.android.gms.wearable.Wearable;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
|
||||
/**
|
||||
* Created by emmablack on 12/26/14.
|
||||
*/
|
||||
class SendToDataLayerThread extends AsyncTask<DataMap, Void, Void> {
|
||||
|
||||
class SendToDataLayerThread extends AsyncTask<DataMap,Void,Void> {
|
||||
private GoogleApiClient googleApiClient;
|
||||
private static final String TAG = "SendToDataLayerThread";
|
||||
private String path;
|
||||
|
|
|
@ -32,6 +32,12 @@ 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;
|
||||
|
@ -42,6 +48,9 @@ import info.nightscout.androidaps.data.Profile;
|
|||
import info.nightscout.androidaps.db.BgReading;
|
||||
import info.nightscout.androidaps.db.DatabaseHelper;
|
||||
import info.nightscout.androidaps.db.TemporaryBasal;
|
||||
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
|
||||
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.IobCobCalculatorPlugin;
|
||||
import info.nightscout.androidaps.plugins.treatments.Treatment;
|
||||
import info.nightscout.androidaps.interfaces.PluginType;
|
||||
import info.nightscout.androidaps.interfaces.TreatmentsInterface;
|
||||
import info.nightscout.androidaps.plugins.aps.loop.LoopPlugin;
|
||||
|
@ -49,6 +58,7 @@ 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;
|
||||
|
@ -61,23 +71,16 @@ import info.nightscout.androidaps.utils.ToastUtils;
|
|||
|
||||
public class WatchUpdaterService extends WearableListenerService implements GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(WatchUpdaterService.class);
|
||||
private static final String TAG = "WatchUpdaterService";
|
||||
|
||||
// ACTIONS
|
||||
public static final String ACTION_RESEND = WatchUpdaterService.class.getName().concat(".Resend");
|
||||
public static final String ACTION_OPEN_SETTINGS = WatchUpdaterService.class.getName().concat(".OpenSettings");
|
||||
public static final String ACTION_SEND_STATUS = WatchUpdaterService.class.getName().concat(".SendStatus");
|
||||
public static final String ACTION_SEND_BASALS = WatchUpdaterService.class.getName().concat(".SendBasals");
|
||||
public static final String ACTION_SEND_BOLUSPROGRESS = WatchUpdaterService.class.getName().concat(".BolusProgress");
|
||||
public static final String ACTION_SEND_ACTIONCONFIRMATIONREQUEST = WatchUpdaterService.class.getName().concat(
|
||||
".ActionConfirmationRequest");
|
||||
public static final String ACTION_SEND_CHANGECONFIRMATIONREQUEST = WatchUpdaterService.class.getName().concat(
|
||||
".ChangeConfirmationRequest");
|
||||
public static final String ACTION_CANCEL_NOTIFICATION = WatchUpdaterService.class.getName().concat(
|
||||
".CancelNotification");
|
||||
public static final String ACTION_SEND_ACTIONCONFIRMATIONREQUEST = WatchUpdaterService.class.getName().concat(".ActionConfirmationRequest");
|
||||
public static final String ACTION_SEND_CHANGECONFIRMATIONREQUEST = WatchUpdaterService.class.getName().concat(".ChangeConfirmationRequest");
|
||||
public static final String ACTION_CANCEL_NOTIFICATION = WatchUpdaterService.class.getName().concat(".CancelNotification");
|
||||
|
||||
// PATHS
|
||||
private GoogleApiClient googleApiClient;
|
||||
public static final String WEARABLE_DATA_PATH = "/nightscout_watch_data";
|
||||
public static final String WEARABLE_RESEND_PATH = "/nightscout_watch_data_resend";
|
||||
private static final String WEARABLE_CANCELBOLUS_PATH = "/nightscout_watch_cancel_bolus";
|
||||
|
@ -92,20 +95,22 @@ public class WatchUpdaterService extends WearableListenerService implements Goog
|
|||
public static final String ACTION_CONFIRMATION_REQUEST_PATH = "/nightscout_watch_actionconfirmationrequest";
|
||||
public static final String ACTION_CHANGECONFIRMATION_REQUEST_PATH = "/nightscout_watch_changeconfirmationrequest";
|
||||
public static final String ACTION_CANCELNOTIFICATION_REQUEST_PATH = "/nightscout_watch_cancelnotificationrequest";
|
||||
// Phone - Capabilites
|
||||
private static final String CAPABILITY_PHONE_APP = "phone_app_sync_bgs";
|
||||
private static final String MESSAGE_PATH_PHONE = "/phone_message_path";
|
||||
// Wear - Capabilites
|
||||
private static final String CAPABILITY_WEAR_APP = "wear_app_sync_bgs";
|
||||
private static final String MESSAGE_PATH_WEAR = "/wear_message_path";
|
||||
|
||||
private GoogleApiClient googleApiClient;
|
||||
|
||||
boolean wear_integration = false;
|
||||
SharedPreferences mPrefs;
|
||||
private static boolean lastLoopStatus;
|
||||
|
||||
private static Logger log = LoggerFactory.getLogger(WatchUpdaterService.class);
|
||||
|
||||
private Handler handler;
|
||||
|
||||
// Phone
|
||||
private static final String CAPABILITY_PHONE_APP = "phone_app_sync_bgs";
|
||||
private static final String MESSAGE_PATH_PHONE = "/phone_message_path";
|
||||
// Wear
|
||||
private static final String CAPABILITY_WEAR_APP = "wear_app_sync_bgs";
|
||||
private static final String MESSAGE_PATH_WEAR = "/wear_message_path";
|
||||
private String mWearNodeId = null;
|
||||
private String localnode = null;
|
||||
private String logPrefix = ""; // "WR: "
|
||||
|
@ -126,12 +131,10 @@ public class WatchUpdaterService extends WearableListenerService implements Goog
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
public void listenForChangeInSettings() {
|
||||
WearPlugin.registerWatchUpdaterService(this);
|
||||
}
|
||||
|
||||
|
||||
public void setSettings() {
|
||||
wear_integration = WearPlugin.getPlugin().isEnabled(PluginType.GENERAL);
|
||||
// Log.d(TAG, "WR: wear_integration=" + wear_integration);
|
||||
|
@ -149,14 +152,13 @@ public class WatchUpdaterService extends WearableListenerService implements Goog
|
|||
.addOnConnectionFailedListener(this).addApi(Wearable.API).build();
|
||||
Wearable.MessageApi.addListener(googleApiClient, this);
|
||||
if (googleApiClient.isConnected()) {
|
||||
Log.d(TAG, logPrefix + "API client is connected");
|
||||
log.debug(logPrefix + "API client is connected");
|
||||
} else {
|
||||
// Log.d("WatchUpdater", logPrefix + "API client is not connected and is trying to connect");
|
||||
googleApiClient.connect();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int onStartCommand(Intent intent, int flags, int startId) {
|
||||
String action = intent != null ? intent.getAction() : null;
|
||||
|
@ -175,8 +177,7 @@ public class WatchUpdaterService extends WearableListenerService implements Goog
|
|||
} else if (ACTION_SEND_BASALS.equals(action)) {
|
||||
sendBasals();
|
||||
} else if (ACTION_SEND_BOLUSPROGRESS.equals(action)) {
|
||||
sendBolusProgress(intent.getIntExtra("progresspercent", 0),
|
||||
intent.hasExtra("progressstatus") ? intent.getStringExtra("progressstatus") : "");
|
||||
sendBolusProgress(intent.getIntExtra("progresspercent", 0), intent.hasExtra("progressstatus") ? intent.getStringExtra("progressstatus") : "");
|
||||
} else if (ACTION_SEND_ACTIONCONFIRMATIONREQUEST.equals(action)) {
|
||||
String title = intent.getStringExtra("title");
|
||||
String message = intent.getStringExtra("message");
|
||||
|
@ -283,12 +284,10 @@ public class WatchUpdaterService extends WearableListenerService implements Goog
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
private void cancelBolus() {
|
||||
ConfigBuilderPlugin.getPlugin().getActivePump().stopBolusDelivering();
|
||||
}
|
||||
|
||||
|
||||
private void sendData() {
|
||||
|
||||
BgReading lastBG = DatabaseHelper.lastBg();
|
||||
|
@ -351,10 +350,8 @@ public class WatchUpdaterService extends WearableListenerService implements Goog
|
|||
dataMap.putString("avgDelta", "--");
|
||||
} else {
|
||||
dataMap.putString("slopeArrow", slopeArrow(glucoseStatus.delta));
|
||||
dataMap.putString("delta",
|
||||
deltastring(glucoseStatus.delta, glucoseStatus.delta * Constants.MGDL_TO_MMOLL, units));
|
||||
dataMap.putString("avgDelta",
|
||||
deltastring(glucoseStatus.avgdelta, glucoseStatus.avgdelta * Constants.MGDL_TO_MMOLL, units));
|
||||
dataMap.putString("delta", deltastring(glucoseStatus.delta, glucoseStatus.delta * Constants.MGDL_TO_MMOLL, units));
|
||||
dataMap.putString("avgDelta", deltastring(glucoseStatus.avgdelta, glucoseStatus.avgdelta * Constants.MGDL_TO_MMOLL, units));
|
||||
}
|
||||
dataMap.putLong("sgvLevel", sgvLevel);
|
||||
dataMap.putDouble("sgvDouble", lastBG.value);
|
||||
|
@ -363,7 +360,6 @@ public class WatchUpdaterService extends WearableListenerService implements Goog
|
|||
return dataMap;
|
||||
}
|
||||
|
||||
|
||||
private String deltastring(double deltaMGDL, double deltaMMOL, String units) {
|
||||
String deltastring = "";
|
||||
if (deltaMGDL >= 0) {
|
||||
|
@ -389,7 +385,6 @@ public class WatchUpdaterService extends WearableListenerService implements Goog
|
|||
return deltastring;
|
||||
}
|
||||
|
||||
|
||||
private String slopeArrow(double delta) {
|
||||
if (delta <= (-3.5 * 5)) {
|
||||
return "\u21ca";
|
||||
|
@ -413,11 +408,10 @@ public class WatchUpdaterService extends WearableListenerService implements Goog
|
|||
if (googleApiClient != null && !googleApiClient.isConnected() && !googleApiClient.isConnecting()) {
|
||||
googleApiConnect();
|
||||
}
|
||||
long startTime = System.currentTimeMillis() - (long)(60000 * 60 * 5.5);
|
||||
long startTime = System.currentTimeMillis() - (long) (60000 * 60 * 5.5);
|
||||
BgReading last_bg = DatabaseHelper.lastBg();
|
||||
|
||||
if (last_bg == null)
|
||||
return;
|
||||
if (last_bg == null) return;
|
||||
|
||||
List<BgReading> graph_bgs = MainApp.getDbHelper().getBgreadingsDataFromTime(startTime, true);
|
||||
GlucoseStatus glucoseStatus = GlucoseStatus.getGlucoseStatusData(true);
|
||||
|
@ -437,28 +431,27 @@ public class WatchUpdaterService extends WearableListenerService implements Goog
|
|||
}
|
||||
entries.putDataMapArrayList("entries", dataMaps);
|
||||
executeTask(new SendToDataLayerThread(WEARABLE_DATA_PATH, googleApiClient), entries);
|
||||
|
||||
// Wearable.DataApi.putDataItem(googleApiClient, putDataRequest);
|
||||
}
|
||||
sendPreferences(); // DMR
|
||||
sendPreferences();
|
||||
sendBasals();
|
||||
sendStatus(); // DMR
|
||||
sendStatus();
|
||||
}
|
||||
|
||||
|
||||
private void sendBasals() {
|
||||
if (googleApiClient != null && !googleApiClient.isConnected() && !googleApiClient.isConnecting()) {
|
||||
googleApiConnect();
|
||||
}
|
||||
|
||||
long now = System.currentTimeMillis();
|
||||
final long startTimeWindow = now - (long)(60000 * 60 * 5.5);
|
||||
final long startTimeWindow = now - (long) (60000 * 60 * 5.5);
|
||||
|
||||
|
||||
ArrayList<DataMap> basals = new ArrayList<>();
|
||||
ArrayList<DataMap> temps = new ArrayList<>();
|
||||
ArrayList<DataMap> boluses = new ArrayList<>();
|
||||
ArrayList<DataMap> predictions = new ArrayList<>();
|
||||
|
||||
|
||||
Profile profile = ProfileFunctions.getInstance().getProfile();
|
||||
|
||||
if (profile == null) {
|
||||
|
@ -486,32 +479,33 @@ public class WatchUpdaterService extends WearableListenerService implements Goog
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
for (; runningTime < now; runningTime += 5 * 60 * 1000) {
|
||||
Profile profileTB = ProfileFunctions.getInstance().getProfile(runningTime);
|
||||
// basal rate
|
||||
//basal rate
|
||||
endBasalValue = profile.getBasal(runningTime);
|
||||
if (endBasalValue != beginBasalValue) {
|
||||
// push the segment we recently left
|
||||
//push the segment we recently left
|
||||
basals.add(basalMap(beginBasalSegmentTime, runningTime, beginBasalValue));
|
||||
|
||||
// begin new Basal segment
|
||||
//begin new Basal segment
|
||||
beginBasalSegmentTime = runningTime;
|
||||
beginBasalValue = endBasalValue;
|
||||
}
|
||||
|
||||
// temps
|
||||
//temps
|
||||
tb2 = TreatmentsPlugin.getPlugin().getTempBasalFromHistory(runningTime);
|
||||
|
||||
if (tb1 == null && tb2 == null) {
|
||||
// no temp stays no temp
|
||||
//no temp stays no temp
|
||||
|
||||
} else if (tb1 != null && tb2 == null) {
|
||||
// temp is over -> push it
|
||||
//temp is over -> push it
|
||||
temps.add(tempDatamap(tb_start, tb_before, runningTime, endBasalValue, tb_amount));
|
||||
tb1 = null;
|
||||
|
||||
} else if (tb1 == null && tb2 != null) {
|
||||
// temp begins
|
||||
//temp begins
|
||||
tb1 = tb2;
|
||||
tb_start = runningTime;
|
||||
tb_before = endBasalValue;
|
||||
|
@ -529,16 +523,16 @@ public class WatchUpdaterService extends WearableListenerService implements Goog
|
|||
}
|
||||
}
|
||||
if (beginBasalSegmentTime != runningTime) {
|
||||
// push the remaining segment
|
||||
//push the remaining segment
|
||||
basals.add(basalMap(beginBasalSegmentTime, runningTime, beginBasalValue));
|
||||
}
|
||||
if (tb1 != null) {
|
||||
tb2 = TreatmentsPlugin.getPlugin().getTempBasalFromHistory(now); // use "now" to express current situation
|
||||
tb2 = TreatmentsPlugin.getPlugin().getTempBasalFromHistory(now); //use "now" to express current situation
|
||||
if (tb2 == null) {
|
||||
// express the cancelled temp by painting it down one minute early
|
||||
//express the cancelled temp by painting it down one minute early
|
||||
temps.add(tempDatamap(tb_start, tb_before, now - 1 * 60 * 1000, endBasalValue, tb_amount));
|
||||
} else {
|
||||
// express currently running temp by painting it a bit into the future
|
||||
//express currently running temp by painting it a bit into the future
|
||||
Profile profileNow = ProfileFunctions.getInstance().getProfile(now);
|
||||
double currentAmount = tb2.tempBasalConvertedToAbsolute(now, profileNow);
|
||||
if (currentAmount != tb_amount) {
|
||||
|
@ -549,39 +543,36 @@ public class WatchUpdaterService extends WearableListenerService implements Goog
|
|||
}
|
||||
}
|
||||
} else {
|
||||
tb2 = TreatmentsPlugin.getPlugin().getTempBasalFromHistory(now); // use "now" to express current situation
|
||||
tb2 = TreatmentsPlugin.getPlugin().getTempBasalFromHistory(now); //use "now" to express current situation
|
||||
if (tb2 != null) {
|
||||
// onset at the end
|
||||
//onset at the end
|
||||
Profile profileTB = ProfileFunctions.getInstance().getProfile(runningTime);
|
||||
double currentAmount = tb2.tempBasalConvertedToAbsolute(runningTime, profileTB);
|
||||
temps.add(tempDatamap(now - 1 * 60 * 1000, endBasalValue, runningTime + 5 * 60 * 1000, currentAmount,
|
||||
currentAmount));
|
||||
temps.add(tempDatamap(now - 1 * 60 * 1000, endBasalValue, runningTime + 5 * 60 * 1000, currentAmount, currentAmount));
|
||||
}
|
||||
}
|
||||
|
||||
List<Treatment> treatments = TreatmentsPlugin.getPlugin().getTreatmentsFromHistory();
|
||||
for (Treatment treatment : treatments) {
|
||||
if (treatment.date > startTimeWindow) {
|
||||
boluses.add(treatmentMap(treatment.date, treatment.insulin, treatment.carbs, treatment.isSMB,
|
||||
treatment.isValid));
|
||||
boluses.add(treatmentMap(treatment.date, treatment.insulin, treatment.carbs, treatment.isSMB, treatment.isValid));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
final LoopPlugin.LastRun finalLastRun = LoopPlugin.lastRun;
|
||||
if (SP.getBoolean("wear_predictions", true) && finalLastRun != null && finalLastRun.request.hasPredictions
|
||||
&& finalLastRun.constraintsProcessed != null) {
|
||||
if (SP.getBoolean("wear_predictions", true) && finalLastRun != null && finalLastRun.request.hasPredictions && finalLastRun.constraintsProcessed != null) {
|
||||
List<BgReading> predArray = finalLastRun.constraintsProcessed.getPredictions();
|
||||
|
||||
if (!predArray.isEmpty()) {
|
||||
for (BgReading bg : predArray) {
|
||||
if (bg.value < 40)
|
||||
continue;
|
||||
if (bg.value < 40) continue;
|
||||
predictions.add(predictionMap(bg.date, bg.value, bg.getPredectionColor()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
DataMap dm = new DataMap();
|
||||
dm.putDataMapArrayList("basals", basals);
|
||||
dm.putDataMapArrayList("temps", temps);
|
||||
|
@ -591,7 +582,6 @@ public class WatchUpdaterService extends WearableListenerService implements Goog
|
|||
executeTask(new SendToDataLayerThread(BASAL_DATA_PATH, googleApiClient), dm);
|
||||
}
|
||||
|
||||
|
||||
private DataMap tempDatamap(long startTime, double startBasal, long to, double toBasal, double amount) {
|
||||
DataMap dm = new DataMap();
|
||||
dm.putLong("starttime", startTime);
|
||||
|
@ -602,7 +592,6 @@ public class WatchUpdaterService extends WearableListenerService implements Goog
|
|||
return dm;
|
||||
}
|
||||
|
||||
|
||||
private DataMap basalMap(long startTime, long endTime, double amount) {
|
||||
DataMap dm = new DataMap();
|
||||
dm.putLong("starttime", startTime);
|
||||
|
@ -611,7 +600,6 @@ public class WatchUpdaterService extends WearableListenerService implements Goog
|
|||
return dm;
|
||||
}
|
||||
|
||||
|
||||
private DataMap treatmentMap(long date, double bolus, double carbs, boolean isSMB, boolean isValid) {
|
||||
DataMap dm = new DataMap();
|
||||
dm.putLong("date", date);
|
||||
|
@ -622,7 +610,6 @@ public class WatchUpdaterService extends WearableListenerService implements Goog
|
|||
return dm;
|
||||
}
|
||||
|
||||
|
||||
private DataMap predictionMap(long timestamp, double sgv, int color) {
|
||||
DataMap dm = new DataMap();
|
||||
dm.putLong("timestamp", timestamp);
|
||||
|
@ -635,7 +622,7 @@ public class WatchUpdaterService extends WearableListenerService implements Goog
|
|||
private void sendNotification() {
|
||||
if (googleApiClient.isConnected()) {
|
||||
PutDataMapRequest dataMapRequest = PutDataMapRequest.create(OPEN_SETTINGS_PATH);
|
||||
// unique content
|
||||
//unique content
|
||||
dataMapRequest.getDataMap().putLong("timestamp", System.currentTimeMillis());
|
||||
dataMapRequest.getDataMap().putString("openSettings", "openSettings");
|
||||
PutDataRequest putDataRequest = dataMapRequest.asPutDataRequest();
|
||||
|
@ -646,11 +633,10 @@ public class WatchUpdaterService extends WearableListenerService implements Goog
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
private void sendBolusProgress(int progresspercent, String status) {
|
||||
if (googleApiClient.isConnected()) {
|
||||
PutDataMapRequest dataMapRequest = PutDataMapRequest.create(BOLUS_PROGRESS_PATH);
|
||||
// unique content
|
||||
//unique content
|
||||
dataMapRequest.getDataMap().putLong("timestamp", System.currentTimeMillis());
|
||||
dataMapRequest.getDataMap().putString("bolusProgress", "bolusProgress");
|
||||
dataMapRequest.getDataMap().putString("progressstatus", status);
|
||||
|
@ -663,11 +649,10 @@ public class WatchUpdaterService extends WearableListenerService implements Goog
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
private void sendActionConfirmationRequest(String title, String message, String actionstring) {
|
||||
if (googleApiClient.isConnected()) {
|
||||
PutDataMapRequest dataMapRequest = PutDataMapRequest.create(ACTION_CONFIRMATION_REQUEST_PATH);
|
||||
// unique content
|
||||
//unique content
|
||||
dataMapRequest.getDataMap().putLong("timestamp", System.currentTimeMillis());
|
||||
dataMapRequest.getDataMap().putString("actionConfirmationRequest", "actionConfirmationRequest");
|
||||
dataMapRequest.getDataMap().putString("title", title);
|
||||
|
@ -684,11 +669,10 @@ public class WatchUpdaterService extends WearableListenerService implements Goog
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
private void sendChangeConfirmationRequest(String title, String message, String actionstring) {
|
||||
if (googleApiClient.isConnected()) {
|
||||
PutDataMapRequest dataMapRequest = PutDataMapRequest.create(ACTION_CHANGECONFIRMATION_REQUEST_PATH);
|
||||
// unique content
|
||||
//unique content
|
||||
dataMapRequest.getDataMap().putLong("timestamp", System.currentTimeMillis());
|
||||
dataMapRequest.getDataMap().putString("changeConfirmationRequest", "changeConfirmationRequest");
|
||||
dataMapRequest.getDataMap().putString("title", title);
|
||||
|
@ -705,11 +689,10 @@ public class WatchUpdaterService extends WearableListenerService implements Goog
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
private void sendCancelNotificationRequest(String actionstring) {
|
||||
if (googleApiClient.isConnected()) {
|
||||
PutDataMapRequest dataMapRequest = PutDataMapRequest.create(ACTION_CANCELNOTIFICATION_REQUEST_PATH);
|
||||
// unique content
|
||||
//unique content
|
||||
dataMapRequest.getDataMap().putLong("timestamp", System.currentTimeMillis());
|
||||
dataMapRequest.getDataMap().putString("cancelNotificationRequest", "cancelNotificationRequest");
|
||||
dataMapRequest.getDataMap().putString("actionstring", actionstring);
|
||||
|
@ -724,7 +707,6 @@ public class WatchUpdaterService extends WearableListenerService implements Goog
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
private void sendStatus() {
|
||||
|
||||
if (googleApiClient.isConnected()) {
|
||||
|
@ -740,13 +722,12 @@ public class WatchUpdaterService extends WearableListenerService implements Goog
|
|||
IobTotal basalIob = treatmentsInterface.getLastCalculationTempBasals().round();
|
||||
|
||||
iobSum = DecimalFormatter.to2Decimal(bolusIob.iob + basalIob.basaliob);
|
||||
iobDetail = "(" + DecimalFormatter.to2Decimal(bolusIob.iob) + "|"
|
||||
+ DecimalFormatter.to2Decimal(basalIob.basaliob) + ")";
|
||||
cobString = IobCobCalculatorPlugin.getPlugin().getCobInfo(false, "WatcherUpdaterService")
|
||||
.generateCOBString();
|
||||
iobDetail = "(" + DecimalFormatter.to2Decimal(bolusIob.iob) + "|" + DecimalFormatter.to2Decimal(basalIob.basaliob) + ")";
|
||||
cobString = IobCobCalculatorPlugin.getPlugin().getCobInfo(false, "WatcherUpdaterService").generateCOBString();
|
||||
currentBasal = generateBasalString(treatmentsInterface);
|
||||
|
||||
// bgi
|
||||
//bgi
|
||||
|
||||
|
||||
double bgi = -(bolusIob.activity + basalIob.activity) * 5 * profile.getIsf();
|
||||
bgiString = "" + ((bgi >= 0) ? "+" : "") + DecimalFormatter.to1Decimal(bgi);
|
||||
|
@ -754,23 +735,24 @@ public class WatchUpdaterService extends WearableListenerService implements Goog
|
|||
status = generateStatusString(profile, currentBasal, iobSum, iobDetail, bgiString);
|
||||
}
|
||||
|
||||
// batteries
|
||||
|
||||
//batteries
|
||||
int phoneBattery = getBatteryLevel(getApplicationContext());
|
||||
String rigBattery = NSDeviceStatus.getInstance().getUploaderStatus().trim();
|
||||
|
||||
|
||||
long openApsStatus = -1;
|
||||
// OpenAPS status
|
||||
//OpenAPS status
|
||||
if (Config.APS) {
|
||||
// we are AndroidAPS
|
||||
openApsStatus = LoopPlugin.lastRun != null && LoopPlugin.lastRun.lastEnact != null
|
||||
&& LoopPlugin.lastRun.lastEnact.getTime() != 0 ? LoopPlugin.lastRun.lastEnact.getTime() : -1;
|
||||
//we are AndroidAPS
|
||||
openApsStatus = LoopPlugin.lastRun != null && LoopPlugin.lastRun.lastEnact != null && LoopPlugin.lastRun.lastEnact.getTime() != 0 ? LoopPlugin.lastRun.lastEnact.getTime() : -1;
|
||||
} else {
|
||||
// NSClient or remote
|
||||
//NSClient or remote
|
||||
openApsStatus = NSDeviceStatus.getOpenApsTimestamp();
|
||||
}
|
||||
|
||||
PutDataMapRequest dataMapRequest = PutDataMapRequest.create(NEW_STATUS_PATH);
|
||||
// unique content
|
||||
//unique content
|
||||
dataMapRequest.getDataMap().putString("externalStatusString", status);
|
||||
dataMapRequest.getDataMap().putString("iobSum", iobSum);
|
||||
dataMapRequest.getDataMap().putString("iobDetail", iobDetail);
|
||||
|
@ -791,14 +773,13 @@ public class WatchUpdaterService extends WearableListenerService implements Goog
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
private void sendPreferences() {
|
||||
if (googleApiClient.isConnected()) {
|
||||
|
||||
boolean wearcontrol = SP.getBoolean("wearcontrol", false);
|
||||
|
||||
PutDataMapRequest dataMapRequest = PutDataMapRequest.create(NEW_PREFERENCES_PATH);
|
||||
// unique content
|
||||
//unique content
|
||||
dataMapRequest.getDataMap().putLong("timestamp", System.currentTimeMillis());
|
||||
dataMapRequest.getDataMap().putBoolean("wearcontrol", wearcontrol);
|
||||
PutDataRequest putDataRequest = dataMapRequest.asPutDataRequest();
|
||||
|
@ -826,8 +807,7 @@ public class WatchUpdaterService extends WearableListenerService implements Goog
|
|||
|
||||
|
||||
@NonNull
|
||||
private String generateStatusString(Profile profile, String currentBasal, String iobSum, String iobDetail,
|
||||
String bgiString) {
|
||||
private String generateStatusString(Profile profile, String currentBasal, String iobSum, String iobDetail, String bgiString) {
|
||||
|
||||
String status = "";
|
||||
|
||||
|
@ -854,7 +834,7 @@ public class WatchUpdaterService extends WearableListenerService implements Goog
|
|||
|
||||
status += currentBasal + " " + iobString;
|
||||
|
||||
// add BGI if shown, otherwise return
|
||||
//add BGI if shown, otherwise return
|
||||
if (mPrefs.getBoolean("wear_showbgi", false)) {
|
||||
status += " " + bgiString;
|
||||
}
|
||||
|
@ -862,7 +842,6 @@ public class WatchUpdaterService extends WearableListenerService implements Goog
|
|||
return status;
|
||||
}
|
||||
|
||||
|
||||
@NonNull
|
||||
private String generateBasalString(TreatmentsInterface treatmentsInterface) {
|
||||
|
||||
|
@ -885,7 +864,6 @@ public class WatchUpdaterService extends WearableListenerService implements Goog
|
|||
return basalStringResult;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
if (googleApiClient != null && googleApiClient.isConnected()) {
|
||||
|
@ -894,22 +872,18 @@ public class WatchUpdaterService extends WearableListenerService implements Goog
|
|||
WearPlugin.unRegisterWatchUpdaterService();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onConnectionSuspended(int cause) {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onConnectionFailed(ConnectionResult connectionResult) {
|
||||
}
|
||||
|
||||
|
||||
public static boolean shouldReportLoopStatus(boolean enabled) {
|
||||
return (lastLoopStatus != enabled);
|
||||
}
|
||||
|
||||
|
||||
public static int getBatteryLevel(Context context) {
|
||||
Intent batteryIntent = context.registerReceiver(null, new IntentFilter(Intent.ACTION_BATTERY_CHANGED));
|
||||
if (batteryIntent != null) {
|
||||
|
@ -918,7 +892,7 @@ public class WatchUpdaterService extends WearableListenerService implements Goog
|
|||
if (level == -1 || scale == -1) {
|
||||
return 50;
|
||||
}
|
||||
return (int)(((float)level / (float)scale) * 100.0f);
|
||||
return (int) (((float) level / (float) scale) * 100.0f);
|
||||
}
|
||||
return 50;
|
||||
}
|
||||
|
|
|
@ -17,7 +17,6 @@ import info.nightscout.androidaps.db.TemporaryBasal;
|
|||
import info.nightscout.androidaps.events.EventAppInitialized;
|
||||
import info.nightscout.androidaps.events.EventConfigBuilderChange;
|
||||
import info.nightscout.androidaps.events.EventExtendedBolusChange;
|
||||
import info.nightscout.androidaps.events.EventNewBG;
|
||||
import info.nightscout.androidaps.events.EventPreferenceChange;
|
||||
import info.nightscout.androidaps.events.EventRefreshOverview;
|
||||
import info.nightscout.androidaps.events.EventTempBasalChange;
|
||||
|
@ -26,10 +25,11 @@ import info.nightscout.androidaps.interfaces.PluginBase;
|
|||
import info.nightscout.androidaps.interfaces.PluginDescription;
|
||||
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.iob.iobCobCalculator.IobCobCalculatorPlugin;
|
||||
import info.nightscout.androidaps.plugins.aps.loop.LoopPlugin;
|
||||
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventAutosensCalculationFinished;
|
||||
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin;
|
||||
import info.nightscout.androidaps.utils.DecimalFormatter;
|
||||
|
||||
|
@ -115,7 +115,7 @@ public class StatuslinePlugin extends PluginBase {
|
|||
|
||||
if (ConfigBuilderPlugin.getPlugin().getActivePump() == null)
|
||||
return "";
|
||||
|
||||
|
||||
LoopPlugin loopPlugin = LoopPlugin.getPlugin();
|
||||
|
||||
if (!loopPlugin.isEnabled(PluginType.LOOP)) {
|
||||
|
@ -138,7 +138,7 @@ public class StatuslinePlugin extends PluginBase {
|
|||
IobTotal bolusIob = treatmentsInterface.getLastCalculationTreatments().round();
|
||||
treatmentsInterface.updateTotalIOBTempBasals();
|
||||
IobTotal basalIob = treatmentsInterface.getLastCalculationTempBasals().round();
|
||||
status += DecimalFormatter.to2Decimal(bolusIob.iob + basalIob.basaliob)+"U";
|
||||
status += DecimalFormatter.to2Decimal(bolusIob.iob + basalIob.basaliob) + "U";
|
||||
|
||||
|
||||
if (mPrefs.getBoolean("xdripstatus_detailediob", true)) {
|
||||
|
@ -182,7 +182,7 @@ public class StatuslinePlugin extends PluginBase {
|
|||
}
|
||||
|
||||
@Subscribe
|
||||
public void onStatusEvent(final EventNewBG ev) {
|
||||
public void onStatusEvent(final EventAutosensCalculationFinished ev) {
|
||||
sendStatus();
|
||||
}
|
||||
|
||||
|
|
|
@ -65,8 +65,6 @@ public class IobCobCalculatorPlugin extends PluginBase {
|
|||
private volatile List<BgReading> bgReadings = null; // newest at index 0
|
||||
private volatile List<BgReading> bucketed_data = null;
|
||||
|
||||
private double dia = Constants.defaultDIA;
|
||||
|
||||
final Object dataLock = new Object();
|
||||
|
||||
boolean stopCalculationTrigger = false;
|
||||
|
@ -118,11 +116,22 @@ public class IobCobCalculatorPlugin extends PluginBase {
|
|||
return rounded;
|
||||
}
|
||||
|
||||
void loadBgData(long now) {
|
||||
long start = (long) (now - 60 * 60 * 1000L * (24 + dia));
|
||||
bgReadings = MainApp.getDbHelper().getBgreadingsDataFromTime(start, now, false);
|
||||
if (L.isEnabled(L.AUTOSENS))
|
||||
log.debug("BG data loaded. Size: " + bgReadings.size() + " Start date: " + DateUtil.dateAndTimeString(start) + " End date: " + DateUtil.dateAndTimeString(now));
|
||||
void loadBgData(long to) {
|
||||
Profile profile = ProfileFunctions.getInstance().getProfile(to);
|
||||
double dia = Constants.defaultDIA;
|
||||
if (profile != null) dia = profile.getDia();
|
||||
long start = to - T.hours((long) (24 + dia)).msecs();
|
||||
if (DateUtil.isCloseToNow(to)) {
|
||||
// if close to now expect there can be some readings with time in close future (caused by wrong time setting)
|
||||
// so read all records
|
||||
bgReadings = MainApp.getDbHelper().getBgreadingsDataFromTime(start, false);
|
||||
if (L.isEnabled(L.AUTOSENS))
|
||||
log.debug("BG data loaded. Size: " + bgReadings.size() + " Start date: " + DateUtil.dateAndTimeString(start));
|
||||
} else {
|
||||
bgReadings = MainApp.getDbHelper().getBgreadingsDataFromTime(start, to, false);
|
||||
if (L.isEnabled(L.AUTOSENS))
|
||||
log.debug("BG data loaded. Size: " + bgReadings.size() + " Start date: " + DateUtil.dateAndTimeString(start) + " End date: " + DateUtil.dateAndTimeString(to));
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isAbout5minData() {
|
||||
|
@ -608,10 +617,6 @@ public class IobCobCalculatorPlugin extends PluginBase {
|
|||
}
|
||||
if (ConfigBuilderPlugin.getPlugin() == null)
|
||||
return; // app still initializing
|
||||
Profile profile = ProfileFunctions.getInstance().getProfile();
|
||||
if (profile == null)
|
||||
return; // app still initializing
|
||||
dia = profile.getDia();
|
||||
if (ev == null) { // on init no need of reset
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -41,6 +41,7 @@ import info.nightscout.androidaps.utils.FabricPrivacy;
|
|||
import info.nightscout.androidaps.utils.MidnightTime;
|
||||
import info.nightscout.androidaps.utils.Profiler;
|
||||
import info.nightscout.androidaps.utils.SP;
|
||||
import info.nightscout.androidaps.utils.T;
|
||||
|
||||
import static info.nightscout.androidaps.utils.DateUtil.now;
|
||||
import static java.util.Calendar.MINUTE;
|
||||
|
@ -61,7 +62,7 @@ public class IobCobOref1Thread extends Thread {
|
|||
|
||||
private PowerManager.WakeLock mWakeLock;
|
||||
|
||||
public IobCobOref1Thread(IobCobCalculatorPlugin plugin, String from, long end, boolean bgDataReload, boolean limitDataToOldestAvailable, Event cause) {
|
||||
IobCobOref1Thread(IobCobCalculatorPlugin plugin, String from, long end, boolean bgDataReload, boolean limitDataToOldestAvailable, Event cause) {
|
||||
super();
|
||||
|
||||
this.iobCobCalculatorPlugin = plugin;
|
||||
|
@ -72,13 +73,15 @@ public class IobCobOref1Thread extends Thread {
|
|||
this.end = end;
|
||||
|
||||
PowerManager powerManager = (PowerManager) MainApp.instance().getApplicationContext().getSystemService(Context.POWER_SERVICE);
|
||||
mWakeLock = powerManager.newWakeLock(PowerManager.SCREEN_DIM_WAKE_LOCK, "iobCobThread");
|
||||
if (powerManager != null)
|
||||
mWakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, MainApp.gs(R.string.app_name) + ":iobCobThread");
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void run() {
|
||||
long start = DateUtil.now();
|
||||
mWakeLock.acquire();
|
||||
if (mWakeLock != null)
|
||||
mWakeLock.acquire(T.mins(10).msecs());
|
||||
try {
|
||||
if (L.isEnabled(L.AUTOSENS))
|
||||
log.debug("AUTOSENSDATA thread started: " + from);
|
||||
|
@ -173,7 +176,7 @@ public class IobCobOref1Thread extends Thread {
|
|||
|
||||
double bgi = -iob.activity * sens * 5;
|
||||
double deviation = delta - bgi;
|
||||
double avgDeviation = Math.round((avgDelta - bgi) * 1000) / 1000;
|
||||
double avgDeviation = Math.round((avgDelta - bgi) * 1000) / 1000d;
|
||||
|
||||
double slopeFromMaxDeviation = 0;
|
||||
double slopeFromMinDeviation = 999;
|
||||
|
@ -394,7 +397,8 @@ public class IobCobOref1Thread extends Thread {
|
|||
MainApp.bus().post(new EventAutosensCalculationFinished(cause));
|
||||
}).start();
|
||||
} finally {
|
||||
mWakeLock.release();
|
||||
if (mWakeLock != null)
|
||||
mWakeLock.release();
|
||||
MainApp.bus().post(new EventIobCalculationProgress(""));
|
||||
if (L.isEnabled(L.AUTOSENS)) {
|
||||
log.debug("AUTOSENSDATA thread ended: " + from);
|
||||
|
|
|
@ -41,6 +41,7 @@ import info.nightscout.androidaps.utils.FabricPrivacy;
|
|||
import info.nightscout.androidaps.utils.MidnightTime;
|
||||
import info.nightscout.androidaps.utils.Profiler;
|
||||
import info.nightscout.androidaps.utils.SP;
|
||||
import info.nightscout.androidaps.utils.T;
|
||||
|
||||
import static info.nightscout.androidaps.utils.DateUtil.now;
|
||||
|
||||
|
@ -60,7 +61,7 @@ public class IobCobThread extends Thread {
|
|||
|
||||
private PowerManager.WakeLock mWakeLock;
|
||||
|
||||
public IobCobThread(IobCobCalculatorPlugin plugin, String from, long end, boolean bgDataReload, boolean limitDataToOldestAvailable, Event cause) {
|
||||
IobCobThread(IobCobCalculatorPlugin plugin, String from, long end, boolean bgDataReload, boolean limitDataToOldestAvailable, Event cause) {
|
||||
super();
|
||||
|
||||
this.iobCobCalculatorPlugin = plugin;
|
||||
|
@ -71,13 +72,15 @@ public class IobCobThread extends Thread {
|
|||
this.end = end;
|
||||
|
||||
PowerManager powerManager = (PowerManager) MainApp.instance().getApplicationContext().getSystemService(Context.POWER_SERVICE);
|
||||
mWakeLock = powerManager.newWakeLock(PowerManager.SCREEN_DIM_WAKE_LOCK, "iobCobThread");
|
||||
if (powerManager != null)
|
||||
mWakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, MainApp.gs(R.string.app_name) + ":iobCobThread");
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void run() {
|
||||
long start = DateUtil.now();
|
||||
mWakeLock.acquire();
|
||||
if (mWakeLock != null)
|
||||
mWakeLock.acquire(T.mins(10).msecs());
|
||||
try {
|
||||
if (L.isEnabled(L.AUTOSENS))
|
||||
log.debug("AUTOSENSDATA thread started: " + from);
|
||||
|
@ -172,7 +175,7 @@ public class IobCobThread extends Thread {
|
|||
|
||||
double bgi = -iob.activity * sens * 5;
|
||||
double deviation = delta - bgi;
|
||||
double avgDeviation = Math.round((avgDelta - bgi) * 1000) / 1000;
|
||||
double avgDeviation = Math.round((avgDelta - bgi) * 1000) / 1000d;
|
||||
|
||||
double slopeFromMaxDeviation = 0;
|
||||
double slopeFromMinDeviation = 999;
|
||||
|
@ -321,7 +324,8 @@ public class IobCobThread extends Thread {
|
|||
MainApp.bus().post(new EventAutosensCalculationFinished(cause));
|
||||
}).start();
|
||||
} finally {
|
||||
mWakeLock.release();
|
||||
if (mWakeLock != null)
|
||||
mWakeLock.release();
|
||||
MainApp.bus().post(new EventIobCalculationProgress(""));
|
||||
if (L.isEnabled(L.AUTOSENS)) {
|
||||
log.debug("AUTOSENSDATA thread ended: " + from);
|
||||
|
|
|
@ -22,7 +22,6 @@ import info.nightscout.androidaps.MainApp;
|
|||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.data.Profile;
|
||||
import info.nightscout.androidaps.data.ProfileStore;
|
||||
import info.nightscout.androidaps.plugins.general.careportal.Dialogs.NewNSTreatmentDialog;
|
||||
import info.nightscout.androidaps.plugins.common.SubscriberFragment;
|
||||
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
|
||||
import info.nightscout.androidaps.plugins.profile.ns.events.EventNSProfileUpdateGUI;
|
||||
|
@ -157,7 +156,7 @@ public class NSProfileFragment extends SubscriberFragment {
|
|||
Profile profile = store.getSpecificProfile(name);
|
||||
if (profile != null) {
|
||||
OKDialog.showConfirmation(getActivity(), MainApp.gs(R.string.activate_profile) + ": " + name + " ?", () ->
|
||||
NewNSTreatmentDialog.doProfileSwitch(store, name, 0, 100, 0)
|
||||
ProfileFunctions.doProfileSwitch(store, name, 0, 100, 0)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,14 +1,14 @@
|
|||
package info.nightscout.androidaps.plugins.pump.danaR;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import android.support.annotation.Nullable;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import android.support.annotation.Nullable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import info.nightscout.androidaps.BuildConfig;
|
||||
import info.nightscout.androidaps.MainApp;
|
||||
|
@ -47,7 +47,6 @@ import info.nightscout.androidaps.utils.SP;
|
|||
*/
|
||||
|
||||
public abstract class AbstractDanaRPlugin extends PluginBase implements PumpInterface, DanaRInterface, ConstraintsInterface, ProfileInterface {
|
||||
|
||||
protected Logger log = LoggerFactory.getLogger(L.PUMP);
|
||||
|
||||
protected AbstractDanaRExecutionService sExecutionService;
|
||||
|
@ -56,14 +55,17 @@ public abstract class AbstractDanaRPlugin extends PluginBase implements PumpInte
|
|||
|
||||
public PumpDescription pumpDescription = new PumpDescription();
|
||||
|
||||
|
||||
protected AbstractDanaRPlugin() {
|
||||
super(new PluginDescription().mainType(PluginType.PUMP).fragmentClass(DanaRFragment.class.getName())
|
||||
.pluginName(R.string.danarspump).shortName(R.string.danarpump_shortname).preferencesId(R.xml.pref_danars)
|
||||
.description(R.string.description_pump_dana_r));
|
||||
super(new PluginDescription()
|
||||
.mainType(PluginType.PUMP)
|
||||
.fragmentClass(DanaRFragment.class.getName())
|
||||
.pluginName(R.string.danarspump)
|
||||
.shortName(R.string.danarpump_shortname)
|
||||
.preferencesId(R.xml.pref_danars)
|
||||
.description(R.string.description_pump_dana_r)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onStateChange(PluginType type, State oldState, State newState) {
|
||||
// if pump profile was enabled need to switch to another too
|
||||
|
@ -74,21 +76,17 @@ public abstract class AbstractDanaRPlugin extends PluginBase implements PumpInte
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isSuspended() {
|
||||
return DanaRPump.getInstance().pumpSuspended;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isBusy() {
|
||||
if (sExecutionService == null)
|
||||
return false;
|
||||
if (sExecutionService == null) return false;
|
||||
return sExecutionService.isConnected() || sExecutionService.isConnecting();
|
||||
}
|
||||
|
||||
|
||||
// Pump interface
|
||||
@Override
|
||||
public PumpEnactResult setNewBasalProfile(Profile profile) {
|
||||
|
@ -101,8 +99,7 @@ public abstract class AbstractDanaRPlugin extends PluginBase implements PumpInte
|
|||
}
|
||||
if (!isInitialized()) {
|
||||
log.error("setNewBasalProfile not initialized");
|
||||
Notification notification = new Notification(Notification.PROFILE_NOT_SET_NOT_INITIALIZED,
|
||||
MainApp.gs(R.string.pumpNotInitializedProfileNotSet), Notification.URGENT);
|
||||
Notification notification = new Notification(Notification.PROFILE_NOT_SET_NOT_INITIALIZED, MainApp.gs(R.string.pumpNotInitializedProfileNotSet), Notification.URGENT);
|
||||
MainApp.bus().post(new EventNewNotification(notification));
|
||||
result.comment = MainApp.gs(R.string.pumpNotInitializedProfileNotSet);
|
||||
return result;
|
||||
|
@ -110,16 +107,14 @@ public abstract class AbstractDanaRPlugin extends PluginBase implements PumpInte
|
|||
MainApp.bus().post(new EventDismissNotification(Notification.PROFILE_NOT_SET_NOT_INITIALIZED));
|
||||
}
|
||||
if (!sExecutionService.updateBasalsInPump(profile)) {
|
||||
Notification notification = new Notification(Notification.FAILED_UDPATE_PROFILE,
|
||||
MainApp.gs(R.string.failedupdatebasalprofile), Notification.URGENT);
|
||||
Notification notification = new Notification(Notification.FAILED_UDPATE_PROFILE, MainApp.gs(R.string.failedupdatebasalprofile), Notification.URGENT);
|
||||
MainApp.bus().post(new EventNewNotification(notification));
|
||||
result.comment = MainApp.gs(R.string.failedupdatebasalprofile);
|
||||
return result;
|
||||
} else {
|
||||
MainApp.bus().post(new EventDismissNotification(Notification.PROFILE_NOT_SET_NOT_INITIALIZED));
|
||||
MainApp.bus().post(new EventDismissNotification(Notification.FAILED_UDPATE_PROFILE));
|
||||
Notification notification = new Notification(Notification.PROFILE_SET_OK,
|
||||
MainApp.gs(R.string.profile_set_ok), Notification.INFO, 60);
|
||||
Notification notification = new Notification(Notification.PROFILE_SET_OK, MainApp.gs(R.string.profile_set_ok), Notification.INFO, 60);
|
||||
MainApp.bus().post(new EventNewNotification(notification));
|
||||
result.success = true;
|
||||
result.enacted = true;
|
||||
|
@ -128,7 +123,6 @@ public abstract class AbstractDanaRPlugin extends PluginBase implements PumpInte
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isThisProfileSet(Profile profile) {
|
||||
if (!isInitialized())
|
||||
|
@ -141,8 +135,7 @@ public abstract class AbstractDanaRPlugin extends PluginBase implements PumpInte
|
|||
for (int h = 0; h < basalValues; h++) {
|
||||
Double pumpValue = pump.pumpProfiles[pump.activeProfile][h];
|
||||
Double profileValue = profile.getBasalTimeFromMidnight(h * basalIncrement);
|
||||
if (profileValue == null)
|
||||
return true;
|
||||
if (profileValue == null) return true;
|
||||
if (Math.abs(pumpValue - profileValue) > getPumpDescription().basalStep) {
|
||||
if (L.isEnabled(L.PUMP))
|
||||
log.debug("Diff found. Hour: " + h + " Pump: " + pumpValue + " Profile: " + profileValue);
|
||||
|
@ -152,30 +145,21 @@ public abstract class AbstractDanaRPlugin extends PluginBase implements PumpInte
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public long lastDataTime() {
|
||||
return DanaRPump.getInstance().lastConnection;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public double getBaseBasalRate() {
|
||||
return DanaRPump.getInstance().currentBasal;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getReservoirLevel() { return DanaRPump.getInstance().reservoirRemainingUnits; }
|
||||
|
||||
@Override
|
||||
public double getReservoirLevel() {
|
||||
return DanaRPump.getInstance().reservoirRemainingUnits;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getBatteryLevel() {
|
||||
return DanaRPump.getInstance().batteryRemaining;
|
||||
}
|
||||
|
||||
public int getBatteryLevel() { return DanaRPump.getInstance().batteryRemaining; }
|
||||
|
||||
@Override
|
||||
public void stopBolusDelivering() {
|
||||
|
@ -186,14 +170,11 @@ public abstract class AbstractDanaRPlugin extends PluginBase implements PumpInte
|
|||
sExecutionService.bolusStop();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public PumpEnactResult setTempBasalPercent(Integer percent, Integer durationInMinutes, Profile profile,
|
||||
boolean enforceNew) {
|
||||
public PumpEnactResult setTempBasalPercent(Integer percent, Integer durationInMinutes, Profile profile, boolean enforceNew) {
|
||||
DanaRPump pump = DanaRPump.getInstance();
|
||||
PumpEnactResult result = new PumpEnactResult();
|
||||
percent = MainApp.getConstraintChecker().applyBasalPercentConstraints(new Constraint<>(percent), profile)
|
||||
.value();
|
||||
percent = MainApp.getConstraintChecker().applyBasalPercentConstraints(new Constraint<>(percent), profile).value();
|
||||
if (percent < 0) {
|
||||
result.isTempCancel = false;
|
||||
result.enacted = false;
|
||||
|
@ -239,7 +220,6 @@ public abstract class AbstractDanaRPlugin extends PluginBase implements PumpInte
|
|||
return result;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public PumpEnactResult setExtendedBolus(Double insulin, Integer durationInMinutes) {
|
||||
DanaRPump pump = DanaRPump.getInstance();
|
||||
|
@ -259,13 +239,11 @@ public abstract class AbstractDanaRPlugin extends PluginBase implements PumpInte
|
|||
result.isPercent = false;
|
||||
result.isTempCancel = false;
|
||||
if (L.isEnabled(L.PUMP))
|
||||
log.debug("setExtendedBolus: Correct extended bolus already set. Current: " + pump.extendedBolusAmount
|
||||
+ " Asked: " + insulin);
|
||||
log.debug("setExtendedBolus: Correct extended bolus already set. Current: " + pump.extendedBolusAmount + " Asked: " + insulin);
|
||||
return result;
|
||||
}
|
||||
boolean connectionOK = sExecutionService.extendedBolus(insulin, durationInHalfHours);
|
||||
if (connectionOK && pump.isExtendedInProgress
|
||||
&& Math.abs(pump.extendedBolusAmount - insulin) < getPumpDescription().extendedBolusStep) {
|
||||
if (connectionOK && pump.isExtendedInProgress && Math.abs(pump.extendedBolusAmount - insulin) < getPumpDescription().extendedBolusStep) {
|
||||
result.enacted = true;
|
||||
result.success = true;
|
||||
result.comment = MainApp.gs(R.string.virtualpump_resultok);
|
||||
|
@ -286,7 +264,6 @@ public abstract class AbstractDanaRPlugin extends PluginBase implements PumpInte
|
|||
return result;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public PumpEnactResult cancelExtendedBolus() {
|
||||
PumpEnactResult result = new PumpEnactResult();
|
||||
|
@ -310,7 +287,6 @@ public abstract class AbstractDanaRPlugin extends PluginBase implements PumpInte
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void connect(String from) {
|
||||
if (sExecutionService != null) {
|
||||
|
@ -320,33 +296,26 @@ public abstract class AbstractDanaRPlugin extends PluginBase implements PumpInte
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isConnected() {
|
||||
return sExecutionService != null && sExecutionService.isConnected();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isConnecting() {
|
||||
return sExecutionService != null && sExecutionService.isConnecting();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void disconnect(String from) {
|
||||
if (sExecutionService != null)
|
||||
sExecutionService.disconnect(from);
|
||||
if (sExecutionService != null) sExecutionService.disconnect(from);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void stopConnecting() {
|
||||
if (sExecutionService != null)
|
||||
sExecutionService.stopConnecting();
|
||||
if (sExecutionService != null) sExecutionService.stopConnecting();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void getPumpStatus() {
|
||||
if (sExecutionService != null) {
|
||||
|
@ -356,7 +325,6 @@ public abstract class AbstractDanaRPlugin extends PluginBase implements PumpInte
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public JSONObject getJSONStatus(Profile profile, String profilename) {
|
||||
DanaRPump pump = DanaRPump.getInstance();
|
||||
|
@ -399,7 +367,7 @@ public abstract class AbstractDanaRPlugin extends PluginBase implements PumpInte
|
|||
pumpjson.put("battery", battery);
|
||||
pumpjson.put("status", status);
|
||||
pumpjson.put("extended", extended);
|
||||
pumpjson.put("reservoir", (int)pump.reservoirRemainingUnits);
|
||||
pumpjson.put("reservoir", (int) pump.reservoirRemainingUnits);
|
||||
pumpjson.put("clock", DateUtil.toISOString(new Date()));
|
||||
} catch (JSONException e) {
|
||||
log.error("Unhandled exception", e);
|
||||
|
@ -407,19 +375,16 @@ public abstract class AbstractDanaRPlugin extends PluginBase implements PumpInte
|
|||
return pumpjson;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String deviceID() {
|
||||
return DanaRPump.getInstance().serialNumber;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public PumpDescription getPumpDescription() {
|
||||
return pumpDescription;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* DanaR interface
|
||||
*/
|
||||
|
@ -429,51 +394,35 @@ public abstract class AbstractDanaRPlugin extends PluginBase implements PumpInte
|
|||
return sExecutionService.loadHistory(type);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Constraint interface
|
||||
*/
|
||||
|
||||
@Override
|
||||
public Constraint<Double> applyBasalConstraints(Constraint<Double> absoluteRate, Profile profile) {
|
||||
absoluteRate.setIfSmaller(
|
||||
DanaRPump.getInstance().maxBasal,
|
||||
String.format(MainApp.gs(R.string.limitingbasalratio), DanaRPump.getInstance().maxBasal,
|
||||
MainApp.gs(R.string.pumplimit)), this);
|
||||
absoluteRate.setIfSmaller(DanaRPump.getInstance().maxBasal, String.format(MainApp.gs(R.string.limitingbasalratio), DanaRPump.getInstance().maxBasal, MainApp.gs(R.string.pumplimit)), this);
|
||||
return absoluteRate;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Constraint<Integer> applyBasalPercentConstraints(Constraint<Integer> percentRate, Profile profile) {
|
||||
percentRate.setIfGreater(0,
|
||||
String.format(MainApp.gs(R.string.limitingpercentrate), 0, MainApp.gs(R.string.itmustbepositivevalue)),
|
||||
this);
|
||||
percentRate.setIfSmaller(
|
||||
getPumpDescription().maxTempPercent,
|
||||
String.format(MainApp.gs(R.string.limitingpercentrate), getPumpDescription().maxTempPercent,
|
||||
MainApp.gs(R.string.pumplimit)), this);
|
||||
percentRate.setIfGreater(0, String.format(MainApp.gs(R.string.limitingpercentrate), 0, MainApp.gs(R.string.itmustbepositivevalue)), this);
|
||||
percentRate.setIfSmaller(getPumpDescription().maxTempPercent, String.format(MainApp.gs(R.string.limitingpercentrate), getPumpDescription().maxTempPercent, MainApp.gs(R.string.pumplimit)), this);
|
||||
|
||||
return percentRate;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Constraint<Double> applyBolusConstraints(Constraint<Double> insulin) {
|
||||
insulin.setIfSmaller(
|
||||
DanaRPump.getInstance().maxBolus,
|
||||
String.format(MainApp.gs(R.string.limitingbolus), DanaRPump.getInstance().maxBolus,
|
||||
MainApp.gs(R.string.pumplimit)), this);
|
||||
insulin.setIfSmaller(DanaRPump.getInstance().maxBolus, String.format(MainApp.gs(R.string.limitingbolus), DanaRPump.getInstance().maxBolus, MainApp.gs(R.string.pumplimit)), this);
|
||||
return insulin;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Constraint<Double> applyExtendedBolusConstraints(Constraint<Double> insulin) {
|
||||
return applyBolusConstraints(insulin);
|
||||
}
|
||||
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public ProfileStore getProfile() {
|
||||
|
@ -482,61 +431,52 @@ public abstract class AbstractDanaRPlugin extends PluginBase implements PumpInte
|
|||
return DanaRPump.getInstance().createConvertedProfile();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getUnits() {
|
||||
return DanaRPump.getInstance().getUnits();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getProfileName() {
|
||||
return DanaRPump.getInstance().createConvertedProfileName();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public PumpEnactResult loadTDDs() {
|
||||
return loadHistory(RecordTypes.RECORD_TYPE_DAILY);
|
||||
}
|
||||
|
||||
|
||||
// Reply for sms communicator
|
||||
public String shortStatus(boolean veryShort) {
|
||||
DanaRPump pump = DanaRPump.getInstance();
|
||||
String ret = "";
|
||||
if (pump.lastConnection != 0) {
|
||||
Long agoMsec = System.currentTimeMillis() - pump.lastConnection;
|
||||
int agoMin = (int)(agoMsec / 60d / 1000d);
|
||||
int agoMin = (int) (agoMsec / 60d / 1000d);
|
||||
ret += "LastConn: " + agoMin + " minago\n";
|
||||
}
|
||||
if (pump.lastBolusTime != 0) {
|
||||
ret += "LastBolus: " + DecimalFormatter.to2Decimal(pump.lastBolusAmount) + "U @"
|
||||
+ android.text.format.DateFormat.format("HH:mm", pump.lastBolusTime) + "\n";
|
||||
ret += "LastBolus: " + DecimalFormatter.to2Decimal(pump.lastBolusAmount) + "U @" + android.text.format.DateFormat.format("HH:mm", pump.lastBolusTime) + "\n";
|
||||
}
|
||||
TemporaryBasal activeTemp = TreatmentsPlugin.getPlugin()
|
||||
.getRealTempBasalFromHistory(System.currentTimeMillis());
|
||||
TemporaryBasal activeTemp = TreatmentsPlugin.getPlugin().getRealTempBasalFromHistory(System.currentTimeMillis());
|
||||
if (activeTemp != null) {
|
||||
ret += "Temp: " + activeTemp.toStringFull() + "\n";
|
||||
}
|
||||
ExtendedBolus activeExtendedBolus = TreatmentsPlugin.getPlugin().getExtendedBolusFromHistory(
|
||||
System.currentTimeMillis());
|
||||
ExtendedBolus activeExtendedBolus = TreatmentsPlugin.getPlugin().getExtendedBolusFromHistory(System.currentTimeMillis());
|
||||
if (activeExtendedBolus != null) {
|
||||
ret += "Extended: " + activeExtendedBolus.toString() + "\n";
|
||||
}
|
||||
if (!veryShort) {
|
||||
ret += "TDD: " + DecimalFormatter.to0Decimal(pump.dailyTotalUnits) + " / " + pump.maxDailyTotalUnits
|
||||
+ " U\n";
|
||||
ret += "TDD: " + DecimalFormatter.to0Decimal(pump.dailyTotalUnits) + " / " + pump.maxDailyTotalUnits + " U\n";
|
||||
}
|
||||
ret += "IOB: " + pump.iob + "U\n";
|
||||
ret += "Reserv: " + DecimalFormatter.to0Decimal(pump.reservoirRemainingUnits) + "U\n";
|
||||
ret += "Batt: " + pump.batteryRemaining + "\n";
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
// TODO: daily total constraint
|
||||
|
||||
|
||||
@Override
|
||||
public List<CustomAction> getCustomActions() {
|
||||
return null;
|
||||
|
@ -544,7 +484,16 @@ public abstract class AbstractDanaRPlugin extends PluginBase implements PumpInte
|
|||
|
||||
|
||||
@Override
|
||||
public PumpEnactResult executeCustomAction(CustomActionType customActionType) {
|
||||
return null;
|
||||
public void executeCustomAction(CustomActionType customActionType) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canHandleDST() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,12 +1,5 @@
|
|||
package info.nightscout.androidaps.plugins.pump.danaRS;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
@ -18,6 +11,13 @@ import android.support.v7.app.AlertDialog;
|
|||
|
||||
import com.squareup.otto.Subscribe;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import info.nightscout.androidaps.BuildConfig;
|
||||
import info.nightscout.androidaps.MainApp;
|
||||
import info.nightscout.androidaps.R;
|
||||
|
@ -67,11 +67,9 @@ import info.nightscout.androidaps.utils.T;
|
|||
*/
|
||||
|
||||
public class DanaRSPlugin extends PluginBase implements PumpInterface, DanaRInterface, ConstraintsInterface, ProfileInterface {
|
||||
|
||||
private Logger log = LoggerFactory.getLogger(L.PUMP);
|
||||
private static DanaRSPlugin plugin = null;
|
||||
|
||||
|
||||
public static DanaRSPlugin getPlugin() {
|
||||
if (plugin == null)
|
||||
plugin = new DanaRSPlugin();
|
||||
|
@ -85,16 +83,19 @@ public class DanaRSPlugin extends PluginBase implements PumpInterface, DanaRInte
|
|||
|
||||
public static PumpDescription pumpDescription = new PumpDescription();
|
||||
|
||||
|
||||
private DanaRSPlugin() {
|
||||
super(new PluginDescription().mainType(PluginType.PUMP).fragmentClass(DanaRFragment.class.getName())
|
||||
.pluginName(R.string.danarspump).shortName(R.string.danarspump_shortname).preferencesId(R.xml.pref_danars)
|
||||
.description(R.string.description_pump_dana_rs));
|
||||
super(new PluginDescription()
|
||||
.mainType(PluginType.PUMP)
|
||||
.fragmentClass(DanaRFragment.class.getName())
|
||||
.pluginName(R.string.danarspump)
|
||||
.shortName(R.string.danarspump_shortname)
|
||||
.preferencesId(R.xml.pref_danars)
|
||||
.description(R.string.description_pump_dana_rs)
|
||||
);
|
||||
|
||||
pumpDescription.setPumpDescription(PumpType.DanaRS);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onStateChange(PluginType type, State oldState, State newState) {
|
||||
// if pump profile was enabled need to switch to another too
|
||||
|
@ -105,7 +106,6 @@ public class DanaRSPlugin extends PluginBase implements PumpInterface, DanaRInte
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onStart() {
|
||||
Context context = MainApp.instance().getApplicationContext();
|
||||
|
@ -117,7 +117,6 @@ public class DanaRSPlugin extends PluginBase implements PumpInterface, DanaRInte
|
|||
super.onStart();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
Context context = MainApp.instance().getApplicationContext();
|
||||
|
@ -126,25 +125,25 @@ public class DanaRSPlugin extends PluginBase implements PumpInterface, DanaRInte
|
|||
MainApp.bus().unregister(this);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void switchAllowed(ConfigBuilderFragment.PluginViewHolder.PluginSwitcher pluginSwitcher,
|
||||
FragmentActivity context) {
|
||||
public void switchAllowed(ConfigBuilderFragment.PluginViewHolder.PluginSwitcher pluginSwitcher, FragmentActivity context) {
|
||||
boolean allowHardwarePump = SP.getBoolean("allow_hardware_pump", false);
|
||||
if (allowHardwarePump || context == null) {
|
||||
pluginSwitcher.invoke();
|
||||
} else {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(context);
|
||||
builder.setMessage(R.string.allow_hardware_pump_text).setPositiveButton(R.string.yes, (dialog, id) -> {
|
||||
pluginSwitcher.invoke();
|
||||
SP.putBoolean("allow_hardware_pump", true);
|
||||
if (L.isEnabled(L.PUMP))
|
||||
log.debug("First time HW pump allowed!");
|
||||
}).setNegativeButton(R.string.cancel, (dialog, id) -> {
|
||||
pluginSwitcher.cancel();
|
||||
if (L.isEnabled(L.PUMP))
|
||||
log.debug("User does not allow switching to HW pump!");
|
||||
});
|
||||
builder.setMessage(R.string.allow_hardware_pump_text)
|
||||
.setPositiveButton(R.string.yes, (dialog, id) -> {
|
||||
pluginSwitcher.invoke();
|
||||
SP.putBoolean("allow_hardware_pump", true);
|
||||
if (L.isEnabled(L.PUMP))
|
||||
log.debug("First time HW pump allowed!");
|
||||
})
|
||||
.setNegativeButton(R.string.cancel, (dialog, id) -> {
|
||||
pluginSwitcher.cancel();
|
||||
if (L.isEnabled(L.PUMP))
|
||||
log.debug("User does not allow switching to HW pump!");
|
||||
});
|
||||
builder.create().show();
|
||||
}
|
||||
}
|
||||
|
@ -157,30 +156,26 @@ public class DanaRSPlugin extends PluginBase implements PumpInterface, DanaRInte
|
|||
danaRSService = null;
|
||||
}
|
||||
|
||||
|
||||
public void onServiceConnected(ComponentName name, IBinder service) {
|
||||
if (L.isEnabled(L.PUMP))
|
||||
log.debug("Service is connected");
|
||||
DanaRSService.LocalBinder mLocalBinder = (DanaRSService.LocalBinder)service;
|
||||
DanaRSService.LocalBinder mLocalBinder = (DanaRSService.LocalBinder) service;
|
||||
danaRSService = mLocalBinder.getServiceInstance();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@SuppressWarnings("UnusedParameters")
|
||||
@Subscribe
|
||||
public void onStatusEvent(final EventAppExit e) {
|
||||
MainApp.instance().getApplicationContext().unbindService(mConnection);
|
||||
}
|
||||
|
||||
|
||||
@Subscribe
|
||||
public void onStatusEvent(final EventDanaRSDeviceChange e) {
|
||||
mDeviceAddress = SP.getString(R.string.key_danars_address, "");
|
||||
mDeviceName = SP.getString(R.string.key_danars_name, "");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void connect(String from) {
|
||||
if (L.isEnabled(L.PUMP))
|
||||
|
@ -192,46 +187,37 @@ public class DanaRSPlugin extends PluginBase implements PumpInterface, DanaRInte
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isConnected() {
|
||||
return danaRSService != null && danaRSService.isConnected();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isConnecting() {
|
||||
return danaRSService != null && danaRSService.isConnecting();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isHandshakeInProgress() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void finishHandshaking() {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void disconnect(String from) {
|
||||
if (L.isEnabled(L.PUMP))
|
||||
log.debug("RS disconnect from: " + from);
|
||||
if (danaRSService != null)
|
||||
danaRSService.disconnect(from);
|
||||
if (danaRSService != null) danaRSService.disconnect(from);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void stopConnecting() {
|
||||
if (danaRSService != null)
|
||||
danaRSService.stopConnecting();
|
||||
if (danaRSService != null) danaRSService.stopConnecting();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void getPumpStatus() {
|
||||
if (danaRSService != null) {
|
||||
|
@ -241,7 +227,6 @@ public class DanaRSPlugin extends PluginBase implements PumpInterface, DanaRInte
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// DanaR interface
|
||||
|
||||
@Override
|
||||
|
@ -249,40 +234,28 @@ public class DanaRSPlugin extends PluginBase implements PumpInterface, DanaRInte
|
|||
return danaRSService.loadHistory(type);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public PumpEnactResult loadEvents() {
|
||||
return danaRSService.loadEvents();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public PumpEnactResult setUserOptions() {
|
||||
return danaRSService.setUserSettings();
|
||||
}
|
||||
|
||||
|
||||
// Constraints interface
|
||||
|
||||
@Override
|
||||
public Constraint<Double> applyBasalConstraints(Constraint<Double> absoluteRate, Profile profile) {
|
||||
absoluteRate.setIfSmaller(
|
||||
DanaRPump.getInstance().maxBasal,
|
||||
String.format(MainApp.gs(R.string.limitingbasalratio), DanaRPump.getInstance().maxBasal,
|
||||
MainApp.gs(R.string.pumplimit)), this);
|
||||
absoluteRate.setIfSmaller(DanaRPump.getInstance().maxBasal, String.format(MainApp.gs(R.string.limitingbasalratio), DanaRPump.getInstance().maxBasal, MainApp.gs(R.string.pumplimit)), this);
|
||||
return absoluteRate;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Constraint<Integer> applyBasalPercentConstraints(Constraint<Integer> percentRate, Profile profile) {
|
||||
percentRate.setIfGreater(0,
|
||||
String.format(MainApp.gs(R.string.limitingpercentrate), 0, MainApp.gs(R.string.itmustbepositivevalue)),
|
||||
this);
|
||||
percentRate.setIfSmaller(
|
||||
getPumpDescription().maxTempPercent,
|
||||
String.format(MainApp.gs(R.string.limitingpercentrate), getPumpDescription().maxTempPercent,
|
||||
MainApp.gs(R.string.pumplimit)), this);
|
||||
percentRate.setIfGreater(0, String.format(MainApp.gs(R.string.limitingpercentrate), 0, MainApp.gs(R.string.itmustbepositivevalue)), this);
|
||||
percentRate.setIfSmaller(getPumpDescription().maxTempPercent, String.format(MainApp.gs(R.string.limitingpercentrate), getPumpDescription().maxTempPercent, MainApp.gs(R.string.pumplimit)), this);
|
||||
|
||||
return percentRate;
|
||||
}
|
||||
|
@ -290,20 +263,15 @@ public class DanaRSPlugin extends PluginBase implements PumpInterface, DanaRInte
|
|||
|
||||
@Override
|
||||
public Constraint<Double> applyBolusConstraints(Constraint<Double> insulin) {
|
||||
insulin.setIfSmaller(
|
||||
DanaRPump.getInstance().maxBolus,
|
||||
String.format(MainApp.gs(R.string.limitingbolus), DanaRPump.getInstance().maxBolus,
|
||||
MainApp.gs(R.string.pumplimit)), this);
|
||||
insulin.setIfSmaller(DanaRPump.getInstance().maxBolus, String.format(MainApp.gs(R.string.limitingbolus), DanaRPump.getInstance().maxBolus, MainApp.gs(R.string.pumplimit)), this);
|
||||
return insulin;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Constraint<Double> applyExtendedBolusConstraints(Constraint<Double> insulin) {
|
||||
return applyBolusConstraints(insulin);
|
||||
}
|
||||
|
||||
|
||||
// Profile interface
|
||||
|
||||
@Nullable
|
||||
|
@ -314,19 +282,16 @@ public class DanaRSPlugin extends PluginBase implements PumpInterface, DanaRInte
|
|||
return DanaRPump.getInstance().createConvertedProfile();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getUnits() {
|
||||
return DanaRPump.getInstance().getUnits();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getProfileName() {
|
||||
return DanaRPump.getInstance().createConvertedProfileName();
|
||||
}
|
||||
|
||||
|
||||
// Pump interface
|
||||
|
||||
@Override
|
||||
|
@ -334,21 +299,17 @@ public class DanaRSPlugin extends PluginBase implements PumpInterface, DanaRInte
|
|||
return DanaRPump.getInstance().lastConnection > 0 && DanaRPump.getInstance().maxBasal > 0;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isSuspended() {
|
||||
return DanaRPump.getInstance().pumpSuspended;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isBusy() {
|
||||
if (danaRSService == null)
|
||||
return false;
|
||||
if (danaRSService == null) return false;
|
||||
return danaRSService.isConnected() || danaRSService.isConnecting();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public PumpEnactResult setNewBasalProfile(Profile profile) {
|
||||
PumpEnactResult result = new PumpEnactResult();
|
||||
|
@ -360,8 +321,7 @@ public class DanaRSPlugin extends PluginBase implements PumpInterface, DanaRInte
|
|||
}
|
||||
if (!isInitialized()) {
|
||||
log.error("setNewBasalProfile not initialized");
|
||||
Notification notification = new Notification(Notification.PROFILE_NOT_SET_NOT_INITIALIZED,
|
||||
MainApp.gs(R.string.pumpNotInitializedProfileNotSet), Notification.URGENT);
|
||||
Notification notification = new Notification(Notification.PROFILE_NOT_SET_NOT_INITIALIZED, MainApp.gs(R.string.pumpNotInitializedProfileNotSet), Notification.URGENT);
|
||||
MainApp.bus().post(new EventNewNotification(notification));
|
||||
result.comment = MainApp.gs(R.string.pumpNotInitializedProfileNotSet);
|
||||
return result;
|
||||
|
@ -369,16 +329,14 @@ public class DanaRSPlugin extends PluginBase implements PumpInterface, DanaRInte
|
|||
MainApp.bus().post(new EventDismissNotification(Notification.PROFILE_NOT_SET_NOT_INITIALIZED));
|
||||
}
|
||||
if (!danaRSService.updateBasalsInPump(profile)) {
|
||||
Notification notification = new Notification(Notification.FAILED_UDPATE_PROFILE,
|
||||
MainApp.gs(R.string.failedupdatebasalprofile), Notification.URGENT);
|
||||
Notification notification = new Notification(Notification.FAILED_UDPATE_PROFILE, MainApp.gs(R.string.failedupdatebasalprofile), Notification.URGENT);
|
||||
MainApp.bus().post(new EventNewNotification(notification));
|
||||
result.comment = MainApp.gs(R.string.failedupdatebasalprofile);
|
||||
return result;
|
||||
} else {
|
||||
MainApp.bus().post(new EventDismissNotification(Notification.PROFILE_NOT_SET_NOT_INITIALIZED));
|
||||
MainApp.bus().post(new EventDismissNotification(Notification.FAILED_UDPATE_PROFILE));
|
||||
Notification notification = new Notification(Notification.PROFILE_SET_OK,
|
||||
MainApp.gs(R.string.profile_set_ok), Notification.INFO, 60);
|
||||
Notification notification = new Notification(Notification.PROFILE_SET_OK, MainApp.gs(R.string.profile_set_ok), Notification.INFO, 60);
|
||||
MainApp.bus().post(new EventNewNotification(notification));
|
||||
result.success = true;
|
||||
result.enacted = true;
|
||||
|
@ -387,7 +345,6 @@ public class DanaRSPlugin extends PluginBase implements PumpInterface, DanaRInte
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isThisProfileSet(Profile profile) {
|
||||
if (!isInitialized())
|
||||
|
@ -399,9 +356,8 @@ public class DanaRSPlugin extends PluginBase implements PumpInterface, DanaRInte
|
|||
int basalIncrement = pump.basal48Enable ? 30 * 60 : 60 * 60;
|
||||
for (int h = 0; h < basalValues; h++) {
|
||||
Double pumpValue = pump.pumpProfiles[pump.activeProfile][h];
|
||||
Double profileValue = profile.getBasalTimeFromMidnight((Integer)(h * basalIncrement));
|
||||
if (profileValue == null)
|
||||
return true;
|
||||
Double profileValue = profile.getBasalTimeFromMidnight((Integer) (h * basalIncrement));
|
||||
if (profileValue == null) return true;
|
||||
if (Math.abs(pumpValue - profileValue) > getPumpDescription().basalStep) {
|
||||
if (L.isEnabled(L.PUMP))
|
||||
log.debug("Diff found. Hour: " + h + " Pump: " + pumpValue + " Profile: " + profileValue);
|
||||
|
@ -411,35 +367,25 @@ public class DanaRSPlugin extends PluginBase implements PumpInterface, DanaRInte
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public long lastDataTime() {
|
||||
return DanaRPump.getInstance().lastConnection;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public double getBaseBasalRate() {
|
||||
return DanaRPump.getInstance().currentBasal;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getReservoirLevel() { return DanaRPump.getInstance().reservoirRemainingUnits; }
|
||||
|
||||
@Override
|
||||
public double getReservoirLevel() {
|
||||
return DanaRPump.getInstance().reservoirRemainingUnits;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getBatteryLevel() {
|
||||
return DanaRPump.getInstance().batteryRemaining;
|
||||
}
|
||||
|
||||
public int getBatteryLevel() { return DanaRPump.getInstance().batteryRemaining; }
|
||||
|
||||
@Override
|
||||
public synchronized PumpEnactResult deliverTreatment(DetailedBolusInfo detailedBolusInfo) {
|
||||
detailedBolusInfo.insulin = MainApp.getConstraintChecker()
|
||||
.applyBolusConstraints(new Constraint<>(detailedBolusInfo.insulin)).value();
|
||||
detailedBolusInfo.insulin = MainApp.getConstraintChecker().applyBolusConstraints(new Constraint<>(detailedBolusInfo.insulin)).value();
|
||||
if (detailedBolusInfo.insulin > 0 || detailedBolusInfo.carbs > 0) {
|
||||
int preferencesSpeed = SP.getInt(R.string.key_danars_bolusspeed, 0);
|
||||
int speed = 12;
|
||||
|
@ -456,14 +402,13 @@ public class DanaRSPlugin extends PluginBase implements PumpInterface, DanaRInte
|
|||
}
|
||||
// RS stores end time for bolus, we need to adjust time
|
||||
// default delivery speed is 12 sec/U
|
||||
detailedBolusInfo.date = DateUtil.now() + (long)(speed * detailedBolusInfo.insulin * 1000);
|
||||
detailedBolusInfo.date = DateUtil.now() + (long) (speed * detailedBolusInfo.insulin * 1000);
|
||||
// clean carbs to prevent counting them as twice because they will picked up as another record
|
||||
// I don't think it's necessary to copy DetailedBolusInfo right now for carbs records
|
||||
double carbs = detailedBolusInfo.carbs;
|
||||
detailedBolusInfo.carbs = 0;
|
||||
int carbTime = detailedBolusInfo.carbTime;
|
||||
if (carbTime == 0)
|
||||
carbTime--; // better set 1 min back to prevents clash with insulin
|
||||
if (carbTime == 0) carbTime--; // better set 1 min back to prevents clash with insulin
|
||||
detailedBolusInfo.carbTime = 0;
|
||||
|
||||
DetailedBolusInfoStorage.add(detailedBolusInfo); // will be picked up on reading history
|
||||
|
@ -472,17 +417,15 @@ public class DanaRSPlugin extends PluginBase implements PumpInterface, DanaRInte
|
|||
t.isSMB = detailedBolusInfo.isSMB;
|
||||
boolean connectionOK = false;
|
||||
if (detailedBolusInfo.insulin > 0 || carbs > 0)
|
||||
connectionOK = danaRSService.bolus(detailedBolusInfo.insulin, (int)carbs,
|
||||
DateUtil.now() + T.mins(carbTime).msecs(), t);
|
||||
connectionOK = danaRSService.bolus(detailedBolusInfo.insulin, (int) carbs, DateUtil.now() + T.mins(carbTime).msecs(), t);
|
||||
PumpEnactResult result = new PumpEnactResult();
|
||||
result.success = connectionOK
|
||||
&& Math.abs(detailedBolusInfo.insulin - t.insulin) < pumpDescription.bolusStep;
|
||||
result.success = connectionOK && Math.abs(detailedBolusInfo.insulin - t.insulin) < pumpDescription.bolusStep;
|
||||
result.bolusDelivered = t.insulin;
|
||||
result.carbsDelivered = detailedBolusInfo.carbs;
|
||||
if (!result.success) {
|
||||
String error = "" + DanaRS_Packet_Bolus_Set_Step_Bolus_Start.errorCode;
|
||||
switch (DanaRS_Packet_Bolus_Set_Step_Bolus_Start.errorCode) {
|
||||
// 4 reported as max bolus violation. Check later
|
||||
// 4 reported as max bolus violation. Check later
|
||||
case 0x10:
|
||||
error = MainApp.gs(R.string.maxbolusviolation);
|
||||
break;
|
||||
|
@ -496,13 +439,11 @@ public class DanaRSPlugin extends PluginBase implements PumpInterface, DanaRInte
|
|||
error = MainApp.gs(R.string.insulinlimitviolation);
|
||||
break;
|
||||
}
|
||||
result.comment = String.format(MainApp.gs(R.string.boluserrorcode), detailedBolusInfo.insulin,
|
||||
t.insulin, error);
|
||||
result.comment = String.format(MainApp.gs(R.string.boluserrorcode), detailedBolusInfo.insulin, t.insulin, error);
|
||||
} else
|
||||
result.comment = MainApp.gs(R.string.virtualpump_resultok);
|
||||
if (L.isEnabled(L.PUMP))
|
||||
log.debug("deliverTreatment: OK. Asked: " + detailedBolusInfo.insulin + " Delivered: "
|
||||
+ result.bolusDelivered);
|
||||
log.debug("deliverTreatment: OK. Asked: " + detailedBolusInfo.insulin + " Delivered: " + result.bolusDelivered);
|
||||
return result;
|
||||
} else {
|
||||
PumpEnactResult result = new PumpEnactResult();
|
||||
|
@ -515,7 +456,6 @@ public class DanaRSPlugin extends PluginBase implements PumpInterface, DanaRInte
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void stopBolusDelivering() {
|
||||
if (danaRSService == null) {
|
||||
|
@ -525,22 +465,19 @@ public class DanaRSPlugin extends PluginBase implements PumpInterface, DanaRInte
|
|||
danaRSService.bolusStop();
|
||||
}
|
||||
|
||||
|
||||
// This is called from APS
|
||||
@Override
|
||||
public synchronized PumpEnactResult setTempBasalAbsolute(Double absoluteRate, Integer durationInMinutes,
|
||||
Profile profile, boolean enforceNew) {
|
||||
public synchronized PumpEnactResult setTempBasalAbsolute(Double absoluteRate, Integer durationInMinutes, Profile profile, boolean enforceNew) {
|
||||
// Recheck pump status if older than 30 min
|
||||
|
||||
// This should not be needed while using queue because connection should be done before calling this
|
||||
// if (pump.lastConnection.getTime() + 30 * 60 * 1000L < System.currentTimeMillis()) {
|
||||
// connect("setTempBasalAbsolute old data");
|
||||
// }
|
||||
//This should not be needed while using queue because connection should be done before calling this
|
||||
//if (pump.lastConnection.getTime() + 30 * 60 * 1000L < System.currentTimeMillis()) {
|
||||
// connect("setTempBasalAbsolute old data");
|
||||
//}
|
||||
|
||||
PumpEnactResult result = new PumpEnactResult();
|
||||
|
||||
absoluteRate = MainApp.getConstraintChecker().applyBasalConstraints(new Constraint<>(absoluteRate), profile)
|
||||
.value();
|
||||
absoluteRate = MainApp.getConstraintChecker().applyBasalConstraints(new Constraint<>(absoluteRate), profile).value();
|
||||
|
||||
final boolean doTempOff = getBaseBasalRate() - absoluteRate == 0d;
|
||||
final boolean doLowTemp = absoluteRate < getBaseBasalRate();
|
||||
|
@ -565,15 +502,12 @@ public class DanaRSPlugin extends PluginBase implements PumpInterface, DanaRInte
|
|||
|
||||
if (doLowTemp || doHighTemp) {
|
||||
Integer percentRate = Double.valueOf(absoluteRate / getBaseBasalRate() * 100).intValue();
|
||||
if (percentRate < 100)
|
||||
percentRate = Round.ceilTo((double)percentRate, 10d).intValue();
|
||||
else
|
||||
percentRate = Round.floorTo((double)percentRate, 10d).intValue();
|
||||
if (percentRate < 100) percentRate = Round.ceilTo((double) percentRate, 10d).intValue();
|
||||
else percentRate = Round.floorTo((double) percentRate, 10d).intValue();
|
||||
if (percentRate > 500) // Special high temp 500/15min
|
||||
percentRate = 500;
|
||||
// Check if some temp is already in progress
|
||||
TemporaryBasal activeTemp = TreatmentsPlugin.getPlugin()
|
||||
.getTempBasalFromHistory(System.currentTimeMillis());
|
||||
TemporaryBasal activeTemp = TreatmentsPlugin.getPlugin().getTempBasalFromHistory(System.currentTimeMillis());
|
||||
if (activeTemp != null) {
|
||||
if (L.isEnabled(L.PUMP))
|
||||
log.debug("setTempBasalAbsolute: currently running: " + activeTemp.toString());
|
||||
|
@ -594,8 +528,7 @@ public class DanaRSPlugin extends PluginBase implements PumpInterface, DanaRInte
|
|||
}
|
||||
// Convert duration from minutes to hours
|
||||
if (L.isEnabled(L.PUMP))
|
||||
log.debug("setTempBasalAbsolute: Setting temp basal " + percentRate + "% for " + durationInMinutes
|
||||
+ " mins (doLowTemp || doHighTemp)");
|
||||
log.debug("setTempBasalAbsolute: Setting temp basal " + percentRate + "% for " + durationInMinutes + " mins (doLowTemp || doHighTemp)");
|
||||
if (percentRate == 0 && durationInMinutes > 30) {
|
||||
result = setTempBasalPercent(percentRate, durationInMinutes, profile, false);
|
||||
} else {
|
||||
|
@ -617,14 +550,11 @@ public class DanaRSPlugin extends PluginBase implements PumpInterface, DanaRInte
|
|||
return result;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public synchronized PumpEnactResult setTempBasalPercent(Integer percent, Integer durationInMinutes,
|
||||
Profile profile, boolean enforceNew) {
|
||||
public synchronized PumpEnactResult setTempBasalPercent(Integer percent, Integer durationInMinutes, Profile profile, boolean enforceNew) {
|
||||
DanaRPump pump = DanaRPump.getInstance();
|
||||
PumpEnactResult result = new PumpEnactResult();
|
||||
percent = MainApp.getConstraintChecker().applyBasalPercentConstraints(new Constraint<>(percent), profile)
|
||||
.value();
|
||||
percent = MainApp.getConstraintChecker().applyBasalPercentConstraints(new Constraint<>(percent), profile).value();
|
||||
if (percent < 0) {
|
||||
result.isTempCancel = false;
|
||||
result.enacted = false;
|
||||
|
@ -675,7 +605,6 @@ public class DanaRSPlugin extends PluginBase implements PumpInterface, DanaRInte
|
|||
return result;
|
||||
}
|
||||
|
||||
|
||||
private synchronized PumpEnactResult setHighTempBasalPercent(Integer percent) {
|
||||
DanaRPump pump = DanaRPump.getInstance();
|
||||
PumpEnactResult result = new PumpEnactResult();
|
||||
|
@ -699,7 +628,6 @@ public class DanaRSPlugin extends PluginBase implements PumpInterface, DanaRInte
|
|||
return result;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public synchronized PumpEnactResult setExtendedBolus(Double insulin, Integer durationInMinutes) {
|
||||
DanaRPump pump = DanaRPump.getInstance();
|
||||
|
@ -718,13 +646,11 @@ public class DanaRSPlugin extends PluginBase implements PumpInterface, DanaRInte
|
|||
result.isPercent = false;
|
||||
result.isTempCancel = false;
|
||||
if (L.isEnabled(L.PUMP))
|
||||
log.debug("setExtendedBolus: Correct extended bolus already set. Current: " + pump.extendedBolusAmount
|
||||
+ " Asked: " + insulin);
|
||||
log.debug("setExtendedBolus: Correct extended bolus already set. Current: " + pump.extendedBolusAmount + " Asked: " + insulin);
|
||||
return result;
|
||||
}
|
||||
boolean connectionOK = danaRSService.extendedBolus(insulin, durationInHalfHours);
|
||||
if (connectionOK && pump.isExtendedInProgress
|
||||
&& Math.abs(pump.extendedBolusAbsoluteRate - insulin) < getPumpDescription().extendedBolusStep) {
|
||||
if (connectionOK && pump.isExtendedInProgress && Math.abs(pump.extendedBolusAbsoluteRate - insulin) < getPumpDescription().extendedBolusStep) {
|
||||
result.enacted = true;
|
||||
result.success = true;
|
||||
result.comment = MainApp.gs(R.string.virtualpump_resultok);
|
||||
|
@ -744,7 +670,6 @@ public class DanaRSPlugin extends PluginBase implements PumpInterface, DanaRInte
|
|||
return result;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public synchronized PumpEnactResult cancelTempBasal(boolean force) {
|
||||
PumpEnactResult result = new PumpEnactResult();
|
||||
|
@ -770,7 +695,6 @@ public class DanaRSPlugin extends PluginBase implements PumpInterface, DanaRInte
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public synchronized PumpEnactResult cancelExtendedBolus() {
|
||||
PumpEnactResult result = new PumpEnactResult();
|
||||
|
@ -794,7 +718,6 @@ public class DanaRSPlugin extends PluginBase implements PumpInterface, DanaRInte
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public JSONObject getJSONStatus(Profile profile, String profileName) {
|
||||
DanaRPump pump = DanaRPump.getInstance();
|
||||
|
@ -837,7 +760,7 @@ public class DanaRSPlugin extends PluginBase implements PumpInterface, DanaRInte
|
|||
pumpjson.put("battery", battery);
|
||||
pumpjson.put("status", status);
|
||||
pumpjson.put("extended", extended);
|
||||
pumpjson.put("reservoir", (int)pump.reservoirRemainingUnits);
|
||||
pumpjson.put("reservoir", (int) pump.reservoirRemainingUnits);
|
||||
pumpjson.put("clock", DateUtil.toISOString(now));
|
||||
} catch (JSONException e) {
|
||||
log.error("Unhandled exception", e);
|
||||
|
@ -845,45 +768,38 @@ public class DanaRSPlugin extends PluginBase implements PumpInterface, DanaRInte
|
|||
return pumpjson;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String deviceID() {
|
||||
return DanaRPump.getInstance().serialNumber;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public PumpDescription getPumpDescription() {
|
||||
return pumpDescription;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String shortStatus(boolean veryShort) {
|
||||
DanaRPump pump = DanaRPump.getInstance();
|
||||
String ret = "";
|
||||
if (pump.lastConnection != 0) {
|
||||
Long agoMsec = System.currentTimeMillis() - pump.lastConnection;
|
||||
int agoMin = (int)(agoMsec / 60d / 1000d);
|
||||
int agoMin = (int) (agoMsec / 60d / 1000d);
|
||||
ret += "LastConn: " + agoMin + " minago\n";
|
||||
}
|
||||
if (pump.lastBolusTime != 0) {
|
||||
ret += "LastBolus: " + DecimalFormatter.to2Decimal(pump.lastBolusAmount) + "U @"
|
||||
+ android.text.format.DateFormat.format("HH:mm", pump.lastBolusTime) + "\n";
|
||||
ret += "LastBolus: " + DecimalFormatter.to2Decimal(pump.lastBolusAmount) + "U @" + android.text.format.DateFormat.format("HH:mm", pump.lastBolusTime) + "\n";
|
||||
}
|
||||
TemporaryBasal activeTemp = TreatmentsPlugin.getPlugin()
|
||||
.getRealTempBasalFromHistory(System.currentTimeMillis());
|
||||
TemporaryBasal activeTemp = TreatmentsPlugin.getPlugin().getRealTempBasalFromHistory(System.currentTimeMillis());
|
||||
if (activeTemp != null) {
|
||||
ret += "Temp: " + activeTemp.toStringFull() + "\n";
|
||||
}
|
||||
ExtendedBolus activeExtendedBolus = TreatmentsPlugin.getPlugin().getExtendedBolusFromHistory(
|
||||
System.currentTimeMillis());
|
||||
ExtendedBolus activeExtendedBolus = TreatmentsPlugin.getPlugin().getExtendedBolusFromHistory(System.currentTimeMillis());
|
||||
if (activeExtendedBolus != null) {
|
||||
ret += "Extended: " + activeExtendedBolus.toString() + "\n";
|
||||
}
|
||||
if (!veryShort) {
|
||||
ret += "TDD: " + DecimalFormatter.to0Decimal(pump.dailyTotalUnits) + " / " + pump.maxDailyTotalUnits
|
||||
+ " U\n";
|
||||
ret += "TDD: " + DecimalFormatter.to0Decimal(pump.dailyTotalUnits) + " / " + pump.maxDailyTotalUnits + " U\n";
|
||||
}
|
||||
ret += "IOB: " + pump.iob + "U\n";
|
||||
ret += "Reserv: " + DecimalFormatter.to0Decimal(pump.reservoirRemainingUnits) + "U\n";
|
||||
|
@ -891,27 +807,29 @@ public class DanaRSPlugin extends PluginBase implements PumpInterface, DanaRInte
|
|||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isFakingTempsByExtendedBoluses() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public PumpEnactResult loadTDDs() {
|
||||
return loadHistory(RecordTypes.RECORD_TYPE_DAILY);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<CustomAction> getCustomActions() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void executeCustomAction(CustomActionType customActionType) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public PumpEnactResult executeCustomAction(CustomActionType customActionType) {
|
||||
return null;
|
||||
public boolean canHandleDST() {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -19,9 +19,11 @@ import info.nightscout.androidaps.db.TemporaryBasal;
|
|||
import info.nightscout.androidaps.events.EventAppExit;
|
||||
import info.nightscout.androidaps.interfaces.Constraint;
|
||||
import info.nightscout.androidaps.logging.L;
|
||||
|
||||
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderFragment;
|
||||
import info.nightscout.androidaps.plugins.configBuilder.DetailedBolusInfoStorage;
|
||||
import info.nightscout.androidaps.plugins.pump.common.defs.PumpType;
|
||||
|
||||
import info.nightscout.androidaps.plugins.pump.danaR.AbstractDanaRPlugin;
|
||||
import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump;
|
||||
import info.nightscout.androidaps.plugins.pump.danaR.comm.MsgBolusStartWithSpeed;
|
||||
|
|
|
@ -298,4 +298,4 @@ public class LocalInsightFragment extends SubscriberFragment implements View.OnC
|
|||
statusItems.add(getStatusItem(label, MainApp.gs(R.string.eb_formatter, activeBolus.getRemainingAmount(), activeBolus.getInitialAmount(), activeBolus.getRemainingDuration())));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load diff
|
@ -1,12 +1,12 @@
|
|||
package info.nightscout.androidaps.plugins.pump.mdi;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import info.nightscout.androidaps.BuildConfig;
|
||||
import info.nightscout.androidaps.MainApp;
|
||||
import info.nightscout.androidaps.R;
|
||||
|
@ -24,16 +24,15 @@ import info.nightscout.androidaps.plugins.general.actions.defs.CustomActionType;
|
|||
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin;
|
||||
import info.nightscout.androidaps.utils.DateUtil;
|
||||
|
||||
|
||||
/**
|
||||
* Created by mike on 05.08.2016.
|
||||
*/
|
||||
public class MDIPlugin extends PluginBase implements PumpInterface {
|
||||
|
||||
private static Logger log = LoggerFactory.getLogger(MDIPlugin.class);
|
||||
|
||||
private static MDIPlugin plugin = null;
|
||||
|
||||
|
||||
public static MDIPlugin getPlugin() {
|
||||
if (plugin == null)
|
||||
plugin = new MDIPlugin();
|
||||
|
@ -42,10 +41,12 @@ public class MDIPlugin extends PluginBase implements PumpInterface {
|
|||
|
||||
private PumpDescription pumpDescription = new PumpDescription();
|
||||
|
||||
|
||||
private MDIPlugin() {
|
||||
super(new PluginDescription().mainType(PluginType.PUMP).pluginName(R.string.mdi)
|
||||
.description(R.string.description_pump_mdi));
|
||||
super(new PluginDescription()
|
||||
.mainType(PluginType.PUMP)
|
||||
.pluginName(R.string.mdi)
|
||||
.description(R.string.description_pump_mdi)
|
||||
);
|
||||
pumpDescription.isBolusCapable = true;
|
||||
pumpDescription.bolusStep = 0.5d;
|
||||
|
||||
|
@ -55,82 +56,68 @@ public class MDIPlugin extends PluginBase implements PumpInterface {
|
|||
pumpDescription.isRefillingCapable = false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isFakingTempsByExtendedBoluses() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public PumpEnactResult loadTDDs() {
|
||||
// no result, could read DB in the future?
|
||||
//no result, could read DB in the future?
|
||||
PumpEnactResult result = new PumpEnactResult();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isInitialized() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isSuspended() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isBusy() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isConnected() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isConnecting() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isHandshakeInProgress() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void finishHandshaking() {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void connect(String reason) {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void disconnect(String reason) {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void stopConnecting() {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void getPumpStatus() {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public PumpEnactResult setNewBasalProfile(Profile profile) {
|
||||
// Do nothing here. we are using ConfigBuilderPlugin.getPlugin().getActiveProfile().getProfile();
|
||||
|
@ -139,36 +126,26 @@ public class MDIPlugin extends PluginBase implements PumpInterface {
|
|||
return result;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isThisProfileSet(Profile profile) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public long lastDataTime() {
|
||||
return System.currentTimeMillis();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public double getBaseBasalRate() {
|
||||
return 0d;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getReservoirLevel() { return -1; }
|
||||
|
||||
@Override
|
||||
public double getReservoirLevel() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getBatteryLevel() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
public int getBatteryLevel() { return -1; }
|
||||
|
||||
@Override
|
||||
public PumpEnactResult deliverTreatment(DetailedBolusInfo detailedBolusInfo) {
|
||||
|
@ -181,15 +158,12 @@ public class MDIPlugin extends PluginBase implements PumpInterface {
|
|||
return result;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void stopBolusDelivering() {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public PumpEnactResult setTempBasalAbsolute(Double absoluteRate, Integer durationInMinutes, Profile profile,
|
||||
boolean enforceNew) {
|
||||
public PumpEnactResult setTempBasalAbsolute(Double absoluteRate, Integer durationInMinutes, Profile profile, boolean enforceNew) {
|
||||
PumpEnactResult result = new PumpEnactResult();
|
||||
result.success = false;
|
||||
result.comment = MainApp.gs(R.string.pumperror);
|
||||
|
@ -198,10 +172,8 @@ public class MDIPlugin extends PluginBase implements PumpInterface {
|
|||
return result;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public PumpEnactResult setTempBasalPercent(Integer percent, Integer durationInMinutes, Profile profile,
|
||||
boolean enforceNew) {
|
||||
public PumpEnactResult setTempBasalPercent(Integer percent, Integer durationInMinutes, Profile profile, boolean enforceNew) {
|
||||
PumpEnactResult result = new PumpEnactResult();
|
||||
result.success = false;
|
||||
result.comment = MainApp.gs(R.string.pumperror);
|
||||
|
@ -210,7 +182,6 @@ public class MDIPlugin extends PluginBase implements PumpInterface {
|
|||
return result;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public PumpEnactResult setExtendedBolus(Double insulin, Integer durationInMinutes) {
|
||||
PumpEnactResult result = new PumpEnactResult();
|
||||
|
@ -221,7 +192,6 @@ public class MDIPlugin extends PluginBase implements PumpInterface {
|
|||
return result;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public PumpEnactResult cancelTempBasal(boolean force) {
|
||||
PumpEnactResult result = new PumpEnactResult();
|
||||
|
@ -232,7 +202,6 @@ public class MDIPlugin extends PluginBase implements PumpInterface {
|
|||
return result;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public PumpEnactResult cancelExtendedBolus() {
|
||||
PumpEnactResult result = new PumpEnactResult();
|
||||
|
@ -243,7 +212,6 @@ public class MDIPlugin extends PluginBase implements PumpInterface {
|
|||
return result;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public JSONObject getJSONStatus(Profile profile, String profileName) {
|
||||
long now = System.currentTimeMillis();
|
||||
|
@ -267,33 +235,34 @@ public class MDIPlugin extends PluginBase implements PumpInterface {
|
|||
return pump;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String deviceID() {
|
||||
return "MDI";
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public PumpDescription getPumpDescription() {
|
||||
return pumpDescription;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String shortStatus(boolean veryShort) {
|
||||
return deviceID();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<CustomAction> getCustomActions() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void executeCustomAction(CustomActionType customActionType) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public PumpEnactResult executeCustomAction(CustomActionType customActionType) {
|
||||
return null;
|
||||
public boolean canHandleDST() {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -20,11 +20,14 @@ import info.nightscout.androidaps.R;
|
|||
import info.nightscout.androidaps.db.ExtendedBolus;
|
||||
import info.nightscout.androidaps.db.TemporaryBasal;
|
||||
import info.nightscout.androidaps.plugins.common.SubscriberFragment;
|
||||
import info.nightscout.androidaps.plugins.general.actions.defs.CustomAction;
|
||||
import info.nightscout.androidaps.plugins.general.actions.defs.CustomActionType;
|
||||
import info.nightscout.androidaps.plugins.pump.common.defs.PumpType;
|
||||
import info.nightscout.androidaps.plugins.pump.virtual.events.EventVirtualPumpUpdateGui;
|
||||
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin;
|
||||
import info.nightscout.androidaps.utils.FabricPrivacy;
|
||||
|
||||
|
||||
public class VirtualPumpFragment extends SubscriberFragment {
|
||||
private static Logger log = LoggerFactory.getLogger(VirtualPumpFragment.class);
|
||||
|
||||
|
@ -119,4 +122,6 @@ public class VirtualPumpFragment extends SubscriberFragment {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
package info.nightscout.androidaps.plugins.pump.virtual;
|
||||
|
||||
import java.util.List;
|
||||
import android.os.SystemClock;
|
||||
|
||||
import com.squareup.otto.Subscribe;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import android.os.SystemClock;
|
||||
|
||||
import com.squareup.otto.Subscribe;
|
||||
import java.util.List;
|
||||
|
||||
import info.nightscout.androidaps.BuildConfig;
|
||||
import info.nightscout.androidaps.Config;
|
||||
|
@ -41,11 +41,11 @@ import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin;
|
|||
import info.nightscout.androidaps.utils.DateUtil;
|
||||
import info.nightscout.androidaps.utils.SP;
|
||||
|
||||
|
||||
/**
|
||||
* Created by mike on 05.08.2016.
|
||||
*/
|
||||
public class VirtualPumpPlugin extends PluginBase implements PumpInterface {
|
||||
|
||||
private Logger log = LoggerFactory.getLogger(L.PUMP);
|
||||
|
||||
Integer batteryPercent = 50;
|
||||
|
@ -56,12 +56,16 @@ public class VirtualPumpPlugin extends PluginBase implements PumpInterface {
|
|||
private long lastDataTime = 0;
|
||||
private PumpDescription pumpDescription = new PumpDescription();
|
||||
|
||||
|
||||
public VirtualPumpPlugin() {
|
||||
super(new PluginDescription().mainType(PluginType.PUMP).fragmentClass(VirtualPumpFragment.class.getName())
|
||||
.pluginName(R.string.virtualpump).shortName(R.string.virtualpump_shortname)
|
||||
.preferencesId(R.xml.pref_virtualpump).neverVisible(Config.NSCLIENT)
|
||||
.description(R.string.description_pump_virtual));
|
||||
super(new PluginDescription()
|
||||
.mainType(PluginType.PUMP)
|
||||
.fragmentClass(VirtualPumpFragment.class.getName())
|
||||
.pluginName(R.string.virtualpump)
|
||||
.shortName(R.string.virtualpump_shortname)
|
||||
.preferencesId(R.xml.pref_virtualpump)
|
||||
.neverVisible(Config.NSCLIENT)
|
||||
.description(R.string.description_pump_virtual)
|
||||
);
|
||||
pumpDescription.isBolusCapable = true;
|
||||
pumpDescription.bolusStep = 0.1d;
|
||||
|
||||
|
@ -81,6 +85,7 @@ public class VirtualPumpPlugin extends PluginBase implements PumpInterface {
|
|||
pumpDescription.tempDurationStep30mAllowed = true;
|
||||
pumpDescription.tempMaxDuration = 24 * 60;
|
||||
|
||||
|
||||
pumpDescription.isSetBasalProfileCapable = true;
|
||||
pumpDescription.basalStep = 0.01d;
|
||||
pumpDescription.basalMinimumRate = 0.01d;
|
||||
|
@ -91,7 +96,6 @@ public class VirtualPumpPlugin extends PluginBase implements PumpInterface {
|
|||
pumpDescription.is30minBasalRatesCapable = true;
|
||||
}
|
||||
|
||||
|
||||
public static VirtualPumpPlugin getPlugin() {
|
||||
if (plugin == null)
|
||||
plugin = new VirtualPumpPlugin();
|
||||
|
@ -99,23 +103,19 @@ public class VirtualPumpPlugin extends PluginBase implements PumpInterface {
|
|||
return plugin;
|
||||
}
|
||||
|
||||
|
||||
private void loadFakingStatus() {
|
||||
fromNSAreCommingFakedExtendedBoluses = SP.getBoolean(R.string.key_fromNSAreCommingFakedExtendedBoluses, false);
|
||||
}
|
||||
|
||||
|
||||
public boolean getFakingStatus() {
|
||||
return fromNSAreCommingFakedExtendedBoluses;
|
||||
}
|
||||
|
||||
|
||||
public void setFakingStatus(boolean newStatus) {
|
||||
fromNSAreCommingFakedExtendedBoluses = newStatus;
|
||||
SP.putBoolean(R.string.key_fromNSAreCommingFakedExtendedBoluses, fromNSAreCommingFakedExtendedBoluses);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onStart() {
|
||||
super.onStart();
|
||||
|
@ -123,74 +123,72 @@ public class VirtualPumpPlugin extends PluginBase implements PumpInterface {
|
|||
refreshConfiguration();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
MainApp.bus().unregister(this);
|
||||
}
|
||||
|
||||
|
||||
@Subscribe
|
||||
public void onStatusEvent(final EventPreferenceChange s) {
|
||||
if (s.isChanged(R.string.key_virtualpump_type))
|
||||
refreshConfiguration();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isFakingTempsByExtendedBoluses() {
|
||||
return (Config.NSCLIENT) && fromNSAreCommingFakedExtendedBoluses;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public PumpEnactResult loadTDDs() {
|
||||
// no result, could read DB in the future?
|
||||
//no result, could read DB in the future?
|
||||
return new PumpEnactResult();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CustomAction> getCustomActions() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void executeCustomAction(CustomActionType customActionType) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInitialized() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isSuspended() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isBusy() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isConnected() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isConnecting() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isHandshakeInProgress() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void finishHandshaking() {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void connect(String reason) {
|
||||
if (!Config.NSCLIENT)
|
||||
|
@ -198,48 +196,40 @@ public class VirtualPumpPlugin extends PluginBase implements PumpInterface {
|
|||
lastDataTime = System.currentTimeMillis();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void disconnect(String reason) {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void stopConnecting() {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void getPumpStatus() {
|
||||
lastDataTime = System.currentTimeMillis();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public PumpEnactResult setNewBasalProfile(Profile profile) {
|
||||
lastDataTime = System.currentTimeMillis();
|
||||
// Do nothing here. we are using ConfigBuilderPlugin.getPlugin().getActiveProfile().getProfile();
|
||||
PumpEnactResult result = new PumpEnactResult();
|
||||
result.success = true;
|
||||
Notification notification = new Notification(Notification.PROFILE_SET_OK, MainApp.gs(R.string.profile_set_ok),
|
||||
Notification.INFO, 60);
|
||||
Notification notification = new Notification(Notification.PROFILE_SET_OK, MainApp.gs(R.string.profile_set_ok), Notification.INFO, 60);
|
||||
MainApp.bus().post(new EventNewNotification(notification));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isThisProfileSet(Profile profile) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public long lastDataTime() {
|
||||
return lastDataTime;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public double getBaseBasalRate() {
|
||||
Profile profile = ProfileFunctions.getInstance().getProfile();
|
||||
|
@ -251,16 +241,10 @@ public class VirtualPumpPlugin extends PluginBase implements PumpInterface {
|
|||
|
||||
|
||||
@Override
|
||||
public double getReservoirLevel() {
|
||||
return reservoirInUnits;
|
||||
}
|
||||
|
||||
public double getReservoirLevel() { return reservoirInUnits; }
|
||||
|
||||
@Override
|
||||
public int getBatteryLevel() {
|
||||
return batteryPercent;
|
||||
}
|
||||
|
||||
public int getBatteryLevel() { return batteryPercent; }
|
||||
|
||||
@Override
|
||||
public PumpEnactResult deliverTreatment(DetailedBolusInfo detailedBolusInfo) {
|
||||
|
@ -278,7 +262,7 @@ public class VirtualPumpPlugin extends PluginBase implements PumpInterface {
|
|||
SystemClock.sleep(200);
|
||||
EventOverviewBolusProgress bolusingEvent = EventOverviewBolusProgress.getInstance();
|
||||
bolusingEvent.status = String.format(MainApp.gs(R.string.bolusdelivering), delivering);
|
||||
bolusingEvent.percent = Math.min((int)(delivering / detailedBolusInfo.insulin * 100), 100);
|
||||
bolusingEvent.percent = Math.min((int) (delivering / detailedBolusInfo.insulin * 100), 100);
|
||||
MainApp.bus().post(bolusingEvent);
|
||||
delivering += 0.1d;
|
||||
}
|
||||
|
@ -289,26 +273,25 @@ public class VirtualPumpPlugin extends PluginBase implements PumpInterface {
|
|||
MainApp.bus().post(bolusingEvent);
|
||||
SystemClock.sleep(1000);
|
||||
if (L.isEnabled(L.PUMPCOMM))
|
||||
log.debug("Delivering treatment insulin: " + detailedBolusInfo.insulin + "U carbs: "
|
||||
+ detailedBolusInfo.carbs + "g " + result);
|
||||
log.debug("Delivering treatment insulin: " + detailedBolusInfo.insulin + "U carbs: " + detailedBolusInfo.carbs + "g " + result);
|
||||
MainApp.bus().post(new EventVirtualPumpUpdateGui());
|
||||
lastDataTime = System.currentTimeMillis();
|
||||
TreatmentsPlugin.getPlugin().addToHistoryTreatment(detailedBolusInfo, false);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void stopBolusDelivering() {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public PumpEnactResult setTempBasalAbsolute(Double absoluteRate, Integer durationInMinutes, Profile profile,
|
||||
boolean enforceNew) {
|
||||
public PumpEnactResult setTempBasalAbsolute(Double absoluteRate, Integer durationInMinutes, Profile profile, boolean enforceNew) {
|
||||
|
||||
TemporaryBasal tempBasal = new TemporaryBasal().date(System.currentTimeMillis()).absolute(absoluteRate)
|
||||
.duration(durationInMinutes).source(Source.USER);
|
||||
TemporaryBasal tempBasal = new TemporaryBasal()
|
||||
.date(System.currentTimeMillis())
|
||||
.absolute(absoluteRate)
|
||||
.duration(durationInMinutes)
|
||||
.source(Source.USER);
|
||||
PumpEnactResult result = new PumpEnactResult();
|
||||
result.success = true;
|
||||
result.enacted = true;
|
||||
|
@ -324,12 +307,13 @@ public class VirtualPumpPlugin extends PluginBase implements PumpInterface {
|
|||
return result;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public PumpEnactResult setTempBasalPercent(Integer percent, Integer durationInMinutes, Profile profile,
|
||||
boolean enforceNew) {
|
||||
TemporaryBasal tempBasal = new TemporaryBasal().date(System.currentTimeMillis()).percent(percent)
|
||||
.duration(durationInMinutes).source(Source.USER);
|
||||
public PumpEnactResult setTempBasalPercent(Integer percent, Integer durationInMinutes, Profile profile, boolean enforceNew) {
|
||||
TemporaryBasal tempBasal = new TemporaryBasal()
|
||||
.date(System.currentTimeMillis())
|
||||
.percent(percent)
|
||||
.duration(durationInMinutes)
|
||||
.source(Source.USER);
|
||||
PumpEnactResult result = new PumpEnactResult();
|
||||
result.success = true;
|
||||
result.enacted = true;
|
||||
|
@ -346,15 +330,17 @@ public class VirtualPumpPlugin extends PluginBase implements PumpInterface {
|
|||
return result;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public PumpEnactResult setExtendedBolus(Double insulin, Integer durationInMinutes) {
|
||||
PumpEnactResult result = cancelExtendedBolus();
|
||||
if (!result.success)
|
||||
return result;
|
||||
|
||||
ExtendedBolus extendedBolus = new ExtendedBolus().date(System.currentTimeMillis()).insulin(insulin)
|
||||
.durationInMinutes(durationInMinutes).source(Source.USER);
|
||||
ExtendedBolus extendedBolus = new ExtendedBolus()
|
||||
.date(System.currentTimeMillis())
|
||||
.insulin(insulin)
|
||||
.durationInMinutes(durationInMinutes)
|
||||
.source(Source.USER);
|
||||
result.success = true;
|
||||
result.enacted = true;
|
||||
result.bolusDelivered = insulin;
|
||||
|
@ -369,7 +355,6 @@ public class VirtualPumpPlugin extends PluginBase implements PumpInterface {
|
|||
return result;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public PumpEnactResult cancelTempBasal(boolean force) {
|
||||
PumpEnactResult result = new PumpEnactResult();
|
||||
|
@ -380,7 +365,7 @@ public class VirtualPumpPlugin extends PluginBase implements PumpInterface {
|
|||
result.enacted = true;
|
||||
TemporaryBasal tempStop = new TemporaryBasal().date(System.currentTimeMillis()).source(Source.USER);
|
||||
TreatmentsPlugin.getPlugin().addToHistoryTempBasal(tempStop);
|
||||
// tempBasal = null;
|
||||
//tempBasal = null;
|
||||
if (L.isEnabled(L.PUMPCOMM))
|
||||
log.debug("Canceling temp basal: " + result);
|
||||
MainApp.bus().post(new EventVirtualPumpUpdateGui());
|
||||
|
@ -389,7 +374,6 @@ public class VirtualPumpPlugin extends PluginBase implements PumpInterface {
|
|||
return result;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public PumpEnactResult cancelExtendedBolus() {
|
||||
PumpEnactResult result = new PumpEnactResult();
|
||||
|
@ -409,7 +393,6 @@ public class VirtualPumpPlugin extends PluginBase implements PumpInterface {
|
|||
return result;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public JSONObject getJSONStatus(Profile profile, String profileName) {
|
||||
long now = System.currentTimeMillis();
|
||||
|
@ -453,29 +436,30 @@ public class VirtualPumpPlugin extends PluginBase implements PumpInterface {
|
|||
return pump;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String deviceID() {
|
||||
return "VirtualPump";
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public PumpDescription getPumpDescription() {
|
||||
return pumpDescription;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String shortStatus(boolean veryShort) {
|
||||
return "Virtual Pump";
|
||||
}
|
||||
|
||||
|
||||
public PumpType getPumpType() {
|
||||
return pumpType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canHandleDST() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public void refreshConfiguration() {
|
||||
String pumptype = SP.getString(R.string.key_virtualpump_type, "Generic AAPS");
|
||||
|
@ -505,7 +489,7 @@ public class VirtualPumpPlugin extends PluginBase implements PumpInterface {
|
|||
|
||||
|
||||
@Override
|
||||
public PumpEnactResult executeCustomAction(CustomActionType customActionType) {
|
||||
public void executeCustomAction(CustomActionType customActionType) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,10 +21,10 @@ import info.nightscout.androidaps.Constants;
|
|||
import info.nightscout.androidaps.MainApp;
|
||||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.db.BgReading;
|
||||
import info.nightscout.androidaps.events.EventNewBG;
|
||||
import info.nightscout.androidaps.plugins.common.SubscriberFragment;
|
||||
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
|
||||
import info.nightscout.androidaps.plugins.general.nsclient.NSUpload;
|
||||
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventAutosensCalculationFinished;
|
||||
import info.nightscout.androidaps.utils.DateUtil;
|
||||
import info.nightscout.androidaps.utils.FabricPrivacy;
|
||||
import info.nightscout.androidaps.utils.T;
|
||||
|
@ -67,7 +67,7 @@ public class BGSourceFragment extends SubscriberFragment {
|
|||
}
|
||||
|
||||
@Subscribe
|
||||
public void onStatusEvent(final EventNewBG unused) {
|
||||
public void onStatusEvent(final EventAutosensCalculationFinished unused) {
|
||||
updateGUI();
|
||||
}
|
||||
|
||||
|
|
|
@ -28,12 +28,12 @@ import info.nightscout.androidaps.R;
|
|||
import info.nightscout.androidaps.data.Iob;
|
||||
import info.nightscout.androidaps.data.Profile;
|
||||
import info.nightscout.androidaps.db.Source;
|
||||
import info.nightscout.androidaps.events.EventNewBG;
|
||||
import info.nightscout.androidaps.events.EventTreatmentChange;
|
||||
import info.nightscout.androidaps.plugins.common.SubscriberFragment;
|
||||
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
|
||||
import info.nightscout.androidaps.plugins.general.nsclient.NSUpload;
|
||||
import info.nightscout.androidaps.plugins.general.nsclient.UploadQueue;
|
||||
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventAutosensCalculationFinished;
|
||||
import info.nightscout.androidaps.plugins.treatments.Treatment;
|
||||
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin;
|
||||
import info.nightscout.androidaps.plugins.treatments.dialogs.WizardInfoDialog;
|
||||
|
@ -266,7 +266,7 @@ public class TreatmentsBolusFragment extends SubscriberFragment implements View.
|
|||
}
|
||||
|
||||
@Subscribe
|
||||
public void onStatusEvent(final EventNewBG ev) {
|
||||
public void onStatusEvent(final EventAutosensCalculationFinished ev) {
|
||||
updateGUI();
|
||||
}
|
||||
|
||||
|
|
|
@ -25,14 +25,14 @@ import info.nightscout.androidaps.data.IobTotal;
|
|||
import info.nightscout.androidaps.db.ExtendedBolus;
|
||||
import info.nightscout.androidaps.db.Source;
|
||||
import info.nightscout.androidaps.events.EventExtendedBolusChange;
|
||||
import info.nightscout.androidaps.events.EventNewBG;
|
||||
import info.nightscout.androidaps.plugins.common.SubscriberFragment;
|
||||
import info.nightscout.androidaps.plugins.general.nsclient.NSUpload;
|
||||
import info.nightscout.androidaps.plugins.general.nsclient.UploadQueue;
|
||||
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventAutosensCalculationFinished;
|
||||
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;
|
||||
import info.nightscout.androidaps.plugins.general.nsclient.NSUpload;
|
||||
|
||||
|
||||
public class TreatmentsExtendedBolusesFragment extends SubscriberFragment {
|
||||
|
@ -186,7 +186,7 @@ public class TreatmentsExtendedBolusesFragment extends SubscriberFragment {
|
|||
}
|
||||
|
||||
@Subscribe
|
||||
public void onStatusEvent(final EventNewBG ev) {
|
||||
public void onStatusEvent(final EventAutosensCalculationFinished ev) {
|
||||
updateGUI();
|
||||
}
|
||||
|
||||
|
|
|
@ -25,16 +25,16 @@ import info.nightscout.androidaps.data.IobTotal;
|
|||
import info.nightscout.androidaps.data.Profile;
|
||||
import info.nightscout.androidaps.db.Source;
|
||||
import info.nightscout.androidaps.db.TemporaryBasal;
|
||||
import info.nightscout.androidaps.events.EventNewBG;
|
||||
import info.nightscout.androidaps.events.EventTempBasalChange;
|
||||
import info.nightscout.androidaps.plugins.common.SubscriberFragment;
|
||||
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
|
||||
import info.nightscout.androidaps.plugins.general.nsclient.NSUpload;
|
||||
import info.nightscout.androidaps.plugins.general.nsclient.UploadQueue;
|
||||
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventAutosensCalculationFinished;
|
||||
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;
|
||||
import info.nightscout.androidaps.plugins.general.nsclient.NSUpload;
|
||||
|
||||
|
||||
public class TreatmentsTemporaryBasalsFragment extends SubscriberFragment {
|
||||
|
@ -212,7 +212,7 @@ public class TreatmentsTemporaryBasalsFragment extends SubscriberFragment {
|
|||
}
|
||||
|
||||
@Subscribe
|
||||
public void onStatusEvent(final EventNewBG ignored) {
|
||||
public void onStatusEvent(final EventAutosensCalculationFinished ignored) {
|
||||
updateGUI();
|
||||
}
|
||||
|
||||
|
|
|
@ -182,4 +182,9 @@ public class DateUtil {
|
|||
public static long roundDateToSec(long date) {
|
||||
return date - date % 1000;
|
||||
}
|
||||
|
||||
public static boolean isCloseToNow(long date) {
|
||||
long diff = Math.abs(date - now());
|
||||
return diff < T.mins(2).msecs();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ import android.util.LongSparseArray;
|
|||
import java.util.Calendar;
|
||||
|
||||
public class MidnightTime {
|
||||
private static LongSparseArray times = new LongSparseArray();
|
||||
private static final LongSparseArray<Long> times = new LongSparseArray<>();
|
||||
|
||||
private static long hits = 0;
|
||||
private static long misses = 0;
|
||||
|
@ -20,20 +20,23 @@ public class MidnightTime {
|
|||
}
|
||||
|
||||
public static long calc(long time) {
|
||||
Long m = (Long) times.get(time);
|
||||
if (m != null) {
|
||||
++hits;
|
||||
return m;
|
||||
Long m;
|
||||
synchronized (times) {
|
||||
m = times.get(time);
|
||||
if (m != null) {
|
||||
++hits;
|
||||
return m;
|
||||
}
|
||||
Calendar c = Calendar.getInstance();
|
||||
c.setTimeInMillis(time);
|
||||
c.set(Calendar.HOUR_OF_DAY, 0);
|
||||
c.set(Calendar.MINUTE, 0);
|
||||
c.set(Calendar.SECOND, 0);
|
||||
c.set(Calendar.MILLISECOND, 0);
|
||||
m = c.getTimeInMillis();
|
||||
times.append(time, m);
|
||||
++misses;
|
||||
}
|
||||
Calendar c = Calendar.getInstance();
|
||||
c.setTimeInMillis(time);
|
||||
c.set(Calendar.HOUR_OF_DAY, 0);
|
||||
c.set(Calendar.MINUTE, 0);
|
||||
c.set(Calendar.SECOND, 0);
|
||||
c.set(Calendar.MILLISECOND, 0);
|
||||
m = c.getTimeInMillis();
|
||||
times.append(time, m);
|
||||
++misses;
|
||||
return m;
|
||||
}
|
||||
|
||||
|
|
|
@ -43,7 +43,6 @@ public class VersionChecker {
|
|||
if (inputStream != null) {
|
||||
String result = findLine(inputStream);
|
||||
if (result != null) {
|
||||
result = result.replace("version", "").replace("\"", "").replace("\\s+", "").trim();
|
||||
int compare = result.compareTo(BuildConfig.VERSION_NAME.replace("\"", ""));
|
||||
if (compare == 0) {
|
||||
log.debug("Version equal to master");
|
||||
|
@ -75,14 +74,14 @@ public class VersionChecker {
|
|||
private static String findLine(InputStream inputStream) throws IOException {
|
||||
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream));
|
||||
String line;
|
||||
String regex = "(.*)version(.*)\"(\\d+)\\.(\\d+)\"(.*)";
|
||||
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 line;
|
||||
return m.group(3);
|
||||
} else {
|
||||
log.debug("--- " + line);
|
||||
}
|
||||
|
|
|
@ -65,6 +65,13 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/objectives_button_start" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/objective_back"
|
||||
style="@style/Widget.AppCompat.Button.Borderless.Colored"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/objectives_button_back" />
|
||||
</LinearLayout>
|
||||
|
||||
</android.support.v7.widget.CardView>
|
||||
|
|
|
@ -1,3 +1,30 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--Generated by crowdin.com-->
|
||||
<resources></resources>
|
||||
<resources>
|
||||
<string name="alert_r1_code">Herinner R1</string>
|
||||
<string name="alert_r2_code">Herinner R2</string>
|
||||
<string name="alert_r3_code">Herinner R3</string>
|
||||
<string name="alert_r4_code">Herinner R4</string>
|
||||
<string name="alert_r7_code">Herinner R7</string>
|
||||
<string name="alert_w31_code">Waarskuwing W31</string>
|
||||
<string name="alert_w32_code">Waarskuwing W33</string>
|
||||
<string name="alert_w33_code">Waarskuwing W33</string>
|
||||
<string name="alert_w34_code">Waarskuwing W34</string>
|
||||
<string name="alert_w36_code">Waarskuwing W36</string>
|
||||
<string name="alert_w38_code">Waarskuwing W38</string>
|
||||
<string name="alert_w39_code">Waarskuwing W39</string>
|
||||
<string name="alert_m20_code">Onderhoud M20</string>
|
||||
<string name="alert_m21_code">Onderhoud M21</string>
|
||||
<string name="alert_m22_code">Onderhoud M22</string>
|
||||
<string name="alert_m23_code">Onderhoud M23</string>
|
||||
<string name="alert_m24_code">Onderhoud M24</string>
|
||||
<string name="alert_m25_code">Onderhoud M25</string>
|
||||
<string name="alert_m26_code">Onderhoud M26</string>
|
||||
<string name="alert_m27_code">Onderhoud M27</string>
|
||||
<string name="alert_m28_code">Onderhoud M28</string>
|
||||
<string name="alert_m29_code">Onderhoud M29</string>
|
||||
<string name="alert_m30_code">Onderhoud M30</string>
|
||||
<string name="alert_e6_code">Fout E6</string>
|
||||
<string name="alert_e10_code">Fout E10</string>
|
||||
<string name="alert_e13_code">Fout E13</string>
|
||||
</resources>
|
||||
|
|
|
@ -1,3 +1,25 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--Generated by crowdin.com-->
|
||||
<resources></resources>
|
||||
<resources>
|
||||
<string name="alert_r7_description"><![CDATA[Volume: <b>%1$d%%</b>\nDurasie: <b>%2$s h</b>]]></string>
|
||||
<string name="alert_w31_description"><![CDATA[Stoor volume: <b>%1$s U</b>]]></string>
|
||||
<string name="alert_w32_description">Verander battery.</string>
|
||||
<string name="alert_w33_description">Stel tyd/datum.</string>
|
||||
<string name="alert_w34_description">Kontak Accu-Chek ondersteuning.</string>
|
||||
<string name="alert_w36_description"><![CDATA[Volume: <b>%1$d%%</b><br/>Durasie:<b>%2$s h</b>]]></string>
|
||||
<string name="alert_w38_description"><![CDATA[Geprogrammeer: <b>%1$s U</b><br/>gelewer: <b>%2$s U</b>]]></string>
|
||||
<string name="alert_m20_description">Voeg kasset.</string>
|
||||
<string name="alert_m21_description">Verander kasset.</string>
|
||||
<string name="alert_m22_description">Verander battery.</string>
|
||||
<string name="alert_m23_description">Kontroleer pomp status.</string>
|
||||
<string name="alert_m24_description">Verander infusie stel.</string>
|
||||
<string name="alert_m25_description">Kontak Accu-Chek ondersteuning.</string>
|
||||
<string name="alert_m26_description">Verander kasset.</string>
|
||||
<string name="alert_m27_description">Herhaal data aflaai.</string>
|
||||
<string name="alert_m28_description">Kontroleer pomp status.</string>
|
||||
<string name="alert_m29_description">Stel battery tipe.</string>
|
||||
<string name="alert_m30_description">Stel kasset tipe.</string>
|
||||
<string name="alert_e6_description">Verander battery en kasset.</string>
|
||||
<string name="alert_e10_description">Verander kasset.</string>
|
||||
<string name="alert_e13_description">Verander taal.</string>
|
||||
</resources>
|
||||
|
|
|
@ -1,3 +1,30 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--Generated by crowdin.com-->
|
||||
<resources></resources>
|
||||
<resources>
|
||||
<string name="alert_r1_title">Lewer Bolus</string>
|
||||
<string name="alert_r2_title">Bolus Gemis</string>
|
||||
<string name="alert_r3_title">Wekker</string>
|
||||
<string name="alert_r4_title">Verander infusie stel</string>
|
||||
<string name="alert_r7_title">TBR voltooi</string>
|
||||
<string name="alert_w31_title">Kasset laag</string>
|
||||
<string name="alert_w32_title">Battery is amper leeg</string>
|
||||
<string name="alert_w33_title">Ongeldige tyd/datum</string>
|
||||
<string name="alert_w34_title">Einde van waarborg</string>
|
||||
<string name="alert_w36_title">TBR gekanselleer</string>
|
||||
<string name="alert_w38_title">Bolus gekanselleer</string>
|
||||
<string name="alert_w39_title">Leentyd waarskuwing</string>
|
||||
<string name="alert_m20_title">Kasset nie ingevoeg</string>
|
||||
<string name="alert_m21_title">Kasset leeg</string>
|
||||
<string name="alert_m22_title">Battery leeg</string>
|
||||
<string name="alert_m23_title">Outomaties af -pomp gestaak</string>
|
||||
<string name="alert_m24_title">Verstopping</string>
|
||||
<string name="alert_m25_title">Leentyd oor - einde van werking</string>
|
||||
<string name="alert_m26_title">Kasset verandering nie voltooi</string>
|
||||
<string name="alert_m27_title">Data aflaai gefaal</string>
|
||||
<string name="alert_m28_title">Wag modus verskrei</string>
|
||||
<string name="alert_m29_title">Battery tipe nie gestel nie</string>
|
||||
<string name="alert_m30_title">Kasset tipe nie gestel nie</string>
|
||||
<string name="alert_e6_title">Meganiese fout</string>
|
||||
<string name="alert_e10_title">Herlaai fout</string>
|
||||
<string name="alert_e13_title">Taal fout</string>
|
||||
</resources>
|
||||
|
|
|
@ -1,3 +1,15 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--Generated by crowdin.com-->
|
||||
<resources></resources>
|
||||
<resources>
|
||||
<string name="connection_failed">Verbinding het misluk</string>
|
||||
<string name="connection_lost">Konneksie verloor</string>
|
||||
<string name="pairing_rejected">Maat verwerp</string>
|
||||
<string name="socket_creation_failed">Sok skepping gefaal</string>
|
||||
<string name="timeout">Afsnytyd</string>
|
||||
<string name="maximum_number_of_bolus_type_already_running">Maksimum bolus nr reeds gelaai</string>
|
||||
<string name="no_active_tbr_to_cancel">Geen aktiewe TBR om te kanselleer</string>
|
||||
<string name="no_active_tbr_to_change">Geen aktiewe TBR om te verander</string>
|
||||
<string name="no_such_bolus_to_cancel">Geen sodanige bolus om te kanselleer</string>
|
||||
<string name="pump_already_in_that_state_exception">Pomp reeds in daardie staat</string>
|
||||
<string name="run_mode_not_allowed">Loop modus nie toegelaat</string>
|
||||
</resources>
|
||||
|
|
|
@ -44,6 +44,8 @@
|
|||
<string name="description_sensitivity_oref1">Sensitiwiteit word bereken uit 8h data in die verlede en koolhidrate (indien nie geabsorbeer) is na die tyd vermeld in voorkeure gesny. Plugin bereken ook UAM.</string>
|
||||
<string name="description_sensitivity_weighted_average">Sensitiwiteit word bereken as \'n geweegde gemiddelde van dwalinge. Nuwer dwalinge het hoër gewig. Minimale karb absorpsie is bereken uit max karb absorpsie tyd vanaf voorkeure. Hierdie algoritme is die vinnigste om sensitiwiteit veranderinge te volg.</string>
|
||||
<string name="description_source_dexcom_g5">Ontvang BG waardes vanaf die gelapte Dexcom G5 app.</string>
|
||||
<string name="description_source_dexcom_g6">Ontvang BG waardes vanaf die gelapte Dexcom G6 toep.</string>
|
||||
<string name="description_source_eversense">Ontvang BG waardes uit die gelapte Eversense toep.</string>
|
||||
<string name="description_source_glimp">Ontvang BG waardes vanaf Glimp.</string>
|
||||
<string name="description_source_mm640g">Onvang BG waardes vanaf die 600SeriesAndroidUploader.</string>
|
||||
<string name="description_source_ns_client">Laai BG data af vanaf Nightscout</string>
|
||||
|
@ -263,12 +265,7 @@
|
|||
<string name="smscommunicator_bolusreplywithcode">Om %1$.2fU bolus te lewer antwoord met kode %2$s</string>
|
||||
<string name="smscommunicator_calibrationreplywithcode">Om kalibrasie %1$.2f te stuur antwoord met kode %2$s</string>
|
||||
<string name="smscommunicator_bolusfailed">Bolus het misluk</string>
|
||||
<string name="bolusdelivered" formatted="false">Bolus %.2fU suksesvol afgelewer</string>
|
||||
<string name="bolusrequested" formatted="false">Gaan %.2fU lewer</string>
|
||||
<string name="smscommunicator_bolusdelivered" formatted="false">Bolus %.2fU suksesvol afgelewer</string>
|
||||
<string name="bolusdelivering" formatted="false">Lewering van %.2fU</string>
|
||||
<string name="smscommunicator_remotecommandsallowed">Laat afstandbeheerde bevele toe via SMS</string>
|
||||
<string name="smscommunicator_remotebolusnotallowed">Afstandbeheerde bolus nie toegelaat nie</string>
|
||||
<string name="glucosetype_finger">Vinger</string>
|
||||
<string name="glucosetype_sensor">Sensor</string>
|
||||
<string name="manual">Per hand</string>
|
||||
|
@ -336,16 +333,12 @@
|
|||
<string name="smscommunicator_loopisenabled">Lus geaktiveer</string>
|
||||
<string name="valuelimitedto">%1$.2f beperk tot %2$.2f</string>
|
||||
<string name="valueoutofrange" formatted="false">Waarde %s is uit harde perke</string>
|
||||
<string name="smscommunicator_remotebasalnotallowed">Afstanbheerde basale instelling word nie toegelaat nie</string>
|
||||
<string name="smscommunicator_remotecommandnotallowed">Afstandbeheerde bevel word nie toegelaat nie</string>
|
||||
<string name="smscommunicator_basalreplywithcode">Om %1$.2fU basale te aktiveer antwoord met kode %2$s</string>
|
||||
<string name="smscommunicator_suspendreplywithcode">Om lus op te skort vir %1$d minute antwoord met kode %2$s</string>
|
||||
<string name="smscommunicator_tempbasalset">Temp basale %1$.2fU/h vir %2$d min suksesvol geaktiveerd</string>
|
||||
<string name="smscommunicator_tempbasalfailed">Tydelike basale aktivering het gefaal</string>
|
||||
<string name="smscommunicator_basalstopreplywithcode" formatted="false">Stop tydelike basale antwoord met kode %s</string>
|
||||
<string name="smscommunicator_tempbasalcanceled">Tydelike basale gekanselleer</string>
|
||||
<string name="smscommunicator_tempbasalcancelfailed">Kansellassie van tydelike basale het gefaal</string>
|
||||
<string name="smscommunicator_unknowncommand">Onbekende opdrag of verkeerd antwoord</string>
|
||||
<string name="quickwizard">SlimNutsman</string>
|
||||
<string name="quickwizardsettings">SlimNutsman instellings</string>
|
||||
<string name="overview_editquickwizard_buttontext">Knoppie teks:</string>
|
||||
|
@ -408,6 +401,7 @@
|
|||
<string name="array_of_elements">Matriks van %1$d elemente. \nWerklike waarde:</string>
|
||||
<string name="openapsma_autosensdata_label">Autosens data</string>
|
||||
<string name="openapsma_scriptdebugdata_label">Skrip foutopspoor</string>
|
||||
<string name="openapsama_useautosens">Gebruik autosens kenmerk</string>
|
||||
<string name="refresheventsfromnightscout">Verfris gebeure van NS</string>
|
||||
<string name="deletefuturetreatments">Skrap behandelings in die toekoms</string>
|
||||
<string name="eatingsoon">Eet binnekort</string>
|
||||
|
@ -468,7 +462,6 @@
|
|||
<string name="send_calibration" formatted="false">Stuur kalibrasie %.1f to xDrip?</string>
|
||||
<string name="xdripnotinstalled">xDrip + nie geïnstalleerd nie</string>
|
||||
<string name="calibrationsent">Kalibrasie gestuur na xDrip</string>
|
||||
<string name="smscommunicator_remotecalibrationnotallowed">Afstandbeheerde bevel word nie toegelaat nie</string>
|
||||
<string name="smscommunicator_calibrationsent">Kalibrasie gestuur. Ontvang moet geaktiveer word in xDrip.</string>
|
||||
<string name="smscommunicator_calibrationfailed">xDrip ontvang nie kalibrasies</string>
|
||||
<string name="pumpsuspended">Pomp opgeskort</string>
|
||||
|
@ -549,6 +542,12 @@
|
|||
<string name="insulin_shortname">INS</string>
|
||||
<string name="enablesuperbolus">Ontsper superbolus in Ghoeroe</string>
|
||||
<string name="enablesuperbolus_summary">Ontsper superbolus funksionaliteit in Ghoeroe. Moenie aktiveer totdat jy leer wat dit werklik doen. DIT KAN \'n INSULIEN OORDOSIS VEROORSAAK AS BLINDELINGS GEBRUIK WORD!</string>
|
||||
<string name="show_statuslights">Wys status vlae op tuisskerm</string>
|
||||
<string name="show_statuslights_summary">Wys status vlae vir cage, iage, sage, stoor en battery vlak op tuisskerm.</string>
|
||||
<string name="statuslights_res_warning">Drempel waarskuwings stoor vlak [U]</string>
|
||||
<string name="statuslights_res_critical">Drempel kritieke stoor vlak [U]</string>
|
||||
<string name="statuslights_bat_warning">Drempel waarskuwing battery vlak [%]</string>
|
||||
<string name="statuslights_bat_critical">Drempel kritieke battery vlak [%]</string>
|
||||
<string name="iob">IAB</string>
|
||||
<string name="cob">KOB</string>
|
||||
<string name="virtualpump_firmware_label">Firmware</string>
|
||||
|
@ -703,7 +702,10 @@
|
|||
<string name="btwatchdog_title">BT Watchdog</string>
|
||||
<string name="btwatchdog_summary">Skakel asb die foon se bluetooth af vir een sekonde Indien geen verbinding met die pomp moontlik is nie. Dit mag help vir sommige selfone waar die bluetooth stapel vries.</string>
|
||||
<string name="DexcomG5">DexcomG5 App (gelapte)</string>
|
||||
<string name="DexcomG6">DexcomG6 App (gelapte)</string>
|
||||
<string name="eversense">Eversense App (bygewerk)</string>
|
||||
<string name="dexcomg5_nsupload_title">BG data oplaai na NS</string>
|
||||
<string name="bgsource_upload">BG oplaai instellings</string>
|
||||
<string name="wear_detailed_delta_title">Wys gedetailleerde delta</string>
|
||||
<string name="wear_detailed_delta_summary">Wys delta met een meer desimale plek</string>
|
||||
<string name="smbmaxminutes_summary">Maks minute van basale beperk SMB tot</string>
|
||||
|
@ -769,6 +771,7 @@
|
|||
<string name="combo_error_bolus_verification_failed">Lewering van die bolus en verifiëring van die pomp se geskiedenis het misluk, Kontroleer asseblief die pomp. As \'n bolus afgelewer is, sal dit bygevoeg word om behandelings gedurende die volgende verbinding met die pomp.</string>
|
||||
<string name="combo_reservoir_level_insufficient_for_bolus">Nie genoeg insulien vir bolus oor in reserwe</string>
|
||||
<string name="extendedbolusdeliveryerror">Verlengde bolus afleweringsfout</string>
|
||||
<string name="insightpump_shortname">Sig</string>
|
||||
<string name="insightpump">Insight Pomp</string>
|
||||
<string name="status_no_colon">Status</string>
|
||||
<string name="changed">Verander</string>
|
||||
|
@ -843,6 +846,7 @@
|
|||
<string name="data_choices">Data keuses</string>
|
||||
<string name="fabric_upload">Fabric Upload</string>
|
||||
<string name="allow_automated_crash_reporting">Laat outomatiese Foutverslagdoening en kenmerk data stuur na die ontwikkelaars via die fabric.io diens.</string>
|
||||
<string name="g5appnotdetected">Hernuwe asseblief jou G5 toepassing na \'n ondersteunde weergawe</string>
|
||||
<string name="start_activity_tt">Begin aktiwiteit TT</string>
|
||||
<string name="start_eating_soon_tt">Begin eet gou TT</string>
|
||||
<string name="temptargetshort">TT</string>
|
||||
|
@ -1008,6 +1012,7 @@
|
|||
<string name="nth_objective">%1$d. Doelwit</string>
|
||||
<string name="poctech">Poctech</string>
|
||||
<string name="description_source_poctech">Ontvang BG waardes van Poctech toepassing</string>
|
||||
<string name="description_source_tomato">Ontvang BG waardes vanaf Tomato toep (MiaoMiao toestel)</string>
|
||||
<string name="high_temptarget_raises_sensitivity_title">Hoë tydelike doelwitte verhoog sensitiwiteit</string>
|
||||
<string name="high_temptarget_raises_sensitivity_summary"><![CDATA[Verhoog sensitiwiteit vir tydelike doelwitte > = 100]]></string>
|
||||
<string name="low_temptarget_lowers_sensitivity_title">Lae tydelike doelwitte verlaag sensitiwiteit</string>
|
||||
|
@ -1050,10 +1055,83 @@
|
|||
<string name="loop_openmode_min_change">Minimale versoek verandering [%]</string>
|
||||
<string name="loop_openmode_min_change_summary">Lus sal opspring en nuwe verandering versoek slegs as verandering is groter as hierdie waarde. Verstek waarde is 20%</string>
|
||||
<string name="pairfirst">Verbind asseblief jou pomp met jou selfoon!</string>
|
||||
<string name="searching_for_devices">Soek vir toestelle…</string>
|
||||
<string name="please_wait">Wag asseblief…</string>
|
||||
<string name="pairing_completed">Maats voltooi</string>
|
||||
<string name="code_compare">Stem die kodes gewys op hierdie toestel en op jou pomp saam?</string>
|
||||
<string name="insight_pairing">Insight maatjies</string>
|
||||
<string name="insight_local">Accu-Chek Insight</string>
|
||||
<string name="insight_delivered">%1$.2fU / %2$.2fU gelewer</string>
|
||||
<string name="insight_alert_formatter">%1$s:%2$s</string>
|
||||
<string name="tube_changed">Pyp verander</string>
|
||||
<string name="pump_time_updated">Pomp tyd opgedateer</string>
|
||||
<string name="confirm">Bevestig</string>
|
||||
<string name="mute_alert">Demp</string>
|
||||
<string name="pump_alert">Pomp alarm</string>
|
||||
<string name="log_site_changes">Log ligging veranderings</string>
|
||||
<string name="log_tube_changes">Log voerpyp verandering</string>
|
||||
<string name="log_battery_changes">Log battery verandering</string>
|
||||
<string name="log_operating_mode_changes">Log bedryf modus veranderinge</string>
|
||||
<string name="log_alerts">Log alarms</string>
|
||||
<string name="enable_tbr_emulation">Skakel TBR emulasie aan</string>
|
||||
<string name="enable_tbr_emulation_summary">Gebruik uitgebreide boluses in plaas van TBRs om die 250% perk te omseil</string>
|
||||
<string name="disconnect_delay">Ontkoppel vertraging [s]</string>
|
||||
<string name="serial_number">Reeksnommer</string>
|
||||
<string name="release_software_version">Vrygestelde sagteware weergawe</string>
|
||||
<string name="ui_processor_software_version">UI verwerker sagteware weergawe</string>
|
||||
<string name="pc_processor_software_version">PC verwerker sagteware weergawe</string>
|
||||
<string name="md_tel_processor_software_version">MD tel verwerker sagteware weergawe</string>
|
||||
<string name="safety_processor_software_version">Veiligheid verwerker sagteware weergawe</string>
|
||||
<string name="bt_info_page_version">BT info bladsy weergawe</string>
|
||||
<string name="bluetooth_address">Bluetooth adres</string>
|
||||
<string name="system_id_appendix">Stelsel ID Aanhangsel</string>
|
||||
<string name="manufacturing_date">Vervaardigings datum</string>
|
||||
<string name="delete_pairing">Verwyder maats</string>
|
||||
<string name="pairing_information">Maat inligting</string>
|
||||
<string name="refreh_status">Verfris status</string>
|
||||
<string name="start_pump">Begin pomp</string>
|
||||
<string name="stop_pump">Stop pomp</string>
|
||||
<string name="operating_mode">Bedryf modus</string>
|
||||
<string name="insight_status">Status</string>
|
||||
<string name="tdd_bolus">TDD Bolus</string>
|
||||
<string name="tdd_basal">TDD basale</string>
|
||||
<string name="tdd_total">TDD totaal</string>
|
||||
<string name="recovering">Herstel</string>
|
||||
<string name="not_paired">Nie gemaat</string>
|
||||
<string name="last_connected">Laaste verbind</string>
|
||||
<string name="started">Begin</string>
|
||||
<string name="stopped">Gestaak</string>
|
||||
<string name="tbr_formatter">%1$d%% vir %2$d / %3$d min</string>
|
||||
<string name="extended_bolus">Uitgebreide bolus</string>
|
||||
<string name="multiwave_bolus">Multigolf bolus</string>
|
||||
<string name="eb_formatter">%1$.2f / %2$.2f U vir %3$d min</string>
|
||||
<string name="enable_tbr_over_notification">Skakel kennisgewing van TBR einde\n(pomp instelling)</string>
|
||||
<string name="disable_tbr_over_notification">Deaktiveer kennisgewing van TBR einde\n(pomp instelling)</string>
|
||||
<string name="refresh">Verfris</string>
|
||||
<string name="description_pump_insight_local">Integrasie vir Accu-Chek Insight pompe</string>
|
||||
<string name="not_inserted">Nie ingesteek</string>
|
||||
<string name="short_status_last_connected">Laaste kon: %1$d min gelede</string>
|
||||
<string name="short_status_tbr">TBR: %1$d%% vir %2$d / %3$d min</string>
|
||||
<string name="short_status_extended">Verleng: %1$.2f / %2$.2f U vir %3$d min</string>
|
||||
<string name="short_status_multiwave">Multigolf: %1$.2f / %2$.2f U vir %3$d min</string>
|
||||
<string name="short_status_tdd">TDD: %1$.2f</string>
|
||||
<string name="short_status_reservoir">Stoor.: %1$.2fU</string>
|
||||
<string name="short_status_battery">Bat.: %1$d%%</string>
|
||||
<string name="max_recovery_duration">Max. herstel duur [s]</string>
|
||||
<string name="min_recovery_duration">Min. herstel duur [s]</string>
|
||||
<string name="recovery_duration">Herstel duur</string>
|
||||
<string name="timeout_during_handshake">Afsnytyd gedurende handskud - terugstel bluetooth</string>
|
||||
<string name="profile_total">== ∑ %1$s U</string>
|
||||
<string name="profile_ins_units_per_hout">U/h</string>
|
||||
<string name="profile_carbs_per_unit">g/U</string>
|
||||
<string name="profile_per_unit">/U</string>
|
||||
<string name="dexcom_lognssensorchange_title">Log sensor verander na NS</string>
|
||||
<string name="dexcom_lognssensorchange_summary">Skep geleentheid \"sensor verandering\" in NS automaties op sensor begin</string>
|
||||
<string name="tomato">Tomato (MiaoMiao)</string>
|
||||
<string name="tomato_short">Tomato</string>
|
||||
<string name="dst_in_24h_warning">Daglig spaar tyd verandering in 24 h of minder</string>
|
||||
<string name="storage">interne berging beperking</string>
|
||||
<string name="diskfull">Bevry ten minste %1$d MB van intene stoorspasie! Lus gedeaktiveer!</string>
|
||||
<plurals name="objective_days">
|
||||
<item quantity="one">%1$d dae</item>
|
||||
<item quantity="other">%1$d dae</item>
|
||||
|
|
|
@ -54,6 +54,7 @@
|
|||
<string name="description_wear">Наблюдавайте и контролирайте AndroidAPS, от вашия WearOS часовник.</string>
|
||||
<string name="description_xdrip_status_line">Покажи информация за вашия APS на xDrip + циферблат на часовник.</string>
|
||||
<string name="description_sms_communicator">Дистанционно управление AndroidAPS чрез използване на SMS команди.</string>
|
||||
<string name="objectives_button_back">Назад</string>
|
||||
<string name="objectives_button_start">Стартирай</string>
|
||||
<string name="objectives_button_verify">Провери</string>
|
||||
<string name="nsprofileview_units_label">Единици</string>
|
||||
|
@ -265,12 +266,7 @@
|
|||
<string name="smscommunicator_bolusreplywithcode">За да доставите болус от %1$.2fЕ отговорете с код %2$s</string>
|
||||
<string name="smscommunicator_calibrationreplywithcode">За да изпратите калибрация %1$.2f отговорете с код %2$s</string>
|
||||
<string name="smscommunicator_bolusfailed">Болус отказан</string>
|
||||
<string name="bolusdelivered" formatted="false">Болус %.2fЕд беше подаден успешно</string>
|
||||
<string name="bolusrequested" formatted="false">Подава болус %.2fЕ</string>
|
||||
<string name="smscommunicator_bolusdelivered" formatted="false">Болус от %.2fЕ подаден успешно</string>
|
||||
<string name="bolusdelivering" formatted="false">Подава %.2fЕ</string>
|
||||
<string name="smscommunicator_remotecommandsallowed">Позволи отдалечени команди чрез SMS</string>
|
||||
<string name="smscommunicator_remotebolusnotallowed">Отдалечено подаване на болус - забранено!</string>
|
||||
<string name="glucosetype_finger">Пръст</string>
|
||||
<string name="glucosetype_sensor">Сензор</string>
|
||||
<string name="manual">Друго</string>
|
||||
|
@ -338,16 +334,12 @@
|
|||
<string name="smscommunicator_loopisenabled">APS е включен</string>
|
||||
<string name="valuelimitedto">%1$.2f ограничен до %2$.2f</string>
|
||||
<string name="valueoutofrange" formatted="false">Стойността %s е извън границите</string>
|
||||
<string name="smscommunicator_remotebasalnotallowed">Отдалечено прилагане на базал е забранено</string>
|
||||
<string name="smscommunicator_remotecommandnotallowed">Отдалеченото управление е забранено</string>
|
||||
<string name="smscommunicator_basalreplywithcode">За да стартирате базал от %1$.2fЕ отговорете с код %2$s</string>
|
||||
<string name="smscommunicator_suspendreplywithcode">За да спрете APS за %1$d минути отговорете с код %2$s</string>
|
||||
<string name="smscommunicator_tempbasalset">Временен базал от %1$.2fЕ/ч за %2$d мин стартиран успешно</string>
|
||||
<string name="smscommunicator_tempbasalfailed">Неуспешно стартиране на временен базал</string>
|
||||
<string name="smscommunicator_basalstopreplywithcode" formatted="false">За да спрете времен базал отговорете с код %s</string>
|
||||
<string name="smscommunicator_tempbasalcanceled">Временният базал е отменен</string>
|
||||
<string name="smscommunicator_tempbasalcancelfailed">Спирането на временния базал е неуспешно</string>
|
||||
<string name="smscommunicator_unknowncommand">Непозната команда или грешен отговор</string>
|
||||
<string name="quickwizard">Бърз болус</string>
|
||||
<string name="quickwizardsettings">Настройки за бърз болус</string>
|
||||
<string name="overview_editquickwizard_buttontext">Текст на бутона:</string>
|
||||
|
@ -471,7 +463,6 @@
|
|||
<string name="send_calibration" formatted="false">Изпрати калибрация %.1f към xDrip?</string>
|
||||
<string name="xdripnotinstalled">xDrip+ не е инсталиран</string>
|
||||
<string name="calibrationsent">Калибрацията е изпратена към xDrip</string>
|
||||
<string name="smscommunicator_remotecalibrationnotallowed">Не е разрешена отдалечена калибрация</string>
|
||||
<string name="smscommunicator_calibrationsent">Неуспешно. Получаването трябва да е разрешено в xDrip.</string>
|
||||
<string name="smscommunicator_calibrationfailed">xDrip не получава калибрации</string>
|
||||
<string name="pumpsuspended">Помпата е спряна</string>
|
||||
|
@ -1139,6 +1130,9 @@
|
|||
<string name="dexcom_lognssensorchange_summary">Създаване на събитие \"Смяна на сеснзор\" в NS автоматично при старт на сензор</string>
|
||||
<string name="tomato">Tomato(MяоМяо)</string>
|
||||
<string name="tomato_short">Tomato</string>
|
||||
<string name="dst_in_24h_warning">Смяна на времето след по-малко от 24ч</string>
|
||||
<string name="storage">Ограничение поради липса на памет</string>
|
||||
<string name="diskfull">Освободете поне %1$d Мб в паметта на телефона! Loop изключен!</string>
|
||||
<plurals name="objective_days">
|
||||
<item quantity="one">%1$d дeн</item>
|
||||
<item quantity="other">%1$d дни</item>
|
||||
|
|
|
@ -54,6 +54,7 @@
|
|||
<string name="description_wear">Zobrazování stavu a řízení AndroidAPS z hodinek s WearOS</string>
|
||||
<string name="description_xdrip_status_line">Zobrazování informací o smyčce na xDrip+ watchface.</string>
|
||||
<string name="description_sms_communicator">Vzdálené řízení pomocí SMS příkazů</string>
|
||||
<string name="objectives_button_back">Zpět</string>
|
||||
<string name="objectives_button_start">Začátek</string>
|
||||
<string name="objectives_button_verify">Kontrola</string>
|
||||
<string name="nsprofileview_units_label">Jednotky</string>
|
||||
|
@ -265,12 +266,11 @@
|
|||
<string name="smscommunicator_bolusreplywithcode">K potvrzení bolusu %1$.2fU odpověz SMS s kódem %2$s</string>
|
||||
<string name="smscommunicator_calibrationreplywithcode">Odeslání kalibrace %1$.2f potvrďte kódem %2$s</string>
|
||||
<string name="smscommunicator_bolusfailed">Chyba při aplikování bolusu</string>
|
||||
<string name="bolusdelivered" formatted="false">Bolus %.2fU aplikován úspěšně</string>
|
||||
<string name="bolusrequested" formatted="false">Spouštím dodávání %.2fU</string>
|
||||
<string name="smscommunicator_bolusdelivered" formatted="false">Bolus %.2fU aplikován úspěšně</string>
|
||||
<string name="bolusdelivering" formatted="false">Aplikováno %.2fU</string>
|
||||
<string name="bolusdelivered">Bolus %1$.2fU aplikován úspěšně</string>
|
||||
<string name="bolusrequested">Podávání %1$.2fU inzulínu</string>
|
||||
<string name="smscommunicator_bolusdelivered">Bolus %1$.2fU aplikován úspěšně</string>
|
||||
<string name="bolusdelivering">Aplikováno %1$.2fU</string>
|
||||
<string name="smscommunicator_remotecommandsallowed">Povolit posílání příkazů přes SMS</string>
|
||||
<string name="smscommunicator_remotebolusnotallowed">Vzdálený bolus není momentálně povolen</string>
|
||||
<string name="glucosetype_finger">Glukoměr</string>
|
||||
<string name="glucosetype_sensor">Senzor</string>
|
||||
<string name="manual">Jiný</string>
|
||||
|
@ -338,15 +338,24 @@
|
|||
<string name="smscommunicator_loopisenabled">Smyčka je povolena</string>
|
||||
<string name="valuelimitedto">%1$.2f omezeno na %2$.2f</string>
|
||||
<string name="valueoutofrange" formatted="false">Hodnota %s je mimo přednastavený rozsah</string>
|
||||
<string name="smscommunicator_remotebasalnotallowed">Vzdálené posílání příkazů není povoleno</string>
|
||||
<string name="smscommunicator_remotecommandnotallowed">Vzdálený příkaz není povolen</string>
|
||||
<string name="smscommunicator_basalreplywithcode">Na spuštění bazálu %1$.2fU/h odpověz SMS s kódem %2$s</string>
|
||||
<string name="smscommunicator_remotebolusnotallowed">Vzdálený bolus není momentálně povolen. Zkuste to později.</string>
|
||||
<string name="smscommunicator_basalreplywithcode">Pro spuštění bazálu %1$.2fU/h na %2$d min odpovězte SMS s kódem %3$s</string>
|
||||
<string name="smscommunicator_profilereplywithcode">Pro přepnutí profilu na %1$s %2$d%% odpovězte SMS s kódem %3$s</string>
|
||||
<string name="smscommunicator_extendedreplywithcode">Pro spuštění prodlouženého bolusu %1$.2fU na %2$d min odpovězte SMS s kódem %3$s</string>
|
||||
<string name="smscommunicator_basalpctreplywithcode">Pro spuštění bazálu %1$d%% na %2$d min odpovězte SMS s kódem %3$s</string>
|
||||
<string name="smscommunicator_suspendreplywithcode">K pozastavení smyčky na %1$d minut odpověz SMS s kódem %2$s</string>
|
||||
<string name="smscommunicator_tempbasalset">Dočasný bazál %1$.2fU/h na %2$d minut spuštěn</string>
|
||||
<string name="smscommunicator_extendedset">Prodloužený bolus %1$.2fU na %2$d min úspěšně spuštěn</string>
|
||||
<string name="smscommunicator_tempbasalset_percent">Dočasný bazál %1$d%% na %2$d minut úspěšně spuštěn</string>
|
||||
<string name="smscommunicator_tempbasalfailed">Spuštění dočasného bazálu selhalo</string>
|
||||
<string name="smscommunicator_basalstopreplywithcode" formatted="false">Na ukončení bazálu odpověz SMS s kódem %s</string>
|
||||
<string name="smscommunicator_extendedfailed">Spuštění prodlouženého bolusu selhalo</string>
|
||||
<string name="smscommunicator_basalstopreplywithcode">Na zastavení dočasného bazálu odpovězte SMS s kódem %1$s</string>
|
||||
<string name="smscommunicator_extendedstopreplywithcode">Na zastavení prodlouženého bolusu odpovězte SMS s kódem %1$s</string>
|
||||
<string name="smscommunicator_tempbasalcanceled">Dočasný bazál zastaven</string>
|
||||
<string name="smscommunicator_extendedcanceled">Prodloužený bolus zastaven</string>
|
||||
<string name="smscommunicator_tempbasalcancelfailed">Rušení dočasného bazálu selhalo</string>
|
||||
<string name="smscommunicator_extendedcancelfailed">Zastavení prodlouženého bolusu selhalo</string>
|
||||
<string name="smscommunicator_unknowncommand">Neznámý příkaz nebo chybná odpověď</string>
|
||||
<string name="quickwizard">Rychlý bolus</string>
|
||||
<string name="quickwizardsettings">Nastavení rychlých bolusů</string>
|
||||
|
@ -471,7 +480,6 @@
|
|||
<string name="send_calibration" formatted="false">Poslat do xDripu kalibraci %.1f ?</string>
|
||||
<string name="xdripnotinstalled">xDrip+ není nainstalován</string>
|
||||
<string name="calibrationsent">Kalibrace odeslána do xDripu</string>
|
||||
<string name="smscommunicator_remotecalibrationnotallowed">Vzdálené kalibrace nejsou povoleny</string>
|
||||
<string name="smscommunicator_calibrationsent">Kalibrace odeslána. Příjem musí být v xDripu povolený.</string>
|
||||
<string name="smscommunicator_calibrationfailed">xDrip nepřijímá kalibrace</string>
|
||||
<string name="pumpsuspended">Pumpa pozastavena</string>
|
||||
|
@ -1139,6 +1147,13 @@
|
|||
<string name="dexcom_lognssensorchange_summary">Vytvořit událost \"Výměna senzoru\" v NS automaticky po spuštění senzoru</string>
|
||||
<string name="tomato">Tomato (MiaoMiao)</string>
|
||||
<string name="tomato_short">Tomato</string>
|
||||
<string name="dst_in_24h_warning">Změna letního času za méně než 24 hodin</string>
|
||||
<string name="storage">omezení vnitřního úložiště</string>
|
||||
<string name="diskfull">Uvolněte alespoň %1$d MB z vnitřního úložiště! Smyčka zakázána!</string>
|
||||
<string name="wrongformat">Chybný formát</string>
|
||||
<string name="sms_wrongcode">Nesprávný kód. Příkaz zrušen.</string>
|
||||
<string name="notconfigured">Není nakonfigurováno</string>
|
||||
<string name="profileswitchcreated">Přepnutí profilu vytvořeno</string>
|
||||
<plurals name="objective_days">
|
||||
<item quantity="one">%1$d den</item>
|
||||
<item quantity="few">%1$d dnů</item>
|
||||
|
|
|
@ -54,6 +54,7 @@
|
|||
<string name="description_wear">Überwache und steuere AndroidAPS mit Deiner WearOS-Smartwatch.</string>
|
||||
<string name="description_xdrip_status_line">Zeige Loop-Informationen auf Deinem xDrip+-Watchface.</string>
|
||||
<string name="description_sms_communicator">Steuere AndroiAPS fern mittels SMS-Anweisungen.</string>
|
||||
<string name="objectives_button_back">Zurück</string>
|
||||
<string name="objectives_button_start">Start</string>
|
||||
<string name="objectives_button_verify">Bestätigen</string>
|
||||
<string name="nsprofileview_units_label">Einheiten</string>
|
||||
|
@ -265,12 +266,7 @@
|
|||
<string name="smscommunicator_bolusreplywithcode">Um einen Bolus von %1$.2f IE abzugeben, antworte mit dem Code %2$s.</string>
|
||||
<string name="smscommunicator_calibrationreplywithcode">Um die Kalibrierung %1$.2f zu senden, antworte mit dem Code %2$s.</string>
|
||||
<string name="smscommunicator_bolusfailed">Bolus fehlgeschlagen</string>
|
||||
<string name="bolusdelivered" formatted="false">%.2f IE Bolus erfolgreich abgegeben</string>
|
||||
<string name="bolusrequested" formatted="false">Werde %.2f IE abgeben</string>
|
||||
<string name="smscommunicator_bolusdelivered" formatted="false">Bolus %.2f IE erfolgreich abgegeben</string>
|
||||
<string name="bolusdelivering" formatted="false">Abgabe %1$.2f IE</string>
|
||||
<string name="smscommunicator_remotecommandsallowed">Erlaube externe Befehle per SMS</string>
|
||||
<string name="smscommunicator_remotebolusnotallowed">Ferngesteuerter Bolus ist nicht erlaubt</string>
|
||||
<string name="glucosetype_finger">Finger</string>
|
||||
<string name="glucosetype_sensor">Sensor</string>
|
||||
<string name="manual">Manuell</string>
|
||||
|
@ -339,16 +335,12 @@ maxIOB = durchschnittlicher Essensbolus + 3 x maximale Basalrate</string>
|
|||
<string name="smscommunicator_loopisenabled">Loop ist aktiviert.</string>
|
||||
<string name="valuelimitedto">%1$.2f limitiert auf %2$.2f</string>
|
||||
<string name="valueoutofrange" formatted="false">Wert %1$s ist außerhalb des festen Limits.</string>
|
||||
<string name="smscommunicator_remotebasalnotallowed">Ferngesteuerte Basal-Einstellungen sind nicht erlaubt.</string>
|
||||
<string name="smscommunicator_remotecommandnotallowed">Ferngesteuerte Befehle sind nicht erlaubt.</string>
|
||||
<string name="smscommunicator_basalreplywithcode">Um eine BR mit %1$.2f IE/h zu starten, antworte mit dem Code %2$s.</string>
|
||||
<string name="smscommunicator_suspendreplywithcode">Um das Loopen für %1$d Minuten zu pausieren, antworte mit dem Code %2$s.</string>
|
||||
<string name="smscommunicator_tempbasalset">TBR mit %1$.2f IE/h für %2$d min wurde erfolgreich gestartet.</string>
|
||||
<string name="smscommunicator_tempbasalfailed">Das Starten der TBR ist fehlgeschlagen.</string>
|
||||
<string name="smscommunicator_basalstopreplywithcode" formatted="false">Um die TBR abzubrechen, antworte mit dem Code %s.</string>
|
||||
<string name="smscommunicator_tempbasalcanceled">TBR abgebrochen</string>
|
||||
<string name="smscommunicator_tempbasalcancelfailed">Das Abbrechen der TBR ist fehlgeschlagen.</string>
|
||||
<string name="smscommunicator_unknowncommand">Unbekannter Befehl oder falsche Antwort</string>
|
||||
<string name="quickwizard">QuickWizard</string>
|
||||
<string name="quickwizardsettings">QuickWizard-Einstellungen</string>
|
||||
<string name="overview_editquickwizard_buttontext">Schaltflächen-Text:</string>
|
||||
|
@ -472,7 +464,6 @@ maxIOB = durchschnittlicher Essensbolus + 3 x maximale Basalrate</string>
|
|||
<string name="send_calibration" formatted="false">Kalibrierung %1$.1f an xDrip+ senden?</string>
|
||||
<string name="xdripnotinstalled">xDrip+ nicht installiert</string>
|
||||
<string name="calibrationsent">Kalibrierung an xDrip+ gesendet</string>
|
||||
<string name="smscommunicator_remotecalibrationnotallowed">Fern-Kalibrierung ist nicht erlaubt.</string>
|
||||
<string name="smscommunicator_calibrationsent">Kalibrierung gesendet. Das Empfangen von Kalbrierungen muss in xDrip+ aktiviert sein.</string>
|
||||
<string name="smscommunicator_calibrationfailed">xDrip+ hat die Kalbrierung nicht erhalten</string>
|
||||
<string name="pumpsuspended">Pumpe pausiert</string>
|
||||
|
@ -1141,6 +1132,9 @@ Unerwartetes Verhalten.</string>
|
|||
<string name="dexcom_lognssensorchange_summary">Ereignis \"Sensorwechsel\" bei Sensorstart automatisch in NS erstellen</string>
|
||||
<string name="tomato">Tomato (MiaoMiao)</string>
|
||||
<string name="tomato_short">Tomato</string>
|
||||
<string name="dst_in_24h_warning">Zeitumstellung in weniger als 24 Stunden</string>
|
||||
<string name="storage">interne Speicherbegrenzung</string>
|
||||
<string name="diskfull">Mindestens %1$d MB freier interer Speicher benötigt! Loop abgeschaltet!</string>
|
||||
<plurals name="objective_days">
|
||||
<item quantity="one">%1$d Tag</item>
|
||||
<item quantity="other">%1$d Tage</item>
|
||||
|
|
|
@ -263,12 +263,7 @@
|
|||
<string name="smscommunicator_bolusreplywithcode">Για έγχυση bolus %1$.2fU στείλτε με κωδικό %2$s</string>
|
||||
<string name="smscommunicator_calibrationreplywithcode">Για αποστολή καλιμπραρίσματος %1$.2f στείλτε με κωδικό %2$s</string>
|
||||
<string name="smscommunicator_bolusfailed">Αποτυχία Bolus</string>
|
||||
<string name="bolusdelivered" formatted="false">Bolus %.2fU παραδόθηκε επιτυχώς</string>
|
||||
<string name="bolusrequested" formatted="false">Προς έγχυση %.2fU</string>
|
||||
<string name="smscommunicator_bolusdelivered" formatted="false">Bolus %.2fU παραδόθηκε επιτυχώς</string>
|
||||
<string name="bolusdelivering" formatted="false">Έγχυση %.2fU</string>
|
||||
<string name="smscommunicator_remotecommandsallowed">Άδεια για απομακρυσμένες εντολές μέσω SMS</string>
|
||||
<string name="smscommunicator_remotebolusnotallowed">Δεν επιτρέπεται απομακρυσμένο bolus</string>
|
||||
<string name="glucosetype_finger">Δάκτυλο</string>
|
||||
<string name="glucosetype_sensor">Αισθητήρας</string>
|
||||
<string name="manual">Χειροκίνητα</string>
|
||||
|
@ -336,16 +331,12 @@
|
|||
<string name="smscommunicator_loopisenabled">Κύκλωμα ενεργοποιημένο</string>
|
||||
<string name="valuelimitedto">Το %1$.2f περιορίζεται σε %2$.2f</string>
|
||||
<string name="valueoutofrange" formatted="false">Η τιμή %s είναι έξω από τα όρια</string>
|
||||
<string name="smscommunicator_remotebasalnotallowed">Δεν επιτρέπεται η απομακρυσμένη ρύθμιση βασικού ρυθμού </string>
|
||||
<string name="smscommunicator_remotecommandnotallowed">Δεν επιτρέπεται απομακρυσμένη εντολή</string>
|
||||
<string name="smscommunicator_basalreplywithcode">Για έναρξη βασικού %1$.2fU/h στείλτε με κωδικό %2$s</string>
|
||||
<string name="smscommunicator_suspendreplywithcode">Για αναστολή κυκλκώματος για %1$d λεπτών στείλτε με κωδικό %2$s</string>
|
||||
<string name="smscommunicator_tempbasalset">Προσωρινός Ρυθμός %1$.2fU/h για %2$d λεπτά ξεκίνησε επιτυχώς</string>
|
||||
<string name="smscommunicator_tempbasalfailed">Εκκίνηση Προσωρινού Ρυθμού απέτυχε</string>
|
||||
<string name="smscommunicator_basalstopreplywithcode" formatted="false">Για να σταματήσετε Προσωρινό Ρυθμό στείλτε με κωδικό %s</string>
|
||||
<string name="smscommunicator_tempbasalcanceled">Ο Προσωρινός Ρυθμός ακυρώθηκε</string>
|
||||
<string name="smscommunicator_tempbasalcancelfailed">Ακύρωση Προσωρινού Ρυθμού απέτυχε</string>
|
||||
<string name="smscommunicator_unknowncommand">Άγνωστη εντολή ή λάθος απάντηση</string>
|
||||
<string name="quickwizard">Γρήγορος Οδηγός</string>
|
||||
<string name="quickwizardsettings">Ρυθμίσεις Γρήγορου Οδηγού</string>
|
||||
<string name="overview_editquickwizard_buttontext">Κείμενο στο πλήκτρο:</string>
|
||||
|
@ -468,7 +459,6 @@
|
|||
<string name="send_calibration" formatted="false">Να στείλω το καλιμπράρισμα %.1f στο xDrip;</string>
|
||||
<string name="xdripnotinstalled">xDrip+ μη εγκατεστημένο</string>
|
||||
<string name="calibrationsent">Το καλιμπράρισμα εστάλει στο xDrip</string>
|
||||
<string name="smscommunicator_remotecalibrationnotallowed">Δεν επιτρέπεται απομακρυσμένο καλιμπράρισμα</string>
|
||||
<string name="smscommunicator_calibrationsent">Το καλιμπράρισμα στάλθηκε. Η λήψη πρέπει να είναι ενεργοποιημένη στο xDrip.</string>
|
||||
<string name="smscommunicator_calibrationfailed">το xDrip δεν λαμβάνει καλιμπραρίσματα</string>
|
||||
<string name="pumpsuspended">Η αντλία είναι σε παύση</string>
|
||||
|
|
|
@ -265,12 +265,7 @@
|
|||
<string name="smscommunicator_bolusreplywithcode">Para entregar bolo %1$.2fU responder con código %2$s</string>
|
||||
<string name="smscommunicator_calibrationreplywithcode">Para enviar calibración %1$.2f responder con código %2$s</string>
|
||||
<string name="smscommunicator_bolusfailed">Bolo falló</string>
|
||||
<string name="bolusdelivered" formatted="false">Bolo %.2fU entregado con éxito</string>
|
||||
<string name="bolusrequested" formatted="false">Entregaré %.2fU</string>
|
||||
<string name="smscommunicator_bolusdelivered" formatted="false">Bolo %.2fU enviado correctamente</string>
|
||||
<string name="bolusdelivering" formatted="false">Entregando %.2fU</string>
|
||||
<string name="smscommunicator_remotecommandsallowed">Permitir comandos remotos vía SMS</string>
|
||||
<string name="smscommunicator_remotebolusnotallowed">Bolo remoto no permitido</string>
|
||||
<string name="glucosetype_finger">Dedo</string>
|
||||
<string name="glucosetype_sensor">Sensor</string>
|
||||
<string name="manual">Manualmente</string>
|
||||
|
@ -338,16 +333,12 @@
|
|||
<string name="smscommunicator_loopisenabled">Lazo activo</string>
|
||||
<string name="valuelimitedto">%1$.2f limitado a %2$.2f</string>
|
||||
<string name="valueoutofrange" formatted="false">Valor %s fuera de limites</string>
|
||||
<string name="smscommunicator_remotebasalnotallowed">No permitidos ajustes basales remotos</string>
|
||||
<string name="smscommunicator_remotecommandnotallowed">Comando remoto no permitido</string>
|
||||
<string name="smscommunicator_basalreplywithcode">Para iniciar basal %1$.2fU/h responder con código %2$s</string>
|
||||
<string name="smscommunicator_suspendreplywithcode">Para cancelar lazo por %1$d minutos responde con código %2$s</string>
|
||||
<string name="smscommunicator_tempbasalset">Basal temporal %1$.2fU/h para %2$d min iniciada correctamente</string>
|
||||
<string name="smscommunicator_tempbasalfailed">Fallo inicio basal temporal</string>
|
||||
<string name="smscommunicator_basalstopreplywithcode" formatted="false">Para parar basal temporal responder con código %s</string>
|
||||
<string name="smscommunicator_tempbasalcanceled">Basal temporal cancelada</string>
|
||||
<string name="smscommunicator_tempbasalcancelfailed">Fallo cancelación basal temporal</string>
|
||||
<string name="smscommunicator_unknowncommand">Comando desconocido o respuesta incorrecta</string>
|
||||
<string name="quickwizard">Asistente</string>
|
||||
<string name="quickwizardsettings">Asistente configuración</string>
|
||||
<string name="overview_editquickwizard_buttontext">Botón Texto:</string>
|
||||
|
@ -471,7 +462,6 @@
|
|||
<string name="send_calibration" formatted="false">¿Mandar calibración %.1f a xDrip?</string>
|
||||
<string name="xdripnotinstalled">xDrip+ no instalado</string>
|
||||
<string name="calibrationsent">Calibración mandada a xDrip</string>
|
||||
<string name="smscommunicator_remotecalibrationnotallowed">Calibración remota no admitida</string>
|
||||
<string name="smscommunicator_calibrationsent">Calibración enviada. La recepción debe estar habilitada en xDrip.</string>
|
||||
<string name="smscommunicator_calibrationfailed">xDrip no recibe calibraciones</string>
|
||||
<string name="pumpsuspended">Bomba parada</string>
|
||||
|
|
|
@ -1,3 +1,30 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--Generated by crowdin.com-->
|
||||
<resources></resources>
|
||||
<resources>
|
||||
<string name="alert_r1_code">Rappel R1</string>
|
||||
<string name="alert_r2_code">Rappel R2</string>
|
||||
<string name="alert_r3_code">Rappel R3</string>
|
||||
<string name="alert_r4_code">Rappel R4</string>
|
||||
<string name="alert_r7_code">Rappel R7</string>
|
||||
<string name="alert_w31_code">Avertissement W31</string>
|
||||
<string name="alert_w32_code">Avertissement W32</string>
|
||||
<string name="alert_w33_code">Avertissement W33</string>
|
||||
<string name="alert_w34_code">Avertissement W34</string>
|
||||
<string name="alert_w36_code">Avertissement W36</string>
|
||||
<string name="alert_w38_code">Avertissement W38</string>
|
||||
<string name="alert_w39_code">Avertissement W39</string>
|
||||
<string name="alert_m20_code">Maintenance M20</string>
|
||||
<string name="alert_m21_code">Maintenance M21</string>
|
||||
<string name="alert_m22_code">Maintenance M22</string>
|
||||
<string name="alert_m23_code">Maintenance M23</string>
|
||||
<string name="alert_m24_code">Maintenance M24</string>
|
||||
<string name="alert_m25_code">Maintenance M25</string>
|
||||
<string name="alert_m26_code">Maintenance M26</string>
|
||||
<string name="alert_m27_code">Maintenance M27</string>
|
||||
<string name="alert_m28_code">Maintenance M28</string>
|
||||
<string name="alert_m29_code">Maintenance M29</string>
|
||||
<string name="alert_m30_code">Maintenance M30</string>
|
||||
<string name="alert_e6_code">Erreur E6</string>
|
||||
<string name="alert_e10_code">Erreur E10</string>
|
||||
<string name="alert_e13_code">Erreur E13</string>
|
||||
</resources>
|
||||
|
|
|
@ -1,3 +1,25 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--Generated by crowdin.com-->
|
||||
<resources></resources>
|
||||
<resources>
|
||||
<string name="alert_r7_description"><![CDATA[Quantité :<b>%1$d%%</b>\nDurée :<b>%2$s h</b>]]></string>
|
||||
<string name="alert_w31_description"><![CDATA[Volume dans le réservoir : <b>%1$s U</b>]]></string>
|
||||
<string name="alert_w32_description">Changer la batterie.</string>
|
||||
<string name="alert_w33_description">Régler heure/date.</string>
|
||||
<string name="alert_w34_description">Contacter l\'assistance Accu-Check.</string>
|
||||
<string name="alert_w36_description"><![CDATA[Quantité : <b>%1$d%%</b><br/>Durée : <b>%2$s h</b>]]></string>
|
||||
<string name="alert_w38_description"><![CDATA[Programmé : <b>%1$s U</b><br/>Délivré : <b>%2$s U</b>]]></string>
|
||||
<string name="alert_m20_description">Insérer le réservoir.</string>
|
||||
<string name="alert_m21_description">Changer le réservoir.</string>
|
||||
<string name="alert_m22_description">Changer la batterie.</string>
|
||||
<string name="alert_m23_description">Vérifier l\'état de la pompe.</string>
|
||||
<string name="alert_m24_description">Remplacer le dispositif de perfusion.</string>
|
||||
<string name="alert_m25_description">Contacter l\'assistance Accu-Check.</string>
|
||||
<string name="alert_m26_description">Changer le réservoir.</string>
|
||||
<string name="alert_m27_description">Recommencer le transfert des données.</string>
|
||||
<string name="alert_m28_description">Vérifier l\'état de la pompe.</string>
|
||||
<string name="alert_m29_description">Choisir le type de pile.</string>
|
||||
<string name="alert_m30_description">Choisir le type de réservoir.</string>
|
||||
<string name="alert_e6_description">Remplacer pile et réservoir.</string>
|
||||
<string name="alert_e10_description">Changer le réservoir.</string>
|
||||
<string name="alert_e13_description">Changer la langue.</string>
|
||||
</resources>
|
||||
|
|
|
@ -1,3 +1,30 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--Generated by crowdin.com-->
|
||||
<resources></resources>
|
||||
<resources>
|
||||
<string name="alert_r1_title">Injecter le Bolus</string>
|
||||
<string name="alert_r2_title">Bolus oublié</string>
|
||||
<string name="alert_r3_title">Réveil</string>
|
||||
<string name="alert_r4_title">Remplacer le dispositif de perfusion</string>
|
||||
<string name="alert_r7_title">DBT terminé</string>
|
||||
<string name="alert_w31_title">Réservoir presque vide</string>
|
||||
<string name="alert_w32_title">Batterie faible</string>
|
||||
<string name="alert_w33_title">Heure/date incorrectes</string>
|
||||
<string name="alert_w34_title">Fin de garantie</string>
|
||||
<string name="alert_w36_title">DBT annulé</string>
|
||||
<string name="alert_w38_title">Bolus annulé</string>
|
||||
<string name="alert_w39_title">Avertissement fin prêt</string>
|
||||
<string name="alert_m20_title">Réservoir non inséré</string>
|
||||
<string name="alert_m21_title">Réservoir vide</string>
|
||||
<string name="alert_m22_title">Pile déchargée</string>
|
||||
<string name="alert_m23_title">Arrêt automatique - Pompe arrêtée</string>
|
||||
<string name="alert_m24_title">Occlusion</string>
|
||||
<string name="alert_m25_title">Fin du prêt - fin de fonctionnement</string>
|
||||
<string name="alert_m26_title">Changement de réservoir non terminé</string>
|
||||
<string name="alert_m27_title">Échec du transfert des données</string>
|
||||
<string name="alert_m28_title">Mode pause expiré</string>
|
||||
<string name="alert_m29_title">Type de pile non configuré</string>
|
||||
<string name="alert_m30_title">Type de réservoir non défini</string>
|
||||
<string name="alert_e6_title">Erreur mécanique</string>
|
||||
<string name="alert_e10_title">Erreur retour tige filetée</string>
|
||||
<string name="alert_e13_title">Erreur de langue</string>
|
||||
</resources>
|
||||
|
|
|
@ -1,3 +1,15 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--Generated by crowdin.com-->
|
||||
<resources></resources>
|
||||
<resources>
|
||||
<string name="connection_failed">Échec de connexion</string>
|
||||
<string name="connection_lost">Connexion perdue</string>
|
||||
<string name="pairing_rejected">Appairage rejeté</string>
|
||||
<string name="socket_creation_failed">La création du Socket a échouée</string>
|
||||
<string name="timeout">Expiration</string>
|
||||
<string name="maximum_number_of_bolus_type_already_running">Nombre maximum de types de Bolus déjà en cours d\'exécution</string>
|
||||
<string name="no_active_tbr_to_cancel">Pas de DBT à annuler</string>
|
||||
<string name="no_active_tbr_to_change">Pas de DBT à changer</string>
|
||||
<string name="no_such_bolus_to_cancel">Aucun Bolus à annuler</string>
|
||||
<string name="pump_already_in_that_state_exception">Pompe déjà dans cet état</string>
|
||||
<string name="run_mode_not_allowed">Mode d\'exécution non autorisé</string>
|
||||
</resources>
|
||||
|
|
|
@ -44,6 +44,8 @@
|
|||
<string name="description_sensitivity_oref1">Sensibilité est calculée à partir des données des dernières 8 heures et des glucides (si non absorbés) ne sont plus pris en compte après le temps spécifié dans les préférences. Plugin calcule également UAM.</string>
|
||||
<string name="description_sensitivity_weighted_average">Sensibilité est calculée comme une moyenne pondérée des écarts. Les écarts les plus récents ont un poids plus élevé. L\'absorption minimale des glucides est calculée à partir des temps d’absorption des glucides max du menu préférences. Cet algorithme est le plus rapide pour s\'adapter aux changements de sensibilité.</string>
|
||||
<string name="description_source_dexcom_g5">Recevoir les valeurs de glycémie de l’app Dexcom G5 patchée.</string>
|
||||
<string name="description_source_dexcom_g6">Recevoir les valeurs de glycémie de l’app Dexcom G6 patchée.</string>
|
||||
<string name="description_source_eversense">Recevoir les valeurs de glycémie de l’app Eversense patchée.</string>
|
||||
<string name="description_source_glimp">Recevoir les glycémies depuis Glimp.</string>
|
||||
<string name="description_source_mm640g">Recevoir les glycémies depuis le 600SeriesAndroidUploder.</string>
|
||||
<string name="description_source_ns_client">Télécharge les glycémies depuis Nightscout</string>
|
||||
|
@ -52,6 +54,7 @@
|
|||
<string name="description_wear">Surveillez et contrôlez AndroidAPS en utilisant votre montre WearOS.</string>
|
||||
<string name="description_xdrip_status_line">Afficher les informations de votre Boucle sur votre écran de montre xDrip+.</string>
|
||||
<string name="description_sms_communicator">Commander à distance AndroidAPS en utilisant les commandes SMS.</string>
|
||||
<string name="objectives_button_back">Retour</string>
|
||||
<string name="objectives_button_start">Démarrer</string>
|
||||
<string name="objectives_button_verify">Vérifier</string>
|
||||
<string name="nsprofileview_units_label">Unités</string>
|
||||
|
@ -264,12 +267,11 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
|
|||
<string name="smscommunicator_bolusreplywithcode">Renvoyer le code %2$s pour injecter le bolus %1$.2fU</string>
|
||||
<string name="smscommunicator_calibrationreplywithcode">Renvoyer le code %2$s pour envoyer la calibration %1$.2f</string>
|
||||
<string name="smscommunicator_bolusfailed">Échec du Bolus</string>
|
||||
<string name="bolusdelivered" formatted="false">Bolus %.2fU délivré avec succès</string>
|
||||
<string name="bolusrequested" formatted="false">%.2fU va être injecté</string>
|
||||
<string name="smscommunicator_bolusdelivered" formatted="false">%.2fU de bolus injecté avec succès</string>
|
||||
<string name="bolusdelivering" formatted="false">En train d\'injecter %.2fU</string>
|
||||
<string name="bolusdelivered">Bolus %1$.2fU délivré avec succès</string>
|
||||
<string name="bolusrequested">%1$.2fU vont être injectées</string>
|
||||
<string name="smscommunicator_bolusdelivered">Bolus %1$.2fU délivré avec succès</string>
|
||||
<string name="bolusdelivering">En train d\'injecter %1$.2fU</string>
|
||||
<string name="smscommunicator_remotecommandsallowed">Autoriser les commandes à distance par SMS</string>
|
||||
<string name="smscommunicator_remotebolusnotallowed">Bolus à distance non autorisé</string>
|
||||
<string name="glucosetype_finger">Doigt</string>
|
||||
<string name="glucosetype_sensor">Capteur</string>
|
||||
<string name="manual">Manuel</string>
|
||||
|
@ -337,16 +339,25 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
|
|||
<string name="smscommunicator_loopisenabled">La Boucle est activée</string>
|
||||
<string name="valuelimitedto">%1$.2f limité à %2$.2f</string>
|
||||
<string name="valueoutofrange" formatted="false">La valeur %s est hors des limites strictes</string>
|
||||
<string name="smscommunicator_remotebasalnotallowed">Le réglage du basal à distance n\'est pas autorisé</string>
|
||||
<string name="smscommunicator_remotecommandnotallowed">La commande à distance n\'est pas autorisée</string>
|
||||
<string name="smscommunicator_basalreplywithcode">Envoyer le code %2$s pour initier le basal %1$.2fU/h</string>
|
||||
<string name="smscommunicator_remotebolusnotallowed">Bolus à distance non disponible. Réessayez plus tard.</string>
|
||||
<string name="smscommunicator_basalreplywithcode">Pour démarrer Basal %1$.2fU/h pendant %2$d min, renvoyer le code %3$s</string>
|
||||
<string name="smscommunicator_profilereplywithcode">Pour changer le profil vers %1$s %2$d%%, renvoyer le code %3$s</string>
|
||||
<string name="smscommunicator_extendedreplywithcode">Pour démarrer le Bolus étendu %1$.2fU pendant %2$d min, renvoyer le code %3$s</string>
|
||||
<string name="smscommunicator_basalpctreplywithcode">Pour démarrer le Basal %1$d% pendant %2$d min, renvoyer le code %3$s</string>
|
||||
<string name="smscommunicator_suspendreplywithcode">Envoyer le code %2$s pour suspendre la Boucle pour %1$d minutes</string>
|
||||
<string name="smscommunicator_tempbasalset">Démarrage réussi pour %1$.2fU/h de basal temporaire pour %2$d min</string>
|
||||
<string name="smscommunicator_extendedset">Le Bolus étendu %1$.2fU pendant %2$d min a commencé avec succès</string>
|
||||
<string name="smscommunicator_tempbasalset_percent">Démarrage réussi pour %1$d%% de Basal temporaire pour %2$d min</string>
|
||||
<string name="smscommunicator_tempbasalfailed">Le démarrage du basal temporaire a échoué</string>
|
||||
<string name="smscommunicator_basalstopreplywithcode" formatted="false">Envoyer le code %s pour arrêter le basal temporaire</string>
|
||||
<string name="smscommunicator_extendedfailed">Le départ du Bolus étendu a échoué</string>
|
||||
<string name="smscommunicator_basalstopreplywithcode">Envoyer le code %1$s pour arrêter le Basal temporaire</string>
|
||||
<string name="smscommunicator_extendedstopreplywithcode">Pour arrêter le Bolus étendu, renvoyer le code %1$s</string>
|
||||
<string name="smscommunicator_tempbasalcanceled">Basal temporaire annulé</string>
|
||||
<string name="smscommunicator_extendedcanceled">Bolus étendu annulé</string>
|
||||
<string name="smscommunicator_tempbasalcancelfailed">Echec de l\'annulation du basal temporaire</string>
|
||||
<string name="smscommunicator_unknowncommand">Commande inconnue ou fausse réponse</string>
|
||||
<string name="smscommunicator_extendedcancelfailed">Échec de l\'annulation du Bolus étendu</string>
|
||||
<string name="smscommunicator_unknowncommand">Commande inconnue ou mauvaise réponse</string>
|
||||
<string name="quickwizard">Assistant Rapide</string>
|
||||
<string name="quickwizardsettings">Paramètres de l\'Assistant Rapide</string>
|
||||
<string name="overview_editquickwizard_buttontext">Texte du bouton :</string>
|
||||
|
@ -409,6 +420,7 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
|
|||
<string name="array_of_elements">Tableau de %1$d éléments.\nValeur Actuelle :</string>
|
||||
<string name="openapsma_autosensdata_label">Données Autosens</string>
|
||||
<string name="openapsma_scriptdebugdata_label">Débogage du Script</string>
|
||||
<string name="openapsama_useautosens">Utiliser la fonction Autosens</string>
|
||||
<string name="refresheventsfromnightscout">Actualiser les événements depuis NS</string>
|
||||
<string name="deletefuturetreatments">Supprimer les futurs traitements</string>
|
||||
<string name="eatingsoon">Repas imminent</string>
|
||||
|
@ -469,7 +481,6 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
|
|||
<string name="send_calibration" formatted="false">Transmettre l\'étalonnage %.1f à xDrip ?</string>
|
||||
<string name="xdripnotinstalled">xDrip+ n\'est pas installé</string>
|
||||
<string name="calibrationsent">Étalonnage envoyé à xDrip</string>
|
||||
<string name="smscommunicator_remotecalibrationnotallowed">L\'étalonnage à distance n\'est pas autorisé</string>
|
||||
<string name="smscommunicator_calibrationsent">Étalonnage envoyé. La réception doit être activée dans xDrip.</string>
|
||||
<string name="smscommunicator_calibrationfailed">xDrip ne reçoit pas les étalonnages</string>
|
||||
<string name="pumpsuspended">Pompe arrêtée</string>
|
||||
|
@ -550,6 +561,12 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
|
|||
<string name="insulin_shortname">INS</string>
|
||||
<string name="enablesuperbolus">Activer les Superbolus dans l’Assistant</string>
|
||||
<string name="enablesuperbolus_summary">Activer la fonctionnalité SuperBolus dans l’Assistant. Ne pas l’activer avant de bien comprendre comment cela fonctionne réellement. IL PEUT PROVOQUER UNE OVERDOSE D’INSULINE SI UTILISÉ AVEUGLÉMENT !</string>
|
||||
<string name="show_statuslights">Afficher les lumières d\'état sur l\'écran d\'accueil</string>
|
||||
<string name="show_statuslights_summary">Activer les lumières d\'état pour AgeC, AgeI, AgeS, niveaux du réservoir et de batterie sur l\'écran d\'accueil.</string>
|
||||
<string name="statuslights_res_warning">Seuil d\'avertissement de niveau du réservoir [U]</string>
|
||||
<string name="statuslights_res_critical">Seuil critique de niveau du réservoir [U]</string>
|
||||
<string name="statuslights_bat_warning">Seuil d’avertissement du niveau de batterie [%]</string>
|
||||
<string name="statuslights_bat_critical">Seuil critique du niveau de la batterie [%]</string>
|
||||
<string name="iob">IA</string>
|
||||
<string name="cob">GA</string>
|
||||
<string name="virtualpump_firmware_label">Firmware</string>
|
||||
|
@ -704,7 +721,10 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
|
|||
<string name="btwatchdog_title">BT Watchdog</string>
|
||||
<string name="btwatchdog_summary">Ceci va arrêter le Bluetooth du téléphone pour une seconde si la connexion pompe n’est pas possible. Cela peut assister certains téléphones dont la connexion Bluetooth se bloque.</string>
|
||||
<string name="DexcomG5">App Dexcom G5 (adaptée)</string>
|
||||
<string name="DexcomG6">App DexcomG6 (patché)</string>
|
||||
<string name="eversense">App Eversense (patché)</string>
|
||||
<string name="dexcomg5_nsupload_title">Remonter les données glycémiques vers NS</string>
|
||||
<string name="bgsource_upload">Paramètres de téléchargement des glycémies</string>
|
||||
<string name="wear_detailed_delta_title">Afficher le delta détaillé</string>
|
||||
<string name="wear_detailed_delta_summary">Afficher delta avec une décimale supplémentaire</string>
|
||||
<string name="smbmaxminutes_summary">Max. minutes de basal pour limiter le SMB</string>
|
||||
|
@ -770,6 +790,7 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
|
|||
<string name="combo_error_bolus_verification_failed">L\'administration de bolus et la vérification de l\'historique de la pompe ont échoué. Vérifiez la pompe manuellement. Si un bolus a été administré, il sera ajouté aux traitements au cours de la prochaine connexion avec la pompe.</string>
|
||||
<string name="combo_reservoir_level_insufficient_for_bolus">Pas assez d\'insuline dans le réservoir pour le bolus</string>
|
||||
<string name="extendedbolusdeliveryerror">Erreur administration bolus étendu</string>
|
||||
<string name="insightpump_shortname">Vue</string>
|
||||
<string name="insightpump">Pompe Insight</string>
|
||||
<string name="status_no_colon">État</string>
|
||||
<string name="changed">Modifié</string>
|
||||
|
@ -844,6 +865,7 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
|
|||
<string name="data_choices">Choix de données</string>
|
||||
<string name="fabric_upload">Téléchargement Fabric</string>
|
||||
<string name="allow_automated_crash_reporting">Autoriser l\'envoi automatique des rapports d\'erreur et des données d\'utilisation aux développeurs via le service fabric.io</string>
|
||||
<string name="g5appnotdetected">SVP actualisez votre app Dexcom vers une version compatible</string>
|
||||
<string name="start_activity_tt">Début Activités</string>
|
||||
<string name="start_eating_soon_tt">Début Repas Imminent</string>
|
||||
<string name="temptargetshort">Traitement</string>
|
||||
|
@ -1009,6 +1031,7 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
|
|||
<string name="nth_objective">%1$d. Objectif</string>
|
||||
<string name="poctech">Poctech</string>
|
||||
<string name="description_source_poctech">Recevoir les glycémies depuis l\'app Poctech</string>
|
||||
<string name="description_source_tomato">Recevoir les valeurs de glycémie de l\'application Tomato (appareil MiaoMiao)</string>
|
||||
<string name="high_temptarget_raises_sensitivity_title">Cible temp. haute élève la sensibilité</string>
|
||||
<string name="high_temptarget_raises_sensitivity_summary"><![CDATA[Augmente la Sensibilité pour les cibles temporaires >= 100]]></string>
|
||||
<string name="low_temptarget_lowers_sensitivity_title">Cible temp. basse abaisse la sensibilité</string>
|
||||
|
@ -1051,10 +1074,87 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
|
|||
<string name="loop_openmode_min_change">Changement minimum possible [%]</string>
|
||||
<string name="loop_openmode_min_change_summary">Le fonctionnement de la Boucle demandera une confirmation uniquement si le changement est supérieur à cette valeur. Par défaut, la valeur est 20%</string>
|
||||
<string name="pairfirst">Appairez SVP votre pompe avec votre téléphone !</string>
|
||||
<string name="searching_for_devices">Recherche d\'appareils en cours…</string>
|
||||
<string name="please_wait">Merci de patienter...</string>
|
||||
<string name="pairing_completed">Appairage terminé</string>
|
||||
<string name="code_compare">Les codes affichés sur cet appareil et sur la pompe sont-ils identiques ?</string>
|
||||
<string name="insight_pairing">Appairage de Insight</string>
|
||||
<string name="insight_local">Accu-Chek Insight</string>
|
||||
<string name="insight_delivered">%1$.2fU / %2$.2fU injecté</string>
|
||||
<string name="insight_alert_formatter">%1$s : %2$s</string>
|
||||
<string name="tube_changed">Tubulure changée</string>
|
||||
<string name="pump_time_updated">Mise à jour de l\'heure de la pompe</string>
|
||||
<string name="confirm">Confirmer</string>
|
||||
<string name="mute_alert">Coupure son</string>
|
||||
<string name="pump_alert">Alerte de la pompe</string>
|
||||
<string name="log_site_changes">Enreg. changement de site</string>
|
||||
<string name="log_tube_changes">Enreg. changement de tubulure</string>
|
||||
<string name="log_battery_changes">Enreg. changement batterie</string>
|
||||
<string name="log_operating_mode_changes">Enreg. changement mode de fonctionnement</string>
|
||||
<string name="log_alerts">Enreg. alertes</string>
|
||||
<string name="enable_tbr_emulation">Activer l’émulation de DBT</string>
|
||||
<string name="enable_tbr_emulation_summary">Utilisez des Bolus étendus au lieu de DBTs pour contourner la limite de 250%</string>
|
||||
<string name="disconnect_delay">Délai de déconnexion [s]</string>
|
||||
<string name="serial_number">Numéro de série</string>
|
||||
<string name="release_software_version">Version du logiciel</string>
|
||||
<string name="ui_processor_software_version">Version du logiciel de processeur UI</string>
|
||||
<string name="pc_processor_software_version">Version du logiciel du processeur PC</string>
|
||||
<string name="md_tel_processor_software_version">Version du logiciel MD tel processeur</string>
|
||||
<string name="safety_processor_software_version">Version logicielle du processeur de sécurité</string>
|
||||
<string name="bt_info_page_version">Version de la page d\'info BT</string>
|
||||
<string name="bluetooth_address">Adresse Bluetooth</string>
|
||||
<string name="system_id_appendix">Annexe ID Système</string>
|
||||
<string name="manufacturing_date">Date de fabrication</string>
|
||||
<string name="delete_pairing">Supprimer l’appairage</string>
|
||||
<string name="pairing_information">Information sur l’appairage</string>
|
||||
<string name="refreh_status">Actualiser le status</string>
|
||||
<string name="start_pump">Démarrer la pompe</string>
|
||||
<string name="stop_pump">Arrêter la pompe</string>
|
||||
<string name="operating_mode">Mode de fonctionnement</string>
|
||||
<string name="insight_status">État</string>
|
||||
<string name="tdd_bolus">Bolus DTI</string>
|
||||
<string name="tdd_basal">DTI basale</string>
|
||||
<string name="tdd_total">Total DTI</string>
|
||||
<string name="recovering">Récupération en cours.</string>
|
||||
<string name="not_paired">Non appairé</string>
|
||||
<string name="last_connected">Dernière connexion</string>
|
||||
<string name="started">Démarré</string>
|
||||
<string name="stopped">Arrêté</string>
|
||||
<string name="tbr_formatter">%1$d%% pour %2$d / %3$d min</string>
|
||||
<string name="extended_bolus">Bolus étendu</string>
|
||||
<string name="multiwave_bolus">Bolus mixte</string>
|
||||
<string name="eb_formatter">%1$.2f / %2$.2f U pour %3$d min</string>
|
||||
<string name="enable_tbr_over_notification">Activer la notification de la fin DBT\n(réglage de pompe)</string>
|
||||
<string name="disable_tbr_over_notification">Activer la notification de la fin de DBT\n(réglage de pompe)</string>
|
||||
<string name="refresh">Actualiser</string>
|
||||
<string name="description_pump_insight_local">Intégration des pompes Accu-Chek Insight</string>
|
||||
<string name="not_inserted">Non inséré</string>
|
||||
<string name="short_status_last_connected">Dernière conn : il y a %1$d min</string>
|
||||
<string name="short_status_tbr">DBT : %1$d%% pour %2$d / %3$d min</string>
|
||||
<string name="short_status_extended">Étendue : %1$.2f / %2$.2f U pour %3$d min</string>
|
||||
<string name="short_status_multiwave">Mixte : %1$.2f / %2$.2f U pour %3$d min</string>
|
||||
<string name="short_status_tdd">DTI : %1$.2f</string>
|
||||
<string name="short_status_reservoir">Réserv. : %1$.2fU</string>
|
||||
<string name="short_status_battery">Batt.: %1$d%%</string>
|
||||
<string name="max_recovery_duration">Durée max. de récupération [s]</string>
|
||||
<string name="min_recovery_duration">Durée min. de récupération [s]</string>
|
||||
<string name="recovery_duration">Durée de récupération</string>
|
||||
<string name="timeout_during_handshake">Expiration pendant l\'appairage - réinitialiser le Bluetooth</string>
|
||||
<string name="profile_total">== ∑ %1$s U</string>
|
||||
<string name="profile_ins_units_per_hout">U/h</string>
|
||||
<string name="profile_carbs_per_unit">g/U</string>
|
||||
<string name="profile_per_unit">/U</string>
|
||||
<string name="dexcom_lognssensorchange_title">Enreg. du changement de capteur sur NS</string>
|
||||
<string name="dexcom_lognssensorchange_summary">Créer automatiquement sur NS un événement \"Changement de capteur\" au démarrage du capteur</string>
|
||||
<string name="tomato">Tomato (MiaoMiao)</string>
|
||||
<string name="tomato_short">Tomato</string>
|
||||
<string name="dst_in_24h_warning">Changement d\'heure d\'été dans moins de 24 heures</string>
|
||||
<string name="storage">stockage interne limité</string>
|
||||
<string name="diskfull">Boucle désactivée ! Libérez au moins %1$d Mo du stockage interne !</string>
|
||||
<string name="wrongformat">Format incorrect</string>
|
||||
<string name="sms_wrongcode">Code incorrect. Commande annulée.</string>
|
||||
<string name="notconfigured">Non configuré</string>
|
||||
<string name="profileswitchcreated">Changement de profil effectué</string>
|
||||
<plurals name="objective_days">
|
||||
<item quantity="one">%1$d jour</item>
|
||||
<item quantity="other">%1$d jours</item>
|
||||
|
|
|
@ -263,12 +263,7 @@
|
|||
<string name="smscommunicator_bolusreplywithcode">Per fornire risposta %1$.2fU bolo con codice %2$s</string>
|
||||
<string name="smscommunicator_calibrationreplywithcode">Invia la taratura %1$.2f risposta con codice %2$s</string>
|
||||
<string name="smscommunicator_bolusfailed">Bolo fallito</string>
|
||||
<string name="bolusdelivered" formatted="false">Bolo %.2fU inviato correttamente</string>
|
||||
<string name="bolusrequested" formatted="false">Inviando %.2fU</string>
|
||||
<string name="smscommunicator_bolusdelivered" formatted="false">Bolo %.2fU inviato correttamente</string>
|
||||
<string name="bolusdelivering" formatted="false">Inviare %.2fU</string>
|
||||
<string name="smscommunicator_remotecommandsallowed">Consenti comandi remoti tramite SMS</string>
|
||||
<string name="smscommunicator_remotebolusnotallowed">Il bolo da remoto non e\' permesso</string>
|
||||
<string name="glucosetype_finger">Dito</string>
|
||||
<string name="glucosetype_sensor">Sensore</string>
|
||||
<string name="manual">Manuale</string>
|
||||
|
@ -336,16 +331,12 @@
|
|||
<string name="smscommunicator_loopisenabled">Loop abilitato</string>
|
||||
<string name="valuelimitedto">%1$.2f limitato a %2$.2f</string>
|
||||
<string name="valueoutofrange" formatted="false">Valore %s è fuori limiti massimi</string>
|
||||
<string name="smscommunicator_remotebasalnotallowed">Impostare basale da remoto non e\' permesso</string>
|
||||
<string name="smscommunicator_remotecommandnotallowed">il comando da remoto non e\' permesso</string>
|
||||
<string name="smscommunicator_basalreplywithcode">Per iniziare basale %1$.2fU/h risposta con codice %2$s</string>
|
||||
<string name="smscommunicator_suspendreplywithcode">Sospendi il loop per %1$d minuti riprendi %2$s</string>
|
||||
<string name="smscommunicator_tempbasalset">Basale temporanea %1$.2fU/h for %2$d min avviata con successo</string>
|
||||
<string name="smscommunicator_tempbasalfailed">Avvio Basale temporanea fallita</string>
|
||||
<string name="smscommunicator_basalstopreplywithcode" formatted="false">Per interrompere la risposta basale della temperatura con il codice %s</string>
|
||||
<string name="smscommunicator_tempbasalcanceled">Baasale temporanea cancellata</string>
|
||||
<string name="smscommunicator_tempbasalcancelfailed">Cancellazione temporanea fallita</string>
|
||||
<string name="smscommunicator_unknowncommand">Comando errato</string>
|
||||
<string name="quickwizard">QuickWizard</string>
|
||||
<string name="quickwizardsettings">Impostazioni QuickWizard</string>
|
||||
<string name="overview_editquickwizard_buttontext">Tasto testo:</string>
|
||||
|
@ -468,7 +459,6 @@
|
|||
<string name="send_calibration" formatted="false">Invia calibrazione %.1f a xDrip?</string>
|
||||
<string name="xdripnotinstalled">xDrip non installato</string>
|
||||
<string name="calibrationsent">Invio calibrazione xDrip</string>
|
||||
<string name="smscommunicator_remotecalibrationnotallowed">La calibrazione da remoto non e\' permesso</string>
|
||||
<string name="smscommunicator_calibrationsent">La calibrazione è stata inviata. La ricezione deve essere abilitata in xDrip.</string>
|
||||
<string name="smscommunicator_calibrationfailed">xDrip non ha ricevuto la calibrazione</string>
|
||||
<string name="pumpsuspended">Sospensione Micro</string>
|
||||
|
|
|
@ -263,12 +263,7 @@
|
|||
<string name="smscommunicator_bolusreplywithcode">Bolus %1$.2fU 을 주입하려면 %2$s 를 입력하고 답장하세요</string>
|
||||
<string name="smscommunicator_calibrationreplywithcode">보정값 %1$.2f을 전송하려면 %2$s 를 입력하고 답장하세요</string>
|
||||
<string name="smscommunicator_bolusfailed">Bolus failed</string>
|
||||
<string name="bolusdelivered" formatted="false">Bolus %.2fU이 주입되었습니다.</string>
|
||||
<string name="bolusrequested" formatted="false">%.2fU 주입 예정입니다.</string>
|
||||
<string name="smscommunicator_bolusdelivered" formatted="false">Bolus %.2fU delivered successfully</string>
|
||||
<string name="bolusdelivering" formatted="false">%.2fU 주입중</string>
|
||||
<string name="smscommunicator_remotecommandsallowed">SMS 원격 명령 사용하기</string>
|
||||
<string name="smscommunicator_remotebolusnotallowed">원격 Bolus 허용되지 않음</string>
|
||||
<string name="glucosetype_finger">체혈</string>
|
||||
<string name="glucosetype_sensor">센서</string>
|
||||
<string name="manual">수동</string>
|
||||
|
@ -336,16 +331,12 @@
|
|||
<string name="smscommunicator_loopisenabled">Loop가 실행중입니다.</string>
|
||||
<string name="valuelimitedto">%1$.2f, %2$.2f으로 제한됨</string>
|
||||
<string name="valueoutofrange" formatted="false">%s값이 하드한계(Hard Limit)를 벗어났습니다</string>
|
||||
<string name="smscommunicator_remotebasalnotallowed">원격 Basal 설정이 허가되지 않았습니다</string>
|
||||
<string name="smscommunicator_remotecommandnotallowed">원격 명령이 허가되지 않았습니다</string>
|
||||
<string name="smscommunicator_basalreplywithcode">Basal %1$.2fU/h 을 주입하려면 %2$s 를 입력하고 답장하세요</string>
|
||||
<string name="smscommunicator_suspendreplywithcode">%1$d분동안 Loop 일시중지하려면 %2$s 를 입력하고 답장하세요</string>
|
||||
<string name="smscommunicator_tempbasalset">Temp Basal %1$.2fU/h for %2$d min started successfully</string>
|
||||
<string name="smscommunicator_tempbasalfailed">Temp Basal start failed</string>
|
||||
<string name="smscommunicator_basalstopreplywithcode" formatted="false">임시Basal을 중지하려면 %s 를 입력하고 답장하세요</string>
|
||||
<string name="smscommunicator_tempbasalcanceled">Temp Basal canceled</string>
|
||||
<string name="smscommunicator_tempbasalcancelfailed">Canceling Temp Basal failed</string>
|
||||
<string name="smscommunicator_unknowncommand">알려지지 않은 명령이거나 잘못된 답장입니다.</string>
|
||||
<string name="quickwizard">빠른마법사</string>
|
||||
<string name="quickwizardsettings">빠른마법사 설정</string>
|
||||
<string name="overview_editquickwizard_buttontext">버튼명:</string>
|
||||
|
@ -468,7 +459,6 @@
|
|||
<string name="send_calibration" formatted="false">보정값 %.1f을 xDrip에 전송하시겠습니까?</string>
|
||||
<string name="xdripnotinstalled">xDrip+가 설치되지 않았습니다</string>
|
||||
<string name="calibrationsent">보정이 xDrip으로 전송되었습니다</string>
|
||||
<string name="smscommunicator_remotecalibrationnotallowed">원격보정이 허용되지 않았습니다</string>
|
||||
<string name="smscommunicator_calibrationsent">보정 전송됨. xDrip에서 수신이 되도록 설정되어 있어야 합니다.</string>
|
||||
<string name="smscommunicator_calibrationfailed">xDrip에서 보정을 받지 못합니다.</string>
|
||||
<string name="pumpsuspended">펌프 일시중지됨</string>
|
||||
|
|
|
@ -265,12 +265,7 @@
|
|||
<string name="smscommunicator_bolusreplywithcode">Om de bolus %1$.2fU toe te dienen antwoord met de code %2$s</string>
|
||||
<string name="smscommunicator_calibrationreplywithcode">Om calibratie %1$.2f te verzenden antwoord met de code %2$s</string>
|
||||
<string name="smscommunicator_bolusfailed">Bolus mislukt</string>
|
||||
<string name="bolusdelivered" formatted="false">Bolus %.2fU succesvol toegediend</string>
|
||||
<string name="bolusrequested" formatted="false">Klaar om %.2fE toe te dienen</string>
|
||||
<string name="smscommunicator_bolusdelivered" formatted="false">Bolus %.2fU succesvol toegediend</string>
|
||||
<string name="bolusdelivering" formatted="false">Toedienen %.2fU</string>
|
||||
<string name="smscommunicator_remotecommandsallowed">Sta SMS commando\'s toe</string>
|
||||
<string name="smscommunicator_remotebolusnotallowed">Bolus via sms niet toegestaan</string>
|
||||
<string name="glucosetype_finger">Vingerprik</string>
|
||||
<string name="glucosetype_sensor">Sensor</string>
|
||||
<string name="manual">Manueel</string>
|
||||
|
@ -339,16 +334,12 @@ Stel in en gebruik tijdelijk en standaard tijdelijke streefdoelen (bv. bij sport
|
|||
<string name="smscommunicator_loopisenabled">Loop is ingeschakeld</string>
|
||||
<string name="valuelimitedto">%1$.2f gelimiteerd tot %2$.2f</string>
|
||||
<string name="valueoutofrange" formatted="false">Waarde %s is buiten de toegestane limieten</string>
|
||||
<string name="smscommunicator_remotebasalnotallowed">Basale instellingen op afstand zijn niet toegestaan</string>
|
||||
<string name="smscommunicator_remotecommandnotallowed">Commando\'s op afstand zijn niet toegestaan</string>
|
||||
<string name="smscommunicator_basalreplywithcode">Om het basaal %1$.2fE/uur te starten antwoord met de code %2$s</string>
|
||||
<string name="smscommunicator_suspendreplywithcode">Om de loop te onderbreken voor %1$d minuten antwoord met de code %2$s</string>
|
||||
<string name="smscommunicator_tempbasalset">Tijdelijk basaal %1$.2fE/u voor %2$d minuten succesvol gestart</string>
|
||||
<string name="smscommunicator_tempbasalfailed">Start tijdelijk basaal mislukt</string>
|
||||
<string name="smscommunicator_basalstopreplywithcode" formatted="false">Om het tijdelijke basaal te stoppen antwoord met de code %s</string>
|
||||
<string name="smscommunicator_tempbasalcanceled">Tijdelijk basaal afgebroken</string>
|
||||
<string name="smscommunicator_tempbasalcancelfailed">Afbreken van tijdelijk basaal mislukt</string>
|
||||
<string name="smscommunicator_unknowncommand">Onbekend commando of verkeerd antwoord</string>
|
||||
<string name="quickwizard">Vaste maaltijd</string>
|
||||
<string name="quickwizardsettings">Vaste maaltijd instellingen</string>
|
||||
<string name="overview_editquickwizard_buttontext">Naam:</string>
|
||||
|
@ -472,7 +463,6 @@ Stel in en gebruik tijdelijk en standaard tijdelijke streefdoelen (bv. bij sport
|
|||
<string name="send_calibration" formatted="false">Verzend calibratie %.1f naar xDrip?</string>
|
||||
<string name="xdripnotinstalled">xDrip+ niet geïnstalleerd</string>
|
||||
<string name="calibrationsent">Kalibratie naar xDrip verzonden</string>
|
||||
<string name="smscommunicator_remotecalibrationnotallowed">Kalibratie op afstand is niet toegestaan</string>
|
||||
<string name="smscommunicator_calibrationsent">Kalibratie verzonden. Het ontvangen van kalibraties moet actief zijn in xDrip.</string>
|
||||
<string name="smscommunicator_calibrationfailed">XDrip ontvangt geen kalibraties</string>
|
||||
<string name="pumpsuspended">Pomp onderbreken</string>
|
||||
|
@ -633,7 +623,7 @@ Stel in en gebruik tijdelijk en standaard tijdelijke streefdoelen (bv. bij sport
|
|||
<string name="careportal_activity_label">ACTIVITEIT & FEEDBACK</string>
|
||||
<string name="careportal_carbsandbolus_label">KOOLHYDRATEN & BOLUS</string>
|
||||
<string name="careportal_cgm_label">CGM & OPENAPS</string>
|
||||
<string name="careportal_pump_label">POMO</string>
|
||||
<string name="careportal_pump_label">POMP</string>
|
||||
<string name="overview_newtempbasal_basalabsolute">Basale waarde [E/uur]</string>
|
||||
<string name="careportal_newnstreatment_duration_min_label">Tijdsduur [min]</string>
|
||||
<string name="openapssmb">OpenAPS SMB</string>
|
||||
|
@ -1140,6 +1130,9 @@ Stel in en gebruik tijdelijk en standaard tijdelijke streefdoelen (bv. bij sport
|
|||
<string name="dexcom_lognssensorchange_summary">Noteer automatisch \"Sensor Wissel\" in NS bij starten van sensor</string>
|
||||
<string name="tomato">Tomato (MiaoMiao)</string>
|
||||
<string name="tomato_short">Tomato</string>
|
||||
<string name="dst_in_24h_warning">Zomer/wintertijd omschakeling binnen 24 uur</string>
|
||||
<string name="storage">interne opslag bijna vol</string>
|
||||
<string name="diskfull">Maak minstens %1$d MB vrij in interne opslag! Loop is uitgeschakeld!</string>
|
||||
<plurals name="objective_days">
|
||||
<item quantity="one">%1$d dag</item>
|
||||
<item quantity="other">%1$d dag</item>
|
||||
|
|
|
@ -265,12 +265,7 @@
|
|||
<string name="smscommunicator_bolusreplywithcode">Aby dostarczyć bolus %1$.2fU wprowadź kod %2$s</string>
|
||||
<string name="smscommunicator_calibrationreplywithcode">Aby wysłać kalibrację %1$.2f wprowadź kod %2$s</string>
|
||||
<string name="smscommunicator_bolusfailed">Bolus nieudany</string>
|
||||
<string name="bolusdelivered" formatted="false">Bolus %.2fU dostarczony</string>
|
||||
<string name="bolusrequested" formatted="false">Zamierzam dostarczyć %.2fU</string>
|
||||
<string name="smscommunicator_bolusdelivered" formatted="false">Bolus %.2fU dostarczony</string>
|
||||
<string name="bolusdelivering" formatted="false">Dostarczam %.2fU</string>
|
||||
<string name="smscommunicator_remotecommandsallowed">Zezwalaj na komendy zdalne via SMS</string>
|
||||
<string name="smscommunicator_remotebolusnotallowed">Bolus zdalny nie dozwolony</string>
|
||||
<string name="glucosetype_finger">Palec</string>
|
||||
<string name="glucosetype_sensor">Sensor</string>
|
||||
<string name="manual">Ręczne</string>
|
||||
|
@ -338,16 +333,12 @@
|
|||
<string name="smscommunicator_loopisenabled">Pętla (Loop) jest włączona</string>
|
||||
<string name="valuelimitedto">%1$.2f ograniczone do %2$.2f</string>
|
||||
<string name="valueoutofrange" formatted="false">Wartość %s jest poza dopuszczalną granicą</string>
|
||||
<string name="smscommunicator_remotebasalnotallowed">Ustawienie zdalnej bazy nie jest dozwolone</string>
|
||||
<string name="smscommunicator_remotecommandnotallowed">Zdalne komendy nie są dozwolone</string>
|
||||
<string name="smscommunicator_basalreplywithcode">Aby rozpocząć bazę %1$.2fU/h odpowiedz kodem %2$s</string>
|
||||
<string name="smscommunicator_suspendreplywithcode">Aby wstrzymać pętle na %1$d minut odpowiedz kodem %2$s</string>
|
||||
<string name="smscommunicator_tempbasalset">Tymczasowa baza %1$.2fU/h przez %2$d min rozpoczęta</string>
|
||||
<string name="smscommunicator_tempbasalfailed">Rozpoczęcie tymczasowej bazy nie powiodło się</string>
|
||||
<string name="smscommunicator_basalstopreplywithcode" formatted="false">Aby zatrzymać bazę tymczasową odpowiedz kodem %s</string>
|
||||
<string name="smscommunicator_tempbasalcanceled">Baza tymczasowa anulowana</string>
|
||||
<string name="smscommunicator_tempbasalcancelfailed">Anulowanie tymczasowej bazy nie powiodło się</string>
|
||||
<string name="smscommunicator_unknowncommand">Nieznane polecenie lub błędna odpowiedź</string>
|
||||
<string name="quickwizard">Bolus zdefiniowany</string>
|
||||
<string name="quickwizardsettings">Ustaw szybkie bolusy</string>
|
||||
<string name="overview_editquickwizard_buttontext">Tekst przycisku:</string>
|
||||
|
@ -471,7 +462,6 @@
|
|||
<string name="send_calibration" formatted="false">Wysłać kalibrację %.1f do xDrip?</string>
|
||||
<string name="xdripnotinstalled">xDrip+ nie zainstalowany</string>
|
||||
<string name="calibrationsent">Kalibracja przesłana do xDrip</string>
|
||||
<string name="smscommunicator_remotecalibrationnotallowed">Zdalna kalibracja nie dozwolona</string>
|
||||
<string name="smscommunicator_calibrationsent">Kalibracja wysłana. Odbiór musi być dozwolony w xDrip.</string>
|
||||
<string name="smscommunicator_calibrationfailed">xDrip nie odbiera kalibracji</string>
|
||||
<string name="pumpsuspended">Pompa wstrzymana</string>
|
||||
|
|
|
@ -1,3 +1,30 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--Generated by crowdin.com-->
|
||||
<resources></resources>
|
||||
<resources>
|
||||
<string name="alert_r1_code">Lembrete R1</string>
|
||||
<string name="alert_r2_code">Lembrete R2</string>
|
||||
<string name="alert_r3_code">Lembrete R3</string>
|
||||
<string name="alert_r4_code">Lembrete R4</string>
|
||||
<string name="alert_r7_code">Lembrete R7</string>
|
||||
<string name="alert_w31_code">Aviso W31</string>
|
||||
<string name="alert_w32_code">Aviso W32</string>
|
||||
<string name="alert_w33_code">Aviso W33</string>
|
||||
<string name="alert_w34_code">Aviso W34</string>
|
||||
<string name="alert_w36_code">Aviso W36</string>
|
||||
<string name="alert_w38_code">Aviso W38</string>
|
||||
<string name="alert_w39_code">Aviso W39</string>
|
||||
<string name="alert_m20_code">Manutenção M20</string>
|
||||
<string name="alert_m21_code">Manutenção M21</string>
|
||||
<string name="alert_m22_code">Manutenção M22</string>
|
||||
<string name="alert_m23_code">Manutenção M23</string>
|
||||
<string name="alert_m24_code">Manutenção M24</string>
|
||||
<string name="alert_m25_code">Manutenção M25</string>
|
||||
<string name="alert_m26_code">Manutenção M26</string>
|
||||
<string name="alert_m27_code">Manutenção M27</string>
|
||||
<string name="alert_m28_code">Manutenção M28</string>
|
||||
<string name="alert_m29_code">Manutenção M29</string>
|
||||
<string name="alert_m30_code">Manutenção M30</string>
|
||||
<string name="alert_e6_code">Erro E6</string>
|
||||
<string name="alert_e10_code">Erro E10</string>
|
||||
<string name="alert_e13_code">Erro E13</string>
|
||||
</resources>
|
||||
|
|
|
@ -1,3 +1,25 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--Generated by crowdin.com-->
|
||||
<resources></resources>
|
||||
<resources>
|
||||
<string name="alert_r7_description"><![CDATA[Valor: <b>%1$d%%</b>\nDuração: <b>%2$s h</b>]]></string>
|
||||
<string name="alert_w31_description"><![CDATA[Conteúdo do cartucho: <b>%1$s U</b>]]></string>
|
||||
<string name="alert_w32_description">Trocar a bateria.</string>
|
||||
<string name="alert_w33_description">Definir hora/data.</string>
|
||||
<string name="alert_w34_description">Contatar o suporte Accu-Chek.</string>
|
||||
<string name="alert_w36_description"><![CDATA[Valor: <b>%1$d%%</b><br/>Duração: <b>%2$s h</b>]]></string>
|
||||
<string name="alert_w38_description"><![CDATA[Programado: <b>%1$s U</b><br/>Administrado: <b>%2$s U</b>]]></string>
|
||||
<string name="alert_m20_description">Inserir cartucho.</string>
|
||||
<string name="alert_m21_description">Mudar cartucho.</string>
|
||||
<string name="alert_m22_description">Trocar a bateria.</string>
|
||||
<string name="alert_m23_description">Verificar estado da bomba.</string>
|
||||
<string name="alert_m24_description">Alterar o conjunto de infusão.</string>
|
||||
<string name="alert_m25_description">Contatar o suporte Accu-Chek.</string>
|
||||
<string name="alert_m26_description">Mudar cartucho.</string>
|
||||
<string name="alert_m27_description">Reiniciar download de dados.</string>
|
||||
<string name="alert_m28_description">Verificar estado da bomba.</string>
|
||||
<string name="alert_m29_description">Definir o tipo de bateria.</string>
|
||||
<string name="alert_m30_description">Definir tipo de cartucho.</string>
|
||||
<string name="alert_e6_description">Mudar bateria e cartucho.</string>
|
||||
<string name="alert_e10_description">Mudar cartucho.</string>
|
||||
<string name="alert_e13_description">Alterar Idioma.</string>
|
||||
</resources>
|
||||
|
|
|
@ -1,9 +1,25 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--Generated by crowdin.com-->
|
||||
<resources>
|
||||
<string name="alert_r1_title">Administrar bolus</string>
|
||||
<string name="alert_r2_title">Bolus não administrado</string>
|
||||
<string name="alert_r3_title">Alarme</string>
|
||||
<string name="alert_r4_title">Mudar o conjunto de infusão</string>
|
||||
<string name="alert_r7_title">Basal temporária concluída</string>
|
||||
<string name="alert_w31_title">Reservatório quase vazio</string>
|
||||
<string name="alert_w32_title">Bateria fraca</string>
|
||||
<string name="alert_w33_title">Hora/Data inválida</string>
|
||||
<string name="alert_w34_title">Fora da Garantia</string>
|
||||
<string name="alert_w36_title">Basal temporária cancelada</string>
|
||||
<string name="alert_w38_title">Bolus cancelado</string>
|
||||
<string name="alert_m21_title">Cartucho vazio</string>
|
||||
<string name="alert_m22_title">Bateria vazia</string>
|
||||
<string name="alert_m24_title">Oclusão</string>
|
||||
<string name="alert_m26_title">Mudança de Cartucho não concluída</string>
|
||||
<string name="alert_m27_title">Falha no download de dados</string>
|
||||
<string name="alert_m28_title">Tempo limite de modo de pausa</string>
|
||||
<string name="alert_m29_title">Tipo de bateria não definido</string>
|
||||
<string name="alert_m30_title">Tipo de Cartucho não definido</string>
|
||||
<string name="alert_e6_title">Erro mecânico</string>
|
||||
<string name="alert_e13_title">Erro de idioma</string>
|
||||
</resources>
|
||||
|
|
|
@ -4,6 +4,12 @@
|
|||
<string name="connection_failed">Ligação falhou</string>
|
||||
<string name="connection_lost">Ligação perdida</string>
|
||||
<string name="pairing_rejected">Emparelhamento rejeitado</string>
|
||||
<string name="socket_creation_failed">Falha ao criar documento</string>
|
||||
<string name="timeout">Tempo expirou</string>
|
||||
<string name="maximum_number_of_bolus_type_already_running">Número máximo de bólus tipo já em execução</string>
|
||||
<string name="no_active_tbr_to_cancel">Sem basal temporária para cancelar</string>
|
||||
<string name="no_active_tbr_to_change">Sem basal temporária para alterar</string>
|
||||
<string name="no_such_bolus_to_cancel">Sem bolus para cancelar</string>
|
||||
<string name="pump_already_in_that_state_exception">A bomba já está nesse estado</string>
|
||||
<string name="run_mode_not_allowed">Modo executar não autorizado</string>
|
||||
</resources>
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,3 +1,30 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--Generated by crowdin.com-->
|
||||
<resources></resources>
|
||||
<resources>
|
||||
<string name="alert_r1_code">Reamintire R1</string>
|
||||
<string name="alert_r2_code">Reamintire R2</string>
|
||||
<string name="alert_r3_code">Reamintire R3</string>
|
||||
<string name="alert_r4_code">Reamintire R4</string>
|
||||
<string name="alert_r7_code">Reamintire R7</string>
|
||||
<string name="alert_w31_code">Avertizare W31</string>
|
||||
<string name="alert_w32_code">Avertizare W32</string>
|
||||
<string name="alert_w33_code">Avertizare W33</string>
|
||||
<string name="alert_w34_code">Avertizare W34</string>
|
||||
<string name="alert_w36_code">Avertizare W36</string>
|
||||
<string name="alert_w38_code">Avertizare W38</string>
|
||||
<string name="alert_w39_code">Avertizare W39</string>
|
||||
<string name="alert_m20_code">Mentenanță M20</string>
|
||||
<string name="alert_m21_code">Mentenanță M21</string>
|
||||
<string name="alert_m22_code">Mentenanță M22</string>
|
||||
<string name="alert_m23_code">Mentenanță M23</string>
|
||||
<string name="alert_m24_code">Mentenanță M24</string>
|
||||
<string name="alert_m25_code">Mentenanță M25</string>
|
||||
<string name="alert_m26_code">Mentenanță M26</string>
|
||||
<string name="alert_m27_code">Mentenanță M27</string>
|
||||
<string name="alert_m28_code">Mentenanță M28</string>
|
||||
<string name="alert_m29_code">Mentenanță M29</string>
|
||||
<string name="alert_m30_code">Mentenanță M30</string>
|
||||
<string name="alert_e6_code">Eroare E6</string>
|
||||
<string name="alert_e10_code">Eroare E10</string>
|
||||
<string name="alert_e13_code">Eroare E13</string>
|
||||
</resources>
|
||||
|
|
|
@ -1,3 +1,25 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--Generated by crowdin.com-->
|
||||
<resources></resources>
|
||||
<resources>
|
||||
<string name="alert_r7_description"><![CDATA[Cantitate: <b>%1$d%%</b>\nDurata: <b>%2$s h</b>]]></string>
|
||||
<string name="alert_w31_description"><![CDATA[Conţinut rezervor: <b>%1$s U</b>]]></string>
|
||||
<string name="alert_w32_description">Schimbați bateria.</string>
|
||||
<string name="alert_w33_description">Setați ora/data.</string>
|
||||
<string name="alert_w34_description">Contactați departamentul de suport Accu-Chek.</string>
|
||||
<string name="alert_w36_description"><![CDATA[Cantitate: <b>%1$d%%</b><br/>Durată: <b>%2$s h</b>]]></string>
|
||||
<string name="alert_w38_description"><![CDATA[Stabilit: <b>%1$s U</b><br/>Livrat: <b>%2$s U</b>]]></string>
|
||||
<string name="alert_m20_description">Introduceți cartușul.</string>
|
||||
<string name="alert_m21_description">Schimbați cartușul.</string>
|
||||
<string name="alert_m22_description">Schimbați bateria.</string>
|
||||
<string name="alert_m23_description">Verificați starea pompei pe ecranul acesteia.</string>
|
||||
<string name="alert_m24_description">Schimbați setul de infuzie.</string>
|
||||
<string name="alert_m25_description">Contactați departamentul de suport Accu-Chek.</string>
|
||||
<string name="alert_m26_description">Schimbați cartușul.</string>
|
||||
<string name="alert_m27_description">Reporniţi descărcarea datelor.</string>
|
||||
<string name="alert_m28_description">Verificați starea pompei pe ecranul acesteia.</string>
|
||||
<string name="alert_m29_description">Setaţi tipul de baterie.</string>
|
||||
<string name="alert_m30_description">Setaţi tipul de rezervor.</string>
|
||||
<string name="alert_e6_description">Schimbați bateria și rezervorul.</string>
|
||||
<string name="alert_e10_description">Schimbați rezervorul.</string>
|
||||
<string name="alert_e13_description">Schimbați limba.</string>
|
||||
</resources>
|
||||
|
|
|
@ -1,3 +1,30 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--Generated by crowdin.com-->
|
||||
<resources></resources>
|
||||
<resources>
|
||||
<string name="alert_r1_title">Livrează bolus</string>
|
||||
<string name="alert_r2_title">Bolus ratat</string>
|
||||
<string name="alert_r3_title">Ceas alarmă</string>
|
||||
<string name="alert_r4_title">Schimbă setul de infuzie</string>
|
||||
<string name="alert_r7_title">RBT compet</string>
|
||||
<string name="alert_w31_title">Rezervor aproape golit</string>
|
||||
<string name="alert_w32_title">Baterie aproape golită</string>
|
||||
<string name="alert_w33_title">Timp/dată incorecte</string>
|
||||
<string name="alert_w34_title">Perioada de garanție a expirat</string>
|
||||
<string name="alert_w36_title">RBT anulat</string>
|
||||
<string name="alert_w38_title">Bolus anulat</string>
|
||||
<string name="alert_w39_title">Perioada de închiriere se apropie de sfârșit</string>
|
||||
<string name="alert_m20_title">Rezervorul nu a fost instalat</string>
|
||||
<string name="alert_m21_title">Rezervor gol</string>
|
||||
<string name="alert_m22_title">Baterie epuizată</string>
|
||||
<string name="alert_m23_title">Oprire automată - pompa stopată</string>
|
||||
<string name="alert_m24_title">Ocluzie</string>
|
||||
<string name="alert_m25_title">Perioada de închiriere epuizată - nu se mai execută operațiuni</string>
|
||||
<string name="alert_m26_title">Schimbarea rezervorului nu este completă</string>
|
||||
<string name="alert_m27_title">Descărcarea datelor a eșuat</string>
|
||||
<string name="alert_m28_title">Modul de pauză a expirat</string>
|
||||
<string name="alert_m29_title">Tipul de baterie nu a fost stabilit</string>
|
||||
<string name="alert_m30_title">Tipul de rezervor nu a fost stabilit</string>
|
||||
<string name="alert_e6_title">Eroare mecanică</string>
|
||||
<string name="alert_e10_title">Eroare de derulare</string>
|
||||
<string name="alert_e13_title">Eroare de limbaj</string>
|
||||
</resources>
|
||||
|
|
|
@ -1,3 +1,15 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--Generated by crowdin.com-->
|
||||
<resources></resources>
|
||||
<resources>
|
||||
<string name="connection_failed">Conexiune eșuată</string>
|
||||
<string name="connection_lost">Conexiune pierdută</string>
|
||||
<string name="pairing_rejected">Asociere respinsă</string>
|
||||
<string name="socket_creation_failed">Crearea asocierii a eșuat</string>
|
||||
<string name="timeout">Timpul a expirat</string>
|
||||
<string name="maximum_number_of_bolus_type_already_running">Numărul maxim de bolusuri care sunt livrate în același timp</string>
|
||||
<string name="no_active_tbr_to_cancel">Nu există RBT activă de anulat</string>
|
||||
<string name="no_active_tbr_to_change">Nu există RBT activă de schimbat</string>
|
||||
<string name="no_such_bolus_to_cancel">Nu există un bolus care să fie anulat</string>
|
||||
<string name="pump_already_in_that_state_exception">Pompa este deja în starea solicitată</string>
|
||||
<string name="run_mode_not_allowed">Mod de folosire nepermis</string>
|
||||
</resources>
|
||||
|
|
|
@ -44,6 +44,8 @@
|
|||
<string name="description_sensitivity_oref1">Sensibilitatea este calculată folosind datele din ultimele 8 ore, iar cabohidrații (când nu sunt absorbiți) sunt ignorați după timpul specificat în preferințe. Se calculează, de asemenea, UAM.</string>
|
||||
<string name="description_sensitivity_weighted_average">Sensibilitatea este calculată ca o medie ponderată a deviațiilor. Deviațiile noi au o importanță mai mare. Absorbția minimă de carbohidrați este calculată în funcție de parametrul absorbție maximă de carbohidrați, stabilit în preferințe. Acest algoritm este cel mai rapid atunci când sensibilitatea la insulină este fluctuantă.</string>
|
||||
<string name="description_source_dexcom_g5">Primește valorile glicemiei din aplicația Dexcom G5 modificată.</string>
|
||||
<string name="description_source_dexcom_g6">Primește valorile glicemiei din aplicația Dexcom G6 modificată.</string>
|
||||
<string name="description_source_eversense">Primește valorile glicemiei din aplicația Eversense modificată.</string>
|
||||
<string name="description_source_glimp">Primește valorile glicemiei din aplicația Glimp.</string>
|
||||
<string name="description_source_mm640g">Primește valorile glicemiei din aplicația 600SeriesAndroidUploader (Medtronic).</string>
|
||||
<string name="description_source_ns_client">Descarcă datele despre glicemii din Nightscout</string>
|
||||
|
@ -263,12 +265,7 @@
|
|||
<string name="smscommunicator_bolusreplywithcode">Pentru a livra un bolus de %1$.2fU răspundeți cu codul %2$s</string>
|
||||
<string name="smscommunicator_calibrationreplywithcode">Pentru a trimite calibrarea cu %1$.2f răspundeți cu codul %2$s</string>
|
||||
<string name="smscommunicator_bolusfailed">Bolusare eșuată</string>
|
||||
<string name="bolusdelivered" formatted="false">Bolusul de %.2fU livrat cu succes</string>
|
||||
<string name="bolusrequested" formatted="false">Se va livra un bolus de %.2fU</string>
|
||||
<string name="smscommunicator_bolusdelivered" formatted="false">Bolusul de %.2fU a fost livrat cu succes</string>
|
||||
<string name="bolusdelivering" formatted="false">Se livrează %.2fU</string>
|
||||
<string name="smscommunicator_remotecommandsallowed">Permite comenzi de la distanță, prin SMS</string>
|
||||
<string name="smscommunicator_remotebolusnotallowed">Bolusarea prin comenzi de la distanță nu este permisă</string>
|
||||
<string name="glucosetype_finger">Deget</string>
|
||||
<string name="glucosetype_sensor">Senzor</string>
|
||||
<string name="manual">Manual</string>
|
||||
|
@ -336,16 +333,12 @@
|
|||
<string name="smscommunicator_loopisenabled">Bucla este activată</string>
|
||||
<string name="valuelimitedto">%1$.2f este limitată la %2$.2f</string>
|
||||
<string name="valueoutofrange" formatted="false">Valoarea %s este mai mare decât limita fizică</string>
|
||||
<string name="smscommunicator_remotebasalnotallowed">Setarea de la distanță a bazalei nu este permisă</string>
|
||||
<string name="smscommunicator_remotecommandnotallowed">Comanda de la distanță nu este permisă</string>
|
||||
<string name="smscommunicator_basalreplywithcode">Pentru pornirea bazalei de %1$.2fU/h trimiteți codul %2$s</string>
|
||||
<string name="smscommunicator_suspendreplywithcode">Pentru suspendarea buclei pentru %1$d minute trimiteți codul %2$s</string>
|
||||
<string name="smscommunicator_tempbasalset">Bazala temporară %1$.2fU/h pentru %2$d minute a fost trimisă cu succes</string>
|
||||
<string name="smscommunicator_tempbasalfailed">Trimiterea bazalei temporare a eșuat</string>
|
||||
<string name="smscommunicator_basalstopreplywithcode" formatted="false">Pentru oprirea bazalei temporare trimiteți codul %s</string>
|
||||
<string name="smscommunicator_tempbasalcanceled">Bazala temporară a fost anulată</string>
|
||||
<string name="smscommunicator_tempbasalcancelfailed">Renunțarea la bazala temporară a eșuat</string>
|
||||
<string name="smscommunicator_unknowncommand">Comandă necunoscută sau răspuns greșit</string>
|
||||
<string name="quickwizard">AsistentRapid</string>
|
||||
<string name="quickwizardsettings">Setări AsistentRapid</string>
|
||||
<string name="overview_editquickwizard_buttontext">Text buton:</string>
|
||||
|
@ -408,6 +401,7 @@
|
|||
<string name="array_of_elements">Matrice de %1$d elemente.\nValoarea curentă:</string>
|
||||
<string name="openapsma_autosensdata_label">Date Autosens</string>
|
||||
<string name="openapsma_scriptdebugdata_label">Depanare script</string>
|
||||
<string name="openapsama_useautosens">Folosește opțiunea de autosensibilitate</string>
|
||||
<string name="refresheventsfromnightscout">Sincronizează cu NS</string>
|
||||
<string name="deletefuturetreatments">Ștergerea tratamentelor înregistrate în viitor</string>
|
||||
<string name="eatingsoon">Masă în curând</string>
|
||||
|
@ -468,7 +462,6 @@
|
|||
<string name="send_calibration" formatted="false">Trimite calibrarea %.1f către xDrip?</string>
|
||||
<string name="xdripnotinstalled">xDrip+ nu este instalat.</string>
|
||||
<string name="calibrationsent">Calibrare trimisă către xDrip</string>
|
||||
<string name="smscommunicator_remotecalibrationnotallowed">Calibrarea la distanță nu este permisă</string>
|
||||
<string name="smscommunicator_calibrationsent">Calibrare trimisă. Recepționarea trebuie să fie activată și în xDrip.</string>
|
||||
<string name="smscommunicator_calibrationfailed">xDrip nu recepționează calibrări</string>
|
||||
<string name="pumpsuspended">Livrare de insulină suspendată</string>
|
||||
|
@ -531,6 +524,7 @@
|
|||
<string name="disconnectpumpfor2h">Deconectează pompa pentru 2h</string>
|
||||
<string name="disconnectpumpfor3h">Deconectează pompa pentru 3h</string>
|
||||
<string name="resume">Restabilește</string>
|
||||
<string name="reconnect">Reconectaţi pompa</string>
|
||||
<string name="smscommunicator_wrongduration">Durată greșită</string>
|
||||
<string name="smscommunicator_loopsuspended">Buclă suspendată</string>
|
||||
<string name="smscommunicator_loopresumed">Buclă restabilită</string>
|
||||
|
@ -548,6 +542,12 @@
|
|||
<string name="insulin_shortname">INS</string>
|
||||
<string name="enablesuperbolus">Activează superbolus în asistent</string>
|
||||
<string name="enablesuperbolus_summary">Activează funcționalitatea de superbolus în asistentul de buclă. Nu activați până nu înțelegeți ce face cu adevărat. DACĂ ESTE FOLOSIT ÎN NECUNOȘTINȚĂ DE CAUZĂ POATE DUCE LA SUPRADOZĂ DE INSULINĂ!</string>
|
||||
<string name="show_statuslights">Afișați indicatorii luminoși ai pompei pe ecranul de start</string>
|
||||
<string name="show_statuslights_summary">Activați indicatori pentru CAGE, IAGE, SAGE, nivel baterie și rezervor pe ecranul principal.</string>
|
||||
<string name="statuslights_res_warning">Pragul de avertisment pentru insulina din rezervor [U]</string>
|
||||
<string name="statuslights_res_critical">Pragul critic al nivelului insulinei în rezervor [U]</string>
|
||||
<string name="statuslights_bat_warning">Pragul de avertizare nivel baterie [%]</string>
|
||||
<string name="statuslights_bat_critical">Pragul critic al nivelului baterie [%]</string>
|
||||
<string name="iob">IOB</string>
|
||||
<string name="cob">COB</string>
|
||||
<string name="virtualpump_firmware_label">Firmware</string>
|
||||
|
@ -702,7 +702,10 @@
|
|||
<string name="btwatchdog_title">BT Watchdog</string>
|
||||
<string name="btwatchdog_summary">Oprește bluetooth-ul telefonului pentru o secundă dacă nu se poate conecta la pompă. Aceasta poate ajuta în cazul telefoanelor cu bluetooth incompatitibil.</string>
|
||||
<string name="DexcomG5">App DexcomG5 (cu patch)</string>
|
||||
<string name="DexcomG6">Aplicația G6 (modificată)</string>
|
||||
<string name="eversense">Aplicația Eversense (modificată)</string>
|
||||
<string name="dexcomg5_nsupload_title">Încarcă date glicemie în NS</string>
|
||||
<string name="bgsource_upload">Setări înregistrare glicemie</string>
|
||||
<string name="wear_detailed_delta_title">Arată variație detaliată</string>
|
||||
<string name="wear_detailed_delta_summary">Arată variație cu încă o zecimală</string>
|
||||
<string name="smbmaxminutes_summary">Max minute de bazală la care să se limiteze SMB</string>
|
||||
|
@ -768,6 +771,7 @@
|
|||
<string name="combo_error_bolus_verification_failed">Nu s-a reușit livrarea bolusului și citirea istoricului pompei, verificați pompa. Dacă a fost totuși livrat un bolus, acesta va fi adăugat în lista tratamentelor în timpul următoarei conexiuni cu pompa.</string>
|
||||
<string name="combo_reservoir_level_insufficient_for_bolus">Nu este suficientă insulină în rezervor</string>
|
||||
<string name="extendedbolusdeliveryerror">Eroare de livrare a bolusului extins</string>
|
||||
<string name="insightpump_shortname">Obiectiv</string>
|
||||
<string name="insightpump">Pompă Insight</string>
|
||||
<string name="status_no_colon">Stare</string>
|
||||
<string name="changed">Schimbat</string>
|
||||
|
@ -842,6 +846,7 @@
|
|||
<string name="data_choices">Alegeri date</string>
|
||||
<string name="fabric_upload">Încărcare \"fabric\"</string>
|
||||
<string name="allow_automated_crash_reporting">Permite trimiterea de rapoarte automate de eroare și de date despre folosire către dezvoltatori prin serviciul fabric.io.</string>
|
||||
<string name="g5appnotdetected">Actualizați aplicația Dexcom la o versiune acceptată</string>
|
||||
<string name="start_activity_tt">Start TT activitate</string>
|
||||
<string name="start_eating_soon_tt">Start TT mănânc-în-curând</string>
|
||||
<string name="temptargetshort">TT</string>
|
||||
|
@ -1007,6 +1012,7 @@
|
|||
<string name="nth_objective">Obiectiv %1$d</string>
|
||||
<string name="poctech">Poctech</string>
|
||||
<string name="description_source_poctech">Citire a valorii glicemiei din aplicația Poctech</string>
|
||||
<string name="description_source_tomato">Înregistrează valorile glicemiei din aplicația Tomato (dispozitiv MiaoMIao)</string>
|
||||
<string name="high_temptarget_raises_sensitivity_title">Ținte temporare mai mari cresc sensibilitatea</string>
|
||||
<string name="high_temptarget_raises_sensitivity_summary"><![CDATA[Creșterea sensibilității pentru ținte temporare >= 100]]></string>
|
||||
<string name="low_temptarget_lowers_sensitivity_title">Țintele temporare joase scad sensibilitatea</string>
|
||||
|
@ -1049,6 +1055,40 @@
|
|||
<string name="loop_openmode_min_change">Cerere de schimbare minimală [%]</string>
|
||||
<string name="loop_openmode_min_change_summary">Bucla va afişa o nouă cerere de schimbare doar dacă schimbarea are o valoare decât aceasta. Valoarea implicită este 20%</string>
|
||||
<string name="pairfirst">Vă rog să conectați pompa cu telefonul!</string>
|
||||
<string name="searching_for_devices">Căutare dispozitive…</string>
|
||||
<string name="please_wait">Așteptați…</string>
|
||||
<string name="pairing_completed">Asociere reușită</string>
|
||||
<string name="code_compare">Sunt identice codurile afișate aici și cele de pe pompă?</string>
|
||||
<string name="insight_pairing">Asociere Insight</string>
|
||||
<string name="insight_local">Accu-Chek Insight</string>
|
||||
<string name="insight_delivered">Livrat %1$.2fU / %2$.2fU</string>
|
||||
<string name="insight_alert_formatter">%1$s:%2$s</string>
|
||||
<string name="tube_changed">Canulă schimbată</string>
|
||||
<string name="pump_time_updated">Timpul din pompă a fost actualizat</string>
|
||||
<string name="confirm">Confirmă</string>
|
||||
<string name="mute_alert">Liniște</string>
|
||||
<string name="pump_alert">Alertă a pompei</string>
|
||||
<string name="log_site_changes">Înregistrează schimbările locului de inserție</string>
|
||||
<string name="log_tube_changes">Înregistrează schimbările canulei</string>
|
||||
<string name="log_battery_changes">Înregistrează schimbările bateriei</string>
|
||||
<string name="log_operating_mode_changes">Înregistrează schimbările modului de operare</string>
|
||||
<string name="log_alerts">Înregistrează alertele</string>
|
||||
<string name="enable_tbr_emulation">Activează emularea RBT</string>
|
||||
<string name="enable_tbr_emulation_summary">Folosește bolus extins în locul RBT pentru a trece de limita de 250%</string>
|
||||
<string name="disconnect_delay">Întârziere a deconectării [s]</string>
|
||||
<string name="serial_number">Număr de serie</string>
|
||||
<string name="release_software_version">Versiunea de software</string>
|
||||
<string name="ui_processor_software_version">Versiunea softwareului procesor UI</string>
|
||||
<string name="pc_processor_software_version">Versiunea software procesor PC</string>
|
||||
<string name="md_tel_processor_software_version">Versiunea software procesor MD tel</string>
|
||||
<string name="safety_processor_software_version">Versiunea software procesor siguranță</string>
|
||||
<string name="bt_info_page_version">Versiunea BT info</string>
|
||||
<string name="bluetooth_address">Adresa Bluetooth</string>
|
||||
<string name="system_id_appendix">Indexul sistem ID</string>
|
||||
<string name="manufacturing_date">Data fabricării</string>
|
||||
<string name="delete_pairing">Șterge asocierea</string>
|
||||
<string name="pairing_information">Informații despre asociere</string>
|
||||
<string name="refreh_status">Reîmprospătare stare</string>
|
||||
<plurals name="objective_days">
|
||||
<item quantity="one">%1$d zi</item>
|
||||
<item quantity="few">%1$d zi</item>
|
||||
|
|
|
@ -9,10 +9,10 @@
|
|||
<string name="nav_resetdb">обнулить базы</string>
|
||||
<string name="reset_db_confirm">Вы действительно хотите обнулить базы данных?</string>
|
||||
<string name="nav_exit">Выход</string>
|
||||
<string name="danar_useextended_title">Для величин >200% пользуйтесь удлиненным болюсом</string>
|
||||
<string name="danar_useextended_title">Для величин >200% пользуйтесь пролонгированным болюсом</string>
|
||||
<string name="danar_bt_name_title">устройство блутус danaR</string>
|
||||
<string name="ns_sync_use_absolute_title">Всегда пользуйтесь абсолютными величинами для базала</string>
|
||||
<string name="alert_dialog_storage_permission_text">Пожалуйста перезагрузите телефон или перезапустите AndroidAPS из системных настроек \nиначе AndroidAPS не будет вести лог (важно для отслеживания и проверки алгоритмов)!</string>
|
||||
<string name="alert_dialog_storage_permission_text">Пожалуйста перезагрузите телефон или перезапустите AndroidAPS из системных настроек \иначе AndroidAPS не будет вести лог (важно для отслеживания и проверки алгоритмов)!</string>
|
||||
<string name="description_actions">Кнопки быстрого доступа к некоторым распространенным настройкам</string>
|
||||
<string name="description_careportal">Введите дополнительные записи логов.</string>
|
||||
<string name="description_config_builder">Применяется для настройки активных плагинов</string>
|
||||
|
@ -54,6 +54,7 @@
|
|||
<string name="description_wear">Мониторить и контролировать AndroidAPS при помощи часов WearOS.</string>
|
||||
<string name="description_xdrip_status_line">Показать информацию о работе алгоритма ИПЖ на экране смарт-часов xDrip+.</string>
|
||||
<string name="description_sms_communicator">Дистанционное управление AndroidAPS при помощи команд SMS.</string>
|
||||
<string name="objectives_button_back">Назад</string>
|
||||
<string name="objectives_button_start">старт</string>
|
||||
<string name="objectives_button_verify">Верификация</string>
|
||||
<string name="nsprofileview_units_label">единицы</string>
|
||||
|
@ -265,12 +266,11 @@
|
|||
<string name="smscommunicator_bolusreplywithcode">Чтобы подать болюс %1$.2fU ответьте кодом %2$s</string>
|
||||
<string name="smscommunicator_calibrationreplywithcode">чтобы отправить калибровку %1$.2f ответьте кодом %2$s</string>
|
||||
<string name="smscommunicator_bolusfailed">Подача болюса не состоялась</string>
|
||||
<string name="bolusdelivered" formatted="false">Болюс %.2fU подан успешно</string>
|
||||
<string name="bolusrequested" formatted="false">Начинается подача болюса %.2fU</string>
|
||||
<string name="smscommunicator_bolusdelivered" formatted="false">Болюс %.2fU дан успешно</string>
|
||||
<string name="bolusdelivering" formatted="false">Подается болюс %.2fU</string>
|
||||
<string name="bolusdelivered">Болюс %1$.2fед. подан успешно</string>
|
||||
<string name="bolusrequested">Начинается подача болюса %1$.2fед.</string>
|
||||
<string name="smscommunicator_bolusdelivered">Болюс %1$.2fед. подан успешно</string>
|
||||
<string name="bolusdelivering">Подается болюс %1$.2fед.</string>
|
||||
<string name="smscommunicator_remotecommandsallowed">разрешить команды через смс</string>
|
||||
<string name="smscommunicator_remotebolusnotallowed">Команда на удаленный болюс не разрешена</string>
|
||||
<string name="glucosetype_finger">палец</string>
|
||||
<string name="glucosetype_sensor">сенсор</string>
|
||||
<string name="manual">вручную</string>
|
||||
|
@ -338,16 +338,25 @@
|
|||
<string name="smscommunicator_loopisenabled">зцикл работает</string>
|
||||
<string name="valuelimitedto">%1$.2f ограничено до %2$.2f</string>
|
||||
<string name="valueoutofrange" formatted="false">величина %s недопустима</string>
|
||||
<string name="smscommunicator_remotebasalnotallowed">удаленная настройка базала не разрешена</string>
|
||||
<string name="smscommunicator_remotecommandnotallowed">удаленная команда не разрешена</string>
|
||||
<string name="smscommunicator_basalreplywithcode">чтобы начать базал %1$.2fU/h ответьте кодом %2$s</string>
|
||||
<string name="smscommunicator_remotebolusnotallowed">Удаленный болюс недоступен, повторите попытку позже.</string>
|
||||
<string name="smscommunicator_basalreplywithcode">Чтобы подать базал %1$.2fед./ч в течение %2$d мин. ответьте кодом %3$s</string>
|
||||
<string name="smscommunicator_profilereplywithcode">Для переключения профиля на %1$s %2$d%% ответьте кодом %3$s</string>
|
||||
<string name="smscommunicator_extendedreplywithcode">Для начала подачи пролонгированного болюса %1$.2fед. за %2$d мин. ответьте кодом %3$s</string>
|
||||
<string name="smscommunicator_basalpctreplywithcode">Для начала подачи базала %1$d%% на %2$d мин. ответьте кодом %3$s</string>
|
||||
<string name="smscommunicator_suspendreplywithcode">для приостановки цикла на %1$d мин ответьте кодом %2$s</string>
|
||||
<string name="smscommunicator_tempbasalset">врем базал %1$.2fU/h на %2$d мин начат успешно</string>
|
||||
<string name="smscommunicator_extendedset">Пролонгированный болюс %1$.2fед. на %2$d мин. начат успешно</string>
|
||||
<string name="smscommunicator_tempbasalset_percent">Врем. базал %1$d%% на %2$d мин. начат успешно</string>
|
||||
<string name="smscommunicator_tempbasalfailed">неуспех старта врем базала</string>
|
||||
<string name="smscommunicator_basalstopreplywithcode" formatted="false">чтобы прекратить врем базал ответьте кодом %s</string>
|
||||
<string name="smscommunicator_extendedfailed">Не удалось начать подачу пролонгированного болюса</string>
|
||||
<string name="smscommunicator_basalstopreplywithcode">Для прекращения подачи врем. базала ответьте кодом %1$s</string>
|
||||
<string name="smscommunicator_extendedstopreplywithcode">Для прекращения подачи пролонгированного болюса ответьте кодом %1$s</string>
|
||||
<string name="smscommunicator_tempbasalcanceled">врем базал отменен</string>
|
||||
<string name="smscommunicator_extendedcanceled">Пролонгированный болюс отменен</string>
|
||||
<string name="smscommunicator_tempbasalcancelfailed">отмена врем базала не состоялась</string>
|
||||
<string name="smscommunicator_unknowncommand">неизвестная команда или неверный ответ</string>
|
||||
<string name="smscommunicator_extendedcancelfailed">Сбой отмены пролонгированного болюса</string>
|
||||
<string name="smscommunicator_unknowncommand">Неизвестная команда или неверный ответ</string>
|
||||
<string name="quickwizard">БыстрыйБолюс</string>
|
||||
<string name="quickwizardsettings">БыстрыйБолюс настройки</string>
|
||||
<string name="overview_editquickwizard_buttontext">текст на кнопке</string>
|
||||
|
@ -404,7 +413,7 @@
|
|||
<string name="minago">%1$d мин. назад</string>
|
||||
<string name="sms_minago">%1$d мин. назад</string>
|
||||
<string name="localprofile">локальный профиль</string>
|
||||
<string name="openapsama">Помощник болюса OpenAPS MA</string>
|
||||
<string name="openapsama">Помощник болюса OpenAPS AMA</string>
|
||||
<string name="short_avgdelta">краткосрочная средняя дельта</string>
|
||||
<string name="long_avgdelta">Долгосрочная средняя дельта</string>
|
||||
<string name="array_of_elements">Массив %1$d элементов. \nActual актуальная величина:</string>
|
||||
|
@ -413,7 +422,7 @@
|
|||
<string name="openapsama_useautosens">Пользоваться функцией Autosens</string>
|
||||
<string name="refresheventsfromnightscout">обновить данные из NS</string>
|
||||
<string name="deletefuturetreatments">Удалить назначения из будущего</string>
|
||||
<string name="eatingsoon">Близкий прием пищи</string>
|
||||
<string name="eatingsoon">Ожидаемый прием пищи</string>
|
||||
<string name="hypo">Гипо</string>
|
||||
<string name="activity">Нагрузка</string>
|
||||
<string name="removerecord">удалить запись</string>
|
||||
|
@ -471,7 +480,6 @@
|
|||
<string name="send_calibration" formatted="false">отправить калибровку %.1f на xdrip?</string>
|
||||
<string name="xdripnotinstalled">xdrip+ не установлен</string>
|
||||
<string name="calibrationsent">калибровка передается на xdrip</string>
|
||||
<string name="smscommunicator_remotecalibrationnotallowed">удаленная калибровка не разрешена</string>
|
||||
<string name="smscommunicator_calibrationsent">калибровка отправлена. в xdrip должен быть активирован прием</string>
|
||||
<string name="smscommunicator_calibrationfailed">xdrip не получает калибровок</string>
|
||||
<string name="pumpsuspended">Работа помпы остановлена</string>
|
||||
|
@ -640,7 +648,7 @@
|
|||
<string name="enableuam">Включить непредвиденный прием пищи UAM</string>
|
||||
<string name="enablesmb">Включить супер микро болюс SMB</string>
|
||||
<string name="enablesmb_summary">Для ускорения действия используйте супер микро болюсы SMB вместо временного базала</string>
|
||||
<string name="enableuam_summary">Поиск непредвиденного приема пищи</string>
|
||||
<string name="enableuam_summary">Поиск незапланированного приема пищи</string>
|
||||
<string name="insulin_oref_peak">Время пика действующего инс IOB</string>
|
||||
<string name="insulin_peak_time">время пика (в мин.)</string>
|
||||
<string name="free_peak_oref">Свободный от пиков Oref</string>
|
||||
|
@ -858,7 +866,7 @@
|
|||
<string name="allow_automated_crash_reporting">Разрешить отправлять сообщения о неполадках и данные об использовании опций разработчикам при помощи сервиса fabric.io.</string>
|
||||
<string name="g5appnotdetected">Пожалуйста, обновите приложение Dexcom до поддерживаемой версии</string>
|
||||
<string name="start_activity_tt">Включить временную цель TT Нагрузка</string>
|
||||
<string name="start_eating_soon_tt">Включить временную цель TT Скорый прием пищи</string>
|
||||
<string name="start_eating_soon_tt">Включить временную цель TT Ожидаемый прием пищи</string>
|
||||
<string name="temptargetshort">Временная цель (TT)</string>
|
||||
<string name="do_not_bolus_record_only">Не подавать болюс, только внести запись</string>
|
||||
<string name="category">Категория</string>
|
||||
|
@ -1141,4 +1149,11 @@ Context | Edit Context</string>
|
|||
<string name="dexcom_lognssensorchange_summary">Автоматически создать событие \"Замена сенсора\" в NS при запуске сенсора</string>
|
||||
<string name="tomato">Томато (MiaoMiao)</string>
|
||||
<string name="tomato_short">Томато</string>
|
||||
<string name="dst_in_24h_warning">Переход на летнее/зимнее время через 24 часа или менее</string>
|
||||
<string name="storage">ограничение по объему карты памяти</string>
|
||||
<string name="diskfull">Освободите по крайней мере %1$d MB из внутренней памяти! Цикл остановлен!</string>
|
||||
<string name="wrongformat">Неверный формат</string>
|
||||
<string name="sms_wrongcode">Неверный код. Команда отменена.</string>
|
||||
<string name="notconfigured">Не сконфигурировано</string>
|
||||
<string name="profileswitchcreated">Переключатель профиля создан</string>
|
||||
</resources>
|
||||
|
|
|
@ -265,12 +265,7 @@
|
|||
<string name="smscommunicator_bolusreplywithcode">Pre podanie bolusu %1$.2fU odpovedz SMS kódom %2$s</string>
|
||||
<string name="smscommunicator_calibrationreplywithcode">Pre odoslanie kalibrácie %1$.2f odpovedz SMS kódom %2$s</string>
|
||||
<string name="smscommunicator_bolusfailed">Chyba pri aplikovaní bolusu</string>
|
||||
<string name="bolusdelivered" formatted="false">Bolus %.2fU aplikovaný úspešne</string>
|
||||
<string name="bolusrequested" formatted="false">Spúšťam podávanie %.2fU</string>
|
||||
<string name="smscommunicator_bolusdelivered" formatted="false">Bolus %.2fU podaný úspešne</string>
|
||||
<string name="bolusdelivering" formatted="false">Podané %.2fU</string>
|
||||
<string name="smscommunicator_remotecommandsallowed">Povoliť príkazy na diaľku cez SMS</string>
|
||||
<string name="smscommunicator_remotebolusnotallowed">Diaľkovo ovládaný bolus nie je povolený</string>
|
||||
<string name="glucosetype_finger">Prst</string>
|
||||
<string name="glucosetype_sensor">Senzor</string>
|
||||
<string name="manual">Iný</string>
|
||||
|
@ -338,16 +333,12 @@
|
|||
<string name="smscommunicator_loopisenabled">Uzavretý okruh je aktivovaný</string>
|
||||
<string name="valuelimitedto">%1$.2f obmedzené na %2$.2f</string>
|
||||
<string name="valueoutofrange" formatted="false">Hodnota %s je mimo prednastavený rozsah</string>
|
||||
<string name="smscommunicator_remotebasalnotallowed">Ovládanie bazálu na diaľku nie je povolené</string>
|
||||
<string name="smscommunicator_remotecommandnotallowed">Príkazy na diaľku nie sú povolené</string>
|
||||
<string name="smscommunicator_basalreplywithcode">Pre spustenie bazálu %1$.2fU/h odpovedaj SMS s kódom %2$s</string>
|
||||
<string name="smscommunicator_suspendreplywithcode">Pre pozastavenie uzavretého okruhu na %1$d minút odpovedaj SMS s kódom %2$s</string>
|
||||
<string name="smscommunicator_tempbasalset">Dočasný bazál %1$.2fU/h spustený na %2$d minút</string>
|
||||
<string name="smscommunicator_tempbasalfailed">Spustenie dočasného bazálu zlyhalo</string>
|
||||
<string name="smscommunicator_basalstopreplywithcode" formatted="false">Pre ukončenie dočasného bazálu odpovedaj SMS s kódom %s</string>
|
||||
<string name="smscommunicator_tempbasalcanceled">Dočasný bazál zrušený</string>
|
||||
<string name="smscommunicator_tempbasalcancelfailed">Zrušenie dočasného bazálu zlyhalo</string>
|
||||
<string name="smscommunicator_unknowncommand">Neznámý príkaz alebo chybná odpoveď</string>
|
||||
<string name="quickwizard">Rýchly bolus</string>
|
||||
<string name="quickwizardsettings">Nastavenie rýchleho bolusu</string>
|
||||
<string name="overview_editquickwizard_buttontext">Text na tlačidle:</string>
|
||||
|
@ -471,7 +462,6 @@
|
|||
<string name="send_calibration" formatted="false">Poslať kalibráciu %.1f do xDripu?</string>
|
||||
<string name="xdripnotinstalled">xDrip+ nie je nainštalovaný</string>
|
||||
<string name="calibrationsent">Kalibrácia odoslaná do xDripu</string>
|
||||
<string name="smscommunicator_remotecalibrationnotallowed">Kalibrácia na diaľku nie je povolená</string>
|
||||
<string name="smscommunicator_calibrationsent">Kalibrácia odoslaná. Príjem kalibrácií musí byť v xDripe povolený.</string>
|
||||
<string name="smscommunicator_calibrationfailed">xDrip neprijíma kalibrácie</string>
|
||||
<string name="pumpsuspended">Pumpa pozastavená</string>
|
||||
|
|
|
@ -266,12 +266,7 @@ Eversense-appen.</string>
|
|||
<string name="smscommunicator_bolusreplywithcode">För att ge bolus %1$.2f enheter, svara med kod %2$s</string>
|
||||
<string name="smscommunicator_calibrationreplywithcode">För att skicka kalibrering %1$.2f, svara med kod %2$s</string>
|
||||
<string name="smscommunicator_bolusfailed">Bolus misslyckades</string>
|
||||
<string name="bolusdelivered" formatted="false">Bolus %.2f enheter korrekt levererad</string>
|
||||
<string name="bolusrequested" formatted="false">Kommer att leverera %.2f enheter</string>
|
||||
<string name="smscommunicator_bolusdelivered" formatted="false">Bolus %.2f enheter levererad</string>
|
||||
<string name="bolusdelivering" formatted="false">Levererar %.2f enheter</string>
|
||||
<string name="smscommunicator_remotecommandsallowed">Tillåt fjärrstyrning via SMS</string>
|
||||
<string name="smscommunicator_remotebolusnotallowed">Fjärrbolus är inte tillåtet</string>
|
||||
<string name="glucosetype_finger">Finger</string>
|
||||
<string name="glucosetype_sensor">Sensor</string>
|
||||
<string name="manual">Manuell</string>
|
||||
|
@ -339,16 +334,12 @@ Eversense-appen.</string>
|
|||
<string name="smscommunicator_loopisenabled">Loop är aktiverad</string>
|
||||
<string name="valuelimitedto">%1$.2f begränsat till %2$.2f</string>
|
||||
<string name="valueoutofrange" formatted="false">Värdet %s är utanför hård begränsning</string>
|
||||
<string name="smscommunicator_remotebasalnotallowed">Fjärrkommandon för att ändra basaler tillåts ej</string>
|
||||
<string name="smscommunicator_remotecommandnotallowed">Otillåtet fjärrkommando</string>
|
||||
<string name="smscommunicator_basalreplywithcode">För att starta temp basal %1$.2f enheter/tim, svara med kod %2$s</string>
|
||||
<string name="smscommunicator_suspendreplywithcode">För att pausa loop i %1$d minuter, svara med kod %2$s</string>
|
||||
<string name="smscommunicator_tempbasalset">Temp basal %1$.2f enheter/tim i %2$d min startad</string>
|
||||
<string name="smscommunicator_tempbasalfailed">Fel vid start av temp basal</string>
|
||||
<string name="smscommunicator_basalstopreplywithcode" formatted="false">För att stoppa temp basal, svara med kod %s</string>
|
||||
<string name="smscommunicator_tempbasalcanceled">Temp basal avbruten</string>
|
||||
<string name="smscommunicator_tempbasalcancelfailed">Misslyckades med att avbryta temp basal</string>
|
||||
<string name="smscommunicator_unknowncommand">Okänt kommando eller fel svar</string>
|
||||
<string name="quickwizard">Kalkylator</string>
|
||||
<string name="quickwizardsettings">Kalkylatorinställningar</string>
|
||||
<string name="overview_editquickwizard_buttontext">Knapptext:</string>
|
||||
|
@ -472,7 +463,6 @@ Eversense-appen.</string>
|
|||
<string name="send_calibration" formatted="false">Skicka kalibrering %.1f till xDrip?</string>
|
||||
<string name="xdripnotinstalled">xDrip+ inte installerat</string>
|
||||
<string name="calibrationsent">Kalibrering skickad till xDrip</string>
|
||||
<string name="smscommunicator_remotecalibrationnotallowed">Kalibrering från andra källor inte tillåtna</string>
|
||||
<string name="smscommunicator_calibrationsent">Kalibrering skickad. Observera att xDrip måste vara inställd att ta emot kalibreringar.</string>
|
||||
<string name="smscommunicator_calibrationfailed">xDrip tar inte emot kalibreringar</string>
|
||||
<string name="pumpsuspended">Pump pausad</string>
|
||||
|
|
|
@ -263,12 +263,7 @@
|
|||
<string name="smscommunicator_bolusreplywithcode">Bolus %1$.2fU gönderilecek, kod ile cevap ver %2$s</string>
|
||||
<string name="smscommunicator_calibrationreplywithcode">Kalibrasyon %1$.2f gönderilecek, kod ile cevap ver %2$s</string>
|
||||
<string name="smscommunicator_bolusfailed">Bolus başarısız oldu</string>
|
||||
<string name="bolusdelivered" formatted="false">Bolus %.2fU başarıyla gönderildi</string>
|
||||
<string name="bolusrequested" formatted="false">%.2fU Gönderilecek</string>
|
||||
<string name="smscommunicator_bolusdelivered" formatted="false">Bolus %.2fU başarıyla gönderildi</string>
|
||||
<string name="bolusdelivering" formatted="false">%.2fU Gönderiliyor</string>
|
||||
<string name="smscommunicator_remotecommandsallowed">SMS ile uzaktan komutlara izin ver</string>
|
||||
<string name="smscommunicator_remotebolusnotallowed">Uzaktan bolus\'a izin verilmiyor</string>
|
||||
<string name="glucosetype_finger">Parmak</string>
|
||||
<string name="glucosetype_sensor">Sensör</string>
|
||||
<string name="manual">Manuel</string>
|
||||
|
@ -336,16 +331,12 @@
|
|||
<string name="smscommunicator_loopisenabled">Döngü etkin</string>
|
||||
<string name="valuelimitedto">%1$.2f dan %2$.2f olarak sınırlı</string>
|
||||
<string name="valueoutofrange" formatted="false">Değer %s sabit sınırları dışında olduğunu</string>
|
||||
<string name="smscommunicator_remotebasalnotallowed">Uzak bazal ayarına izin verilmez</string>
|
||||
<string name="smscommunicator_remotecommandnotallowed">Uzaktan komuta izin verilmez</string>
|
||||
<string name="smscommunicator_basalreplywithcode">Bazal\'ı %1$.2fÜ/s başlatmak için kodu %2$s ile yanıtlayın</string>
|
||||
<string name="smscommunicator_suspendreplywithcode">%1$d dakika için Döngü\'yü askıya almak için %2$s kodunu yanıtla</string>
|
||||
<string name="smscommunicator_tempbasalset">Geçici bazal %1$.2fÜ/s %2$d dakika için başarıyla başlatıldı</string>
|
||||
<string name="smscommunicator_tempbasalfailed">Temp bazal başlatma başarısız oldu</string>
|
||||
<string name="smscommunicator_basalstopreplywithcode" formatted="false">Geçici bazal oranını iptal etmek için kodla %s yanıtla</string>
|
||||
<string name="smscommunicator_tempbasalcanceled">Geçici bazal iptal</string>
|
||||
<string name="smscommunicator_tempbasalcancelfailed">Geçici bazal iptali hata verdi</string>
|
||||
<string name="smscommunicator_unknowncommand">Bilinmeyen komut veya yanlış cevap</string>
|
||||
<string name="quickwizard">Kurulum Sihirbazı</string>
|
||||
<string name="quickwizardsettings">Kurulum Sihirbazı Ayarları</string>
|
||||
<string name="overview_editquickwizard_buttontext">Düğme Metni:</string>
|
||||
|
@ -469,7 +460,6 @@ Aktif Karbonhidratın ne kadar hızlı sindirildiğine ve KŞ\'nin beklenenden d
|
|||
<string name="send_calibration" formatted="false">Kalibrasyon %.1f xDrip\'e gönderilsin mi?</string>
|
||||
<string name="xdripnotinstalled">xDrip+ uygulaması yüklenmemiş</string>
|
||||
<string name="calibrationsent">Kalibrasyon xDrip+ a gönderildi</string>
|
||||
<string name="smscommunicator_remotecalibrationnotallowed">Uzaktan kalibrasyona izin verilmiyor</string>
|
||||
<string name="smscommunicator_calibrationsent">Kalibrasyon gönderildi. Alma xDrip+\'ta etkinleştirilmelidir.</string>
|
||||
<string name="smscommunicator_calibrationfailed">xDrip+ kalibrasyonları almıyor</string>
|
||||
<string name="pumpsuspended">Pompa durduldu</string>
|
||||
|
|
|
@ -265,12 +265,7 @@
|
|||
<string name="smscommunicator_bolusreplywithcode">要输注大剂量胰岛素%1$.2fU 回复如下代码 %2$s</string>
|
||||
<string name="smscommunicator_calibrationreplywithcode">要发送校准值 %1$.2f 回复如下代码 %2$s</string>
|
||||
<string name="smscommunicator_bolusfailed">大剂量输注失败</string>
|
||||
<string name="bolusdelivered" formatted="false">成功输注大剂量%.2fU</string>
|
||||
<string name="bolusrequested" formatted="false">将要输注 %.2fU</string>
|
||||
<string name="smscommunicator_bolusdelivered" formatted="false">成功输注大剂量%.2fU</string>
|
||||
<string name="bolusdelivering" formatted="false">正在输注 %.2fU</string>
|
||||
<string name="smscommunicator_remotecommandsallowed">通过SMS短信允许远程命令</string>
|
||||
<string name="smscommunicator_remotebolusnotallowed">远程大剂量没有被允许</string>
|
||||
<string name="glucosetype_finger">手指</string>
|
||||
<string name="glucosetype_sensor">传感器</string>
|
||||
<string name="manual">手动</string>
|
||||
|
@ -338,16 +333,12 @@
|
|||
<string name="smscommunicator_loopisenabled">闭环被启用</string>
|
||||
<string name="valuelimitedto">%1$.2f 超过 %2$.2f的限制</string>
|
||||
<string name="valueoutofrange" formatted="false">值 %s 超过了硬限制</string>
|
||||
<string name="smscommunicator_remotebasalnotallowed">远程基础率设置没有被允许</string>
|
||||
<string name="smscommunicator_remotecommandnotallowed">远程命令没有被允许</string>
|
||||
<string name="smscommunicator_basalreplywithcode">要开始基础率 %1$.2fU/h 请回复如下代码 %2$s</string>
|
||||
<string name="smscommunicator_suspendreplywithcode">要暂停闭环 %1$d 分钟请回复如下代码 %2$s</string>
|
||||
<string name="smscommunicator_tempbasalset">临时基础率 %1$.2fU/h 持续 %2$d 分钟启用成功了</string>
|
||||
<string name="smscommunicator_tempbasalfailed">开始临时基础率失败了</string>
|
||||
<string name="smscommunicator_basalstopreplywithcode" formatted="false">要停止临时基础率,请回复如下代码 %s</string>
|
||||
<string name="smscommunicator_tempbasalcanceled">临时基础率取消了</string>
|
||||
<string name="smscommunicator_tempbasalcancelfailed">取消临时基础率失败</string>
|
||||
<string name="smscommunicator_unknowncommand">未知的命令或错误的回复</string>
|
||||
<string name="quickwizard">快速向导</string>
|
||||
<string name="quickwizardsettings">快速向导设置</string>
|
||||
<string name="overview_editquickwizard_buttontext">按钮文本:</string>
|
||||
|
@ -471,7 +462,6 @@
|
|||
<string name="send_calibration" formatted="false">确认将校准值 %.1f 发送到 xDrip 吗?</string>
|
||||
<string name="xdripnotinstalled">没有安装xDrip+</string>
|
||||
<string name="calibrationsent">校准发送到 xDrip</string>
|
||||
<string name="smscommunicator_remotecalibrationnotallowed">远程校准没有被允许</string>
|
||||
<string name="smscommunicator_calibrationsent">校准值发送了,必须在xDrip开启允许通过其他app使用它的校准功能</string>
|
||||
<string name="smscommunicator_calibrationfailed">xDrip 没有收到校准</string>
|
||||
<string name="pumpsuspended">泵暂停了</string>
|
||||
|
|
|
@ -55,6 +55,7 @@
|
|||
<string name="description_xdrip_status_line">Show information about your loop on your xDrip+ watchface.</string>
|
||||
<string name="description_sms_communicator">Remote control AndroidAPS using SMS commands.</string>
|
||||
|
||||
<string name="objectives_button_back">Back</string>
|
||||
<string name="objectives_button_start">Start</string>
|
||||
<string name="objectives_button_verify">Verify</string>
|
||||
<string name="nsprofileview_units_label">Units</string>
|
||||
|
@ -293,12 +294,11 @@
|
|||
<string name="smscommunicator_bolusreplywithcode">To deliver bolus %1$.2fU reply with code %2$s</string>
|
||||
<string name="smscommunicator_calibrationreplywithcode">To send calibration %1$.2f reply with code %2$s</string>
|
||||
<string name="smscommunicator_bolusfailed">Bolus failed</string>
|
||||
<string name="bolusdelivered" formatted="false">Bolus %.2fU delivered successfully</string>
|
||||
<string name="bolusrequested" formatted="false">Going to deliver %.2fU</string>
|
||||
<string name="smscommunicator_bolusdelivered" formatted="false">Bolus %.2fU delivered successfully</string>
|
||||
<string name="bolusdelivering" formatted="false">Delivering %.2fU</string>
|
||||
<string name="bolusdelivered">Bolus %1$.2fU delivered successfully</string>
|
||||
<string name="bolusrequested">Going to deliver %1$.2fU</string>
|
||||
<string name="smscommunicator_bolusdelivered">Bolus %1$.2fU delivered successfully</string>
|
||||
<string name="bolusdelivering">Delivering %1$.2fU</string>
|
||||
<string name="smscommunicator_remotecommandsallowed">Allow remote commands via SMS</string>
|
||||
<string name="smscommunicator_remotebolusnotallowed">Remote bolus not allowed</string>
|
||||
<string name="glucosetype_finger">Finger</string>
|
||||
<string name="glucosetype_sensor">Sensor</string>
|
||||
<string name="manual">Manual</string>
|
||||
|
@ -366,16 +366,25 @@
|
|||
<string name="smscommunicator_loopisenabled">Loop is enabled</string>
|
||||
<string name="valuelimitedto">%1$.2f limited to %2$.2f</string>
|
||||
<string name="valueoutofrange" formatted="false">Value %s is out of hard limits</string>
|
||||
<string name="smscommunicator_remotebasalnotallowed">Remote basal setting is not allowed</string>
|
||||
<string name="smscommunicator_remotecommandnotallowed">Remote command is not allowed</string>
|
||||
<string name="smscommunicator_basalreplywithcode">To start basal %1$.2fU/h reply with code %2$s</string>
|
||||
<string name="smscommunicator_remotebolusnotallowed">Remote bolus not available. Try again later.</string>
|
||||
<string name="smscommunicator_basalreplywithcode">To start basal %1$.2fU/h for %2$d min reply with code %3$s</string>
|
||||
<string name="smscommunicator_profilereplywithcode">To switch profile to %1$s %2$d%% reply with code %3$s</string>
|
||||
<string name="smscommunicator_extendedreplywithcode">To start extended bolus %1$.2fU for %2$d min reply with code %3$s</string>
|
||||
<string name="smscommunicator_basalpctreplywithcode">To start basal %1$d%% for %2$d min reply with code %3$s</string>
|
||||
<string name="smscommunicator_suspendreplywithcode">To suspend loop for %1$d minutes reply with code %2$s</string>
|
||||
<string name="smscommunicator_tempbasalset">Temp basal %1$.2fU/h for %2$d min started successfully</string>
|
||||
<string name="smscommunicator_extendedset">Extended bolus %1$.2fU for %2$d min started successfully</string>
|
||||
<string name="smscommunicator_tempbasalset_percent">Temp basal %1$d%% for %2$d min started successfully</string>
|
||||
<string name="smscommunicator_tempbasalfailed">Temp basal start failed</string>
|
||||
<string name="smscommunicator_basalstopreplywithcode" formatted="false">To stop temp basal reply with code %s</string>
|
||||
<string name="smscommunicator_extendedfailed">Extended bolus start failed</string>
|
||||
<string name="smscommunicator_basalstopreplywithcode">To stop temp basal reply with code %1$s</string>
|
||||
<string name="smscommunicator_extendedstopreplywithcode">To stop extended bolus reply with code %1$s</string>
|
||||
<string name="smscommunicator_tempbasalcanceled">Temp basal canceled</string>
|
||||
<string name="smscommunicator_extendedcanceled">Extended bolus canceled</string>
|
||||
<string name="smscommunicator_tempbasalcancelfailed">Canceling temp basal failed</string>
|
||||
<string name="smscommunicator_unknowncommand">Uknown command or wrong reply</string>
|
||||
<string name="smscommunicator_extendedcancelfailed">Canceling extended bolus failed</string>
|
||||
<string name="smscommunicator_unknowncommand">Unknown command or wrong reply</string>
|
||||
|
||||
<string name="quickwizard">QuickWizard</string>
|
||||
<string name="quickwizardsettings">QuickWizard settings</string>
|
||||
|
@ -508,7 +517,6 @@
|
|||
<string name="send_calibration" formatted="false">Send calibration %.1f to xDrip?</string>
|
||||
<string name="xdripnotinstalled">xDrip+ not installed</string>
|
||||
<string name="calibrationsent">Calibration sent to xDrip</string>
|
||||
<string name="smscommunicator_remotecalibrationnotallowed">Remote calibration not allowed</string>
|
||||
<string name="smscommunicator_calibrationsent">Calibration sent. Receiving must be enabled in xDrip.</string>
|
||||
<string name="smscommunicator_calibrationfailed">xDrip is not receiving calibrations</string>
|
||||
<string name="pumpsuspended">Pump suspended</string>
|
||||
|
@ -1311,8 +1319,13 @@
|
|||
<string name="key_smbmaxminutes" translatable="false">smbmaxminutes</string>
|
||||
<string name="dst_plugin_name" translatable="false">Dayligh Saving time</string>
|
||||
<string name="dst_in_24h_warning">Dayligh Saving time change in 24h or less</string>
|
||||
<string name="dst_loop_disabled_warning">Dayligh Saving time change in less than 3 hours - Closed loop diabled</string>
|
||||
|
||||
<string name="dst_loop_disabled_warning">Daylight saving time change less than 3 hours ago - Closed loop disabled</string>
|
||||
<string name="storage">internal storage constraint</string>
|
||||
<string name="diskfull">Free at least %1$d MB from internal storage! Loop disabled!</string>
|
||||
<string name="wrongformat">Wrong format</string>
|
||||
<string name="sms_wrongcode">Wrong code. Command cancelled.</string>
|
||||
<string name="notconfigured">Not configured</string>
|
||||
<string name="profileswitchcreated">Profile switch created</string>
|
||||
|
||||
<!-- Pump Abstract -->
|
||||
<string name="pump_operation_not_supported_by_pump_driver">Operation not supported by pump and/or driver.</string>
|
||||
|
|
|
@ -1,57 +1,60 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<Preference android:title="@string/insight_pairing">
|
||||
<intent
|
||||
android:targetClass="info.nightscout.androidaps.plugins.pump.insight.activities.InsightPairingInformationActivity"
|
||||
android:targetPackage="info.nightscout.androidaps" />
|
||||
</Preference>
|
||||
<PreferenceCategory android:title="@string/insight_local">
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="insight_log_site_changes"
|
||||
android:title="@string/log_site_changes" />
|
||||
<Preference android:title="@string/insight_pairing">
|
||||
<intent
|
||||
android:targetClass="info.nightscout.androidaps.plugins.pump.insight.activities.InsightPairingInformationActivity"
|
||||
android:targetPackage="info.nightscout.androidaps" />
|
||||
</Preference>
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="insight_log_tube_changes"
|
||||
android:title="@string/log_tube_changes" />
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="insight_log_site_changes"
|
||||
android:title="@string/log_site_changes" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="insight_log_battery_changes"
|
||||
android:title="@string/log_battery_changes" />
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="insight_log_tube_changes"
|
||||
android:title="@string/log_tube_changes" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="insight_log_operating_mode_changes"
|
||||
android:title="@string/log_operating_mode_changes" />
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="insight_log_battery_changes"
|
||||
android:title="@string/log_battery_changes" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="insight_log_alerts"
|
||||
android:title="@string/log_alerts" />
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="insight_log_operating_mode_changes"
|
||||
android:title="@string/log_operating_mode_changes" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="insight_enable_tbr_emulation"
|
||||
android:summary="@string/enable_tbr_emulation_summary"
|
||||
android:title="@string/enable_tbr_emulation" />
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="insight_log_alerts"
|
||||
android:title="@string/log_alerts" />
|
||||
|
||||
<EditTextPreference
|
||||
android:defaultValue="5"
|
||||
android:inputType="number"
|
||||
android:key="insight_min_recovery_duration"
|
||||
android:title="@string/min_recovery_duration" />
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="insight_enable_tbr_emulation"
|
||||
android:summary="@string/enable_tbr_emulation_summary"
|
||||
android:title="@string/enable_tbr_emulation" />
|
||||
|
||||
<EditTextPreference
|
||||
android:defaultValue="20"
|
||||
android:inputType="number"
|
||||
android:key="insight_max_recovery_duration"
|
||||
android:title="@string/max_recovery_duration" />
|
||||
<EditTextPreference
|
||||
android:defaultValue="5"
|
||||
android:inputType="number"
|
||||
android:key="insight_min_recovery_duration"
|
||||
android:title="@string/min_recovery_duration" />
|
||||
|
||||
<EditTextPreference
|
||||
android:defaultValue="5"
|
||||
android:inputType="number"
|
||||
android:key="insight_disconnect_delay"
|
||||
android:title="@string/disconnect_delay" />
|
||||
<EditTextPreference
|
||||
android:defaultValue="20"
|
||||
android:inputType="number"
|
||||
android:key="insight_max_recovery_duration"
|
||||
android:title="@string/max_recovery_duration" />
|
||||
|
||||
<EditTextPreference
|
||||
android:defaultValue="5"
|
||||
android:inputType="number"
|
||||
android:key="insight_disconnect_delay"
|
||||
android:title="@string/disconnect_delay" />
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
||||
|
|
|
@ -2,6 +2,7 @@ package info;
|
|||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.res.Resources;
|
||||
|
||||
import com.squareup.otto.Bus;
|
||||
|
@ -9,6 +10,7 @@ import com.squareup.otto.Bus;
|
|||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
import org.junit.Assert;
|
||||
import org.mockito.stubbing.Answer;
|
||||
import org.powermock.api.mockito.PowerMockito;
|
||||
|
||||
import java.util.Locale;
|
||||
|
@ -17,6 +19,7 @@ import info.nightscout.androidaps.Constants;
|
|||
import info.nightscout.androidaps.MainApp;
|
||||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.data.ConstraintChecker;
|
||||
import info.nightscout.androidaps.data.IobTotal;
|
||||
import info.nightscout.androidaps.data.Profile;
|
||||
import info.nightscout.androidaps.data.ProfileStore;
|
||||
import info.nightscout.androidaps.db.DatabaseHelper;
|
||||
|
@ -24,11 +27,14 @@ 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.iob.iobCobCalculator.CobInfo;
|
||||
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.IobCobCalculatorPlugin;
|
||||
import info.nightscout.androidaps.plugins.pump.danaR.DanaRPlugin;
|
||||
import info.nightscout.androidaps.plugins.pump.danaRKorean.DanaRKoreanPlugin;
|
||||
import info.nightscout.androidaps.plugins.pump.danaRv2.DanaRv2Plugin;
|
||||
import info.nightscout.androidaps.plugins.treatments.TreatmentService;
|
||||
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin;
|
||||
import info.nightscout.androidaps.plugins.pump.danaR.DanaRPlugin;
|
||||
import info.nightscout.androidaps.plugins.pump.danaRKorean.DanaRKoreanPlugin;
|
||||
import info.nightscout.androidaps.queue.Callback;
|
||||
import info.nightscout.androidaps.queue.CommandQueue;
|
||||
import info.nightscout.androidaps.utils.SP;
|
||||
|
||||
|
@ -36,6 +42,7 @@ import static org.mockito.ArgumentMatchers.any;
|
|||
import static org.mockito.ArgumentMatchers.anyBoolean;
|
||||
import static org.mockito.ArgumentMatchers.anyInt;
|
||||
import static org.mockito.ArgumentMatchers.anyLong;
|
||||
import static org.mockito.Mockito.doAnswer;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
|
@ -51,6 +58,8 @@ public class AAPSMocker {
|
|||
|
||||
public static Intent intentSent = null;
|
||||
|
||||
public static CommandQueue queue;
|
||||
|
||||
public static void mockStrings() {
|
||||
Locale.setDefault(new Locale("en", "US"));
|
||||
|
||||
|
@ -104,6 +113,43 @@ public class AAPSMocker {
|
|||
when(MainApp.gs(R.string.profile_per_unit)).thenReturn("/U");
|
||||
when(MainApp.gs(R.string.profile_carbs_per_unit)).thenReturn("g/U");
|
||||
when(MainApp.gs(R.string.profile_ins_units_per_hout)).thenReturn("U/h");
|
||||
when(MainApp.gs(R.string.sms_wrongcode)).thenReturn("Wrong code. Command cancelled.");
|
||||
when(MainApp.gs(R.string.sms_iob)).thenReturn("IOB:");
|
||||
when(MainApp.gs(R.string.sms_lastbg)).thenReturn("Last BG:");
|
||||
when(MainApp.gs(R.string.sms_minago)).thenReturn("%1$dmin ago");
|
||||
when(MainApp.gs(R.string.smscommunicator_remotecommandnotallowed)).thenReturn("Remote command is not allowed");
|
||||
when(MainApp.gs(R.string.loopsuspendedfor)).thenReturn("Suspended (%1$d m)");
|
||||
when(MainApp.gs(R.string.smscommunicator_loopisdisabled)).thenReturn("Loop is disabled");
|
||||
when(MainApp.gs(R.string.smscommunicator_loopisenabled)).thenReturn("Loop is enabled");
|
||||
when(MainApp.gs(R.string.wrongformat)).thenReturn("Wrong format");
|
||||
when(MainApp.gs(R.string.smscommunicator_loophasbeendisabled)).thenReturn("Loop has been disabled");
|
||||
when(MainApp.gs(R.string.smscommunicator_loophasbeenenabled)).thenReturn("Loop has been enabled");
|
||||
when(MainApp.gs(R.string.smscommunicator_tempbasalcanceled)).thenReturn("Temp basal canceled");
|
||||
when(MainApp.gs(R.string.smscommunicator_loopresumed)).thenReturn("Loop resumed");
|
||||
when(MainApp.gs(R.string.smscommunicator_wrongduration)).thenReturn("Wrong duration");
|
||||
when(MainApp.gs(R.string.smscommunicator_suspendreplywithcode)).thenReturn("To suspend loop for %1$d minutes reply with code %2$s");
|
||||
when(MainApp.gs(R.string.smscommunicator_loopsuspended)).thenReturn("Loop suspended");
|
||||
when(MainApp.gs(R.string.smscommunicator_unknowncommand)).thenReturn("Unknown command or wrong reply");
|
||||
when(MainApp.gs(R.string.notconfigured)).thenReturn("Not configured");
|
||||
when(MainApp.gs(R.string.smscommunicator_profilereplywithcode)).thenReturn("To switch profile to %1$s %2$d%% reply with code %3$s");
|
||||
when(MainApp.gs(R.string.profileswitchcreated)).thenReturn("Profile switch created");
|
||||
when(MainApp.gs(R.string.smscommunicator_basalstopreplywithcode)).thenReturn("To stop temp basal reply with code %1$s");
|
||||
when(MainApp.gs(R.string.smscommunicator_basalpctreplywithcode)).thenReturn("To start basal %1$d%% for %2$d min reply with code %3$s");
|
||||
when(MainApp.gs(R.string.smscommunicator_tempbasalset_percent)).thenReturn("Temp basal %1$d%% for %2$d min started successfully");
|
||||
when(MainApp.gs(R.string.smscommunicator_basalreplywithcode)).thenReturn("To start basal %1$.2fU/h for %2$d min reply with code %3$s");
|
||||
when(MainApp.gs(R.string.smscommunicator_tempbasalset)).thenReturn("Temp basal %1$.2fU/h for %2$d min started successfully");
|
||||
when(MainApp.gs(R.string.smscommunicator_extendedstopreplywithcode)).thenReturn("To stop extended bolus reply with code %1$s");
|
||||
when(MainApp.gs(R.string.smscommunicator_extendedcanceled)).thenReturn("Extended bolus canceled");
|
||||
when(MainApp.gs(R.string.smscommunicator_extendedreplywithcode)).thenReturn("To start extended bolus %1$.2fU for %2$d min reply with code %3$s");
|
||||
when(MainApp.gs(R.string.smscommunicator_extendedset)).thenReturn("Extended bolus %1$.2fU for %2$d min started successfully");
|
||||
when(MainApp.gs(R.string.smscommunicator_bolusreplywithcode)).thenReturn("To deliver bolus %1$.2fU reply with code %2$s");
|
||||
when(MainApp.gs(R.string.smscommunicator_bolusdelivered)).thenReturn("Bolus %1$.2fU delivered successfully");
|
||||
when(MainApp.gs(R.string.smscommunicator_remotebolusnotallowed)).thenReturn("Remote bolus not available. Try again later.");
|
||||
when(MainApp.gs(R.string.smscommunicator_calibrationreplywithcode)).thenReturn("To send calibration %1$.2f reply with code %2$s");
|
||||
when(MainApp.gs(R.string.smscommunicator_calibrationsent)).thenReturn("Calibration sent. Receiving must be enabled in xDrip.");
|
||||
when(MainApp.gs(R.string.pumpsuspended)).thenReturn("Pump suspended");
|
||||
when(MainApp.gs(R.string.cob)).thenReturn("COB");
|
||||
when(MainApp.gs(R.string.value_unavailable_short)).thenReturn("n/a");
|
||||
}
|
||||
|
||||
public static MainApp mockMainApp() {
|
||||
|
@ -143,7 +189,7 @@ public class AAPSMocker {
|
|||
when(L.isEnabled(any())).thenReturn(true);
|
||||
}
|
||||
|
||||
public static void mockNSUpload(){
|
||||
public static void mockNSUpload() {
|
||||
PowerMockito.mockStatic(NSUpload.class);
|
||||
}
|
||||
|
||||
|
@ -152,6 +198,8 @@ public class AAPSMocker {
|
|||
Resources mResources = mock(Resources.class);
|
||||
when(MainApp.instance().getApplicationContext()).thenReturn(mockedContext);
|
||||
when(mockedContext.getResources()).thenReturn(mResources);
|
||||
PackageManager packageManager = mock(PackageManager.class);
|
||||
when(mockedContext.getPackageManager()).thenReturn(packageManager);
|
||||
}
|
||||
|
||||
public static DatabaseHelper mockDatabaseHelper() {
|
||||
|
@ -161,7 +209,7 @@ public class AAPSMocker {
|
|||
}
|
||||
|
||||
public static void mockCommandQueue() {
|
||||
CommandQueue queue = mock(CommandQueue.class);
|
||||
queue = mock(CommandQueue.class);
|
||||
when(ConfigBuilderPlugin.getPlugin().getCommandQueue()).thenReturn(queue);
|
||||
}
|
||||
|
||||
|
@ -169,12 +217,21 @@ public class AAPSMocker {
|
|||
PowerMockito.mockStatic(TreatmentsPlugin.class);
|
||||
TreatmentsPlugin treatmentsPlugin = PowerMockito.mock(TreatmentsPlugin.class);
|
||||
when(TreatmentsPlugin.getPlugin()).thenReturn(treatmentsPlugin);
|
||||
when(treatmentsPlugin.getLastCalculationTreatments()).thenReturn(new IobTotal(0));
|
||||
when(treatmentsPlugin.getLastCalculationTempBasals()).thenReturn(new IobTotal(0));
|
||||
|
||||
TreatmentService treatmentService = PowerMockito.mock(TreatmentService.class);
|
||||
when(treatmentsPlugin.getService()).thenReturn(treatmentService);
|
||||
return treatmentsPlugin;
|
||||
}
|
||||
|
||||
public static void mockTreatmentService() throws Exception {
|
||||
public static void mockTreatmentService() {
|
||||
TreatmentService treatmentService = PowerMockito.mock(TreatmentService.class);
|
||||
PowerMockito.whenNew(TreatmentService.class).withNoArguments().thenReturn(treatmentService);
|
||||
try {
|
||||
PowerMockito.whenNew(TreatmentService.class).withNoArguments().thenReturn(treatmentService);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static DanaRPlugin mockDanaRPlugin() {
|
||||
|
@ -221,6 +278,14 @@ public class AAPSMocker {
|
|||
PowerMockito.when(ProfileFunctions.getInstance()).thenReturn(profileFunctions);
|
||||
profile = getValidProfile();
|
||||
PowerMockito.when(ProfileFunctions.getInstance().getProfile()).thenReturn(profile);
|
||||
PowerMockito.when(ProfileFunctions.getInstance().getProfileUnits()).thenReturn(Constants.MGDL);
|
||||
PowerMockito.when(ProfileFunctions.getInstance().getProfileName()).thenReturn(TESTPROFILENAME);
|
||||
}
|
||||
|
||||
public static void mockIobCobCalculatorPlugin() {
|
||||
PowerMockito.mockStatic(IobCobCalculatorPlugin.class);
|
||||
IobCobCalculatorPlugin iobCobCalculatorPlugin = PowerMockito.mock(IobCobCalculatorPlugin.class);
|
||||
PowerMockito.when(IobCobCalculatorPlugin.getPlugin()).thenReturn(iobCobCalculatorPlugin);
|
||||
}
|
||||
|
||||
private static MockedBus bus = new MockedBus();
|
||||
|
|
|
@ -2,6 +2,7 @@ package info.nightscout.androidaps.interfaces;
|
|||
|
||||
import junit.framework.Assert;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.powermock.core.classloader.annotations.PrepareForTest;
|
||||
|
@ -9,6 +10,7 @@ import org.powermock.modules.junit4.PowerMockRunner;
|
|||
|
||||
import info.AAPSMocker;
|
||||
import info.nightscout.androidaps.MainApp;
|
||||
import info.nightscout.androidaps.logging.L;
|
||||
import info.nightscout.androidaps.utils.SP;
|
||||
|
||||
/**
|
||||
|
@ -16,15 +18,11 @@ import info.nightscout.androidaps.utils.SP;
|
|||
*/
|
||||
|
||||
@RunWith(PowerMockRunner.class)
|
||||
@PrepareForTest({MainApp.class, SP.class})
|
||||
@PrepareForTest({MainApp.class, SP.class, L.class})
|
||||
public class ConstraintTest {
|
||||
|
||||
@Test
|
||||
public void doTests() {
|
||||
AAPSMocker.mockMainApp();
|
||||
AAPSMocker.mockApplicationContext();
|
||||
AAPSMocker.mockSP();
|
||||
|
||||
Constraint<Boolean> b = new Constraint<>(true);
|
||||
Assert.assertEquals(Boolean.TRUE, b.value());
|
||||
Assert.assertEquals("", b.getReasons());
|
||||
|
@ -56,5 +54,18 @@ public class ConstraintTest {
|
|||
Assert.assertEquals("ConstraintTest: Set 5d\nConstraintTest: Set 6d\nConstraintTest: Set 4d", d.getReasons());
|
||||
Assert.assertEquals("ConstraintTest: Set 4d", d.getMostLimitedReasons());
|
||||
Assert.assertEquals(10d, d.originalValue());
|
||||
d.setIfDifferent(7d, "Set 7d", this);
|
||||
Assert.assertEquals(7d, d.value());
|
||||
Assert.assertEquals("ConstraintTest: Set 5d\nConstraintTest: Set 6d\nConstraintTest: Set 4d\nConstraintTest: Set 7d", d.getReasons());
|
||||
Assert.assertEquals("ConstraintTest: Set 4d\nConstraintTest: Set 7d", d.getMostLimitedReasons());
|
||||
Assert.assertEquals(10d, d.originalValue());
|
||||
}
|
||||
|
||||
@Before
|
||||
public void prepareMock() {
|
||||
AAPSMocker.mockMainApp();
|
||||
AAPSMocker.mockApplicationContext();
|
||||
AAPSMocker.mockSP();
|
||||
AAPSMocker.mockL();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,6 +54,7 @@ public class ConstraintsCheckerTest {
|
|||
DanaRPlugin danaRPlugin;
|
||||
DanaRSPlugin danaRSPlugin;
|
||||
LocalInsightPlugin insightPlugin;
|
||||
OpenAPSSMBPlugin openAPSSMBPlugin;
|
||||
|
||||
boolean notificationSent = false;
|
||||
|
||||
|
@ -119,6 +120,14 @@ public class ConstraintsCheckerTest {
|
|||
Assert.assertEquals(Boolean.FALSE, c.value());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void isSuperBolusEnabledTest() throws Exception {
|
||||
OpenAPSSMBPlugin.getPlugin().setPluginEnabled(PluginType.APS, true);
|
||||
|
||||
Constraint<Boolean> c = constraintChecker.isSuperBolusEnabled();
|
||||
Assert.assertEquals(Boolean.FALSE, c.value()); // SMB should limit
|
||||
}
|
||||
|
||||
@Test
|
||||
public void isSMBModeEnabledTest() throws Exception {
|
||||
objectivesPlugin.objectives.get(7).setStartedOn(null);
|
||||
|
@ -288,6 +297,7 @@ public class ConstraintsCheckerTest {
|
|||
danaRPlugin = DanaRPlugin.getPlugin();
|
||||
danaRSPlugin = DanaRSPlugin.getPlugin();
|
||||
insightPlugin = LocalInsightPlugin.getPlugin();
|
||||
openAPSSMBPlugin = OpenAPSSMBPlugin.getPlugin();
|
||||
ArrayList<PluginBase> constraintsPluginsList = new ArrayList<>();
|
||||
constraintsPluginsList.add(safetyPlugin);
|
||||
constraintsPluginsList.add(objectivesPlugin);
|
||||
|
@ -295,6 +305,7 @@ public class ConstraintsCheckerTest {
|
|||
constraintsPluginsList.add(danaRPlugin);
|
||||
constraintsPluginsList.add(danaRSPlugin);
|
||||
constraintsPluginsList.add(insightPlugin);
|
||||
constraintsPluginsList.add(openAPSSMBPlugin);
|
||||
when(mainApp.getSpecificPluginsListByInterface(ConstraintsInterface.class)).thenReturn(constraintsPluginsList);
|
||||
|
||||
}
|
||||
|
|
|
@ -9,7 +9,11 @@ import org.junit.runner.RunWith;
|
|||
import org.powermock.core.classloader.annotations.PrepareForTest;
|
||||
import org.powermock.modules.junit4.PowerMockRunner;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
import java.util.TimeZone;
|
||||
|
||||
import info.AAPSMocker;
|
||||
|
@ -27,39 +31,46 @@ public class DstHelperPluginTest {
|
|||
public void runTest() throws Exception {
|
||||
AAPSMocker.mockMainApp();
|
||||
AAPSMocker.mockApplicationContext();
|
||||
// test different time zones
|
||||
//Starting with Europe/Sofia
|
||||
Calendar c = Calendar.getInstance(TimeZone.getTimeZone("Europe/Sofia"));
|
||||
c.setTimeInMillis(DateUtil.fromISODateString("2018-10-28T02:00:00Z").getTime());
|
||||
int minutesLeftToChange = plugin.dstTest(c);
|
||||
Assert.assertEquals(60, minutesLeftToChange);
|
||||
c.setTimeInMillis(DateUtil.fromISODateString("2018-03-25T02:00:00Z").getTime());
|
||||
minutesLeftToChange = plugin.dstTest(c);
|
||||
Assert.assertEquals(60, minutesLeftToChange);
|
||||
// try something with half hour somewhere in Australia
|
||||
c = Calendar.getInstance(TimeZone.getTimeZone("Australia/Lord_Howe"));
|
||||
c.setTimeInMillis(DateUtil.fromISODateString("2018-04-01T00:00:00Z").getTime());
|
||||
minutesLeftToChange = plugin.dstTest(c);
|
||||
// try something with half hour somewhere in Australia
|
||||
c = Calendar.getInstance(TimeZone.getTimeZone("Australia/Lord_Howe"));
|
||||
c.setTimeInMillis(DateUtil.fromISODateString("2018-04-01T00:00:00Z").getTime());
|
||||
minutesLeftToChange = plugin.dstTest(c);
|
||||
Assert.assertEquals(90, minutesLeftToChange);
|
||||
c = Calendar.getInstance(TimeZone.getTimeZone("Australia/Lord_Howe"));
|
||||
// and back
|
||||
c.setTimeInMillis(DateUtil.fromISODateString("2018-10-07T00:00:00Z").getTime());
|
||||
minutesLeftToChange = plugin.dstTest(c);
|
||||
Assert.assertEquals(120, minutesLeftToChange);
|
||||
|
||||
c.setTimeInMillis(DateUtil.fromISODateString("2018-10-08T00:00:00Z").getTime());
|
||||
minutesLeftToChange = plugin.dstTest(c);
|
||||
Assert.assertEquals(0, minutesLeftToChange);
|
||||
TimeZone tz = TimeZone.getTimeZone("Europe/Rome");
|
||||
TimeZone.setDefault(tz);
|
||||
Calendar cal = Calendar.getInstance(tz, Locale.ITALIAN);
|
||||
DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.ITALIAN);
|
||||
Date dateBeforeDST = df.parse("2018-03-25 01:55");
|
||||
cal.setTime(dateBeforeDST);
|
||||
Assert.assertEquals(false, plugin.wasDST(cal));
|
||||
Assert.assertEquals(true, plugin.willBeDST(cal));
|
||||
|
||||
|
||||
TimeZone.setDefault(tz);
|
||||
cal = Calendar.getInstance(tz, Locale.ITALIAN);
|
||||
dateBeforeDST = df.parse("2018-03-25 03:05");
|
||||
cal.setTime(dateBeforeDST);
|
||||
Assert.assertEquals(true, plugin.wasDST(cal));
|
||||
Assert.assertEquals(false, plugin.willBeDST(cal));
|
||||
|
||||
|
||||
TimeZone.setDefault(tz);
|
||||
cal = Calendar.getInstance(tz, Locale.ITALIAN);
|
||||
dateBeforeDST = df.parse("2018-03-25 02:05"); //Cannot happen!!!
|
||||
cal.setTime(dateBeforeDST);
|
||||
Assert.assertEquals(true, plugin.wasDST(cal));
|
||||
Assert.assertEquals(false, plugin.willBeDST(cal));
|
||||
|
||||
TimeZone.setDefault(tz);
|
||||
cal = Calendar.getInstance(tz, Locale.ITALIAN);
|
||||
dateBeforeDST = df.parse("2018-03-25 05:55"); //Cannot happen!!!
|
||||
cal.setTime(dateBeforeDST);
|
||||
Assert.assertEquals(true, plugin.wasDST(cal));
|
||||
Assert.assertEquals(false, plugin.willBeDST(cal));
|
||||
|
||||
TimeZone.setDefault(tz);
|
||||
cal = Calendar.getInstance(tz, Locale.ITALIAN);
|
||||
dateBeforeDST = df.parse("2018-03-25 06:05"); //Cannot happen!!!
|
||||
cal.setTime(dateBeforeDST);
|
||||
Assert.assertEquals(false, plugin.wasDST(cal));
|
||||
Assert.assertEquals(false, plugin.willBeDST(cal));
|
||||
|
||||
// DST event was 30 mins
|
||||
c.setTimeInMillis(DateUtil.fromISODateString("2018-04-01T02:00:00Z").getTime());
|
||||
minutesLeftToChange = plugin.dstTest(c);
|
||||
// Assert.assertEquals(630, plugin.zoneOffsetInMinutes(c));
|
||||
Assert.assertEquals(0, minutesLeftToChange);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,80 @@
|
|||
package info.nightscout.androidaps.plugins.constraints.storage;
|
||||
import android.os.Environment;
|
||||
import android.os.StatFs;
|
||||
|
||||
import junit.framework.Assert;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.powermock.api.mockito.PowerMockito;
|
||||
import org.powermock.core.classloader.annotations.PrepareForTest;
|
||||
import org.powermock.modules.junit4.PowerMockRunner;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import info.AAPSMocker;
|
||||
import info.nightscout.androidaps.MainApp;
|
||||
import info.nightscout.androidaps.R;
|
||||
import info.nightscout.androidaps.interfaces.Constraint;
|
||||
|
||||
import static org.mockito.Mockito.when;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.powermock.api.mockito.PowerMockito.whenNew;
|
||||
import static org.mockito.ArgumentMatchers.any;
|
||||
|
||||
/**
|
||||
* Created by Rumen on 06.03.2019.
|
||||
*/
|
||||
|
||||
@RunWith(PowerMockRunner.class)
|
||||
@PrepareForTest({MainApp.class, StorageConstraintPlugin.class, StatFs.class, Environment.class})
|
||||
public class StorageConstraintPluginTest extends StorageConstraintPlugin{
|
||||
|
||||
StorageConstraintPlugin storageConstraintPlugin;
|
||||
private File mockedFile;
|
||||
private static final String path = "/data";
|
||||
private StatFs mockedStatFs;
|
||||
|
||||
@Test
|
||||
public void isLoopInvocationAllowedTest(){
|
||||
PowerMockito.mockStatic(StorageConstraintPlugin.class);
|
||||
// Set free space under 200(Mb) to disable loop
|
||||
when(StorageConstraintPlugin.getAvailableInternalMemorySize()).thenReturn(150L);
|
||||
Constraint<Boolean> c = new Constraint<>(true);
|
||||
c = storageConstraintPlugin.isClosedLoopAllowed(c);
|
||||
Assert.assertEquals(Boolean.FALSE, c.value());
|
||||
// Set free space over 200(Mb) to enable loop
|
||||
when(StorageConstraintPlugin.getAvailableInternalMemorySize()).thenReturn(300L);
|
||||
Constraint<Boolean> c2 = new Constraint<>(true);
|
||||
c2 = storageConstraintPlugin.isClosedLoopAllowed(c2);
|
||||
Assert.assertEquals(Boolean.TRUE, c2.value());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getAvailableInternalMemorySizeTest() throws Exception {
|
||||
PowerMockito.mockStatic(Environment.class);
|
||||
PowerMockito.when(Environment.getDataDirectory()).thenReturn(mockedFile);
|
||||
when(mockedFile.getPath()).thenReturn(path);
|
||||
when(mockedFile.exists()).thenReturn(true);
|
||||
|
||||
whenNew(StatFs.class).withArguments(any()).thenReturn(mockedStatFs);
|
||||
when(mockedStatFs.getBlockSizeLong()).thenReturn(1024L);
|
||||
when(mockedStatFs.getAvailableBlocksLong()).thenReturn(150l*1024);
|
||||
|
||||
long freeSpaceInMb = storageConstraintPlugin.getAvailableInternalMemorySize();
|
||||
Assert.assertEquals(150L, freeSpaceInMb);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Before
|
||||
public void prepareMock() {
|
||||
AAPSMocker.mockMainApp();
|
||||
AAPSMocker.mockStrings();
|
||||
AAPSMocker.mockBus();
|
||||
mockedFile = mock(File.class);
|
||||
mockedStatFs = mock(StatFs.class);
|
||||
storageConstraintPlugin = StorageConstraintPlugin.getPlugin();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,94 @@
|
|||
package info.nightscout.androidaps.plugins.general.smsCommunicator;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.stubbing.Answer;
|
||||
import org.powermock.core.classloader.annotations.PrepareForTest;
|
||||
import org.powermock.modules.junit4.PowerMockRunner;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import info.AAPSMocker;
|
||||
import info.nightscout.androidaps.Constants;
|
||||
import info.nightscout.androidaps.MainApp;
|
||||
import info.nightscout.androidaps.logging.L;
|
||||
import info.nightscout.androidaps.utils.DateUtil;
|
||||
import info.nightscout.androidaps.utils.SP;
|
||||
import info.nightscout.androidaps.utils.T;
|
||||
|
||||
import static org.mockito.ArgumentMatchers.any;
|
||||
import static org.powermock.api.mockito.PowerMockito.doAnswer;
|
||||
import static org.powermock.api.mockito.PowerMockito.mock;
|
||||
import static org.powermock.api.mockito.PowerMockito.mockStatic;
|
||||
import static org.powermock.api.mockito.PowerMockito.when;
|
||||
|
||||
@RunWith(PowerMockRunner.class)
|
||||
@PrepareForTest({SmsCommunicatorPlugin.class, L.class, SP.class, MainApp.class, DateUtil.class})
|
||||
|
||||
public class AuthRequestTest {
|
||||
SmsCommunicatorPlugin smsCommunicatorPlugin;
|
||||
Sms sentSms;
|
||||
boolean actionCalled = false;
|
||||
|
||||
@Test
|
||||
public void doTests() {
|
||||
Sms requester = new Sms("aNumber", "aText");
|
||||
SmsAction action = new SmsAction() {
|
||||
@Override
|
||||
public void run() {
|
||||
actionCalled = true;
|
||||
}
|
||||
};
|
||||
|
||||
// Check if SMS requesting code is sent
|
||||
AuthRequest authRequest = new AuthRequest(smsCommunicatorPlugin, requester, "Request text", "ABC", action);
|
||||
|
||||
Assert.assertEquals(sentSms.phoneNumber, "aNumber");
|
||||
Assert.assertEquals(sentSms.text, "Request text");
|
||||
|
||||
// wrong reply
|
||||
actionCalled = false;
|
||||
authRequest.action("EFG");
|
||||
Assert.assertEquals(sentSms.phoneNumber, "aNumber");
|
||||
Assert.assertEquals(sentSms.text, "Wrong code. Command cancelled.");
|
||||
Assert.assertFalse(actionCalled);
|
||||
|
||||
// correct reply
|
||||
authRequest = new AuthRequest(smsCommunicatorPlugin, requester, "Request text", "ABC", action);
|
||||
actionCalled = false;
|
||||
authRequest.action("ABC");
|
||||
Assert.assertTrue(actionCalled);
|
||||
// second time action should not be called
|
||||
actionCalled = false;
|
||||
authRequest.action("ABC");
|
||||
Assert.assertFalse(actionCalled);
|
||||
|
||||
// test timed out message
|
||||
long now = 10000;
|
||||
when(DateUtil.now()).thenReturn(now);
|
||||
authRequest = new AuthRequest(smsCommunicatorPlugin, requester, "Request text", "ABC", action);
|
||||
actionCalled = false;
|
||||
when(DateUtil.now()).thenReturn(now + T.mins(Constants.SMS_CONFIRM_TIMEOUT).msecs() + 1);
|
||||
authRequest.action("ABC");
|
||||
Assert.assertFalse(actionCalled);
|
||||
}
|
||||
|
||||
@Before
|
||||
public void prepareTests() {
|
||||
smsCommunicatorPlugin = mock(SmsCommunicatorPlugin.class);
|
||||
doAnswer((Answer) invocation -> {
|
||||
sentSms = invocation.getArgument(0);
|
||||
return null;
|
||||
}).when(smsCommunicatorPlugin).sendSMS(any(Sms.class));
|
||||
|
||||
AAPSMocker.mockMainApp();
|
||||
AAPSMocker.mockApplicationContext();
|
||||
AAPSMocker.mockSP();
|
||||
AAPSMocker.mockL();
|
||||
AAPSMocker.mockStrings();
|
||||
|
||||
mockStatic(DateUtil.class);
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue