Merge branch 'dev' into survey

This commit is contained in:
Milos Kozak 2019-10-22 10:45:18 +02:00
commit 5d17916e73
50 changed files with 496 additions and 234 deletions

View file

@ -109,7 +109,7 @@ android {
targetSdkVersion 28
multiDexEnabled true
versionCode 1500
version "2.4-dev-i"
version "2.4-dev-j"
buildConfigField "String", "VERSION", '"' + version + '"'
buildConfigField "String", "BUILDVERSION", '"' + generateGitBuild() + '-' + generateDate() + '"'
buildConfigField "String", "REMOTE", '"' + generateGitRemote() + '"'

View file

@ -12,13 +12,4 @@ public class Config {
public static final boolean PUMPCONTROL = BuildConfig.FLAVOR.equals("pumpcontrol");
public static final boolean PUMPDRIVERS = BuildConfig.FLAVOR.equals("full") || BuildConfig.FLAVOR.equals("pumpcontrol");
public static final boolean ACTION = !NSCLIENT;
public static final boolean MDI = !NSCLIENT;
public static final boolean OTHERPROFILES = !NSCLIENT;
public static final boolean SAFETY = !NSCLIENT;
public static final boolean SMSCOMMUNICATORENABLED = !NSCLIENT;
}

View file

@ -6,7 +6,6 @@ import android.content.pm.PackageManager;
import android.graphics.Rect;
import android.os.Bundle;
import android.os.PersistableBundle;
import android.os.PowerManager;
import android.text.SpannableString;
import android.text.method.LinkMovementMethod;
import android.text.util.Linkify;
@ -15,7 +14,6 @@ import android.view.Menu;
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.View;
import android.view.WindowManager;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import android.widget.LinearLayout;
@ -46,7 +44,6 @@ import info.nightscout.androidaps.activities.SingleFragmentActivity;
import info.nightscout.androidaps.activities.SurveyActivity;
import info.nightscout.androidaps.data.Profile;
import info.nightscout.androidaps.events.EventAppExit;
import info.nightscout.androidaps.events.EventPreferenceChange;
import info.nightscout.androidaps.events.EventRebuildTabs;
import info.nightscout.androidaps.interfaces.PluginBase;
import info.nightscout.androidaps.interfaces.PluginType;
@ -71,8 +68,6 @@ public class MainActivity extends NoSplashAppCompatActivity {
private static Logger log = LoggerFactory.getLogger(L.CORE);
private CompositeDisposable disposable = new CompositeDisposable();
protected PowerManager.WakeLock mWakeLock;
private ActionBarDrawerToggle actionBarDrawerToggle;
private MenuItem pluginPreferencesMenuItem;
@ -95,9 +90,6 @@ public class MainActivity extends NoSplashAppCompatActivity {
drawerLayout.addDrawerListener(actionBarDrawerToggle);
actionBarDrawerToggle.syncState();
// initialize screen wake lock
processPreferenceChange(new EventPreferenceChange(R.string.key_keep_screen_on));
doMigrations();
final ViewPager viewPager = findViewById(R.id.pager);
@ -155,20 +147,8 @@ public class MainActivity extends NoSplashAppCompatActivity {
setupTabs();
setupViews();
}
boolean keepScreenOn = Config.NSCLIENT && SP.getBoolean(R.string.key_keep_screen_on, false);
if (keepScreenOn)
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
else
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
}, FabricPrivacy::logException)
);
disposable.add(RxBus.INSTANCE
.toObservable(EventPreferenceChange.class)
.observeOn(AndroidSchedulers.mainThread())
.subscribe(this::processPreferenceChange, FabricPrivacy::logException)
);
if (!SP.getBoolean(R.string.key_setupwizard_processed, false)) {
Intent intent = new Intent(this, SetupWizardActivity.class);
startActivity(intent);
@ -184,35 +164,12 @@ public class MainActivity extends NoSplashAppCompatActivity {
}
}
@Override
public void onDestroy() {
if (mWakeLock != null)
if (mWakeLock.isHeld())
mWakeLock.release();
super.onDestroy();
}
@Override
public void onPause() {
super.onPause();
disposable.clear();
}
public void processPreferenceChange(final EventPreferenceChange ev) {
if (ev.isChanged(R.string.key_keep_screen_on)) {
boolean keepScreenOn = SP.getBoolean(R.string.key_keep_screen_on, false);
final PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
if (keepScreenOn) {
mWakeLock = pm.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK, "AndroidAPS:MainActivity_onEventPreferenceChange");
if (!mWakeLock.isHeld())
mWakeLock.acquire();
} else {
if (mWakeLock != null && mWakeLock.isHeld())
mWakeLock.release();
}
}
}
private void setupViews() {
TabPageAdapter pageAdapter = new TabPageAdapter(getSupportFragmentManager(), this);
NavigationView navigationView = findViewById(R.id.navigation_view);

View file

@ -2,11 +2,12 @@ package info.nightscout.androidaps;
import android.app.Application;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.IntentFilter;
import android.content.res.Resources;
import android.os.PowerManager;
import android.os.SystemClock;
import androidx.annotation.Nullable;
import androidx.annotation.PluralsRes;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
@ -24,6 +25,7 @@ import java.util.ArrayList;
import info.nightscout.androidaps.data.ConstraintChecker;
import info.nightscout.androidaps.db.DatabaseHelper;
import info.nightscout.androidaps.events.EventPreferenceChange;
import info.nightscout.androidaps.interfaces.PluginBase;
import info.nightscout.androidaps.interfaces.PluginType;
import info.nightscout.androidaps.interfaces.PumpInterface;
@ -32,6 +34,7 @@ import info.nightscout.androidaps.plugins.aps.loop.LoopPlugin;
import info.nightscout.androidaps.plugins.aps.openAPSAMA.OpenAPSAMAPlugin;
import info.nightscout.androidaps.plugins.aps.openAPSMA.OpenAPSMAPlugin;
import info.nightscout.androidaps.plugins.aps.openAPSSMB.OpenAPSSMBPlugin;
import info.nightscout.androidaps.plugins.bus.RxBus;
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
import info.nightscout.androidaps.plugins.constraints.dstHelper.DstHelperPlugin;
import info.nightscout.androidaps.plugins.constraints.objectives.ObjectivesPlugin;
@ -90,13 +93,20 @@ import info.nightscout.androidaps.receivers.NSAlarmReceiver;
import info.nightscout.androidaps.receivers.TimeDateOrTZChangeReceiver;
import info.nightscout.androidaps.services.Intents;
import info.nightscout.androidaps.utils.FabricPrivacy;
import info.nightscout.androidaps.utils.SP;
import io.fabric.sdk.android.Fabric;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.CompositeDisposable;
import static info.nightscout.androidaps.plugins.general.versionChecker.VersionCheckerUtilsKt.triggerCheckVersion;
public class MainApp extends Application {
private static Logger log = LoggerFactory.getLogger(L.CORE);
private CompositeDisposable disposable = new CompositeDisposable();
private PowerManager.WakeLock mWakeLock;
private static KeepAliveReceiver keepAliveReceiver;
private static MainApp sInstance;
@ -167,7 +177,7 @@ public class MainApp extends Application {
// Register all tabs in app here
pluginsList.add(OverviewPlugin.INSTANCE);
pluginsList.add(IobCobCalculatorPlugin.getPlugin());
if (Config.ACTION) pluginsList.add(ActionsPlugin.INSTANCE);
if (!Config.NSCLIENT) pluginsList.add(ActionsPlugin.INSTANCE);
pluginsList.add(InsulinOrefRapidActingPlugin.getPlugin());
pluginsList.add(InsulinOrefUltraRapidActingPlugin.getPlugin());
pluginsList.add(InsulinOrefFreePeakPlugin.getPlugin());
@ -180,25 +190,24 @@ public class MainApp extends Application {
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.PUMPDRIVERS && engineeringMode)
pluginsList.add(MedtronicPumpPlugin.getPlugin());
if (Config.MDI) pluginsList.add(MDIPlugin.getPlugin());
if (Config.PUMPDRIVERS) pluginsList.add(MedtronicPumpPlugin.getPlugin());
if (!Config.NSCLIENT) pluginsList.add(MDIPlugin.getPlugin());
pluginsList.add(VirtualPumpPlugin.getPlugin());
pluginsList.add(CareportalPlugin.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.NSCLIENT) pluginsList.add(SimpleProfilePlugin.getPlugin());
if (!Config.NSCLIENT) pluginsList.add(LocalProfilePlugin.getPlugin());
pluginsList.add(TreatmentsPlugin.getPlugin());
if (Config.SAFETY) pluginsList.add(SafetyPlugin.getPlugin());
if (Config.SAFETY) pluginsList.add(VersionCheckerPlugin.INSTANCE);
if (Config.SAFETY) pluginsList.add(StorageConstraintPlugin.getPlugin());
if (Config.SAFETY) pluginsList.add(SignatureVerifier.getPlugin());
if (Config.APS) pluginsList.add(ObjectivesPlugin.INSTANCE);
if (!Config.NSCLIENT) pluginsList.add(SafetyPlugin.getPlugin());
if (!Config.NSCLIENT) pluginsList.add(VersionCheckerPlugin.INSTANCE);
if (!Config.NSCLIENT) pluginsList.add(StorageConstraintPlugin.getPlugin());
if (!Config.NSCLIENT) pluginsList.add(SignatureVerifier.getPlugin());
if (!Config.APS) pluginsList.add(ObjectivesPlugin.INSTANCE);
pluginsList.add(SourceXdripPlugin.getPlugin());
pluginsList.add(SourceNSClientPlugin.getPlugin());
pluginsList.add(SourceMM640gPlugin.getPlugin());
@ -207,7 +216,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.NSCLIENT) pluginsList.add(SmsCommunicatorPlugin.getPlugin());
pluginsList.add(FoodPlugin.getPlugin());
pluginsList.add(WearPlugin.initPlugin(this));
@ -236,6 +245,15 @@ public class MainApp extends Application {
startKeepAliveService();
}).start();
}
// initialize screen wake lock
processPreferenceChange(new EventPreferenceChange(R.string.key_keep_screen_on));
disposable.add(RxBus.INSTANCE
.toObservable(EventPreferenceChange.class)
.observeOn(AndroidSchedulers.mainThread())
.subscribe(this::processPreferenceChange, FabricPrivacy::logException)
);
}
private void registerLocalBroadcastReceiver() {
@ -321,6 +339,21 @@ public class MainApp extends Application {
return sConstraintsChecker;
}
public void processPreferenceChange(final EventPreferenceChange ev) {
if (ev.isChanged(R.string.key_keep_screen_on)) {
boolean keepScreenOn = SP.getBoolean(R.string.key_keep_screen_on, false);
final PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
if (keepScreenOn) {
mWakeLock = pm.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK, "AndroidAPS:MainApp_processPreferenceChange");
if (!mWakeLock.isHeld())
mWakeLock.acquire();
} else {
if (mWakeLock != null && mWakeLock.isHeld())
mWakeLock.release();
}
}
}
public static ArrayList<PluginBase> getPluginsList() {
return pluginsList;
}
@ -383,19 +416,6 @@ 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;
}
} else {
log.error("pluginsList=null");
}
return null;
}
public static boolean isEngineeringModeOrRelease() {
if (!Config.APS)
return true;
@ -442,6 +462,9 @@ public class MainApp extends Application {
unregisterReceiver(timeDateOrTZChangeReceiver);
}
unregisterActivityLifecycleCallbacks(TS.INSTANCE);
if (mWakeLock != null && mWakeLock.isHeld())
mWakeLock.release();
}
public static int dpToPx(int dp) {

View file

@ -536,11 +536,11 @@ public class TDDStatsActivity extends NoSplashActivity {
public static boolean isOldData(List<TDD> historyList) {
Object activePump = ConfigBuilderPlugin.getPlugin().getActivePump();
PumpInterface dana = MainApp.getSpecificPlugin(DanaRPlugin.class);
PumpInterface danaRS = MainApp.getSpecificPlugin(DanaRSPlugin.class);
PumpInterface danaV2 = MainApp.getSpecificPlugin(DanaRv2Plugin.class);
PumpInterface danaKorean = MainApp.getSpecificPlugin(DanaRKoreanPlugin.class);
PumpInterface insight = MainApp.getSpecificPlugin(LocalInsightPlugin.class);
PumpInterface dana = DanaRPlugin.getPlugin();
PumpInterface danaRS = DanaRSPlugin.getPlugin();
PumpInterface danaV2 = DanaRv2Plugin.getPlugin();
PumpInterface danaKorean = DanaRKoreanPlugin.getPlugin();
PumpInterface insight = LocalInsightPlugin.getPlugin();
boolean startsYesterday = activePump == dana || activePump == danaRS || activePump == danaV2 || activePump == danaKorean || activePump == insight;

View file

@ -50,6 +50,7 @@ import info.nightscout.androidaps.plugins.bus.RxBus;
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
import info.nightscout.androidaps.plugins.general.nsclient.NSUpload;
import info.nightscout.androidaps.plugins.general.overview.dialogs.ErrorHelperActivity;
import info.nightscout.androidaps.plugins.general.wear.ActionStringHandler;
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.events.EventAutosensCalculationFinished;
import info.nightscout.androidaps.plugins.pump.virtual.VirtualPumpPlugin;
@ -645,7 +646,12 @@ public class LoopPlugin extends PluginBase {
@Override
public void run() {
if (!result.success) {
ToastUtils.showToastInUiThread(MainApp.instance().getApplicationContext(), MainApp.gs(R.string.tempbasaldeliveryerror));
Intent i = new Intent(MainApp.instance(), ErrorHelperActivity.class);
i.putExtra("soundid", R.raw.boluserror);
i.putExtra("status", result.comment);
i.putExtra("title", MainApp.gs(R.string.tempbasaldeliveryerror));
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
MainApp.instance().startActivity(i);
}
}
});
@ -654,7 +660,12 @@ public class LoopPlugin extends PluginBase {
@Override
public void run() {
if (!result.success) {
ToastUtils.showToastInUiThread(MainApp.instance().getApplicationContext(), MainApp.gs(R.string.tempbasaldeliveryerror));
Intent i = new Intent(MainApp.instance(), ErrorHelperActivity.class);
i.putExtra("soundid", R.raw.boluserror);
i.putExtra("status", result.comment);
i.putExtra("title", MainApp.gs(R.string.tempbasaldeliveryerror));
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
MainApp.instance().startActivity(i);
}
}
});
@ -665,7 +676,12 @@ public class LoopPlugin extends PluginBase {
@Override
public void run() {
if (!result.success) {
ToastUtils.showToastInUiThread(MainApp.instance().getApplicationContext(), MainApp.gs(R.string.extendedbolusdeliveryerror));
Intent i = new Intent(MainApp.instance(), ErrorHelperActivity.class);
i.putExtra("soundid", R.raw.boluserror);
i.putExtra("status", result.comment);
i.putExtra("title", MainApp.gs(R.string.extendedbolusdeliveryerror));
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
MainApp.instance().startActivity(i);
}
}
});
@ -679,7 +695,12 @@ public class LoopPlugin extends PluginBase {
@Override
public void run() {
if (!result.success) {
ToastUtils.showToastInUiThread(MainApp.instance().getApplicationContext(), MainApp.gs(R.string.tempbasaldeliveryerror));
Intent i = new Intent(MainApp.instance(), ErrorHelperActivity.class);
i.putExtra("soundid", R.raw.boluserror);
i.putExtra("status", result.comment);
i.putExtra("title", MainApp.gs(R.string.tempbasaldeliveryerror));
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
MainApp.instance().startActivity(i);
}
}
});

