Merge branch 'omnipod_eros_dev' into omnipod_eros_dev_wizard

This commit is contained in:
Bart Sopers 2020-09-26 15:45:44 +02:00
commit ee9079fdcf
120 changed files with 2072 additions and 1157 deletions

View file

@ -42,7 +42,7 @@ Hints
----- -----
* Start small, it is easier to review smaller changes that affect fewer parts of code * Start small, it is easier to review smaller changes that affect fewer parts of code
* Take a look into Issues list (https://github.com/MilosKozak/AndroidAPS/issues) - maybe there is somthing you can fix or implement * Take a look into Issues list (https://github.com/nightscout/AndroidAPS/issues) - maybe there is something you can fix or implement
* For new features, make sure there is Issue to track progress and have on-topic discussion * For new features, make sure there is Issue to track progress and have on-topic discussion
* Reach out to community, discuss idea on Gitter (https://gitter.im/MilosKozak/AndroidAPS) * Reach out to community, discuss idea on Gitter (https://gitter.im/MilosKozak/AndroidAPS)
* Speak with other developers to minimise merge conflicts. Find out who worked, working or plan to work on speciffic issue or part of app * Speak with other developers to minimise merge conflicts. Find out who worked, working or plan to work on speciffic issue or part of app

View file

@ -6,5 +6,5 @@ Reporting bugs
upper-right corner). upper-right corner).
- Obtain the app's log files, which can be found on the phone in - Obtain the app's log files, which can be found on the phone in
_/storage/emulated/0/Android/data/info.nightscout.androidaps/_ _/storage/emulated/0/Android/data/info.nightscout.androidaps/_
See https://github.com/MilosKozak/AndroidAPS/wiki/Accessing-logfiles See https://androidaps.readthedocs.io/en/latest/EN/Usage/Accessing-logfiles.html
- Open an issue at https://github.com/MilosKozak/AndroidAPS/issues/new - Open an issue at https://github.com/nightscout/AndroidAPS/issues/new

View file

@ -4,7 +4,7 @@
* Everyone whos been looping with AndroidAPS needs to fill out the form after 3 days of looping https://docs.google.com/forms/d/14KcMjlINPMJHVt28MDRupa4sz4DDIooI4SrW0P3HSN8/viewform?c=0&w=1 * Everyone whos been looping with AndroidAPS needs to fill out the form after 3 days of looping https://docs.google.com/forms/d/14KcMjlINPMJHVt28MDRupa4sz4DDIooI4SrW0P3HSN8/viewform?c=0&w=1
[![Gitter](https://badges.gitter.im/MilosKozak/AndroidAPS.svg)](https://gitter.im/MilosKozak/AndroidAPS?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Gitter](https://badges.gitter.im/MilosKozak/AndroidAPS.svg)](https://gitter.im/MilosKozak/AndroidAPS?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Build status](https://travis-ci.org/MilosKozak/AndroidAPS.svg?branch=master)](https://travis-ci.org/MilosKozak/AndroidAPS) [![Build status](https://travis-ci.org/nightscout/AndroidAPS.svg?branch=master)](https://travis-ci.org/nightscout/AndroidAPS)
[![Crowdin](https://d322cqt584bo4o.cloudfront.net/androidaps/localized.svg)](https://translations.androidaps.org/project/androidaps) [![Crowdin](https://d322cqt584bo4o.cloudfront.net/androidaps/localized.svg)](https://translations.androidaps.org/project/androidaps)
[![Documentation Status](https://readthedocs.org/projects/androidaps/badge/?version=latest)](https://androidaps.readthedocs.io/en/latest/?badge=latest) [![Documentation Status](https://readthedocs.org/projects/androidaps/badge/?version=latest)](https://androidaps.readthedocs.io/en/latest/?badge=latest)
[![codecov](https://codecov.io/gh/MilosKozak/AndroidAPS/branch/master/graph/badge.svg)](https://codecov.io/gh/MilosKozak/AndroidAPS) [![codecov](https://codecov.io/gh/MilosKozak/AndroidAPS/branch/master/graph/badge.svg)](https://codecov.io/gh/MilosKozak/AndroidAPS)

View file

@ -126,7 +126,7 @@ android {
targetSdkVersion 28 targetSdkVersion 28
multiDexEnabled true multiDexEnabled true
versionCode 1500 versionCode 1500
version "2.7-omnipod-0.4.1-SNAPSHOT" version "2.7.0-omnipod-0.4-SNAPSHOT"
buildConfigField "String", "VERSION", '"' + version + '"' buildConfigField "String", "VERSION", '"' + version + '"'
buildConfigField "String", "BUILDVERSION", '"' + generateGitBuild() + '-' + generateDate() + '"' buildConfigField "String", "BUILDVERSION", '"' + generateGitBuild() + '-' + generateDate() + '"'
buildConfigField "String", "REMOTE", '"' + generateGitRemote() + '"' buildConfigField "String", "REMOTE", '"' + generateGitRemote() + '"'

View file

@ -26,4 +26,5 @@ abstract class CommandQueueModule {
@ContributesAndroidInjector abstract fun commandTempBasalAbsoluteInjector(): CommandTempBasalAbsolute @ContributesAndroidInjector abstract fun commandTempBasalAbsoluteInjector(): CommandTempBasalAbsolute
@ContributesAndroidInjector abstract fun commandTempBasalPercentInjector(): CommandTempBasalPercent @ContributesAndroidInjector abstract fun commandTempBasalPercentInjector(): CommandTempBasalPercent
@ContributesAndroidInjector abstract fun commandSetUserSettingsInjector(): CommandSetUserSettings @ContributesAndroidInjector abstract fun commandSetUserSettingsInjector(): CommandSetUserSettings
@ContributesAndroidInjector abstract fun commandCustomCommandInjector(): CommandCustomCommand
} }

View file

@ -48,7 +48,7 @@ class SignatureVerifierPlugin @Inject constructor(
aapsLogger, resourceHelper, injector aapsLogger, resourceHelper, injector
), ConstraintsInterface { ), ConstraintsInterface {
private val REVOKED_CERTS_URL = "https://raw.githubusercontent.com/MilosKozak/AndroidAPS/master/app/src/main/assets/revoked_certs.txt" private val REVOKED_CERTS_URL = "https://raw.githubusercontent.com/nightscout/AndroidAPS/master/app/src/main/assets/revoked_certs.txt"
private val UPDATE_INTERVAL = TimeUnit.DAYS.toMillis(1) private val UPDATE_INTERVAL = TimeUnit.DAYS.toMillis(1)
private val lock: Any = arrayOfNulls<Any>(0) private val lock: Any = arrayOfNulls<Any>(0)

View file

@ -49,7 +49,7 @@ class VersionCheckerUtils @Inject constructor(
private fun checkVersion() = if (isConnected()) { private fun checkVersion() = if (isConnected()) {
Thread { Thread {
try { try {
val version: String? = findVersion(URL("https://raw.githubusercontent.com/MilosKozak/AndroidAPS/master/app/build.gradle").readText()) val version: String? = findVersion(URL("https://raw.githubusercontent.com/nightscout/AndroidAPS/master/app/build.gradle").readText())
compareWithCurrentVersion(version, BuildConfig.VERSION_NAME) compareWithCurrentVersion(version, BuildConfig.VERSION_NAME)
} catch (e: IOException) { } catch (e: IOException) {
aapsLogger.error(LTag.CORE, "Github master version check error: $e") aapsLogger.error(LTag.CORE, "Github master version check error: $e")

View file

@ -75,6 +75,10 @@ class AutomationPlugin @Inject constructor(
private val loopHandler: Handler = Handler(HandlerThread(AutomationPlugin::class.java.simpleName + "Handler").also { it.start() }.looper) private val loopHandler: Handler = Handler(HandlerThread(AutomationPlugin::class.java.simpleName + "Handler").also { it.start() }.looper)
private lateinit var refreshLoop: Runnable private lateinit var refreshLoop: Runnable
companion object {
const val event = "{\"title\":\"Low\",\"enabled\":true,\"trigger\":\"{\\\"type\\\":\\\"info.nightscout.androidaps.plugins.general.automation.triggers.TriggerConnector\\\",\\\"data\\\":{\\\"connectorType\\\":\\\"AND\\\",\\\"triggerList\\\":[\\\"{\\\\\\\"type\\\\\\\":\\\\\\\"info.nightscout.androidaps.plugins.general.automation.triggers.TriggerBg\\\\\\\",\\\\\\\"data\\\\\\\":{\\\\\\\"bg\\\\\\\":4,\\\\\\\"comparator\\\\\\\":\\\\\\\"IS_LESSER\\\\\\\",\\\\\\\"units\\\\\\\":\\\\\\\"mmol\\\\\\\"}}\\\",\\\"{\\\\\\\"type\\\\\\\":\\\\\\\"info.nightscout.androidaps.plugins.general.automation.triggers.TriggerDelta\\\\\\\",\\\\\\\"data\\\\\\\":{\\\\\\\"value\\\\\\\":-0.1,\\\\\\\"units\\\\\\\":\\\\\\\"mmol\\\\\\\",\\\\\\\"deltaType\\\\\\\":\\\\\\\"DELTA\\\\\\\",\\\\\\\"comparator\\\\\\\":\\\\\\\"IS_LESSER\\\\\\\"}}\\\"]}}\",\"actions\":[\"{\\\"type\\\":\\\"info.nightscout.androidaps.plugins.general.automation.actions.ActionStartTempTarget\\\",\\\"data\\\":{\\\"value\\\":8,\\\"units\\\":\\\"mmol\\\",\\\"durationInMinutes\\\":60}}\"]}"
}
init { init {
refreshLoop = Runnable { refreshLoop = Runnable {
processActions() processActions()
@ -162,7 +166,7 @@ class AutomationPlugin @Inject constructor(
private fun loadFromSP() { private fun loadFromSP() {
automationEvents.clear() automationEvents.clear()
val data = sp.getString(keyAutomationEvents, "") val data = sp.getString(keyAutomationEvents, "")
if (data != "") { if (data != "")
try { try {
val array = JSONArray(data) val array = JSONArray(data)
for (i in 0 until array.length()) { for (i in 0 until array.length()) {
@ -173,7 +177,8 @@ class AutomationPlugin @Inject constructor(
} catch (e: JSONException) { } catch (e: JSONException) {
e.printStackTrace() e.printStackTrace()
} }
} else
automationEvents.add(AutomationEvent(injector).fromJSON(event))
} }
@Synchronized @Synchronized

View file

@ -510,7 +510,7 @@ class OpenHumansUploader @Inject constructor(
applicationInfo.put("versionName", BuildConfig.VERSION_NAME) applicationInfo.put("versionName", BuildConfig.VERSION_NAME)
applicationInfo.put("versionCode", BuildConfig.VERSION_CODE) applicationInfo.put("versionCode", BuildConfig.VERSION_CODE)
val hasGitInfo = !BuildConfig.HEAD.endsWith("NoGitSystemAvailable", true) val hasGitInfo = !BuildConfig.HEAD.endsWith("NoGitSystemAvailable", true)
val customRemote = !BuildConfig.REMOTE.equals("https://github.com/MilosKozak/AndroidAPS.git", true) val customRemote = !BuildConfig.REMOTE.equals("https://github.com/nightscout/AndroidAPS.git", true)
applicationInfo.put("hasGitInfo", hasGitInfo) applicationInfo.put("hasGitInfo", hasGitInfo)
applicationInfo.put("customRemote", customRemote) applicationInfo.put("customRemote", customRemote)
applicationInfo.put("applicationId", appId.toString()) applicationInfo.put("applicationId", appId.toString())

View file

@ -29,6 +29,7 @@ import info.nightscout.androidaps.db.CareportalEvent;
import info.nightscout.androidaps.db.Source; import info.nightscout.androidaps.db.Source;
import info.nightscout.androidaps.db.TDD; import info.nightscout.androidaps.db.TDD;
import info.nightscout.androidaps.db.TemporaryBasal; import info.nightscout.androidaps.db.TemporaryBasal;
import info.nightscout.androidaps.db.Treatment;
import info.nightscout.androidaps.events.EventInitializationChanged; import info.nightscout.androidaps.events.EventInitializationChanged;
import info.nightscout.androidaps.events.EventRefreshOverview; import info.nightscout.androidaps.events.EventRefreshOverview;
import info.nightscout.androidaps.interfaces.CommandQueueProvider; import info.nightscout.androidaps.interfaces.CommandQueueProvider;
@ -36,6 +37,7 @@ import info.nightscout.androidaps.interfaces.Constraint;
import info.nightscout.androidaps.interfaces.ConstraintsInterface; import info.nightscout.androidaps.interfaces.ConstraintsInterface;
import info.nightscout.androidaps.interfaces.PluginDescription; import info.nightscout.androidaps.interfaces.PluginDescription;
import info.nightscout.androidaps.interfaces.PluginType; import info.nightscout.androidaps.interfaces.PluginType;
import info.nightscout.androidaps.interfaces.ProfileFunction;
import info.nightscout.androidaps.interfaces.PumpDescription; import info.nightscout.androidaps.interfaces.PumpDescription;
import info.nightscout.androidaps.interfaces.PumpInterface; import info.nightscout.androidaps.interfaces.PumpInterface;
import info.nightscout.androidaps.interfaces.PumpPluginBase; import info.nightscout.androidaps.interfaces.PumpPluginBase;
@ -43,9 +45,9 @@ import info.nightscout.androidaps.logging.AAPSLogger;
import info.nightscout.androidaps.logging.LTag; import info.nightscout.androidaps.logging.LTag;
import info.nightscout.androidaps.plugins.bus.RxBusWrapper; import info.nightscout.androidaps.plugins.bus.RxBusWrapper;
import info.nightscout.androidaps.plugins.common.ManufacturerType; import info.nightscout.androidaps.plugins.common.ManufacturerType;
import info.nightscout.androidaps.interfaces.ProfileFunction;
import info.nightscout.androidaps.plugins.general.actions.defs.CustomAction; import info.nightscout.androidaps.plugins.general.actions.defs.CustomAction;
import info.nightscout.androidaps.plugins.general.actions.defs.CustomActionType; import info.nightscout.androidaps.plugins.general.actions.defs.CustomActionType;
import info.nightscout.androidaps.queue.commands.CustomCommand;
import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification; 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.events.EventNewNotification;
import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress; import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress;
@ -64,7 +66,6 @@ import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history.PumpH
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history.PumpHistoryRequest; import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history.PumpHistoryRequest;
import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history.Tdd; import info.nightscout.androidaps.plugins.pump.combo.ruffyscripter.history.Tdd;
import info.nightscout.androidaps.plugins.pump.common.defs.PumpType; import info.nightscout.androidaps.plugins.pump.common.defs.PumpType;
import info.nightscout.androidaps.db.Treatment;
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin; import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin;
import info.nightscout.androidaps.utils.DateUtil; import info.nightscout.androidaps.utils.DateUtil;
import info.nightscout.androidaps.utils.InstanceId; import info.nightscout.androidaps.utils.InstanceId;
@ -1395,7 +1396,10 @@ public class ComboPlugin extends PumpPluginBase implements PumpInterface, Constr
@Override @Override
public void executeCustomAction(CustomActionType customActionType) { public void executeCustomAction(CustomActionType customActionType) {
}
@Nullable @Override public PumpEnactResult executeCustomCommand(CustomCommand customCommand) {
return null;
} }
@Override @Override

View file

@ -12,6 +12,7 @@ import android.os.IBinder;
import android.os.Looper; import android.os.Looper;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import org.json.JSONException; import org.json.JSONException;
import org.json.JSONObject; import org.json.JSONObject;
@ -56,6 +57,7 @@ import info.nightscout.androidaps.plugins.bus.RxBusWrapper;
import info.nightscout.androidaps.plugins.common.ManufacturerType; import info.nightscout.androidaps.plugins.common.ManufacturerType;
import info.nightscout.androidaps.plugins.general.actions.defs.CustomAction; import info.nightscout.androidaps.plugins.general.actions.defs.CustomAction;
import info.nightscout.androidaps.plugins.general.actions.defs.CustomActionType; import info.nightscout.androidaps.plugins.general.actions.defs.CustomActionType;
import info.nightscout.androidaps.queue.commands.CustomCommand;
import info.nightscout.androidaps.plugins.general.nsclient.NSUpload; import info.nightscout.androidaps.plugins.general.nsclient.NSUpload;
import info.nightscout.androidaps.plugins.general.nsclient.UploadQueue; import info.nightscout.androidaps.plugins.general.nsclient.UploadQueue;
import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification; import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification;
@ -1171,7 +1173,10 @@ public class LocalInsightPlugin extends PumpPluginBase implements PumpInterface,
@Override @Override
public void executeCustomAction(CustomActionType customActionType) { public void executeCustomAction(CustomActionType customActionType) {
}
@Nullable @Override public PumpEnactResult executeCustomCommand(CustomCommand customCommand) {
return null;
} }
private void readHistory() { private void readHistory() {

View file

@ -1,6 +1,7 @@
package info.nightscout.androidaps.plugins.pump.mdi; package info.nightscout.androidaps.plugins.pump.mdi;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import org.json.JSONException; import org.json.JSONException;
import org.json.JSONObject; import org.json.JSONObject;
@ -27,6 +28,7 @@ import info.nightscout.androidaps.plugins.bus.RxBusWrapper;
import info.nightscout.androidaps.plugins.common.ManufacturerType; import info.nightscout.androidaps.plugins.common.ManufacturerType;
import info.nightscout.androidaps.plugins.general.actions.defs.CustomAction; import info.nightscout.androidaps.plugins.general.actions.defs.CustomAction;
import info.nightscout.androidaps.plugins.general.actions.defs.CustomActionType; import info.nightscout.androidaps.plugins.general.actions.defs.CustomActionType;
import info.nightscout.androidaps.queue.commands.CustomCommand;
import info.nightscout.androidaps.plugins.pump.common.defs.PumpType; import info.nightscout.androidaps.plugins.pump.common.defs.PumpType;
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin; import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin;
import info.nightscout.androidaps.utils.DateUtil; import info.nightscout.androidaps.utils.DateUtil;
@ -281,7 +283,10 @@ public class MDIPlugin extends PumpPluginBase implements PumpInterface {
@Override @Override
public void executeCustomAction(CustomActionType customActionType) { public void executeCustomAction(CustomActionType customActionType) {
}
@Nullable @Override public PumpEnactResult executeCustomCommand(CustomCommand customCommand) {
return null;
} }
@Override @Override

View file

@ -16,9 +16,9 @@ import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag import info.nightscout.androidaps.logging.LTag
import info.nightscout.androidaps.plugins.bus.RxBusWrapper import info.nightscout.androidaps.plugins.bus.RxBusWrapper
import info.nightscout.androidaps.plugins.common.ManufacturerType import info.nightscout.androidaps.plugins.common.ManufacturerType
import info.nightscout.androidaps.interfaces.ProfileFunction
import info.nightscout.androidaps.plugins.general.actions.defs.CustomAction import info.nightscout.androidaps.plugins.general.actions.defs.CustomAction
import info.nightscout.androidaps.plugins.general.actions.defs.CustomActionType import info.nightscout.androidaps.plugins.general.actions.defs.CustomActionType
import info.nightscout.androidaps.queue.commands.CustomCommand
import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification
import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress
import info.nightscout.androidaps.plugins.general.overview.notifications.Notification import info.nightscout.androidaps.plugins.general.overview.notifications.Notification
@ -133,6 +133,11 @@ class VirtualPumpPlugin @Inject constructor(
} }
override fun executeCustomAction(customActionType: CustomActionType) {} override fun executeCustomAction(customActionType: CustomActionType) {}
override fun executeCustomCommand(customCommand: CustomCommand?): PumpEnactResult? {
return null
}
override fun isInitialized(): Boolean { override fun isInitialized(): Boolean {
return true return true
} }

View file

@ -20,16 +20,16 @@ import info.nightscout.androidaps.events.EventProfileNeedsUpdate
import info.nightscout.androidaps.interfaces.ActivePluginProvider import info.nightscout.androidaps.interfaces.ActivePluginProvider
import info.nightscout.androidaps.interfaces.CommandQueueProvider import info.nightscout.androidaps.interfaces.CommandQueueProvider
import info.nightscout.androidaps.interfaces.Constraint import info.nightscout.androidaps.interfaces.Constraint
import info.nightscout.androidaps.interfaces.ProfileFunction
import info.nightscout.androidaps.logging.AAPSLogger import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag import info.nightscout.androidaps.logging.LTag
import info.nightscout.androidaps.plugins.bus.RxBusWrapper import info.nightscout.androidaps.plugins.bus.RxBusWrapper
import info.nightscout.androidaps.plugins.configBuilder.ConstraintChecker import info.nightscout.androidaps.plugins.configBuilder.ConstraintChecker
import info.nightscout.androidaps.interfaces.ProfileFunction import info.nightscout.androidaps.queue.commands.CustomCommand
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.EventDismissNotification
import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification
import info.nightscout.androidaps.plugins.general.overview.notifications.Notification import info.nightscout.androidaps.plugins.general.overview.notifications.Notification
import info.nightscout.androidaps.queue.commands.Command
import info.nightscout.androidaps.queue.commands.* import info.nightscout.androidaps.queue.commands.*
import info.nightscout.androidaps.queue.commands.Command.CommandType import info.nightscout.androidaps.queue.commands.Command.CommandType
import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.FabricPrivacy
@ -485,6 +485,55 @@ class CommandQueue @Inject constructor(
return true return true
} }
override fun customCommand(customCommand: CustomCommand, callback: Callback?): Boolean {
if (isCustomCommandInQueue(customCommand.javaClass)) {
callback?.result(executingNowError())?.run()
return false
}
// remove all unfinished
removeAllCustomCommands(customCommand.javaClass)
// add new command to queue
add(CommandCustomCommand(injector, customCommand, callback))
notifyAboutNewCommand()
return true
}
@Synchronized
override fun isCustomCommandInQueue(customCommandType: Class<out CustomCommand>): Boolean {
if(isCustomCommandRunning(customCommandType)) {
return true
}
synchronized(queue) {
for (i in queue.indices) {
val command = queue[i]
if (command is CommandCustomCommand && customCommandType.isInstance(command.customCommand)) {
return true
}
}
}
return false
}
override fun isCustomCommandRunning(customCommandType: Class<out CustomCommand>): Boolean {
val performing = this.performing
if (performing is CommandCustomCommand && customCommandType.isInstance(performing.customCommand)) {
return true
}
return false
}
@Synchronized
private fun removeAllCustomCommands(targetType: Class<out CustomCommand>) {
synchronized(queue) {
for (i in queue.indices.reversed()) {
val command = queue[i]
if (command is CustomCommand && targetType.isInstance(command.commandType)) {
queue.removeAt(i)
}
}
}
}
override fun spannedStatus(): Spanned { override fun spannedStatus(): Spanned {
var s = "" var s = ""
var line = 0 var line = 0

View file

@ -0,0 +1,26 @@
package info.nightscout.androidaps.queue.commands
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.interfaces.ActivePluginProvider
import info.nightscout.androidaps.logging.LTag
import info.nightscout.androidaps.queue.Callback
import javax.inject.Inject
class CommandCustomCommand(
injector: HasAndroidInjector,
val customCommand: CustomCommand,
callback: Callback?
) : Command(injector, CommandType.CUSTOM_COMMAND, callback) {
@Inject lateinit var activePlugin: ActivePluginProvider
override fun execute() {
val result = activePlugin.activePump.executeCustomCommand(customCommand)
aapsLogger.debug(LTag.PUMPQUEUE, "Result success: ${result?.success} enacted: ${result?.enacted}")
callback?.result(result)?.run()
}
override fun status(): String {
return customCommand.statusDescription
}
}

View file

@ -2,8 +2,6 @@ package info.nightscout.androidaps.queue.commands
import dagger.android.HasAndroidInjector import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.interfaces.ActivePluginProvider import info.nightscout.androidaps.interfaces.ActivePluginProvider
import info.nightscout.androidaps.interfaces.ProfileFunction
import info.nightscout.androidaps.plugins.pump.common.defs.PumpType
import info.nightscout.androidaps.plugins.pump.insight.LocalInsightPlugin import info.nightscout.androidaps.plugins.pump.insight.LocalInsightPlugin
import info.nightscout.androidaps.queue.Callback import info.nightscout.androidaps.queue.Callback
import javax.inject.Inject import javax.inject.Inject
@ -14,17 +12,12 @@ class CommandStartPump(
) : Command(injector, CommandType.START_PUMP, callback) { ) : Command(injector, CommandType.START_PUMP, callback) {
@Inject lateinit var activePlugin: ActivePluginProvider @Inject lateinit var activePlugin: ActivePluginProvider
@Inject lateinit var profileFunction: ProfileFunction
override fun execute() { override fun execute() {
val pump = activePlugin.activePump val pump = activePlugin.activePump
if (pump is LocalInsightPlugin) { if (pump is LocalInsightPlugin) {
val result = pump.startPump() val result = pump.startPump()
callback?.result(result)?.run() callback?.result(result)?.run()
} else if (pump.pumpDescription.pumpType == PumpType.Insulet_Omnipod) {
// When using CommandQueue.setProfile, it refuses to set the profile is the same as the current profile
// However we need to set the current profile to resume delivery in case the Pod is suspended
pump.setNewBasalProfile(profileFunction.getProfile())
} }
} }

View file

@ -655,7 +655,7 @@
<string name="apssetup">Konfigureer APS plugin</string> <string name="apssetup">Konfigureer APS plugin</string>
<string name="sensitivitysetup">Konfigureer Sensitiwiteits plugin</string> <string name="sensitivitysetup">Konfigureer Sensitiwiteits plugin</string>
<string name="setupwizard_sensitivity_description">Sensitiwiteit plugin vir sensitiwiteit opsporing en KAB berekening. Vir meer inligting besoek:</string> <string name="setupwizard_sensitivity_description">Sensitiwiteit plugin vir sensitiwiteit opsporing en KAB berekening. Vir meer inligting besoek:</string>
<string name="setupwizard_sensitivity_url">https://github.com/MilosKozak/AndroidAPS/wiki/Sensitivity-detection-and-COB</string> <string name="setupwizard_sensitivity_url">https://androidaps.readthedocs.io/en/latest/EN/Configuration/Sensitivity-detection-and-COB.html</string>
<string name="diawarning">Onthou asseblief: dat nuwe insulien profiele vereis DIA van minstens 5h. DIA 5 6h op nuwe profiel is gelyk aan DIA 3h op ou insulien profiele.</string> <string name="diawarning">Onthou asseblief: dat nuwe insulien profiele vereis DIA van minstens 5h. DIA 5 6h op nuwe profiel is gelyk aan DIA 3h op ou insulien profiele.</string>
<string name="bgsourcesetup">Konfigureer BG bron</string> <string name="bgsourcesetup">Konfigureer BG bron</string>
<string name="setupwizard_profile_description">Kies asseblief bron van profiel. As Pasiënt \'n kind is gebruik NS profiel. As niemand jou volg op Nightscout sal jy waarskynlik plaaslike profiel kies. Onthou asseblief dat jy net die bron kies van profiel. Om dit te gebruik moet jy dit aktiveer deur uitvoering \"Profiel skakelaar\"</string> <string name="setupwizard_profile_description">Kies asseblief bron van profiel. As Pasiënt \'n kind is gebruik NS profiel. As niemand jou volg op Nightscout sal jy waarskynlik plaaslike profiel kies. Onthou asseblief dat jy net die bron kies van profiel. Om dit te gebruik moet jy dit aktiveer deur uitvoering \"Profiel skakelaar\"</string>

View file

@ -174,6 +174,9 @@
<string name="preferences_import_canceled">Импорт неуспешен! Настройките не са импортирани!</string> <string name="preferences_import_canceled">Импорт неуспешен! Настройките не са импортирани!</string>
<string name="preferences_import_impossible">Импортирането неуспешно!</string> <string name="preferences_import_impossible">Импортирането неуспешно!</string>
<string name="goto_main_try_again">Моля, върнете се на началния екран и опитайте отново.</string> <string name="goto_main_try_again">Моля, върнете се на началния екран и опитайте отново.</string>
<string name="old_master_password">Стара главна парола</string>
<string name="different_password_used">Този файл е експортиран и шифрован с различна главна парола. Използвайте старата главна парола за декриптиране на файла.</string>
<string name="master_password_will_be_replaced">Вашата главна парола ЩЕ БЪДЕ ПОДМЕНЕНА с друга от импортирания файл!</string>
<string name="preferences_import_list_title">Изберете файл</string> <string name="preferences_import_list_title">Изберете файл</string>
<string name="check_preferences_before_import">Моля, проверете насстройките преди импортирането:</string> <string name="check_preferences_before_import">Моля, проверете насстройките преди импортирането:</string>
<string name="check_preferences_cannot_import">Настройите не могат да бъдат импортирани!</string> <string name="check_preferences_cannot_import">Настройите не могат да бъдат импортирани!</string>
@ -1134,10 +1137,15 @@
<string name="loop_tbrexecution_time_label">Продължителност на временни базали</string> <string name="loop_tbrexecution_time_label">Продължителност на временни базали</string>
<string name="insight_alert_notification_channel">Информация за Insight Pump</string> <string name="insight_alert_notification_channel">Информация за Insight Pump</string>
<!-- SMS Communicator & OTP Authenticator --> <!-- SMS Communicator & OTP Authenticator -->
<string name="smscommunicator_code_from_authenticator_for" comment="This is continuation of sentence: To [ACTION] reply with code">от приложението AUTHENTICATOR за: %1$s , последвано от PIN</string>
<string name="smscommunicator_otp_enabled">Активиране на удостоверител</string> <string name="smscommunicator_otp_enabled">Активиране на удостоверител</string>
<string name="smscommunicator_otp_enabled_summary">Удостоверяване чрез еднократна парола, генерирана с Google Authenticator или подобна програма за 2-факторна оторизация.</string> <string name="smscommunicator_otp_enabled_summary">Удостоверяване чрез еднократна парола, генерирана с Google Authenticator или подобна програма за 2-факторна оторизация.</string>
<string name="smscommunicator_otp_pin">Допълнителен PIN в края на токен</string>
<string name="smscommunicator_otp_pin_summary">Допълнителни цифри, които следва да бъдат залепени в края на всяка генерирана еднократна парола</string> <string name="smscommunicator_otp_pin_summary">Допълнителни цифри, които следва да бъдат залепени в края на всяка генерирана еднократна парола</string>
<string name="smscomunicator_tab_otp_label">Настройка на удостоверителя</string> <string name="smscomunicator_tab_otp_label">Настройка на удостоверителя</string>
<string name="smscommunicator_code_verify_label">Код за проверка:</string>
<string name="smscommunicator_code_verify_hint">OTP + PIN</string>
<string name="smscommunicator_code_verify_info">Кодът за проверката се състои от 6 цифри, от приложението за аудиентикация (известно като OTP), следвани от 3 или повече цифри на задължителния PIN.</string>
<string name="smscommunicator_otp_verify_label">ОТР за проверка:</string> <string name="smscommunicator_otp_verify_label">ОТР за проверка:</string>
<string name="smscommunicator_otp_reset_btn">Нулиране на удостоверители</string> <string name="smscommunicator_otp_reset_btn">Нулиране на удостоверители</string>
<string name="smscommunicator_otp_reset_title">Нулиране на ключва</string> <string name="smscommunicator_otp_reset_title">Нулиране на ключва</string>
@ -1176,4 +1184,33 @@
<string name="formatwithweight">Възраст: %1$.0f Тегло: %2$.0f кг</string> <string name="formatwithweight">Възраст: %1$.0f Тегло: %2$.0f кг</string>
<string name="basalpctfromtdd_label">% от базата</string> <string name="basalpctfromtdd_label">% от базата</string>
<string name="dpvdefaultprofile">Профил по подразбиране</string> <string name="dpvdefaultprofile">Профил по подразбиране</string>
<string name="open_humans">Open Humans</string>
<string name="finishing_open_humans_setup">Довършване на Open Humans инсталация…</string>
<string name="this_may_take_a_while">Това може да отнеме време. Не изключвайте телефона или тази приставка.</string>
<string name="setup_finished">Настройката е завършена</string>
<string name="your_phone_will_upload_data">Телефонът ви скоро ще качва данни в \"Open Humans\".</string>
<string name="your_phone_is_upload_data">Телефонът ви качва данни в \"Open Humans\".</string>
<string name="setup_failed">Настройката е НЕУСПЕШНА</string>
<string name="there_was_an_error">Имаше грешка. Моля, опитайте се да влезете отново, за да продължите. Съжаляваме и ви благодарим!</string>
<string name="open_humans_terms">Това е отворен код, който ще копира данните ви в Open Humans. Ние не запазваме никакви права да споделяме вашите данни с трети страни без изричното ви разрешение. Данните, които проектът и приложението получават, се идентифицират чрез случаен идентификатор на потребител и ще бъдат надеждно предадени на Open Humans акаунт с вашето разрешение за този процес. Можете да спрете качването и да изтриете данните за качване по всяко време чрез www.openhumans.org.</string>
<string name="i_understand_and_agree">Разбирам и съм съгласен.</string>
<string name="login">Вход</string>
<string name="logout">Изход</string>
<string name="oh_logout_confirmation">Наистина ли искате да излезете и да спрете да дарявате данни на науката?</string>
<string name="project_member_id">Project Member ID: %s</string>
<string name="queue_size">Големина на опашката: %d</string>
<string name="terms_of_use">Условия за ползване</string>
<string name="not_logged_in">Не сте влезнали в профила си</string>
<string name="you_need_to_accept_the_of_use_first">Трябва да се съгласите с условията за ползване.</string>
<string name="successfully_logged_in">Успешно влизане</string>
<string name="setup_will_continue_in_background">Настройката ще бъде завършена във фонов режим. Благодаря, че дарявате данните.\n\nМоля, задръжте този плъгин и телефона ви включени, докато настройката да завърши.</string>
<string name="completing_login">Завършване на вход…</string>
<string name="donate_your_data_to_science">Дарете данните си на науката.</string>
<string name="open_humans_short">OH</string>
<string name="you_have_been_signed_out_of_open_humans">Излязохте от \"Open Humans\".</string>
<string name="click_here_to_sign_in_again_if_this_wasnt_on_purpose">Натиснете тук за да влезете отново, ако това не е било нарочно.</string>
<string name="only_upload_if_connected_to_wifi">Качване, само при свързано WiFi</string>
<string name="only_upload_if_charging">Качване само при зареждане</string>
<string name="worker_state">Статус: %s</string>
<string name="uploaded_data">Качени данни</string>
</resources> </resources>

View file

@ -1213,5 +1213,5 @@
<string name="only_upload_if_charging">Odeslat pouze při nabíjení</string> <string name="only_upload_if_charging">Odeslat pouze při nabíjení</string>
<string name="worker_state">Stav procesu: %s</string> <string name="worker_state">Stav procesu: %s</string>
<string name="uploaded_data">Odeslaná data</string> <string name="uploaded_data">Odeslaná data</string>
<string name="the_following_data_will_be_uploaded_to_your_open_humans_account">Následující data budou nahrána do vašeho účtu Open Humans: hodnoty glykémie, události péče (kromě poznámek), rozložené bolusy, přepnutí profilu, celkové denní dávky, dočasné bazály, nastavení, verze aplikace, model zařízení a rozměry obrazovky. Tajné nebo soukromé informace, jako je URL nebo API heslo vašeho Nightscoutu, nahrány nebudou.</string> <string name="the_following_data_will_be_uploaded_to_your_open_humans_account">Následující data budou nahrána do vašeho účtu Open Humans: hodnoty glykémie, bolusy, sacharidy, události péče (kromě poznámek), rozložené bolusy, přepnutí profilu, celkové denní dávky, dočasné bazály, nastavení, verze aplikace, model zařízení a rozměry obrazovky. Tajné nebo soukromé informace, jako je URL nebo API heslo vašeho Nightscoutu, nahrány nebudou.</string>
</resources> </resources>

View file

@ -1214,5 +1214,5 @@ Unerwartetes Verhalten.</string>
<string name="only_upload_if_charging">Nur beim Laden hochladen</string> <string name="only_upload_if_charging">Nur beim Laden hochladen</string>
<string name="worker_state">Worker State: %s</string> <string name="worker_state">Worker State: %s</string>
<string name="uploaded_data">Daten hochgeladen</string> <string name="uploaded_data">Daten hochgeladen</string>
<string name="the_following_data_will_be_uploaded_to_your_open_humans_account">Die folgenden Daten werden auf Dein Open Humans-Konto hochgeladen: Glukosewerte, Careportal-Ereignisse (außer Notizen), erweiterte Boli, Profilwechsel, Gesamttagesdosen, temporäre Basalwerte, Temporäre Ziele, Einstellungen, Anwendungsversion, Gerätemodell und Bildschirmabmessungen. Vertrauliche oder private Informationen wie z.B. Deine Nightscout-URL oder Dein API-Secret werden nicht hochgeladen.</string> <string name="the_following_data_will_be_uploaded_to_your_open_humans_account">Die folgenden Daten werden auf Dein Open Humans-Konto hochgeladen: Glukosewerte, Boli, Kohlenhydrate, Careportal-Ereignisse (außer Notizen), erweiterte Boli, Profilwechsel, Gesamttagesdosen, temporäre Basalwerte, Temporäre Ziele, Einstellungen, Anwendungsversion, Gerätemodell und Bildschirmabmessungen. Vertrauliche oder private Informationen wie z.B. Deine Nightscout-URL oder Dein API-Secret werden nicht hochgeladen.</string>
</resources> </resources>

View file

@ -1138,10 +1138,15 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
<string name="loop_tbrexecution_time_label">Heure d\'exécution basal temp</string> <string name="loop_tbrexecution_time_label">Heure d\'exécution basal temp</string>
<string name="insight_alert_notification_channel">Alertes Pompe Insight</string> <string name="insight_alert_notification_channel">Alertes Pompe Insight</string>
<!-- SMS Communicator & OTP Authenticator --> <!-- SMS Communicator & OTP Authenticator -->
<string name="smscommunicator_code_from_authenticator_for" comment="This is continuation of sentence: To [ACTION] reply with code">depuis l\'application Authenticator pour : %1$s suivie du code PIN</string>
<string name="smscommunicator_otp_enabled">Activer l\'Authentificateur</string> <string name="smscommunicator_otp_enabled">Activer l\'Authentificateur</string>
<string name="smscommunicator_otp_enabled_summary">Authentifier les commandes à l\'aide des mots de passe uniques (OTP) générés par Google Authenticator ou des applications 2FA similaires.</string> <string name="smscommunicator_otp_enabled_summary">Authentifier les commandes à l\'aide des mots de passe uniques (OTP) générés par Google Authenticator ou des applications 2FA similaires.</string>
<string name="smscommunicator_otp_pin">Code PIN obligatoire à la fin de l\'OTP</string>
<string name="smscommunicator_otp_pin_summary">Chiffres supplémentaires qui doivent être mémorisés et collés à la fin de chaque OTP généré</string> <string name="smscommunicator_otp_pin_summary">Chiffres supplémentaires qui doivent être mémorisés et collés à la fin de chaque OTP généré</string>
<string name="smscomunicator_tab_otp_label">Configuration de l\'Authentificateur</string> <string name="smscomunicator_tab_otp_label">Configuration de l\'Authentificateur</string>
<string name="smscommunicator_code_verify_label">Code à vérifier :</string>
<string name="smscommunicator_code_verify_hint">OTP + PIN</string>
<string name="smscommunicator_code_verify_info">Le code de vérification est composé de 6 chiffres affichés par l\'application Authenticator (appelée OTP) suivi du code PIN obligatoire constitué de 3 chiffres ou plus.</string>
<string name="smscommunicator_otp_verify_label">OTP à vérifier :</string> <string name="smscommunicator_otp_verify_label">OTP à vérifier :</string>
<string name="smscommunicator_otp_reset_btn">Réinitialiser les authentificateurs</string> <string name="smscommunicator_otp_reset_btn">Réinitialiser les authentificateurs</string>
<string name="smscommunicator_otp_reset_title">Réinitialiser la clé de l\'Authentificateur</string> <string name="smscommunicator_otp_reset_title">Réinitialiser la clé de l\'Authentificateur</string>
@ -1209,4 +1214,5 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
<string name="only_upload_if_charging">Ne télécharger que si en charge</string> <string name="only_upload_if_charging">Ne télécharger que si en charge</string>
<string name="worker_state">État du travail : %s</string> <string name="worker_state">État du travail : %s</string>
<string name="uploaded_data">Données transférées</string> <string name="uploaded_data">Données transférées</string>
<string name="the_following_data_will_be_uploaded_to_your_open_humans_account">Les données suivantes seront téléchargées sur votre compte Open Humans : glycémie, bolus, glucides, événements Careportal (sauf les notes), bolus étendus, changements de profil, doses quotidiennes totales, basales temporaires, cibles temporaires, préférences, version de l\'application, modèle de l\'appareil et dimensions de l\'écran. Les informations secrètes ou privées telles que votre URL Nightscout ou votre API secret ne seront pas téléchargés.</string>
</resources> </resources>

View file

@ -8,7 +8,7 @@
<string name="treatmentssafety_maxbolus_title">Max bolo consentito [U]</string> <string name="treatmentssafety_maxbolus_title">Max bolo consentito [U]</string>
<string name="treatmentssafety_maxcarbs_title">Max CHO consentiti [g]</string> <string name="treatmentssafety_maxcarbs_title">Max CHO consentiti [g]</string>
<string name="nav_preferences">Preferenze</string> <string name="nav_preferences">Preferenze</string>
<string name="nav_refreshtreatments">Ricarica trattamenti da NS</string> <string name="nav_refreshtreatments">Aggiorna trattamenti da NS</string>
<string name="nav_resetdb">Resetta database</string> <string name="nav_resetdb">Resetta database</string>
<string name="reset_db_confirm">Vuoi davvero resettare i database?</string> <string name="reset_db_confirm">Vuoi davvero resettare i database?</string>
<string name="nav_exit">Esci</string> <string name="nav_exit">Esci</string>
@ -178,7 +178,7 @@
<string name="different_password_used">Questo file è stato esportato e crittografato con una password master differente. Fornire la password master precedente per decrittare il file.</string> <string name="different_password_used">Questo file è stato esportato e crittografato con una password master differente. Fornire la password master precedente per decrittare il file.</string>
<string name="master_password_will_be_replaced">Come risultato dell\'importazione riuscita, la password master corrente VERRÀ SOSTITUITA con la password master precedente contenuta nel file importato!</string> <string name="master_password_will_be_replaced">Come risultato dell\'importazione riuscita, la password master corrente VERRÀ SOSTITUITA con la password master precedente contenuta nel file importato!</string>
<string name="preferences_import_list_title">Seleziona il file da importare</string> <string name="preferences_import_list_title">Seleziona il file da importare</string>
<string name="check_preferences_before_import">Verifica le preferenze prima dell\'importazione:</string> <string name="check_preferences_before_import">Controlla le preferenze prima dell\'importazione:</string>
<string name="check_preferences_cannot_import">Le preferenze non possono essere importate!</string> <string name="check_preferences_cannot_import">Le preferenze non possono essere importate!</string>
<string name="check_preferences_dangerous_import">Le preferenze non dovrebbero essere importate!</string> <string name="check_preferences_dangerous_import">Le preferenze non dovrebbero essere importate!</string>
<string name="check_preferences_details_btn">Descrivi i problemi importazione…</string> <string name="check_preferences_details_btn">Descrivi i problemi importazione…</string>
@ -337,7 +337,7 @@
<string name="openapsma_autosensdata_label">Dati autosens</string> <string name="openapsma_autosensdata_label">Dati autosens</string>
<string name="openapsma_scriptdebugdata_label">Script debug</string> <string name="openapsma_scriptdebugdata_label">Script debug</string>
<string name="openapsama_useautosens">Usa la funzione Autosens</string> <string name="openapsama_useautosens">Usa la funzione Autosens</string>
<string name="refresheventsfromnightscout">Ricarica eventi da NS</string> <string name="refresheventsfromnightscout">Aggiorna eventi da NS</string>
<string name="deletefuturetreatments">Elimina trattamenti nel futuro</string> <string name="deletefuturetreatments">Elimina trattamenti nel futuro</string>
<string name="eatingsoon">Pasto a breve</string> <string name="eatingsoon">Pasto a breve</string>
<string name="hypo">Ipoglicemia</string> <string name="hypo">Ipoglicemia</string>
@ -603,7 +603,7 @@
<string name="maxiobset">Max IOB impostata correttamente</string> <string name="maxiobset">Max IOB impostata correttamente</string>
<string name="hasbgdata">BG disponibile da sorgente selezionata</string> <string name="hasbgdata">BG disponibile da sorgente selezionata</string>
<string name="combo_programming_bolus">Programmazione micro per erogazione</string> <string name="combo_programming_bolus">Programmazione micro per erogazione</string>
<string name="combo_refresh">Ricarica</string> <string name="combo_refresh">Aggiorna</string>
<string name="combo_pump_state_label">Stato</string> <string name="combo_pump_state_label">Stato</string>
<string name="combo_pump_activity_label">Attività</string> <string name="combo_pump_activity_label">Attività</string>
<string name="combo_no_pump_connection">Nessuna connessione per %1$d min</string> <string name="combo_no_pump_connection">Nessuna connessione per %1$d min</string>
@ -635,7 +635,7 @@
<string name="combo_error_no_connection_no_bolus_delivered">Il micro potrebbe non essere raggiungibile. Nessun bolo erogato</string> <string name="combo_error_no_connection_no_bolus_delivered">Il micro potrebbe non essere raggiungibile. Nessun bolo erogato</string>
<string name="combo_error_no_bolus_delivered">Erogazione bolo fallita. Sembra che nessun bolo sia stato erogato. Per sicurezza, controlla il micro per evitare un doppio bolo e se è tutto ok, erogalo di nuovo. Come protezione da eventuali \"bug\", i boli non vengono ripetuti automaticamente.</string> <string name="combo_error_no_bolus_delivered">Erogazione bolo fallita. Sembra che nessun bolo sia stato erogato. Per sicurezza, controlla il micro per evitare un doppio bolo e se è tutto ok, erogalo di nuovo. Come protezione da eventuali \"bug\", i boli non vengono ripetuti automaticamente.</string>
<string name="combo_error_partial_bolus_delivered">Solo la quantità di %1$.2f U del bolo richiesto di %2$.2f U è stata erogata a causa di un errore. Controlla il micro per verificare quanto accaduto e intraprendi le azioni necessarie.</string> <string name="combo_error_partial_bolus_delivered">Solo la quantità di %1$.2f U del bolo richiesto di %2$.2f U è stata erogata a causa di un errore. Controlla il micro per verificare quanto accaduto e intraprendi le azioni necessarie.</string>
<string name="combo_error_bolus_verification_failed">Erogazione del bolo e verifica dello storico del micro fallite. Controllare il micro. Se è stato erogato un bolo, sarà aggiunto ai trattamenti durante la successiva connessione al micro.</string> <string name="combo_error_bolus_verification_failed">Erogazione del bolo e verifica dello storico del micro fallite. Controlla il micro. Se è stato erogato un bolo, sarà aggiunto ai trattamenti durante la successiva connessione al micro.</string>
<string name="combo_reservoir_level_insufficient_for_bolus">Insulina nel serbatoio insufficiente per erogare il bolo</string> <string name="combo_reservoir_level_insufficient_for_bolus">Insulina nel serbatoio insufficiente per erogare il bolo</string>
<string name="extendedbolusdeliveryerror">Errore erogazione bolo esteso</string> <string name="extendedbolusdeliveryerror">Errore erogazione bolo esteso</string>
<string name="insightpump_shortname">Sight</string> <string name="insightpump_shortname">Sight</string>
@ -701,7 +701,7 @@
<string name="not_eng_mode_or_release">Engineering mode non abilitata e non su \'release branch\'</string> <string name="not_eng_mode_or_release">Engineering mode non abilitata e non su \'release branch\'</string>
<string name="combo_actvity_reading_basal_profile">Lettura profilo basale</string> <string name="combo_actvity_reading_basal_profile">Lettura profilo basale</string>
<string name="combo_bolus_rejected_due_to_pump_history_change">Lo storico del micro è cambiato dopo il calcolo del bolo. Il bolo non è stato erogato. Ricalcolare se un bolo è ancora necessario.</string> <string name="combo_bolus_rejected_due_to_pump_history_change">Lo storico del micro è cambiato dopo il calcolo del bolo. Il bolo non è stato erogato. Ricalcolare se un bolo è ancora necessario.</string>
<string name="combo_error_updating_treatment_record">Bolo erogato con successo, ma non è possibile aggiungere la voce ai trattamenti. Questo può accadere se due piccoli boli della stessa quantità sono stati somministrati negli ultimi due minuti. Verifica lo storico del micro e le voci della sezione Trattamenti e utilizza la sezione Portale per aggiungere eventuali voci mancanti. Assicurati di non aggiungere voci che si riferiscano al medesimo minuto e alla stessa quantità.</string> <string name="combo_error_updating_treatment_record">Bolo erogato con successo, ma non è possibile aggiungere la voce ai trattamenti. Questo può accadere se due piccoli boli della stessa quantità sono stati somministrati negli ultimi due minuti. Controlla lo storico del micro e le voci della sezione Trattamenti e utilizza la sezione Portale per aggiungere eventuali voci mancanti. Assicurati di non aggiungere voci che si riferiscano al medesimo minuto e alla stessa quantità.</string>
<string name="combo_high_temp_rejected_due_to_pump_history_changes">Rifiuto basale temporanea \"alta\" in quanto il calcolo non ha considerato i cambiamenti recenti allo storico del micro</string> <string name="combo_high_temp_rejected_due_to_pump_history_changes">Rifiuto basale temporanea \"alta\" in quanto il calcolo non ha considerato i cambiamenti recenti allo storico del micro</string>
<string name="combo_activity_checking_pump_state">Aggiornamento stato micro</string> <string name="combo_activity_checking_pump_state">Aggiornamento stato micro</string>
<string name="combo_warning_pump_basal_rate_changed">La velocità basale sul micro è cambiata e verrà aggiornata a breve</string> <string name="combo_warning_pump_basal_rate_changed">La velocità basale sul micro è cambiata e verrà aggiornata a breve</string>
@ -908,7 +908,7 @@
<string name="eb_formatter">%1$.2f / %2$.2f U per %3$d min</string> <string name="eb_formatter">%1$.2f / %2$.2f U per %3$d min</string>
<string name="enable_tbr_over_notification">Abilita notifica di fine TBR\n(impostazione micro)</string> <string name="enable_tbr_over_notification">Abilita notifica di fine TBR\n(impostazione micro)</string>
<string name="disable_tbr_over_notification">Disabilita notifica di fine TBR\n(impostazione micro)</string> <string name="disable_tbr_over_notification">Disabilita notifica di fine TBR\n(impostazione micro)</string>
<string name="refresh">Ricarica</string> <string name="refresh">Aggiorna</string>
<string name="description_pump_insight_local">Integrazione del microinfusore Accu-Chek Insight</string> <string name="description_pump_insight_local">Integrazione del microinfusore Accu-Chek Insight</string>
<string name="not_inserted">Non inserito</string> <string name="not_inserted">Non inserito</string>
<string name="short_status_last_connected">Ultima conn: %1$d min fa</string> <string name="short_status_last_connected">Ultima conn: %1$d min fa</string>
@ -1143,6 +1143,7 @@
<string name="smscommunicator_otp_pin">PIN obbligatorio aggiuntivo a fine token</string> <string name="smscommunicator_otp_pin">PIN obbligatorio aggiuntivo a fine token</string>
<string name="smscommunicator_otp_pin_summary">Cifre aggiuntive che devono essere memorizzate e incollate alla fine di ogni OTP generata</string> <string name="smscommunicator_otp_pin_summary">Cifre aggiuntive che devono essere memorizzate e incollate alla fine di ogni OTP generata</string>
<string name="smscomunicator_tab_otp_label">Configurazione autenticatore</string> <string name="smscomunicator_tab_otp_label">Configurazione autenticatore</string>
<string name="smscommunicator_code_verify_label">Codice controllo:</string>
<string name="smscommunicator_code_verify_hint">OTP + PIN</string> <string name="smscommunicator_code_verify_hint">OTP + PIN</string>
<string name="smscommunicator_code_verify_info">Il codice di verifica è composto da 6 cifre visualizzate dall\'app autenticatore (note come OTP) seguite da 3 o più cifre del PIN obbligatorio.</string> <string name="smscommunicator_code_verify_info">Il codice di verifica è composto da 6 cifre visualizzate dall\'app autenticatore (note come OTP) seguite da 3 o più cifre del PIN obbligatorio.</string>
<string name="smscommunicator_otp_verify_label">OTP per verifica:</string> <string name="smscommunicator_otp_verify_label">OTP per verifica:</string>
@ -1212,5 +1213,5 @@
<string name="only_upload_if_charging">Upload solo se in carica</string> <string name="only_upload_if_charging">Upload solo se in carica</string>
<string name="worker_state">Worker State: %s</string> <string name="worker_state">Worker State: %s</string>
<string name="uploaded_data">Dati caricati</string> <string name="uploaded_data">Dati caricati</string>
<string name="the_following_data_will_be_uploaded_to_your_open_humans_account">I seguenti dati verranno caricati sul tuo account Open Humans: valori glicemia, eventi portale (eccetto note), boli estesi, cambi profilo, dosi giornaliere totali (TDD), basali temporanee, target temporanei, preferenze, versione dell\'applicazione, modello del dispositivo e dimensioni dello schermo. Informazioni segrete o private come l\'URL di Nightscout o l\'API secret non verranno caricate.</string> <string name="the_following_data_will_be_uploaded_to_your_open_humans_account">I seguenti dati verranno caricati sul tuo account Open Humans: valori glicemia, boli, carboidrati, eventi portale (eccetto note), boli estesi, cambi profilo, dosi giornaliere totali (TDD), basali temporanee, target temporanei, preferenze, versione dell\'applicazione, modello del dispositivo e dimensioni dello schermo. Informazioni segrete o private come l\'URL di Nightscout o l\'API secret non verranno caricate.</string>
</resources> </resources>

View file

@ -1213,5 +1213,4 @@
<string name="only_upload_if_charging">Įkelti tik akumuliatoriaus įkrovimo metu</string> <string name="only_upload_if_charging">Įkelti tik akumuliatoriaus įkrovimo metu</string>
<string name="worker_state">Darbinė Būklė: %s</string> <string name="worker_state">Darbinė Būklė: %s</string>
<string name="uploaded_data">Įkelti duomenis</string> <string name="uploaded_data">Įkelti duomenis</string>
<string name="the_following_data_will_be_uploaded_to_your_open_humans_account">Į jūsų Open Humans paskyrą bus įkelti šie duomenys: glikemijos reikšmės, priežiūros portalo įvykiai (išskyrus pastabas), ištęstiniai bolusai, profilio pakeitimai, visos paros dozės, laikinos valandinės bazės, laikini tikslai, nustatymai, programos versija, įrenginio modelis ir ekrano matmenys. Konfidenciali ar privati informacija, pvz., Jūsų Nightscout URL arba API slaptažodis, nebus įkelta.</string>
</resources> </resources>

View file

@ -1139,10 +1139,15 @@ Context | Edit Context</string>
<string name="loop_tbrexecution_time_label">Время выполнения временной базальной скорости</string> <string name="loop_tbrexecution_time_label">Время выполнения временной базальной скорости</string>
<string name="insight_alert_notification_channel">Оповещения помпы Insight</string> <string name="insight_alert_notification_channel">Оповещения помпы Insight</string>
<!-- SMS Communicator & OTP Authenticator --> <!-- SMS Communicator & OTP Authenticator -->
<string name="smscommunicator_code_from_authenticator_for" comment="This is continuation of sentence: To [ACTION] reply with code">из приложения Authenticator для %1$s и дополните пином в конце</string>
<string name="smscommunicator_otp_enabled">Включить аутентификатор</string> <string name="smscommunicator_otp_enabled">Включить аутентификатор</string>
<string name="smscommunicator_otp_enabled_summary">Аутентифицировать команды с помощью одноразовых паролей, сгенерированных Google Authenticator или похожими приложениями 2FA.</string> <string name="smscommunicator_otp_enabled_summary">Аутентифицировать команды с помощью одноразовых паролей, сгенерированных Google Authenticator или похожими приложениями 2FA.</string>
<string name="smscommunicator_otp_pin">Дополнительный обязательный пин-код в конце маркера</string>
<string name="smscommunicator_otp_pin_summary">Дополнительные цифры, которые должны быть запомнены и добавлены в конце каждого сгенерированного одноразового пароля</string> <string name="smscommunicator_otp_pin_summary">Дополнительные цифры, которые должны быть запомнены и добавлены в конце каждого сгенерированного одноразового пароля</string>
<string name="smscomunicator_tab_otp_label">Настройка аутентификации</string> <string name="smscomunicator_tab_otp_label">Настройка аутентификации</string>
<string name="smscommunicator_code_verify_label">Код для проверки:</string>
<string name="smscommunicator_code_verify_hint">OTP + ПИН-код</string>
<string name="smscommunicator_code_verify_info">Проверочный код состоит из 6 цифр, отображаемых приложением Authenticator (известным как OTP), за которым следует 3 или более цифр обязательного PIN-кода.</string>
<string name="smscommunicator_otp_verify_label">OTP для проверки:</string> <string name="smscommunicator_otp_verify_label">OTP для проверки:</string>
<string name="smscommunicator_otp_reset_btn">Сбросить аутентификаторы</string> <string name="smscommunicator_otp_reset_btn">Сбросить аутентификаторы</string>
<string name="smscommunicator_otp_reset_title">Сбросить ключ идентификации</string> <string name="smscommunicator_otp_reset_title">Сбросить ключ идентификации</string>

View file

@ -1213,5 +1213,4 @@
<string name="only_upload_if_charging">Odoslať iba pri nabíjaní</string> <string name="only_upload_if_charging">Odoslať iba pri nabíjaní</string>
<string name="worker_state">Stav procesu: %s</string> <string name="worker_state">Stav procesu: %s</string>
<string name="uploaded_data">Odoslané údaje</string> <string name="uploaded_data">Odoslané údaje</string>
<string name="the_following_data_will_be_uploaded_to_your_open_humans_account">Nasledujúce dáta budú nahrané na váš účet Open Humans: hodnoty glykémie, udalosti starostlivosti (okrem poznámok), rozložené bolusy, prepnutia profilu, celkové denné dávky, dočasné bazály, nastavenia, verzie aplikácie, model zariadenia a rozmery obrazovky. Tajné, alebo súkromné informácie, ako je URL, alebo API heslo vašeho Nightscoutu, nahrané nebudú.</string>
</resources> </resources>

View file

@ -4,7 +4,7 @@
<!-- <string name="he_lang" translatable="false">Hebrew</string> --> <!-- <string name="he_lang" translatable="false">Hebrew</string> -->
<!-- <string name="ga_lang" translatable="false">Irish</string> --> <!-- <string name="ga_lang" translatable="false">Irish</string> -->
<!-- <string name="ja_lang" translatable="false">Japanese</string> --> <!-- <string name="ja_lang" translatable="false">Japanese</string> -->
<string name="treatmentssafety_title">Säkerhetsbegränsningar för behandlingar</string> <string name="treatmentssafety_title">Säkerhetsbegränsningar</string>
<string name="treatmentssafety_maxbolus_title">Max tillåten bolus [U]</string> <string name="treatmentssafety_maxbolus_title">Max tillåten bolus [U]</string>
<string name="treatmentssafety_maxcarbs_title">Max tillåtna KH [g]</string> <string name="treatmentssafety_maxcarbs_title">Max tillåtna KH [g]</string>
<string name="nav_preferences">Inställningar</string> <string name="nav_preferences">Inställningar</string>
@ -1138,10 +1138,15 @@ Eversense-appen.</string>
<string name="loop_tbrexecution_time_label">Basalförändring utförd</string> <string name="loop_tbrexecution_time_label">Basalförändring utförd</string>
<string name="insight_alert_notification_channel">Pumpvarningar Insight</string> <string name="insight_alert_notification_channel">Pumpvarningar Insight</string>
<!-- SMS Communicator & OTP Authenticator --> <!-- SMS Communicator & OTP Authenticator -->
<string name="smscommunicator_code_from_authenticator_for" comment="This is continuation of sentence: To [ACTION] reply with code">från autentiseringsapp för: %1$s följt av PIN-kod</string>
<string name="smscommunicator_otp_enabled">Aktivera autentiseraren</string> <string name="smscommunicator_otp_enabled">Aktivera autentiseraren</string>
<string name="smscommunicator_otp_enabled_summary">Autentisera kommandon med hjälp av engångslösenord som genererats av Google Authenticator eller liknande appar för tvåfaktorsautentisering.</string> <string name="smscommunicator_otp_enabled_summary">Autentisera kommandon med hjälp av engångslösenord som genererats av Google Authenticator eller liknande appar för tvåfaktorsautentisering.</string>
<string name="smscommunicator_otp_pin">PIN-kod som läggs till på slutet</string>
<string name="smscommunicator_otp_pin_summary">Ytterligare siffror som ska memoreras och läggas till i slutet av varje genererat engångslösenord</string> <string name="smscommunicator_otp_pin_summary">Ytterligare siffror som ska memoreras och läggas till i slutet av varje genererat engångslösenord</string>
<string name="smscomunicator_tab_otp_label">Konfiguration av tvåfaktorsautentisering</string> <string name="smscomunicator_tab_otp_label">Konfiguration av tvåfaktorsautentisering</string>
<string name="smscommunicator_code_verify_label">Kod att kontrollera:</string>
<string name="smscommunicator_code_verify_hint">OTP + PIN-kod</string>
<string name="smscommunicator_code_verify_info">Verifieringskoden består av sex siffror som visas av autentiseringsappen (känd som OTP) följt av 3 eller fler siffror som är en valbar PIN-kod.</string>
<string name="smscommunicator_otp_verify_label">Engångslösenord att kontrollera:</string> <string name="smscommunicator_otp_verify_label">Engångslösenord att kontrollera:</string>
<string name="smscommunicator_otp_reset_btn">Återställ autentiserare</string> <string name="smscommunicator_otp_reset_btn">Återställ autentiserare</string>
<string name="smscommunicator_otp_reset_title">Återställ autentiseringsnyckel</string> <string name="smscommunicator_otp_reset_title">Återställ autentiseringsnyckel</string>

View file

@ -1443,5 +1443,5 @@
<string name="only_upload_if_charging">Only upload if charging</string> <string name="only_upload_if_charging">Only upload if charging</string>
<string name="worker_state">Worker State: %s</string> <string name="worker_state">Worker State: %s</string>
<string name="uploaded_data">Uploaded Data</string> <string name="uploaded_data">Uploaded Data</string>
<string name="the_following_data_will_be_uploaded_to_your_open_humans_account">The following data will be uploaded to your Open Humans account: Glucose values, careportal events (except notes), extended boluses, profile switches, total daily doses, temporary basals, temp targets, preferences, application version, device model and screen dimensions. Secret or private information such as your Nightscout URL or API secret will not be uploaded.</string> <string name="the_following_data_will_be_uploaded_to_your_open_humans_account">The following data will be uploaded to your Open Humans account: Glucose values, boluses, carbs, careportal events (except notes), extended boluses, profile switches, total daily doses, temporary basals, temp targets, preferences, application version, device model and screen dimensions. Secret or private information such as your Nightscout URL or API secret will not be uploaded.</string>
</resources> </resources>

View file

@ -154,11 +154,12 @@ class ConstraintsCheckerTest : TestBaseWithProfile() {
`when`(sp.getString(R.string.key_aps_mode, "open")).thenReturn("closed") `when`(sp.getString(R.string.key_aps_mode, "open")).thenReturn("closed")
objectivesPlugin.objectives[ObjectivesPlugin.MAXIOB_ZERO_CL_OBJECTIVE].startedOn = 0 objectivesPlugin.objectives[ObjectivesPlugin.MAXIOB_ZERO_CL_OBJECTIVE].startedOn = 0
var c: Constraint<Boolean> = constraintChecker.isClosedLoopAllowed() var c: Constraint<Boolean> = constraintChecker.isClosedLoopAllowed()
Assert.assertEquals(true, c.reasonList.size == 2) // Safety & Objectives Assert.assertTrue(c.reasonList[0].toString().contains("Closed loop is disabled")) // Safety & Objectives
Assert.assertEquals(false, c.value()) Assert.assertEquals(false, c.value())
`when`(sp.getString(R.string.key_aps_mode, "open")).thenReturn("open") `when`(sp.getString(R.string.key_aps_mode, "open")).thenReturn("open")
c = constraintChecker.isClosedLoopAllowed() c = constraintChecker.isClosedLoopAllowed()
Assert.assertEquals(true, c.reasonList.size == 3) // 2x Safety & Objectives Assert.assertTrue(c.reasonList[0].toString().contains("Closed loop mode disabled in preferences")) // Safety & Objectives
Assert.assertEquals(3, c.reasonList.size) // 2x Safety & Objectives
Assert.assertEquals(false, c.value()) Assert.assertEquals(false, c.value())
} }

View file

@ -11,6 +11,7 @@ import info.nightscout.androidaps.interfaces.ActivePluginProvider
import info.nightscout.androidaps.interfaces.Constraint import info.nightscout.androidaps.interfaces.Constraint
import info.nightscout.androidaps.interfaces.PumpDescription import info.nightscout.androidaps.interfaces.PumpDescription
import info.nightscout.androidaps.plugins.configBuilder.ConstraintChecker import info.nightscout.androidaps.plugins.configBuilder.ConstraintChecker
import info.nightscout.androidaps.queue.commands.CustomCommand
import info.nightscout.androidaps.plugins.pump.virtual.VirtualPumpPlugin import info.nightscout.androidaps.plugins.pump.virtual.VirtualPumpPlugin
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin
import info.nightscout.androidaps.queue.commands.Command import info.nightscout.androidaps.queue.commands.Command
@ -192,4 +193,92 @@ class CommandQueueTest : TestBaseWithProfile() {
Assert.assertFalse(queued) Assert.assertFalse(queued)
Assert.assertEquals(commandQueue.size(), 0) Assert.assertEquals(commandQueue.size(), 0)
} }
@Test
fun isCustomCommandRunning() {
// given
Assert.assertEquals(0, commandQueue.size())
// when
val queued1 = commandQueue.customCommand(CustomCommand1(), null)
val queued2 = commandQueue.customCommand(CustomCommand2(), null)
commandQueue.pickup()
// then
Assert.assertTrue(queued1)
Assert.assertTrue(queued2)
Assert.assertTrue(commandQueue.isCustomCommandInQueue(CustomCommand1::class.java))
Assert.assertTrue(commandQueue.isCustomCommandInQueue(CustomCommand2::class.java))
Assert.assertFalse(commandQueue.isCustomCommandInQueue(CustomCommand3::class.java))
Assert.assertTrue(commandQueue.isCustomCommandRunning(CustomCommand1::class.java))
Assert.assertFalse(commandQueue.isCustomCommandRunning(CustomCommand2::class.java))
Assert.assertFalse(commandQueue.isCustomCommandRunning(CustomCommand3::class.java))
Assert.assertEquals(1, commandQueue.size())
}
@Test
fun isCustomCommandInQueue() {
// given
Assert.assertEquals(0, commandQueue.size())
// when
val queued1 = commandQueue.customCommand(CustomCommand1(), null)
val queued2 = commandQueue.customCommand(CustomCommand2(), null)
// then
Assert.assertTrue(queued1)
Assert.assertTrue(queued2)
Assert.assertTrue(commandQueue.isCustomCommandInQueue(CustomCommand1::class.java))
Assert.assertTrue(commandQueue.isCustomCommandInQueue(CustomCommand2::class.java))
Assert.assertFalse(commandQueue.isCustomCommandInQueue(CustomCommand3::class.java))
Assert.assertEquals(2, commandQueue.size())
}
@Test
fun differentCustomCommandsAllowed() {
// given
Assert.assertEquals(0, commandQueue.size())
// when
val queued1 = commandQueue.customCommand(CustomCommand1(), null)
val queued2 = commandQueue.customCommand(CustomCommand2(), null)
// then
Assert.assertTrue(queued1)
Assert.assertTrue(queued2)
Assert.assertEquals(2, commandQueue.size())
}
@Test
fun sameCustomCommandNotAllowed() {
// given
Assert.assertEquals(0, commandQueue.size())
// when
val queued1 = commandQueue.customCommand(CustomCommand1(), null)
val queued2 = commandQueue.customCommand(CustomCommand1(), null)
// then
Assert.assertTrue(queued1)
Assert.assertFalse(queued2)
Assert.assertEquals(1, commandQueue.size())
}
private class CustomCommand1 : CustomCommand {
override val statusDescription: String
get() = "CUSTOM COMMAND 1"
}
private class CustomCommand2 : CustomCommand {
override val statusDescription: String
get() = "CUSTOM COMMAND 2"
}
private class CustomCommand3 : CustomCommand {
override val statusDescription: String
get() = "CUSTOM COMMAND 3"
}
} }

2
codecov.yml Normal file
View file

@ -0,0 +1,2 @@
github_checks:
annotations: false

View file

@ -3,6 +3,7 @@ package info.nightscout.androidaps.interfaces
import android.text.Spanned import android.text.Spanned
import info.nightscout.androidaps.data.DetailedBolusInfo import info.nightscout.androidaps.data.DetailedBolusInfo
import info.nightscout.androidaps.data.Profile import info.nightscout.androidaps.data.Profile
import info.nightscout.androidaps.queue.commands.CustomCommand
import info.nightscout.androidaps.queue.Callback import info.nightscout.androidaps.queue.Callback
import info.nightscout.androidaps.queue.commands.Command import info.nightscout.androidaps.queue.commands.Command
@ -33,6 +34,9 @@ interface CommandQueueProvider {
fun setUserOptions(callback: Callback?): Boolean fun setUserOptions(callback: Callback?): Boolean
fun loadTDDs(callback: Callback?): Boolean fun loadTDDs(callback: Callback?): Boolean
fun loadEvents(callback: Callback?): Boolean fun loadEvents(callback: Callback?): Boolean
fun customCommand(customCommand: CustomCommand, callback: Callback?): Boolean
fun isCustomCommandRunning(customCommandType: Class<out CustomCommand>): Boolean
fun isCustomCommandInQueue(customCommandType: Class<out CustomCommand>): Boolean
fun spannedStatus(): Spanned fun spannedStatus(): Spanned
fun isThisProfileSet(profile: Profile): Boolean fun isThisProfileSet(profile: Profile): Boolean
} }

View file

@ -1,5 +1,7 @@
package info.nightscout.androidaps.interfaces; package info.nightscout.androidaps.interfaces;
import androidx.annotation.Nullable;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.json.JSONObject; import org.json.JSONObject;
@ -11,7 +13,9 @@ import info.nightscout.androidaps.data.PumpEnactResult;
import info.nightscout.androidaps.plugins.common.ManufacturerType; import info.nightscout.androidaps.plugins.common.ManufacturerType;
import info.nightscout.androidaps.plugins.general.actions.defs.CustomAction; import info.nightscout.androidaps.plugins.general.actions.defs.CustomAction;
import info.nightscout.androidaps.plugins.general.actions.defs.CustomActionType; import info.nightscout.androidaps.plugins.general.actions.defs.CustomActionType;
import info.nightscout.androidaps.queue.commands.CustomCommand;
import info.nightscout.androidaps.plugins.pump.common.defs.PumpType; import info.nightscout.androidaps.plugins.pump.common.defs.PumpType;
import info.nightscout.androidaps.queue.Callback;
import info.nightscout.androidaps.utils.TimeChangeType; import info.nightscout.androidaps.utils.TimeChangeType;
/** /**
@ -105,10 +109,32 @@ public interface PumpInterface {
boolean canHandleDST(); boolean canHandleDST();
/**
* Provides a list of custom actions to be displayed in the Actions tab.
* Plese note that these actions will not be queued upon execution
*
* @return list of custom actions
*/
@Nullable
List<CustomAction> getCustomActions(); List<CustomAction> getCustomActions();
/**
* Executes a custom action. Please note that these actions will not be queued
*
* @param customActionType action to be executed
*/
void executeCustomAction(CustomActionType customActionType); void executeCustomAction(CustomActionType customActionType);
/**
* Executes a custom queued command
* See {@link CommandQueueProvider#customCommand(CustomCommand, Callback)} for queuing a custom command.
*
* @param customCommand the custom command to be executed
* @return PumpEnactResult that represents the command execution result
*/
@Nullable
PumpEnactResult executeCustomCommand(CustomCommand customCommand);
/** /**
* This method will be called when time or Timezone changes, and pump driver can then do a specific action (for * This method will be called when time or Timezone changes, and pump driver can then do a specific action (for
* example update clock on pump). * example update clock on pump).

View file

@ -31,7 +31,8 @@ abstract class Command(
SET_USER_SETTINGS, // so far only Dana specific, SET_USER_SETTINGS, // so far only Dana specific,
START_PUMP, START_PUMP,
STOP_PUMP, STOP_PUMP,
INSIGHT_SET_TBR_OVER_ALARM // insight only INSIGHT_SET_TBR_OVER_ALARM, // insight only
CUSTOM_COMMAND
} }
init { init {

View file

@ -0,0 +1,16 @@
package info.nightscout.androidaps.queue.commands
import java.io.Serializable
/**
* Implement this interface for every custom pump command that you want to be able to queue
* See [info.nightscout.androidaps.interfaces.CommandQueueProvider.customCommand] for queuing a custom command.
*/
interface CustomCommand : Serializable {
/**
* @return short description of this command to be used in [info.nightscout.androidaps.queue.commands.Command.status]
* The description is typically all caps.
*/
val statusDescription: String
}

View file

@ -1,6 +1,7 @@
package info.nightscout.androidaps.danar; package info.nightscout.androidaps.danar;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import org.json.JSONException; import org.json.JSONException;
import org.json.JSONObject; import org.json.JSONObject;
@ -9,9 +10,9 @@ import java.util.Date;
import java.util.List; import java.util.List;
import dagger.android.HasAndroidInjector; import dagger.android.HasAndroidInjector;
import info.nightscout.androidaps.dana.DanaPumpInterface;
import info.nightscout.androidaps.dana.DanaFragment; import info.nightscout.androidaps.dana.DanaFragment;
import info.nightscout.androidaps.dana.DanaPump; import info.nightscout.androidaps.dana.DanaPump;
import info.nightscout.androidaps.dana.DanaPumpInterface;
import info.nightscout.androidaps.dana.comm.RecordTypes; import info.nightscout.androidaps.dana.comm.RecordTypes;
import info.nightscout.androidaps.danar.services.AbstractDanaRExecutionService; import info.nightscout.androidaps.danar.services.AbstractDanaRExecutionService;
import info.nightscout.androidaps.data.Profile; import info.nightscout.androidaps.data.Profile;
@ -37,6 +38,7 @@ import info.nightscout.androidaps.plugins.common.ManufacturerType;
import info.nightscout.androidaps.plugins.configBuilder.ConstraintChecker; import info.nightscout.androidaps.plugins.configBuilder.ConstraintChecker;
import info.nightscout.androidaps.plugins.general.actions.defs.CustomAction; import info.nightscout.androidaps.plugins.general.actions.defs.CustomAction;
import info.nightscout.androidaps.plugins.general.actions.defs.CustomActionType; import info.nightscout.androidaps.plugins.general.actions.defs.CustomActionType;
import info.nightscout.androidaps.queue.commands.CustomCommand;
import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification; 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.events.EventNewNotification;
import info.nightscout.androidaps.plugins.general.overview.notifications.Notification; import info.nightscout.androidaps.plugins.general.overview.notifications.Notification;
@ -511,7 +513,10 @@ public abstract class AbstractDanaRPlugin extends PumpPluginBase implements Pump
@Override @Override
public void executeCustomAction(CustomActionType customActionType) { public void executeCustomAction(CustomActionType customActionType) {
}
@Nullable @Override public PumpEnactResult executeCustomCommand(CustomCommand customCommand) {
return null;
} }
@Override @Override

View file

@ -26,6 +26,7 @@ import info.nightscout.androidaps.plugins.common.ManufacturerType
import info.nightscout.androidaps.plugins.configBuilder.ConstraintChecker import info.nightscout.androidaps.plugins.configBuilder.ConstraintChecker
import info.nightscout.androidaps.plugins.general.actions.defs.CustomAction import info.nightscout.androidaps.plugins.general.actions.defs.CustomAction
import info.nightscout.androidaps.plugins.general.actions.defs.CustomActionType import info.nightscout.androidaps.plugins.general.actions.defs.CustomActionType
import info.nightscout.androidaps.queue.commands.CustomCommand
import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification 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.events.EventNewNotification
import info.nightscout.androidaps.plugins.general.overview.notifications.Notification import info.nightscout.androidaps.plugins.general.overview.notifications.Notification
@ -658,6 +659,7 @@ class DanaRSPlugin @Inject constructor(
override fun loadTDDs(): PumpEnactResult = loadHistory(info.nightscout.androidaps.dana.comm.RecordTypes.RECORD_TYPE_DAILY) override fun loadTDDs(): PumpEnactResult = loadHistory(info.nightscout.androidaps.dana.comm.RecordTypes.RECORD_TYPE_DAILY)
override fun getCustomActions(): List<CustomAction>? = null override fun getCustomActions(): List<CustomAction>? = null
override fun executeCustomAction(customActionType: CustomActionType) {} override fun executeCustomAction(customActionType: CustomActionType) {}
override fun executeCustomCommand(customCommand: CustomCommand?): PumpEnactResult? = null
override fun canHandleDST(): Boolean = false override fun canHandleDST(): Boolean = false
override fun timezoneOrDSTChanged(timeChangeType: TimeChangeType?) {} override fun timezoneOrDSTChanged(timeChangeType: TimeChangeType?) {}
override fun clearPairing() { override fun clearPairing() {

View file

@ -48,6 +48,7 @@ import info.nightscout.androidaps.plugins.bus.RxBusWrapper;
import info.nightscout.androidaps.plugins.common.ManufacturerType; import info.nightscout.androidaps.plugins.common.ManufacturerType;
import info.nightscout.androidaps.plugins.general.actions.defs.CustomAction; import info.nightscout.androidaps.plugins.general.actions.defs.CustomAction;
import info.nightscout.androidaps.plugins.general.actions.defs.CustomActionType; import info.nightscout.androidaps.plugins.general.actions.defs.CustomActionType;
import info.nightscout.androidaps.queue.commands.CustomCommand;
import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification; import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification;
import info.nightscout.androidaps.plugins.general.overview.notifications.Notification; import info.nightscout.androidaps.plugins.general.overview.notifications.Notification;
import info.nightscout.androidaps.plugins.pump.common.PumpPluginAbstract; import info.nightscout.androidaps.plugins.pump.common.PumpPluginAbstract;
@ -1583,6 +1584,10 @@ public class MedtronicPumpPlugin extends PumpPluginAbstract implements PumpInter
} }
@Nullable @Override public PumpEnactResult executeCustomCommand(CustomCommand customCommand) {
return null;
}
@Override @Override
public void timezoneOrDSTChanged(TimeChangeType changeType) { public void timezoneOrDSTChanged(TimeChangeType changeType) {

View file

@ -13,13 +13,11 @@ import javax.inject.Inject;
import javax.inject.Singleton; import javax.inject.Singleton;
import info.nightscout.androidaps.logging.LTag; import info.nightscout.androidaps.logging.LTag;
import info.nightscout.androidaps.plugins.pump.common.data.PumpStatus;
import info.nightscout.androidaps.plugins.pump.common.defs.PumpDeviceState; import info.nightscout.androidaps.plugins.pump.common.defs.PumpDeviceState;
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkCommunicationManager; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkCommunicationManager;
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkConst; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkConst;
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RileyLinkCommunicationException; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RileyLinkCommunicationException;
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.RFSpyResponse; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.RFSpyResponse;
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.RLMessage;
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.RadioPacket; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.RadioPacket;
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.RadioResponse; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.RadioResponse;
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.defs.RLMessageType; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.defs.RLMessageType;
@ -56,7 +54,7 @@ import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil;
* functionality added. * functionality added.
*/ */
@Singleton @Singleton
public class MedtronicCommunicationManager extends RileyLinkCommunicationManager { public class MedtronicCommunicationManager extends RileyLinkCommunicationManager<PumpMessage> {
@Inject MedtronicPumpStatus medtronicPumpStatus; @Inject MedtronicPumpStatus medtronicPumpStatus;
@Inject MedtronicPumpPlugin medtronicPumpPlugin; @Inject MedtronicPumpPlugin medtronicPumpPlugin;
@ -75,7 +73,8 @@ public class MedtronicCommunicationManager extends RileyLinkCommunicationManager
// This empty constructor must be kept, otherwise dagger injection might break! // This empty constructor must be kept, otherwise dagger injection might break!
@Inject @Inject
public MedtronicCommunicationManager() {} public MedtronicCommunicationManager() {
}
@Inject @Inject
public void onInit() { public void onInit() {
@ -85,9 +84,8 @@ public class MedtronicCommunicationManager extends RileyLinkCommunicationManager
} }
@Override @Override
public RLMessage createResponseMessage(byte[] payload) { public PumpMessage createResponseMessage(byte[] payload) {
PumpMessage pumpMessage = new PumpMessage(aapsLogger, payload); return new PumpMessage(aapsLogger, payload);
return pumpMessage;
} }
@Override @Override
@ -170,7 +168,7 @@ public class MedtronicCommunicationManager extends RileyLinkCommunicationManager
if (radioResponse.isValid()) { if (radioResponse.isValid()) {
PumpMessage pumpResponse = (PumpMessage) createResponseMessage(radioResponse.getPayload()); PumpMessage pumpResponse = createResponseMessage(radioResponse.getPayload());
if (!pumpResponse.isValid()) { if (!pumpResponse.isValid()) {
aapsLogger.warn(LTag.PUMPCOMM, "Response is invalid ! [interrupted={}, timeout={}]", rfSpyResponse.wasInterrupted(), aapsLogger.warn(LTag.PUMPCOMM, "Response is invalid ! [interrupted={}, timeout={}]", rfSpyResponse.wasInterrupted(),
@ -545,14 +543,15 @@ public class MedtronicCommunicationManager extends RileyLinkCommunicationManager
} }
private PumpMessage sendAndListen(RLMessage msg) throws RileyLinkCommunicationException { private PumpMessage sendAndListen(PumpMessage msg) throws RileyLinkCommunicationException {
return sendAndListen(msg, 4000); // 2000 return sendAndListen(msg, 4000); // 2000
} }
// All pump communications go through this function. // All pump communications go through this function.
protected PumpMessage sendAndListen(RLMessage msg, int timeout_ms) throws RileyLinkCommunicationException { @Override
return (PumpMessage) super.sendAndListen(msg, timeout_ms); protected PumpMessage sendAndListen(PumpMessage msg, int timeout_ms) throws RileyLinkCommunicationException {
return super.sendAndListen(msg, timeout_ms);
} }

View file

@ -12,21 +12,16 @@ import android.os.SystemClock;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import org.jetbrains.annotations.NotNull;
import org.joda.time.DateTime; import org.joda.time.DateTime;
import org.joda.time.Duration; import org.joda.time.Duration;
import org.json.JSONException; import org.json.JSONException;
import org.json.JSONObject; import org.json.JSONObject;
import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.Date; import java.util.Date;
import java.util.EnumSet;
import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
import java.util.Optional; import java.util.Optional;
import java.util.Set;
import java.util.function.Supplier; import java.util.function.Supplier;
import javax.inject.Inject; import javax.inject.Inject;
@ -47,6 +42,7 @@ import info.nightscout.androidaps.interfaces.ActivePluginProvider;
import info.nightscout.androidaps.interfaces.CommandQueueProvider; import info.nightscout.androidaps.interfaces.CommandQueueProvider;
import info.nightscout.androidaps.interfaces.PluginDescription; import info.nightscout.androidaps.interfaces.PluginDescription;
import info.nightscout.androidaps.interfaces.PluginType; import info.nightscout.androidaps.interfaces.PluginType;
import info.nightscout.androidaps.interfaces.ProfileFunction;
import info.nightscout.androidaps.interfaces.PumpDescription; import info.nightscout.androidaps.interfaces.PumpDescription;
import info.nightscout.androidaps.interfaces.PumpInterface; import info.nightscout.androidaps.interfaces.PumpInterface;
import info.nightscout.androidaps.interfaces.PumpPluginBase; import info.nightscout.androidaps.interfaces.PumpPluginBase;
@ -56,7 +52,6 @@ import info.nightscout.androidaps.plugins.bus.RxBusWrapper;
import info.nightscout.androidaps.plugins.common.ManufacturerType; import info.nightscout.androidaps.plugins.common.ManufacturerType;
import info.nightscout.androidaps.plugins.general.actions.defs.CustomAction; import info.nightscout.androidaps.plugins.general.actions.defs.CustomAction;
import info.nightscout.androidaps.plugins.general.actions.defs.CustomActionType; import info.nightscout.androidaps.plugins.general.actions.defs.CustomActionType;
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.events.EventNewNotification;
import info.nightscout.androidaps.plugins.general.overview.notifications.Notification; import info.nightscout.androidaps.plugins.general.overview.notifications.Notification;
import info.nightscout.androidaps.plugins.pump.common.data.TempBasalPair; import info.nightscout.androidaps.plugins.pump.common.data.TempBasalPair;
@ -74,7 +69,6 @@ import info.nightscout.androidaps.plugins.pump.omnipod.data.ActiveBolus;
import info.nightscout.androidaps.plugins.pump.omnipod.data.RLHistoryItemOmnipod; import info.nightscout.androidaps.plugins.pump.omnipod.data.RLHistoryItemOmnipod;
import info.nightscout.androidaps.plugins.pump.omnipod.definition.OmnipodCommandType; import info.nightscout.androidaps.plugins.pump.omnipod.definition.OmnipodCommandType;
import info.nightscout.androidaps.plugins.pump.omnipod.definition.OmnipodCustomActionType; import info.nightscout.androidaps.plugins.pump.omnipod.definition.OmnipodCustomActionType;
import info.nightscout.androidaps.plugins.pump.omnipod.definition.OmnipodStatusRequestType;
import info.nightscout.androidaps.plugins.pump.omnipod.definition.OmnipodStorageKeys; import info.nightscout.androidaps.plugins.pump.omnipod.definition.OmnipodStorageKeys;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.action.service.ExpirationReminderBuilder; import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.action.service.ExpirationReminderBuilder;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.message.response.podinfo.PodInfoRecentPulseLog; import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.message.response.podinfo.PodInfoRecentPulseLog;
@ -84,10 +78,15 @@ import info.nightscout.androidaps.plugins.pump.omnipod.driver.manager.PodStateMa
import info.nightscout.androidaps.plugins.pump.omnipod.event.EventOmnipodPumpValuesChanged; import info.nightscout.androidaps.plugins.pump.omnipod.event.EventOmnipodPumpValuesChanged;
import info.nightscout.androidaps.plugins.pump.omnipod.event.EventOmnipodTbrChanged; import info.nightscout.androidaps.plugins.pump.omnipod.event.EventOmnipodTbrChanged;
import info.nightscout.androidaps.plugins.pump.omnipod.manager.AapsOmnipodManager; import info.nightscout.androidaps.plugins.pump.omnipod.manager.AapsOmnipodManager;
import info.nightscout.androidaps.plugins.pump.omnipod.queue.command.CommandHandleTimeChange;
import info.nightscout.androidaps.plugins.pump.omnipod.queue.command.CommandUpdateAlertConfiguration;
import info.nightscout.androidaps.plugins.pump.omnipod.queue.command.OmnipodCustomCommand;
import info.nightscout.androidaps.plugins.pump.omnipod.queue.command.OmnipodCustomCommandType;
import info.nightscout.androidaps.plugins.pump.omnipod.rileylink.service.RileyLinkOmnipodService; import info.nightscout.androidaps.plugins.pump.omnipod.rileylink.service.RileyLinkOmnipodService;
import info.nightscout.androidaps.plugins.pump.omnipod.ui.OmnipodFragment; import info.nightscout.androidaps.plugins.pump.omnipod.ui.OmnipodFragment;
import info.nightscout.androidaps.plugins.pump.omnipod.util.AapsOmnipodUtil; import info.nightscout.androidaps.plugins.pump.omnipod.util.AapsOmnipodUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.util.OmnipodAlertUtil; import info.nightscout.androidaps.plugins.pump.omnipod.util.OmnipodAlertUtil;
import info.nightscout.androidaps.queue.commands.CustomCommand;
import info.nightscout.androidaps.utils.DateUtil; import info.nightscout.androidaps.utils.DateUtil;
import info.nightscout.androidaps.utils.DecimalFormatter; import info.nightscout.androidaps.utils.DecimalFormatter;
import info.nightscout.androidaps.utils.FabricPrivacy; import info.nightscout.androidaps.utils.FabricPrivacy;
@ -107,6 +106,7 @@ import io.reactivex.schedulers.Schedulers;
public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface, RileyLinkPumpDevice { public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface, RileyLinkPumpDevice {
private static final long RILEY_LINK_CONNECT_TIMEOUT_MILLIS = 3 * 60 * 1000L; // 3 minutes private static final long RILEY_LINK_CONNECT_TIMEOUT_MILLIS = 3 * 60 * 1000L; // 3 minutes
private static final long STATUS_CHECK_INTERVAL_MILLIS = 60 * 1000L; // 1 minute private static final long STATUS_CHECK_INTERVAL_MILLIS = 60 * 1000L; // 1 minute
public static final int STARTUP_STATUS_REQUEST_TRIES = 2;
private final PodStateManager podStateManager; private final PodStateManager podStateManager;
private final RileyLinkServiceData rileyLinkServiceData; private final RileyLinkServiceData rileyLinkServiceData;
@ -115,6 +115,7 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface,
private final AapsOmnipodUtil aapsOmnipodUtil; private final AapsOmnipodUtil aapsOmnipodUtil;
private final RileyLinkUtil rileyLinkUtil; private final RileyLinkUtil rileyLinkUtil;
private final OmnipodAlertUtil omnipodAlertUtil; private final OmnipodAlertUtil omnipodAlertUtil;
private final ProfileFunction profileFunction;
private final AAPSLogger aapsLogger; private final AAPSLogger aapsLogger;
private final RxBusWrapper rxBus; private final RxBusWrapper rxBus;
private final ActivePluginProvider activePlugin; private final ActivePluginProvider activePlugin;
@ -127,8 +128,8 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface,
private final ServiceConnection serviceConnection; private final ServiceConnection serviceConnection;
private final PumpType pumpType = PumpType.Insulet_Omnipod; private final PumpType pumpType = PumpType.Insulet_Omnipod;
private final List<CustomAction> customActions = new ArrayList<>(); private final List<CustomAction> customActions = Collections.singletonList(new CustomAction(
private final Set<OmnipodStatusRequestType> statusRequests = Collections.synchronizedSet(EnumSet.noneOf(OmnipodStatusRequestType.class)); R.string.omnipod_custom_action_reset_rileylink, OmnipodCustomActionType.RESET_RILEY_LINK_CONFIGURATION, true));
private final CompositeDisposable disposables = new CompositeDisposable(); private final CompositeDisposable disposables = new CompositeDisposable();
// variables for handling statuses and history // variables for handling statuses and history
@ -139,12 +140,11 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface,
private boolean busy = false; private boolean busy = false;
private int timeChangeRetries; private int timeChangeRetries;
private long nextPodCheck; private long nextPodCheck;
private boolean sentIdToFirebase;
private long lastConnectionTimeMillis; private long lastConnectionTimeMillis;
private final Handler loopHandler = new Handler(Looper.getMainLooper()); private final Handler loopHandler = new Handler(Looper.getMainLooper());
private final Runnable statusChecker; private final Runnable statusChecker;
private OmnipodCommandType currentCommand; private boolean isCancelTempBasalRunning;
@Inject @Inject
public OmnipodPumpPlugin( public OmnipodPumpPlugin(
@ -164,7 +164,8 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface,
DateUtil dateUtil, DateUtil dateUtil,
AapsOmnipodUtil aapsOmnipodUtil, AapsOmnipodUtil aapsOmnipodUtil,
RileyLinkUtil rileyLinkUtil, RileyLinkUtil rileyLinkUtil,
OmnipodAlertUtil omnipodAlertUtil OmnipodAlertUtil omnipodAlertUtil,
ProfileFunction profileFunction
) { ) {
super(new PluginDescription() // super(new PluginDescription() //
.mainType(PluginType.PUMP) // .mainType(PluginType.PUMP) //
@ -189,12 +190,10 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface,
this.aapsOmnipodUtil = aapsOmnipodUtil; this.aapsOmnipodUtil = aapsOmnipodUtil;
this.rileyLinkUtil = rileyLinkUtil; this.rileyLinkUtil = rileyLinkUtil;
this.omnipodAlertUtil = omnipodAlertUtil; this.omnipodAlertUtil = omnipodAlertUtil;
this.profileFunction = profileFunction;
pumpDescription = new PumpDescription(pumpType); pumpDescription = new PumpDescription(pumpType);
customActions.add(new CustomAction(
R.string.omnipod_custom_action_reset_rileylink, OmnipodCustomActionType.RESET_RILEY_LINK_CONFIGURATION, true));
this.serviceConnection = new ServiceConnection() { this.serviceConnection = new ServiceConnection() {
@Override @Override
public void onServiceConnected(ComponentName name, IBinder service) { public void onServiceConnected(ComponentName name, IBinder service) {
@ -231,14 +230,11 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface,
aapsOmnipodManager.createSuspendedFakeTbrIfNotExists(); aapsOmnipodManager.createSuspendedFakeTbrIfNotExists();
} }
if (!getCommandQueue().statusInQueue()) { if (OmnipodPumpPlugin.this.hasTimeDateOrTimeZoneChanged) {
if (!OmnipodPumpPlugin.this.statusRequests.isEmpty()) { getCommandQueue().customCommand(new CommandHandleTimeChange(false), null);
getCommandQueue().readStatus("Status Refresh Requested", null);
} else if (OmnipodPumpPlugin.this.hasTimeDateOrTimeZoneChanged) {
getCommandQueue().readStatus("Date or Time Zone Changed", null);
} else if (!OmnipodPumpPlugin.this.verifyPodAlertConfiguration()) {
getCommandQueue().readStatus("Expiration Alerts Changed", null);
} }
if (!OmnipodPumpPlugin.this.verifyPodAlertConfiguration()) {
getCommandQueue().customCommand(new CommandUpdateAlertConfiguration(), null);
} }
doPodCheck(); doPodCheck();
@ -291,7 +287,7 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface,
event.isChanged(getResourceHelper(), R.string.key_omnipod_low_reservoir_alert_enabled) || event.isChanged(getResourceHelper(), R.string.key_omnipod_low_reservoir_alert_enabled) ||
event.isChanged(getResourceHelper(), R.string.key_omnipod_low_reservoir_alert_units)) { event.isChanged(getResourceHelper(), R.string.key_omnipod_low_reservoir_alert_units)) {
if (!verifyPodAlertConfiguration() && !getCommandQueue().statusInQueue()) { if (!verifyPodAlertConfiguration() && !getCommandQueue().statusInQueue()) {
getCommandQueue().readStatus("Expiration Alerts Changed", null); getCommandQueue().customCommand(new CommandUpdateAlertConfiguration(), null);
} }
} }
}, fabricPrivacy::logException) }, fabricPrivacy::logException)
@ -335,7 +331,7 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface,
// The pod is not running a TBR, while AAPS thinks it is // The pod is not running a TBR, while AAPS thinks it is
if (!podStateManager.isTempBasalRunning()) { if (!podStateManager.isTempBasalRunning()) {
// Only report TBR cancellations if they haven't been explicitly requested // Only report TBR cancellations if they haven't been explicitly requested
if (currentCommand != OmnipodCommandType.CANCEL_TEMPORARY_BASAL) { if (!isCancelTempBasalRunning) {
if (activePlugin.getActiveTreatments().isTempBasalInProgress() && !aapsOmnipodManager.hasSuspendedFakeTbr()) { if (activePlugin.getActiveTreatments().isTempBasalInProgress() && !aapsOmnipodManager.hasSuspendedFakeTbr()) {
aapsOmnipodManager.reportCancelledTbr(); aapsOmnipodManager.reportCancelledTbr();
} }
@ -361,13 +357,9 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface,
Notification notification = new Notification(Notification.OMNIPOD_POD_NOT_ATTACHED, resourceHelper.gs(R.string.omnipod_error_pod_not_attached), Notification.NORMAL); Notification notification = new Notification(Notification.OMNIPOD_POD_NOT_ATTACHED, resourceHelper.gs(R.string.omnipod_error_pod_not_attached), Notification.NORMAL);
rxBus.send(new EventNewNotification(notification)); rxBus.send(new EventNewNotification(notification));
} else { } else {
rxBus.send(new EventDismissNotification(Notification.OMNIPOD_POD_NOT_ATTACHED));
if (podStateManager.isSuspended()) { if (podStateManager.isSuspended()) {
Notification notification = new Notification(Notification.OMNIPOD_POD_SUSPENDED, resourceHelper.gs(R.string.omnipod_error_pod_suspended), Notification.NORMAL); Notification notification = new Notification(Notification.OMNIPOD_POD_SUSPENDED, resourceHelper.gs(R.string.omnipod_pod_suspended), Notification.NORMAL);
rxBus.send(new EventNewNotification(notification)); rxBus.send(new EventNewNotification(notification));
} else {
rxBus.send(new EventDismissNotification(Notification.OMNIPOD_POD_SUSPENDED));
} }
} }
@ -375,7 +367,6 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface,
} }
} }
// TODO is this correct?
@Override @Override
public boolean isInitialized() { public boolean isInitialized() {
return isConnected() && podStateManager.isPodActivationCompleted(); return isConnected() && podStateManager.isPodActivationCompleted();
@ -455,130 +446,23 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface,
lastConnectionTimeMillis = System.currentTimeMillis(); lastConnectionTimeMillis = System.currentTimeMillis();
} }
// We abuse getPumpStatus to squeeze commands in the queue /**
// The only actual status requests we send to the Pod are on startup (in initializeAfterRileyLinkConnection) * The only actual status requests we send to the Pod here are on startup (in {@link #initializeAfterRileyLinkConnection() initializeAfterRileyLinkConnection()})
// And when the user explicitly requested it by clicking the Refresh button on the Omnipod tab * And when the user explicitly requested it by clicking the Refresh button on the Omnipod tab (which is executed through {@link #executeCustomCommand(CustomCommand)})
// We don't do periodical status requests because that can drain the Pod's battery * We don't do periodical status requests because that could drain the Pod's battery
// However that should be fine because we get a StatusResponse from all insulin commands sent to the Pod */
@Override @Override
public void getPumpStatus() { public void getPumpStatus() {
if (firstRun) { if (firstRun) {
initializeAfterRileyLinkConnection(); initializeAfterRileyLinkConnection();
} else if (!statusRequests.isEmpty()) { firstRun = false;
synchronized (statusRequests) {
Iterator<OmnipodStatusRequestType> iterator = statusRequests.iterator();
while (iterator.hasNext()) {
OmnipodStatusRequestType statusRequest = iterator.next();
switch (statusRequest) {
case GET_PULSE_LOG:
try {
PodInfoRecentPulseLog result = executeCommand(OmnipodCommandType.GET_POD_PULSE_LOG, aapsOmnipodManager::readPulseLog);
Intent i = new Intent(context, ErrorHelperActivity.class);
i.putExtra("soundid", 0);
i.putExtra("status", "Pulse Log (copied to clipboard):\n" + result.toString());
i.putExtra("title", resourceHelper.gs(R.string.omnipod_warning));
i.putExtra("clipboardContent", result.toString());
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(i);
} catch (Exception ex) {
aapsLogger.warn(LTag.PUMP, "Failed to retrieve pulse log", ex);
Intent i = new Intent(context, ErrorHelperActivity.class);
i.putExtra("soundid", 0);
i.putExtra("status", "Failed to retrieve pulse log");
i.putExtra("title", resourceHelper.gs(R.string.omnipod_warning));
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(i);
}
break;
case ACKNOWLEDGE_ALERTS:
executeCommand(OmnipodCommandType.ACKNOWLEDGE_ALERTS, aapsOmnipodManager::acknowledgeAlerts);
break;
case GET_POD_STATE:
executeCommand(OmnipodCommandType.GET_POD_STATUS, aapsOmnipodManager::getPodStatus);
break;
case SUSPEND_DELIVERY:
executeCommand(OmnipodCommandType.SUSPEND_DELIVERY, aapsOmnipodManager::suspendDelivery);
break;
case SET_TIME:
executeCommand(OmnipodCommandType.SET_TIME, aapsOmnipodManager::setTime);
break;
default:
aapsLogger.error(LTag.PUMP, "Unknown status request: " + statusRequest.name());
}
iterator.remove();
}
}
} else if (this.hasTimeDateOrTimeZoneChanged) {
PumpEnactResult result;
if (aapsOmnipodManager.isTimeChangeEventEnabled()) {
result = executeCommand(OmnipodCommandType.SET_TIME, aapsOmnipodManager::setTime);
} else {
// Even if automatically changing the time is disabled, we still want to at least do a GetStatus request,
// in order to update the Pod's activation time, which we need for calculating the time on the Pod
result = executeCommand(OmnipodCommandType.GET_POD_STATUS, aapsOmnipodManager::getPodStatus);
}
if (result.success) {
this.hasTimeDateOrTimeZoneChanged = false;
timeChangeRetries = 0;
if (aapsOmnipodManager.isTimeChangeEventEnabled()) {
Notification notification = new Notification(
Notification.TIME_OR_TIMEZONE_CHANGE,
resourceHelper.gs(R.string.omnipod_time_or_timezone_change),
Notification.INFO, 60);
rxBus.send(new EventNewNotification(notification));
}
} else {
timeChangeRetries++;
if (timeChangeRetries > 3) {
if (aapsOmnipodManager.isTimeChangeEventEnabled()) {
Notification notification = new Notification(
Notification.TIME_OR_TIMEZONE_CHANGE,
resourceHelper.gs(R.string.omnipod_time_or_timezone_change_failed),
Notification.INFO, 60);
rxBus.send(new EventNewNotification(notification));
}
this.hasTimeDateOrTimeZoneChanged = false;
timeChangeRetries = 0;
}
}
} else if (!verifyPodAlertConfiguration()) {
Duration expirationReminderTimeBeforeShutdown = omnipodAlertUtil.getExpirationReminderTimeBeforeShutdown();
Integer lowReservoirAlertUnits = omnipodAlertUtil.getLowReservoirAlertUnits();
List<AlertConfiguration> alertConfigurations = new ExpirationReminderBuilder(podStateManager) //
.expirationAdvisory(expirationReminderTimeBeforeShutdown != null,
Optional.ofNullable(expirationReminderTimeBeforeShutdown).orElse(Duration.ZERO)) //
.lowReservoir(lowReservoirAlertUnits != null, Optional.ofNullable(lowReservoirAlertUnits).orElse(0)) //
.build();
PumpEnactResult result = executeCommand(OmnipodCommandType.CONFIGURE_ALERTS, () -> aapsOmnipodManager.configureAlerts(alertConfigurations));
if (result.success) {
aapsLogger.info(LTag.PUMP, "Successfully configured alerts in Pod");
podStateManager.setExpirationAlertTimeBeforeShutdown(expirationReminderTimeBeforeShutdown);
podStateManager.setLowReservoirAlertUnits(lowReservoirAlertUnits);
Notification notification = new Notification(
Notification.OMNIPOD_POD_ALERTS_UPDATED,
resourceHelper.gs(R.string.omnipod_expiration_alerts_updated),
Notification.INFO, 60);
rxBus.send(new EventNewNotification(notification));
} else {
aapsLogger.warn(LTag.PUMP, "Failed to configure alerts in Pod");
}
} }
} }
@NotNull @NonNull
@Override @Override
public PumpEnactResult setNewBasalProfile(Profile profile) { public PumpEnactResult setNewBasalProfile(Profile profile) {
PumpEnactResult result = executeCommand(OmnipodCommandType.SET_BASAL_PROFILE, () -> aapsOmnipodManager.setBasalProfile(profile)); PumpEnactResult result = executeCommand(OmnipodCommandType.SET_BASAL_PROFILE, () -> aapsOmnipodManager.setBasalProfile(profile, true));
aapsLogger.info(LTag.PUMP, "Basal Profile was set: " + result.success); aapsLogger.info(LTag.PUMP, "Basal Profile was set: " + result.success);
@ -597,7 +481,7 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface,
@Override @Override
public long lastDataTime() { public long lastDataTime() {
return podStateManager.isPodActivationCompleted() ? podStateManager.getLastSuccessfulCommunication().getMillis() : 0; return podStateManager.isPodInitialized() ? podStateManager.getLastSuccessfulCommunication().getMillis() : 0;
} }
@Override @Override
@ -652,7 +536,7 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface,
executeCommand(OmnipodCommandType.CANCEL_BOLUS, aapsOmnipodManager::cancelBolus); executeCommand(OmnipodCommandType.CANCEL_BOLUS, aapsOmnipodManager::cancelBolus);
} }
// if enforceNew===true current temp basal is cancelled and new TBR set (duration is prolonged), // if enforceNew is true, current temp basal is cancelled and new TBR set (duration is prolonged),
// if false and the same rate is requested enacted=false and success=true is returned and TBR is not changed // if false and the same rate is requested enacted=false and success=true is returned and TBR is not changed
@Override @Override
public PumpEnactResult setTempBasalAbsolute(Double absoluteRate, Integer public PumpEnactResult setTempBasalAbsolute(Double absoluteRate, Integer
@ -694,7 +578,12 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface,
return new PumpEnactResult(getInjector()).success(true).enacted(false); return new PumpEnactResult(getInjector()).success(true).enacted(false);
} }
isCancelTempBasalRunning = true;
try {
return executeCommand(OmnipodCommandType.CANCEL_TEMPORARY_BASAL, aapsOmnipodManager::cancelTemporaryBasal); return executeCommand(OmnipodCommandType.CANCEL_TEMPORARY_BASAL, aapsOmnipodManager::cancelTemporaryBasal);
} finally {
isCancelTempBasalRunning = false;
}
} }
// TODO improve (i8n and more) // TODO improve (i8n and more)
@ -753,12 +642,12 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface,
return pumpType.getManufacturer(); return pumpType.getManufacturer();
} }
@Override @NotNull @Override @NonNull
public PumpType model() { public PumpType model() {
return pumpType; return pumpType;
} }
@NotNull @NonNull
@Override @Override
public String serialNumber() { public String serialNumber() {
return podStateManager.isPodInitialized() ? String.valueOf(podStateManager.getAddress()) : "-"; return podStateManager.isPodInitialized() ? String.valueOf(podStateManager.getAddress()) : "-";
@ -813,18 +702,143 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface,
break; break;
default: default:
aapsLogger.warn(LTag.PUMP, "Unknown custom action: {}" + mcat); aapsLogger.warn(LTag.PUMP, "Unknown custom action: " + mcat);
break; break;
} }
} }
@Override
public PumpEnactResult executeCustomCommand(CustomCommand command) {
if (!(command instanceof OmnipodCustomCommand)) {
aapsLogger.warn(LTag.PUMP, "Unknown custom command: " + command.getClass().getName());
return new PumpEnactResult(getInjector()).success(false).enacted(false).comment(resourceHelper.gs(R.string.omnipod_error_unknown_custom_command, command.getClass().getName()));
}
OmnipodCustomCommandType commandType = ((OmnipodCustomCommand) command).getType();
aapsLogger.debug(LTag.PUMP, "Executing custom command: " + commandType);
switch (commandType) {
case ACKNOWLEDGE_ALERTS:
return executeCommand(OmnipodCommandType.ACKNOWLEDGE_ALERTS, aapsOmnipodManager::acknowledgeAlerts);
case GET_POD_STATUS:
return executeCommand(OmnipodCommandType.GET_POD_STATUS, aapsOmnipodManager::getPodStatus);
case READ_PULSE_LOG:
return retrievePulseLog();
case SUSPEND_DELIVERY:
return executeCommand(OmnipodCommandType.SUSPEND_DELIVERY, aapsOmnipodManager::suspendDelivery);
case RESUME_DELIVERY:
return executeCommand(OmnipodCommandType.RESUME_DELIVERY, () -> aapsOmnipodManager.setBasalProfile(profileFunction.getProfile(), false));
case HANDLE_TIME_CHANGE:
return handleTimeChange(((CommandHandleTimeChange) command).isRequestedByUser());
case UPDATE_ALERT_CONFIGURATION:
return updateAlertConfiguration();
default:
aapsLogger.warn(LTag.PUMP, "Unknown custom command: " + commandType);
return new PumpEnactResult(getInjector()).success(false).enacted(false).comment(resourceHelper.gs(R.string.omnipod_error_unknown_custom_command, commandType));
}
}
private PumpEnactResult retrievePulseLog() {
PodInfoRecentPulseLog result;
try {
result = executeCommand(OmnipodCommandType.READ_POD_PULSE_LOG, aapsOmnipodManager::readPulseLog);
} catch (Exception ex) {
return new PumpEnactResult(getInjector()).success(false).enacted(false).comment(aapsOmnipodManager.translateException(ex));
}
Intent i = new Intent(context, ErrorHelperActivity.class);
i.putExtra("soundid", 0);
i.putExtra("status", resourceHelper.gs(R.string.omnipod_pulse_log_value) + ":\n" + result.toString());
i.putExtra("title", resourceHelper.gs(R.string.omnipod_pulse_log));
i.putExtra("clipboardContent", result.toString());
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(i);
return new PumpEnactResult(getInjector()).success(true).enacted(false);
}
@NonNull private PumpEnactResult updateAlertConfiguration() {
Duration expirationReminderTimeBeforeShutdown = omnipodAlertUtil.getExpirationReminderTimeBeforeShutdown();
Integer lowReservoirAlertUnits = omnipodAlertUtil.getLowReservoirAlertUnits();
List<AlertConfiguration> alertConfigurations = new ExpirationReminderBuilder(podStateManager) //
.expirationAdvisory(expirationReminderTimeBeforeShutdown != null,
Optional.ofNullable(expirationReminderTimeBeforeShutdown).orElse(Duration.ZERO)) //
.lowReservoir(lowReservoirAlertUnits != null, Optional.ofNullable(lowReservoirAlertUnits).orElse(0)) //
.build();
PumpEnactResult result = executeCommand(OmnipodCommandType.CONFIGURE_ALERTS, () -> aapsOmnipodManager.configureAlerts(alertConfigurations));
if (result.success) {
aapsLogger.info(LTag.PUMP, "Successfully configured alerts in Pod");
podStateManager.setExpirationAlertTimeBeforeShutdown(expirationReminderTimeBeforeShutdown);
podStateManager.setLowReservoirAlertUnits(lowReservoirAlertUnits);
Notification notification = new Notification(
Notification.OMNIPOD_POD_ALERTS_UPDATED,
resourceHelper.gs(R.string.omnipod_confirmation_expiration_alerts_updated),
Notification.INFO, 60);
rxBus.send(new EventNewNotification(notification));
} else {
aapsLogger.warn(LTag.PUMP, "Failed to configure alerts in Pod");
}
return result;
}
@NonNull private PumpEnactResult handleTimeChange(boolean requestedByUser) {
aapsLogger.debug(LTag.PUMP, "Setting time, requestedByUser={}", requestedByUser);
PumpEnactResult result;
if (requestedByUser || aapsOmnipodManager.isTimeChangeEventEnabled()) {
result = executeCommand(OmnipodCommandType.SET_TIME, () -> aapsOmnipodManager.setTime(!requestedByUser));
} else {
// Even if automatically changing the time is disabled, we still want to at least do a GetStatus request,
// in order to update the Pod's activation time, which we need for calculating the time on the Pod
result = executeCommand(OmnipodCommandType.GET_POD_STATUS, aapsOmnipodManager::getPodStatus);
}
if (result.success) {
this.hasTimeDateOrTimeZoneChanged = false;
timeChangeRetries = 0;
if (!requestedByUser && aapsOmnipodManager.isTimeChangeEventEnabled()) {
Notification notification = new Notification(
Notification.TIME_OR_TIMEZONE_CHANGE,
resourceHelper.gs(R.string.omnipod_confirmation_time_or_timezone_change),
Notification.INFO, 60);
rxBus.send(new EventNewNotification(notification));
}
} else {
if (!requestedByUser) {
timeChangeRetries++;
if (timeChangeRetries > 3) {
if (aapsOmnipodManager.isTimeChangeEventEnabled()) {
Notification notification = new Notification(
Notification.TIME_OR_TIMEZONE_CHANGE,
resourceHelper.gs(R.string.omnipod_error_automatic_time_or_timezone_change_failed),
Notification.INFO, 60);
rxBus.send(new EventNewNotification(notification));
}
this.hasTimeDateOrTimeZoneChanged = false;
timeChangeRetries = 0;
}
}
}
return result;
}
@Override @Override
public void timezoneOrDSTChanged(TimeChangeType timeChangeType) { public void timezoneOrDSTChanged(TimeChangeType timeChangeType) {
aapsLogger.warn(LTag.PUMP, "Time, Date and/or TimeZone changed. [changeType=" + timeChangeType.name() + ", eventHandlingEnabled=" + aapsOmnipodManager.isTimeChangeEventEnabled() + "]"); aapsLogger.warn(LTag.PUMP, "Time, Date and/or TimeZone changed. [changeType=" + timeChangeType.name() + ", eventHandlingEnabled=" + aapsOmnipodManager.isTimeChangeEventEnabled() + "]");
if (podStateManager.isPodRunning()) { if (podStateManager.isPodRunning()) {
aapsLogger.info(LTag.PUMP, "Time, Date and/or TimeZone changed event received and will be consumed by driver."); aapsLogger.info(LTag.PUMP, "Time, Date and/or TimeZone changed event received and will be consumed by driver.");
this.hasTimeDateOrTimeZoneChanged = true; hasTimeDateOrTimeZoneChanged = true;
} }
} }
@ -853,10 +867,6 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface,
return false; return false;
} }
public void addPodStatusRequest(OmnipodStatusRequestType pumpStatusRequest) {
statusRequests.add(pumpStatusRequest);
}
@Override @Override
public boolean isFakingTempsByExtendedBoluses() { public boolean isFakingTempsByExtendedBoluses() {
return false; return false;
@ -887,54 +897,47 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface,
aapsLogger.debug(LTag.PUMP, "stopConnecting [PumpPluginAbstract] - default (empty) implementation."); aapsLogger.debug(LTag.PUMP, "stopConnecting [PumpPluginAbstract] - default (empty) implementation.");
} }
@NotNull @Override public PumpEnactResult setTempBasalPercent(Integer percent, Integer @NonNull @Override public PumpEnactResult setTempBasalPercent(Integer percent, Integer
durationInMinutes, Profile profile, boolean enforceNew) { durationInMinutes, Profile profile, boolean enforceNew) {
aapsLogger.debug(LTag.PUMP, "setTempBasalPercent [OmnipodPumpPlugin] - Not implemented."); aapsLogger.debug(LTag.PUMP, "setTempBasalPercent [OmnipodPumpPlugin] - Not implemented.");
return getOperationNotSupportedWithCustomText(info.nightscout.androidaps.core.R.string.pump_operation_not_supported_by_pump_driver); return getOperationNotSupportedWithCustomText(info.nightscout.androidaps.core.R.string.pump_operation_not_supported_by_pump_driver);
} }
@NotNull @Override public PumpEnactResult setExtendedBolus(Double insulin, Integer @NonNull @Override public PumpEnactResult setExtendedBolus(Double insulin, Integer
durationInMinutes) { durationInMinutes) {
aapsLogger.debug(LTag.PUMP, "setExtendedBolus [OmnipodPumpPlugin] - Not implemented."); aapsLogger.debug(LTag.PUMP, "setExtendedBolus [OmnipodPumpPlugin] - Not implemented.");
return getOperationNotSupportedWithCustomText(info.nightscout.androidaps.core.R.string.pump_operation_not_supported_by_pump_driver); return getOperationNotSupportedWithCustomText(info.nightscout.androidaps.core.R.string.pump_operation_not_supported_by_pump_driver);
} }
@NotNull @Override public PumpEnactResult cancelExtendedBolus() { @NonNull @Override public PumpEnactResult cancelExtendedBolus() {
aapsLogger.debug(LTag.PUMP, "cancelExtendedBolus [OmnipodPumpPlugin] - Not implemented."); aapsLogger.debug(LTag.PUMP, "cancelExtendedBolus [OmnipodPumpPlugin] - Not implemented.");
return getOperationNotSupportedWithCustomText(info.nightscout.androidaps.core.R.string.pump_operation_not_supported_by_pump_driver); return getOperationNotSupportedWithCustomText(info.nightscout.androidaps.core.R.string.pump_operation_not_supported_by_pump_driver);
} }
@NotNull @Override public PumpEnactResult loadTDDs() { @NonNull @Override public PumpEnactResult loadTDDs() {
aapsLogger.debug(LTag.PUMP, "loadTDDs [OmnipodPumpPlugin] - Not implemented."); aapsLogger.debug(LTag.PUMP, "loadTDDs [OmnipodPumpPlugin] - Not implemented.");
return getOperationNotSupportedWithCustomText(info.nightscout.androidaps.core.R.string.pump_operation_not_supported_by_pump_driver); return getOperationNotSupportedWithCustomText(info.nightscout.androidaps.core.R.string.pump_operation_not_supported_by_pump_driver);
} }
public OmnipodCommandType getCurrentCommand() {
return currentCommand;
}
private void initializeAfterRileyLinkConnection() { private void initializeAfterRileyLinkConnection() {
if (podStateManager.isPodInitialized() && podStateManager.getPodProgressStatus().isAtLeast(PodProgressStatus.PAIRING_COMPLETED)) { if (podStateManager.isPodInitialized() && podStateManager.getPodProgressStatus().isAtLeast(PodProgressStatus.PAIRING_COMPLETED)) {
for (int i = 0; STARTUP_STATUS_REQUEST_TRIES > i; i++) {
PumpEnactResult result = executeCommand(OmnipodCommandType.GET_POD_STATUS, aapsOmnipodManager::getPodStatus); PumpEnactResult result = executeCommand(OmnipodCommandType.GET_POD_STATUS, aapsOmnipodManager::getPodStatus);
if (result.success) { if (result.success) {
aapsLogger.debug(LTag.PUMP, "Successfully retrieved Pod status on startup"); aapsLogger.debug(LTag.PUMP, "Successfully retrieved Pod status on startup");
break;
} else { } else {
aapsLogger.warn(LTag.PUMP, "Failed to retrieve Pod status on startup"); aapsLogger.warn(LTag.PUMP, "Failed to retrieve Pod status on startup");
} }
}
} else { } else {
aapsLogger.debug(LTag.PUMP, "Not retrieving Pod status on startup: no Pod running"); aapsLogger.debug(LTag.PUMP, "Not retrieving Pod status on startup: no Pod running");
} }
if (!sentIdToFirebase) {
Bundle params = new Bundle(); Bundle params = new Bundle();
params.putString("version", BuildConfig.VERSION); params.putString("version", BuildConfig.VERSION);
fabricPrivacy.getFirebaseAnalytics().logEvent("OmnipodPumpInit", params); fabricPrivacy.getFirebaseAnalytics().logEvent("OmnipodPumpInit", params);
sentIdToFirebase = true;
}
this.firstRun = false;
} }
@NonNull private PumpEnactResult deliverBolus(final DetailedBolusInfo detailedBolusInfo) { @NonNull private PumpEnactResult deliverBolus(final DetailedBolusInfo detailedBolusInfo) {
@ -952,14 +955,12 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface,
private <T> T executeCommand(OmnipodCommandType commandType, Supplier<T> supplier) { private <T> T executeCommand(OmnipodCommandType commandType, Supplier<T> supplier) {
try { try {
currentCommand = commandType;
aapsLogger.debug(LTag.PUMP, "Executing command: {}", commandType); aapsLogger.debug(LTag.PUMP, "Executing command: {}", commandType);
rileyLinkUtil.getRileyLinkHistory().add(new RLHistoryItemOmnipod(getInjector(), commandType)); rileyLinkUtil.getRileyLinkHistory().add(new RLHistoryItemOmnipod(getInjector(), commandType));
return supplier.get(); return supplier.get();
} finally { } finally {
currentCommand = null;
rxBus.send(new EventRefreshOverview("Omnipod command: " + commandType.name(), false)); rxBus.send(new EventRefreshOverview("Omnipod command: " + commandType.name(), false));
rxBus.send(new EventOmnipodPumpValuesChanged()); rxBus.send(new EventOmnipodPumpValuesChanged());
} }
@ -981,7 +982,7 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface,
return true; return true;
} }
private void incrementStatistics(String statsKey) { private void incrementStatistics(int statsKey) {
long currentCount = sp.getLong(statsKey, 0L); long currentCount = sp.getLong(statsKey, 0L);
currentCount++; currentCount++;
sp.putLong(statsKey, currentCount); sp.putLong(statsKey, currentCount);

View file

@ -11,7 +11,6 @@ import info.nightscout.androidaps.plugins.pump.omnipod.ui.PodHistoryActivity
import info.nightscout.androidaps.plugins.pump.omnipod.ui.PodManagementActivity import info.nightscout.androidaps.plugins.pump.omnipod.ui.PodManagementActivity
import info.nightscout.androidaps.plugins.pump.omnipod.ui.wizard.initpod.InitActionFragment import info.nightscout.androidaps.plugins.pump.omnipod.ui.wizard.initpod.InitActionFragment
import info.nightscout.androidaps.plugins.pump.omnipod.ui.wizard.initpod.InitPodTask import info.nightscout.androidaps.plugins.pump.omnipod.ui.wizard.initpod.InitPodTask
import info.nightscout.androidaps.plugins.pump.omnipod.ui.wizard.pages.InitPodRefreshAction
import info.nightscout.androidaps.plugins.pump.omnipod.ui.wizard.pages.PodInfoFragment import info.nightscout.androidaps.plugins.pump.omnipod.ui.wizard.pages.PodInfoFragment
import info.nightscout.androidaps.plugins.pump.omnipod.ui.wizard.removepod.RemoveActionFragment import info.nightscout.androidaps.plugins.pump.omnipod.ui.wizard.removepod.RemoveActionFragment
import info.nightscout.androidaps.plugins.pump.omnipod.ui.wizard2.WizardActivity import info.nightscout.androidaps.plugins.pump.omnipod.ui.wizard2.WizardActivity
@ -39,7 +38,6 @@ abstract class OmnipodModule {
abstract fun omnipodCommunicationManagerProvider(): OmnipodRileyLinkCommunicationManager abstract fun omnipodCommunicationManagerProvider(): OmnipodRileyLinkCommunicationManager
// Data // Data
@ContributesAndroidInjector abstract fun initPodRefreshAction(): InitPodRefreshAction
@ContributesAndroidInjector abstract fun initPodTask(): InitPodTask @ContributesAndroidInjector abstract fun initPodTask(): InitPodTask
@ContributesAndroidInjector abstract fun rlHistoryItemOmnipod(): RLHistoryItemOmnipod @ContributesAndroidInjector abstract fun rlHistoryItemOmnipod(): RLHistoryItemOmnipod

View file

@ -19,8 +19,9 @@ public enum OmnipodCommandType {
SET_TIME(R.string.omnipod_cmd_set_time), // SET_TIME(R.string.omnipod_cmd_set_time), //
CONFIGURE_ALERTS(R.string.omnipod_cmd_configure_alerts), // CONFIGURE_ALERTS(R.string.omnipod_cmd_configure_alerts), //
ACKNOWLEDGE_ALERTS(R.string.omnipod_cmd_acknowledge_alerts), // ACKNOWLEDGE_ALERTS(R.string.omnipod_cmd_acknowledge_alerts), //
GET_POD_PULSE_LOG(R.string.omnipod_cmd_get_pulse_log), // READ_POD_PULSE_LOG(R.string.omnipod_cmd_read_pulse_log), //
SUSPEND_DELIVERY(R.string.omnipod_cmd_suspend_delivery); SUSPEND_DELIVERY(R.string.omnipod_cmd_suspend_delivery),
RESUME_DELIVERY(R.string.omnipod_cmd_resume_delivery);
private int resourceId; private int resourceId;

View file

@ -1,9 +0,0 @@
package info.nightscout.androidaps.plugins.pump.omnipod.definition;
public enum OmnipodStatusRequestType {
ACKNOWLEDGE_ALERTS,
GET_POD_STATE,
GET_PULSE_LOG,
SUSPEND_DELIVERY,
SET_TIME
}

View file

@ -3,11 +3,9 @@ package info.nightscout.androidaps.plugins.pump.omnipod.definition;
import info.nightscout.androidaps.plugins.pump.omnipod.R; import info.nightscout.androidaps.plugins.pump.omnipod.R;
public class OmnipodStorageKeys { public class OmnipodStorageKeys {
private static final String PREFIX = "AAPS.Omnipod.";
public static class Preferences { public static class Preferences {
public static final String POD_STATE = PREFIX + "pod_state"; public static final int POD_STATE = R.string.key_omnipod_pod_state;
public static final String ACTIVE_BOLUS = PREFIX + "current_bolus"; public static final int ACTIVE_BOLUS = R.string.key_omnipod_current_bolus;
public static final int BASAL_BEEPS_ENABLED = R.string.key_omnipod_basal_beeps_enabled; public static final int BASAL_BEEPS_ENABLED = R.string.key_omnipod_basal_beeps_enabled;
public static final int BOLUS_BEEPS_ENABLED = R.string.key_omnipod_bolus_beeps_enabled; public static final int BOLUS_BEEPS_ENABLED = R.string.key_omnipod_bolus_beeps_enabled;
public static final int SMB_BEEPS_ENABLED = R.string.key_omnipod_smb_beeps_enabled; public static final int SMB_BEEPS_ENABLED = R.string.key_omnipod_smb_beeps_enabled;
@ -22,8 +20,8 @@ public class OmnipodStorageKeys {
} }
public static class Statistics { public static class Statistics {
public static final String TBRS_SET = PREFIX + "tbrs_set"; public static final int TBRS_SET = R.string.key_omnipod_tbrs_set;
public static final String STANDARD_BOLUSES_DELIVERED = PREFIX + "std_boluses_delivered"; public static final int STANDARD_BOLUSES_DELIVERED = R.string.key_omnipod_std_boluses_delivered;
public static final String SMB_BOLUSES_DELIVERED = PREFIX + "smb_boluses_delivered"; public static final int SMB_BOLUSES_DELIVERED = R.string.key_omnipod_smb_boluses_delivered;
} }
} }

View file

@ -16,7 +16,7 @@ public enum PodHistoryEntryType {
PAIR_AND_PRIME(1, R.string.omnipod_init_pod_wizard_step2_title, PumpHistoryEntryGroup.Prime), PAIR_AND_PRIME(1, R.string.omnipod_init_pod_wizard_step2_title, PumpHistoryEntryGroup.Prime),
FILL_CANNULA_SET_BASAL_PROFILE(2, R.string.omnipod_init_pod_wizard_step4_title, PumpHistoryEntryGroup.Prime), FILL_CANNULA_SET_BASAL_PROFILE(2, R.string.omnipod_init_pod_wizard_step4_title, PumpHistoryEntryGroup.Prime),
DEACTIVATE_POD(3, R.string.omnipod_cmd_deactivate_pod, PumpHistoryEntryGroup.Prime), DEACTIVATE_POD(3, R.string.omnipod_cmd_deactivate_pod, PumpHistoryEntryGroup.Prime),
RESET_POD_STATE(4, R.string.omnipod_cmd_discard_pod, PumpHistoryEntryGroup.Prime), DISCARD_POD_STATE(4, R.string.omnipod_cmd_discard_pod, PumpHistoryEntryGroup.Prime),
SET_TEMPORARY_BASAL(10, R.string.omnipod_cmd_set_tbr, PumpHistoryEntryGroup.Basal), SET_TEMPORARY_BASAL(10, R.string.omnipod_cmd_set_tbr, PumpHistoryEntryGroup.Basal),
CANCEL_TEMPORARY_BASAL_BY_DRIVER(11, R.string.omnipod_cmd_cancel_tbr_by_driver, PumpHistoryEntryGroup.Basal), CANCEL_TEMPORARY_BASAL_BY_DRIVER(11, R.string.omnipod_cmd_cancel_tbr_by_driver, PumpHistoryEntryGroup.Basal),

View file

@ -6,7 +6,6 @@ import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.mess
import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.message.response.StatusResponse; import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.message.response.StatusResponse;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.AlertSet; import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.AlertSet;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.AlertSlot; import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.AlertSlot;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.ActionInitializationException;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.manager.PodStateManager; import info.nightscout.androidaps.plugins.pump.omnipod.driver.manager.PodStateManager;
import info.nightscout.androidaps.plugins.pump.omnipod.rileylink.manager.OmnipodRileyLinkCommunicationManager; import info.nightscout.androidaps.plugins.pump.omnipod.rileylink.manager.OmnipodRileyLinkCommunicationManager;
@ -16,12 +15,12 @@ public class AcknowledgeAlertsAction implements OmnipodAction<StatusResponse> {
public AcknowledgeAlertsAction(PodStateManager podStateManager, AlertSet alerts) { public AcknowledgeAlertsAction(PodStateManager podStateManager, AlertSet alerts) {
if (podStateManager == null) { if (podStateManager == null) {
throw new ActionInitializationException("Pod state manager cannot be null"); throw new IllegalArgumentException("Pod state manager cannot be null");
} }
if (alerts == null) { if (alerts == null) {
throw new ActionInitializationException("Alert set can not be null"); throw new IllegalArgumentException("Alert set can not be null");
} else if (alerts.size() == 0) { } else if (alerts.size() == 0) {
throw new ActionInitializationException("Alert set can not be empty"); throw new IllegalArgumentException("Alert set can not be empty");
} }
this.podStateManager = podStateManager; this.podStateManager = podStateManager;
this.alerts = alerts; this.alerts = alerts;

View file

@ -9,7 +9,6 @@ import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.mess
import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.message.command.SetInsulinScheduleCommand; import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.message.command.SetInsulinScheduleCommand;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.message.response.StatusResponse; import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.message.response.StatusResponse;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.schedule.BolusDeliverySchedule; import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.schedule.BolusDeliverySchedule;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.ActionInitializationException;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.manager.PodStateManager; import info.nightscout.androidaps.plugins.pump.omnipod.driver.manager.PodStateManager;
import info.nightscout.androidaps.plugins.pump.omnipod.rileylink.manager.OmnipodRileyLinkCommunicationManager; import info.nightscout.androidaps.plugins.pump.omnipod.rileylink.manager.OmnipodRileyLinkCommunicationManager;
@ -23,10 +22,10 @@ public class BolusAction implements OmnipodAction<StatusResponse> {
public BolusAction(PodStateManager podStateManager, double units, Duration timeBetweenPulses, public BolusAction(PodStateManager podStateManager, double units, Duration timeBetweenPulses,
boolean acknowledgementBeep, boolean completionBeep) { boolean acknowledgementBeep, boolean completionBeep) {
if (podStateManager == null) { if (podStateManager == null) {
throw new ActionInitializationException("Pod state manager cannot be null"); throw new IllegalArgumentException("Pod state manager cannot be null");
} }
if (timeBetweenPulses == null) { if (timeBetweenPulses == null) {
throw new ActionInitializationException("Time between pulses cannot be null"); throw new IllegalArgumentException("Time between pulses cannot be null");
} }
this.podStateManager = podStateManager; this.podStateManager = podStateManager;
this.units = units; this.units = units;

View file

@ -10,7 +10,6 @@ import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.mess
import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.message.response.StatusResponse; import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.message.response.StatusResponse;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.BeepType; import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.BeepType;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.DeliveryType; import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.DeliveryType;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.ActionInitializationException;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.manager.PodStateManager; import info.nightscout.androidaps.plugins.pump.omnipod.driver.manager.PodStateManager;
import info.nightscout.androidaps.plugins.pump.omnipod.rileylink.manager.OmnipodRileyLinkCommunicationManager; import info.nightscout.androidaps.plugins.pump.omnipod.rileylink.manager.OmnipodRileyLinkCommunicationManager;
@ -22,10 +21,10 @@ public class CancelDeliveryAction implements OmnipodAction<StatusResponse> {
public CancelDeliveryAction(PodStateManager podStateManager, EnumSet<DeliveryType> deliveryTypes, public CancelDeliveryAction(PodStateManager podStateManager, EnumSet<DeliveryType> deliveryTypes,
boolean acknowledgementBeep) { boolean acknowledgementBeep) {
if (podStateManager == null) { if (podStateManager == null) {
throw new ActionInitializationException("Pod state manager cannot be null"); throw new IllegalArgumentException("Pod state manager cannot be null");
} }
if (deliveryTypes == null) { if (deliveryTypes == null) {
throw new ActionInitializationException("Delivery types cannot be null"); throw new IllegalArgumentException("Delivery types cannot be null");
} }
this.podStateManager = podStateManager; this.podStateManager = podStateManager;
this.deliveryTypes = deliveryTypes; this.deliveryTypes = deliveryTypes;

View file

@ -5,7 +5,6 @@ import java.util.List;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.message.command.ConfigureAlertsCommand; import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.message.command.ConfigureAlertsCommand;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.message.response.StatusResponse; import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.message.response.StatusResponse;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.AlertConfiguration; import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.AlertConfiguration;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.ActionInitializationException;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.manager.PodStateManager; import info.nightscout.androidaps.plugins.pump.omnipod.driver.manager.PodStateManager;
import info.nightscout.androidaps.plugins.pump.omnipod.rileylink.manager.OmnipodRileyLinkCommunicationManager; import info.nightscout.androidaps.plugins.pump.omnipod.rileylink.manager.OmnipodRileyLinkCommunicationManager;
@ -15,10 +14,10 @@ public class ConfigureAlertsAction implements OmnipodAction<StatusResponse> {
public ConfigureAlertsAction(PodStateManager podStateManager, List<AlertConfiguration> alertConfigurations) { public ConfigureAlertsAction(PodStateManager podStateManager, List<AlertConfiguration> alertConfigurations) {
if (podStateManager == null) { if (podStateManager == null) {
throw new ActionInitializationException("Pod state manager cannot be null"); throw new IllegalArgumentException("Pod state manager cannot be null");
} }
if (alertConfigurations == null) { if (alertConfigurations == null) {
throw new ActionInitializationException("Alert configurations cannot be null"); throw new IllegalArgumentException("Alert configurations cannot be null");
} }
this.podStateManager = podStateManager; this.podStateManager = podStateManager;
this.alertConfigurations = alertConfigurations; this.alertConfigurations = alertConfigurations;

View file

@ -5,7 +5,6 @@ import java.util.EnumSet;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.message.command.DeactivatePodCommand; import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.message.command.DeactivatePodCommand;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.message.response.StatusResponse; import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.message.response.StatusResponse;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.DeliveryType; import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.DeliveryType;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.ActionInitializationException;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.PodFaultException; import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.PodFaultException;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.manager.PodStateManager; import info.nightscout.androidaps.plugins.pump.omnipod.driver.manager.PodStateManager;
import info.nightscout.androidaps.plugins.pump.omnipod.rileylink.manager.OmnipodRileyLinkCommunicationManager; import info.nightscout.androidaps.plugins.pump.omnipod.rileylink.manager.OmnipodRileyLinkCommunicationManager;
@ -16,7 +15,7 @@ public class DeactivatePodAction implements OmnipodAction<StatusResponse> {
public DeactivatePodAction(PodStateManager podStateManager, boolean acknowledgementBeep) { public DeactivatePodAction(PodStateManager podStateManager, boolean acknowledgementBeep) {
if (podStateManager == null) { if (podStateManager == null) {
throw new ActionInitializationException("Pod state manager cannot be null"); throw new IllegalArgumentException("Pod state manager cannot be null");
} }
this.podStateManager = podStateManager; this.podStateManager = podStateManager;
this.acknowledgementBeep = acknowledgementBeep; this.acknowledgementBeep = acknowledgementBeep;

View file

@ -3,7 +3,6 @@ package info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.act
import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.message.command.GetStatusCommand; import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.message.command.GetStatusCommand;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.message.response.podinfo.PodInfoResponse; import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.message.response.podinfo.PodInfoResponse;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.PodInfoType; import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.PodInfoType;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.ActionInitializationException;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.manager.PodStateManager; import info.nightscout.androidaps.plugins.pump.omnipod.driver.manager.PodStateManager;
import info.nightscout.androidaps.plugins.pump.omnipod.rileylink.manager.OmnipodRileyLinkCommunicationManager; import info.nightscout.androidaps.plugins.pump.omnipod.rileylink.manager.OmnipodRileyLinkCommunicationManager;
@ -13,10 +12,10 @@ public class GetPodInfoAction implements OmnipodAction<PodInfoResponse> {
public GetPodInfoAction(PodStateManager podStateManager, PodInfoType podInfoType) { public GetPodInfoAction(PodStateManager podStateManager, PodInfoType podInfoType) {
if (podStateManager == null) { if (podStateManager == null) {
throw new ActionInitializationException("Pod state manager cannot be null"); throw new IllegalArgumentException("Pod state manager cannot be null");
} }
if (podInfoType == null) { if (podInfoType == null) {
throw new ActionInitializationException("Pod info type cannot be null"); throw new IllegalArgumentException("Pod info type cannot be null");
} }
this.podStateManager = podStateManager; this.podStateManager = podStateManager;
this.podInfoType = podInfoType; this.podInfoType = podInfoType;

View file

@ -3,7 +3,6 @@ package info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.act
import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.message.command.GetStatusCommand; import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.message.command.GetStatusCommand;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.message.response.StatusResponse; import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.message.response.StatusResponse;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.PodInfoType; import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.PodInfoType;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.ActionInitializationException;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.manager.PodStateManager; import info.nightscout.androidaps.plugins.pump.omnipod.driver.manager.PodStateManager;
import info.nightscout.androidaps.plugins.pump.omnipod.rileylink.manager.OmnipodRileyLinkCommunicationManager; import info.nightscout.androidaps.plugins.pump.omnipod.rileylink.manager.OmnipodRileyLinkCommunicationManager;
@ -12,7 +11,7 @@ public class GetStatusAction implements OmnipodAction<StatusResponse> {
public GetStatusAction(PodStateManager podState) { public GetStatusAction(PodStateManager podState) {
if (podState == null) { if (podState == null) {
throw new ActionInitializationException("Pod state manager cannot be null"); throw new IllegalArgumentException("Pod state manager cannot be null");
} }
this.podStateManager = podState; this.podStateManager = podState;
} }

View file

@ -11,7 +11,6 @@ import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.AlertCo
import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.OmnipodConstants; import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.OmnipodConstants;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.PodProgressStatus; import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.PodProgressStatus;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.schedule.BasalSchedule; import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.schedule.BasalSchedule;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.ActionInitializationException;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.IllegalPodProgressException; import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.IllegalPodProgressException;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.manager.PodStateManager; import info.nightscout.androidaps.plugins.pump.omnipod.driver.manager.PodStateManager;
import info.nightscout.androidaps.plugins.pump.omnipod.rileylink.manager.OmnipodRileyLinkCommunicationManager; import info.nightscout.androidaps.plugins.pump.omnipod.rileylink.manager.OmnipodRileyLinkCommunicationManager;
@ -26,10 +25,10 @@ public class InsertCannulaAction implements OmnipodAction<StatusResponse> {
public InsertCannulaAction(PodStateManager podStateManager, BasalSchedule initialBasalSchedule, public InsertCannulaAction(PodStateManager podStateManager, BasalSchedule initialBasalSchedule,
Duration expirationReminderTimeBeforeShutdown, Integer lowReservoirAlertUnits) { Duration expirationReminderTimeBeforeShutdown, Integer lowReservoirAlertUnits) {
if (podStateManager == null) { if (podStateManager == null) {
throw new ActionInitializationException("Pod state manager cannot be null"); throw new IllegalArgumentException("Pod state manager cannot be null");
} }
if (initialBasalSchedule == null) { if (initialBasalSchedule == null) {
throw new ActionInitializationException("Initial basal schedule cannot be null"); throw new IllegalArgumentException("Initial basal schedule cannot be null");
} }
this.podStateManager = podStateManager; this.podStateManager = podStateManager;
this.initialBasalSchedule = initialBasalSchedule; this.initialBasalSchedule = initialBasalSchedule;

View file

@ -3,7 +3,6 @@ package info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.act
import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.action.service.PrimeService; import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.action.service.PrimeService;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.message.response.StatusResponse; import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.message.response.StatusResponse;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.PodProgressStatus; import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.PodProgressStatus;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.ActionInitializationException;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.IllegalPodProgressException; import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.IllegalPodProgressException;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.manager.PodStateManager; import info.nightscout.androidaps.plugins.pump.omnipod.driver.manager.PodStateManager;
import info.nightscout.androidaps.plugins.pump.omnipod.rileylink.manager.OmnipodRileyLinkCommunicationManager; import info.nightscout.androidaps.plugins.pump.omnipod.rileylink.manager.OmnipodRileyLinkCommunicationManager;
@ -15,10 +14,10 @@ public class PrimeAction implements OmnipodAction<StatusResponse> {
public PrimeAction(PrimeService primeService, PodStateManager podStateManager) { public PrimeAction(PrimeService primeService, PodStateManager podStateManager) {
if (primeService == null) { if (primeService == null) {
throw new ActionInitializationException("Prime service cannot be null"); throw new IllegalArgumentException("Prime service cannot be null");
} }
if (podStateManager == null) { if (podStateManager == null) {
throw new ActionInitializationException("Pod state manager cannot be null"); throw new IllegalArgumentException("Pod state manager cannot be null");
} }
this.service = primeService; this.service = primeService;
this.podStateManager = podStateManager; this.podStateManager = podStateManager;

View file

@ -9,7 +9,6 @@ import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.mess
import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.message.command.SetInsulinScheduleCommand; import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.message.command.SetInsulinScheduleCommand;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.message.response.StatusResponse; import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.message.response.StatusResponse;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.schedule.BasalSchedule; import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.schedule.BasalSchedule;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.ActionInitializationException;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.manager.PodStateManager; import info.nightscout.androidaps.plugins.pump.omnipod.driver.manager.PodStateManager;
import info.nightscout.androidaps.plugins.pump.omnipod.rileylink.manager.OmnipodRileyLinkCommunicationManager; import info.nightscout.androidaps.plugins.pump.omnipod.rileylink.manager.OmnipodRileyLinkCommunicationManager;
@ -23,13 +22,13 @@ public class SetBasalScheduleAction implements OmnipodAction<StatusResponse> {
public SetBasalScheduleAction(PodStateManager podStateManager, BasalSchedule basalSchedule, public SetBasalScheduleAction(PodStateManager podStateManager, BasalSchedule basalSchedule,
boolean confidenceReminder, Duration scheduleOffset, boolean acknowledgementBeep) { boolean confidenceReminder, Duration scheduleOffset, boolean acknowledgementBeep) {
if (podStateManager == null) { if (podStateManager == null) {
throw new ActionInitializationException("Pod state manager cannot be null"); throw new IllegalArgumentException("Pod state manager cannot be null");
} }
if (basalSchedule == null) { if (basalSchedule == null) {
throw new ActionInitializationException("Basal schedule cannot be null"); throw new IllegalArgumentException("Basal schedule cannot be null");
} }
if (scheduleOffset == null) { if (scheduleOffset == null) {
throw new ActionInitializationException("Schedule offset cannot be null"); throw new IllegalArgumentException("Schedule offset cannot be null");
} }
this.podStateManager = podStateManager; this.podStateManager = podStateManager;
this.basalSchedule = basalSchedule; this.basalSchedule = basalSchedule;

View file

@ -10,7 +10,6 @@ import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.mess
import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.message.command.SetInsulinScheduleCommand; import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.message.command.SetInsulinScheduleCommand;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.message.command.TempBasalExtraCommand; import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.message.command.TempBasalExtraCommand;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.message.response.StatusResponse; import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.message.response.StatusResponse;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.ActionInitializationException;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.manager.PodStateManager; import info.nightscout.androidaps.plugins.pump.omnipod.driver.manager.PodStateManager;
import info.nightscout.androidaps.plugins.pump.omnipod.rileylink.manager.OmnipodRileyLinkCommunicationManager; import info.nightscout.androidaps.plugins.pump.omnipod.rileylink.manager.OmnipodRileyLinkCommunicationManager;
@ -24,10 +23,10 @@ public class SetTempBasalAction implements OmnipodAction<StatusResponse> {
public SetTempBasalAction(PodStateManager podStateManager, double rate, Duration duration, public SetTempBasalAction(PodStateManager podStateManager, double rate, Duration duration,
boolean acknowledgementBeep, boolean completionBeep) { boolean acknowledgementBeep, boolean completionBeep) {
if (podStateManager == null) { if (podStateManager == null) {
throw new ActionInitializationException("Pod state manager cannot be null"); throw new IllegalArgumentException("Pod state manager cannot be null");
} }
if (duration == null) { if (duration == null) {
throw new ActionInitializationException("Duration cannot be null"); throw new IllegalArgumentException("Duration cannot be null");
} }
this.podStateManager = podStateManager; this.podStateManager = podStateManager;
this.rate = rate; this.rate = rate;

View file

@ -17,11 +17,9 @@ import info.nightscout.androidaps.plugins.pump.omnipod.driver.util.AlertConfigur
public final class ExpirationReminderBuilder { public final class ExpirationReminderBuilder {
private final Map<AlertSlot, AlertConfiguration> alerts = new HashMap<>(); private final Map<AlertSlot, AlertConfiguration> alerts = new HashMap<>();
private final DateTime endOfServiceTime; private final DateTime endOfServiceTime;
private final PodStateManager podStateManager;
public ExpirationReminderBuilder(PodStateManager podStateManager) { public ExpirationReminderBuilder(PodStateManager podStateManager) {
this.endOfServiceTime = podStateManager.getActivatedAt().plus(OmnipodConstants.SERVICE_DURATION); this.endOfServiceTime = podStateManager.getActivatedAt().plus(OmnipodConstants.SERVICE_DURATION);
this.podStateManager = podStateManager;
} }
public ExpirationReminderBuilder defaults() { public ExpirationReminderBuilder defaults() {
@ -45,21 +43,17 @@ public final class ExpirationReminderBuilder {
public ExpirationReminderBuilder expirationAdvisory(boolean active, Duration timeBeforeShutdown) { public ExpirationReminderBuilder expirationAdvisory(boolean active, Duration timeBeforeShutdown) {
DateTime expirationAdvisoryAlarmTime = endOfServiceTime.minus(timeBeforeShutdown); DateTime expirationAdvisoryAlarmTime = endOfServiceTime.minus(timeBeforeShutdown);
if (DateTime.now().isBefore(expirationAdvisoryAlarmTime)) { Duration timeUntilExpirationAdvisoryAlarm = DateTime.now().isBefore(expirationAdvisoryAlarmTime) ? new Duration(DateTime.now(),
Duration timeUntilExpirationAdvisoryAlarm = new Duration(DateTime.now(), expirationAdvisoryAlarmTime) : Duration.ZERO;
expirationAdvisoryAlarmTime);
AlertConfiguration expirationAdvisoryAlertConfiguration = AlertConfigurationUtil.createExpirationAdvisoryAlertConfiguration(active, AlertConfiguration expirationAdvisoryAlertConfiguration = AlertConfigurationUtil.createExpirationAdvisoryAlertConfiguration(active,
timeUntilExpirationAdvisoryAlarm, timeBeforeShutdown); timeUntilExpirationAdvisoryAlarm, timeBeforeShutdown);
alerts.put(expirationAdvisoryAlertConfiguration.getAlertSlot(), expirationAdvisoryAlertConfiguration); alerts.put(expirationAdvisoryAlertConfiguration.getAlertSlot(), expirationAdvisoryAlertConfiguration);
}
return this; return this;
} }
public ExpirationReminderBuilder lowReservoir(boolean active, int units) { public ExpirationReminderBuilder lowReservoir(boolean active, int units) {
if (podStateManager.getReservoirLevel() == null || podStateManager.getReservoirLevel().intValue() >= units) {
AlertConfiguration lowReservoirAlertConfiguration = AlertConfigurationUtil.createLowReservoirAlertConfiguration(active, (double) units); AlertConfiguration lowReservoirAlertConfiguration = AlertConfigurationUtil.createLowReservoirAlertConfiguration(active, (double) units);
alerts.put(lowReservoirAlertConfiguration.getAlertSlot(), lowReservoirAlertConfiguration); alerts.put(lowReservoirAlertConfiguration.getAlertSlot(), lowReservoirAlertConfiguration);
}
return this; return this;
} }

View file

@ -3,10 +3,13 @@ package info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.mes
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import info.nightscout.androidaps.logging.AAPSLogger;
import info.nightscout.androidaps.logging.LTag;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil; import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.message.command.GetStatusCommand; import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.message.command.GetStatusCommand;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.MessageBlockType; import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.MessageBlockType;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.OmnipodCrc; import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.OmnipodCrc;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.PacketType;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.PodInfoType; import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.PodInfoType;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.CrcMismatchException; import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.CrcMismatchException;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.MessageDecodingException; import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.MessageDecodingException;
@ -91,8 +94,11 @@ public class OmnipodMessage {
return encodedData; return encodedData;
} }
public void padWithGetStatusCommands(int packetSize) { public void padWithGetStatusCommands(int packetSize, AAPSLogger aapsLogger) {
while (getEncoded().length < packetSize) { while (getEncoded().length <= packetSize) {
if (getEncoded().length == PacketType.PDM.getMaxBodyLength()) {
aapsLogger.debug(LTag.PUMPBTCOMM, "Message length equals max body length: {}", this);
}
messageBlocks.add(new GetStatusCommand(PodInfoType.NORMAL)); messageBlocks.add(new GetStatusCommand(PodInfoType.NORMAL));
} }
} }

View file

@ -6,7 +6,6 @@ import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.message.MessageBlock; import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.message.MessageBlock;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.MessageBlockType; import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.MessageBlockType;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.OmnipodConstants; import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.OmnipodConstants;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.CommandInitializationException;
public class BolusExtraCommand extends MessageBlock { public class BolusExtraCommand extends MessageBlock {
private final boolean acknowledgementBeep; private final boolean acknowledgementBeep;
@ -29,9 +28,9 @@ public class BolusExtraCommand extends MessageBlock {
boolean acknowledgementBeep, boolean completionBeep, boolean acknowledgementBeep, boolean completionBeep,
Duration programReminderInterval, Duration timeBetweenPulses) { Duration programReminderInterval, Duration timeBetweenPulses) {
if (units <= 0D) { if (units <= 0D) {
throw new CommandInitializationException("Units should be > 0"); throw new IllegalArgumentException("Units should be > 0");
} else if (units > OmnipodConstants.MAX_BOLUS) { } else if (units > OmnipodConstants.MAX_BOLUS) {
throw new CommandInitializationException("Units exceeds max bolus"); throw new IllegalArgumentException("Units exceeds max bolus");
} }
this.units = units; this.units = units;
this.squareWaveUnits = squareWaveUnits; this.squareWaveUnits = squareWaveUnits;

View file

@ -12,7 +12,6 @@ import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.schedul
import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.schedule.BolusDeliverySchedule; import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.schedule.BolusDeliverySchedule;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.schedule.DeliverySchedule; import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.schedule.DeliverySchedule;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.schedule.TempBasalDeliverySchedule; import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.schedule.TempBasalDeliverySchedule;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.CommandInitializationException;
public class SetInsulinScheduleCommand extends NonceResyncableMessageBlock { public class SetInsulinScheduleCommand extends NonceResyncableMessageBlock {
@ -51,12 +50,12 @@ public class SetInsulinScheduleCommand extends NonceResyncableMessageBlock {
// Temp basal // Temp basal
public SetInsulinScheduleCommand(int nonce, double tempBasalRate, Duration duration) { public SetInsulinScheduleCommand(int nonce, double tempBasalRate, Duration duration) {
if (tempBasalRate < 0D) { if (tempBasalRate < 0D) {
throw new CommandInitializationException("Rate should be >= 0"); throw new IllegalArgumentException("Rate should be >= 0");
} else if (tempBasalRate > OmnipodConstants.MAX_BASAL_RATE) { } else if (tempBasalRate > OmnipodConstants.MAX_BASAL_RATE) {
throw new CommandInitializationException("Rate exceeds max basal rate"); throw new IllegalArgumentException("Rate exceeds max basal rate");
} }
if (duration.isLongerThan(OmnipodConstants.MAX_TEMP_BASAL_DURATION)) { if (duration.isLongerThan(OmnipodConstants.MAX_TEMP_BASAL_DURATION)) {
throw new CommandInitializationException("Duration exceeds max temp basal duration"); throw new IllegalArgumentException("Duration exceeds max temp basal duration");
} }
int pulsesPerHour = (int) Math.round(tempBasalRate / OmnipodConstants.POD_PULSE_SIZE); int pulsesPerHour = (int) Math.round(tempBasalRate / OmnipodConstants.POD_PULSE_SIZE);
int pulsesPerSegment = pulsesPerHour / 2; int pulsesPerSegment = pulsesPerHour / 2;

View file

@ -10,7 +10,6 @@ import info.nightscout.androidaps.plugins.pump.omnipod.driver.communication.mess
import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.MessageBlockType; import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.MessageBlockType;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.OmnipodConstants; import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.OmnipodConstants;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.schedule.RateEntry; import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.schedule.RateEntry;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.CommandInitializationException;
public class TempBasalExtraCommand extends MessageBlock { public class TempBasalExtraCommand extends MessageBlock {
private final boolean acknowledgementBeep; private final boolean acknowledgementBeep;
@ -24,12 +23,12 @@ public class TempBasalExtraCommand extends MessageBlock {
public TempBasalExtraCommand(double rate, Duration duration, boolean acknowledgementBeep, boolean completionBeep, public TempBasalExtraCommand(double rate, Duration duration, boolean acknowledgementBeep, boolean completionBeep,
Duration programReminderInterval) { Duration programReminderInterval) {
if (rate < 0D) { if (rate < 0D) {
throw new CommandInitializationException("Rate should be >= 0"); throw new IllegalArgumentException("Rate should be >= 0");
} else if (rate > OmnipodConstants.MAX_BASAL_RATE) { } else if (rate > OmnipodConstants.MAX_BASAL_RATE) {
throw new CommandInitializationException("Rate exceeds max basal rate"); throw new IllegalArgumentException("Rate exceeds max basal rate");
} }
if (duration.isLongerThan(OmnipodConstants.MAX_TEMP_BASAL_DURATION)) { if (duration.isLongerThan(OmnipodConstants.MAX_TEMP_BASAL_DURATION)) {
throw new CommandInitializationException("Duration exceeds max temp basal duration"); throw new IllegalArgumentException("Duration exceeds max temp basal duration");
} }
this.acknowledgementBeep = acknowledgementBeep; this.acknowledgementBeep = acknowledgementBeep;

View file

@ -1,7 +0,0 @@
package info.nightscout.androidaps.plugins.pump.omnipod.driver.exception;
public class ActionInitializationException extends OmnipodException {
public ActionInitializationException(String message) {
super(message, true);
}
}

View file

@ -1,11 +0,0 @@
package info.nightscout.androidaps.plugins.pump.omnipod.driver.exception;
public class CommandInitializationException extends OmnipodException {
public CommandInitializationException(String message) {
super(message, true);
}
public CommandInitializationException(String message, Throwable cause) {
super(message, cause, true);
}
}

View file

@ -1,34 +0,0 @@
package info.nightscout.androidaps.plugins.pump.omnipod.driver.exception;
public class CommunicationException extends OmnipodException {
private final Type type;
public CommunicationException(Type type) {
super(type.getDescription(), false);
this.type = type;
}
public CommunicationException(Type type, Throwable cause) {
super(type.getDescription() + ": " + cause, cause, false);
this.type = type;
}
public Type getType() {
return type;
}
public enum Type {
TIMEOUT("Communication timeout"),
UNEXPECTED_EXCEPTION("Caught an unexpected Exception");
private final String description;
Type(String description) {
this.description = description;
}
public String getDescription() {
return description;
}
}
}

View file

@ -0,0 +1,7 @@
package info.nightscout.androidaps.plugins.pump.omnipod.driver.exception;
public class RileyLinkInterruptedException extends OmnipodException {
public RileyLinkInterruptedException() {
super("RileyLink interrupted", false);
}
}

View file

@ -0,0 +1,8 @@
package info.nightscout.androidaps.plugins.pump.omnipod.driver.exception;
// Response indicating that there was a timeout in communication between the RileyLink and the Pod
public class RileyLinkTimeoutException extends OmnipodException {
public RileyLinkTimeoutException() {
super("Timeout in communication between RileyLink and Pod", false);
}
}

View file

@ -0,0 +1,7 @@
package info.nightscout.androidaps.plugins.pump.omnipod.driver.exception;
public class RileyLinkUnexpectedException extends OmnipodException {
public RileyLinkUnexpectedException(Throwable cause) {
super("Unexpected Exception during RileyLink communication", cause, false);
}
}

View file

@ -0,0 +1,8 @@
package info.nightscout.androidaps.plugins.pump.omnipod.driver.exception;
// Indicates that we didn't get any response from the RL
public class RileyLinkUnreachableException extends OmnipodException {
public RileyLinkUnreachableException() {
super("Timeout in communication between phone and RileyLink", false);
}
}

View file

@ -41,7 +41,6 @@ import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.PodInfo
import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.PodProgressStatus; import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.PodProgressStatus;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.schedule.BasalSchedule; import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.schedule.BasalSchedule;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.CommandFailedAfterChangingDeliveryStatusException; import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.CommandFailedAfterChangingDeliveryStatusException;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.CommunicationException;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.DeliveryStatusVerificationFailedException; import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.DeliveryStatusVerificationFailedException;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.IllegalDeliveryStatusException; import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.IllegalDeliveryStatusException;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.IllegalPacketTypeException; import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.IllegalPacketTypeException;
@ -59,7 +58,7 @@ import io.reactivex.schedulers.Schedulers;
import io.reactivex.subjects.SingleSubject; import io.reactivex.subjects.SingleSubject;
public class OmnipodManager { public class OmnipodManager {
private static final int ACTION_VERIFICATION_TRIES = 3; private static final int ACTION_VERIFICATION_TRIES = 2;
private final OmnipodRileyLinkCommunicationManager communicationService; private final OmnipodRileyLinkCommunicationManager communicationService;
private PodStateManager podStateManager; private PodStateManager podStateManager;
@ -224,13 +223,10 @@ public class OmnipodManager {
suspendDelivery(acknowledgementBeep); suspendDelivery(acknowledgementBeep);
} }
// Store the new Basal schedule after successfully suspending delivery, so that if setting the Basal schedule fails,
// And we later try to resume delivery, the new schedule is used
podStateManager.setBasalSchedule(schedule);
try { try {
executeAndVerify(() -> communicationService.executeAction(new SetBasalScheduleAction(podStateManager, schedule, executeAndVerify(() -> communicationService.executeAction(new SetBasalScheduleAction(podStateManager, schedule,
false, podStateManager.getScheduleOffset(), acknowledgementBeep))); false, podStateManager.getScheduleOffset(), acknowledgementBeep)));
podStateManager.setBasalSchedule(schedule);
} catch (OmnipodException ex) { } catch (OmnipodException ex) {
if (ex.isCertainFailure()) { if (ex.isCertainFailure()) {
if (!wasSuspended) { if (!wasSuspended) {
@ -240,7 +236,9 @@ public class OmnipodManager {
} }
// verifyDeliveryStatus will throw an exception if verification fails // verifyDeliveryStatus will throw an exception if verification fails
if (!verifyDeliveryStatus(DeliveryStatus.NORMAL, ex)) { if (verifyDeliveryStatus(DeliveryStatus.NORMAL, ex)) {
podStateManager.setBasalSchedule(schedule);
} else {
if (!wasSuspended) { if (!wasSuspended) {
throw new CommandFailedAfterChangingDeliveryStatusException("Suspending delivery succeeded but setting the new basal schedule did not", ex); throw new CommandFailedAfterChangingDeliveryStatusException("Suspending delivery succeeded but setting the new basal schedule did not", ex);
} }
@ -248,6 +246,8 @@ public class OmnipodManager {
throw ex; throw ex;
} }
} }
} finally { } finally {
logCommandExecutionFinished("setBasalSchedule"); logCommandExecutionFinished("setBasalSchedule");
} }
@ -420,7 +420,7 @@ public class OmnipodManager {
bolusCommandExecutionSubject = null; bolusCommandExecutionSubject = null;
disposables.add(Completable.complete() // disposables.add(Completable.complete() //
.delay(estimatedRemainingBolusDuration.getMillis() + 250, TimeUnit.MILLISECONDS) // .delay(estimatedRemainingBolusDuration.getMillis(), TimeUnit.MILLISECONDS) //
.observeOn(Schedulers.io()) // .observeOn(Schedulers.io()) //
.doOnComplete(() -> { .doOnComplete(() -> {
synchronized (bolusDataMutex) { synchronized (bolusDataMutex) {
@ -432,9 +432,8 @@ public class OmnipodManager {
StatusResponse statusResponse = getPodStatus(); StatusResponse statusResponse = getPodStatus();
if (statusResponse.getDeliveryStatus().isBolusing()) { if (statusResponse.getDeliveryStatus().isBolusing()) {
throw new IllegalDeliveryStatusException(DeliveryStatus.NORMAL, statusResponse.getDeliveryStatus()); throw new IllegalDeliveryStatusException(DeliveryStatus.NORMAL, statusResponse.getDeliveryStatus());
} else {
break;
} }
break;
} catch (PodFaultException ex) { } catch (PodFaultException ex) {
// Subtract units not delivered in case of a Pod failure // Subtract units not delivered in case of a Pod failure
bolusNotDelivered = ex.getFaultEvent().getBolusNotDelivered(); bolusNotDelivered = ex.getFaultEvent().getBolusNotDelivered();
@ -551,9 +550,9 @@ public class OmnipodManager {
try { try {
PodInfoResponse podInfoResponse = communicationService.executeAction(new GetPodInfoAction(podStateManager, PodInfoType.RECENT_PULSE_LOG)); PodInfoResponse podInfoResponse = communicationService.executeAction(new GetPodInfoAction(podStateManager, PodInfoType.RECENT_PULSE_LOG));
PodInfoRecentPulseLog pulseLogInfo = (PodInfoRecentPulseLog) podInfoResponse.getPodInfo(); PodInfoRecentPulseLog pulseLogInfo = (PodInfoRecentPulseLog) podInfoResponse.getPodInfo();
aapsLogger.info(LTag.PUMPCOMM, "Retrieved pulse log from the pod: {}", pulseLogInfo.toString()); aapsLogger.info(LTag.PUMPCOMM, "Read pulse log from the pod: {}", pulseLogInfo.toString());
} catch (Exception ex) { } catch (Exception ex) {
aapsLogger.warn(LTag.PUMPCOMM, "Failed to retrieve pulse log from the pod", ex); aapsLogger.warn(LTag.PUMPCOMM, "Failed to read pulse log", ex);
} }
try { try {
@ -595,7 +594,7 @@ public class OmnipodManager {
logStartingCommandExecution("verifyCommand"); logStartingCommandExecution("verifyCommand");
try { try {
return supplier.get(); return supplier.get();
} catch (Exception originalException) { } catch (OmnipodException originalException) {
if (isCertainFailure(originalException)) { if (isCertainFailure(originalException)) {
throw originalException; throw originalException;
} else { } else {
@ -608,18 +607,11 @@ public class OmnipodManager {
return statusResponse; return statusResponse;
} catch (NonceOutOfSyncException verificationException) { } catch (NonceOutOfSyncException verificationException) {
aapsLogger.error(LTag.PUMPCOMM, "Command resolved to FAILURE (CERTAIN_FAILURE)", verificationException); aapsLogger.info(LTag.PUMPCOMM, "Command resolved to FAILURE (CERTAIN_FAILURE)", verificationException);
originalException.setCertainFailure(true);
if (originalException instanceof OmnipodException) {
((OmnipodException) originalException).setCertainFailure(true);
throw originalException; throw originalException;
} else {
OmnipodException newException = new CommunicationException(CommunicationException.Type.UNEXPECTED_EXCEPTION, originalException);
newException.setCertainFailure(true);
throw newException;
}
} catch (Exception verificationException) { } catch (Exception verificationException) {
aapsLogger.error(LTag.PUMPCOMM, "Command unresolved (UNCERTAIN_FAILURE)", verificationException); aapsLogger.warn(LTag.PUMPCOMM, "Command unresolved (UNCERTAIN_FAILURE)", verificationException);
throw originalException; throw originalException;
} }
} }

View file

@ -18,12 +18,12 @@ public class AlertConfigurationUtil {
public static AlertConfiguration createExpirationAdvisoryAlertConfiguration(boolean active, Duration timeUntilAlert, Duration duration) { public static AlertConfiguration createExpirationAdvisoryAlertConfiguration(boolean active, Duration timeUntilAlert, Duration duration) {
return new AlertConfiguration(AlertType.EXPIRATION_ADVISORY_ALERT, AlertSlot.SLOT7, active, false, duration, return new AlertConfiguration(AlertType.EXPIRATION_ADVISORY_ALERT, AlertSlot.SLOT7, active, false, duration,
new TimerAlertTrigger(timeUntilAlert), BeepType.BIP_BEEP_BIP_BEEP_BIP_BEEP_BIP_BEEP, BeepRepeat.EVERY_15_MINUTES); new TimerAlertTrigger(timeUntilAlert), BeepType.BIP_BEEP_BIP_BEEP_BIP_BEEP_BIP_BEEP, BeepRepeat.EVERY_MINUTE_FOR_3_MINUTES_REPEAT_EVERY_15_MINUTES);
} }
public static AlertConfiguration createShutdownImminentAlertConfiguration(Duration timeUntilAlert) { public static AlertConfiguration createShutdownImminentAlertConfiguration(Duration timeUntilAlert) {
return new AlertConfiguration(AlertType.SHUTDOWN_IMMINENT_ALARM, AlertSlot.SLOT2, true, false, Duration.ZERO, return new AlertConfiguration(AlertType.SHUTDOWN_IMMINENT_ALARM, AlertSlot.SLOT2, true, false, Duration.ZERO,
new TimerAlertTrigger(timeUntilAlert), BeepType.BIP_BEEP_BIP_BEEP_BIP_BEEP_BIP_BEEP, BeepRepeat.EVERY_MINUTE_FOR_3_MINUTES_REPEAT_EVERY_15_MINUTES); new TimerAlertTrigger(timeUntilAlert), BeepType.BIP_BEEP_BIP_BEEP_BIP_BEEP_BIP_BEEP, BeepRepeat.EVERY_15_MINUTES);
} }
public static AlertConfiguration createAutoOffAlertConfiguration(boolean active, Duration countdownDuration) { public static AlertConfiguration createAutoOffAlertConfiguration(boolean active, Duration countdownDuration) {

View file

@ -2,10 +2,13 @@ package info.nightscout.androidaps.plugins.pump.omnipod.manager;
import org.joda.time.DateTime; import org.joda.time.DateTime;
import org.joda.time.Duration; import org.joda.time.Duration;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.function.Supplier;
import javax.inject.Inject; import javax.inject.Inject;
import javax.inject.Singleton; import javax.inject.Singleton;
@ -14,15 +17,18 @@ import dagger.android.HasAndroidInjector;
import info.nightscout.androidaps.data.DetailedBolusInfo; import info.nightscout.androidaps.data.DetailedBolusInfo;
import info.nightscout.androidaps.data.Profile; import info.nightscout.androidaps.data.Profile;
import info.nightscout.androidaps.data.PumpEnactResult; import info.nightscout.androidaps.data.PumpEnactResult;
import info.nightscout.androidaps.db.CareportalEvent;
import info.nightscout.androidaps.db.OmnipodHistoryRecord; import info.nightscout.androidaps.db.OmnipodHistoryRecord;
import info.nightscout.androidaps.db.Source; import info.nightscout.androidaps.db.Source;
import info.nightscout.androidaps.db.TemporaryBasal; import info.nightscout.androidaps.db.TemporaryBasal;
import info.nightscout.androidaps.events.Event; import info.nightscout.androidaps.events.Event;
import info.nightscout.androidaps.interfaces.ActivePluginProvider; import info.nightscout.androidaps.interfaces.ActivePluginProvider;
import info.nightscout.androidaps.interfaces.DatabaseHelperInterface; import info.nightscout.androidaps.interfaces.DatabaseHelperInterface;
import info.nightscout.androidaps.interfaces.ProfileFunction;
import info.nightscout.androidaps.logging.AAPSLogger; import info.nightscout.androidaps.logging.AAPSLogger;
import info.nightscout.androidaps.logging.LTag; import info.nightscout.androidaps.logging.LTag;
import info.nightscout.androidaps.plugins.bus.RxBusWrapper; import info.nightscout.androidaps.plugins.bus.RxBusWrapper;
import info.nightscout.androidaps.plugins.general.nsclient.NSUpload;
import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification; 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.events.EventNewNotification;
import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress; import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress;
@ -46,10 +52,7 @@ import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.Omnipod
import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.PodInfoType; import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.PodInfoType;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.schedule.BasalSchedule; import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.schedule.BasalSchedule;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.schedule.BasalScheduleEntry; import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.schedule.BasalScheduleEntry;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.ActionInitializationException;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.CommandFailedAfterChangingDeliveryStatusException; import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.CommandFailedAfterChangingDeliveryStatusException;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.CommandInitializationException;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.CommunicationException;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.CrcMismatchException; import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.CrcMismatchException;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.DeliveryStatusVerificationFailedException; import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.DeliveryStatusVerificationFailedException;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.IllegalDeliveryStatusException; import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.IllegalDeliveryStatusException;
@ -66,6 +69,10 @@ import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.NotEnoug
import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.OmnipodException; import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.OmnipodException;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.PodFaultException; import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.PodFaultException;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.PodReturnedErrorResponseException; import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.PodReturnedErrorResponseException;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.RileyLinkInterruptedException;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.RileyLinkTimeoutException;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.RileyLinkUnexpectedException;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.RileyLinkUnreachableException;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.manager.OmnipodManager; import info.nightscout.androidaps.plugins.pump.omnipod.driver.manager.OmnipodManager;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.manager.PodStateManager; import info.nightscout.androidaps.plugins.pump.omnipod.driver.manager.PodStateManager;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.manager.SetupActionResult; import info.nightscout.androidaps.plugins.pump.omnipod.driver.manager.SetupActionResult;
@ -73,9 +80,9 @@ import info.nightscout.androidaps.plugins.pump.omnipod.event.EventOmnipodPumpVal
import info.nightscout.androidaps.plugins.pump.omnipod.rileylink.manager.OmnipodRileyLinkCommunicationManager; import info.nightscout.androidaps.plugins.pump.omnipod.rileylink.manager.OmnipodRileyLinkCommunicationManager;
import info.nightscout.androidaps.plugins.pump.omnipod.util.AapsOmnipodUtil; import info.nightscout.androidaps.plugins.pump.omnipod.util.AapsOmnipodUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.util.OmnipodAlertUtil; import info.nightscout.androidaps.plugins.pump.omnipod.util.OmnipodAlertUtil;
import info.nightscout.androidaps.utils.DateUtil;
import info.nightscout.androidaps.utils.resources.ResourceHelper; import info.nightscout.androidaps.utils.resources.ResourceHelper;
import info.nightscout.androidaps.utils.sharedPreferences.SP; import info.nightscout.androidaps.utils.sharedPreferences.SP;
import io.reactivex.disposables.Disposable;
import io.reactivex.subjects.SingleSubject; import io.reactivex.subjects.SingleSubject;
@Singleton @Singleton
@ -92,6 +99,8 @@ public class AapsOmnipodManager {
private final OmnipodManager delegate; private final OmnipodManager delegate;
private final DatabaseHelperInterface databaseHelper; private final DatabaseHelperInterface databaseHelper;
private final OmnipodAlertUtil omnipodAlertUtil; private final OmnipodAlertUtil omnipodAlertUtil;
private final NSUpload nsUpload;
private final ProfileFunction profileFunction;
private boolean basalBeepsEnabled; private boolean basalBeepsEnabled;
private boolean bolusBeepsEnabled; private boolean bolusBeepsEnabled;
@ -112,20 +121,22 @@ public class AapsOmnipodManager {
HasAndroidInjector injector, HasAndroidInjector injector,
ActivePluginProvider activePlugin, ActivePluginProvider activePlugin,
DatabaseHelperInterface databaseHelper, DatabaseHelperInterface databaseHelper,
OmnipodAlertUtil omnipodAlertUtil) { OmnipodAlertUtil omnipodAlertUtil,
if (podStateManager == null) { NSUpload nsUpload,
throw new IllegalArgumentException("Pod state manager can not be null"); ProfileFunction profileFunction
} ) {
this.podStateManager = podStateManager; this.podStateManager = podStateManager;
this.aapsOmnipodUtil = aapsOmnipodUtil; this.aapsOmnipodUtil = aapsOmnipodUtil;
this.aapsLogger = aapsLogger; this.aapsLogger = aapsLogger;
this.rxBus = rxBus; this.rxBus = rxBus;
this.sp = sp;
this.resourceHelper = resourceHelper; this.resourceHelper = resourceHelper;
this.injector = injector; this.injector = injector;
this.activePlugin = activePlugin; this.activePlugin = activePlugin;
this.databaseHelper = databaseHelper; this.databaseHelper = databaseHelper;
this.sp = sp;
this.omnipodAlertUtil = omnipodAlertUtil; this.omnipodAlertUtil = omnipodAlertUtil;
this.nsUpload = nsUpload;
this.profileFunction = profileFunction;
delegate = new OmnipodManager(aapsLogger, sp, communicationService, podStateManager); delegate = new OmnipodManager(aapsLogger, sp, communicationService, podStateManager);
@ -148,15 +159,15 @@ public class AapsOmnipodManager {
} }
try { try {
Disposable disposable = delegate.pairAndPrime().subscribe(res -> // executeCommand(() -> delegate.pairAndPrime().subscribe(res -> //
handleSetupActionResult(podInitActionType, podInitReceiver, res, System.currentTimeMillis(), null)); handleSetupActionResult(podInitActionType, podInitReceiver, res, System.currentTimeMillis(), null)));
return new PumpEnactResult(injector).success(true).enacted(true); return new PumpEnactResult(injector).success(true).enacted(true);
} catch (Exception ex) { } catch (Exception ex) {
String comment = handleAndTranslateException(ex); String errorMessage = translateException(ex);
podInitReceiver.returnInitTaskStatus(podInitActionType, false, comment); podInitReceiver.returnInitTaskStatus(podInitActionType, false, errorMessage);
addFailureToHistory(System.currentTimeMillis(), PodHistoryEntryType.PAIR_AND_PRIME, comment); addFailureToHistory(System.currentTimeMillis(), PodHistoryEntryType.PAIR_AND_PRIME, errorMessage);
return new PumpEnactResult(injector).success(false).enacted(false).comment(comment); return new PumpEnactResult(injector).success(false).enacted(false).comment(errorMessage);
} }
} }
@ -173,123 +184,126 @@ public class AapsOmnipodManager {
} }
try { try {
BasalSchedule basalSchedule; BasalSchedule basalSchedule = mapProfileToBasalSchedule(profile);
try {
basalSchedule = mapProfileToBasalSchedule(profile); executeCommand(() -> delegate.insertCannula(basalSchedule, omnipodAlertUtil.getExpirationReminderTimeBeforeShutdown(), omnipodAlertUtil.getLowReservoirAlertUnits()).subscribe(res -> //
handleSetupActionResult(podInitActionType, podInitReceiver, res, System.currentTimeMillis(), profile)));
} catch (Exception ex) { } catch (Exception ex) {
throw new CommandInitializationException("Basal profile mapping failed", ex); String errorMessage = translateException(ex);
podInitReceiver.returnInitTaskStatus(podInitActionType, false, errorMessage);
addFailureToHistory(PodHistoryEntryType.FILL_CANNULA_SET_BASAL_PROFILE, errorMessage);
return new PumpEnactResult(injector).success(false).enacted(false).comment(errorMessage);
} }
Disposable disposable = delegate.insertCannula(basalSchedule, omnipodAlertUtil.getExpirationReminderTimeBeforeShutdown(), omnipodAlertUtil.getLowReservoirAlertUnits()).subscribe(res -> // uploadCareportalEvent(System.currentTimeMillis() - 2000, CareportalEvent.PUMPBATTERYCHANGE);
handleSetupActionResult(podInitActionType, podInitReceiver, res, System.currentTimeMillis(), profile)); uploadCareportalEvent(System.currentTimeMillis() - 1000, CareportalEvent.INSULINCHANGE);
uploadCareportalEvent(System.currentTimeMillis(), CareportalEvent.SITECHANGE);
rxBus.send(new EventDismissNotification(Notification.OMNIPOD_POD_NOT_ATTACHED)); rxBus.send(new EventDismissNotification(Notification.OMNIPOD_POD_NOT_ATTACHED));
cancelSuspendedFakeTbrIfExists(); cancelSuspendedFakeTbrIfExists();
return new PumpEnactResult(injector).success(true).enacted(true); return new PumpEnactResult(injector).success(true).enacted(true);
} catch (Exception ex) {
String comment = handleAndTranslateException(ex);
podInitReceiver.returnInitTaskStatus(podInitActionType, false, comment);
addFailureToHistory(PodHistoryEntryType.FILL_CANNULA_SET_BASAL_PROFILE, comment);
return new PumpEnactResult(injector).success(false).enacted(false).comment(comment);
}
} }
public PumpEnactResult configureAlerts(List<AlertConfiguration> alertConfigurations) { public PumpEnactResult configureAlerts(List<AlertConfiguration> alertConfigurations) {
try { try {
StatusResponse statusResponse = delegate.configureAlerts(alertConfigurations); executeCommand(() -> delegate.configureAlerts(alertConfigurations));
} catch (Exception ex) {
String errorMessage = translateException(ex);
addFailureToHistory(PodHistoryEntryType.CONFIGURE_ALERTS, errorMessage);
return new PumpEnactResult(injector).success(false).enacted(false).comment(errorMessage);
}
addSuccessToHistory(PodHistoryEntryType.CONFIGURE_ALERTS, alertConfigurations); addSuccessToHistory(PodHistoryEntryType.CONFIGURE_ALERTS, alertConfigurations);
return new PumpEnactResult(injector).success(true).enacted(false); return new PumpEnactResult(injector).success(true).enacted(false);
} catch (Exception ex) {
String comment = handleAndTranslateException(ex);
addFailureToHistory(PodHistoryEntryType.CONFIGURE_ALERTS, comment);
return new PumpEnactResult(injector).success(false).enacted(false).comment(comment);
}
} }
public PumpEnactResult getPodStatus() { public PumpEnactResult getPodStatus() {
StatusResponse statusResponse;
try { try {
StatusResponse statusResponse = delegate.getPodStatus(); statusResponse = executeCommand(delegate::getPodStatus);
} catch (Exception ex) {
String errorMessage = translateException(ex);
addFailureToHistory(PodHistoryEntryType.GET_POD_STATUS, errorMessage);
return new PumpEnactResult(injector).success(false).enacted(false).comment(errorMessage);
}
addSuccessToHistory(PodHistoryEntryType.GET_POD_STATUS, statusResponse); addSuccessToHistory(PodHistoryEntryType.GET_POD_STATUS, statusResponse);
return new PumpEnactResult(injector).success(true).enacted(false); return new PumpEnactResult(injector).success(true).enacted(false);
} catch (Exception ex) {
String comment = handleAndTranslateException(ex);
addFailureToHistory(PodHistoryEntryType.GET_POD_STATUS, comment);
return new PumpEnactResult(injector).success(false).enacted(false).comment(comment);
}
} }
public PumpEnactResult deactivatePod(PodInitReceiver podInitReceiver) { public PumpEnactResult deactivatePod(PodInitReceiver podInitReceiver) {
try { try {
delegate.deactivatePod(); executeCommand(delegate::deactivatePod);
} catch (Exception ex) { } catch (Exception ex) {
String comment = handleAndTranslateException(ex); String errorMessage = translateException(ex);
podInitReceiver.returnInitTaskStatus(PodInitActionType.DEACTIVATE_POD_WIZARD_STEP, false, comment); podInitReceiver.returnInitTaskStatus(PodInitActionType.DEACTIVATE_POD_WIZARD_STEP, false, errorMessage);
addFailureToHistory(PodHistoryEntryType.DEACTIVATE_POD, comment); addFailureToHistory(PodHistoryEntryType.DEACTIVATE_POD, errorMessage);
return new PumpEnactResult(injector).success(false).enacted(false).comment(comment); return new PumpEnactResult(injector).success(false).enacted(false).comment(errorMessage);
} }
addSuccessToHistory(PodHistoryEntryType.DEACTIVATE_POD, null); addSuccessToHistory(PodHistoryEntryType.DEACTIVATE_POD, null);
createSuspendedFakeTbrIfNotExists(); createSuspendedFakeTbrIfNotExists();
podInitReceiver.returnInitTaskStatus(PodInitActionType.DEACTIVATE_POD_WIZARD_STEP, true, null); podInitReceiver.returnInitTaskStatus(PodInitActionType.DEACTIVATE_POD_WIZARD_STEP, true, null);
return new PumpEnactResult(injector).success(true).enacted(true); return new PumpEnactResult(injector).success(true).enacted(true);
} }
public PumpEnactResult setBasalProfile(Profile profile) { public PumpEnactResult setBasalProfile(Profile profile, boolean showNotifications) {
if (profile == null) { if (profile == null) {
String comment = getStringResource(R.string.omnipod_error_failed_to_set_profile_empty_profile); String note = getStringResource(R.string.omnipod_error_failed_to_set_profile_empty_profile);
showNotification(Notification.FAILED_UDPATE_PROFILE, comment, Notification.URGENT, R.raw.boluserror); showNotification(Notification.FAILED_UDPATE_PROFILE, note, Notification.URGENT, R.raw.boluserror);
return new PumpEnactResult(injector).success(false).enacted(false).comment(comment); return new PumpEnactResult(injector).success(false).enacted(false).comment(note);
} }
PodHistoryEntryType historyEntryType = podStateManager.isSuspended() ? PodHistoryEntryType.RESUME_DELIVERY : PodHistoryEntryType.SET_BASAL_SCHEDULE; PodHistoryEntryType historyEntryType = podStateManager.isSuspended() ? PodHistoryEntryType.RESUME_DELIVERY : PodHistoryEntryType.SET_BASAL_SCHEDULE;
try { try {
BasalSchedule basalSchedule; BasalSchedule basalSchedule = mapProfileToBasalSchedule(profile);
try { executeCommand(() -> delegate.setBasalSchedule(basalSchedule, isBasalBeepsEnabled()));
basalSchedule = mapProfileToBasalSchedule(profile); } catch (CommandFailedAfterChangingDeliveryStatusException ex) {
} catch (Exception ex) { createSuspendedFakeTbrIfNotExists();
throw new CommandInitializationException("Basal profile mapping failed", ex); if (showNotifications) {
showNotification(Notification.FAILED_UDPATE_PROFILE, getStringResource(R.string.omnipod_error_set_basal_failed_delivery_suspended), Notification.URGENT, R.raw.boluserror);
}
String errorMessage = translateException(ex.getCause());
addFailureToHistory(historyEntryType, errorMessage);
return new PumpEnactResult(injector).success(false).enacted(false).comment(errorMessage);
} catch (DeliveryStatusVerificationFailedException ex) {
if (showNotifications) {
String note;
if (ex.getExpectedStatus() == DeliveryStatus.SUSPENDED) {
// Happened when suspending delivery before setting the new profile
note = getStringResource(R.string.omnipod_error_set_basal_failed_delivery_might_be_suspended);
} else {
// Happened when setting the new profile (after suspending delivery)
note = getStringResource(R.string.omnipod_error_set_basal_might_have_failed_delivery_might_be_suspended);
}
showNotification(Notification.FAILED_UDPATE_PROFILE, note, Notification.URGENT, R.raw.boluserror);
}
String errorMessage = translateException(ex.getCause());
addFailureToHistory(historyEntryType, errorMessage);
return new PumpEnactResult(injector).success(false).enacted(false).comment(errorMessage);
} catch (Exception ex) {
if (showNotifications) {
showNotification(Notification.FAILED_UDPATE_PROFILE, getStringResource(R.string.omnipod_error_set_basal_failed), Notification.URGENT, R.raw.boluserror);
}
String errorMessage = translateException(ex);
addFailureToHistory(historyEntryType, errorMessage);
return new PumpEnactResult(injector).success(false).enacted(false).comment(errorMessage);
} }
delegate.setBasalSchedule(basalSchedule, isBasalBeepsEnabled());
if (historyEntryType == PodHistoryEntryType.RESUME_DELIVERY) { if (historyEntryType == PodHistoryEntryType.RESUME_DELIVERY) {
cancelSuspendedFakeTbrIfExists(); cancelSuspendedFakeTbrIfExists();
rxBus.send(new EventDismissNotification(Notification.OMNIPOD_POD_SUSPENDED));
} }
addSuccessToHistory(historyEntryType, profile.getBasalValues()); addSuccessToHistory(historyEntryType, profile.getBasalValues());
} catch (CommandFailedAfterChangingDeliveryStatusException ex) {
createSuspendedFakeTbrIfNotExists();
String comment = getStringResource(R.string.omnipod_error_set_basal_failed_delivery_suspended);
showNotification(Notification.FAILED_UDPATE_PROFILE, comment, Notification.URGENT, R.raw.boluserror);
addFailureToHistory(historyEntryType, comment);
return new PumpEnactResult(injector).success(false).enacted(false).comment(comment);
} catch (DeliveryStatusVerificationFailedException ex) {
String comment;
if (ex.getExpectedStatus() == DeliveryStatus.SUSPENDED) {
// Happened when suspending delivery before setting the new profile
comment = getStringResource(R.string.omnipod_error_set_basal_failed_delivery_might_be_suspended);
} else {
// Happened when setting the new profile (after suspending delivery)
comment = getStringResource(R.string.omnipod_error_set_basal_might_have_failed_delivery_might_be_suspended);
}
showNotification(Notification.FAILED_UDPATE_PROFILE, comment, Notification.URGENT, R.raw.boluserror);
addFailureToHistory(historyEntryType, comment);
return new PumpEnactResult(injector).success(false).enacted(false).comment(comment);
} catch (Exception ex) {
String comment = handleAndTranslateException(ex);
showNotification(Notification.FAILED_UDPATE_PROFILE, comment, Notification.URGENT, R.raw.boluserror);
addFailureToHistory(historyEntryType, comment);
return new PumpEnactResult(injector).success(false).enacted(false).comment(comment);
}
rxBus.send(new EventDismissNotification(Notification.OMNIPOD_POD_SUSPENDED)); if (showNotifications) {
showNotification(Notification.PROFILE_SET_OK, showNotification(Notification.PROFILE_SET_OK, resourceHelper.gs(R.string.profile_set_ok), Notification.INFO, null);
resourceHelper.gs(R.string.profile_set_ok), }
Notification.INFO, null);
return new PumpEnactResult(injector).success(true).enacted(true); return new PumpEnactResult(injector).success(true).enacted(true);
} }
@ -297,7 +311,7 @@ public class AapsOmnipodManager {
public PumpEnactResult discardPodState() { public PumpEnactResult discardPodState() {
podStateManager.discardState(); podStateManager.discardState();
addSuccessToHistory(System.currentTimeMillis(), PodHistoryEntryType.RESET_POD_STATE, null); addSuccessToHistory(System.currentTimeMillis(), PodHistoryEntryType.DISCARD_POD_STATE, null);
createSuspendedFakeTbrIfNotExists(); createSuspendedFakeTbrIfNotExists();
@ -311,27 +325,27 @@ public class AapsOmnipodManager {
Date bolusStarted; Date bolusStarted;
try { try {
bolusCommandResult = delegate.bolus(PumpType.Insulet_Omnipod.determineCorrectBolusSize(detailedBolusInfo.insulin), beepsEnabled, beepsEnabled, detailedBolusInfo.isSMB ? null : bolusCommandResult = executeCommand(() -> delegate.bolus(PumpType.Insulet_Omnipod.determineCorrectBolusSize(detailedBolusInfo.insulin), beepsEnabled, beepsEnabled, detailedBolusInfo.isSMB ? null :
(estimatedUnitsDelivered, percentage) -> { (estimatedUnitsDelivered, percentage) -> {
EventOverviewBolusProgress progressUpdateEvent = EventOverviewBolusProgress.INSTANCE; EventOverviewBolusProgress progressUpdateEvent = EventOverviewBolusProgress.INSTANCE;
progressUpdateEvent.setStatus(getStringResource(R.string.bolusdelivering, detailedBolusInfo.insulin)); progressUpdateEvent.setStatus(getStringResource(R.string.bolusdelivering, detailedBolusInfo.insulin));
progressUpdateEvent.setPercent(percentage); progressUpdateEvent.setPercent(percentage);
sendEvent(progressUpdateEvent); sendEvent(progressUpdateEvent);
}); }));
bolusStarted = new Date(); bolusStarted = new Date();
} catch (Exception ex) { } catch (Exception ex) {
String comment = handleAndTranslateException(ex); String errorMessage = translateException(ex);
addFailureToHistory(System.currentTimeMillis(), PodHistoryEntryType.SET_BOLUS, comment); addFailureToHistory(System.currentTimeMillis(), PodHistoryEntryType.SET_BOLUS, errorMessage);
return new PumpEnactResult(injector).success(false).enacted(false).comment(comment); return new PumpEnactResult(injector).success(false).enacted(false).comment(errorMessage);
} }
if (OmnipodManager.CommandDeliveryStatus.UNCERTAIN_FAILURE.equals(bolusCommandResult.getCommandDeliveryStatus())) { if (OmnipodManager.CommandDeliveryStatus.UNCERTAIN_FAILURE.equals(bolusCommandResult.getCommandDeliveryStatus())) {
// For safety reasons, we treat this as a bolus that has successfully been delivered, in order to prevent insulin overdose // For safety reasons, we treat this as a bolus that has successfully been delivered, in order to prevent insulin overdose
if (detailedBolusInfo.isSMB) { if (detailedBolusInfo.isSMB) {
showNotification(getStringResource(R.string.omnipod_bolus_failed_uncertain_smb, detailedBolusInfo.insulin), Notification.URGENT, R.raw.boluserror); showNotification(getStringResource(R.string.omnipod_error_bolus_failed_uncertain_smb, detailedBolusInfo.insulin), Notification.URGENT, R.raw.boluserror);
} else { } else {
showNotification(getStringResource(R.string.omnipod_bolus_failed_uncertain), Notification.URGENT, R.raw.boluserror); showNotification(getStringResource(R.string.omnipod_error_bolus_failed_uncertain), Notification.URGENT, R.raw.boluserror);
} }
} }
@ -391,7 +405,7 @@ public class AapsOmnipodManager {
aapsLogger.debug(LTag.PUMP, "Bolus command successfully executed. Proceeding bolus cancellation"); aapsLogger.debug(LTag.PUMP, "Bolus command successfully executed. Proceeding bolus cancellation");
} else { } else {
aapsLogger.debug(LTag.PUMP, "Not cancelling bolus: bolus command failed"); aapsLogger.debug(LTag.PUMP, "Not cancelling bolus: bolus command failed");
String comment = getStringResource(R.string.omnipod_bolus_did_not_succeed); String comment = getStringResource(R.string.omnipod_error_bolus_did_not_succeed);
addFailureToHistory(System.currentTimeMillis(), PodHistoryEntryType.CANCEL_BOLUS, comment); addFailureToHistory(System.currentTimeMillis(), PodHistoryEntryType.CANCEL_BOLUS, comment);
return new PumpEnactResult(injector).success(true).enacted(false).comment(comment); return new PumpEnactResult(injector).success(true).enacted(false).comment(comment);
} }
@ -400,19 +414,19 @@ public class AapsOmnipodManager {
String comment = null; String comment = null;
for (int i = 1; delegate.hasActiveBolus(); i++) { for (int i = 1; delegate.hasActiveBolus(); i++) {
aapsLogger.debug(LTag.PUMP, "Attempting to cancel bolus (#{})", i); aapsLogger.debug(LTag.PUMP, "Attempting to cancel bolus (#{})", i);
try { try {
delegate.cancelBolus(isBolusBeepsEnabled()); executeCommand(() -> delegate.cancelBolus(isBolusBeepsEnabled()));
aapsLogger.debug(LTag.PUMP, "Successfully cancelled bolus", i); aapsLogger.debug(LTag.PUMP, "Successfully cancelled bolus", i);
addSuccessToHistory(System.currentTimeMillis(), PodHistoryEntryType.CANCEL_BOLUS, null); addSuccessToHistory(System.currentTimeMillis(), PodHistoryEntryType.CANCEL_BOLUS, null);
return new PumpEnactResult(injector).success(true).enacted(true); return new PumpEnactResult(injector).success(true).enacted(true);
} catch (PodFaultException ex) { } catch (PodFaultException ex) {
aapsLogger.debug(LTag.PUMP, "Successfully cancelled bolus (implicitly because of a Pod Fault)"); aapsLogger.debug(LTag.PUMP, "Successfully cancelled bolus (implicitly because of a Pod Fault)");
showPodFaultNotification(ex.getFaultEvent().getFaultEventCode());
addSuccessToHistory(System.currentTimeMillis(), PodHistoryEntryType.CANCEL_BOLUS, null); addSuccessToHistory(System.currentTimeMillis(), PodHistoryEntryType.CANCEL_BOLUS, null);
return new PumpEnactResult(injector).success(true).enacted(true); return new PumpEnactResult(injector).success(true).enacted(true);
} catch (Exception ex) { } catch (Exception ex) {
aapsLogger.debug(LTag.PUMP, "Failed to cancel bolus", ex); aapsLogger.debug(LTag.PUMP, "Failed to cancel bolus", ex);
comment = handleAndTranslateException(ex); comment = translateException(ex);
} }
} }
@ -423,19 +437,18 @@ public class AapsOmnipodManager {
public PumpEnactResult setTemporaryBasal(TempBasalPair tempBasalPair) { public PumpEnactResult setTemporaryBasal(TempBasalPair tempBasalPair) {
boolean beepsEnabled = isTbrBeepsEnabled(); boolean beepsEnabled = isTbrBeepsEnabled();
try { try {
delegate.setTemporaryBasal(PumpType.Insulet_Omnipod.determineCorrectBasalSize(tempBasalPair.getInsulinRate()), Duration.standardMinutes(tempBasalPair.getDurationMinutes()), beepsEnabled, beepsEnabled); executeCommand(() -> delegate.setTemporaryBasal(PumpType.Insulet_Omnipod.determineCorrectBasalSize(tempBasalPair.getInsulinRate()), Duration.standardMinutes(tempBasalPair.getDurationMinutes()), beepsEnabled, beepsEnabled));
} catch (CommandFailedAfterChangingDeliveryStatusException ex) { } catch (CommandFailedAfterChangingDeliveryStatusException ex) {
String comment = getStringResource(R.string.omnipod_cancelled_old_tbr_failed_to_set_new); String errorMessage = translateException(ex.getCause());
addFailureToHistory(PodHistoryEntryType.SET_TEMPORARY_BASAL, comment); addFailureToHistory(PodHistoryEntryType.SET_TEMPORARY_BASAL, errorMessage);
showNotification(comment, Notification.NORMAL, null); return new PumpEnactResult(injector).success(false).enacted(false).comment(errorMessage);
return new PumpEnactResult(injector).success(false).enacted(false).comment(comment);
} catch (DeliveryStatusVerificationFailedException ex) { } catch (DeliveryStatusVerificationFailedException ex) {
String comment; String errorMessage = translateException(ex.getCause());
String note;
if (ex.getExpectedStatus() == DeliveryStatus.TEMP_BASAL_RUNNING) { if (ex.getExpectedStatus() == DeliveryStatus.TEMP_BASAL_RUNNING) {
// Happened after cancelling the old TBR, when attempting to set new TBR // Happened after cancelling the old TBR, when attempting to set new TBR
note = getStringResource(R.string.omnipod_error_set_temp_basal_failed_old_tbr_cancelled_new_might_have_failed);
comment = getStringResource(R.string.omnipod_error_set_temp_basal_failed_old_tbr_cancelled_new_might_have_failed);
long pumpId = addFailureToHistory(PodHistoryEntryType.SET_TEMPORARY_BASAL, comment);
// Assume that setting the temp basal succeeded here, because in case it didn't succeed, // Assume that setting the temp basal succeeded here, because in case it didn't succeed,
// The next StatusResponse that we receive will allow us to recover from the wrong state // The next StatusResponse that we receive will allow us to recover from the wrong state
@ -443,19 +456,20 @@ public class AapsOmnipodManager {
// If we would assume that the TBR didn't succeed, we couldn't properly recover upon the next StatusResponse, // If we would assume that the TBR didn't succeed, we couldn't properly recover upon the next StatusResponse,
// as we could only see that the Pod is running a TBR, but we don't know the rate and duration as // as we could only see that the Pod is running a TBR, but we don't know the rate and duration as
// the Pod doesn't provide this information // the Pod doesn't provide this information
long pumpId = addFailureToHistory(PodHistoryEntryType.SET_TEMPORARY_BASAL, errorMessage);
addTempBasalTreatment(System.currentTimeMillis(), pumpId, tempBasalPair); addTempBasalTreatment(System.currentTimeMillis(), pumpId, tempBasalPair);
} else { } else {
// Happened when attempting to cancel the old TBR // Happened when attempting to cancel the old TBR
comment = getStringResource(R.string.omnipod_error_set_temp_basal_failed_old_tbr_might_be_cancelled); note = getStringResource(R.string.omnipod_error_set_temp_basal_failed_old_tbr_might_be_cancelled);
addFailureToHistory(PodHistoryEntryType.SET_TEMPORARY_BASAL, comment); addFailureToHistory(PodHistoryEntryType.SET_TEMPORARY_BASAL, errorMessage);
} }
showNotification(note, Notification.URGENT, R.raw.boluserror);
showNotification(comment, Notification.URGENT, R.raw.boluserror); return new PumpEnactResult(injector).success(false).enacted(false).comment(errorMessage);
return new PumpEnactResult(injector).success(false).enacted(false).comment(comment);
} catch (Exception ex) { } catch (Exception ex) {
String comment = handleAndTranslateException(ex); String errorMessage = translateException(ex);
addFailureToHistory(PodHistoryEntryType.SET_TEMPORARY_BASAL, comment); addFailureToHistory(PodHistoryEntryType.SET_TEMPORARY_BASAL, errorMessage);
return new PumpEnactResult(injector).success(false).enacted(false).comment(comment); return new PumpEnactResult(injector).success(false).enacted(false).comment(errorMessage);
} }
long pumpId = addSuccessToHistory(PodHistoryEntryType.SET_TEMPORARY_BASAL, tempBasalPair); long pumpId = addSuccessToHistory(PodHistoryEntryType.SET_TEMPORARY_BASAL, tempBasalPair);
@ -467,17 +481,14 @@ public class AapsOmnipodManager {
public PumpEnactResult cancelTemporaryBasal() { public PumpEnactResult cancelTemporaryBasal() {
try { try {
delegate.cancelTemporaryBasal(isTbrBeepsEnabled()); executeCommand(() -> delegate.cancelTemporaryBasal(isTbrBeepsEnabled()));
} catch (Exception ex) { } catch (Exception ex) {
String comment;
if (ex instanceof OmnipodException && !((OmnipodException) ex).isCertainFailure()) { if (ex instanceof OmnipodException && !((OmnipodException) ex).isCertainFailure()) {
comment = getStringResource(R.string.omnipod_error_cancel_temp_basal_failed_uncertain); showNotification(getStringResource(R.string.omnipod_error_cancel_temp_basal_failed_uncertain), Notification.URGENT, R.raw.boluserror);
showNotification(comment, Notification.URGENT, R.raw.boluserror);
} else {
comment = handleAndTranslateException(ex);
} }
addFailureToHistory(PodHistoryEntryType.CANCEL_TEMPORARY_BASAL, comment); String errorMessage = translateException(ex);
return new PumpEnactResult(injector).success(false).enacted(false).comment(comment); addFailureToHistory(PodHistoryEntryType.CANCEL_TEMPORARY_BASAL, errorMessage);
return new PumpEnactResult(injector).success(false).enacted(false).comment(errorMessage);
} }
long pumpId = addSuccessToHistory(PodHistoryEntryType.CANCEL_TEMPORARY_BASAL, null); long pumpId = addSuccessToHistory(PodHistoryEntryType.CANCEL_TEMPORARY_BASAL, null);
@ -495,59 +506,63 @@ public class AapsOmnipodManager {
public PumpEnactResult acknowledgeAlerts() { public PumpEnactResult acknowledgeAlerts() {
try { try {
delegate.acknowledgeAlerts(); executeCommand(delegate::acknowledgeAlerts);
addSuccessToHistory(PodHistoryEntryType.ACKNOWLEDGE_ALERTS, null);
} catch (Exception ex) { } catch (Exception ex) {
String comment = handleAndTranslateException(ex); String errorMessage = translateException(ex);
addFailureToHistory(PodHistoryEntryType.ACKNOWLEDGE_ALERTS, comment); addFailureToHistory(PodHistoryEntryType.ACKNOWLEDGE_ALERTS, errorMessage);
return new PumpEnactResult(injector).success(false).enacted(false).comment(comment); return new PumpEnactResult(injector).success(false).enacted(false).comment(errorMessage);
} }
addSuccessToHistory(PodHistoryEntryType.ACKNOWLEDGE_ALERTS, null);
return new PumpEnactResult(injector).success(true).enacted(true); return new PumpEnactResult(injector).success(true).enacted(true);
} }
public PumpEnactResult suspendDelivery() { public PumpEnactResult suspendDelivery() {
try { try {
delegate.suspendDelivery(isBasalBeepsEnabled()); executeCommand(() -> delegate.suspendDelivery(isBasalBeepsEnabled()));
} catch (Exception ex) { } catch (Exception ex) {
String comment = handleAndTranslateException(ex); String errorMessage = translateException(ex);
addFailureToHistory(PodHistoryEntryType.SUSPEND_DELIVERY, comment); addFailureToHistory(PodHistoryEntryType.SUSPEND_DELIVERY, errorMessage);
return new PumpEnactResult(injector).success(false).enacted(false).comment(comment); return new PumpEnactResult(injector).success(false).enacted(false).comment(errorMessage);
} }
addSuccessToHistory(PodHistoryEntryType.SUSPEND_DELIVERY, null); addSuccessToHistory(PodHistoryEntryType.SUSPEND_DELIVERY, null);
createSuspendedFakeTbrIfNotExists(); createSuspendedFakeTbrIfNotExists();
return new PumpEnactResult(injector).success(true).enacted(true); return new PumpEnactResult(injector).success(true).enacted(true);
} }
// Updates the pods current time based on the device timezone and the pod's time zone // Updates the pods current time based on the device timezone and the pod's time zone
public PumpEnactResult setTime() { public PumpEnactResult setTime(boolean showNotifications) {
try { try {
delegate.setTime(isBasalBeepsEnabled()); executeCommand(() -> delegate.setTime(isBasalBeepsEnabled()));
addSuccessToHistory(PodHistoryEntryType.SET_TIME, null);
} catch (CommandFailedAfterChangingDeliveryStatusException ex) { } catch (CommandFailedAfterChangingDeliveryStatusException ex) {
createSuspendedFakeTbrIfNotExists(); createSuspendedFakeTbrIfNotExists();
String comment = getStringResource(R.string.omnipod_error_set_time_failed_delivery_suspended); if (showNotifications) {
showNotification(comment, Notification.URGENT, R.raw.boluserror); showNotification(getStringResource(R.string.omnipod_error_set_time_failed_delivery_suspended), Notification.URGENT, R.raw.boluserror);
addFailureToHistory(PodHistoryEntryType.SET_TIME, comment); }
return new PumpEnactResult(injector).success(false).enacted(false).comment(comment); String errorMessage = translateException(ex.getCause());
addFailureToHistory(PodHistoryEntryType.SET_TIME, errorMessage);
return new PumpEnactResult(injector).success(false).enacted(false).comment(errorMessage);
} catch (DeliveryStatusVerificationFailedException ex) { } catch (DeliveryStatusVerificationFailedException ex) {
String comment = getStringResource(R.string.omnipod_error_set_time_failed_delivery_might_be_suspended); if (showNotifications) {
showNotification(comment, Notification.URGENT, R.raw.boluserror); showNotification(getStringResource(R.string.omnipod_error_set_time_failed_delivery_might_be_suspended), Notification.URGENT, R.raw.boluserror);
addFailureToHistory(PodHistoryEntryType.SET_TIME, comment); }
return new PumpEnactResult(injector).success(false).enacted(false).comment(comment); String errorMessage = translateException(ex.getCause());
addFailureToHistory(PodHistoryEntryType.SET_TIME, errorMessage);
return new PumpEnactResult(injector).success(false).enacted(false).comment(errorMessage);
} catch (Exception ex) { } catch (Exception ex) {
String comment = handleAndTranslateException(ex); String errorMessage = translateException(ex);
addFailureToHistory(PodHistoryEntryType.SET_TIME, comment); addFailureToHistory(PodHistoryEntryType.SET_TIME, errorMessage);
return new PumpEnactResult(injector).success(false).enacted(false).comment(comment); return new PumpEnactResult(injector).success(false).enacted(false).comment(errorMessage);
} }
addSuccessToHistory(PodHistoryEntryType.SET_TIME, null);
return new PumpEnactResult(injector).success(true).enacted(true); return new PumpEnactResult(injector).success(true).enacted(true);
} }
public PodInfoRecentPulseLog readPulseLog() { public PodInfoRecentPulseLog readPulseLog() {
PodInfoResponse response = delegate.getPodInfo(PodInfoType.RECENT_PULSE_LOG); PodInfoResponse response = executeCommand(() -> delegate.getPodInfo(PodInfoType.RECENT_PULSE_LOG));
return (PodInfoRecentPulseLog) response.getPodInfo(); return (PodInfoRecentPulseLog) response.getPodInfo();
} }
@ -715,12 +730,12 @@ public class AapsOmnipodManager {
switch (res.getResultType()) { switch (res.getResultType()) {
case FAILURE: { case FAILURE: {
aapsLogger.error(LTag.PUMP, "Setup action failed: illegal setup progress: {}", res.getPodProgressStatus()); aapsLogger.error(LTag.PUMP, "Setup action failed: illegal setup progress: {}", res.getPodProgressStatus());
comment = getStringResource(R.string.omnipod_driver_error_invalid_progress_state, res.getPodProgressStatus()); comment = getStringResource(R.string.omnipod_error_invalid_progress_state, res.getPodProgressStatus());
} }
break; break;
case VERIFICATION_FAILURE: { case VERIFICATION_FAILURE: {
aapsLogger.error(LTag.PUMP, "Setup action verification failed: caught exception", res.getException()); aapsLogger.error(LTag.PUMP, "Setup action verification failed: caught exception", res.getException());
comment = getStringResource(R.string.omnipod_driver_error_setup_action_verification_failed); comment = getStringResource(R.string.omnipod_error_setup_action_verification_failed);
} }
break; break;
} }
@ -734,54 +749,78 @@ public class AapsOmnipodManager {
podInitReceiver.returnInitTaskStatus(podInitActionType, res.getResultType().isSuccess(), comment); podInitReceiver.returnInitTaskStatus(podInitActionType, res.getResultType().isSuccess(), comment);
} }
private String handleAndTranslateException(Exception ex) { private void executeCommand(Runnable runnable) {
String comment; try {
runnable.run();
if (ex instanceof OmnipodException) { } catch (Exception ex) {
if (ex instanceof ActionInitializationException || ex instanceof CommandInitializationException) { handleException(ex);
comment = getStringResource(R.string.omnipod_driver_error_invalid_parameters); throw ex;
} else if (ex instanceof CommunicationException) {
if (((CommunicationException) ex).getType() == CommunicationException.Type.TIMEOUT) {
comment = getStringResource(R.string.omnipod_driver_error_communication_failed_timeout);
} else {
comment = getStringResource(R.string.omnipod_driver_error_communication_failed_unexpected_exception);
} }
} else if (ex instanceof CrcMismatchException) { }
comment = getStringResource(R.string.omnipod_driver_error_crc_mismatch);
} else if (ex instanceof IllegalPacketTypeException) { private <T> T executeCommand(Supplier<T> supplier) {
comment = getStringResource(R.string.omnipod_driver_error_invalid_packet_type); try {
} else if (ex instanceof IllegalPodProgressException || ex instanceof IllegalDeliveryStatusException) { return supplier.get();
comment = getStringResource(R.string.omnipod_driver_error_invalid_progress_state); } catch (Exception ex) {
} else if (ex instanceof IllegalVersionResponseTypeException) { handleException(ex);
comment = getStringResource(R.string.omnipod_driver_error_invalid_response); throw ex;
} else if (ex instanceof IllegalResponseException) { }
comment = getStringResource(R.string.omnipod_driver_error_invalid_response); }
} else if (ex instanceof IllegalMessageSequenceNumberException) {
comment = getStringResource(R.string.omnipod_driver_error_invalid_message_sequence_number); private void handleException(Exception ex) {
} else if (ex instanceof IllegalMessageAddressException) { if (ex instanceof OmnipodException) {
comment = getStringResource(R.string.omnipod_driver_error_invalid_message_address); aapsLogger.error(LTag.PUMP, String.format("Caught OmnipodException[certainFailure=%s] from OmnipodManager", ((OmnipodException) ex).isCertainFailure()), ex);
} else if (ex instanceof MessageDecodingException) { if (ex instanceof PodFaultException) {
comment = getStringResource(R.string.omnipod_driver_error_message_decoding_failed);
} else if (ex instanceof NonceOutOfSyncException) {
comment = getStringResource(R.string.omnipod_driver_error_nonce_out_of_sync);
} else if (ex instanceof NonceResyncException) {
comment = getStringResource(R.string.omnipod_driver_error_nonce_resync_failed);
} else if (ex instanceof NotEnoughDataException) {
comment = getStringResource(R.string.omnipod_driver_error_not_enough_data);
} else if (ex instanceof PodFaultException) {
FaultEventCode faultEventCode = ((PodFaultException) ex).getFaultEvent().getFaultEventCode(); FaultEventCode faultEventCode = ((PodFaultException) ex).getFaultEvent().getFaultEventCode();
showPodFaultNotification(faultEventCode); showPodFaultNotification(faultEventCode);
}
} else {
aapsLogger.error(LTag.PUMP, "Caught an unexpected non-OmnipodException from OmnipodManager", ex);
}
}
public String translateException(Throwable ex) {
String comment;
if (ex instanceof CrcMismatchException) {
comment = getStringResource(R.string.omnipod_error_crc_mismatch);
} else if (ex instanceof IllegalPacketTypeException) {
comment = getStringResource(R.string.omnipod_error_invalid_packet_type);
} else if (ex instanceof IllegalPodProgressException || ex instanceof IllegalDeliveryStatusException) {
comment = getStringResource(R.string.omnipod_error_invalid_progress_state);
} else if (ex instanceof IllegalVersionResponseTypeException) {
comment = getStringResource(R.string.omnipod_error_invalid_response);
} else if (ex instanceof IllegalResponseException) {
comment = getStringResource(R.string.omnipod_error_invalid_response);
} else if (ex instanceof IllegalMessageSequenceNumberException) {
comment = getStringResource(R.string.omnipod_error_invalid_message_sequence_number);
} else if (ex instanceof IllegalMessageAddressException) {
comment = getStringResource(R.string.omnipod_error_invalid_message_address);
} else if (ex instanceof MessageDecodingException) {
comment = getStringResource(R.string.omnipod_error_message_decoding_failed);
} else if (ex instanceof NonceOutOfSyncException) {
comment = getStringResource(R.string.omnipod_error_nonce_out_of_sync);
} else if (ex instanceof NonceResyncException) {
comment = getStringResource(R.string.omnipod_error_nonce_resync_failed);
} else if (ex instanceof NotEnoughDataException) {
comment = getStringResource(R.string.omnipod_error_not_enough_data);
} else if (ex instanceof PodFaultException) {
FaultEventCode faultEventCode = ((PodFaultException) ex).getFaultEvent().getFaultEventCode();
comment = createPodFaultErrorMessage(faultEventCode); comment = createPodFaultErrorMessage(faultEventCode);
} else if (ex instanceof PodReturnedErrorResponseException) { } else if (ex instanceof PodReturnedErrorResponseException) {
comment = getStringResource(R.string.omnipod_driver_error_pod_returned_error_response); comment = getStringResource(R.string.omnipod_error_pod_returned_error_response);
} else if (ex instanceof RileyLinkUnreachableException) {
comment = getStringResource(R.string.omnipod_error_communication_failed_no_response_from_riley_link);
} else if (ex instanceof RileyLinkInterruptedException) {
comment = getStringResource(R.string.omnipod_error_communication_failed_riley_link_interrupted);
} else if (ex instanceof RileyLinkTimeoutException) {
comment = getStringResource(R.string.omnipod_error_communication_failed_no_response_from_pod);
} else if (ex instanceof RileyLinkUnexpectedException) {
Throwable cause = ex.getCause();
comment = getStringResource(R.string.omnipod_error_unexpected_exception, cause.getClass().getName(), cause.getMessage());
} else { } else {
// Shouldn't be reachable // Shouldn't be reachable
comment = getStringResource(R.string.omnipod_driver_error_unexpected_exception_type, ex.getClass().getName()); comment = getStringResource(R.string.omnipod_error_unexpected_exception, ex.getClass().getName(), ex.getMessage());
}
aapsLogger.error(LTag.PUMP, String.format("Caught OmnipodException[certainFailure=%s] from OmnipodManager (user-friendly error message: %s)", ((OmnipodException) ex).isCertainFailure(), comment), ex);
} else {
comment = getStringResource(R.string.omnipod_driver_error_unexpected_exception_type, ex.getClass().getName(), ex.getMessage());
aapsLogger.error(LTag.PUMP, String.format("Caught unexpected exception type[certainFailure=false] from OmnipodManager (user-friendly error message: %s)", comment), ex);
} }
return comment; return comment;
@ -789,7 +828,7 @@ public class AapsOmnipodManager {
private String createPodFaultErrorMessage(FaultEventCode faultEventCode) { private String createPodFaultErrorMessage(FaultEventCode faultEventCode) {
String comment; String comment;
comment = getStringResource(R.string.omnipod_driver_error_pod_fault, comment = getStringResource(R.string.omnipod_error_pod_fault,
ByteUtil.convertUnsignedByteToInt(faultEventCode.getValue()), faultEventCode.name()); ByteUtil.convertUnsignedByteToInt(faultEventCode.getValue()), faultEventCode.name());
return comment; return comment;
} }
@ -841,4 +880,29 @@ public class AapsOmnipodManager {
return new BasalSchedule(entries); return new BasalSchedule(entries);
} }
private void uploadCareportalEvent(long date, String event) {
if (databaseHelper.getCareportalEventFromTimestamp(date) != null)
return;
try {
JSONObject data = new JSONObject();
String enteredBy = sp.getString("careportal_enteredby", "");
if (enteredBy.isEmpty()) {
data.put("enteredBy", enteredBy);
}
data.put("created_at", DateUtil.toISOString(date));
data.put("mills", date);
data.put("eventType", event);
data.put("units", profileFunction.getUnits());
CareportalEvent careportalEvent = new CareportalEvent(injector);
careportalEvent.date = date;
careportalEvent.source = Source.USER;
careportalEvent.eventType = event;
careportalEvent.json = data.toString();
databaseHelper.createOrUpdate(careportalEvent);
nsUpload.uploadCareportalEntryToNS(data);
} catch (JSONException e) {
aapsLogger.error(LTag.PUMPCOMM, "Unhandled exception when uploading SiteChange event.", e);
}
}
} }

View file

@ -0,0 +1,7 @@
package info.nightscout.androidaps.plugins.pump.omnipod.queue.command;
public final class CommandAcknowledgeAlerts extends OmnipodCustomCommand {
public CommandAcknowledgeAlerts() {
super(OmnipodCustomCommandType.ACKNOWLEDGE_ALERTS);
}
}

View file

@ -0,0 +1,7 @@
package info.nightscout.androidaps.plugins.pump.omnipod.queue.command;
public final class CommandGetPodStatus extends OmnipodCustomCommand {
public CommandGetPodStatus() {
super(OmnipodCustomCommandType.GET_POD_STATUS);
}
}

View file

@ -0,0 +1,14 @@
package info.nightscout.androidaps.plugins.pump.omnipod.queue.command;
public final class CommandHandleTimeChange extends OmnipodCustomCommand {
private final boolean requestedByUser;
public CommandHandleTimeChange(boolean requestedByUser) {
super(OmnipodCustomCommandType.HANDLE_TIME_CHANGE);
this.requestedByUser = requestedByUser;
}
public boolean isRequestedByUser() {
return requestedByUser;
}
}

View file

@ -0,0 +1,7 @@
package info.nightscout.androidaps.plugins.pump.omnipod.queue.command;
public final class CommandReadPulseLog extends OmnipodCustomCommand {
public CommandReadPulseLog() {
super(OmnipodCustomCommandType.READ_PULSE_LOG);
}
}

View file

@ -0,0 +1,7 @@
package info.nightscout.androidaps.plugins.pump.omnipod.queue.command;
public final class CommandResumeDelivery extends OmnipodCustomCommand {
public CommandResumeDelivery() {
super(OmnipodCustomCommandType.RESUME_DELIVERY);
}
}

View file

@ -0,0 +1,7 @@
package info.nightscout.androidaps.plugins.pump.omnipod.queue.command;
public final class CommandSuspendDelivery extends OmnipodCustomCommand {
public CommandSuspendDelivery() {
super(OmnipodCustomCommandType.SUSPEND_DELIVERY);
}
}

View file

@ -0,0 +1,7 @@
package info.nightscout.androidaps.plugins.pump.omnipod.queue.command;
public final class CommandUpdateAlertConfiguration extends OmnipodCustomCommand {
public CommandUpdateAlertConfiguration() {
super(OmnipodCustomCommandType.UPDATE_ALERT_CONFIGURATION);
}
}

View file

@ -0,0 +1,21 @@
package info.nightscout.androidaps.plugins.pump.omnipod.queue.command;
import androidx.annotation.NonNull;
import info.nightscout.androidaps.queue.commands.CustomCommand;
public abstract class OmnipodCustomCommand implements CustomCommand {
private final OmnipodCustomCommandType type;
OmnipodCustomCommand(@NonNull OmnipodCustomCommandType type) {
this.type = type;
}
public final OmnipodCustomCommandType getType() {
return type;
}
@Override public final String getStatusDescription() {
return type.getDescription();
}
}

View file

@ -0,0 +1,21 @@
package info.nightscout.androidaps.plugins.pump.omnipod.queue.command;
public enum OmnipodCustomCommandType {
ACKNOWLEDGE_ALERTS("ACKNOWLEDGE ALERTS"),
GET_POD_STATUS("GET POD STATUS"),
READ_PULSE_LOG("READ PULSE LOG"),
SUSPEND_DELIVERY("SUSPEND DELIVERY"),
RESUME_DELIVERY("RESUME DELIVERY"),
HANDLE_TIME_CHANGE("HANDLE TIME CHANGE"),
UPDATE_ALERT_CONFIGURATION("UPDATE ALERT CONFIGURATION");
private final String description;
OmnipodCustomCommandType(String description) {
this.description = description;
}
String getDescription() {
return description;
}
}

View file

@ -12,7 +12,6 @@ import info.nightscout.androidaps.logging.LTag;
import info.nightscout.androidaps.plugins.pump.common.defs.PumpDeviceState; import info.nightscout.androidaps.plugins.pump.common.defs.PumpDeviceState;
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkCommunicationManager; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkCommunicationManager;
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RileyLinkCommunicationException; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RileyLinkCommunicationException;
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.RLMessage;
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.defs.RLMessageType; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.defs.RLMessageType;
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.defs.RileyLinkBLEError; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.defs.RileyLinkBLEError;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil; import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
@ -30,7 +29,6 @@ import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.Message
import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.OmnipodConstants; import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.OmnipodConstants;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.PacketType; import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.PacketType;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.PodInfoType; import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.PodInfoType;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.CommunicationException;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.IllegalMessageAddressException; import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.IllegalMessageAddressException;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.IllegalMessageSequenceNumberException; import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.IllegalMessageSequenceNumberException;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.IllegalPacketTypeException; import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.IllegalPacketTypeException;
@ -41,13 +39,16 @@ import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.NotEnoug
import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.OmnipodException; import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.OmnipodException;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.PodFaultException; import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.PodFaultException;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.PodReturnedErrorResponseException; import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.PodReturnedErrorResponseException;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.RileyLinkTimeoutException;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.RileyLinkUnexpectedException;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.exception.RileyLinkUnreachableException;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.manager.PodStateManager; import info.nightscout.androidaps.plugins.pump.omnipod.driver.manager.PodStateManager;
/** /**
* Created by andy on 6/29/18. * Created by andy on 6/29/18.
*/ */
@Singleton @Singleton
public class OmnipodRileyLinkCommunicationManager extends RileyLinkCommunicationManager { public class OmnipodRileyLinkCommunicationManager extends RileyLinkCommunicationManager<OmnipodPacket> {
// This empty constructor must be kept, otherwise dagger injection might break! // This empty constructor must be kept, otherwise dagger injection might break!
@Inject @Inject
public OmnipodRileyLinkCommunicationManager() { public OmnipodRileyLinkCommunicationManager() {
@ -69,7 +70,7 @@ public class OmnipodRileyLinkCommunicationManager extends RileyLinkCommunication
} }
@Override @Override
public RLMessage createResponseMessage(byte[] payload) { public OmnipodPacket createResponseMessage(byte[] payload) {
return new OmnipodPacket(payload); return new OmnipodPacket(payload);
} }
@ -137,7 +138,7 @@ public class OmnipodRileyLinkCommunicationManager extends RileyLinkCommunication
if (responseClass.isInstance(responseMessageBlock)) { if (responseClass.isInstance(responseMessageBlock)) {
podStateManager.setLastSuccessfulCommunication(DateTime.now()); podStateManager.setLastSuccessfulCommunication(DateTime.now());
return (T) responseMessageBlock; return responseClass.cast(responseMessageBlock);
} else { } else {
if (responseMessageBlock.getType() == MessageBlockType.ERROR_RESPONSE) { if (responseMessageBlock.getType() == MessageBlockType.ERROR_RESPONSE) {
ErrorResponse error = (ErrorResponse) responseMessageBlock; ErrorResponse error = (ErrorResponse) responseMessageBlock;
@ -194,13 +195,13 @@ public class OmnipodRileyLinkCommunicationManager extends RileyLinkCommunication
// receive an ACK instead of a normal response, or a partial response and a communication timeout // receive an ACK instead of a normal response, or a partial response and a communication timeout
if (message.isNonceResyncable() && !message.containsBlock(DeactivatePodCommand.class)) { if (message.isNonceResyncable() && !message.containsBlock(DeactivatePodCommand.class)) {
OmnipodMessage paddedMessage = new OmnipodMessage(message); OmnipodMessage paddedMessage = new OmnipodMessage(message);
// If messages are nonce resyncable, we want do distinguish between certain and uncertain failures for verification purposes // If messages are nonce resyncable, we want to distinguish between certain and uncertain failures for verification purposes
// However, some commands (e.g. cancel delivery) are single packet command by nature. When we get a timeout with a single packet, // However, some commands (e.g. cancel delivery) are single packet command by nature. When we get a timeout with a single packet,
// we are unsure whether or not the command was received by the pod // we are unsure whether or not the command was received by the pod
// However, if we send > 1 packet, we know that the command wasn't received if we never send the subsequent packets, // However, if we send > 1 packet, we know that the command wasn't received if we never send the subsequent packets,
// because the last packet contains the CRC. // because the last packet contains the CRC.
// So we pad the message with get status commands to make it > packet // So we pad the message with get status commands to make it > packet
paddedMessage.padWithGetStatusCommands(PacketType.PDM.getMaxBodyLength()); // First packet is of type PDM paddedMessage.padWithGetStatusCommands(PacketType.PDM.getMaxBodyLength(), aapsLogger); // First packet is of type PDM
encodedMessage = paddedMessage.getEncoded(); encodedMessage = paddedMessage.getEncoded();
} else { } else {
encodedMessage = message.getEncoded(); encodedMessage = message.getEncoded();
@ -219,23 +220,16 @@ public class OmnipodRileyLinkCommunicationManager extends RileyLinkCommunication
try { try {
// We actually ignore previous (ack) responses if it was not last packet to send // We actually ignore previous (ack) responses if it was not last packet to send
response = exchangePackets(podStateManager, packet); response = exchangePackets(podStateManager, packet);
} catch (Exception ex) { } catch (OmnipodException ex) {
OmnipodException newException;
if (ex instanceof OmnipodException) {
newException = (OmnipodException) ex;
} else {
newException = new CommunicationException(CommunicationException.Type.UNEXPECTED_EXCEPTION, ex);
}
boolean lastPacket = encodedMessage.length == 0; boolean lastPacket = encodedMessage.length == 0;
// If this is not the last packet, the message wasn't fully sent, // If this is not the last packet, the message wasn't fully sent,
// so it's impossible for the pod to have received the message // so it's impossible for the pod to have received the message
newException.setCertainFailure(!lastPacket); ex.setCertainFailure(!lastPacket);
aapsLogger.debug(LTag.PUMPBTCOMM, "Caught exception in transportMessages. Set certainFailure to {} because encodedMessage.length={}", newException.isCertainFailure(), encodedMessage.length); aapsLogger.debug(LTag.PUMPBTCOMM, "Caught OmnipodException in transportMessages. Set certainFailure to {} because encodedMessage.length={}", ex.isCertainFailure(), encodedMessage.length);
throw newException; throw ex;
} }
} }
@ -261,18 +255,11 @@ public class OmnipodRileyLinkCommunicationManager extends RileyLinkCommunication
OmnipodPacket ackForCon = createAckPacket(podStateManager, packetAddress, ackAddressOverride); OmnipodPacket ackForCon = createAckPacket(podStateManager, packetAddress, ackAddressOverride);
try {
OmnipodPacket conPacket = exchangePackets(podStateManager, ackForCon, 3, 40); OmnipodPacket conPacket = exchangePackets(podStateManager, ackForCon, 3, 40);
if (conPacket.getPacketType() != PacketType.CON) { if (conPacket.getPacketType() != PacketType.CON) {
throw new IllegalPacketTypeException(PacketType.CON, conPacket.getPacketType()); throw new IllegalPacketTypeException(PacketType.CON, conPacket.getPacketType());
} }
receivedMessageData = ByteUtil.concat(receivedMessageData, conPacket.getEncodedMessage()); receivedMessageData = ByteUtil.concat(receivedMessageData, conPacket.getEncodedMessage());
} catch (OmnipodException ex2) {
throw ex2;
} catch (Exception ex2) {
throw new CommunicationException(CommunicationException.Type.UNEXPECTED_EXCEPTION, ex2);
}
} }
} }
@ -317,8 +304,6 @@ public class OmnipodRileyLinkCommunicationManager extends RileyLinkCommunication
} }
} catch (OmnipodException ex) { } catch (OmnipodException ex) {
aapsLogger.debug(LTag.PUMPBTCOMM, "Ignoring exception in ackUntilQuiet", ex); aapsLogger.debug(LTag.PUMPBTCOMM, "Ignoring exception in ackUntilQuiet", ex);
} catch (Exception ex) {
throw new CommunicationException(CommunicationException.Type.UNEXPECTED_EXCEPTION, ex);
} }
podStateManager.increasePacketNumber(); podStateManager.increasePacketNumber();
@ -337,24 +322,32 @@ public class OmnipodRileyLinkCommunicationManager extends RileyLinkCommunication
podStateManager.increasePacketNumber(); podStateManager.increasePacketNumber();
boolean gotResponseFromRileyLink = false;
while (System.currentTimeMillis() < timeoutTime) { while (System.currentTimeMillis() < timeoutTime) {
OmnipodPacket response; OmnipodPacket response;
try { try {
response = (OmnipodPacket) sendAndListen(packet, responseTimeoutMilliseconds, repeatCount, 9, preambleExtensionMilliseconds); response = sendAndListen(packet, responseTimeoutMilliseconds, repeatCount, 9, preambleExtensionMilliseconds);
} catch (RileyLinkCommunicationException | OmnipodException ex) { gotResponseFromRileyLink = true;
} catch (RileyLinkCommunicationException ex) {
if (ex.getErrorCode() != RileyLinkBLEError.NoResponse) {
gotResponseFromRileyLink = true;
}
aapsLogger.debug(LTag.PUMPBTCOMM, "Ignoring exception in exchangePackets: " + ex.getClass().getSimpleName() + ": " + ex.getMessage());
continue;
} catch (OmnipodException ex) {
gotResponseFromRileyLink = true;
aapsLogger.debug(LTag.PUMPBTCOMM, "Ignoring exception in exchangePackets: " + ex.getClass().getSimpleName() + ": " + ex.getMessage()); aapsLogger.debug(LTag.PUMPBTCOMM, "Ignoring exception in exchangePackets: " + ex.getClass().getSimpleName() + ": " + ex.getMessage());
continue; continue;
} catch (Exception ex) { } catch (Exception ex) {
throw new CommunicationException(CommunicationException.Type.UNEXPECTED_EXCEPTION, ex); throw new RileyLinkUnexpectedException(ex);
} }
if (response == null) { if (!response.isValid()) {
aapsLogger.debug(LTag.PUMPBTCOMM, "exchangePackets response is null");
continue;
} else if (!response.isValid()) {
aapsLogger.debug(LTag.PUMPBTCOMM, "exchangePackets response is invalid: " + response); aapsLogger.debug(LTag.PUMPBTCOMM, "exchangePackets response is invalid: " + response);
continue; continue;
} }
if (response.getAddress() != packet.getAddress() && if (response.getAddress() != packet.getAddress() &&
response.getAddress() != OmnipodConstants.DEFAULT_ADDRESS) { // In some (strange) cases, the Pod remains a packet address of 0xffffffff during it's lifetime response.getAddress() != OmnipodConstants.DEFAULT_ADDRESS) { // In some (strange) cases, the Pod remains a packet address of 0xffffffff during it's lifetime
aapsLogger.debug(LTag.PUMPBTCOMM, "Packet address " + response.getAddress() + " doesn't match " + packet.getAddress()); aapsLogger.debug(LTag.PUMPBTCOMM, "Packet address " + response.getAddress() + " doesn't match " + packet.getAddress());
@ -371,7 +364,12 @@ public class OmnipodRileyLinkCommunicationManager extends RileyLinkCommunication
return response; return response;
} }
throw new CommunicationException(CommunicationException.Type.TIMEOUT);
if (gotResponseFromRileyLink) {
throw new RileyLinkTimeoutException();
}
throw new RileyLinkUnreachableException();
} }
} }

View file

@ -11,6 +11,7 @@ import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import dagger.android.support.DaggerFragment import dagger.android.support.DaggerFragment
import info.nightscout.androidaps.Constants import info.nightscout.androidaps.Constants
import info.nightscout.androidaps.activities.ErrorHelperActivity
import info.nightscout.androidaps.events.EventPreferenceChange import info.nightscout.androidaps.events.EventPreferenceChange
import info.nightscout.androidaps.interfaces.ActivePluginProvider import info.nightscout.androidaps.interfaces.ActivePluginProvider
import info.nightscout.androidaps.interfaces.CommandQueueProvider import info.nightscout.androidaps.interfaces.CommandQueueProvider
@ -22,15 +23,14 @@ import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.dialog.RileyL
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.RileyLinkServiceData import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.RileyLinkServiceData
import info.nightscout.androidaps.plugins.pump.omnipod.OmnipodPumpPlugin import info.nightscout.androidaps.plugins.pump.omnipod.OmnipodPumpPlugin
import info.nightscout.androidaps.plugins.pump.omnipod.R import info.nightscout.androidaps.plugins.pump.omnipod.R
import info.nightscout.androidaps.plugins.pump.omnipod.definition.OmnipodCommandType
import info.nightscout.androidaps.plugins.pump.omnipod.definition.OmnipodStatusRequestType
import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.OmnipodConstants import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.OmnipodConstants
import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.PodProgressStatus import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.PodProgressStatus
import info.nightscout.androidaps.plugins.pump.omnipod.driver.manager.PodStateManager import info.nightscout.androidaps.plugins.pump.omnipod.driver.manager.PodStateManager
import info.nightscout.androidaps.plugins.pump.omnipod.event.EventOmnipodPumpValuesChanged import info.nightscout.androidaps.plugins.pump.omnipod.event.EventOmnipodPumpValuesChanged
import info.nightscout.androidaps.plugins.pump.omnipod.manager.AapsOmnipodManager import info.nightscout.androidaps.plugins.pump.omnipod.manager.AapsOmnipodManager
import info.nightscout.androidaps.plugins.pump.omnipod.queue.command.*
import info.nightscout.androidaps.plugins.pump.omnipod.util.AapsOmnipodUtil import info.nightscout.androidaps.plugins.pump.omnipod.util.AapsOmnipodUtil
import info.nightscout.androidaps.queue.commands.Command import info.nightscout.androidaps.queue.Callback
import info.nightscout.androidaps.queue.events.EventQueueChanged import info.nightscout.androidaps.queue.events.EventQueueChanged
import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.DateUtil
import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.FabricPrivacy
@ -92,11 +92,6 @@ class OmnipodFragment : DaggerFragment() {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState) super.onViewCreated(view, savedInstanceState)
omnipod_button_resume_delivery.setOnClickListener {
disablePodActionButtons()
commandQueue.startPump(null)
}
omnipod_button_pod_mgmt.setOnClickListener { omnipod_button_pod_mgmt.setOnClickListener {
if (omnipodPumpPlugin.rileyLinkService?.verifyConfiguration() == true) { if (omnipodPumpPlugin.rileyLinkService?.verifyConfiguration() == true) {
activity?.let { activity -> activity?.let { activity ->
@ -110,10 +105,16 @@ class OmnipodFragment : DaggerFragment() {
} }
} }
omnipod_button_resume_delivery.setOnClickListener {
disablePodActionButtons()
commandQueue.customCommand(CommandResumeDelivery(),
DisplayResultDialogCallback(resourceHelper.gs(R.string.omnipod_error_failed_to_resume_delivery), true).messageOnSuccess(resourceHelper.gs(R.string.omnipod_confirmation_delivery_resumed)))
}
omnipod_button_refresh_status.setOnClickListener { omnipod_button_refresh_status.setOnClickListener {
disablePodActionButtons() disablePodActionButtons()
omnipodPumpPlugin.addPodStatusRequest(OmnipodStatusRequestType.GET_POD_STATE); commandQueue.customCommand(CommandGetPodStatus(),
commandQueue.readStatus("Clicked Refresh", null) DisplayResultDialogCallback(resourceHelper.gs(R.string.omnipod_error_failed_to_refresh_status), false))
} }
omnipod_button_rileylink_stats.setOnClickListener { omnipod_button_rileylink_stats.setOnClickListener {
@ -126,26 +127,29 @@ class OmnipodFragment : DaggerFragment() {
omnipod_button_acknowledge_active_alerts.setOnClickListener { omnipod_button_acknowledge_active_alerts.setOnClickListener {
disablePodActionButtons() disablePodActionButtons()
omnipodPumpPlugin.addPodStatusRequest(OmnipodStatusRequestType.ACKNOWLEDGE_ALERTS); commandQueue.customCommand(CommandAcknowledgeAlerts(),
commandQueue.readStatus("Clicked Acknowledge Alert", null) DisplayResultDialogCallback(resourceHelper.gs(R.string.omnipod_error_failed_to_acknowledge_alerts), false)
.messageOnSuccess(resourceHelper.gs(R.string.omnipod_confirmation_acknowledged_alerts)))
} }
omnipod_button_suspend_delivery.setOnClickListener { omnipod_button_suspend_delivery.setOnClickListener {
disablePodActionButtons() disablePodActionButtons()
omnipodPumpPlugin.addPodStatusRequest(OmnipodStatusRequestType.SUSPEND_DELIVERY); commandQueue.customCommand(CommandSuspendDelivery(),
commandQueue.readStatus("Clicked Suspend Delivery", null) DisplayResultDialogCallback(resourceHelper.gs(R.string.omnipod_error_failed_to_suspend_delivery), true)
.messageOnSuccess(resourceHelper.gs(R.string.omnipod_confirmation_suspended_delivery)))
} }
omnipod_button_set_time.setOnClickListener { omnipod_button_set_time.setOnClickListener {
disablePodActionButtons() disablePodActionButtons()
omnipodPumpPlugin.addPodStatusRequest(OmnipodStatusRequestType.SET_TIME); commandQueue.customCommand(CommandHandleTimeChange(true),
commandQueue.readStatus("Clicked Set Time", null) DisplayResultDialogCallback(resourceHelper.gs(R.string.omnipod_error_failed_to_set_time), true)
.messageOnSuccess(resourceHelper.gs(R.string.omnipod_confirmation_time_on_pod_updated)))
} }
omnipod_button_pulse_log.setOnClickListener { omnipod_button_pulse_log.setOnClickListener {
disablePodActionButtons() disablePodActionButtons()
omnipodPumpPlugin.addPodStatusRequest(OmnipodStatusRequestType.GET_PULSE_LOG); commandQueue.customCommand(CommandReadPulseLog(),
commandQueue.readStatus("Clicked Pulse Log", null) DisplayResultDialogCallback(resourceHelper.gs(R.string.omnipod_error_failed_to_read_pulse_log), false))
} }
} }
@ -219,7 +223,7 @@ class OmnipodFragment : DaggerFragment() {
updateTempBasal() updateTempBasal()
updatePodStatus() updatePodStatus()
val errors = ArrayList<String>(); val errors = ArrayList<String>()
if (omnipodPumpPlugin.rileyLinkService != null) { if (omnipodPumpPlugin.rileyLinkService != null) {
val rileyLinkErrorDescription = omnipodPumpPlugin.rileyLinkService.errorDescription val rileyLinkErrorDescription = omnipodPumpPlugin.rileyLinkService.errorDescription
if (StringUtils.isNotEmpty(rileyLinkErrorDescription)) { if (StringUtils.isNotEmpty(rileyLinkErrorDescription)) {
@ -285,7 +289,7 @@ class OmnipodFragment : DaggerFragment() {
// total delivered // total delivered
omnipod_total_delivered.text = if (podStateManager.isPodActivationCompleted && podStateManager.totalInsulinDelivered != null) { omnipod_total_delivered.text = if (podStateManager.isPodActivationCompleted && podStateManager.totalInsulinDelivered != null) {
resourceHelper.gs(R.string.omnipod_total_delivered, podStateManager.totalInsulinDelivered - OmnipodConstants.POD_SETUP_UNITS); resourceHelper.gs(R.string.omnipod_total_delivered, podStateManager.totalInsulinDelivered - OmnipodConstants.POD_SETUP_UNITS)
} else { } else {
PLACEHOLDER PLACEHOLDER
} }
@ -376,7 +380,7 @@ class OmnipodFragment : DaggerFragment() {
private fun updateLastBolus() { private fun updateLastBolus() {
if (podStateManager.isPodActivationCompleted && podStateManager.hasLastBolus()) { if (podStateManager.isPodActivationCompleted && podStateManager.hasLastBolus()) {
var text = resourceHelper.gs(R.string.omnipod_last_bolus, omnipodPumpPlugin.model().determineCorrectBolusSize(podStateManager.lastBolusAmount), resourceHelper.gs(R.string.insulin_unit_shortname), readableDuration(podStateManager.lastBolusStartTime)) var text = resourceHelper.gs(R.string.omnipod_last_bolus_value, omnipodPumpPlugin.model().determineCorrectBolusSize(podStateManager.lastBolusAmount), resourceHelper.gs(R.string.insulin_unit_shortname), readableDuration(podStateManager.lastBolusStartTime))
val textColor: Int val textColor: Int
if (podStateManager.isLastBolusCertain) { if (podStateManager.isLastBolusCertain) {
@ -386,7 +390,7 @@ class OmnipodFragment : DaggerFragment() {
text += " (" + resourceHelper.gs(R.string.omnipod_uncertain) + ")" text += " (" + resourceHelper.gs(R.string.omnipod_uncertain) + ")"
} }
omnipod_last_bolus.text = text; omnipod_last_bolus.text = text
omnipod_last_bolus.setTextColor(textColor) omnipod_last_bolus.setTextColor(textColor)
} else { } else {
@ -399,15 +403,15 @@ class OmnipodFragment : DaggerFragment() {
if (podStateManager.isPodActivationCompleted && podStateManager.isTempBasalRunning) { if (podStateManager.isPodActivationCompleted && podStateManager.isTempBasalRunning) {
val now = DateTime.now() val now = DateTime.now()
val startTime = podStateManager.tempBasalStartTime; val startTime = podStateManager.tempBasalStartTime
val amount = podStateManager.tempBasalAmount val amount = podStateManager.tempBasalAmount
val duration = podStateManager.tempBasalDuration; val duration = podStateManager.tempBasalDuration
val minutesRunning = Duration(startTime, now).standardMinutes val minutesRunning = Duration(startTime, now).standardMinutes
var text: String var text: String
val textColor: Int val textColor: Int
text = resourceHelper.gs(R.string.omnipod_temp_basal, amount, dateUtil.timeString(startTime.millis), minutesRunning, duration.standardMinutes) text = resourceHelper.gs(R.string.omnipod_temp_basal_value, amount, dateUtil.timeString(startTime.millis), minutesRunning, duration.standardMinutes)
if (podStateManager.isTempBasalCertain) { if (podStateManager.isTempBasalCertain) {
textColor = Color.WHITE textColor = Color.WHITE
} else { } else {
@ -415,7 +419,7 @@ class OmnipodFragment : DaggerFragment() {
text += " (" + resourceHelper.gs(R.string.omnipod_uncertain) + ")" text += " (" + resourceHelper.gs(R.string.omnipod_uncertain) + ")"
} }
omnipod_temp_basal.text = text; omnipod_temp_basal.text = text
omnipod_temp_basal.setTextColor(textColor) omnipod_temp_basal.setTextColor(textColor)
} else { } else {
omnipod_temp_basal.text = PLACEHOLDER omnipod_temp_basal.text = PLACEHOLDER
@ -456,8 +460,7 @@ class OmnipodFragment : DaggerFragment() {
} }
private fun updateResumeDeliveryButton() { private fun updateResumeDeliveryButton() {
val queueEmptyOrStartingPump = isQueueEmpty() || commandQueue.isRunning(Command.CommandType.START_PUMP) if (podStateManager.isPodRunning && (podStateManager.isSuspended || commandQueue.isCustomCommandInQueue(CommandResumeDelivery::class.java))) {
if (podStateManager.isPodActivationCompleted && podStateManager.isSuspended && queueEmptyOrStartingPump) {
omnipod_button_resume_delivery.visibility = View.VISIBLE omnipod_button_resume_delivery.visibility = View.VISIBLE
omnipod_button_resume_delivery.isEnabled = rileyLinkServiceData.rileyLinkServiceState.isReady && isQueueEmpty() omnipod_button_resume_delivery.isEnabled = rileyLinkServiceData.rileyLinkServiceState.isReady && isQueueEmpty()
} else { } else {
@ -466,7 +469,7 @@ class OmnipodFragment : DaggerFragment() {
} }
private fun updateAcknowledgeAlertsButton() { private fun updateAcknowledgeAlertsButton() {
if (podStateManager.isPodRunning && podStateManager.hasActiveAlerts()) { if (podStateManager.isPodRunning && (podStateManager.hasActiveAlerts() || commandQueue.isCustomCommandInQueue(CommandAcknowledgeAlerts::class.java))) {
omnipod_button_acknowledge_active_alerts.visibility = View.VISIBLE omnipod_button_acknowledge_active_alerts.visibility = View.VISIBLE
omnipod_button_acknowledge_active_alerts.isEnabled = rileyLinkServiceData.rileyLinkServiceState.isReady && isQueueEmpty() omnipod_button_acknowledge_active_alerts.isEnabled = rileyLinkServiceData.rileyLinkServiceState.isReady && isQueueEmpty()
} else { } else {
@ -476,7 +479,7 @@ class OmnipodFragment : DaggerFragment() {
private fun updateSuspendDeliveryButton() { private fun updateSuspendDeliveryButton() {
// If the Pod is currently suspended, we show the Resume delivery button instead. // If the Pod is currently suspended, we show the Resume delivery button instead.
if (omnipodManager.isSuspendDeliveryButtonEnabled && !(podStateManager.isPodRunning && podStateManager.isSuspended)) { if (omnipodManager.isSuspendDeliveryButtonEnabled && podStateManager.isPodRunning && (!podStateManager.isSuspended || commandQueue.isCustomCommandInQueue(CommandSuspendDelivery::class.java))) {
omnipod_button_suspend_delivery.visibility = View.VISIBLE omnipod_button_suspend_delivery.visibility = View.VISIBLE
omnipod_button_suspend_delivery.isEnabled = podStateManager.isPodRunning && !podStateManager.isSuspended && rileyLinkServiceData.rileyLinkServiceState.isReady && isQueueEmpty() omnipod_button_suspend_delivery.isEnabled = podStateManager.isPodRunning && !podStateManager.isSuspended && rileyLinkServiceData.rileyLinkServiceState.isReady && isQueueEmpty()
} else { } else {
@ -485,7 +488,7 @@ class OmnipodFragment : DaggerFragment() {
} }
private fun updateSetTimeButton() { private fun updateSetTimeButton() {
if (podStateManager.isPodRunning && (podStateManager.timeDeviatesMoreThan(Duration.standardMinutes(5)) || omnipodPumpPlugin.currentCommand == OmnipodCommandType.SET_TIME)) { if (podStateManager.isPodRunning && (podStateManager.timeDeviatesMoreThan(Duration.standardMinutes(5)) || commandQueue.isCustomCommandInQueue(CommandHandleTimeChange::class.java))) {
omnipod_button_set_time.visibility = View.VISIBLE omnipod_button_set_time.visibility = View.VISIBLE
omnipod_button_set_time.isEnabled = !podStateManager.isSuspended && rileyLinkServiceData.rileyLinkServiceState.isReady && isQueueEmpty() omnipod_button_set_time.isEnabled = !podStateManager.isSuspended && rileyLinkServiceData.rileyLinkServiceState.isReady && isQueueEmpty()
} else { } else {
@ -504,8 +507,29 @@ class OmnipodFragment : DaggerFragment() {
private fun displayNotConfiguredDialog() { private fun displayNotConfiguredDialog() {
context?.let { context?.let {
UIRunnable(Runnable {
OKDialog.show(it, resourceHelper.gs(R.string.omnipod_warning), OKDialog.show(it, resourceHelper.gs(R.string.omnipod_warning),
resourceHelper.gs(R.string.omnipod_error_operation_not_possible_no_configuration), null) resourceHelper.gs(R.string.omnipod_error_operation_not_possible_no_configuration), null)
}).run()
}
}
private fun displayErrorDialog(title: String, message: String, withSound: Boolean) {
context?.let {
val i = Intent(it, ErrorHelperActivity::class.java)
i.putExtra("soundid", if (withSound) R.raw.boluserror else 0)
i.putExtra("status", message)
i.putExtra("title", title)
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
it.startActivity(i)
}
}
private fun displayOkDialog(title: String, message: String) {
context?.let {
UIRunnable(Runnable {
OKDialog.show(it, title, message, null)
}).run()
} }
} }
@ -568,4 +592,24 @@ class OmnipodFragment : DaggerFragment() {
return Duration.standardMinutes(sp.getInt(resourceHelper.gs(R.string.key_pump_unreachable_threshold_minutes), Constants.DEFAULT_PUMP_UNREACHABLE_THRESHOLD_MINUTES).toLong()) return Duration.standardMinutes(sp.getInt(resourceHelper.gs(R.string.key_pump_unreachable_threshold_minutes), Constants.DEFAULT_PUMP_UNREACHABLE_THRESHOLD_MINUTES).toLong())
} }
inner class DisplayResultDialogCallback(private val errorMessagePrefix: String, private val withSoundOnError: Boolean) : Callback() {
private var messageOnSuccess: String? = null
override fun run() {
if (result.success) {
val messageOnSuccess = this.messageOnSuccess
if (messageOnSuccess != null) {
displayOkDialog(resourceHelper.gs(R.string.omnipod_confirmation), messageOnSuccess)
}
} else {
displayErrorDialog(resourceHelper.gs(R.string.omnipod_warning), resourceHelper.gs(R.string.omnipod_two_strings_concatenated_by_colon, errorMessagePrefix, result.comment), withSoundOnError)
}
}
fun messageOnSuccess(message: String): DisplayResultDialogCallback {
messageOnSuccess = message
return this
}
}
} }

View file

@ -250,7 +250,7 @@ public class PodHistoryActivity extends NoSplashAppCompatActivity {
case SET_TEMPORARY_BASAL: { case SET_TEMPORARY_BASAL: {
TempBasalPair tempBasalPair = aapsOmnipodUtil.getGsonInstance().fromJson(historyEntry.getData(), TempBasalPair.class); TempBasalPair tempBasalPair = aapsOmnipodUtil.getGsonInstance().fromJson(historyEntry.getData(), TempBasalPair.class);
valueView.setText(resourceHelper.gs(R.string.omnipod_cmd_tbr_value, tempBasalPair.getInsulinRate(), tempBasalPair.getDurationMinutes())); valueView.setText(resourceHelper.gs(R.string.omnipod_history_tbr_value, tempBasalPair.getInsulinRate(), tempBasalPair.getDurationMinutes()));
} }
break; break;
@ -265,9 +265,9 @@ public class PodHistoryActivity extends NoSplashAppCompatActivity {
case SET_BOLUS: { case SET_BOLUS: {
if (historyEntry.getData().contains(";")) { if (historyEntry.getData().contains(";")) {
String[] splitVal = historyEntry.getData().split(";"); String[] splitVal = historyEntry.getData().split(";");
valueView.setText(resourceHelper.gs(R.string.omnipod_cmd_bolus_value_with_carbs, Double.valueOf(splitVal[0]), Double.valueOf(splitVal[1]))); valueView.setText(resourceHelper.gs(R.string.omnipod_history_bolus_value_with_carbs, Double.valueOf(splitVal[0]), Double.valueOf(splitVal[1])));
} else { } else {
valueView.setText(resourceHelper.gs(R.string.omnipod_cmd_bolus_value, Double.valueOf(historyEntry.getData()))); valueView.setText(resourceHelper.gs(R.string.omnipod_history_bolus_value, Double.valueOf(historyEntry.getData())));
} }
} }
break; break;
@ -281,7 +281,7 @@ public class PodHistoryActivity extends NoSplashAppCompatActivity {
case CONFIGURE_ALERTS: case CONFIGURE_ALERTS:
case CANCEL_BOLUS: case CANCEL_BOLUS:
case DEACTIVATE_POD: case DEACTIVATE_POD:
case RESET_POD_STATE: case DISCARD_POD_STATE:
case ACKNOWLEDGE_ALERTS: case ACKNOWLEDGE_ALERTS:
case SUSPEND_DELIVERY: case SUSPEND_DELIVERY:
case RESUME_DELIVERY: case RESUME_DELIVERY:

View file

@ -20,11 +20,9 @@ import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.PodProg
import info.nightscout.androidaps.plugins.pump.omnipod.driver.manager.PodStateManager import info.nightscout.androidaps.plugins.pump.omnipod.driver.manager.PodStateManager
import info.nightscout.androidaps.plugins.pump.omnipod.event.EventOmnipodPumpValuesChanged import info.nightscout.androidaps.plugins.pump.omnipod.event.EventOmnipodPumpValuesChanged
import info.nightscout.androidaps.plugins.pump.omnipod.manager.AapsOmnipodManager import info.nightscout.androidaps.plugins.pump.omnipod.manager.AapsOmnipodManager
import info.nightscout.androidaps.plugins.pump.omnipod.ui.wizard.defs.PodActionType
import info.nightscout.androidaps.plugins.pump.omnipod.ui.wizard.model.FullInitPodWizardModel import info.nightscout.androidaps.plugins.pump.omnipod.ui.wizard.model.FullInitPodWizardModel
import info.nightscout.androidaps.plugins.pump.omnipod.ui.wizard.model.RemovePodWizardModel import info.nightscout.androidaps.plugins.pump.omnipod.ui.wizard.model.RemovePodWizardModel
import info.nightscout.androidaps.plugins.pump.omnipod.ui.wizard.model.ShortInitPodWizardModel import info.nightscout.androidaps.plugins.pump.omnipod.ui.wizard.model.ShortInitPodWizardModel
import info.nightscout.androidaps.plugins.pump.omnipod.ui.wizard.pages.InitPodRefreshAction
import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.FabricPrivacy
import info.nightscout.androidaps.utils.alertDialogs.OKDialog import info.nightscout.androidaps.utils.alertDialogs.OKDialog
import info.nightscout.androidaps.utils.extensions.plusAssign import info.nightscout.androidaps.utils.extensions.plusAssign
@ -93,15 +91,11 @@ class PodManagementActivity : NoSplashAppCompatActivity() {
private fun initPodAction() { private fun initPodAction() {
val pagerSettings = WizardPagerSettings() val pagerSettings = WizardPagerSettings()
var refreshAction = InitPodRefreshAction(injector, PodActionType.INIT_POD)
pagerSettings.setWizardStepsWayType(WizardStepsWayType.CancelNext) pagerSettings.setWizardStepsWayType(WizardStepsWayType.CancelNext)
pagerSettings.setFinishStringResourceId(R.string.close) pagerSettings.setFinishStringResourceId(R.string.close)
pagerSettings.setFinishButtonBackground(R.drawable.finish_background) pagerSettings.setFinishButtonBackground(R.drawable.finish_background)
pagerSettings.setNextButtonBackground(R.drawable.selectable_item_background) pagerSettings.setNextButtonBackground(R.drawable.selectable_item_background)
pagerSettings.setBackStringResourceId(R.string.cancel) pagerSettings.setBackStringResourceId(R.string.cancel)
pagerSettings.cancelAction = refreshAction
pagerSettings.finishAction = refreshAction
pagerSettings.pagerAdapterBehavior = FragmentStatePagerAdapter.BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT pagerSettings.pagerAdapterBehavior = FragmentStatePagerAdapter.BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT
val wizardPagerContext = WizardPagerContext.getInstance() val wizardPagerContext = WizardPagerContext.getInstance()
@ -121,15 +115,12 @@ class PodManagementActivity : NoSplashAppCompatActivity() {
private fun deactivatePodAction() { private fun deactivatePodAction() {
val pagerSettings = WizardPagerSettings() val pagerSettings = WizardPagerSettings()
var refreshAction = InitPodRefreshAction(injector, PodActionType.DEACTIVATE_POD)
pagerSettings.setWizardStepsWayType(WizardStepsWayType.CancelNext) pagerSettings.setWizardStepsWayType(WizardStepsWayType.CancelNext)
pagerSettings.setFinishStringResourceId(R.string.close) pagerSettings.setFinishStringResourceId(R.string.close)
pagerSettings.setFinishButtonBackground(R.drawable.finish_background) pagerSettings.setFinishButtonBackground(R.drawable.finish_background)
pagerSettings.setNextButtonBackground(R.drawable.selectable_item_background) pagerSettings.setNextButtonBackground(R.drawable.selectable_item_background)
pagerSettings.setBackStringResourceId(R.string.cancel) pagerSettings.setBackStringResourceId(R.string.cancel)
pagerSettings.cancelAction = refreshAction
pagerSettings.finishAction = refreshAction
pagerSettings.pagerAdapterBehavior = FragmentStatePagerAdapter.BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT pagerSettings.pagerAdapterBehavior = FragmentStatePagerAdapter.BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT
val wizardPagerContext = WizardPagerContext.getInstance(); val wizardPagerContext = WizardPagerContext.getInstance();
@ -145,7 +136,7 @@ class PodManagementActivity : NoSplashAppCompatActivity() {
private fun discardPodAction() { private fun discardPodAction() {
OKDialog.showConfirmation(this, OKDialog.showConfirmation(this,
resourceHelper.gs(R.string.omnipod_cmd_discard_pod_desc), Thread { resourceHelper.gs(R.string.omnipod_discard_pod_state_confirmation), Thread {
aapsOmnipodManager.discardPodState() aapsOmnipodManager.discardPodState()
rxBus.send(EventOmnipodPumpValuesChanged()) rxBus.send(EventOmnipodPumpValuesChanged())
}) })

View file

@ -1,93 +0,0 @@
package info.nightscout.androidaps.plugins.pump.omnipod.ui.wizard.pages;
import com.atech.android.library.wizardpager.defs.action.AbstractCancelAction;
import com.atech.android.library.wizardpager.defs.action.FinishActionInterface;
import org.json.JSONException;
import org.json.JSONObject;
import javax.inject.Inject;
import dagger.android.HasAndroidInjector;
import info.nightscout.androidaps.db.CareportalEvent;
import info.nightscout.androidaps.db.Source;
import info.nightscout.androidaps.interfaces.DatabaseHelperInterface;
import info.nightscout.androidaps.interfaces.ProfileFunction;
import info.nightscout.androidaps.logging.AAPSLogger;
import info.nightscout.androidaps.logging.LTag;
import info.nightscout.androidaps.plugins.general.nsclient.NSUpload;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.manager.PodStateManager;
import info.nightscout.androidaps.plugins.pump.omnipod.ui.wizard.defs.PodActionType;
import info.nightscout.androidaps.utils.DateUtil;
import info.nightscout.androidaps.utils.sharedPreferences.SP;
/**
* Created by andy on 12/11/2019
*/
public class InitPodRefreshAction extends AbstractCancelAction implements FinishActionInterface {
private final PodActionType actionType;
private final HasAndroidInjector injector;
@Inject PodStateManager podStateManager;
@Inject AAPSLogger aapsLogger;
@Inject SP sp;
@Inject NSUpload nsUpload;
@Inject DatabaseHelperInterface databaseHelper;
@Inject ProfileFunction profileFunction;
public InitPodRefreshAction(HasAndroidInjector injector, PodActionType actionType) {
this.injector = injector;
injector.androidInjector().inject(this);
this.actionType = actionType;
}
@Override
public void execute(String cancelReason) {
if (cancelReason != null && cancelReason.trim().length() > 0) {
this.cancelActionText = cancelReason;
}
}
@Override
public void execute() {
if (actionType == PodActionType.INIT_POD) {
if (podStateManager.isPodRunning()) {
uploadCareportalEvent(System.currentTimeMillis() - 2000, CareportalEvent.PUMPBATTERYCHANGE);
uploadCareportalEvent(System.currentTimeMillis() - 1000, CareportalEvent.INSULINCHANGE);
uploadCareportalEvent(System.currentTimeMillis(), CareportalEvent.SITECHANGE);
}
}
}
private void uploadCareportalEvent(long date, String event) {
if (databaseHelper.getCareportalEventFromTimestamp(date) != null)
return;
try {
JSONObject data = new JSONObject();
String enteredBy = sp.getString("careportal_enteredby", "");
if (enteredBy.isEmpty()) {
data.put("enteredBy", enteredBy);
}
data.put("created_at", DateUtil.toISOString(date));
data.put("mills", date);
data.put("eventType", event);
data.put("units", profileFunction.getUnits());
CareportalEvent careportalEvent = new CareportalEvent(injector);
careportalEvent.date = date;
careportalEvent.source = Source.USER;
careportalEvent.eventType = event;
careportalEvent.json = data.toString();
databaseHelper.createOrUpdate(careportalEvent);
nsUpload.uploadCareportalEntryToNS(data);
} catch (JSONException e) {
aapsLogger.error(LTag.PUMPCOMM, "Unhandled exception when uploading SiteChange event.", e);
}
}
@Override
public String getFinishActionText() {
return "Finish_OK";
}
}

View file

@ -759,7 +759,7 @@
android:drawableTop="@drawable/ic_actions_refill" android:drawableTop="@drawable/ic_actions_refill"
android:paddingLeft="0dp" android:paddingLeft="0dp"
android:paddingRight="0dp" android:paddingRight="0dp"
android:text="@string/omnipod_refresh" /> android:text="@string/omnipod_button_refresh" />
<Button <Button
android:id="@+id/omnipod_button_pod_mgmt" android:id="@+id/omnipod_button_pod_mgmt"
@ -770,7 +770,7 @@
android:drawableTop="@drawable/ic_danarhistory" android:drawableTop="@drawable/ic_danarhistory"
android:paddingLeft="0dp" android:paddingLeft="0dp"
android:paddingRight="0dp" android:paddingRight="0dp"
android:text="@string/omnipod_pod_mgmt" /> android:text="@string/omnipod_button_pod_management" />
<Button <Button
android:id="@+id/omnipod_button_acknowledge_active_alerts" android:id="@+id/omnipod_button_acknowledge_active_alerts"
@ -781,7 +781,7 @@
android:drawableTop="@drawable/ic_cp_aaps_offline" android:drawableTop="@drawable/ic_cp_aaps_offline"
android:paddingLeft="0dp" android:paddingLeft="0dp"
android:paddingRight="0dp" android:paddingRight="0dp"
android:text="@string/omnipod_acknowledge_active_alerts_short" /> android:text="@string/omnipod_button_acknowledge_active_alerts" />
<Button <Button
android:id="@+id/omnipod_button_rileylink_stats" android:id="@+id/omnipod_button_rileylink_stats"
@ -792,7 +792,7 @@
android:drawableTop="@drawable/ic_danarstats" android:drawableTop="@drawable/ic_danarstats"
android:paddingLeft="0dp" android:paddingLeft="0dp"
android:paddingRight="0dp" android:paddingRight="0dp"
android:text="@string/omnipod_rl_stats" /> android:text="@string/omnipod_button_riley_link_stats" />
<Button <Button
android:id="@+id/omnipod_button_pulse_log" android:id="@+id/omnipod_button_pulse_log"
@ -803,19 +803,7 @@
android:drawableTop="@drawable/ic_cp_bolus_correction" android:drawableTop="@drawable/ic_cp_bolus_correction"
android:paddingLeft="0dp" android:paddingLeft="0dp"
android:paddingRight="0dp" android:paddingRight="0dp"
android:text="@string/omnipod_read_pulse_log_short" android:text="@string/omnipod_button_read_pulse_log"
android:visibility="gone" />
<Button
android:id="@+id/omnipod_button_suspend_delivery"
style="@style/ButtonSmallFontStyle"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:drawableTop="@drawable/ic_loop_disabled"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:text="@string/omnipod_suspend_delivery_short"
android:visibility="gone" /> android:visibility="gone" />
<Button <Button
@ -827,7 +815,7 @@
android:drawableTop="@drawable/ic_access_alarm" android:drawableTop="@drawable/ic_access_alarm"
android:paddingLeft="0dp" android:paddingLeft="0dp"
android:paddingRight="0dp" android:paddingRight="0dp"
android:text="@string/omnipod_set_time" android:text="@string/omnipod_button_set_time"
android:visibility="gone" /> android:visibility="gone" />
<Button <Button
@ -839,7 +827,19 @@
android:drawableTop="@drawable/ic_local_activate" android:drawableTop="@drawable/ic_local_activate"
android:paddingLeft="0dp" android:paddingLeft="0dp"
android:paddingRight="0dp" android:paddingRight="0dp"
android:text="@string/omnipod_resume_delivery" android:text="@string/omnipod_button_resume_delivery"
android:visibility="gone" />
<Button
android:id="@+id/omnipod_button_suspend_delivery"
style="@style/ButtonSmallFontStyle"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:drawableTop="@drawable/ic_loop_disabled"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:text="@string/omnipod_button_suspend_delivery"
android:visibility="gone" /> android:visibility="gone" />
</LinearLayout> </LinearLayout>

View file

@ -30,8 +30,7 @@
android:layout_marginBottom="40dp" android:layout_marginBottom="40dp"
android:layout_marginLeft="25dp" android:layout_marginLeft="25dp"
android:layout_marginRight="25dp" android:layout_marginRight="25dp"
style="@style/WizardPagePodContent" style="@style/WizardPagePodContent" />
/>
<LinearLayout <LinearLayout
style="@style/ButtonBar" style="@style/ButtonBar"
@ -40,7 +39,8 @@
android:orientation="horizontal"> android:orientation="horizontal">
<ListView android:id="@+id/podInfoList" <ListView
android:id="@+id/podInfoList"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1" android:layout_weight="1"

View file

@ -25,7 +25,8 @@
android:paddingTop="12dp" android:paddingTop="12dp"
android:paddingBottom="12dp"> android:paddingBottom="12dp">
<TextView android:id="@android:id/text1" <TextView
android:id="@android:id/text1"
style="?android:textAppearanceSmall" style="?android:textAppearanceSmall"
android:textColor="@color/text_light" android:textColor="@color/text_light"
android:textAllCaps="false" android:textAllCaps="false"
@ -35,7 +36,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="16dp" /> android:layout_marginEnd="16dp" />
<TextView android:id="@android:id/text2" <TextView
android:id="@android:id/text2"
style="?android:textAppearanceMedium" style="?android:textAppearanceMedium"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View file

@ -34,7 +34,7 @@
android:layout_weight="1" android:layout_weight="1"
android:background="@drawable/pillborder" android:background="@drawable/pillborder"
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:text="@string/omnipod_cmd_pod_history" /> android:text="@string/omnipod_history_title" />
</LinearLayout> </LinearLayout>

View file

@ -24,7 +24,7 @@
android:layout_marginBottom="3dp" android:layout_marginBottom="3dp"
android:layout_weight="0.5" android:layout_weight="0.5"
android:gravity="center" android:gravity="center"
android:text="@string/omnipod_pod_mgmt_title" android:text="@string/omnipod_pod_management_title"
android:textAlignment="center" android:textAlignment="center"
android:textSize="12pt" android:textSize="12pt"
android:textStyle="bold" /> android:textStyle="bold" />
@ -69,7 +69,7 @@
android:layout_marginBottom="3dp" android:layout_marginBottom="3dp"
android:layout_weight="0.5" android:layout_weight="0.5"
android:drawableTop="@drawable/ic_cp_pump_canula" android:drawableTop="@drawable/ic_cp_pump_canula"
android:text="@string/omnipod_cmd_init_pod" android:text="@string/omnipod_button_init_pod"
android:textAllCaps="false" /> android:textAllCaps="false" />
<TextView <TextView
@ -90,7 +90,7 @@
android:layout_marginBottom="3dp" android:layout_marginBottom="3dp"
android:layout_weight="0.5" android:layout_weight="0.5"
android:drawableTop="@drawable/ic_actions_temptarget" android:drawableTop="@drawable/ic_actions_temptarget"
android:text="@string/omnipod_cmd_deactivate_pod" android:text="@string/omnipod_button_deactivate_pod"
android:textAllCaps="false" /> android:textAllCaps="false" />
<TextView <TextView
@ -111,7 +111,7 @@
android:layout_marginBottom="3dp" android:layout_marginBottom="3dp"
android:layout_weight="0.5" android:layout_weight="0.5"
android:drawableTop="@drawable/ic_cp_pump_canula" android:drawableTop="@drawable/ic_cp_pump_canula"
android:text="@string/omnipod_cmd_discard_pod" android:text="@string/omnipod_button_discard_pod"
android:textAllCaps="false" /> android:textAllCaps="false" />
<TextView <TextView
@ -132,7 +132,7 @@
android:layout_marginBottom="3dp" android:layout_marginBottom="3dp"
android:layout_weight="0.5" android:layout_weight="0.5"
android:drawableTop="@drawable/ic_danarhistory" android:drawableTop="@drawable/ic_danarhistory"
android:text="@string/omnipod_cmd_pod_history" android:text="@string/omnipod_button_pod_history"
android:textAllCaps="false" /> android:textAllCaps="false" />
</LinearLayout> </LinearLayout>

View file

@ -4,35 +4,172 @@
<!-- Omnipod - Base --> <!-- Omnipod - Base -->
<string name="description_pump_omnipod">Интеграция на помпата Omnipod, изисква RileyLink устройство (с фърмуер минимум 2.0 ) .</string> <string name="description_pump_omnipod">Интеграция на помпата Omnipod, изисква RileyLink устройство (с фърмуер минимум 2.0 ) .</string>
<!-- Omnipod Configuration --> <!-- Omnipod Configuration -->
<string name="omnipod_config_bolus_beeps_enabled">Звук при болус активен</string>
<string name="omnipod_config_basal_beeps_enabled">Звук при базал активен</string>
<string name="omnipod_config_smb_beeps_enabled">Звук при SMB активен</string>
<string name="omnipod_config_tbr_beeps_enabled">Звук при временен базал активен</string>
<string name="omnipod_config_suspend_delivery_button_enabled">Бутон за спиране на инсулина активен</string>
<string name="omnipod_config_pulse_log_button_enabled">Разрешено е бутонът за Pulse Log </string>
<string name="omnipod_config_time_change_enabled">Разрешено е Лятно часово време</string>
<string name="omnipod_config_expiration_reminder_enabled">Напомняне за срок</string>
<string name="omnipod_config_expiration_reminder_hours_before_shutdown">Часове преди изключване</string>
<string name="omnipod_config_low_reservoir_alert_enabled">Малко инсулин в резервоар</string>
<string name="omnipod_config_low_reservoir_alert_units">Брой единици</string>
<!-- Omnipod - Fragment --> <!-- Omnipod - Fragment -->
<string name="omnipod_moments_ago">Преди малко</string>
<string name="omnipod_pod_mgmt">Настройки на под</string>
<string name="omnipod_pod_status">Статус на под</string>
<string name="omnipod_total_delivered_label">Общо доставени</string>
<string name="omnipod_total_delivered">%1$.2fЕ</string>
<string name="omnipod_reservoir_left">%1$.2f Е остават</string> <string name="omnipod_reservoir_left">%1$.2f Е остават</string>
<string name="omnipod_reservoir_over50">Над 50 Е</string> <string name="omnipod_reservoir_over50">Над 50 Е</string>
<string name="omnipod_pod_address">Адрес на под</string>
<string name="omnipod_pod_expiry">Капсулата изтича</string>
<string name="omnipod_warning">Внимание</string>
<string name="omnipod_pod_status_no_active_pod">Няма активен под</string>
<string name="omnipod_pod_status_waiting_for_pair_and_prime">Настройка в прогрес (изчакване на сдвояване и пълнене)</string>
<string name="omnipod_pod_status_waiting_for_cannula_insertion">Настройка в прогрес (въвеждане на канюла)</string>
<string name="omnipod_pod_status_running">Изпълнява</string>
<string name="omnipod_pod_status_suspended">Прекратено</string>
<string name="omnipod_pod_status_pod_fault">Грешка в под</string>
<string name="omnipod_pod_status_activation_time_exceeded">Времето за активация изтече</string>
<string name="omnipod_pod_status_inactive">Неактивен</string>
<string name="omnipod_pod_status_pod_fault_description">Грешка на под: %1$s %2$s</string>
<string name="omnipod_pod_active_alerts">Сигнали за активен под</string>
<string name="omnipod_acknowledge_active_alerts_short">Потвърди аларми</string>
<!-- Omnipod - Dialogs --> <!-- Omnipod - Dialogs -->
<string name="omnipod_frequency">Omnipod (433.91 MHz)</string> <string name="omnipod_frequency">Omnipod (433.91 MHz)</string>
<!-- Omnipod - Error --> <!-- Omnipod - Error -->
<string name="omnipod_error_rileylink_address_invalid">Грешен RileyLink адрес.</string>
<string name="omnipod_error_operation_not_possible_no_configuration">Забранено действие.\n\n Първо трябва да конфигурурате Omnipod , преди да използвате тази операция,.</string>
<string name="omnipod_error_operation_not_possible_no_profile">Операцията не е възможна.\n\n Трябва да изчакате няколко минути, докато AAPS се опита да зададе профил за първи път.</string>
<string name="omnipod_error_illegal_init_action_type">Неправилен PodInitActionType: %1$s</string> <string name="omnipod_error_illegal_init_action_type">Неправилен PodInitActionType: %1$s</string>
<string name="omnipod_error_pod_not_attached">Няма активен под</string>
<string name="omnipod_driver_error_setup_action_verification_failed">Грешка при проверка на командата</string>
<string name="omnipod_driver_error_unexpected_exception_type">Непредвидена грешка. Моля, докладвайте! (тип: %1$s).</string> <string name="omnipod_driver_error_unexpected_exception_type">Непредвидена грешка. Моля, докладвайте! (тип: %1$s).</string>
<string name="omnipod_driver_error_invalid_parameters">Неуспешна комуникация: получени грешни входни параметри</string>
<string name="omnipod_driver_error_communication_failed_timeout">Връзката е неуспешна: таймаут</string>
<string name="omnipod_driver_error_communication_failed_unexpected_exception">Комуникацията е неуспешна: възникнала е неочаквана грешка. Моля, докладвайте!</string> <string name="omnipod_driver_error_communication_failed_unexpected_exception">Комуникацията е неуспешна: възникнала е неочаквана грешка. Моля, докладвайте!</string>
<string name="omnipod_driver_error_crc_mismatch">Неуспешна комуникация: проверката на целостта на съобщението е неуспешна</string>
<string name="omnipod_driver_error_invalid_packet_type">Неуспешна комуникация: получени грешни входни параметри</string>
<string name="omnipod_driver_error_invalid_progress_state">Съобщението е неуспешно: Pod е в лошо състояние</string>
<string name="omnipod_driver_error_invalid_response">Неуспешна комуникация: получени грешни входни параметри</string>
<string name="omnipod_driver_error_invalid_message_sequence_number">Неуспешна комуникация: получи съобщение с невалиден номер на последователност от Pod</string>
<string name="omnipod_driver_error_invalid_message_address">Неуспешна комуникация: получи съобщение с невалиден номер на последователност от Pod</string>
<string name="omnipod_driver_error_message_decoding_failed">Неуспешна комуникация: получени грешни входни параметри</string>
<string name="omnipod_driver_error_nonce_resync_failed">Комуникацията е неуспешна: nonce ресинхронизирането е неуспешно</string>
<string name="omnipod_driver_error_nonce_out_of_sync">Комуникацията е неуспешна: nonce ресинхронизирането е неуспешно</string>
<string name="omnipod_driver_error_not_enough_data">Комуникацията е неуспешна: няма достатъчно данни, получени от Pod</string>
<string name="omnipod_driver_error_pod_fault">Грешка на Pod (%1$03d %2$s). Моля, деактивирайте вашия Pod и стартирайте нов</string>
<string name="omnipod_driver_error_pod_returned_error_response">Комуникацията е неуспешна: Pod върна отговор с грешка</string>
<!-- Omnipod - Pod Mgmt --> <!-- Omnipod - Pod Mgmt -->
<string name="omnipod_pod_mgmt_title">Управление на Pod</string>
<string name="omnipod_cmd_init_pod">Инициализация на Pod</string> <string name="omnipod_cmd_init_pod">Инициализация на Pod</string>
<string name="omnipod_cmd_deactivate_pod">Деактивирай под</string> <string name="omnipod_cmd_deactivate_pod">Деактивирай под</string>
<string name="omnipod_cmd_discard_pod">Премахни под</string>
<string name="omnipod_cmd_pod_history">История на под</string>
<string name="omnipod_cmd_set_bolus">Стартирай болус</string>
<string name="omnipod_cmd_cancel_bolus">Отмяна на болус</string>
<string name="omnipod_cmd_set_tbr">Приложи временен базал</string>
<string name="omnipod_cmd_cancel_tbr_by_driver">Отказ на базал</string>
<string name="omnipod_cmd_cancel_tbr">Откажи временен базал</string>
<string name="omnipod_cmd_set_basal_schedule">Задаване на график за базал</string>
<string name="omnipod_cmd_get_pod_status">Получу статус на под</string>
<string name="omnipod_cmd_get_pod_info">Получи информация за Pod</string>
<string name="omnipod_cmd_set_time">Задаване на време</string>
<string name="omnipod_cmd_configure_alerts">Конфигуриране на аларми</string>
<string name="omnipod_cmd_acknowledge_alerts">Потвърждение на аларми</string>
<string name="omnipod_cmd_suspend_delivery">Спиране на доставката на инсулин</string>
<string name="omnipod_cmd_resume_delivery">Подновяване на доставката</string>
<string name="omnipod_cmd_unknown_entry">Непознат запис</string>
<string name="omnipod_cmd_bolus_value">%1$.2fЕ</string>
<string name="omnipod_cmd_bolus_value_with_carbs">%1$.2f U, CH=%2$.1f g</string>
<string name="omnipod_cmd_tbr_value">Скорост: %1$.2f U, Продължителност: %2$d мин</string>
<string name="omnipod_cmd_discard_pod_desc">Ако натиснете <b>OK</b>, състоянието на Pod ще бъде нулирано и няма да можете да общувате с него повече. Правете това, само ако вече не можете да се свързвате с него. Ако все още можете да общувате с Под, моля, използвайте опцията <b>Деактивирай Pod</b>.</string>
<string name="omnipod_cmd_pod_history_na">Историята на Pod не е достъпна в момента.</string> <string name="omnipod_cmd_pod_history_na">Историята на Pod не е достъпна в момента.</string>
<string name="omnipod_init_pod_wizard_step1_title">Напълни Pod</string> <string name="omnipod_init_pod_wizard_step1_title">Напълни Pod</string>
<string name="omnipod_init_pod_wizard_step1_desc">\nНапълнете с достатъчно инсулин за 3 дни.\n\nИзчакайте два сигнала от Pod по време на процеса на зареждане. Те показват, че е вмъкнат минималният размер от 85U. Уверете се, че сте изпразнил напълно спринцовката, дори след като сте чули двата сигнала.\n\nСлед пълнене на Pod, моля натиснете <b>Следващ</b>.\n\n<b>Забележка:</b> не вадете капачката на капсулата на Podв този момент.</string>
<string name="omnipod_init_pod_wizard_step2_title">Пълнене</string> <string name="omnipod_init_pod_wizard_step2_title">Пълнене</string>
<string name="omnipod_init_pod_wizard_step2_action_header">Опитвам се да се сдвоя с Pod.\n\nКогато всички елементи са проверени, можете да натиснете <b>Следващ</b>.\n\n<b>Забележка:</b> задръжте Pod много близо до RileyLink в този момент.</string>
<string name="omnipod_init_pod_wizard_step3_title">Прикрепете Pod</string> <string name="omnipod_init_pod_wizard_step3_title">Прикрепете Pod</string>
<string name="omnipod_init_pod_wizard_step3_desc">\nПодгответе мястото за инфузия. Отстранете капачката на Pod и лепенката и прикрепете капсулата към мястото за инфузия.\n\nАко канюла стърчи, моля натиснете <b>Отказ</b> и изхвърлете вашия Pod.\n\nПрес <b>Следваща</b> да се вмъкне канюлата и да започне базалната доставка.</string> <string name="omnipod_init_pod_wizard_step3_desc">\nПодгответе мястото за инфузия. Отстранете капачката на Pod и лепенката и прикрепете капсулата към мястото за инфузия.\n\nАко канюла стърчи, моля натиснете <b>Отказ</b> и изхвърлете вашия Pod.\n\nПрес <b>Следваща</b> да се вмъкне канюлата и да започне базалната доставка.</string>
<string name="omnipod_init_pod_wizard_step4_title">Вмъкване на канюла</string> <string name="omnipod_init_pod_wizard_step4_title">Вмъкване на канюла</string>
<string name="omnipod_init_pod_wizard_step4_action_header">Опитвам се да определя първоначалния базален график и да вмъкна канюлата.\n\nКогато всички елементи са проверени, можете да натиснете <b>Следващ</b>.</string> <string name="omnipod_init_pod_wizard_step4_action_header">Опитвам се да определя първоначалния базален график и да вмъкна канюлата.\n\nКогато всички елементи са проверени, можете да натиснете <b>Следващ</b>.</string>
<string name="omnipod_init_pod_wizard_pod_info_title">Информация за Pod</string>
<string name="omnipod_init_pod_wizard_pod_info_init_pod_description">\Podе активна.\n\nВашият базален график е програмиран и канюлата вмъкната.\n\nМоля, проверете дали канюлата е поставена правилно или заменете Pod, ако чувствате, че не е.</string> <string name="omnipod_init_pod_wizard_pod_info_init_pod_description">\Podе активна.\n\nВашият базален график е програмиран и канюлата вмъкната.\n\nМоля, проверете дали канюлата е поставена правилно или заменете Pod, ако чувствате, че не е.</string>
<string name="omnipod_remove_pod_wizard_step1_title">Деактивирай Pod</string> <string name="omnipod_remove_pod_wizard_step1_title">Деактивирай Pod</string>
<string name="omnipod_remove_pod_wizard_step1_desc">\nНатиснете <b>Следващ</b> , за да деактивирате Pod.\n\n<b>Забележка:</b> Това ще спре всички доставки на инсулин и деактивира Pod.</string> <string name="omnipod_remove_pod_wizard_step1_desc">\nНатиснете <b>Следващ</b> , за да деактивирате Pod.\n\n<b>Забележка:</b> Това ще спре всички доставки на инсулин и деактивира Pod.</string>
<string name="omnipod_remove_pod_wizard_step2_title">Деактивиране на Pod</string> <string name="omnipod_remove_pod_wizard_step2_title">Деактивиране на Pod</string>
<string name="omnipod_remove_pod_wizard_step2_action_header">Деактивиране на Pod.\n\nКогато всички елементи са проверени, можете да натиснете <b>Следващ</b>.\n\n<b>Забележка:</b> Ако деактивирането непрекъснато се проваля, моля натиснете <b>Отказ</b> и използвайте опция <b>Нулирай Pod</b> , за да възстановите състоянието на Pod.</string>
<string name="omnipod_init_pod_wizard_pod_info_remove_pod_description">Pod изключен.\n\nмоля, извадете Pod от тялото си и го хвърли.</string> <string name="omnipod_init_pod_wizard_pod_info_remove_pod_description">Pod изключен.\n\nмоля, извадете Pod от тялото си и го хвърли.</string>
<string name="omnipod_init_pod_pair_pod">Сдвояване на под</string> <string name="omnipod_init_pod_pair_pod">Сдвояване на под</string>
<string name="omnipod_init_pod_prime_pod">Пълнене на под</string> <string name="omnipod_init_pod_prime_pod">Пълнене на под</string>
<string name="omnipod_init_pod_fill_cannula">Напълни канула</string>
<string name="omnipod_init_pod_set_basal_profile">Приложи базалният профил</string>
<string name="omnipod_deactivate_pod_cancel_delivery">Отмяна</string>
<string name="omnipod_deactivate_pod_deactivate_pod">Деактивирай под</string>
<!-- Omnipod - Base --> <!-- Omnipod - Base -->
<string name="omnipod_alert_finish_pairing_reminder">Край на напомняне за сдвояване</string>
<string name="omnipod_alert_finish_setup_reminder_reminder">Край на напомнянето за настройка</string> <string name="omnipod_alert_finish_setup_reminder_reminder">Край на напомнянето за настройка</string>
<string name="omnipod_alert_expiration">Подът скоро ще изтече</string>
<string name="omnipod_alert_expiration_advisory">Подът скоро ще изтече</string>
<string name="omnipod_alert_shutdown_imminent">Спирането е неизбежно</string> <string name="omnipod_alert_shutdown_imminent">Спирането е неизбежно</string>
<string name="omnipod_alert_low_reservoir">Минимален инсулин в резервоара</string> <string name="omnipod_alert_low_reservoir">Минимален инсулин в резервоара</string>
<string name="omnipod_alert_unknown_alert">Непозната аларма</string> <string name="omnipod_alert_unknown_alert">Непозната аларма</string>
<string name="omnipod_error_set_basal_failed_delivery_might_be_suspended">Неуспешно задаване на базален профил. Доставката може да бъде спряна! Моля, ръчно опреснете състоянието на Pod от раздел Omnipod и възобновете доставката, ако е необходимо.</string>
<string name="omnipod_error_set_basal_might_have_failed_delivery_might_be_suspended">Неуспешно задаване на базален профил. Доставката може да бъде спряна! Моля, ръчно опреснете състоянието на Pod от раздел Omnipod и възобновете доставката, ако е необходимо.</string>
<string name="omnipod_error_set_basal_failed_delivery_suspended">Неуспешно задаване на базален профил. Доставката е спряна! Моля, ръчно подновяване на доставката от раздела Omnipod.</string>
<string name="omnipod_error_set_temp_basal_failed_old_tbr_might_be_cancelled">Задаването на временен базал е неуспешно. Ако преди това е изпълнявал временен базал, може да е бил отменен. Моля, ръчно опреснете статуса на Pod от раздела Omnipod.</string>
<string name="omnipod_error_set_temp_basal_failed_old_tbr_cancelled_new_might_have_failed">Задаването на временен базал е неуспешно. Ако преди това е изпълнявал временен базал, може да е бил отменен. Моля, ръчно опреснете статуса на Pod от раздела Omnipod.</string>
<string name="omnipod_error_set_time_failed_delivery_might_be_suspended">Неуспешно задаване на базален профил. Доставката може да бъде спряна! Моля, ръчно опреснете състоянието на Pod от раздел Omnipod и възобновете доставката, ако е необходимо.</string>
<string name="omnipod_error_set_time_failed_delivery_suspended">Неуспешно задаване на базален профил. Доставката е спряна! Моля, ръчно подновяване на доставката от раздела Omnipod.</string>
<string name="omnipod_bolus_failed_uncertain">Не може да се провери дали болус е успял. Моля, уверете се ръчно, че Вашата Pod се активира чрез слушане на кликвания. <b>Ако сте сигурни, че болус не е успял, вие трябва ръчно да изтриете болния запис от лечение, дори ако щракнете върху \'Отказ от болус\' сега!</b></string>
<string name="omnipod_bolus_failed_uncertain_smb">Не може да се провери дали SMB bolus (%1$.2f U) е успял. <b>Ако сте сигурни, че на Bolus не е успял, трябва ръчно да изтриете запис SMB от лечение.</b></string>
<string name="omnipod_rl_stats">Статистика на RL</string>
<string name="omnipod_read_pulse_log_short">Pulse лог</string>
<string name="omnipod_pod_lot">LOT</string>
<string name="omnipod_pod_tid">TID</string>
<string name="omnipod_pod_firmware_version">Firmware версия</string>
<string name="omnipod_errors">Грешки</string>
<string name="omnipod_cmd_basal_profile_not_set_is_same">Профилът е идентичен.</string>
<string name="omnipod_custom_action_reset_rileylink">Нулирай RileyLink конфигурацията</string>
<string name="omnipod_time_or_timezone_change">Време и/или промяна на часовата зона на помпата</string>
<string name="omnipod_composite_time">%1$s и %2$s</string>
<string name="omnipod_time_ago">преди %s</string>
<string name="omnipod_waiting_for_rileylink_connection">Изчакване за връзка...</string>
<string name="omnipod_bolus_did_not_succeed">Болус неуспешен</string>
<string name="omnipod_refresh">Обнови</string>
<string name="omnipod_resume_delivery">Подновяване на доставката</string>
<string name="omnipod_error_pod_suspended">Pod изключен</string>
<string name="omnipod_less_than_a_minute_ago">преди по-малко от минута</string>
<string name="omnipod_suspend_delivery_short">Спиране</string>
<string name="omnipod_cmd_pair_and_prime">Сдвояване и пълнене</string>
<string name="omnipod_cmd_fill_cannula_set_basal_profile">Запълнете канюлата и настройте базалния профил</string>
<string name="omnipod_cmd_get_pulse_log">Вземи лога</string>
<string name="omnipod_uncertain_failure">Неизвестна грешка</string>
<string name="omnipod_cancelled_old_tbr_failed_to_set_new">Спрян стар базал, но неуспешно задаване на нов</string>
<string name="omnipod_cmd_set_fake_suspended_tbr">Поставете фалшив временен базал, защото Pod е спряно</string>
<string name="omnipod_cmd_cancel_fake_suspended_tbr">Анулират фалшив временен базал, който е създаден, защото Pod е спряно</string>
<string name="omnipod_uncertain">неизвестно</string>
<string name="omnipod_expiration_alerts_updated">Конфигурация на тревога актуализирана в Pod</string>
<string name="omnipod_preference_category_rileylink">RileyLink</string>
<string name="omnipod_preference_category_other">Друго</string>
<string name="omnipod_preference_category_alerts">Известия</string>
<string name="omnipod_preference_category_confirmation_beeps">Звук за потвърждение</string>
<string name="omnipod_wizard_button_exit">Изход</string>
<string name="omnipod_wizard_button_previous">Предишен</string>
<string name="omnipod_wizard_button_next">Следващ</string>
<string name="omnipod_wizard_button_finish">Край</string>
<string name="omnipod_history_item_description">Описание</string>
<string name="omnipod_history_item_source">Източник</string>
<string name="omnipod_history_item_date">Дата</string>
<string name="omnipod_history_type">Тип:</string>
<plurals name="omnipod_minutes">
<item quantity="one">%1$d минути</item>
<item quantity="other">%1$d минути</item>
</plurals>
<plurals name="omnipod_hours">
<item quantity="one">%1$d часа</item>
<item quantity="other">%1$d часа</item>
</plurals>
</resources> </resources>

View file

@ -110,10 +110,27 @@
<string name="omnipod_alert_shutdown_imminent">Blíží se vypnutí</string> <string name="omnipod_alert_shutdown_imminent">Blíží se vypnutí</string>
<string name="omnipod_alert_low_reservoir">Nízký stav zásobníku</string> <string name="omnipod_alert_low_reservoir">Nízký stav zásobníku</string>
<string name="omnipod_alert_unknown_alert">Neznámá výstraha</string> <string name="omnipod_alert_unknown_alert">Neznámá výstraha</string>
<string name="omnipod_bolus_failed_uncertain_smb">Nelze ověřit, zda byl bolus SMB (%1$.2f U) úspěšně vydán. <b>Pokud jste si jisti, že bolus nebyl vydán, měli byste ručně odstranit položku SMB z Ošetření.</b></string>
<string name="omnipod_rl_stats">Statistika RL</string>
<string name="omnipod_read_pulse_log_short">Pulse log</string>
<string name="omnipod_pod_lot">LOT</string>
<string name="omnipod_pod_tid">TID</string>
<string name="omnipod_pod_firmware_version">Verze firmwaru</string>
<string name="omnipod_errors">Chyby</string> <string name="omnipod_errors">Chyby</string>
<string name="omnipod_cmd_basal_profile_not_set_is_same">Bazální profil je stejný, takže nebude znovu nastaven.</string> <string name="omnipod_cmd_basal_profile_not_set_is_same">Bazální profil je stejný, takže nebude znovu nastaven.</string>
<string name="omnipod_custom_action_reset_rileylink">Resetovat konfiguraci RileyLinku</string>
<string name="omnipod_time_or_timezone_change">Změna času nebo časového pásma Podu</string>
<string name="omnipod_composite_time">%1$s a %2$s</string>
<string name="omnipod_time_ago">před %1$s</string>
<string name="omnipod_waiting_for_rileylink_connection">Čekání na připojení RileyLink...</string>
<string name="omnipod_bolus_did_not_succeed">Podání bolusu bylo neúspěšné</string>
<string name="omnipod_refresh">Obnovit</string> <string name="omnipod_refresh">Obnovit</string>
<string name="omnipod_resume_delivery">Obnovit dodávání inzulínu</string>
<string name="omnipod_error_pod_suspended">Pod pozastavený</string>
<string name="omnipod_less_than_a_minute_ago">Před méně než minutou</string>
<string name="omnipod_suspend_delivery_short">Vypnutí</string> <string name="omnipod_suspend_delivery_short">Vypnutí</string>
<string name="omnipod_cmd_pair_and_prime">Spárovat a naplnit</string>
<string name="omnipod_cmd_fill_cannula_set_basal_profile">Naplnit kanylu a nastavit bazální profil</string>
<string name="omnipod_uncertain_failure">Neznámá chyba</string> <string name="omnipod_uncertain_failure">Neznámá chyba</string>
<string name="omnipod_cancelled_old_tbr_failed_to_set_new">Byl zrušen starý dočasný bazál, ale nový dočasný bazál se nepodařilo nastavit</string> <string name="omnipod_cancelled_old_tbr_failed_to_set_new">Byl zrušen starý dočasný bazál, ale nový dočasný bazál se nepodařilo nastavit</string>
<string name="omnipod_cmd_set_fake_suspended_tbr">Nastavit falešný dočasný bazál, protože Pod je pozastaven</string> <string name="omnipod_cmd_set_fake_suspended_tbr">Nastavit falešný dočasný bazál, protože Pod je pozastaven</string>

View file

@ -15,7 +15,7 @@
<string name="omnipod_config_low_reservoir_alert_units">Anzahl der Einheiten</string> <string name="omnipod_config_low_reservoir_alert_units">Anzahl der Einheiten</string>
<!-- Omnipod - Fragment --> <!-- Omnipod - Fragment -->
<string name="omnipod_moments_ago">gerade eben</string> <string name="omnipod_moments_ago">gerade eben</string>
<string name="omnipod_pod_mgmt">Pod mgmt</string> <string name="omnipod_button_pod_management">Pod mgmt</string>
<string name="omnipod_pod_status">Pod Status</string> <string name="omnipod_pod_status">Pod Status</string>
<string name="omnipod_total_delivered_label">Insgesamt abgegeben</string> <string name="omnipod_total_delivered_label">Insgesamt abgegeben</string>
<string name="omnipod_total_delivered">%1$.2f IE</string> <string name="omnipod_total_delivered">%1$.2f IE</string>
@ -34,7 +34,7 @@
<string name="omnipod_pod_status_inactive">Inaktiv</string> <string name="omnipod_pod_status_inactive">Inaktiv</string>
<string name="omnipod_pod_status_pod_fault_description">Pod-Fehler: %1$s %2$s</string> <string name="omnipod_pod_status_pod_fault_description">Pod-Fehler: %1$s %2$s</string>
<string name="omnipod_pod_active_alerts">Aktive Pod-Warnungen</string> <string name="omnipod_pod_active_alerts">Aktive Pod-Warnungen</string>
<string name="omnipod_acknowledge_active_alerts_short">Alarm bestätigen</string> <string name="omnipod_button_acknowledge_active_alerts">Alarm bestätigen</string>
<!-- Omnipod - Dialogs --> <!-- Omnipod - Dialogs -->
<string name="omnipod_frequency">Omnipod (433.91 MHz)</string> <string name="omnipod_frequency">Omnipod (433.91 MHz)</string>
<!-- Omnipod - Error --> <!-- Omnipod - Error -->
@ -43,29 +43,28 @@
<string name="omnipod_error_operation_not_possible_no_profile">Aktion ist nicht möglich.\n\n Du musst ein paar Minuten warten bis AAPS versucht, das Basalprofil zum ersten Mal zu setzen.</string> <string name="omnipod_error_operation_not_possible_no_profile">Aktion ist nicht möglich.\n\n Du musst ein paar Minuten warten bis AAPS versucht, das Basalprofil zum ersten Mal zu setzen.</string>
<string name="omnipod_error_illegal_init_action_type">Illegal PodInitActionType: %1$s</string> <string name="omnipod_error_illegal_init_action_type">Illegal PodInitActionType: %1$s</string>
<string name="omnipod_error_pod_not_attached">Kein aktiver Pod</string> <string name="omnipod_error_pod_not_attached">Kein aktiver Pod</string>
<string name="omnipod_driver_error_setup_action_verification_failed">Kommandoprüfung fehlgeschlagen</string> <string name="omnipod_error_setup_action_verification_failed">Kommandoprüfung fehlgeschlagen</string>
<string name="omnipod_driver_error_unexpected_exception_type">Es ist ein unerwarteter Fehler aufgetreten. Bitte melden! (Typ: %1$s).</string> <string name="omnipod_error_invalid_parameters">Kommunikation fehlgeschlagen: Ungültige Eingabeparameter empfangen</string>
<string name="omnipod_driver_error_invalid_parameters">Kommunikation fehlgeschlagen: Ungültige Eingabeparameter empfangen</string> <string name="omnipod_error_communication_failed_timeout">Keine Verbindung: Zeitüberschreitung</string>
<string name="omnipod_driver_error_communication_failed_timeout">Keine Verbindung: Zeitüberschreitung</string> <string name="omnipod_error_communication_failed_unexpected_exception">Keine Verbindung: Es ist ein unerwarteter Fehler aufgetreten. Bitte melden!</string>
<string name="omnipod_driver_error_communication_failed_unexpected_exception">Keine Verbindung: Es ist ein unerwarteter Fehler aufgetreten. Bitte melden!</string> <string name="omnipod_error_crc_mismatch">Kommunikation fehlgeschlagen: Die Überprüfung der Nachrichtenintegrität ist fehlgeschlagen</string>
<string name="omnipod_driver_error_crc_mismatch">Kommunikation fehlgeschlagen: Die Überprüfung der Nachrichtenintegrität ist fehlgeschlagen</string> <string name="omnipod_error_invalid_packet_type">Kommunikation fehlgeschlagen: Es wurde ein ungültiges Paket vom Pod empfangen</string>
<string name="omnipod_driver_error_invalid_packet_type">Kommunikation fehlgeschlagen: Es wurde ein ungültiges Paket vom Pod empfangen</string> <string name="omnipod_error_invalid_progress_state">Kommunikation fehlgeschlagen: Der Pod befindet sich in einem falschen Status</string>
<string name="omnipod_driver_error_invalid_progress_state">Kommunikation fehlgeschlagen: Der Pod befindet sich in einem falschen Status</string> <string name="omnipod_error_invalid_response">Kommunikation fehlgeschlagen: Es wurde eine ungültige Antwort vom Pod empfangen</string>
<string name="omnipod_driver_error_invalid_response">Kommunikation fehlgeschlagen: Es wurde eine ungültige Antwort vom Pod empfangen</string> <string name="omnipod_error_invalid_message_sequence_number">Kommunikation fehlgeschlagen: Ungültige Zeichenfolge vom Pod empfangen</string>
<string name="omnipod_driver_error_invalid_message_sequence_number">Kommunikation fehlgeschlagen: Ungültige Zeichenfolge vom Pod empfangen</string> <string name="omnipod_error_invalid_message_address">Kommunikation fehlgeschlagen: Ungültige Adresse vom Pod empfangen</string>
<string name="omnipod_driver_error_invalid_message_address">Kommunikation fehlgeschlagen: Ungültige Adresse vom Pod empfangen</string> <string name="omnipod_error_message_decoding_failed">Kommunikation fehlgeschlagen: Nachricht vom Pod konnte nicht decodiert werden</string>
<string name="omnipod_driver_error_message_decoding_failed">Kommunikation fehlgeschlagen: Nachricht vom Pod konnte nicht decodiert werden</string> <string name="omnipod_error_nonce_resync_failed">Kommunikation fehlgeschlagen: Nonce resync fehlgeschlagen</string>
<string name="omnipod_driver_error_nonce_resync_failed">Kommunikation fehlgeschlagen: Nonce resync fehlgeschlagen</string> <string name="omnipod_error_nonce_out_of_sync">Kommunikation fehlgeschlagen: Nonce nicht synchronisiert</string>
<string name="omnipod_driver_error_nonce_out_of_sync">Kommunikation fehlgeschlagen: Nonce nicht synchronisiert</string> <string name="omnipod_error_not_enough_data">Kommunikation fehlgeschlagen: Nicht genügend Daten vom Pod empfangen</string>
<string name="omnipod_driver_error_not_enough_data">Kommunikation fehlgeschlagen: Nicht genügend Daten vom Pod empfangen</string> <string name="omnipod_error_pod_fault">Ein Pod-Fehler (%1$03d %2$s) wurde festgestellt. Bitte deaktiviere den Pod und starte einen neuen</string>
<string name="omnipod_driver_error_pod_fault">Ein Pod-Fehler (%1$03d %2$s) wurde festgestellt. Bitte deaktiviere den Pod und starte einen neuen</string> <string name="omnipod_error_pod_returned_error_response">Kommunikation fehlgeschlagen: Fehlerhafte Antwort vom Pod</string>
<string name="omnipod_driver_error_pod_returned_error_response">Kommunikation fehlgeschlagen: Fehlerhafte Antwort vom Pod</string>
<!-- Omnipod - Pod Mgmt --> <!-- Omnipod - Pod Mgmt -->
<string name="omnipod_pod_mgmt_title">Pod Management</string> <string name="omnipod_pod_management_title">Pod Management</string>
<string name="omnipod_cmd_init_pod">Init Pod</string> <string name="omnipod_button_init_pod">Init Pod</string>
<string name="omnipod_cmd_deactivate_pod">Pod deaktivieren</string> <string name="omnipod_cmd_deactivate_pod">Pod deaktivieren</string>
<string name="omnipod_cmd_discard_pod">Pod ablegen</string> <string name="omnipod_cmd_discard_pod">Pod ablegen</string>
<string name="omnipod_cmd_pod_history">Pod Historie</string> <string name="omnipod_button_pod_history">Pod Historie</string>
<string name="omnipod_cmd_set_bolus">Mahlzeiten Bolus abgeben</string> <string name="omnipod_cmd_set_bolus">Mahlzeiten Bolus abgeben</string>
<string name="omnipod_cmd_cancel_bolus">Bolus abbrechen</string> <string name="omnipod_cmd_cancel_bolus">Bolus abbrechen</string>
<string name="omnipod_cmd_set_tbr">Temp. Basalrate setzen</string> <string name="omnipod_cmd_set_tbr">Temp. Basalrate setzen</string>
@ -80,9 +79,9 @@
<string name="omnipod_cmd_suspend_delivery">Abgabe unterbrechen</string> <string name="omnipod_cmd_suspend_delivery">Abgabe unterbrechen</string>
<string name="omnipod_cmd_resume_delivery">Abgabe fortsetzen</string> <string name="omnipod_cmd_resume_delivery">Abgabe fortsetzen</string>
<string name="omnipod_cmd_unknown_entry">Unbekannte Eingabe</string> <string name="omnipod_cmd_unknown_entry">Unbekannte Eingabe</string>
<string name="omnipod_cmd_bolus_value">%1$.2f IE</string> <string name="omnipod_history_bolus_value">%1$.2f IE</string>
<string name="omnipod_cmd_bolus_value_with_carbs">%1$.2f IE, CH=%2$.1f g</string> <string name="omnipod_history_bolus_value_with_carbs">%1$.2f IE, CH=%2$.1f g</string>
<string name="omnipod_cmd_pod_history_na">Pod Historie derzeit nicht verfügbar.</string> <string name="omnipod_history_history_not_available">Pod Historie derzeit nicht verfügbar.</string>
<string name="omnipod_init_pod_wizard_step1_title">Befülle den Pod</string> <string name="omnipod_init_pod_wizard_step1_title">Befülle den Pod</string>
<string name="omnipod_init_pod_wizard_step2_title">Befüllen</string> <string name="omnipod_init_pod_wizard_step2_title">Befüllen</string>
<string name="omnipod_init_pod_wizard_step3_title">Befestige den Pod</string> <string name="omnipod_init_pod_wizard_step3_title">Befestige den Pod</string>
@ -106,9 +105,9 @@
<string name="omnipod_alert_low_reservoir">Niedriger Reservoirstand</string> <string name="omnipod_alert_low_reservoir">Niedriger Reservoirstand</string>
<string name="omnipod_alert_unknown_alert">Unbekannter Alarm</string> <string name="omnipod_alert_unknown_alert">Unbekannter Alarm</string>
<string name="omnipod_errors">Fehler</string> <string name="omnipod_errors">Fehler</string>
<string name="omnipod_cmd_basal_profile_not_set_is_same">Basalprofil, unverändert wird nicht erneut eingestellt.</string> <string name="omnipod_confirmation_basal_profile_not_set_is_same">Basalprofil, unverändert wird nicht erneut eingestellt.</string>
<string name="omnipod_refresh">Aktualisieren</string> <string name="omnipod_button_refresh">Aktualisieren</string>
<string name="omnipod_suspend_delivery_short">Unterbrechungen</string> <string name="omnipod_button_suspend_delivery">Unterbrechungen</string>
<string name="omnipod_preference_category_rileylink">RileyLink</string> <string name="omnipod_preference_category_rileylink">RileyLink</string>
<string name="omnipod_preference_category_other">Andere</string> <string name="omnipod_preference_category_other">Andere</string>
<string name="omnipod_wizard_button_exit">Schließen</string> <string name="omnipod_wizard_button_exit">Schließen</string>

View file

@ -11,12 +11,11 @@
<string name="omnipod_frequency">Omnipod (433.91 MHz)</string> <string name="omnipod_frequency">Omnipod (433.91 MHz)</string>
<!-- Omnipod - Error --> <!-- Omnipod - Error -->
<string name="omnipod_error_illegal_init_action_type">Ilegal PodInitActionType: %1$s</string> <string name="omnipod_error_illegal_init_action_type">Ilegal PodInitActionType: %1$s</string>
<string name="omnipod_driver_error_unexpected_exception_type">Error inesperado. Por favor, informe! (tipo: %1$s).</string> <string name="omnipod_error_communication_failed_unexpected_exception">La comunicación ha fallado: error inesperado. ¡Por favor, Informe!</string>
<string name="omnipod_driver_error_communication_failed_unexpected_exception">La comunicación ha fallado: error inesperado. ¡Por favor, Informe!</string>
<!-- Omnipod - Pod Mgmt --> <!-- Omnipod - Pod Mgmt -->
<string name="omnipod_cmd_init_pod">Iniciar Pod</string> <string name="omnipod_button_init_pod">Iniciar Pod</string>
<string name="omnipod_cmd_deactivate_pod">Desactivar Pod</string> <string name="omnipod_cmd_deactivate_pod">Desactivar Pod</string>
<string name="omnipod_cmd_pod_history_na">Historial del Pod no disponible en el momento.</string> <string name="omnipod_history_history_not_available">Historial del Pod no disponible en el momento.</string>
<string name="omnipod_init_pod_wizard_step1_title">Llenar el Pod</string> <string name="omnipod_init_pod_wizard_step1_title">Llenar el Pod</string>
<string name="omnipod_init_pod_wizard_step2_title">Cebado</string> <string name="omnipod_init_pod_wizard_step2_title">Cebado</string>
<string name="omnipod_init_pod_wizard_step3_title">Adherir el Pod</string> <string name="omnipod_init_pod_wizard_step3_title">Adherir el Pod</string>

View file

@ -4,34 +4,174 @@
<!-- Omnipod - Base --> <!-- Omnipod - Base -->
<string name="description_pump_omnipod">L\'intégration de la pompe Omnipod nécessite un boitier RileyLink (avec au minimum un firmware 2.0).</string> <string name="description_pump_omnipod">L\'intégration de la pompe Omnipod nécessite un boitier RileyLink (avec au minimum un firmware 2.0).</string>
<!-- Omnipod Configuration --> <!-- Omnipod Configuration -->
<string name="omnipod_config_bolus_beeps_enabled">Bips bolus activés</string>
<string name="omnipod_config_basal_beeps_enabled">Bips basal activés</string>
<string name="omnipod_config_smb_beeps_enabled">Bips SMB activés</string>
<string name="omnipod_config_tbr_beeps_enabled">Bips DBT activés</string>
<string name="omnipod_config_suspend_delivery_button_enabled">Bouton Suspendre l\'injection activé</string>
<string name="omnipod_config_pulse_log_button_enabled">Bouton Enreg. Pulse activé</string>
<string name="omnipod_config_time_change_enabled">Changement de Zone/Heure Activé</string>
<string name="omnipod_config_expiration_reminder_enabled">Rappel d\'expiration activé</string>
<string name="omnipod_config_expiration_reminder_hours_before_shutdown">Heures avant arrêt</string>
<string name="omnipod_config_low_reservoir_alert_enabled">Alerte Réservoir bas activée</string>
<string name="omnipod_config_low_reservoir_alert_units">Nombre d\'unités</string>
<!-- Omnipod - Fragment --> <!-- Omnipod - Fragment -->
<string name="omnipod_moments_ago">Il y a un moment</string>
<string name="omnipod_pod_mgmt">Pod mngt</string>
<string name="omnipod_pod_status">État du Pod</string>
<string name="omnipod_total_delivered_label">Total délivré</string>
<string name="omnipod_total_delivered">%1$.2f U</string>
<string name="omnipod_reservoir_left">%1$.2f U restantes</string> <string name="omnipod_reservoir_left">%1$.2f U restantes</string>
<string name="omnipod_reservoir_over50">Plus de 50 U</string> <string name="omnipod_reservoir_over50">Plus de 50 U</string>
<string name="omnipod_pod_address">Adresse du Pod</string>
<string name="omnipod_pod_expiry">Pod expiré</string>
<string name="omnipod_warning">Attention</string>
<string name="omnipod_pod_status_no_active_pod">Pas de Pod actif</string>
<string name="omnipod_pod_status_waiting_for_pair_and_prime">Configuration en cours (en attente d\'appairage et d\'amorçage)</string>
<string name="omnipod_pod_status_waiting_for_cannula_insertion">Configuration en cours (en attente d\'insertion de canule)</string>
<string name="omnipod_pod_status_running">En cours d\'exécution</string>
<string name="omnipod_pod_status_suspended">Suspendu</string>
<string name="omnipod_pod_status_pod_fault">Erreur Pod</string>
<string name="omnipod_pod_status_activation_time_exceeded">Délai d\'activation dépassé</string>
<string name="omnipod_pod_status_inactive">Inactif</string>
<string name="omnipod_pod_status_pod_fault_description">Défaut du Pod : %1$s %2$s</string>
<string name="omnipod_pod_active_alerts">Activer alertes Pod</string>
<string name="omnipod_acknowledge_active_alerts_short">Valider Alertes</string>
<!-- Omnipod - Dialogs --> <!-- Omnipod - Dialogs -->
<string name="omnipod_frequency">Omnipod (433.91 MHz)</string> <string name="omnipod_frequency">Omnipod (433.91 MHz)</string>
<!-- Omnipod - Error --> <!-- Omnipod - Error -->
<string name="omnipod_error_rileylink_address_invalid">Adresse RileyLink invalide.</string>
<string name="omnipod_error_operation_not_possible_no_configuration">Operation impossible.\n\nVous devez d\'abord configurer l\'Omnipod pour pouvoir faire cette operation.</string>
<string name="omnipod_error_operation_not_possible_no_profile">Operation impossible.\n\nVous devez attendre quelques minutes, jusqu\'à ce que AAPS tente de définir le profil de basale pour la première fois.</string>
<string name="omnipod_error_illegal_init_action_type">type d\'action d\'init Pod non autorisée : %1$s</string> <string name="omnipod_error_illegal_init_action_type">type d\'action d\'init Pod non autorisée : %1$s</string>
<string name="omnipod_error_pod_not_attached">Pas de Pod actif</string>
<string name="omnipod_driver_error_setup_action_verification_failed">Échec de vérification de la commande</string>
<string name="omnipod_driver_error_unexpected_exception_type">Erreur inconnue. Veuillez signaler ! (type : %1$s).</string> <string name="omnipod_driver_error_unexpected_exception_type">Erreur inconnue. Veuillez signaler ! (type : %1$s).</string>
<string name="omnipod_driver_error_invalid_parameters">Échec de communication : paramètres d\'entrées reçus invalides</string>
<string name="omnipod_driver_error_communication_failed_timeout">Échec de communication : délai expiré</string>
<string name="omnipod_driver_error_communication_failed_unexpected_exception">Échec de communication : Erreur inconnue. Veuillez signaler !</string> <string name="omnipod_driver_error_communication_failed_unexpected_exception">Échec de communication : Erreur inconnue. Veuillez signaler !</string>
<string name="omnipod_driver_error_crc_mismatch">Échec de communication : vérification de l\'intégrité du message échouée</string>
<string name="omnipod_driver_error_invalid_packet_type">Échec de communication : paquet reçu du Pod invalide</string>
<string name="omnipod_driver_error_invalid_progress_state">Échec de communication : état du Pod incorrect</string>
<string name="omnipod_driver_error_invalid_response">Échec de communication : réponse invalide reçue du Pod</string>
<string name="omnipod_driver_error_invalid_message_sequence_number">Échec de communication : message reçu du Pod avec un numéro de séquence invalide</string>
<string name="omnipod_driver_error_invalid_message_address">Échec de communication : message reçu du Pod avec une adresse invalide</string>
<string name="omnipod_driver_error_message_decoding_failed">Échec de communication : échec du décodage du message reçu du Pod</string>
<string name="omnipod_driver_error_nonce_resync_failed">Échec de communication : resynchro nonce échouée</string>
<string name="omnipod_driver_error_nonce_out_of_sync">Échec de communication : nonce non synchro</string>
<string name="omnipod_driver_error_not_enough_data">Échec de communication : pas assez de données reçues du Pod</string>
<string name="omnipod_driver_error_pod_fault">Un défaut du Pod a été détecté (%1$03d %2$s). Veuillez désactiver votre Pod et en démarrer un nouveau</string>
<string name="omnipod_driver_error_pod_returned_error_response">Échec de communication : le Pod a renvoyé un message d\'erreur</string>
<!-- Omnipod - Pod Mgmt --> <!-- Omnipod - Pod Mgmt -->
<string name="omnipod_pod_mgmt_title">Gestion Pod</string>
<string name="omnipod_cmd_init_pod">Init Pod</string> <string name="omnipod_cmd_init_pod">Init Pod</string>
<string name="omnipod_cmd_deactivate_pod">Désactiver Pod</string> <string name="omnipod_cmd_deactivate_pod">Désactiver Pod</string>
<string name="omnipod_cmd_discard_pod">Supprimer le Pod</string>
<string name="omnipod_cmd_pod_history">Historique Pod</string>
<string name="omnipod_cmd_set_bolus">Définir bolus</string>
<string name="omnipod_cmd_cancel_bolus">Annuler bolus</string>
<string name="omnipod_cmd_set_tbr">Définir basale temporaire</string>
<string name="omnipod_cmd_cancel_tbr_by_driver">Annuler basale temporaire (en interne par le pilote)</string>
<string name="omnipod_cmd_cancel_tbr">Annuler basale temporaire</string>
<string name="omnipod_cmd_set_basal_schedule">Définir le schéma de basale</string>
<string name="omnipod_cmd_get_pod_status">Obtenir l\'état du Pod</string>
<string name="omnipod_cmd_get_pod_info">Obtenir infos Pod</string>
<string name="omnipod_cmd_set_time">Définir l\'heure</string>
<string name="omnipod_cmd_configure_alerts">Configurer les alertes</string>
<string name="omnipod_cmd_acknowledge_alerts">Valider les alertes</string>
<string name="omnipod_cmd_suspend_delivery">Suspendre l\'injection</string>
<string name="omnipod_cmd_resume_delivery">Pousuivre l\'injection</string>
<string name="omnipod_cmd_unknown_entry">Entrée inconnue</string>
<string name="omnipod_cmd_bolus_value">%1$.2f U</string>
<string name="omnipod_cmd_bolus_value_with_carbs">%1$.2f U, Gluc=%2$.1f g</string>
<string name="omnipod_cmd_tbr_value">Débit : %1$.2f U, durée : %2$d min</string>
<string name="omnipod_cmd_discard_pod_desc">Si vous appuyez sur <b>OK</b>, le Pod sera réinitialisé et vous ne pourrez plus communiquer avec lui. Ne le faite que si vous ne pouvez plus communiquer avec le Pod. Si vous pouvez toujours communiquer avec lui, veuillez utiliser l\'option <b>Désactiver Pod</b>.\n\n Si vous souhaitez le faire, assurez-vous de retirer également le Pod de votre corps.</string>
<string name="omnipod_cmd_pod_history_na">Historique Pod non disponible pour le moment.</string> <string name="omnipod_cmd_pod_history_na">Historique Pod non disponible pour le moment.</string>
<string name="omnipod_init_pod_wizard_step1_title">Remplir le Pod</string> <string name="omnipod_init_pod_wizard_step1_title">Remplir le Pod</string>
<string name="omnipod_init_pod_wizard_step1_desc">\nRemplir le nouveau Pod avec suffisamment d\'insuline pendant 3 jours.\n\nÉcoutez les deux bips du Pod pendant le processus de remplissage. Ils indiquent que la quantité minimale de 85U a été ajouté. Assurez-vous de vider complètement la seringue de remplissage, même après avoir entendu les deux bips.\n\nAprès avoir rempli le Pod, veuillez appuyer sur <b>Suivant</b>.\n\n<b>Remarque :</b> Ne retirez pas la protection de l\'aiguille du Pod pour le moment.\n<b>Remarque :</b>Veuillez placer le RileyLink en position verticale et placez le Pod quelques centimètres à côté.</string>
<string name="omnipod_init_pod_wizard_step2_title">Amorçage</string> <string name="omnipod_init_pod_wizard_step2_title">Amorçage</string>
<string name="omnipod_init_pod_wizard_step2_action_header">Tentative d\'appairage et d\'amorçage du nouveau Pod.\n\nQuand tous les items sont cochées, appuyez sur <b>Suivant</b>.\n\n<b>Remarque :</b> Veuillez placer le RileyLink en position verticale et placez le Pod à quelques centimètres de lui.</string>
<string name="omnipod_init_pod_wizard_step3_title">Collez le Pod</string> <string name="omnipod_init_pod_wizard_step3_title">Collez le Pod</string>
<string name="omnipod_init_pod_wizard_step3_desc">\nPréparez le site d\'injection. Enlevez la protection de l\'aiguille et le support adhésif et collez le Pod sur le site d\'injection.\n\nSi la canule se colle, appuyez sur <b>Annuler</b> et jetez votre Pod.\n\nAppuyez sur <b>Suivant</b> pour insérer la canule et démarrer l\'injection de la basal.</string> <string name="omnipod_init_pod_wizard_step3_desc">\nPréparez le site d\'injection. Enlevez la protection de l\'aiguille et le support adhésif et collez le Pod sur le site d\'injection.\n\nSi la canule se colle, appuyez sur <b>Annuler</b> et jetez votre Pod.\n\nAppuyez sur <b>Suivant</b> pour insérer la canule et démarrer l\'injection de la basal.</string>
<string name="omnipod_init_pod_wizard_step4_title">Insertion canule</string> <string name="omnipod_init_pod_wizard_step4_title">Insertion canule</string>
<string name="omnipod_init_pod_wizard_step4_action_header">Tentative de définir le schéma de basal et d\'insertion de la canule.\n\nQuand tous les items sont cochés, appuyez sur <b>Suivant</b>.</string> <string name="omnipod_init_pod_wizard_step4_action_header">Tentative de définir le schéma de basal et d\'insertion de la canule.\n\nQuand tous les items sont cochés, appuyez sur <b>Suivant</b>.</string>
<string name="omnipod_init_pod_wizard_pod_info_title">Infos Pod</string>
<string name="omnipod_init_pod_wizard_pod_info_init_pod_description">\nLe Pod est maintenant actif.\n\nVos débits de basal ont été programmés et la canule a été insérée.\n\nVeuillez verifier que la canule a été insérée correctement et remplacez votre Pod si vous pensez que ce n\'est pas le cas.</string> <string name="omnipod_init_pod_wizard_pod_info_init_pod_description">\nLe Pod est maintenant actif.\n\nVos débits de basal ont été programmés et la canule a été insérée.\n\nVeuillez verifier que la canule a été insérée correctement et remplacez votre Pod si vous pensez que ce n\'est pas le cas.</string>
<string name="omnipod_remove_pod_wizard_step1_title">Désactiver Pod</string>
<string name="omnipod_remove_pod_wizard_step1_desc">\nAppuyez sur <b>Suivant</b> pour désactiver le Pod.\n\n<b>Remarque :</b> Cela suspendra l\'injection de l\'insuline et désactivera le Pod.</string> <string name="omnipod_remove_pod_wizard_step1_desc">\nAppuyez sur <b>Suivant</b> pour désactiver le Pod.\n\n<b>Remarque :</b> Cela suspendra l\'injection de l\'insuline et désactivera le Pod.</string>
<string name="omnipod_remove_pod_wizard_step2_title">Désactivation du Pod</string> <string name="omnipod_remove_pod_wizard_step2_title">Désactivation du Pod</string>
<string name="omnipod_remove_pod_wizard_step2_action_header">Désactivation du Pod.\n\nQuand tous les items sont cochés, appuyez sur <b>Suivant</b>.\n\n<b>Remarque :</b> Si la désactivation échoue en permanence, appuyez sur <b>Annuler</b> et utilisez l\'option <b>Réinit. Pod</b> pour réinitialiser l\'état du Pod.</string>
<string name="omnipod_init_pod_wizard_pod_info_remove_pod_description">Pod désactivé.\n\nVeuillez enlever le Pod de votre corps et le jeter.</string> <string name="omnipod_init_pod_wizard_pod_info_remove_pod_description">Pod désactivé.\n\nVeuillez enlever le Pod de votre corps et le jeter.</string>
<string name="omnipod_init_pod_pair_pod">Appairer le Pod</string> <string name="omnipod_init_pod_pair_pod">Appairer le Pod</string>
<string name="omnipod_init_pod_prime_pod">Amorcer le Pod</string> <string name="omnipod_init_pod_prime_pod">Amorcer le Pod</string>
<string name="omnipod_init_pod_fill_cannula">Remplir canule</string>
<string name="omnipod_init_pod_set_basal_profile">Définir profil de basale</string>
<string name="omnipod_deactivate_pod_cancel_delivery">Annuler l\'injection</string>
<string name="omnipod_deactivate_pod_deactivate_pod">Désactiver Pod</string>
<!-- Omnipod - Base --> <!-- Omnipod - Base -->
<string name="omnipod_alert_finish_pairing_reminder">Rappel fin d\'appairage</string>
<string name="omnipod_alert_finish_setup_reminder_reminder">Rappel fin de configuration</string> <string name="omnipod_alert_finish_setup_reminder_reminder">Rappel fin de configuration</string>
<string name="omnipod_alert_expiration">Le Pod expire bientôt</string>
<string name="omnipod_alert_expiration_advisory">Le Pod expire bientôt</string>
<string name="omnipod_alert_shutdown_imminent">Arrêt imminent</string> <string name="omnipod_alert_shutdown_imminent">Arrêt imminent</string>
<string name="omnipod_alert_low_reservoir">Réservoir bas</string> <string name="omnipod_alert_low_reservoir">Réservoir bas</string>
<string name="omnipod_alert_unknown_alert">Alerte inconnue</string> <string name="omnipod_alert_unknown_alert">Alerte inconnue</string>
<string name="omnipod_error_set_basal_failed_delivery_might_be_suspended">Le paramétrage du profil basal a échoué. L\'injection peut être suspendue ! Actualisez manuellement l\'état du Pod à partir de l\'onglet Omnipod et reprenez l\'injection si nécessaire.</string>
<string name="omnipod_error_set_basal_might_have_failed_delivery_might_be_suspended">Le paramétrage du profil basal a peut-être échoué. L\'injection peut être suspendue ! Actualisez manuellement l\'état du Pod à partir de l\'onglet Omnipod et reprenez l\'injection si nécessaire.</string>
<string name="omnipod_error_set_basal_failed_delivery_suspended">Le paramétrage du profil basal a échoué. L\'injection est suspendue ! Veuillez poursuivre manuellement l\'injection à partir de l\'onglet Omnipod.</string>
<string name="omnipod_error_set_temp_basal_failed_old_tbr_might_be_cancelled">Le paramétrage de la basal temp a échoué. Si une basal temp était en cours d\'exécution, elle a peut-être été annulée. Veuillez actualiser manuellement l\'état du Pod à partir de l\'onglet Omnipod.</string>
<string name="omnipod_error_set_temp_basal_failed_old_tbr_cancelled_new_might_have_failed">Le paramétrage de la basal temp a peut-être échoué. Si une basal temp était en cours d\'exécution, elle a été annulée. Veuillez actualiser manuellement l\'état du Pod à partir de l\'onglet Omnipod.</string>
<string name="omnipod_error_set_time_failed_delivery_might_be_suspended">Le paramétrage de l\'heure a peut-être échoué. L\'injection peut être suspendue ! Actualisez manuellement l\'état du Pod à partir de l\'onglet Omnipod et reprenez l\'injection si nécessaire.</string>
<string name="omnipod_error_set_time_failed_delivery_suspended">Le paramétrage de l\'heure a échoué. L\'injection est suspendue ! Veuillez poursuivre manuellement l\'injection à partir de l\'onglet Omnipod.</string>
<string name="omnipod_bolus_failed_uncertain">Impossible de vérifier si le bolus a réussi. Veuillez vérifier manuellement que votre Pod est en train de délivrer un bolus en écoutant des clics. <b>Si vous êtes sûr que le bolus n\'a pas réussi, vous devez supprimer manuellement l\'entrée bolus des traitements, même si vous cliquez sur \'Annuler bolus\' maintenant !</b></string>
<string name="omnipod_bolus_failed_uncertain_smb">Impossible de vérifier si le bolus SMB (%1$.2f U) a réussi. <b>Si vous êtes certain que le bolus n\'a pas réussi, vous devez supprimer manuellement l\'entrée SMB des traitements.</b></string>
<string name="omnipod_rl_stats">Stats RL</string>
<string name="omnipod_pod_lot">LOT</string>
<string name="omnipod_pod_tid">TID</string>
<string name="omnipod_pod_firmware_version">Version du firmware</string>
<string name="omnipod_errors">Erreurs</string>
<string name="omnipod_cmd_basal_profile_not_set_is_same">Le profil Basal est le même, donc il ne sera pas redéfini.</string>
<string name="omnipod_custom_action_reset_rileylink">Réinitialiser la config. RileyLink</string>
<string name="omnipod_time_or_timezone_change">Heure et/ou fuseau horaire changé sur le Pod</string>
<string name="omnipod_composite_time">%1$s et %2$s</string>
<string name="omnipod_time_ago">il y a %1$s</string>
<string name="omnipod_waiting_for_rileylink_connection">En attente de connexion RileyLink ...</string>
<string name="omnipod_bolus_did_not_succeed">Le bolus n\'a pas réussi</string>
<string name="omnipod_refresh">Actualiser</string>
<string name="omnipod_resume_delivery">Pousuivre l\'injection</string>
<string name="omnipod_error_pod_suspended">Pod suspendu</string>
<string name="omnipod_less_than_a_minute_ago">Il y a moins d\'une minute</string>
<string name="omnipod_suspend_delivery_short">Arrêter</string>
<string name="omnipod_cmd_pair_and_prime">Appairer et amorcer</string>
<string name="omnipod_cmd_fill_cannula_set_basal_profile">Remplir la canule et définir le profil de basal</string>
<string name="omnipod_uncertain_failure">Erreur inconnue</string>
<string name="omnipod_cancelled_old_tbr_failed_to_set_new">Ancien débit de basal temporaire annulé, mais impossible de définir le nouveau débits de basal temporaire</string>
<string name="omnipod_cmd_set_fake_suspended_tbr">Définir un faux débit de basal temporaire car le Pod est suspendu</string>
<string name="omnipod_cmd_cancel_fake_suspended_tbr">Annuler le faux débit de basal temporaire créé à cause du Pod suspendu</string>
<string name="omnipod_uncertain">incertain</string>
<string name="omnipod_expiration_alerts_updated">Configuration des alertes mise à jour dans le Pod</string>
<string name="omnipod_preference_category_rileylink">RileyLink</string>
<string name="omnipod_preference_category_other">Autres</string>
<string name="omnipod_preference_category_alerts">Alertes</string>
<string name="omnipod_preference_category_confirmation_beeps">Bips de confirmation</string>
<string name="omnipod_wizard_button_exit">Quitter</string>
<string name="omnipod_wizard_button_previous">Précédent</string>
<string name="omnipod_wizard_button_next">Suivant</string>
<string name="omnipod_wizard_button_finish">Terminer</string>
<string name="omnipod_history_item_description">Description</string>
<string name="omnipod_history_item_source">Source</string>
<string name="omnipod_history_item_date">Date</string>
<string name="omnipod_history_type">Type :</string>
<plurals name="omnipod_minutes">
<item quantity="one">%1$d minute</item>
<item quantity="other">%1$d minutes</item>
</plurals>
<plurals name="omnipod_hours">
<item quantity="one">%1$d heure</item>
<item quantity="other">%1$d heures</item>
</plurals>
<plurals name="omnipod_days">
<item quantity="one">%1$d jour</item>
<item quantity="other">%1$d jours</item>
</plurals>
</resources> </resources>

View file

@ -8,6 +8,8 @@
<string name="omnipod_config_basal_beeps_enabled">BIP basale abilitato</string> <string name="omnipod_config_basal_beeps_enabled">BIP basale abilitato</string>
<string name="omnipod_config_smb_beeps_enabled">BIP SMB abilitato</string> <string name="omnipod_config_smb_beeps_enabled">BIP SMB abilitato</string>
<string name="omnipod_config_tbr_beeps_enabled">BIP TBR abilitato</string> <string name="omnipod_config_tbr_beeps_enabled">BIP TBR abilitato</string>
<string name="omnipod_config_suspend_delivery_button_enabled">Tasto \'sospendi erogazione\' abilitato</string>
<string name="omnipod_config_pulse_log_button_enabled">Tasto \'log impulsi\' abilitato</string>
<string name="omnipod_config_time_change_enabled">Rilevamento ora legale/fuso orario abilitato</string> <string name="omnipod_config_time_change_enabled">Rilevamento ora legale/fuso orario abilitato</string>
<string name="omnipod_config_expiration_reminder_enabled">Promemoria scadenza abilitato</string> <string name="omnipod_config_expiration_reminder_enabled">Promemoria scadenza abilitato</string>
<string name="omnipod_config_expiration_reminder_hours_before_shutdown">Ore prima dell\'arresto</string> <string name="omnipod_config_expiration_reminder_hours_before_shutdown">Ore prima dell\'arresto</string>
@ -23,6 +25,7 @@
<string name="omnipod_reservoir_over50">Oltre 50 U</string> <string name="omnipod_reservoir_over50">Oltre 50 U</string>
<string name="omnipod_pod_address">Indirizzo pod</string> <string name="omnipod_pod_address">Indirizzo pod</string>
<string name="omnipod_pod_expiry">Scadenza pod</string> <string name="omnipod_pod_expiry">Scadenza pod</string>
<string name="omnipod_warning">Avviso</string>
<string name="omnipod_pod_status_no_active_pod">Nessun pod attivo</string> <string name="omnipod_pod_status_no_active_pod">Nessun pod attivo</string>
<string name="omnipod_pod_status_waiting_for_pair_and_prime">Configurazione in corso (attesa associazione e caricamento)</string> <string name="omnipod_pod_status_waiting_for_pair_and_prime">Configurazione in corso (attesa associazione e caricamento)</string>
<string name="omnipod_pod_status_waiting_for_cannula_insertion">Configurazione in corso (attesa inserimento cannula)</string> <string name="omnipod_pod_status_waiting_for_cannula_insertion">Configurazione in corso (attesa inserimento cannula)</string>
@ -63,9 +66,13 @@
<string name="omnipod_pod_mgmt_title">Gestione pod</string> <string name="omnipod_pod_mgmt_title">Gestione pod</string>
<string name="omnipod_cmd_init_pod">Inizializza pod</string> <string name="omnipod_cmd_init_pod">Inizializza pod</string>
<string name="omnipod_cmd_deactivate_pod">Disattiva pod</string> <string name="omnipod_cmd_deactivate_pod">Disattiva pod</string>
<string name="omnipod_cmd_discard_pod">Scarta pod</string>
<string name="omnipod_cmd_pod_history">Storico pod</string> <string name="omnipod_cmd_pod_history">Storico pod</string>
<string name="omnipod_cmd_set_bolus">Imposta bolo</string> <string name="omnipod_cmd_set_bolus">Imposta bolo</string>
<string name="omnipod_cmd_cancel_bolus">Cancella bolo</string>
<string name="omnipod_cmd_set_tbr">Imposta basale temporanea</string> <string name="omnipod_cmd_set_tbr">Imposta basale temporanea</string>
<string name="omnipod_cmd_cancel_tbr_by_driver">Cancella basale temporanea (internamente dal driver)</string>
<string name="omnipod_cmd_cancel_tbr">Cancella basale temporanea</string>
<string name="omnipod_cmd_set_basal_schedule">Imposta piano basale</string> <string name="omnipod_cmd_set_basal_schedule">Imposta piano basale</string>
<string name="omnipod_cmd_get_pod_status">Ottieni stato pod</string> <string name="omnipod_cmd_get_pod_status">Ottieni stato pod</string>
<string name="omnipod_cmd_get_pod_info">Ottieni info pod</string> <string name="omnipod_cmd_get_pod_info">Ottieni info pod</string>
@ -78,9 +85,12 @@
<string name="omnipod_cmd_bolus_value">%1$.2f U</string> <string name="omnipod_cmd_bolus_value">%1$.2f U</string>
<string name="omnipod_cmd_bolus_value_with_carbs">%1$.2f U, CHO=%2$.1f g</string> <string name="omnipod_cmd_bolus_value_with_carbs">%1$.2f U, CHO=%2$.1f g</string>
<string name="omnipod_cmd_tbr_value">Tasso: %1$.2f U, durata: %2$d min</string> <string name="omnipod_cmd_tbr_value">Tasso: %1$.2f U, durata: %2$d min</string>
<string name="omnipod_cmd_discard_pod_desc">Se premi <b>OK</b>, lo stato del pod verrà resettato forzatamente e non sarai più in grado di comunicare con il pod. Fallo solo se non riesci più a comunicare con il pod. Se puoi ancora comunicare con il pod, utilizza l\'opzione <b>Disattiva pod</b>.\n\nSe desideri procedere, assicurati anche di rimuovere il pod dal tuo corpo.</string>
<string name="omnipod_cmd_pod_history_na">Storico pod non disponibile al momento.</string> <string name="omnipod_cmd_pod_history_na">Storico pod non disponibile al momento.</string>
<string name="omnipod_init_pod_wizard_step1_title">Riempi il pod</string> <string name="omnipod_init_pod_wizard_step1_title">Riempi il pod</string>
<string name="omnipod_init_pod_wizard_step1_desc">\nRiempi il nuovo pod con abbastanza insulina per 3 giorni.\n\nResta in ascolto di due bip dal pod durante il processo di riempimento. Questi indicano che è stata inserita la quantità minima di 85U. Assicurati di svuotare completamente la siringa di riempimento, anche dopo aver sentito i due segnali acustici.\n\nDopo il riempimento del pod, premi <b>Avanti</b>.\n\n<b>Nota:</b> non rimuovere la protezione dell\'ago del pod in questo momento.\n<b>Nota:</b> colloca il RileyLink in posizione verticale e il pod a pochi centimetri di distanza.</string>
<string name="omnipod_init_pod_wizard_step2_title">Caricamento</string> <string name="omnipod_init_pod_wizard_step2_title">Caricamento</string>
<string name="omnipod_init_pod_wizard_step2_action_header">Prova associazione nuovo pod e caricamento.\n\nQuando tutti gli elementi sono stati controllati, puoi premere <b>Avanti</b>.\n\n<b>Nota:</b> colloca il RileyLink in posizione verticale e il pod a pochi centimetri di distanza.</string>
<string name="omnipod_init_pod_wizard_step3_title">Attacca il pod</string> <string name="omnipod_init_pod_wizard_step3_title">Attacca il pod</string>
<string name="omnipod_init_pod_wizard_step3_desc">\nPrepara il sito di infusione. Rimuovi la protezione dell\'ago del pod e il supporto adesivo e attacca il pod al sito di infusione.\n\nSe la cannula fuoriesce premi <b>Annulla</b> e cambia pod.\n\nPremi <b>Avanti</b> per inserire la cannula e iniziare l\'erogazione della basale.</string> <string name="omnipod_init_pod_wizard_step3_desc">\nPrepara il sito di infusione. Rimuovi la protezione dell\'ago del pod e il supporto adesivo e attacca il pod al sito di infusione.\n\nSe la cannula fuoriesce premi <b>Annulla</b> e cambia pod.\n\nPremi <b>Avanti</b> per inserire la cannula e iniziare l\'erogazione della basale.</string>
<string name="omnipod_init_pod_wizard_step4_title">Inserimento cannula</string> <string name="omnipod_init_pod_wizard_step4_title">Inserimento cannula</string>
@ -90,11 +100,13 @@
<string name="omnipod_remove_pod_wizard_step1_title">Disattiva pod</string> <string name="omnipod_remove_pod_wizard_step1_title">Disattiva pod</string>
<string name="omnipod_remove_pod_wizard_step1_desc">\nPremi <b>Avanti</b> per disattivare il pod.\n\n<b>Nota:</b> Questo sospenderà tutta l\'erogazione di insulina e disattiverà il pod.</string> <string name="omnipod_remove_pod_wizard_step1_desc">\nPremi <b>Avanti</b> per disattivare il pod.\n\n<b>Nota:</b> Questo sospenderà tutta l\'erogazione di insulina e disattiverà il pod.</string>
<string name="omnipod_remove_pod_wizard_step2_title">Disattivazione del pod</string> <string name="omnipod_remove_pod_wizard_step2_title">Disattivazione del pod</string>
<string name="omnipod_remove_pod_wizard_step2_action_header">Disattivazione del pod.\n\nQuando tutti gli elementi sono stati controllati, puoi premere <b>Avanti</b>.\n\n<b>Nota:</b> se la disattivazione fallisce di continuo, premi <b>Annulla</b> e usa l\'opzione <b>Scarta pod</b> per resettare forzatamente lo stato del pod.</string>
<string name="omnipod_init_pod_wizard_pod_info_remove_pod_description">Pod disattivato.\n\nRimuovi il pod dal tuo corpo e gettalo.</string> <string name="omnipod_init_pod_wizard_pod_info_remove_pod_description">Pod disattivato.\n\nRimuovi il pod dal tuo corpo e gettalo.</string>
<string name="omnipod_init_pod_pair_pod">Associa pod</string> <string name="omnipod_init_pod_pair_pod">Associa pod</string>
<string name="omnipod_init_pod_prime_pod">Carica pod</string> <string name="omnipod_init_pod_prime_pod">Carica pod</string>
<string name="omnipod_init_pod_fill_cannula">Riempi cannula</string> <string name="omnipod_init_pod_fill_cannula">Riempi cannula</string>
<string name="omnipod_init_pod_set_basal_profile">Imposta profilo basale</string> <string name="omnipod_init_pod_set_basal_profile">Imposta profilo basale</string>
<string name="omnipod_deactivate_pod_cancel_delivery">Cancella erogazione</string>
<string name="omnipod_deactivate_pod_deactivate_pod">Disattiva pod</string> <string name="omnipod_deactivate_pod_deactivate_pod">Disattiva pod</string>
<!-- Omnipod - Base --> <!-- Omnipod - Base -->
<string name="omnipod_alert_finish_pairing_reminder">Fine promemoria associazione</string> <string name="omnipod_alert_finish_pairing_reminder">Fine promemoria associazione</string>
@ -104,23 +116,41 @@
<string name="omnipod_alert_shutdown_imminent">L\'arresto è imminente</string> <string name="omnipod_alert_shutdown_imminent">L\'arresto è imminente</string>
<string name="omnipod_alert_low_reservoir">Livello serbatoio basso</string> <string name="omnipod_alert_low_reservoir">Livello serbatoio basso</string>
<string name="omnipod_alert_unknown_alert">Avviso sconosciuto</string> <string name="omnipod_alert_unknown_alert">Avviso sconosciuto</string>
<string name="omnipod_error_set_basal_failed_delivery_might_be_suspended">Impostazione profilo basale non riuscita. L\'erogazione potrebbe essere sospesa! Aggiorna manualmente lo stato del pod dalla scheda Omnipod e riprendi l\'erogazione se necessario.</string> <string name="omnipod_error_set_basal_failed_delivery_might_be_suspended">Impostazione profilo basale fallita. L\'erogazione potrebbe essere sospesa! Aggiorna manualmente lo stato del pod dalla scheda Omnipod e riprendi l\'erogazione se necessario.</string>
<string name="omnipod_error_set_basal_might_have_failed_delivery_might_be_suspended">L\'Impostazione del profilo basale potrebbe essere fallita. L\'erogazione potrebbe essere sospesa! Aggiorna manualmente lo stato del pod dalla scheda Omnipod e riprendi l\'erogazione se necessario.</string>
<string name="omnipod_error_set_basal_failed_delivery_suspended">Impostazione profilo basale fallita. L\'erogazione è sospesa! Riprendi manualmente l\'erogazione dalla scheda Omnipod.</string>
<string name="omnipod_error_set_temp_basal_failed_old_tbr_might_be_cancelled">Impostazione basale temporanea fallita. Se una basale temporanea era precedentemente in esecuzione, potrebbe essere stata cancellata. Aggiorna manualmente lo stato del pod dalla scheda Omnipod.</string>
<string name="omnipod_error_set_temp_basal_failed_old_tbr_cancelled_new_might_have_failed">Impostazione basale temporanea fallita. Se una basale temporanea era precedentemente in esecuzione, è stata cancellata. Aggiorna manualmente lo stato del pod dalla scheda Omnipod.</string>
<string name="omnipod_error_set_time_failed_delivery_might_be_suspended">L\'Impostazione dell\'ora potrebbe essere fallita. L\'erogazione potrebbe essere sospesa! Aggiorna manualmente lo stato del pod dalla scheda Omnipod e riprendi l\'erogazione se necessario.</string>
<string name="omnipod_error_set_time_failed_delivery_suspended">Impostazione ora fallita. L\'erogazione è sospesa! Riprendi manualmente l\'erogazione dalla scheda Omnipod.</string>
<string name="omnipod_bolus_failed_uncertain">Impossibile verificare se il bolo è riuscito. Verifica manualmente che il tuo pod stia erogando insulina ascoltando i click. <b>Se sei sicuro che il bolo non sia riuscito, dovresti eliminare manualmente l\'inserimento del bolo dalla sezione Trattamenti, anche se fai click su \'Cancella bolo\' in questo momento!</b></string>
<string name="omnipod_bolus_failed_uncertain_smb">Impossibile verificare se il bolo SMB (%1$.2f U) è riuscito. <b>Se sei sicuro che il bolo non sia riuscito, dovresti eliminare manualmente l\'inserimento dalla sezione Trattamenti.</b></string>
<string name="omnipod_rl_stats">Statistiche RL</string> <string name="omnipod_rl_stats">Statistiche RL</string>
<string name="omnipod_read_pulse_log_short">Log impulsi</string>
<string name="omnipod_pod_lot">LOT</string>
<string name="omnipod_pod_tid">TID</string>
<string name="omnipod_pod_firmware_version">Versione firmware</string> <string name="omnipod_pod_firmware_version">Versione firmware</string>
<string name="omnipod_errors">Errori</string> <string name="omnipod_errors">Errori</string>
<string name="omnipod_cmd_basal_profile_not_set_is_same">Il profilo basale è lo stesso, non sarà impostato di nuovo.</string> <string name="omnipod_cmd_basal_profile_not_set_is_same">Il profilo basale è lo stesso, non sarà impostato di nuovo.</string>
<string name="omnipod_custom_action_reset_rileylink">Reset config.ne RileyLink</string> <string name="omnipod_custom_action_reset_rileylink">Reset config.ne RileyLink</string>
<string name="omnipod_time_or_timezone_change">Ora e/o fuso orario cambiati nel pod</string>
<string name="omnipod_composite_time">%1$s e %2$s</string> <string name="omnipod_composite_time">%1$s e %2$s</string>
<string name="omnipod_time_ago">%1$s fa</string> <string name="omnipod_time_ago">%1$s fa</string>
<string name="omnipod_waiting_for_rileylink_connection">Attesa connessione RileyLink...</string> <string name="omnipod_waiting_for_rileylink_connection">Attesa connessione RileyLink...</string>
<string name="omnipod_bolus_did_not_succeed">Il bolo non è riuscito</string> <string name="omnipod_bolus_did_not_succeed">Il bolo non è riuscito</string>
<string name="omnipod_refresh">Ricarica</string> <string name="omnipod_refresh">Aggiorna</string>
<string name="omnipod_resume_delivery">Riprendi erogazione</string> <string name="omnipod_resume_delivery">Riprendi erogazione</string>
<string name="omnipod_error_pod_suspended">Pod sospeso</string> <string name="omnipod_error_pod_suspended">Pod sospeso</string>
<string name="omnipod_less_than_a_minute_ago">Meno di un minuto fa</string> <string name="omnipod_less_than_a_minute_ago">Meno di un minuto fa</string>
<string name="omnipod_suspend_delivery_short">Sospendi</string> <string name="omnipod_suspend_delivery_short">Sospendi</string>
<string name="omnipod_cmd_pair_and_prime">Associa e carica</string> <string name="omnipod_cmd_pair_and_prime">Associa e carica</string>
<string name="omnipod_cmd_fill_cannula_set_basal_profile">Riempi cannula e imposta profilo basale</string> <string name="omnipod_cmd_fill_cannula_set_basal_profile">Riempi cannula e imposta profilo basale</string>
<string name="omnipod_cmd_get_pulse_log">Ottieni log impulsi</string>
<string name="omnipod_uncertain_failure">Errore indeterminato</string>
<string name="omnipod_cancelled_old_tbr_failed_to_set_new">Cancellata la vecchia basale temporanea, ma fallita l\'impostazione della nuova basale temporanea</string>
<string name="omnipod_cmd_set_fake_suspended_tbr">Imposta basale temporanea fittizia perché il pod è sospeso</string>
<string name="omnipod_cmd_cancel_fake_suspended_tbr">Cancella basale temporanea fittizia creata perché il pod era sospeso</string>
<string name="omnipod_uncertain">indeterminato</string>
<string name="omnipod_expiration_alerts_updated">Configurazione avviso aggiornata nel pod</string> <string name="omnipod_expiration_alerts_updated">Configurazione avviso aggiornata nel pod</string>
<string name="omnipod_preference_category_rileylink">RileyLink</string> <string name="omnipod_preference_category_rileylink">RileyLink</string>
<string name="omnipod_preference_category_other">Altro</string> <string name="omnipod_preference_category_other">Altro</string>

View file

@ -18,12 +18,11 @@
<string name="omnipod_frequency">Omnipod (433.91 MHz)</string> <string name="omnipod_frequency">Omnipod (433.91 MHz)</string>
<!-- Omnipod - Error --> <!-- Omnipod - Error -->
<string name="omnipod_error_illegal_init_action_type">Neteisingas inicijavimo tipas:%1$s</string> <string name="omnipod_error_illegal_init_action_type">Neteisingas inicijavimo tipas:%1$s</string>
<string name="omnipod_driver_error_unexpected_exception_type">Įvyko netikėta klaida. Prašome pranešti! (tipas: %1$s).</string> <string name="omnipod_error_communication_failed_unexpected_exception">Ryšio klaida: įvyko netikėta klaida. Prašome pranešti!</string>
<string name="omnipod_driver_error_communication_failed_unexpected_exception">Ryšio klaida: įvyko netikėta klaida. Prašome pranešti!</string>
<!-- Omnipod - Pod Mgmt --> <!-- Omnipod - Pod Mgmt -->
<string name="omnipod_cmd_init_pod">Inicijuoti POD</string> <string name="omnipod_button_init_pod">Inicijuoti POD</string>
<string name="omnipod_cmd_deactivate_pod">Išjungti POD</string> <string name="omnipod_cmd_deactivate_pod">Išjungti POD</string>
<string name="omnipod_cmd_pod_history_na">POD istorija šiuo metu nėra prieinama.</string> <string name="omnipod_history_history_not_available">POD istorija šiuo metu nėra prieinama.</string>
<string name="omnipod_init_pod_wizard_step1_title">Užpildyti POD</string> <string name="omnipod_init_pod_wizard_step1_title">Užpildyti POD</string>
<string name="omnipod_init_pod_wizard_step2_title">Užpildymas</string> <string name="omnipod_init_pod_wizard_step2_title">Užpildymas</string>
<string name="omnipod_init_pod_wizard_step3_title">Prijunkite POD</string> <string name="omnipod_init_pod_wizard_step3_title">Prijunkite POD</string>

View file

@ -10,13 +10,11 @@
<!-- Omnipod - Dialogs --> <!-- Omnipod - Dialogs -->
<string name="omnipod_frequency">Omnipod (433,91 MHz)</string> <string name="omnipod_frequency">Omnipod (433,91 MHz)</string>
<!-- Omnipod - Error --> <!-- Omnipod - Error -->
<string name="omnipod_error_illegal_init_action_type">Ongeldig PodInitActionType: %1$s</string> <string name="omnipod_error_communication_failed_unexpected_exception">Communicatie mislukt: er is een onvoorziene fout opgetreden. Rapporteer dit alsjeblieft!</string>
<string name="omnipod_driver_error_unexpected_exception_type">Er is een onverwachte fout opgetreden. Rapporteer dit alsjeblieft! (type: %1$s).</string>
<string name="omnipod_driver_error_communication_failed_unexpected_exception">Communicatie mislukt: er is een onvoorziene fout opgetreden. Rapporteer dit alsjeblieft!</string>
<!-- Omnipod - Pod Mgmt --> <!-- Omnipod - Pod Mgmt -->
<string name="omnipod_cmd_init_pod">Initialiseer Pod</string> <string name="omnipod_button_init_pod">Initialiseer Pod</string>
<string name="omnipod_cmd_deactivate_pod">Deactiveer Pod</string> <string name="omnipod_cmd_deactivate_pod">Deactiveer Pod</string>
<string name="omnipod_cmd_pod_history_na">Pod Historie momenteel niet beschikbaar.</string> <string name="omnipod_history_history_not_available">Pod Historie momenteel niet beschikbaar.</string>
<string name="omnipod_init_pod_wizard_step1_title">Vul de Pod</string> <string name="omnipod_init_pod_wizard_step1_title">Vul de Pod</string>
<string name="omnipod_init_pod_wizard_step2_title">Uitvullen</string> <string name="omnipod_init_pod_wizard_step2_title">Uitvullen</string>
<string name="omnipod_init_pod_wizard_step3_title">Plaats de Pod</string> <string name="omnipod_init_pod_wizard_step3_title">Plaats de Pod</string>

View file

@ -11,12 +11,11 @@
<string name="omnipod_frequency">Omnipod (433,91 MHz)</string> <string name="omnipod_frequency">Omnipod (433,91 MHz)</string>
<!-- Omnipod - Error --> <!-- Omnipod - Error -->
<string name="omnipod_error_illegal_init_action_type">Niedozwolone działanie PodInitActionType: %1$s</string> <string name="omnipod_error_illegal_init_action_type">Niedozwolone działanie PodInitActionType: %1$s</string>
<string name="omnipod_driver_error_unexpected_exception_type">Wystąpił nieoczekiwany błąd. Proszę zgłosić! (typ: %1$s).</string> <string name="omnipod_error_communication_failed_unexpected_exception">Komunikacja nie powiodła się: wystąpił nieoczekiwany błąd. Proszę zgłosić!</string>
<string name="omnipod_driver_error_communication_failed_unexpected_exception">Komunikacja nie powiodła się: wystąpił nieoczekiwany błąd. Proszę zgłosić!</string>
<!-- Omnipod - Pod Mgmt --> <!-- Omnipod - Pod Mgmt -->
<string name="omnipod_cmd_init_pod">Uruchom Pod</string> <string name="omnipod_button_init_pod">Uruchom Pod</string>
<string name="omnipod_cmd_deactivate_pod">Odłącz Pod</string> <string name="omnipod_cmd_deactivate_pod">Odłącz Pod</string>
<string name="omnipod_cmd_pod_history_na">Historia Pod nie jest dostępna w tej chwili.</string> <string name="omnipod_history_history_not_available">Historia Pod nie jest dostępna w tej chwili.</string>
<string name="omnipod_init_pod_wizard_step1_title">Napełnij Pod</string> <string name="omnipod_init_pod_wizard_step1_title">Napełnij Pod</string>
<string name="omnipod_init_pod_wizard_step2_title">Wypełnianie</string> <string name="omnipod_init_pod_wizard_step2_title">Wypełnianie</string>
<string name="omnipod_init_pod_wizard_step3_title">Przymocuj Poda</string> <string name="omnipod_init_pod_wizard_step3_title">Przymocuj Poda</string>

View file

@ -15,29 +15,28 @@
<!-- Omnipod - Error --> <!-- Omnipod - Error -->
<string name="omnipod_error_operation_not_possible_no_configuration">A operação não é possível.\n\nPrecisa configurar o Omnipod primeiro, antes de pode usar esta operação.</string> <string name="omnipod_error_operation_not_possible_no_configuration">A operação não é possível.\n\nPrecisa configurar o Omnipod primeiro, antes de pode usar esta operação.</string>
<string name="omnipod_error_illegal_init_action_type">PodInitActionType Ilegal: %1$s</string> <string name="omnipod_error_illegal_init_action_type">PodInitActionType Ilegal: %1$s</string>
<string name="omnipod_driver_error_setup_action_verification_failed">A verificação do comando falhou</string> <string name="omnipod_error_setup_action_verification_failed">A verificação do comando falhou</string>
<string name="omnipod_driver_error_unexpected_exception_type">Ocorreu um erro inesperado. Por favor reporte! (digite: %1$s).</string> <string name="omnipod_error_invalid_parameters">Falha na comunicação: foram recebidos parâmetros de entrada inválidos</string>
<string name="omnipod_driver_error_invalid_parameters">Falha na comunicação: foram recebidos parâmetros de entrada inválidos</string> <string name="omnipod_error_communication_failed_timeout">Falha na comunicação: tempo limite</string>
<string name="omnipod_driver_error_communication_failed_timeout">Falha na comunicação: tempo limite</string> <string name="omnipod_error_communication_failed_unexpected_exception">Falha na comunicação: ocorreu um erro inesperado. Por favor, reporte!</string>
<string name="omnipod_driver_error_communication_failed_unexpected_exception">Falha na comunicação: ocorreu um erro inesperado. Por favor, reporte!</string> <string name="omnipod_error_crc_mismatch">Falha na comunicação: mensagem de falha de verificação de integridade</string>
<string name="omnipod_driver_error_crc_mismatch">Falha na comunicação: mensagem de falha de verificação de integridade</string> <string name="omnipod_error_invalid_packet_type">Falha na comunicação: recebeu um pacote inválido do Pod</string>
<string name="omnipod_driver_error_invalid_packet_type">Falha na comunicação: recebeu um pacote inválido do Pod</string> <string name="omnipod_error_invalid_progress_state">Falha na comunicação: o Pod está em um estado errado</string>
<string name="omnipod_driver_error_invalid_progress_state">Falha na comunicação: o Pod está em um estado errado</string> <string name="omnipod_error_invalid_response">Falha na comunicação: recebeu uma resposta inválida do Pod</string>
<string name="omnipod_driver_error_invalid_response">Falha na comunicação: recebeu uma resposta inválida do Pod</string> <string name="omnipod_error_invalid_message_sequence_number">Falha na comunicação: recebeu uma mensagem com número de sequência inválido do Pod</string>
<string name="omnipod_driver_error_invalid_message_sequence_number">Falha na comunicação: recebeu uma mensagem com número de sequência inválido do Pod</string> <string name="omnipod_error_invalid_message_address">Falha na comunicação: recebeu uma mensagem com um endereço inválido do Pod</string>
<string name="omnipod_driver_error_invalid_message_address">Falha na comunicação: recebeu uma mensagem com um endereço inválido do Pod</string> <string name="omnipod_error_message_decoding_failed">Falha na comunicação: falha ao descodificar a mensagem do Pod</string>
<string name="omnipod_driver_error_message_decoding_failed">Falha na comunicação: falha ao descodificar a mensagem do Pod</string> <string name="omnipod_error_nonce_resync_failed">Falha na comunicação: nonce resync falhou</string>
<string name="omnipod_driver_error_nonce_resync_failed">Falha na comunicação: nonce resync falhou</string> <string name="omnipod_error_nonce_out_of_sync">Falha na comunicação: nonce fora de sincronização</string>
<string name="omnipod_driver_error_nonce_out_of_sync">Falha na comunicação: nonce fora de sincronização</string> <string name="omnipod_error_not_enough_data">Falha na comunicação: não há dados suficientes recebidos do Pod</string>
<string name="omnipod_driver_error_not_enough_data">Falha na comunicação: não há dados suficientes recebidos do Pod</string> <string name="omnipod_error_pod_fault">Uma falha de Pod (%1$03d %2$s) foi detectada. Por favor, desactive o Pod e inicie um novo</string>
<string name="omnipod_driver_error_pod_fault">Uma falha de Pod (%1$03d %2$s) foi detectada. Por favor, desactive o Pod e inicie um novo</string> <string name="omnipod_error_pod_returned_error_response">Falha na comunicação: o Pod devolveu uma resposta de erro</string>
<string name="omnipod_driver_error_pod_returned_error_response">Falha na comunicação: o Pod devolveu uma resposta de erro</string>
<!-- Omnipod - Pod Mgmt --> <!-- Omnipod - Pod Mgmt -->
<string name="omnipod_cmd_init_pod">Iniciar Pod</string> <string name="omnipod_button_init_pod">Iniciar Pod</string>
<string name="omnipod_cmd_deactivate_pod">Desactivar Pod</string> <string name="omnipod_cmd_deactivate_pod">Desactivar Pod</string>
<string name="omnipod_cmd_bolus_value">%1$.2f U</string> <string name="omnipod_history_bolus_value">%1$.2f U</string>
<string name="omnipod_cmd_bolus_value_with_carbs">%1$.2f U, HC=%2$.1f g</string> <string name="omnipod_history_bolus_value_with_carbs">%1$.2f U, HC=%2$.1f g</string>
<string name="omnipod_cmd_pod_history_na">Histórico do Pod não disponível no momento.</string> <string name="omnipod_history_history_not_available">Histórico do Pod não disponível no momento.</string>
<string name="omnipod_init_pod_wizard_step1_title">Encher o Pod</string> <string name="omnipod_init_pod_wizard_step1_title">Encher o Pod</string>
<string name="omnipod_init_pod_wizard_step2_title">A Purgar</string> <string name="omnipod_init_pod_wizard_step2_title">A Purgar</string>
<string name="omnipod_init_pod_wizard_step3_title">Anexar o Pod</string> <string name="omnipod_init_pod_wizard_step3_title">Anexar o Pod</string>
@ -61,12 +60,12 @@
<string name="omnipod_alert_shutdown_imminent">Encerramento iminente</string> <string name="omnipod_alert_shutdown_imminent">Encerramento iminente</string>
<string name="omnipod_alert_low_reservoir">Reservatório baixo</string> <string name="omnipod_alert_low_reservoir">Reservatório baixo</string>
<string name="omnipod_alert_unknown_alert">Alerta desconhecido</string> <string name="omnipod_alert_unknown_alert">Alerta desconhecido</string>
<string name="omnipod_rl_stats">Estatísticas RL</string> <string name="omnipod_button_riley_link_stats">Estatísticas RL</string>
<string name="omnipod_errors">Erros</string> <string name="omnipod_errors">Erros</string>
<string name="omnipod_cmd_basal_profile_not_set_is_same">Perfil Basal é o mesmo, então não será definido novamente.</string> <string name="omnipod_confirmation_basal_profile_not_set_is_same">Perfil Basal é o mesmo, então não será definido novamente.</string>
<string name="omnipod_refresh">Actualizar</string> <string name="omnipod_button_refresh">Actualizar</string>
<string name="omnipod_suspend_delivery_short">Suspender</string> <string name="omnipod_button_suspend_delivery">Suspender</string>
<string name="omnipod_uncertain_failure">Falha incerta</string> <string name="omnipod_error_uncertain_failure">Falha incerta</string>
<string name="omnipod_preference_category_rileylink">RileyLink</string> <string name="omnipod_preference_category_rileylink">RileyLink</string>
<string name="omnipod_preference_category_other">Outro</string> <string name="omnipod_preference_category_other">Outro</string>
<string name="omnipod_preference_category_alerts">Alertas</string> <string name="omnipod_preference_category_alerts">Alertas</string>

View file

@ -17,7 +17,7 @@
<string name="omnipod_config_low_reservoir_alert_units">Număr unități</string> <string name="omnipod_config_low_reservoir_alert_units">Număr unități</string>
<!-- Omnipod - Fragment --> <!-- Omnipod - Fragment -->
<string name="omnipod_moments_ago">Acum câteva momente</string> <string name="omnipod_moments_ago">Acum câteva momente</string>
<string name="omnipod_pod_mgmt">Managementul POD-ului</string> <string name="omnipod_button_pod_management">Managementul POD-ului</string>
<string name="omnipod_pod_status">Statusul POD-ului</string> <string name="omnipod_pod_status">Statusul POD-ului</string>
<string name="omnipod_total_delivered_label">Total livrat</string> <string name="omnipod_total_delivered_label">Total livrat</string>
<string name="omnipod_total_delivered">%1$.2f U</string> <string name="omnipod_total_delivered">%1$.2f U</string>
@ -36,7 +36,7 @@
<string name="omnipod_pod_status_inactive">Inactiv</string> <string name="omnipod_pod_status_inactive">Inactiv</string>
<string name="omnipod_pod_status_pod_fault_description">Pod defect: %1$s %2$s</string> <string name="omnipod_pod_status_pod_fault_description">Pod defect: %1$s %2$s</string>
<string name="omnipod_pod_active_alerts">Alerte active Pod</string> <string name="omnipod_pod_active_alerts">Alerte active Pod</string>
<string name="omnipod_acknowledge_active_alerts_short">Confirmare alerte</string> <string name="omnipod_button_acknowledge_active_alerts">Confirmare alerte</string>
<!-- Omnipod - Dialogs --> <!-- Omnipod - Dialogs -->
<string name="omnipod_frequency">Omnipod (433.91 MHz)</string> <string name="omnipod_frequency">Omnipod (433.91 MHz)</string>
<!-- Omnipod - Error --> <!-- Omnipod - Error -->
@ -45,29 +45,28 @@
<string name="omnipod_error_operation_not_possible_no_profile">Operaţiunea nu este posibilă.\n\n Trebuie să aşteptaţi câteva minute până când AAPS încearcă să seteze profilul bazal pentru prima dată.</string> <string name="omnipod_error_operation_not_possible_no_profile">Operaţiunea nu este posibilă.\n\n Trebuie să aşteptaţi câteva minute până când AAPS încearcă să seteze profilul bazal pentru prima dată.</string>
<string name="omnipod_error_illegal_init_action_type">Acțiune PodInitActionType ilegala: %1$s</string> <string name="omnipod_error_illegal_init_action_type">Acțiune PodInitActionType ilegala: %1$s</string>
<string name="omnipod_error_pod_not_attached">Niciun Pod activ</string> <string name="omnipod_error_pod_not_attached">Niciun Pod activ</string>
<string name="omnipod_driver_error_setup_action_verification_failed">Verificarea comenzii a eşuat</string> <string name="omnipod_error_setup_action_verification_failed">Verificarea comenzii a eşuat</string>
<string name="omnipod_driver_error_unexpected_exception_type">A apărut o eroare neașteptată. Vă rugăm să o raportați! (tip: %1$s).</string> <string name="omnipod_error_invalid_parameters">Comunicarea a eșuat: s-au primit parametri de intrare incorecți</string>
<string name="omnipod_driver_error_invalid_parameters">Comunicarea a eșuat: s-au primit parametri de intrare incorecți</string> <string name="omnipod_error_communication_failed_timeout">Comunicarea a eșuat: timpul a expirat</string>
<string name="omnipod_driver_error_communication_failed_timeout">Comunicarea a eșuat: timpul a expirat</string> <string name="omnipod_error_communication_failed_unexpected_exception">Comunicarea a eşuat: a apărut o eroare neaşteptată. Vă rugăm să o raportaţi!</string>
<string name="omnipod_driver_error_communication_failed_unexpected_exception">Comunicarea a eşuat: a apărut o eroare neaşteptată. Vă rugăm să o raportaţi!</string> <string name="omnipod_error_crc_mismatch">Comunicarea a eşuat: verificarea integrităţii mesajului a eşuat</string>
<string name="omnipod_driver_error_crc_mismatch">Comunicarea a eşuat: verificarea integrităţii mesajului a eşuat</string> <string name="omnipod_error_invalid_packet_type">Comunicarea a eşuat: a fost primit un pachet invalid de la Pod</string>
<string name="omnipod_driver_error_invalid_packet_type">Comunicarea a eşuat: a fost primit un pachet invalid de la Pod</string> <string name="omnipod_error_invalid_progress_state">Comunicarea a eșuat: Pod-ul este într-o stare incorectă</string>
<string name="omnipod_driver_error_invalid_progress_state">Comunicarea a eșuat: Pod-ul este într-o stare incorectă</string> <string name="omnipod_error_invalid_response">Comunicarea a eșuat: s-a primit un răspuns incorect de la Pod</string>
<string name="omnipod_driver_error_invalid_response">Comunicarea a eșuat: s-a primit un răspuns incorect de la Pod</string> <string name="omnipod_error_invalid_message_sequence_number">Comunicarea a eșuat: s-a primit un mesaj cu un număr de secvență invalid de la Pod</string>
<string name="omnipod_driver_error_invalid_message_sequence_number">Comunicarea a eșuat: s-a primit un mesaj cu un număr de secvență invalid de la Pod</string> <string name="omnipod_error_invalid_message_address">Comunicarea a eșuat: s-a primit un mesaj cu o adresă invalidă de la Pod</string>
<string name="omnipod_driver_error_invalid_message_address">Comunicarea a eșuat: s-a primit un mesaj cu o adresă invalidă de la Pod</string> <string name="omnipod_error_message_decoding_failed">Comunicarea a eșuat: nu s-a reușit decodarea mesajului de la Pod</string>
<string name="omnipod_driver_error_message_decoding_failed">Comunicarea a eșuat: nu s-a reușit decodarea mesajului de la Pod</string> <string name="omnipod_error_nonce_resync_failed">Comunicarea a eșuat: resincronizarea cheii de securitate nu a reușit</string>
<string name="omnipod_driver_error_nonce_resync_failed">Comunicarea a eșuat: resincronizarea cheii de securitate nu a reușit</string> <string name="omnipod_error_nonce_out_of_sync">Comunicarea a eșuat: cheia de securitate nu poate fi sincronizată</string>
<string name="omnipod_driver_error_nonce_out_of_sync">Comunicarea a eșuat: cheia de securitate nu poate fi sincronizată</string> <string name="omnipod_error_not_enough_data">Comunicarea a eşuat: nu s-au primit suficiente date de la Pod</string>
<string name="omnipod_driver_error_not_enough_data">Comunicarea a eşuat: nu s-au primit suficiente date de la Pod</string> <string name="omnipod_error_pod_fault">A fost detectată o eroare a Pod-ului (%1$03d %2$s). Vă rugăm să îl dezactivați pe acesta și să activați unul nou</string>
<string name="omnipod_driver_error_pod_fault">A fost detectată o eroare a Pod-ului (%1$03d %2$s). Vă rugăm să îl dezactivați pe acesta și să activați unul nou</string> <string name="omnipod_error_pod_returned_error_response">Comunicarea a eșuat: Pod-ul a returnat un răspuns de eroare</string>
<string name="omnipod_driver_error_pod_returned_error_response">Comunicarea a eșuat: Pod-ul a returnat un răspuns de eroare</string>
<!-- Omnipod - Pod Mgmt --> <!-- Omnipod - Pod Mgmt -->
<string name="omnipod_pod_mgmt_title">Management Pod</string> <string name="omnipod_pod_management_title">Management Pod</string>
<string name="omnipod_cmd_init_pod">Inițializare Pod</string> <string name="omnipod_button_init_pod">Inițializare Pod</string>
<string name="omnipod_cmd_deactivate_pod">Dezactivare Pod</string> <string name="omnipod_cmd_deactivate_pod">Dezactivare Pod</string>
<string name="omnipod_cmd_discard_pod">Baandonare Pod</string> <string name="omnipod_cmd_discard_pod">Baandonare Pod</string>
<string name="omnipod_cmd_pod_history">Istoric Pod</string> <string name="omnipod_button_pod_history">Istoric Pod</string>
<string name="omnipod_cmd_set_bolus">Setează bolus</string> <string name="omnipod_cmd_set_bolus">Setează bolus</string>
<string name="omnipod_cmd_cancel_bolus">Anulează bolus</string> <string name="omnipod_cmd_cancel_bolus">Anulează bolus</string>
<string name="omnipod_cmd_set_tbr">Setează bazala temporară</string> <string name="omnipod_cmd_set_tbr">Setează bazala temporară</string>
@ -82,11 +81,11 @@
<string name="omnipod_cmd_suspend_delivery">Suspendați livrarea</string> <string name="omnipod_cmd_suspend_delivery">Suspendați livrarea</string>
<string name="omnipod_cmd_resume_delivery">Reluați livrarea</string> <string name="omnipod_cmd_resume_delivery">Reluați livrarea</string>
<string name="omnipod_cmd_unknown_entry">Inregistrare nerecunoscută</string> <string name="omnipod_cmd_unknown_entry">Inregistrare nerecunoscută</string>
<string name="omnipod_cmd_bolus_value">%1$.2f U</string> <string name="omnipod_history_bolus_value">%1$.2f U</string>
<string name="omnipod_cmd_bolus_value_with_carbs">%1$.2f U, CH=%2$.1f g</string> <string name="omnipod_history_bolus_value_with_carbs">%1$.2f U, CH=%2$.1f g</string>
<string name="omnipod_cmd_tbr_value">Rata: %1$.2f U, Durata: %2$d min</string> <string name="omnipod_history_tbr_value">Rata: %1$.2f U, Durata: %2$d min</string>
<string name="omnipod_cmd_discard_pod_desc">Dacă apăsați <b>OK</b>, statusul Pod-ului va fi resetat forțat și nu veți mai putea comunica cu Pod-ul. Faceți acest lucru numai dacă nu mai se poate comunica deloc cu Pod-ul. Dacă se mai poate comunica cu Pod-ul, va rugam sa folosiți opțiunea <b>Dezactivare Pod</b>.\n\nDacă doriți să continuați, vă rugăm să vă asigurați, de asemenea, ca îndepărtați Pod-ul de pe corpul dvs.</string> <string name="omnipod_discard_pod_state_confirmation">Dacă apăsați <b>OK</b>, statusul Pod-ului va fi resetat forțat și nu veți mai putea comunica cu Pod-ul. Faceți acest lucru numai dacă nu mai se poate comunica deloc cu Pod-ul. Dacă se mai poate comunica cu Pod-ul, va rugam sa folosiți opțiunea <b>Dezactivare Pod</b>.\n\nDacă doriți să continuați, vă rugăm să vă asigurați, de asemenea, ca îndepărtați Pod-ul de pe corpul dvs.</string>
<string name="omnipod_cmd_pod_history_na">Istoricul Pod-ului nu este disponibil momentan.</string> <string name="omnipod_history_history_not_available">Istoricul Pod-ului nu este disponibil momentan.</string>
<string name="omnipod_init_pod_wizard_step1_title">Umpleţi Pod-ul</string> <string name="omnipod_init_pod_wizard_step1_title">Umpleţi Pod-ul</string>
<string name="omnipod_init_pod_wizard_step1_desc">\nUmpleți noul Pod cu suficientă insulină pentru 3 zile.\n\nAr trebui sa auziți două bipuri de la Pod în timpul procesului de umplere. Acestea indică faptul că, cantitatea minimă de 85U a fost introdusă. Asigurați-vă ca ați golit complet seringa de umplere, chiar și după ce ați auzit două bipuri.\n\nDupă umplerea Pod-ului, vă rugăm să apăsați <b>Următorul</b>.\n\n<b>Notă:</b> Nu scoateți capacul transparent al acului in acest moment.\n<b>Notă:</b> Va rugam sa puneți RileyLink în poziție verticala și plasați Pod-ul la o distanta de câțiva centimetri.</string> <string name="omnipod_init_pod_wizard_step1_desc">\nUmpleți noul Pod cu suficientă insulină pentru 3 zile.\n\nAr trebui sa auziți două bipuri de la Pod în timpul procesului de umplere. Acestea indică faptul că, cantitatea minimă de 85U a fost introdusă. Asigurați-vă ca ați golit complet seringa de umplere, chiar și după ce ați auzit două bipuri.\n\nDupă umplerea Pod-ului, vă rugăm să apăsați <b>Următorul</b>.\n\n<b>Notă:</b> Nu scoateți capacul transparent al acului in acest moment.\n<b>Notă:</b> Va rugam sa puneți RileyLink în poziție verticala și plasați Pod-ul la o distanta de câțiva centimetri.</string>
<string name="omnipod_init_pod_wizard_step2_title">Amorsare</string> <string name="omnipod_init_pod_wizard_step2_title">Amorsare</string>
@ -123,35 +122,35 @@
<string name="omnipod_error_set_temp_basal_failed_old_tbr_cancelled_new_might_have_failed">Setarea bazalei temporare s-ar putea sa fi eșuat. Dacă o bazală temporară era activă anterior, a fost anulată. Reîmprospătați manual starea Pod-ului din secțiunea Omnipod.</string> <string name="omnipod_error_set_temp_basal_failed_old_tbr_cancelled_new_might_have_failed">Setarea bazalei temporare s-ar putea sa fi eșuat. Dacă o bazală temporară era activă anterior, a fost anulată. Reîmprospătați manual starea Pod-ului din secțiunea Omnipod.</string>
<string name="omnipod_error_set_time_failed_delivery_might_be_suspended">Setarea timpului s-ar putea sa fi eșuat. Livrarea ar putea fi suspendată! Vă rugăm să reîmprospătați manual starea Pod-ului din secțiunea Omnipod și să continuați livrarea dacă este necesar.</string> <string name="omnipod_error_set_time_failed_delivery_might_be_suspended">Setarea timpului s-ar putea sa fi eșuat. Livrarea ar putea fi suspendată! Vă rugăm să reîmprospătați manual starea Pod-ului din secțiunea Omnipod și să continuați livrarea dacă este necesar.</string>
<string name="omnipod_error_set_time_failed_delivery_suspended">Setarea timpului a eșuat. Livrarea este suspendată! Vă rugăm să reluați manual livrarea din secțiunea Omnipod.</string> <string name="omnipod_error_set_time_failed_delivery_suspended">Setarea timpului a eșuat. Livrarea este suspendată! Vă rugăm să reluați manual livrarea din secțiunea Omnipod.</string>
<string name="omnipod_bolus_failed_uncertain">Nu se poate verifica dacă bolusul a reuşit. Vă rugăm să verificați manual că Pod-ul poate bolusa ascultand click-urile. <b>Daca ești sigur ca bolus nu a reusit, ar trebui să stergi manual intrarea bolus din Tratamente, chiar dacă dai click pe \'Oprește bolus\' acum!</b></string> <string name="omnipod_error_bolus_failed_uncertain">Nu se poate verifica dacă bolusul a reuşit. Vă rugăm să verificați manual că Pod-ul poate bolusa ascultand click-urile. <b>Daca ești sigur ca bolus nu a reusit, ar trebui să stergi manual intrarea bolus din Tratamente, chiar dacă dai click pe \'Oprește bolus\' acum!</b></string>
<string name="omnipod_bolus_failed_uncertain_smb">Nu s-a putut verifica dacă bolusul SMB (%1$.2f U) a reușit. <b>Daca ești sigur ca bolusul nu a reușit, ar trebui să ștergi manual intrarea SMB din Tratamente.</b></string> <string name="omnipod_error_bolus_failed_uncertain_smb">Nu s-a putut verifica dacă bolusul SMB (%1$.2f U) a reușit. <b>Daca ești sigur ca bolusul nu a reușit, ar trebui să ștergi manual intrarea SMB din Tratamente.</b></string>
<string name="omnipod_rl_stats">Statistici RL</string> <string name="omnipod_button_riley_link_stats">Statistici RL</string>
<string name="omnipod_read_pulse_log_short">Jurnal Pulsuri</string> <string name="omnipod_button_read_pulse_log">Jurnal Pulsuri</string>
<string name="omnipod_pod_lot">LOT</string> <string name="omnipod_pod_lot">LOT</string>
<string name="omnipod_pod_tid">TID</string> <string name="omnipod_pod_tid">TID</string>
<string name="omnipod_pod_firmware_version">Versiune firmware</string> <string name="omnipod_pod_firmware_version">Versiune firmware</string>
<string name="omnipod_errors">Erori</string> <string name="omnipod_errors">Erori</string>
<string name="omnipod_cmd_basal_profile_not_set_is_same">Profilul bazal este la fel cu cel existent și nu va fi reincărcat.</string> <string name="omnipod_confirmation_basal_profile_not_set_is_same">Profilul bazal este la fel cu cel existent și nu va fi reincărcat.</string>
<string name="omnipod_custom_action_reset_rileylink">Resetează configurația RileyLink</string> <string name="omnipod_custom_action_reset_rileylink">Resetează configurația RileyLink</string>
<string name="omnipod_time_or_timezone_change">Schimbare oră și/sau fus orar în Pod</string> <string name="omnipod_confirmation_time_or_timezone_change">Schimbare oră și/sau fus orar în Pod</string>
<string name="omnipod_composite_time">%1$s și %2$s</string> <string name="omnipod_composite_time">%1$s și %2$s</string>
<string name="omnipod_time_ago">%1$s în urmă</string> <string name="omnipod_time_ago">%1$s în urmă</string>
<string name="omnipod_waiting_for_rileylink_connection">Aşteptare conexiune RileyLink...</string> <string name="omnipod_waiting_for_rileylink_connection">Aşteptare conexiune RileyLink...</string>
<string name="omnipod_bolus_did_not_succeed">Bolusul nu a reușit</string> <string name="omnipod_error_bolus_did_not_succeed">Bolusul nu a reușit</string>
<string name="omnipod_refresh">Actualizează</string> <string name="omnipod_button_refresh">Actualizează</string>
<string name="omnipod_resume_delivery">Reluați livrarea</string> <string name="omnipod_button_resume_delivery">Reluați livrarea</string>
<string name="omnipod_error_pod_suspended">Pod suspendat</string> <string name="omnipod_pod_suspended">Pod suspendat</string>
<string name="omnipod_less_than_a_minute_ago">Mai puțin de un minut în urmă</string> <string name="omnipod_less_than_a_minute_ago">Mai puțin de un minut în urmă</string>
<string name="omnipod_suspend_delivery_short">Suspendare</string> <string name="omnipod_button_suspend_delivery">Suspendare</string>
<string name="omnipod_cmd_pair_and_prime">Împerechere și amorsare</string> <string name="omnipod_cmd_pair_and_prime">Împerechere și amorsare</string>
<string name="omnipod_cmd_fill_cannula_set_basal_profile">Umpleţi canula şi setaţi profilul bazal</string> <string name="omnipod_cmd_fill_cannula_set_basal_profile">Umpleţi canula şi setaţi profilul bazal</string>
<string name="omnipod_cmd_get_pulse_log">Obțineți jurnalul pulsurilor</string> <string name="omnipod_cmd_read_pulse_log">Obțineți jurnalul pulsurilor</string>
<string name="omnipod_uncertain_failure">Eroare necunoscută</string> <string name="omnipod_error_uncertain_failure">Eroare necunoscută</string>
<string name="omnipod_cancelled_old_tbr_failed_to_set_new">S-a anulat vechea bazală temporară, dar nu s-a putut seta o nouă bazală temporară</string> <string name="omnipod_error_cancelled_old_tbr_failed_to_set_new">S-a anulat vechea bazală temporară, dar nu s-a putut seta o nouă bazală temporară</string>
<string name="omnipod_cmd_set_fake_suspended_tbr">Se setează o bazală temporară falsă deoarece Pod-ul este suspendat</string> <string name="omnipod_cmd_set_fake_suspended_tbr">Se setează o bazală temporară falsă deoarece Pod-ul este suspendat</string>
<string name="omnipod_cmd_cancel_fake_suspended_tbr">Anulează bazala temporară falsă creată pentru că Pod-ul a fost suspendat</string> <string name="omnipod_cmd_cancel_fake_suspended_tbr">Anulează bazala temporară falsă creată pentru că Pod-ul a fost suspendat</string>
<string name="omnipod_uncertain">incert</string> <string name="omnipod_uncertain">incert</string>
<string name="omnipod_expiration_alerts_updated">Setarile de alertă actualizate în Pod</string> <string name="omnipod_confirmation_expiration_alerts_updated">Setarile de alertă actualizate în Pod</string>
<string name="omnipod_preference_category_rileylink">RileyLink</string> <string name="omnipod_preference_category_rileylink">RileyLink</string>
<string name="omnipod_preference_category_other">Altele</string> <string name="omnipod_preference_category_other">Altele</string>
<string name="omnipod_preference_category_alerts">Alerte</string> <string name="omnipod_preference_category_alerts">Alerte</string>

Some files were not shown because too many files have changed in this diff Show more