View file

@ -29,7 +29,7 @@ class AutomationFragment : Fragment() {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
eventListAdapter = EventListAdapter(AutomationPlugin.automationEvents, fragmentManager)
eventListAdapter = EventListAdapter(AutomationPlugin.automationEvents, fragmentManager, activity)
automation_eventListView.layoutManager = LinearLayoutManager(context)
automation_eventListView.adapter = eventListAdapter

View file

@ -1,5 +1,6 @@
package info.nightscout.androidaps.plugins.general.automation;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
@ -26,14 +27,17 @@ import info.nightscout.androidaps.plugins.general.automation.actions.Action;
import info.nightscout.androidaps.plugins.general.automation.dialogs.EditEventDialog;
import info.nightscout.androidaps.plugins.general.automation.events.EventAutomationDataChanged;
import info.nightscout.androidaps.plugins.general.automation.triggers.TriggerConnector;
import info.nightscout.androidaps.utils.OKDialog;
class EventListAdapter extends RecyclerView.Adapter<EventListAdapter.ViewHolder> {
private final List<AutomationEvent> mEventList;
private final FragmentManager mFragmentManager;
private final List<AutomationEvent> eventList;
private final FragmentManager fragmentManager;
private final Activity activity;
EventListAdapter(List<AutomationEvent> events, FragmentManager fragmentManager) {
this.mEventList = events;
this.mFragmentManager = fragmentManager;
EventListAdapter(List<AutomationEvent> events, FragmentManager fragmentManager, Activity activity) {
this.eventList = events;
this.fragmentManager = fragmentManager;
this.activity = activity;
}
@NonNull
@ -52,7 +56,7 @@ class EventListAdapter extends RecyclerView.Adapter<EventListAdapter.ViewHolder>
@Override
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
final AutomationEvent event = mEventList.get(position);
final AutomationEvent event = eventList.get(position);
holder.eventTitle.setText(event.getTitle());
holder.enabled.setChecked(event.isEnabled());
holder.iconLayout.removeAllViews();
@ -82,16 +86,18 @@ class EventListAdapter extends RecyclerView.Adapter<EventListAdapter.ViewHolder>
}
// enabled event
holder.enabled.setOnCheckedChangeListener((buttonView, isChecked) -> {
event.setEnabled(isChecked);
holder.enabled.setOnClickListener(v -> {
event.setEnabled((holder.enabled.isChecked()));
RxBus.INSTANCE.send(new EventAutomationDataChanged());
});
// remove event
holder.iconTrash.setOnClickListener(v -> {
mEventList.remove(event);
RxBus.INSTANCE.send(new EventAutomationDataChanged());
});
holder.iconTrash.setOnClickListener(v ->
OKDialog.showConfirmation(activity, MainApp.gs(R.string.removerecord) + " " + event.getTitle(), () -> {
eventList.remove(event);
RxBus.INSTANCE.send(new EventAutomationDataChanged());
})
);
// edit event
holder.rootLayout.setOnClickListener(v -> {
@ -101,14 +107,14 @@ class EventListAdapter extends RecyclerView.Adapter<EventListAdapter.ViewHolder>
args.putString("event", event.toJSON());
args.putInt("position", position);
dialog.setArguments(args);
if (mFragmentManager != null)
dialog.show(mFragmentManager, "EditEventDialog");
if (fragmentManager != null)
dialog.show(fragmentManager, "EditEventDialog");
});
}
@Override
public int getItemCount() {
return mEventList.size();
return eventList.size();
}
static class ViewHolder extends RecyclerView.ViewHolder {

View file

@ -122,8 +122,7 @@ public class FoodFragment extends Fragment {
}
});
RecyclerViewAdapter adapter = new RecyclerViewAdapter(MainApp
.getSpecificPlugin(FoodPlugin.class).getService().getFoodData());
RecyclerViewAdapter adapter = new RecyclerViewAdapter(FoodPlugin.getPlugin().getService().getFoodData());
recyclerView.setAdapter(adapter);
loadData();
@ -151,7 +150,7 @@ public class FoodFragment extends Fragment {
}
void loadData() {
unfiltered = MainApp.getSpecificPlugin(FoodPlugin.class).getService().getFoodData();
unfiltered = FoodPlugin.getPlugin().getService().getFoodData();
}
void fillCategories() {
@ -297,7 +296,7 @@ public class FoodFragment extends Fragment {
if (_id != null && !_id.equals("")) {
NSUpload.removeFoodFromNS(_id);
}
MainApp.getSpecificPlugin(FoodPlugin.class).getService().delete(food);
FoodPlugin.getPlugin().getService().delete(food);
}
});
builder.setNegativeButton(MainApp.gs(R.string.cancel), null);

View file

@ -27,7 +27,7 @@ public class AckAlarmReceiver extends BroadcastReceiver {
PowerManager powerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
PowerManager.WakeLock wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,
AckAlarmReceiver.class.getSimpleName());
NSClientPlugin nsClientPlugin = MainApp.getSpecificPlugin(NSClientPlugin.class);
NSClientPlugin nsClientPlugin = NSClientPlugin.getPlugin();
if (!nsClientPlugin.isEnabled(PluginType.GENERAL)) {
return;
}

View file

@ -118,7 +118,7 @@ public class DBAccessReceiver extends BroadcastReceiver {
}
public boolean shouldUpload() {
NSClientPlugin nsClientPlugin = MainApp.getSpecificPlugin(NSClientPlugin.class);
NSClientPlugin nsClientPlugin = NSClientPlugin.getPlugin();
return nsClientPlugin.isEnabled(PluginType.GENERAL) && !SP.getBoolean(R.string.key_ns_noupload, false);
}

View file

@ -265,10 +265,10 @@ public class NSClientService extends Service {
nsAPIhashCode = Hashing.sha1().hashString(nsAPISecret, Charsets.UTF_8).toString();
RxBus.INSTANCE.send(new EventNSClientStatus("Initializing"));
if (!MainApp.getSpecificPlugin(NSClientPlugin.class).isAllowed()) {
if (!NSClientPlugin.getPlugin().isAllowed()) {
RxBus.INSTANCE.send(new EventNSClientNewLog("NSCLIENT", "not allowed"));
RxBus.INSTANCE.send(new EventNSClientStatus("Not allowed"));
} else if (MainApp.getSpecificPlugin(NSClientPlugin.class).paused) {
} else if (NSClientPlugin.getPlugin().paused) {
RxBus.INSTANCE.send(new EventNSClientNewLog("NSCLIENT", "paused"));
RxBus.INSTANCE.send(new EventNSClientStatus("Paused"));
} else if (!nsEnabled) {
@ -386,7 +386,7 @@ public class NSClientService extends Service {
}
public void readPreferences() {
nsEnabled = MainApp.getSpecificPlugin(NSClientPlugin.class).isEnabled(PluginType.GENERAL);
nsEnabled = NSClientPlugin.getPlugin().isEnabled(PluginType.GENERAL);
nsURL = SP.getString(R.string.key_nsclientinternal_url, "");
nsAPISecret = SP.getString(R.string.key_nsclientinternal_api_secret, "");
nsDevice = SP.getString("careportal_enteredby", "");

View file

@ -1146,7 +1146,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
}
// **** Calibration & CGM buttons ****
boolean xDripIsBgSource = MainApp.getSpecificPlugin(SourceXdripPlugin.class) != null && MainApp.getSpecificPlugin(SourceXdripPlugin.class).isEnabled(PluginType.BGSOURCE);
boolean xDripIsBgSource = SourceXdripPlugin.getPlugin().isEnabled(PluginType.BGSOURCE);
boolean dexcomIsSource = SourceDexcomPlugin.INSTANCE.isEnabled(PluginType.BGSOURCE);
boolean bgAvailable = DatabaseHelper.actualBg() != null;
if (calibrationButton != null) {

View file

@ -23,7 +23,7 @@ import info.nightscout.androidaps.events.EventPumpStatusChanged;
import info.nightscout.androidaps.logging.L;
import info.nightscout.androidaps.plugins.bus.RxBus;
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
import info.nightscout.androidaps.plugins.general.overview.events.EventDismissBolusprogressIfRunning;
import info.nightscout.androidaps.plugins.general.overview.events.EventDismissBolusProgressIfRunning;
import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress;
import info.nightscout.androidaps.utils.FabricPrivacy;
import io.reactivex.android.schedulers.AndroidSchedulers;
@ -101,10 +101,10 @@ public class BolusProgressDialog extends DialogFragment implements View.OnClickL
.subscribe(event -> statusView.setText(event.getStatus()), FabricPrivacy::logException)
);
disposable.add(RxBus.INSTANCE
.toObservable(EventDismissBolusprogressIfRunning.class)
.toObservable(EventDismissBolusProgressIfRunning.class)
.observeOn(AndroidSchedulers.mainThread())
.subscribe(event -> {
if (L.isEnabled(L.UI)) log.debug("EventDismissBolusprogressIfRunning");
if (L.isEnabled(L.UI)) log.debug("EventDismissBolusProgressIfRunning");
if (BolusProgressDialog.running) dismiss();
}, FabricPrivacy::logException)
);

View file

@ -3,4 +3,4 @@ package info.nightscout.androidaps.plugins.general.overview.events
import info.nightscout.androidaps.data.PumpEnactResult
import info.nightscout.androidaps.events.Event
class EventDismissBolusprogressIfRunning(val result: PumpEnactResult) : Event()
class EventDismissBolusProgressIfRunning(val result: PumpEnactResult?) : Event()

View file

@ -310,8 +310,8 @@ public class SmsCommunicatorPlugin extends PluginBase {
switch (splitted[1].toUpperCase()) {
case "DISABLE":
case "STOP":
LoopPlugin loopPlugin = MainApp.getSpecificPlugin(LoopPlugin.class);
if (loopPlugin != null && loopPlugin.isEnabled(PluginType.LOOP)) {
LoopPlugin loopPlugin = LoopPlugin.getPlugin();
if (loopPlugin.isEnabled(PluginType.LOOP)) {
loopPlugin.setPluginEnabled(PluginType.LOOP, false);
ConfigBuilderPlugin.getPlugin().getCommandQueue().cancelTempBasal(true, new Callback() {
@Override
@ -329,8 +329,8 @@ public class SmsCommunicatorPlugin extends PluginBase {
break;
case "ENABLE":
case "START":
loopPlugin = MainApp.getSpecificPlugin(LoopPlugin.class);
if (loopPlugin != null && !loopPlugin.isEnabled(PluginType.LOOP)) {
loopPlugin = LoopPlugin.getPlugin();
if (!loopPlugin.isEnabled(PluginType.LOOP)) {
loopPlugin.setPluginEnabled(PluginType.LOOP, true);
sendSMS(new Sms(receivedSms.phoneNumber, R.string.smscommunicator_loophasbeenenabled));
RxBus.INSTANCE.send(new EventRefreshOverview("SMS_LOOP_START"));
@ -340,18 +340,16 @@ public class SmsCommunicatorPlugin extends PluginBase {
receivedSms.processed = true;
break;
case "STATUS":
loopPlugin = MainApp.getSpecificPlugin(LoopPlugin.class);
if (loopPlugin != null) {
if (loopPlugin.isEnabled(PluginType.LOOP)) {
if (loopPlugin.isSuspended())
reply = String.format(MainApp.gs(R.string.loopsuspendedfor), loopPlugin.minutesToEndOfSuspend());
else
reply = MainApp.gs(R.string.smscommunicator_loopisenabled);
} else {
reply = MainApp.gs(R.string.smscommunicator_loopisdisabled);
}
sendSMS(new Sms(receivedSms.phoneNumber, reply));
loopPlugin = LoopPlugin.getPlugin();
if (loopPlugin.isEnabled(PluginType.LOOP)) {
if (loopPlugin.isSuspended())
reply = String.format(MainApp.gs(R.string.loopsuspendedfor), loopPlugin.minutesToEndOfSuspend());
else
reply = MainApp.gs(R.string.smscommunicator_loopisenabled);
} else {
reply = MainApp.gs(R.string.smscommunicator_loopisdisabled);
}
sendSMS(new Sms(receivedSms.phoneNumber, reply));
receivedSms.processed = true;
break;
case "RESUME":

View file

@ -437,11 +437,11 @@ public class ActionStringHandler {
public static boolean isOldData(List<TDD> historyList) {
Object activePump = ConfigBuilderPlugin.getPlugin().getActivePump();
PumpInterface dana = MainApp.getSpecificPlugin(DanaRPlugin.class);
PumpInterface danaRS = MainApp.getSpecificPlugin(DanaRSPlugin.class);
PumpInterface danaV2 = MainApp.getSpecificPlugin(DanaRv2Plugin.class);
PumpInterface danaKorean = MainApp.getSpecificPlugin(DanaRKoreanPlugin.class);
PumpInterface insight = MainApp.getSpecificPlugin(LocalInsightPlugin.class);
PumpInterface dana = DanaRPlugin.getPlugin();
PumpInterface danaRS = DanaRSPlugin.getPlugin();
PumpInterface danaV2 = DanaRv2Plugin.getPlugin();
PumpInterface danaKorean = DanaRKoreanPlugin.getPlugin();
PumpInterface insight = LocalInsightPlugin.getPlugin();
boolean startsYesterday = activePump == dana || activePump == danaRS || activePump == danaV2 || activePump == danaKorean || activePump == insight;

View file

@ -18,7 +18,7 @@ import info.nightscout.androidaps.interfaces.PluginType;
import info.nightscout.androidaps.plugins.aps.loop.LoopPlugin;
import info.nightscout.androidaps.plugins.aps.openAPSMA.events.EventOpenAPSUpdateGui;
import info.nightscout.androidaps.plugins.bus.RxBus;
import info.nightscout.androidaps.plugins.general.overview.events.EventDismissBolusprogressIfRunning;
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;
@ -139,7 +139,7 @@ public class WearPlugin extends PluginBase {
}, FabricPrivacy::logException
));
disposable.add(RxBus.INSTANCE
.toObservable(EventDismissBolusprogressIfRunning.class)
.toObservable(EventDismissBolusProgressIfRunning.class)
.observeOn(Schedulers.io())
.subscribe(event -> {
if (event.getResult() == null) return;

View file

@ -164,7 +164,8 @@ public class IobCobCalculatorPlugin extends PluginBase {
event.isChanged(R.string.key_openapsama_min_5m_carbimpact) ||
event.isChanged(R.string.key_absorption_cutoff) ||
event.isChanged(R.string.key_openapsama_autosens_max) ||
event.isChanged(R.string.key_openapsama_autosens_min)
event.isChanged(R.string.key_openapsama_autosens_min) ||
event.isChanged(R.string.key_insulin_oref_peak)
) {
stopCalculation("onEventPreferenceChange");
synchronized (dataLock) {

View file

@ -51,9 +51,9 @@ public class DanaRUserOptionsActivity extends NoSplashActivity {
NumberPicker lowReservoir;
Button saveToPumpButton;
// This is for Dana pumps only
boolean isRS = MainApp.getSpecificPlugin(DanaRSPlugin.class) != null && MainApp.getSpecificPlugin(DanaRSPlugin.class).isEnabled(PluginType.PUMP);
boolean isDanaR = MainApp.getSpecificPlugin(DanaRPlugin.class) != null && MainApp.getSpecificPlugin(DanaRPlugin.class).isEnabled(PluginType.PUMP);
boolean isDanaRv2 = MainApp.getSpecificPlugin(DanaRv2Plugin.class) != null && MainApp.getSpecificPlugin(DanaRv2Plugin.class).isEnabled(PluginType.PUMP);
boolean isRS = DanaRSPlugin.getPlugin().isEnabled(PluginType.PUMP);
boolean isDanaR = DanaRPlugin.getPlugin().isEnabled(PluginType.PUMP);
boolean isDanaRv2 = DanaRv2Plugin.getPlugin().isEnabled(PluginType.PUMP);
@Override
protected synchronized void onResume() {

View file

@ -32,7 +32,7 @@ public class MsgCheckValue extends MessageBase {
pump.protocol = intFromBuff(bytes, 1, 1);
pump.productCode = intFromBuff(bytes, 2, 1);
if (pump.model != DanaRPump.EXPORT_MODEL) {
MainApp.getSpecificPlugin(DanaRPlugin.class).disconnect("Wrong Model");
DanaRPlugin.getPlugin().disconnect("Wrong Model");
log.debug("Wrong model selected");
}

View file

@ -31,19 +31,19 @@ public class MsgInitConnStatusTime extends MessageBase {
if (bytes.length - 10 > 7) {
Notification notification = new Notification(Notification.WRONG_DRIVER, MainApp.gs(R.string.pumpdrivercorrected), Notification.NORMAL);
RxBus.INSTANCE.send(new EventNewNotification(notification));
MainApp.getSpecificPlugin(DanaRPlugin.class).disconnect("Wrong Model");
DanaRPlugin.getPlugin().disconnect("Wrong Model");
log.error("Wrong model selected. Switching to Korean DanaR");
MainApp.getSpecificPlugin(DanaRKoreanPlugin.class).setPluginEnabled(PluginType.PUMP, true);
MainApp.getSpecificPlugin(DanaRKoreanPlugin.class).setFragmentVisible(PluginType.PUMP, true);
MainApp.getSpecificPlugin(DanaRPlugin.class).setPluginEnabled(PluginType.PUMP, false);
MainApp.getSpecificPlugin(DanaRPlugin.class).setFragmentVisible(PluginType.PUMP, false);
DanaRKoreanPlugin.getPlugin().setPluginEnabled(PluginType.PUMP, true);
DanaRKoreanPlugin.getPlugin().setFragmentVisible(PluginType.PUMP, true);
DanaRPlugin.getPlugin().setPluginEnabled(PluginType.PUMP, false);
DanaRPlugin.getPlugin().setFragmentVisible(PluginType.PUMP, false);
DanaRPump.reset(); // mark not initialized
//If profile coming from pump, switch it as well
if (MainApp.getSpecificPlugin(DanaRPlugin.class).isEnabled(PluginType.PROFILE)) {
(MainApp.getSpecificPlugin(DanaRPlugin.class)).setPluginEnabled(PluginType.PROFILE, false);
(MainApp.getSpecificPlugin(DanaRKoreanPlugin.class)).setPluginEnabled(PluginType.PROFILE, true);
if (DanaRPlugin.getPlugin().isEnabled(PluginType.PROFILE)) {
(DanaRPlugin.getPlugin()).setPluginEnabled(PluginType.PROFILE, false);
(DanaRKoreanPlugin.getPlugin()).setPluginEnabled(PluginType.PROFILE, true);
}
ConfigBuilderPlugin.getPlugin().storeSettings("ChangingDanaDriver");

View file

@ -35,17 +35,17 @@ public class MsgInitConnStatusTime_k extends MessageBase {
RxBus.INSTANCE.send(new EventNewNotification(notification));
DanaRKoreanPlugin.getPlugin().disconnect("Wrong Model");
log.error("Wrong model selected. Switching to export DanaR");
MainApp.getSpecificPlugin(DanaRKoreanPlugin.class).setPluginEnabled(PluginType.PUMP, false);
MainApp.getSpecificPlugin(DanaRKoreanPlugin.class).setFragmentVisible(PluginType.PUMP, false);
MainApp.getSpecificPlugin(DanaRPlugin.class).setPluginEnabled(PluginType.PUMP, true);
MainApp.getSpecificPlugin(DanaRPlugin.class).setFragmentVisible(PluginType.PUMP, true);
DanaRKoreanPlugin.getPlugin().setPluginEnabled(PluginType.PUMP, false);
DanaRKoreanPlugin.getPlugin().setFragmentVisible(PluginType.PUMP, false);
DanaRPlugin.getPlugin().setPluginEnabled(PluginType.PUMP, true);
DanaRPlugin.getPlugin().setFragmentVisible(PluginType.PUMP, true);
DanaRPump.reset(); // mark not initialized
//If profile coming from pump, switch it as well
if (MainApp.getSpecificPlugin(DanaRKoreanPlugin.class).isEnabled(PluginType.PROFILE)) {
(MainApp.getSpecificPlugin(DanaRKoreanPlugin.class)).setPluginEnabled(PluginType.PROFILE, false);
(MainApp.getSpecificPlugin(DanaRPlugin.class)).setPluginEnabled(PluginType.PROFILE, true);
if (DanaRKoreanPlugin.getPlugin().isEnabled(PluginType.PROFILE)) {
(DanaRKoreanPlugin.getPlugin()).setPluginEnabled(PluginType.PROFILE, false);
(DanaRPlugin.getPlugin()).setPluginEnabled(PluginType.PROFILE, true);
}
ConfigBuilderPlugin.getPlugin().storeSettings("ChangingKoreanDanaDriver");

View file

@ -249,7 +249,7 @@ public class DanaRSService extends Service {
public PumpEnactResult loadEvents() {
if (!MainApp.getSpecificPlugin(DanaRSPlugin.class).isInitialized()) {
if (!DanaRSPlugin.getPlugin().isInitialized()) {
PumpEnactResult result = new PumpEnactResult().success(false);
result.comment = "pump not initialized";
return result;

View file

@ -45,19 +45,19 @@ public class MsgCheckValue_v2 extends MessageBase {
pump.lastConnection = 0;
Notification notification = new Notification(Notification.WRONG_DRIVER, MainApp.gs(R.string.pumpdrivercorrected), Notification.NORMAL);
RxBus.INSTANCE.send(new EventNewNotification(notification));
MainApp.getSpecificPlugin(DanaRPlugin.class).disconnect("Wrong Model");
DanaRPlugin.getPlugin().disconnect("Wrong Model");
log.error("Wrong model selected. Switching to Korean DanaR");
MainApp.getSpecificPlugin(DanaRKoreanPlugin.class).setPluginEnabled(PluginType.PUMP, true);
MainApp.getSpecificPlugin(DanaRKoreanPlugin.class).setFragmentVisible(PluginType.PUMP, true);
MainApp.getSpecificPlugin(DanaRPlugin.class).setPluginEnabled(PluginType.PUMP, false);
MainApp.getSpecificPlugin(DanaRPlugin.class).setFragmentVisible(PluginType.PUMP, false);
DanaRKoreanPlugin.getPlugin().setPluginEnabled(PluginType.PUMP, true);
DanaRKoreanPlugin.getPlugin().setFragmentVisible(PluginType.PUMP, true);
DanaRPlugin.getPlugin().setPluginEnabled(PluginType.PUMP, false);
DanaRPlugin.getPlugin().setFragmentVisible(PluginType.PUMP, false);
DanaRPump.reset(); // mark not initialized
//If profile coming from pump, switch it as well
if (MainApp.getSpecificPlugin(DanaRPlugin.class).isEnabled(PluginType.PROFILE)) {
(MainApp.getSpecificPlugin(DanaRPlugin.class)).setPluginEnabled(PluginType.PROFILE, false);
(MainApp.getSpecificPlugin(DanaRKoreanPlugin.class)).setPluginEnabled(PluginType.PROFILE, true);
if (DanaRPlugin.getPlugin().isEnabled(PluginType.PROFILE)) {
(DanaRPlugin.getPlugin()).setPluginEnabled(PluginType.PROFILE, false);
(DanaRKoreanPlugin.getPlugin()).setPluginEnabled(PluginType.PROFILE, true);
}
ConfigBuilderPlugin.getPlugin().storeSettings("ChangingDanaRv2Driver");
@ -72,15 +72,15 @@ public class MsgCheckValue_v2 extends MessageBase {
RxBus.INSTANCE.send(new EventNewNotification(notification));
DanaRKoreanPlugin.getPlugin().disconnect("Wrong Model");
log.error("Wrong model selected. Switching to non APS DanaR");
(MainApp.getSpecificPlugin(DanaRv2Plugin.class)).setPluginEnabled(PluginType.PUMP, false);
(MainApp.getSpecificPlugin(DanaRv2Plugin.class)).setFragmentVisible(PluginType.PUMP, false);
(MainApp.getSpecificPlugin(DanaRPlugin.class)).setPluginEnabled(PluginType.PUMP, true);
(MainApp.getSpecificPlugin(DanaRPlugin.class)).setFragmentVisible(PluginType.PUMP, true);
(DanaRv2Plugin.getPlugin()).setPluginEnabled(PluginType.PUMP, false);
(DanaRv2Plugin.getPlugin()).setFragmentVisible(PluginType.PUMP, false);
(DanaRPlugin.getPlugin()).setPluginEnabled(PluginType.PUMP, true);
(DanaRPlugin.getPlugin()).setFragmentVisible(PluginType.PUMP, true);
//If profile coming from pump, switch it as well
if (MainApp.getSpecificPlugin(DanaRv2Plugin.class).isEnabled(PluginType.PROFILE)) {
(MainApp.getSpecificPlugin(DanaRv2Plugin.class)).setPluginEnabled(PluginType.PROFILE, false);
(MainApp.getSpecificPlugin(DanaRPlugin.class)).setPluginEnabled(PluginType.PROFILE, true);
if (DanaRv2Plugin.getPlugin().isEnabled(PluginType.PROFILE)) {
(DanaRv2Plugin.getPlugin()).setPluginEnabled(PluginType.PROFILE, false);
(DanaRPlugin.getPlugin()).setPluginEnabled(PluginType.PROFILE, true);
}
ConfigBuilderPlugin.getPlugin().storeSettings("ChangingDanaRv2Driver");

View file

@ -471,7 +471,7 @@ public class DanaRv2ExecutionService extends AbstractDanaRExecutionService {
public PumpEnactResult loadEvents() {
DanaRPump danaRPump = DanaRPump.getInstance();
if (!MainApp.getSpecificPlugin(DanaRv2Plugin.class).isInitialized()) {
if (!DanaRv2Plugin.getPlugin().isInitialized()) {
PumpEnactResult result = new PumpEnactResult().success(false);
result.comment = "pump not initialized";
return result;

View file

@ -27,7 +27,7 @@ import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
import info.nightscout.androidaps.plugins.general.overview.dialogs.BolusProgressDialog;
import info.nightscout.androidaps.plugins.general.overview.dialogs.BolusProgressHelperActivity;
import info.nightscout.androidaps.plugins.general.overview.events.EventDismissBolusprogressIfRunning;
import info.nightscout.androidaps.plugins.general.overview.events.EventDismissBolusProgressIfRunning;
import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification;
import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification;
import info.nightscout.androidaps.plugins.general.overview.notifications.Notification;
@ -275,7 +275,7 @@ public class CommandQueue {
public synchronized void cancelAllBoluses() {
if (!isRunning(Command.CommandType.BOLUS)) {
RxBus.INSTANCE.send(new EventDismissBolusprogressIfRunning(new PumpEnactResult().success(true).enacted(false)));
RxBus.INSTANCE.send(new EventDismissBolusProgressIfRunning(new PumpEnactResult().success(true).enacted(false)));
}
removeAll(Command.CommandType.BOLUS);
removeAll(Command.CommandType.SMB_BOLUS);

View file

@ -16,7 +16,7 @@ import info.nightscout.androidaps.interfaces.PumpInterface;
import info.nightscout.androidaps.logging.L;
import info.nightscout.androidaps.plugins.bus.RxBus;
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
import info.nightscout.androidaps.plugins.general.overview.events.EventDismissBolusprogressIfRunning;
import info.nightscout.androidaps.plugins.general.overview.events.EventDismissBolusProgressIfRunning;
import info.nightscout.androidaps.queue.events.EventQueueChanged;
import info.nightscout.androidaps.utils.SP;
import info.nightscout.androidaps.utils.T;
@ -68,7 +68,7 @@ public class QueueThread extends Thread {
long secondsElapsed = (System.currentTimeMillis() - connectionStartTime) / 1000;
if (!pump.isConnected() && secondsElapsed > Constants.PUMP_MAX_CONNECTION_TIME_IN_SECONDS) {
RxBus.INSTANCE.send(new EventDismissBolusprogressIfRunning(null));
RxBus.INSTANCE.send(new EventDismissBolusProgressIfRunning(null));
RxBus.INSTANCE.send(new EventPumpStatusChanged(MainApp.gs(R.string.connectiontimedout)));
if (L.isEnabled(L.PUMPQUEUE))
log.debug("timed out");

View file

@ -3,14 +3,13 @@ package info.nightscout.androidaps.queue.commands;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import info.nightscout.androidaps.MainApp;
import info.nightscout.androidaps.data.DetailedBolusInfo;
import info.nightscout.androidaps.data.PumpEnactResult;
import info.nightscout.androidaps.logging.L;
import info.nightscout.androidaps.plugins.bus.RxBus;
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
import info.nightscout.androidaps.plugins.general.overview.dialogs.BolusProgressDialog;
import info.nightscout.androidaps.plugins.general.overview.events.EventDismissBolusprogressIfRunning;
import info.nightscout.androidaps.plugins.general.overview.events.EventDismissBolusProgressIfRunning;
import info.nightscout.androidaps.queue.Callback;
import info.nightscout.androidaps.utils.DecimalFormatter;
@ -34,7 +33,7 @@ public class CommandBolus extends Command {
PumpEnactResult r = ConfigBuilderPlugin.getPlugin().getActivePump().deliverTreatment(detailedBolusInfo);
BolusProgressDialog.bolusEnded = true;
RxBus.INSTANCE.send(new EventDismissBolusprogressIfRunning(r));
RxBus.INSTANCE.send(new EventDismissBolusProgressIfRunning(r));
if (L.isEnabled(L.PUMPQUEUE))
log.debug("Result success: " + r.success + " enacted: " + r.enacted);

View file

@ -50,8 +50,8 @@ public class CommandSetProfile extends Command {
// Send SMS notification if ProfileSwitch is comming from NS
ProfileSwitch profileSwitch = TreatmentsPlugin.getPlugin().getProfileSwitchFromHistory(System.currentTimeMillis());
if (profileSwitch != null && r.enacted && profileSwitch.source == Source.NIGHTSCOUT) {
SmsCommunicatorPlugin smsCommunicatorPlugin = MainApp.getSpecificPlugin(SmsCommunicatorPlugin.class);
if (smsCommunicatorPlugin != null && smsCommunicatorPlugin.isEnabled(PluginType.GENERAL)) {
SmsCommunicatorPlugin smsCommunicatorPlugin = SmsCommunicatorPlugin.getPlugin();
if (smsCommunicatorPlugin.isEnabled(PluginType.GENERAL)) {
smsCommunicatorPlugin.sendNotificationToAllNumbers(MainApp.gs(R.string.profile_set_ok));
}
}

View file

@ -33,6 +33,8 @@ public class Translator {
return MainApp.gs(R.string.careportal_exercise);
case "Site Change":
return MainApp.gs(R.string.careportal_pumpsitechange);
case "Pump Battery Change":
return MainApp.gs(R.string.careportal_pumpbatterychange);
case "Sensor Start":
return MainApp.gs(R.string.careportal_cgmsensorstart);
case "Sensor Change":

View file

@ -12,7 +12,7 @@
android:layout_above="@+id/automation_logView"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_marginBottom="-100dp" />
android:layout_marginBottom="15dp" />
<TextView
android:id="@+id/automation_logView"

View file

@ -11,38 +11,58 @@
<string name="hypott_label">Tema: Hypo Temp-Objetivo</string>
<string name="hypott_whenhypott">¿Cuál es la razón principal para establecer un hipo TT?</string>
<string name="hypott_goinglow">Para evitar que BG caiga si ya hay basal temporal a cero corriendo.</string>
<string name="hypott_preventoversmb">Para evitar que AAPS inyecte demasiada insulina después de una subida causada por los carbohidratos de acción rápida utilizados para tratar una bajada en las lecturas de glucosa.</string>
<string name="hypott_hint1">https://androidaps.readthedocs.io/en/latest/EN/Usage/temptarget.html</string>
<string name="offlineprofile_whatprofile">¿Qué perfil puede ser usado y configurado estando desconectado?</string>
<string name="offlineprofile_label">Tema: Perfil fuera de línea</string>
<string name="offlineprofile_nsprofile">El perfil NS puede ser usado pero no configurado.</string>
<string name="offlineprofile_hint1">https://androidaps.readthedocs.io/en/latest/EN/Configuration/Config-Builder.html#profile</string>
<string name="pumpdisconnect_label">Tema: Desconectando de la bomba</string>
<string name="pumpdisconnect_whattodo">¿Qué se debe hacer al desconectar la bomba?</string>
<string name="pumpdisconnect_letknow">Haga clic en \"Desconectar bomba\" para que AAPS sepa que no se está inyectando insulina.</string>
<string name="pumpdisconnect_suspend">Haga clic en \'Suspender lazo \' para que la AAPS deje de estar en lazo cerrado mientras la bomba está desconectada.</string>
<string name="pumpdisconnect_dontchnage">No cambies nada en AAPS, sólo desconecta la bomba.</string>
<string name="pumpdisconnect_hint1">https://androidaps.readthedocs.io/en/latest/EN/Getting-Started/FAQ.html#other-settings</string>
<string name="objectives_label">Tema: Ajustes AndroidAPS</string>
<string name="objectives_howtosave">¿Cuál es la mejor práctica para hacer copias de seguridad de tus ajustes?</string>
<string name="objectives_exportsettings">Exportarlos localmente desde el menú de Mantenimiento.</string>
<string name="objectives_storeelsewhere">Guardar archivo exportado a otro lugar como correo electrónico, Dropbox, Google drive…</string>
<string name="objectives_doexportonstart">Exportarlos justo después de la instalación de AAPS.</string>
<string name="objectives_doexportafterchange">Exportarlos después de realizar cambios en la configuración.</string>
<string name="objectives_doexportafterobjective">Exportarlos tras completar un objetivo.</string>
<string name="objectives_doexportafterfirtssettings">Exportarlos al terminar la configuración inicial.</string>
<string name="objectives_hint1">https://androidaps.readthedocs.io/en/latest/EN/Usage/ExportImportSettings.html</string>
<string name="objectives_hint2">https://androidaps.readthedocs.io/en/latest/EN/Getting-Started/FAQ.html#what-emergency-equipment-is-recommended-to-take-with-me</string>
<string name="noisycgm_label">Tema: Lecturas de CGM ruidosas</string>
<string name="noisycgm_whattodo">¿Qué se debe hacer si los datos de CGM tienen ruido?</string>
<string name="nothing">Nada, AAPS se ocupará de ello.</string>
<string name="noisycgm_pause">Desactivar el lazo cerrado para evitar una sobredosis.</string>
<string name="noisycgm_replacesensor">Sustituya el sensor de CGM.</string>
<string name="noisycgm_turnoffphone">Apagar el movil.</string>
<string name="noisycgm_hint1">https://androidaps.readthedocs.io/en/latest/EN/Usage/Smoothing-Blood-Glucose-Data-in-xDrip.html#smoothing-blood-glucose-data</string>
<string name="noisycgm_checksmoothing">Verifique que la aplicación CGM suaviza los datos de glucosa.</string>
<string name="exercise_label">Tema: Ejercicio</string>
<string name="exercise_whattodo">¿Cómo puedes ayudar al sistema a lidiar con el ejercicio?</string>
<string name="exercise_setactivitytt">Utilización de la característica de objetivo temporal.</string>
<string name="exercise_switchprofilebelow100">Realice un cambio de perfil por debajo del 100%.</string>
<string name="exercise_switchprofileabove100">Realice un cambio de perfil por encima del 100%.</string>
<string name="exercise_stoploop">Detener el lazo.</string>
<string name="exercise_doitbeforestart">Establezca un objetivo temporal de actividad antes de iniciar el ejercicio.</string>
<string name="exercise_afterstart">Establecer un objetivo temporal de actividad después de comenzar el ejercicio conduce a peores resultados que si se inicia antes de hacerlo.</string>
<string name="exercise_hint1">https://androidaps.readthedocs.io/en/latest/EN/Usage/temptarget.html#activity-temp-target</string>
<string name="suspendloop_label">Tema: Lazo inhabilitado/suspendido</string>
<string name="suspendloop_doigetinsulin">¿Recibo insulina cuando el lazo está desactivado/suspendido?</string>
<string name="suspendloop_yes">Sí, la insulina basal sigue siendo entregada.</string>
<string name="suspendloop_no">No, la administración de la insulina está detenida.</string>
<string name="basaltest_label">Tema: Basal, ISF, y IC Pruebas</string>
<string name="basaltest_when">¿Cuándo debo validar los valores basales, ISF y IC?</string>
<string name="basaltest_beforeloop">Antes de empezar en uso de lazo.</string>
<string name="basaltest_havingregularhypo">Si se experimentan valores bajos de BG frecuentemente.</string>
<string name="basaltest_havingregularhyper">Si se experimentan valores altos de BG frecuentemente.</string>
<string name="basaltest_hint1">https://androidaps.readthedocs.io/en/latest/EN/Getting-Started/FAQ.html#androidaps-settings</string>
<string name="prerequisites_label">Tema: Requisitos previos</string>
<string name="prerequisites_what">¿Qué necesito?</string>
<string name="prerequisites_determinedcorrectprofile">Información de perfil validada (Basal, IC, ISF, DIA).</string>
<string name="prerequisites_computer">Un ordenador para crear un APK.</string>
<string name="prerequisites_phone">Un teléfono compatible.</string>
<string name="prerequisites_car">Un Coche.</string>
@ -50,12 +70,15 @@
<string name="prerequisites_tidepoolaccount">Una cuenta de Tidepool.</string>
<string name="prerequisites_googleaccount">Una cuenta de Google.</string>
<string name="prerequisites_githubaccount">Una cuenta de Github.</string>
<string name="prerequisites_beanandroiddeveloper">Experiencia en desarrollo de Android.</string>
<string name="prerequisites_own670g">Una bomba MiniMed 670G.</string>
<string name="prerequisites_hint1">https://androidaps.readthedocs.io/en/latest/EN/Module/module.html</string>
<string name="prerequisites_smartwatch">Un Smartwatch.</string>
<string name="prerequisites_supportedcgm">Un CGM soportado.</string>
<string name="update_label">Tema: Actualización de AndroidAPS</string>
<string name="whatistrue">¿Qué es verdad?</string>
<string name="update_git">Tienes que tener instalado Git.</string>
<string name="update_asap">Actualice tan pronto como se libere la nueva versión y prevea tener tiempo suficiente para hacerlo.</string>
<string name="update_keys">Debes usar las mismas claves de firma.</string>
<string name="update_neverupdate">Nunca actualice si el sistema está funcionando bien.</string>
<string name="update_askfriend">Pregúntale a tu amigo por el nuevo APK.</string>
@ -63,19 +86,27 @@
<string name="troubleshooting_label">Tema: Resolución de problemas</string>
<string name="troubleshooting_wheretoask">Donde buscar ayuda?</string>
<string name="troubleshooting_fb">Únete al grupo AndroidAPS de Facebook.</string>
<string name="troubleshooting_wiki">Lea la documentación de AndroidAPS.</string>
<string name="troubleshooting_gitter">Visite AndroidAPS Gitter Room.</string>
<string name="troubleshooting_googlesupport">Visite el soporte de Google AndroidAPS</string>
<string name="troubleshooting_yourendo">Hable con su endocrinólogo.</string>
<string name="troubleshooting_hint1">https://androidaps.readthedocs.io/en/latest/EN/Installing-AndroidAPS/Update-to-new-version.html#troubleshooting</string>
<string name="troubleshooting_hint2">https://www.facebook.com/groups/AndroidAPSUsers/</string>
<string name="troubleshooting_hint3">https://gitter.im/MilosKozak/AndroidAPS</string>
<string name="insulin_label">Tema: Plugins sobre Insulina</string>
<string name="insulin_ultrarapid">¿Qué marca de insulina se puede utilizar con el plugin Ultra-Rapid-Oref?</string>
<string name="insulin_fiasp">Fiasp®</string>
<string name="insulin_novorapid">NovoRapid ®</string>
<string name="insulin_humalog">Humalog®</string>
<string name="insulin_actrapid">Actrapid®</string>
<string name="insulin_hint1">https://androidaps.readthedocs.io/en/latest/EN/Configuration/Config-Builder.html#insulin</string>
<string name="sensitivity_label">Tema: Plugins de sensibilidad</string>
<string name="sensitivity_which">¿Qué algoritmo de sensibilidad tiene un rango de tiempo configurable?</string>
<string name="sensitivity_hint1">https://androidaps.readthedocs.io/en/latest/EN/Configuration/Sensitivity-detection-and-COB.html</string>
<string name="sensitivityuam_which">¿Qué plugin de sensibilidad se debe utilizar para la funcionalidad UAM?</string>
<string name="wrongcarbs_label">Tema: Errores en la entrada de carbohidratos</string>
<string name="wrongcarbs_whattodo">¿Qué deberías hacer si has hecho una entrada incorrecta de carbohidratos?</string>
<string name="wrongcarbs_treatmentstab">En los Tratamientos, eliminar la entrada incorrecta de carbohidratos. Introducir los nuevos valores de carbohidratos.</string>
<string name="wrongcarbs_addfakeinsulin">Cómo agregar una insulina falsa utilizando la función llenado de cánula</string>
<string name="extendedcarbs_label">Tema: Comida con Grasa y Proteína</string>
<string name="extendedcarbs_handling">¿Qué hacer si su comida contiene una gran cantidad de grasas y /o proteínas?</string>
@ -83,6 +114,7 @@
<string name="extendedcarbs_add">Recalcular grasa y proteínas a los carbohidratos y añadirlo al cálculo del bolo.</string>
<string name="extendedcarbs_useextendedbolus">Utilice el bolus extendido para cubrir grasas y proteínas.</string>
<string name="extendedcarbs_hint1">https://androidaps.readthedocs.io/en/latest/EN/Usage/Extended-Carbs.html</string>
<string name="nsclient_label">Tema: Supervisión remota</string>
<string name="nsclient_howcanyou">¿Cómo puede supervisar la AAPS de su hijo de forma remota?</string>
<string name="nsclient_nightscout">Cómo utilizar un sitio de \"Nightscout\".</string>
<string name="nsclient_dexcomfollow">App Dexcom seguidora si está usando la aplicación original Dexcom (sólo valores BG).</string>
@ -92,10 +124,17 @@
<string name="nsclient_spikeiphone">App de Spike en el iPhone.</string>
<string name="nsclient_hint1">https://androidaps.readthedocs.io/en/latest/EN/Children/Children.html</string>
<string name="isf_label">Tema: Factor de sensibilidad de la insulina</string>
<string name="isf_increasingvalue">Los valores más altos de ISF llevan a una menor cantidad de insulina cuando AAPS corrige los valores altos de glucemia.</string>
<string name="isf_decreasingvalue">Los valores más bajos de ISF llevan a una menor cantidad de insulina cuando AAPS corrige los valores altos de glucemia.</string>
<string name="isf_noeffect">El cambio de los valores de ISF no afecta a la cantidad de insulina que se entrega cuando AAPS corrige para compensar los valores altos de glucemia.</string>
<string name="isf_preferences">Tiene que especificar ISF en Preferencias.</string>
<string name="isf_profile">El cambio del valor de ISF en el perfil es suficiente para aplicar el cambio.</string>
<string name="isf_hint1">https://androidaps.readthedocs.io/en/latest/EN/Getting-Started/FAQ.html#insulin-sensitivity-factor-isf-mmol-l-u-or-mg-dl-u</string>
<string name="isf_hint2">https://androidaps.readthedocs.io/en/latest/EN/Usage/Profiles.html</string>
<string name="ic_label">Tema: El ratio IC</string>
<string name="ic_increasingvalue">Los ratios IC más altos conducen a menos insulina entregada por una cantidad determinada de carbohidratos.</string>
<string name="ic_decreasingvalue">Los ratios IC más bajos conducen a menos insulina entregada por una cantidad determinada de carbohidratos.</string>
<string name="ic_noeffect">Si tiene 0 COB, cambiar la ratio IC conducirá a una cantidad distinta de insulina para corregir un valor de glucemia determinado.</string>
<string name="ic_different">El IC será diferente si cuenta con una unidad de pan como 10g o 12g.</string>
<string name="ic_meaning">IC significa: Cuántas unidades de pan están cubiertas por 1U de insulina.</string>
<string name="ic_hint1">https://androidaps.readthedocs.io/en/latest/EN/Getting-Started/FAQ.html#carbohydrate-to-insulin-ratio-cr-g-u</string>
@ -112,7 +151,12 @@
<string name="profileswitch_targetlower">El objetivo será 10% más bajo.</string>
<string name="profileswitch_targetbottom">Sólo el objetivo inferior será 10% inferior.</string>
<string name="profileswitch_hint1">https://androidaps.readthedocs.io/en/latest/EN/Usage/Profiles.html?highlight=profilewitch#profile-switch</string>
<string name="profileswitchtime_iwant">Si se despierta 1h antes de lo habitual, ¿cómo debe notificar a AAPS el cambio en su horario?</string>
<string name="profileswitchtime_1">Iniciar un cambio de perfil con un intervalo de tiempo de 1</string>
<string name="profileswitchtime__1">Iniciar un cambio de perfil con un intervalo de tiempo de -1</string>
<string name="profileswitchtime_hint1">https://androidaps.readthedocs.io/en/latest/EN/Usage/Profiles.html?highlight=profile%20switch#timeshift</string>
<string name="profileswitchtime_60">Iniciar un cambio de perfil con un intervalo de tiempo de 60</string>
<string name="profileswitchtime__60">Iniciar un cambio de perfil con un intervalo de tiempo de -60</string>
<string name="basalhelp_hint1">https://androidaps.readthedocs.io/en/latest/EN/Module/module.html#good-individual-dosage-algorithm-for-your-diabetes-therapy</string>
<string name="basalhelp_label">Tema: Ayuda con tasas basales</string>
<string name="basalhelp_where">A donde ir para obtener ayuda con tasa basal y demás.</string>

View file

@ -53,8 +53,16 @@
<string name="notconnected">Sin conexión a Internet</string>
<string name="failedretrievetime">Fallo tiempo de recuperación</string>
<string name="requirementnotmet">No se cumplen los requisitos de objetivo</string>
<plurals name="objective_days">
<item quantity="one">%1$d día</item>
<item quantity="other">%1$d días</item>
</plurals>
<plurals name="objective_hours">
<item quantity="one">%1$d hora</item>
<item quantity="other">%1$d horas</item>
</plurals>
<plurals name="objective_minutes">
<item quantity="one">%1$d minuto</item>
<item quantity="other">%1$d minutos</item>
</plurals>
</resources>

View file

@ -7,7 +7,9 @@
<!-- <string name="ja_lang" translatable="false">Japanese</string> -->
<!-- <string name="pt_BR_lang" translatable="false">Portuguese, Brazilian</string> -->
<string name="treatmentssafety_title">Seguridad tratamientos</string>
<string name="treatmentssafety_maxbolus_title">Máximo Bolo permitido [U]</string>
<string name="treatmentssafety_maxcarbs_title">Máximos carbohidratos permitidos [g]</string>
<string name="nav_preferences">Preferencias</string>
<string name="nav_refreshtreatments">Actualizar los tratamientos desde NS</string>
<string name="nav_resetdb">Restablecer las bases de datos</string>
<string name="reset_db_confirm">¿Realmente quiere restablecer las bases de datos?</string>
@ -1364,4 +1366,9 @@
<string name="close">Cerrar</string>
<string name="increasingmaxbasal">Aumentar el valor basal máximo porque el ajuste es inferior a tu base máxima en el perfil</string>
<string name="smscommunicator_messagebody">El cuerpo del mensaje es inválido</string>
<string name="format_bg_isf">%1$s ISF: %2$.1f</string>
<string name="format_carbs_ic">%1$.0fg IC: %2$.1f</string>
<string name="format_cob_ic">%1$.1fg IC: %2$.1f</string>
<string name="boluswizard">Asistente Bolus</string>
<string name="unit_minute_short">min</string>
</resources>

View file

@ -59,7 +59,7 @@
<string name="description_sms_communicator">Commander à distance AndroidAPS en utilisant les commandes SMS.</string>
<string name="nsprofileview_units_label">Unités</string>
<string name="nsprofileview_dia_label">DAI</string>
<string name="nsprofileview_ic_label">G:I (Ratio Glucides/Insuline, g/U)</string>
<string name="nsprofileview_ic_label">G/I (g/U)</string>
<string name="nsprofileview_isf_label">SI Sensibilité Insuline</string>
<string name="nsprofileview_basal_label">Basal</string>
<string name="nsprofileview_target_label">Cible</string>
@ -271,7 +271,7 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
<string name="glucosetype_finger">Doigt</string>
<string name="glucosetype_sensor">Capteur</string>
<string name="manual">Manuel</string>
<string name="careportal_temporarytarget">Cible temporaire</string>
<string name="careportal_temporarytarget">Cible temp.</string>
<string name="careportal_temporarytargetcancel">Annulation Cible Temporaire</string>
<string name="danarprofile">Paramètres du profil DanaR</string>
<string name="danarprofile_dia">Durée d\'Action [h] </string>
@ -772,13 +772,13 @@ 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_shortname">AC-I</string>
<string name="ago">passé(e)s</string>
<string name="format_hours">%1$.2f h</string>
<string name="enablesmbalways">Activer en permanence les SMB</string>
<string name="enablesmbalways_summary">Activer toujours SMB de manière autonome pour les bolus. Ceci est possible uniquement avec une source de glycémie ayant un très bon filtrage de données comme le G5</string>
<string name="enablesmbaftercarbs">Activer SMB après ingestion de glucides</string>
<string name="enablesmbaftercarbs_summary">Activer SMB pendant 6h après ingestion de glucides, même sil y a 0 GI (Glucides Actifs). Ceci est possible uniquement avec une source de glycémie ayant un très bon filtrage de données comme le G5</string>
<string name="enablesmbaftercarbs_summary">Activer SMB pendant 6h après ingestion de glucides, même sil y a 0 GA (Glucides Actifs). Ceci est possible uniquement avec une source de glycémie ayant un très bon filtrage de données comme le G5</string>
<string name="enablesmbwithcob">Activer SMB avec les glucides</string>
<string name="enablesmbwithcob_summary">Activer SMB tant que des Glucides sont actifs.</string>
<string name="enablesmbwithtemptarget">Activer SMB avec les cibles temporaires</string>

View file

@ -116,6 +116,7 @@
<string name="extendedcarbs_hint1">https://androidaps.readthedocs.io/en/latest/CROWDIN/nl/Usage/Extended-Carbs.html</string>
<string name="nsclient_label">Onderwerp: volgen op afstand</string>
<string name="nsclient_howcanyou">Hoe kun je AAPS van je kind op afstand volgen?</string>
<string name="nsclient_nightscout">Met behulp van een Nightscout site.</string>
<string name="nsclient_dexcomfollow">Dexcom volgapp als u de originele Dexcom app gebruikt (alleen BG).</string>
<string name="nsclient_dexcomfollowxdrip">Dexcom Volg-app als u gebruik maakt van de xDrip app.</string>
<string name="nsclient_xdripfollower">xDrip app in volg-modus.</string>
@ -130,4 +131,36 @@
<string name="isf_profile">Het wijzigen van de ISF-waarde in uw profiel is voldoende om de wijziging toe te passen.</string>
<string name="isf_hint1">https://androidaps.readthedocs.io/en/latest/CROWDIN/nl/Getting-Started/FAQ.html#insuline-gevoeligheids-factor-insulin-sensitivity-factor-ISF-mmol-l-E-of-mg-dl-E</string>
<string name="isf_hint2">https://androidaps.readthedocs.io/en/latest/CROWDIN/nl/Usage/Profielen.html</string>
<string name="ic_label">Onderwerp: De KH ratio</string>
<string name="ic_increasingvalue">Hogere KH ratios leiden tot minder insuline afgifte voor een bepaalde hoeveelheid koolhydraten.</string>
<string name="ic_decreasingvalue">Lagere KH ratios leiden tot minder insuline afgifte voor een bepaalde hoeveelheid koolhydraten.</string>
<string name="ic_noeffect">Als je 0 COB hebt zal het veranderen van KH ratio leiden tot een andere hoeveelheid insuline om jouw BG te corrigeren.</string>
<string name="ic_different">KH ratio zal anders zijn als je brood-eenheid telt als 10g of 12g.</string>
<string name="ic_meaning">KH ratio betekent: Hoeveel brood-eenheden gebruik je voor 1U insuline.</string>
<string name="ic_hint1">https://androidaps.readthedocs.io/en/latest/CROWDIN/nl/Getting-Started/FAQ.html#Koolhydraat-ratio-KH-g-E</string>
<string name="profileswitch_label">Onderwerp: Profiel wissels</string>
<string name="profileswitch_pctwillchange"> Bij het opgeven van 90% in je profiel wissel…</string>
<string name="profileswitch_basalhigher">Basalen zullen 10% hoger zijn.</string>
<string name="profileswitch_basallower">Basalen zullen 10% lager zijn.</string>
<string name="profileswitch_ichigher">De KH ratio wordt 10% hoger.</string>
<string name="profileswitch_iclower">De KH ratio wordt 10% hoger.</string>
<string name="profileswitch_isfhigher">ISF-waarde wordt 10% hoger.</string>
<string name="profileswitch_isflower">ISF-waarde wordt 10% lager.</string>
<string name="profileswitch_overall">In totaal zul je ongeveer 10% minder insuline krijgen.</string>
<string name="profileswitch_targethigher">Doel zal 10% hoger zijn.</string>
<string name="profileswitch_targetlower">Doel zal 10% lager zijn.</string>
<string name="profileswitch_targetbottom">Alleen de onderste target zal 10% lager zijn.</string>
<string name="profileswitch_hint1">https://androidaps.readthedocs.io/en/latest/CROWDIN/nl/Usage/Profiles.html?highlight=profilewitch#profiel-wissel</string>
<string name="profileswitchtime_iwant">Als u 1 uur eerder dan normaal wakker wordt, hoe moet u dan AAPS van deze wijziging in uw schema op de hoogte stellen?</string>
<string name="profileswitchtime_1">Voer een profielwijziging uit met een tijdverschuiving van 1</string>
<string name="profileswitchtime__1">Voer een profiel wissel uit met een tijdverschuiving van -1</string>
<string name="profileswitchtime_hint1">https://androidaps.readthedocs.io/en/latest/CROWDIN/nl/Usage/Profiles.html?highlight=profilewitch#tijd-verschuiving</string>
<string name="profileswitchtime_60">Voer een profiel wissel uit met een tijdverschuiving van 60</string>
<string name="profileswitchtime__60">Voer een profiel wissel uit met een tijdverschuiving van -60</string>
<string name="basalhelp_hint1">https://androidaps.readthedocs.io/en/latest/CROWDIN/nl/Module/module.html#goed-individueel-doserings-algoritme-voor-jouw-diabetesbehandeling</string>
<string name="basalhelp_label">Onderwerp: Hulp met basaal waarden</string>
<string name="basalhelp_where">Waar je terecht kunt voor hulp met basaal waarden etc.</string>
<string name="basalhelp_diabetesteam">Jouw behandelaars</string>
<string name="basalhelp_google">Google</string>
<string name="basalhelp_facebook">Facebook</string>
</resources>

View file

@ -51,4 +51,18 @@
<string name="useaction_hint">https://androidaps.readthedocs.io/en/latest/CROWDIN/nl/Getting-Started/Screenshots.html#configurator</string>
<string name="usescale_hint">https://androidaps.readthedocs.io/en/latest/CROWDIN/nl/Getting-Started/Screenshots.html#overzicht-scherm</string>
<string name="notconnected">Niet verbonden met het internet</string>
<string name="failedretrievetime">Ophalen tijd mislukt</string>
<string name="requirementnotmet">Vereisten van doel niet behaald</string>
<plurals name="objective_days">
<item quantity="one">%1$d dag</item>
<item quantity="other">%1$d dagen</item>
</plurals>
<plurals name="objective_hours">
<item quantity="one">%1$d uur</item>
<item quantity="other">%1$d uren</item>
</plurals>
<plurals name="objective_minutes">
<item quantity="one">%1$d minuut</item>
<item quantity="other">%1$d minuten</item>
</plurals>
</resources>

View file

@ -544,6 +544,8 @@
<string name="enablesuperbolus">Activeer superbolus in de wizard</string>
<string name="enablesuperbolus_summary">Activeer de superbolus functie in de wizard. Activeer deze niet tot je begrijpt wat dit doet. OVERDOSIS IS MOGELIJK BIJ BLINDELINGS GEBRUIK!</string>
<string name="show_statuslights">Toon statusindicatoren op startscherm</string>
<string name="show_statuslights_extended">Toon uitgebreide statusindicatoren op overzicht scherm</string>
<string name="show_statuslights_extended_summary">Statusindicatoren inschakelen voor cage, iage, sage, reservoir en batterijniveau op het overzicht scherm.</string>
<string name="statuslights_res_warning">Drempel waarschuwing reservoir niveau [E]</string>
<string name="statuslights_res_critical">Drempel alarm reservoir niveau [E]</string>
<string name="statuslights_bat_warning">Drempel waarschuwing batterij niveau [%%]</string>
@ -617,6 +619,7 @@
<string name="mdtp_cancel">Afbreken</string>
<string name="notloadedplugins">Niet alle profielen zijn geladen!</string>
<string name="valuesnotstored">Waarden niet opgeslagen!</string>
<string name="ns_localbroadcasts">Schakel broadcasts in naar andere apps (zoals xDrip). Schakel niet in als je NSClient of meer dan één installatie van AAPS hebt geïnstalleerd!</string>
<string name="ns_localbroadcasts_title">Activeer locaal delen.</string>
<string name="careportal_activity_label">ACTIVITEIT &amp; FEEDBACK</string>
<string name="careportal_carbsandbolus_label">KOOLHYDRATEN &amp; BOLUS</string>
@ -1271,6 +1274,7 @@
<string name="rileylink_state_not_started">Niet gestart</string>
<string name="rileylink_state_rl_init">RileyLink initialiseren…</string>
<string name="rileylink_state_rl_error">RileyLink fout</string>
<string name="rileylink_state_pc_tune_up">Tuning van RileyLink en Pomp</string>
<string name="rileylink_state_pc_error">Probleem tijdens verbinden met de pomp</string>
<string name="rileylink_state_connected">Verbonden</string>
<!-- RL Errors -->
@ -1340,6 +1344,15 @@
<string name="medtronic_cmd_desc_get_tbr">Ophalen Tijdelijke Basaal</string>
<string name="medtronic_cmd_desc_set_tbr">Instellen Tijdelijke Basaal</string>
<string name="medtronic_cmd_desc_set_bolus">Instellen Bolus</string>
<string name="profilename">Wijzig profiel naar</string>
<string name="changengetoprofilename">Wijzig profiel in %1$s</string>
<string name="automation_trigger_pump_last_connection_label">Laatste verbinding met pomp</string>
<string name="automation_trigger_pump_last_connection_description">Laatste verbinding met pomp [minuten geleden]</string>
<string name="automation_trigger_pump_last_connection_compared">Laatste verbinding met pomp %1$s %2$s min geleden</string>
<string name="sendsmsactionlabel">Stuur SMS: %1$s</string>
<string name="sendsmsactiondescription">Stuur SMS naar alle nummers in voorkeuren</string>
<string name="sendsmsactiontext">Stuur SMS met tekst</string>
<string name="insulinFromCob"><![CDATA[COB vs IOB: <font color=\'%1$s\'>%2$+.2fU</font>]]></string>
<string name="bolusconstraintappliedwarning"><![CDATA[<font color=\'%1$s\'>Bolus limiet bereikt: %2$.2fU naar %3$.2fU</font>]]></string>
<string name="slowabsorptiondetected"><![CDATA[<font color=\'%1$s\'>!!! Trage koolhydraat absorptie gedetecteerd: %2$d%% van de tijd. Controleer je berekening nogmaals. COB kan zijn overschat waardoor er misschien meer insuline wordt afgegeven!!!</font> zijn]]></string>
<string name="reservoirvalue">%1$.0f / %2$d E</string>
@ -1347,4 +1360,15 @@
<string name="deliverpartofboluswizard">Bolus wizard voert de berekening uit maar alleen dit deel van berekende insuline wordt geleverd. Handig in combinatie met het SMB algoritme.</string>
<string name="loading">Bezig met laden...</string>
<string name="snooze">Sluimeren</string>
<string name="time_range">Tijdsinterval</string>
<string name="timerange_value">Tijd ligt tussen %1$s en %2$s</string>
<string name="between">Tussen </string>
<string name="close">Sluiten</string>
<string name="increasingmaxbasal">Verhogen van de maximale basaal waarde omdat de instelling lager is dan het maximum in het profiel</string>
<string name="smscommunicator_messagebody">Ongeldige inhoud van het bericht</string>
<string name="format_bg_isf">%1$s ISF: %2$.1f</string>
<string name="format_carbs_ic">%1$.0fg KH ratio: %2$.1f</string>
<string name="format_cob_ic">%1$.1fg KH ratio: %2$.1f</string>
<string name="boluswizard">Bolus wizard</string>
<string name="unit_minute_short">min</string>
</resources>

View file

@ -31,6 +31,56 @@
<string name="objectives_doexportafterchange">Wyeksportuj je po wprowadzeniu zmian.</string>
<string name="objectives_doexportafterobjective">Wyeksportuj je po wykonaniu zadania.</string>
<string name="objectives_doexportafterfirtssettings">Wyeksportuj je po zakończeniu wstępnych ustawień.</string>
<string name="objectives_hint1">https://androidaps.readthedocs.io/en/latest/EN/Usage/ExportImportSettings.html</string>
<string name="objectives_hint2">https://androidaps.readthedocs.io/en/latest/EN/Getting-Started/FAQ.html#what-emergency-equipment-is-recommended-to-take-with-me</string>
<string name="noisycgm_label">Temat: Szumy w odczytach z CGM</string>
<string name="noisycgm_whattodo">Co powinno być wykonane gdy dane CGM są zaszumione?</string>
<string name="nothing">Nic, AAPS sobie z tym poradzi.</string>
<string name="noisycgm_pause">Wyłącz pętlę, by unilknąć przedawkowania insuliny.</string>
<string name="noisycgm_replacesensor">Wymień czujnik CGM.</string>
<string name="noisycgm_turnoffphone">Wyłącz telefon.</string>
<string name="noisycgm_hint1">https://androidaps.readthedocs.io/en/latest/EN/Usage/Smoothing-Blood-Glucose-Data-in-xDrip.html#smoothing-blood-glucose-data</string>
<string name="noisycgm_checksmoothing">Sprawdź, czy Twój CGM wygładza dane poziomu cukru.</string>
<string name="exercise_label">Temat: Ćwiczenia</string>
<string name="exercise_whattodo">Jak możesz pomóc aby system poradził sobie z ćwiczeniami?</string>
<string name="exercise_setactivitytt">Korzystanie z funkcji tymczasowego docelowego poziomu cukru.</string>
<string name="exercise_switchprofilebelow100">Wykonaj zmianę profilu poniżej 100%.</string>
<string name="exercise_switchprofileabove100">Wykonaj zmianę profilu powyżej 100%.</string>
<string name="exercise_stoploop">Zatrzymaj pętlę.</string>
<string name="exercise_doitbeforestart">Ustaw cel tymczasowy Ćwiczenia przed rozpoczęciem ćwiczeń.</string>
<string name="exercise_afterstart">Ustawienie celu tymczasowego Ćwiczenia po rozpoczęciu ćwiczeń prowadzi do gorszych wynikow poziomu niż przy jego wcześniejszym rozpoczęciu.</string>
<string name="exercise_hint1">https://androidaps.readthedocs.io/en/latest/EN/Usage/temptarget.html#activity-temp-target</string>
<string name="suspendloop_label">Temat: Wyłączona/Zawieszona pętla</string>
<string name="suspendloop_doigetinsulin">Czy otrzymuję insulinę, gdy pętla jest wyłączona/zawieszona?</string>
<string name="suspendloop_yes">Tak, insulina bazowa nadal jest dostarczana.</string>
<string name="suspendloop_no">Nie, podawanie insuliny jest zatrzymane.</string>
<string name="basaltest_label">Temat: Testowanie Bazy, ISF i IC</string>
<string name="basaltest_when">Kiedy powinienem zweryfikować wartości bazy, ISF i IC?</string>
<string name="basaltest_beforeloop">Zanim zacznę używać pętli.</string>
<string name="basaltest_havingregularhypo">Gdy często występują niskie poziomy cukru.</string>
<string name="basaltest_havingregularhyper">Gdy często występują wysokie poziomy cukru.</string>
<string name="basaltest_hint1">https://androidaps.readthedocs.io/en/latest/EN/Getting-Started/FAQ.html#androidaps-settings</string>
<string name="prerequisites_label">Temat: Wymagania wstępne</string>
<string name="prerequisites_what">Czego potrzebuję?</string>
<string name="prerequisites_determinedcorrectprofile">Sprawdzone informacje profilowe (Basal, IC, ISF, DIA).</string>
<string name="prerequisites_computer">Komputer do utworzenia pliku APK.</string>
<string name="prerequisites_phone">Obsługiwany telefon.</string>
<string name="prerequisites_car">Samochód.</string>
<string name="prerequisites_nightscout">Nightscout, aby przejść przez zadania.</string>
<string name="prerequisites_tidepoolaccount">Konto Tidepool.</string>
<string name="prerequisites_googleaccount">Konto Google.</string>
<string name="prerequisites_githubaccount">Konto Github.</string>
<string name="prerequisites_beanandroiddeveloper">Doświadczenie w rozwoju systemu Android.</string>
<string name="prerequisites_own670g">Pompa MiniMed 670G.</string>
<string name="prerequisites_hint1">https://androidaps.readthedocs.io/en/latest/EN/Module/module.html</string>
<string name="prerequisites_smartwatch">Smartwatch.</string>
<string name="prerequisites_supportedcgm">Obsługiwany CGM.</string>
<string name="update_label">Temat: Aktualizacja AndroidAPS</string>
<string name="whatistrue">Co jest prawdą?</string>
<string name="update_git">Musisz mieć zainstalowany Git.</string>
<string name="update_asap">Aktualizuj tak szybko jak nowe wersja zostanie opublikowana i znajdziesz czas do jej wprowadzenia.</string>
<string name="update_keys">Należy używać tych samych kluczy do podpisywania.</string>
<string name="update_neverupdate">Nigdy nie aktualizuj, jeśli system działa dobrze.</string>
<string name="update_askfriend">Poproś swojego przyjaciela o nowy plik APK.</string>
<string name="update_hint1">https://androidaps.readthedocs.io/en/latest/EN/Installing-AndroidAPS/Update-to-new-version.html#update-to-a-new-version-or-branch</string>
<string name="troubleshooting_label">Temat: Rozwiązywanie problemów</string>
@ -81,4 +131,36 @@
<string name="isf_profile">Zmiana wartości ISF w profilu wystarczy, aby zastosować zmianę.</string>
<string name="isf_hint1">https://androidaps.readthedocs.io/en/latest/EN/Getting-Started/FAQ.html#insulin-sensitivity-factor-isf-mmol-l-u-or-mg-dl-u</string>
<string name="isf_hint2">https://androidaps.readthedocs.io/en/latest/EN/Usage/Profiles.html</string>
<string name="ic_label">Temat: Wartość przelicznika IC</string>
<string name="ic_increasingvalue">Wyższe wartości ICprowadzą do mniejszej ilości insuliny dostarczonej do podanej ilości węglowodanów.</string>
<string name="ic_decreasingvalue">Niższe wartości IC prowadzą do mniejszej ilości insuliny podanej do wprowadzonej ilości węglowodanów.</string>
<string name="ic_noeffect">Załóżmy, że masz 0 COB. Zmiana IC doprowadzi do podania innej ilości insuliny w celu skorygowania twojej wartości BG.</string>
<string name="ic_different">IC będzie inny, jeśli policzysz jednostkę chleba jako 10 g lub 12 g.</string>
<string name="ic_meaning">Znaczenie IC to: Ile jednostek chleba jest pokrytych 1U insuliny.</string>
<string name="ic_hint1">https://androidaps.readthedocs.io/en/latest/EN/Getting-Started/FAQ.html#carbohydrate-to-insulin-ratio-cr-g-u</string>
<string name="profileswitch_label">Temat: Przełączanie profili</string>
<string name="profileswitch_pctwillchange"> Jeśli podasz 90% podczas zmiany profilu… </string>
<string name="profileswitch_basalhigher">Baza będzie o 10% wyższa.</string>
<string name="profileswitch_basallower">Baza będzie o 10% niższa.</string>
<string name="profileswitch_ichigher">Wartość IC będzie o 10% wyższa.</string>
<string name="profileswitch_iclower">Wartość IC będzie o 10% niższa.</string>
<string name="profileswitch_isfhigher">Wartość ISF będzie o 10% wyższa.</string>
<string name="profileswitch_isflower">Wartość ISF będzie o 10% niższa.</string>
<string name="profileswitch_overall">Otrzymasz w sumie około 10% mniej insuliny.</string>
<string name="profileswitch_targethigher">Cel będzie wyższy o 10%.</string>
<string name="profileswitch_targetlower">Cel będzie o 10% niższy.</string>
<string name="profileswitch_targetbottom">Tylko dolny cel będzie o 10% niższy.</string>
<string name="profileswitch_hint1">https://androidaps.readthedocs.io/en/latest/EN/Usage/Profiles.html?highlight=profile%20switch#profile-switch</string>
<string name="profileswitchtime_iwant">Jeśli obudzisz się o 1h wcześniej niż zwykle, to jak należy powiadomić AAPS o zmianie w harmonogramie?</string>
<string name="profileswitchtime_1">Wprowadź zmianę profilu ze zmianą czasu równą 1</string>
<string name="profileswitchtime__1">Wprowadź zmianę profilu ze zmianą czasu równą -1</string>
<string name="profileswitchtime_hint1">https://androidaps.readthedocs.io/en/latest/EN/Usage/Profiles.html?highlight=profile%20switch#timeshift</string>
<string name="profileswitchtime_60">Wprowadź zmianę profilu ze zmianą czasu równą 60</string>
<string name="profileswitchtime__60">Wprowadź zmianę profilu ze zmianą czasu równą -60</string>
<string name="basalhelp_hint1">https://androidaps.readthedocs.io/en/latest/EN/Module/module.html#good-individual-dosage-algorithm-for-your-diabetes-therapy</string>
<string name="basalhelp_label">Temat: Pomoc z dawkami podstawowymi (bazą)</string>
<string name="basalhelp_where">Gdzie uzyskać pomoc w sprawie dawek podstawowych itp.</string>
<string name="basalhelp_diabetesteam">Twój zespół cukrzycowy</string>
<string name="basalhelp_google">Google</string>
<string name="basalhelp_facebook">Facebook</string>
</resources>

View file

@ -1,6 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.com-->
<resources>
<string name="objectives_button_back">Wstecz</string>
<string name="objectives_button_start">Start</string>
<string name="objectives_button_verify">Zweryfikuj</string>
<string name="nth_objective">%1$d. Zadanie</string>
<string name="objectivenotstarted">Zadanie %1$d nierozpoczęte</string>
<string name="objectivenotfinished">Zadanie %1$d nieukończone</string>
<string name="objectives_0_objective">Konfiguracja wizualizacji i monitorowania, analiza dawek bazowych i współczynników</string>
<string name="objectives_0_gate">Sprawdź czy BG (pomiary cukru) są dostępne w Nightscout, i czy przesyłane są dane pompy insulinowej</string>
<string name="objectives_openloop_objective">Rozpoczęcie w trybie otwartej pętli (open loop)</string>
<string name="objectives_openloop_gate">Uruchom w trybie otwartej pętli przez kilka dni i ręcznie potwierdzaj kilka zmian dawki tymczasowej. Ustaw i używaj celów tymczasowych i domyślnych celów tymczasowych (np. Ćwiczenia lub Hipo)</string>
<string name="objectives_maxbasal_objective">Zrozumienie działania otwartej pętli, wraz z jej rekomendacjami dawek tymczasowych</string>
<string name="objectives_maxbasal_gate">Na podstawie tych doświadczeń zdecyduj jaka powinna być ustawiona maksymalna baza, i wprowadź ją w pompie i w ustawieniach AAPS</string>
<string name="objectives_maxiobzero_objective">Rozpoczęcie zamknięcia pętli z zawieszeniem podawania bazy przy niskim poziomie cukru</string>
<string name="objectives_maxiobzero_gate">Używaj przez kilka dni zamkniętej pętli (Closed Loop) z max IOB = 0 bez zbyt wielu incydentów niedocukrzeń</string>
<string name="objectives_maxiob_objective">Dostrajanie zamkniętej pętli, podniesienie wartości max IOB powyżej 0 i stopniowe obniżanie docelowego poziomu cukru (BG target)</string>
<string name="objectives_maxiob_gate">Używaj pętli przez kilka dni i przynajmniej jedną noc bez żadnego alarmu niskiego poziomu, przed obniżeniem docelowego poziomu cukru</string>
<string name="objectives_autosens_objective">Dostosuj bazę i wartości parametrów jeśli jest to potrzebne, i wtedy uruchom funkcję autosens</string>
<string name="objectives_autosens_gate">1 tydzień sukcesu w działaniu pętli w ciągu dnia z regularnym wprowadzaniem spożywanych węglowodanów</string>
<string name="objectives_ama_objective">Włączanie dodatkowych funkcji do użytku, jak AMA</string>
<string name="objectives_smb_objective">Włączanie dodatkowych funkcji do użytku, jak SMB (Super Mikro Bolusy)</string>
<string name="objectives_smb_gate">Musisz przeczytać wiki i zwiększyć maxIOB, aby SMB działało dobrze! Dobrym początkiem jest maxIOB = średni bolus + 3 x maks. dzienna dawka bazowa</string>
@ -41,4 +59,16 @@
<item quantity="many">%1$d dni</item>
<item quantity="other">%1$d dni</item>
</plurals>
<plurals name="objective_hours">
<item quantity="one">%1$d godzina</item>
<item quantity="few">%1$d godziny</item>
<item quantity="many">%1$d godzin</item>
<item quantity="other">%1$d godziny</item>
</plurals>
<plurals name="objective_minutes">
<item quantity="one">%1$d minuta</item>
<item quantity="few">%1$d minut</item>
<item quantity="many">%1$d minut</item>
<item quantity="other">%1$d minuty</item>
</plurals>
</resources>

View file

@ -6,6 +6,7 @@
<string name="dia_minimumis3h">O valor mínimo é de 3 horas.</string>
<string name="dia_minimumis5h">O valor mínimo é de 5 horas.</string>
<string name="dia_hint1">https://androidaps.readthedocs.io/en/latest/EN/Configuration/Config-Builder.html?#insulin</string>
<string name="dia_meaningisequaltodiapump">O significado é igual ao parâmetro DIA usado na bomba.</string>
<string name="hypott_label">Tópico: Alvo-Temp. Hipo</string>
<string name="hypott_whenhypott">O que é a razão principal para definir TT hipoglicemia?</string>
<string name="hypott_hint1">https://androidaps.readthedocs.io/en/latest/EN/Usage/temptarget.html</string>
@ -16,14 +17,23 @@
<string name="pumpdisconnect_letknow">Clique em \'Desligar bomba\' para que o AAPS saiba que nenhuma insulina está a ser entregue.</string>
<string name="pumpdisconnect_hint1">https://androidaps.readthedocs.io/en/latest/EN/Getting-Started/FAQ.html#other-settings</string>
<string name="objectives_label">Tópico: Definições do AndroidAPS</string>
<string name="objectives_howtosave">Quais são as práticas recomendadas para fazer cópia de segurança das configurações?</string>
<string name="objectives_exportsettings">Exportá-las localmente a partir do menu Manutenção.</string>
<string name="objectives_storeelsewhere">Armazenar ficheiro exportado para outro local como e-mail, Dropbox, Google drive…</string>
<string name="objectives_doexportonstart">Exportá-los logo após a instalação do AAPS.</string>
<string name="objectives_doexportafterchange">Exportá-los depois de fazer alterações de configuração.</string>
<string name="objectives_doexportafterobjective">Exportá-los depois de completar um objectivo.</string>
<string name="objectives_doexportafterfirtssettings">Exportá-los quando terminar as configurações iniciais.</string>
<string name="objectives_hint1">https://androidaps.readthedocs.io/en/latest/EN/Usage/ExportImportSettings.html</string>
<string name="objectives_hint2">https://androidaps.readthedocs.io/en/latest/EN/Getting-Started/FAQ.html#what-emergency-equipment-is-recommended-to-take-with-me</string>
<string name="noisycgm_label">Tópico: Leituras Irregulares CGM</string>
<string name="noisycgm_whattodo">O que deve ser feito se os dados do CGM são irregulares?</string>
<string name="nothing">Nada, AAPS vai lidar com isso.</string>
<string name="noisycgm_pause">Desactivar o loop para evitar sobredosagem.</string>
<string name="noisycgm_replacesensor">Substituir o sensor CGM.</string>
<string name="noisycgm_turnoffphone">Desligue o telefone.</string>
<string name="noisycgm_hint1">https://androidaps.readthedocs.io/en/latest/EN/Usage/Smoothing-Blood-Glucose-Data-in-xDrip.html#smoothing-blood-glucose-data</string>
<string name="noisycgm_checksmoothing">Verifique que a app do CGM suaviza os dados da Glicose.</string>
<string name="exercise_label">Tópico: Exercício</string>
<string name="exercise_setactivitytt">Usando o recurso de alvo-temp.</string>
<string name="exercise_switchprofilebelow100">Fazer uma mudança de perfil inferior a 100%.</string>
@ -86,6 +96,8 @@
<string name="nsclient_spikeiphone">App Spike no iPhone.</string>
<string name="nsclient_hint1">https://androidaps.readthedocs.io/en/latest/EN/Children/Children.html</string>
<string name="isf_label">Tópico: Factor de Sensibilidade de Insulina</string>
<string name="isf_preferences">É necessário inserir FSI nas Preferências.</string>
<string name="isf_profile">A alteração do valor do FSI no seu perfil é suficiente para aplicar a mudança.</string>
<string name="isf_hint1">https://androidaps.readthedocs.io/en/latest/EN/Getting-Started/FAQ.html#insulin-sensitivity-factor-isf-mmol-l-u-or-mg-dl-u</string>
<string name="isf_hint2">https://androidaps.readthedocs.io/en/latest/EN/Usage/Profiles.html</string>
<string name="ic_label">Tópico: Rácio IC</string>
@ -99,10 +111,16 @@
<string name="profileswitch_isflower">O valor FSI será 10% mais baixo.</string>
<string name="profileswitch_targethigher">Alvo será 10% superior.</string>
<string name="profileswitch_targetlower">Alvo será 10% inferior.</string>
<string name="profileswitch_targetbottom">Só alvo inferior será 10% menor.</string>
<string name="profileswitch_hint1">https://androidaps.readthedocs.io/en/latest/EN/Usage/Profiles.html?highlight=profile%20switch#profile-switch</string>
<string name="profileswitchtime_1">Iniciar uma mudança de perfil com uma alteração de turno de 1</string>
<string name="profileswitchtime__1">Iniciar uma mudança de perfil com uma alteração de turno de -1</string>
<string name="profileswitchtime_hint1">https://androidaps.readthedocs.io/en/latest/EN/Usage/Profiles.html?highlight=profile%20switch#timeshift</string>
<string name="profileswitchtime_60">Iniciar uma mudança de perfil com uma alteração de turno de 60</string>
<string name="profileswitchtime__60">Iniciar uma mudança de perfil com uma alteração de turno de -60</string>
<string name="basalhelp_hint1">https://androidaps.readthedocs.io/en/latest/EN/Module/module.html#good-individual-dosage-algorithm-for-your-diabetes-therapy</string>
<string name="basalhelp_label">Tópico: Ajuda com taxas de basal</string>
<string name="basalhelp_where">Onde ir para obter ajuda com rácios da basal, etc.</string>
<string name="basalhelp_diabetesteam">A sua equipa da diabetes</string>
<string name="basalhelp_google">Google</string>
<string name="basalhelp_facebook">Facebook</string>

View file

@ -17,7 +17,9 @@
<string name="objectives_useprofileswitch">Definir perfil de 90% por 10 min (pressione longo no nome de perfil na Visão Geral)</string>
<string name="objectives_usedisconnectpump">Simular chuveiro. Desligar a bomba de 1h (Pressione longo em Open Loop)</string>
<string name="objectives_useloop">Mostrar conteúdo do plugin Loop</string>
<string name="objectives_usescale">Utilizar a função de escala premindo longamente gráfico Glic</string>
<string name="objectives_button_enter">Inserir</string>
<string name="enter_code_obtained_from_developers_to_bypass_the_rest_of_objectives">Insira o código obtido dos programadores para ignorar o resto dos objectivos</string>
<string name="codeaccepted">Código aceite</string>
<string name="codeinvalid">Código inválido</string>
<string name="objectives_exam_objective">Prove seu conhecimento</string>

View file

@ -591,7 +591,7 @@ Eversense-appen.</string>
<string name="nsalarm_urgent_staledatavalue_label">Akut varning efter [min]</string>
<string name="openapsama_autosens_period">Intervall för autosens [tim]</string>
<string name="openapsama_autosens_period_summary">Antal timmar för beräkning av känslighet (absorptionstid för KH är exkluderad)</string>
<string name="pump">P</string>
<string name="pump">Pump</string>
<string name="openaps">OpenAPS</string>
<string name="uploader">Uppladdare</string>
<string name="configbuilder_sensitivity">Känslighetsavkänning</string>

View file

@ -37,6 +37,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.doReturn;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
@ -234,17 +235,6 @@ public class AAPSMocker {
}
public static DanaRPlugin mockDanaRPlugin() {
PowerMockito.mockStatic(DanaRPlugin.class);
DanaRPlugin danaRPlugin = mock(DanaRPlugin.class);
DanaRv2Plugin danaRv2Plugin = mock(DanaRv2Plugin.class);
DanaRKoreanPlugin danaRKoreanPlugin = mock(DanaRKoreanPlugin.class);
when(MainApp.getSpecificPlugin(DanaRPlugin.class)).thenReturn(danaRPlugin);
when(MainApp.getSpecificPlugin(DanaRv2Plugin.class)).thenReturn(danaRv2Plugin);
when(MainApp.getSpecificPlugin(DanaRKoreanPlugin.class)).thenReturn(danaRKoreanPlugin);
return danaRPlugin;
}
public static Profile getValidProfile() {
try {
if (profile == null)

View file

@ -57,7 +57,7 @@ import static org.powermock.api.mockito.PowerMockito.when;
L.class, SP.class, MainApp.class, DateUtil.class, ProfileFunctions.class,
TreatmentsPlugin.class, SmsManager.class, IobCobCalculatorPlugin.class,
CommandQueue.class, ConfigBuilderPlugin.class, NSUpload.class, ProfileInterface.class,
SimpleProfilePlugin.class, XdripCalibrations.class, VirtualPumpPlugin.class
SimpleProfilePlugin.class, XdripCalibrations.class, VirtualPumpPlugin.class, LoopPlugin.class
})
public class SmsCommunicatorPluginTest {
@ -744,8 +744,9 @@ public class SmsCommunicatorPluginTest {
smsCommunicatorPlugin = SmsCommunicatorPlugin.getPlugin();
smsCommunicatorPlugin.setPluginEnabled(PluginType.GENERAL, true);
mockStatic(LoopPlugin.class);
loopPlugin = mock(LoopPlugin.class);
when(MainApp.getSpecificPlugin(LoopPlugin.class)).thenReturn(loopPlugin);
when(LoopPlugin.getPlugin()).thenReturn(loopPlugin);
Mockito.doAnswer(invocation -> {
Callback callback = invocation.getArgument(1);

View file

@ -1,5 +1,6 @@
package info.nightscout.androidaps.plugins.pump.danaR.comm;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.powermock.core.classloader.annotations.PrepareForTest;
@ -22,13 +23,6 @@ import static org.junit.Assert.assertEquals;
public class MsgInitConnStatusTimeTest {
@Test
public void runTest() {
AAPSMocker.mockMainApp();
AAPSMocker.mockApplicationContext();
AAPSMocker.mockSP();
AAPSMocker.mockL();
AAPSMocker.mockConfigBuilder();
AAPSMocker.mockCommandQueue();
AAPSMocker.mockDanaRPlugin();
MsgInitConnStatusTime packet = new MsgInitConnStatusTime();
// test message decoding
@ -56,4 +50,13 @@ public class MsgInitConnStatusTimeTest {
return ret;
}
@Before
public void mock() {
AAPSMocker.mockMainApp();
AAPSMocker.mockApplicationContext();
AAPSMocker.mockSP();
AAPSMocker.mockL();
AAPSMocker.mockConfigBuilder();
AAPSMocker.mockCommandQueue();
}
}

View file

@ -1,5 +1,6 @@
package info.nightscout.androidaps.plugins.pump.danaRv2.comm;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.powermock.core.classloader.annotations.PrepareForTest;
@ -20,17 +21,10 @@ import static org.junit.Assert.*;
import static org.powermock.api.mockito.PowerMockito.when;
@RunWith(PowerMockRunner.class)
@PrepareForTest({MainApp.class, SP.class, L.class, DanaRv2Plugin.class, DanaRPlugin.class, ConfigBuilderPlugin.class, CommandQueue.class})
@PrepareForTest({MainApp.class, SP.class, L.class, ConfigBuilderPlugin.class, CommandQueue.class})
public class MsgCheckValue_v2Test {
@Test
public void runTest() {
AAPSMocker.mockMainApp();
AAPSMocker.mockApplicationContext();
AAPSMocker.mockSP();
AAPSMocker.mockL();
AAPSMocker.mockDanaRPlugin();
AAPSMocker.mockConfigBuilder();
AAPSMocker.mockCommandQueue();
Treatment t = new Treatment();
MsgCheckValue_v2 packet = new MsgCheckValue_v2();
// test message decoding
@ -55,4 +49,13 @@ public class MsgCheckValue_v2Test {
return ret;
}
@Before
public void mock() {
AAPSMocker.mockMainApp();
AAPSMocker.mockApplicationContext();
AAPSMocker.mockSP();
AAPSMocker.mockL();
AAPSMocker.mockConfigBuilder();
AAPSMocker.mockCommandQueue();
}
}

View file

@ -1,5 +1,6 @@
package info.nightscout.androidaps.plugins.pump.danaRv2.comm;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.powermock.core.classloader.annotations.PrepareForTest;
@ -18,15 +19,10 @@ import static org.junit.Assert.*;
*/
@RunWith(PowerMockRunner.class)
@PrepareForTest({MainApp.class, SP.class, L.class, DanaRv2Plugin.class, DanaRPlugin.class})
@PrepareForTest({MainApp.class, SP.class, L.class})
public class MsgSetHistoryEntry_v2Test {
@Test
public void runTest() {
AAPSMocker.mockMainApp();
AAPSMocker.mockApplicationContext();
AAPSMocker.mockSP();
AAPSMocker.mockL();
AAPSMocker.mockDanaRPlugin();
MsgSetHistoryEntry_v2 initializerTest = new MsgSetHistoryEntry_v2((byte) 1, System.currentTimeMillis(), 1, 0);
MsgSetHistoryEntry_v2 packet = new MsgSetHistoryEntry_v2();
@ -56,4 +52,11 @@ public class MsgSetHistoryEntry_v2Test {
return ret;
}
@Before
public void mock() {
AAPSMocker.mockMainApp();
AAPSMocker.mockApplicationContext();
AAPSMocker.mockSP();
AAPSMocker.mockL();
}
}

View file

@ -1,5 +1,6 @@
package info.nightscout.androidaps.plugins.pump.danaRv2.comm;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.powermock.core.classloader.annotations.PrepareForTest;
@ -19,16 +20,10 @@ import static org.junit.Assert.*;
*/
@RunWith(PowerMockRunner.class)
@PrepareForTest({MainApp.class, SP.class, L.class, DanaRv2Plugin.class, DanaRPlugin.class})
@PrepareForTest({MainApp.class, SP.class, L.class})
public class MsgStatusTempBasal_v2Test {
@Test
public void runTest() {
AAPSMocker.mockMainApp();
AAPSMocker.mockApplicationContext();
AAPSMocker.mockSP();
AAPSMocker.mockL();
AAPSMocker.mockDanaRPlugin();
MsgStatusTempBasal_v2 packet = new MsgStatusTempBasal_v2();
DanaRPump pump = DanaRPump.getInstance();
// test message decoding
@ -57,4 +52,12 @@ public class MsgStatusTempBasal_v2Test {
return ret;
}
@Before
public void mock() {
AAPSMocker.mockMainApp();
AAPSMocker.mockApplicationContext();
AAPSMocker.mockSP();
AAPSMocker.mockL();
}
}