Merge pull request #1 from nightscout/dev

Update from ref
This commit is contained in:
rICTx-T1D 2020-10-09 20:07:52 +02:00 committed by GitHub
commit 3c5e8de22a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
198 changed files with 5697 additions and 2703 deletions

View file

@ -247,6 +247,7 @@ dependencies {
implementation project(':danar') implementation project(':danar')
implementation project(':rileylink') implementation project(':rileylink')
implementation project(':medtronic') implementation project(':medtronic')
implementation project(':omnipod')
implementation fileTree(include: ['*.jar'], dir: 'libs') implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.google.android.gms:play-services-wearable:17.0.0' implementation 'com.google.android.gms:play-services-wearable:17.0.0'
@ -267,6 +268,8 @@ dependencies {
implementation "androidx.activity:activity-ktx:${activityVersion}" implementation "androidx.activity:activity-ktx:${activityVersion}"
implementation "androidx.fragment:fragment:${fragmentVersion}" implementation "androidx.fragment:fragment:${fragmentVersion}"
implementation 'androidx.constraintlayout:constraintlayout:1.1.3' implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
implementation "androidx.navigation:navigation-ui-ktx:$nav_version"
implementation 'com.google.android.material:material:1.1.0' implementation 'com.google.android.material:material:1.1.0'
implementation "io.reactivex.rxjava2:rxandroid:${rxandroid_version}" implementation "io.reactivex.rxjava2:rxandroid:${rxandroid_version}"
@ -282,8 +285,6 @@ dependencies {
implementation "com.jjoe64:graphview:4.0.1" implementation "com.jjoe64:graphview:4.0.1"
implementation "com.joanzapata.iconify:android-iconify-fontawesome:2.2.2" implementation "com.joanzapata.iconify:android-iconify-fontawesome:2.2.2"
implementation 'com.madgag.spongycastle:core:1.58.0.0' implementation 'com.madgag.spongycastle:core:1.58.0.0'
// Omnipod wizard
implementation(name: "com.atech-software.android.library.wizardpager-1.1.4", ext: "aar")
implementation("com.google.android:flexbox:0.3.0") { implementation("com.google.android:flexbox:0.3.0") {
exclude group: "com.android.support" exclude group: "com.android.support"
} }

View file

@ -10,6 +10,7 @@ import info.nightscout.androidaps.dana.di.DanaModule
import info.nightscout.androidaps.danar.di.DanaRModule import info.nightscout.androidaps.danar.di.DanaRModule
import info.nightscout.androidaps.danars.di.DanaRSModule import info.nightscout.androidaps.danars.di.DanaRSModule
import info.nightscout.androidaps.plugins.pump.common.dagger.RileyLinkModule import info.nightscout.androidaps.plugins.pump.common.dagger.RileyLinkModule
import info.nightscout.androidaps.plugins.pump.omnipod.dagger.OmnipodModule
import javax.inject.Singleton import javax.inject.Singleton
@Singleton @Singleton
@ -29,6 +30,7 @@ import javax.inject.Singleton
WizardModule::class, WizardModule::class,
RileyLinkModule::class, RileyLinkModule::class,
MedtronicModule::class, MedtronicModule::class,
OmnipodModule::class,
APSModule::class, APSModule::class,
PreferencesModule::class, PreferencesModule::class,
OverviewModule::class, OverviewModule::class,

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

@ -36,6 +36,7 @@ import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.dialog.RileyL
import info.nightscout.androidaps.plugins.pump.insight.LocalInsightFragment import info.nightscout.androidaps.plugins.pump.insight.LocalInsightFragment
import info.nightscout.androidaps.plugins.pump.medtronic.MedtronicFragment import info.nightscout.androidaps.plugins.pump.medtronic.MedtronicFragment
import info.nightscout.androidaps.plugins.pump.medtronic.dialog.RileyLinkStatusDeviceMedtronic import info.nightscout.androidaps.plugins.pump.medtronic.dialog.RileyLinkStatusDeviceMedtronic
import info.nightscout.androidaps.plugins.pump.omnipod.ui.OmnipodOverviewFragment
import info.nightscout.androidaps.plugins.pump.virtual.VirtualPumpFragment import info.nightscout.androidaps.plugins.pump.virtual.VirtualPumpFragment
import info.nightscout.androidaps.plugins.source.BGSourceFragment import info.nightscout.androidaps.plugins.source.BGSourceFragment
import info.nightscout.androidaps.plugins.treatments.TreatmentsFragment import info.nightscout.androidaps.plugins.treatments.TreatmentsFragment
@ -67,6 +68,7 @@ abstract class FragmentsModule {
@ContributesAndroidInjector abstract fun contributesLoopFragment(): LoopFragment @ContributesAndroidInjector abstract fun contributesLoopFragment(): LoopFragment
@ContributesAndroidInjector abstract fun contributesMaintenanceFragment(): MaintenanceFragment @ContributesAndroidInjector abstract fun contributesMaintenanceFragment(): MaintenanceFragment
@ContributesAndroidInjector abstract fun contributesMedtronicFragment(): MedtronicFragment @ContributesAndroidInjector abstract fun contributesMedtronicFragment(): MedtronicFragment
@ContributesAndroidInjector abstract fun contributesOmnipodFragment(): OmnipodOverviewFragment
@ContributesAndroidInjector abstract fun contributesNSProfileFragment(): NSProfileFragment @ContributesAndroidInjector abstract fun contributesNSProfileFragment(): NSProfileFragment
@ContributesAndroidInjector abstract fun contributesNSClientFragment(): NSClientFragment @ContributesAndroidInjector abstract fun contributesNSClientFragment(): NSClientFragment
@ContributesAndroidInjector @ContributesAndroidInjector

View file

@ -31,6 +31,7 @@ import info.nightscout.androidaps.plugins.general.persistentNotification.Persist
import info.nightscout.androidaps.plugins.general.smsCommunicator.SmsCommunicatorPlugin import info.nightscout.androidaps.plugins.general.smsCommunicator.SmsCommunicatorPlugin
import info.nightscout.androidaps.plugins.general.wear.WearPlugin import info.nightscout.androidaps.plugins.general.wear.WearPlugin
import info.nightscout.androidaps.plugins.general.xdripStatusline.StatusLinePlugin import info.nightscout.androidaps.plugins.general.xdripStatusline.StatusLinePlugin
import info.nightscout.androidaps.plugins.insulin.InsulinLyumjevPlugin
import info.nightscout.androidaps.plugins.insulin.InsulinOrefFreePeakPlugin import info.nightscout.androidaps.plugins.insulin.InsulinOrefFreePeakPlugin
import info.nightscout.androidaps.plugins.insulin.InsulinOrefRapidActingPlugin import info.nightscout.androidaps.plugins.insulin.InsulinOrefRapidActingPlugin
import info.nightscout.androidaps.plugins.insulin.InsulinOrefUltraRapidActingPlugin import info.nightscout.androidaps.plugins.insulin.InsulinOrefUltraRapidActingPlugin
@ -82,6 +83,12 @@ abstract class PluginsModule {
@IntKey(40) @IntKey(40)
abstract fun bindInsulinOrefUltraRapidActingPlugin(plugin: InsulinOrefUltraRapidActingPlugin): PluginBase abstract fun bindInsulinOrefUltraRapidActingPlugin(plugin: InsulinOrefUltraRapidActingPlugin): PluginBase
@Binds
@AllConfigs
@IntoMap
@IntKey(42)
abstract fun bindInsulinLyumjevPlugin(plugin: InsulinLyumjevPlugin): PluginBase
@Binds @Binds
@AllConfigs @AllConfigs
@IntoMap @IntoMap

View file

@ -10,6 +10,7 @@ import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.Riley
import info.nightscout.androidaps.plugins.pump.insight.InsightAlertService import info.nightscout.androidaps.plugins.pump.insight.InsightAlertService
import info.nightscout.androidaps.plugins.pump.insight.connection_service.InsightConnectionService import info.nightscout.androidaps.plugins.pump.insight.connection_service.InsightConnectionService
import info.nightscout.androidaps.plugins.pump.medtronic.service.RileyLinkMedtronicService import info.nightscout.androidaps.plugins.pump.medtronic.service.RileyLinkMedtronicService
import info.nightscout.androidaps.plugins.pump.omnipod.rileylink.service.RileyLinkOmnipodService
import info.nightscout.androidaps.services.AlarmSoundService import info.nightscout.androidaps.services.AlarmSoundService
import info.nightscout.androidaps.services.DataService import info.nightscout.androidaps.services.DataService
import info.nightscout.androidaps.services.LocationService import info.nightscout.androidaps.services.LocationService
@ -29,4 +30,5 @@ abstract class ServicesModule {
@ContributesAndroidInjector abstract fun contributesInsightConnectionService(): InsightConnectionService @ContributesAndroidInjector abstract fun contributesInsightConnectionService(): InsightConnectionService
@ContributesAndroidInjector abstract fun contributesRileyLinkService(): RileyLinkService @ContributesAndroidInjector abstract fun contributesRileyLinkService(): RileyLinkService
@ContributesAndroidInjector abstract fun contributesRileyLinkMedtronicService(): RileyLinkMedtronicService @ContributesAndroidInjector abstract fun contributesRileyLinkMedtronicService(): RileyLinkMedtronicService
@ContributesAndroidInjector abstract fun contributesRileyLinkOmnipodService(): RileyLinkOmnipodService
} }

View file

@ -167,7 +167,7 @@ class ImportExportPrefs @Inject constructor(
if (!prefsEncryptionIsDisabled() && !assureMasterPasswordSet(activity, R.string.nav_export)) return if (!prefsEncryptionIsDisabled() && !assureMasterPasswordSet(activity, R.string.nav_export)) return
TwoMessagesAlertDialog.showAlert(activity, resourceHelper.gs(R.string.nav_export), TwoMessagesAlertDialog.showAlert(activity, resourceHelper.gs(R.string.nav_export),
resourceHelper.gs(R.string.export_to) + " " + fileToExport + " ?", resourceHelper.gs(R.string.export_to) + " " + fileToExport.name + " ?",
resourceHelper.gs(R.string.password_preferences_encrypt_prompt), { resourceHelper.gs(R.string.password_preferences_encrypt_prompt), {
askForMasterPassIfNeeded(activity, R.string.preferences_export_canceled, then) askForMasterPassIfNeeded(activity, R.string.preferences_export_canceled, then)
}, null, R.drawable.ic_header_export) }, null, R.drawable.ic_header_export)
@ -177,9 +177,8 @@ class ImportExportPrefs @Inject constructor(
if (fileToImport.handler == PrefsFormatsHandler.ENCRYPTED) { if (fileToImport.handler == PrefsFormatsHandler.ENCRYPTED) {
if (!assureMasterPasswordSet(activity, R.string.nav_import)) return if (!assureMasterPasswordSet(activity, R.string.nav_import)) return
TwoMessagesAlertDialog.showAlert(activity, resourceHelper.gs(R.string.nav_import), TwoMessagesAlertDialog.showAlert(activity, resourceHelper.gs(R.string.nav_import),
resourceHelper.gs(R.string.import_from) + " " + fileToImport.file + " ?", resourceHelper.gs(R.string.import_from) + " " + fileToImport.name + " ?",
resourceHelper.gs(R.string.password_preferences_decrypt_prompt), { resourceHelper.gs(R.string.password_preferences_decrypt_prompt), {
askForMasterPass(activity, R.string.preferences_import_canceled, then) askForMasterPass(activity, R.string.preferences_import_canceled, then)
}, null, R.drawable.ic_header_import) }, null, R.drawable.ic_header_import)
@ -283,7 +282,7 @@ class ImportExportPrefs @Inject constructor(
askToConfirmImport(activity, importFile) { password -> askToConfirmImport(activity, importFile) { password ->
val format: PrefsFormat = when (importFile.handler) { val format: PrefsFormat = when (importFile.handler) {
PrefsFormatsHandler.CLASSIC -> classicPrefsFormat PrefsFormatsHandler.CLASSIC -> classicPrefsFormat
PrefsFormatsHandler.ENCRYPTED -> encryptedPrefsFormat PrefsFormatsHandler.ENCRYPTED -> encryptedPrefsFormat
} }

View file

@ -34,6 +34,7 @@ enum class PrefsImportDir {
@Parcelize @Parcelize
data class PrefsFile( data class PrefsFile(
val name: String,
val file: File, val file: File,
val baseDir: File, val baseDir: File,
val dirKind: PrefsImportDir, val dirKind: PrefsImportDir,
@ -46,6 +47,7 @@ data class PrefsFile(
class PrefsFileContract : ActivityResultContract<Void, PrefsFile>() { class PrefsFileContract : ActivityResultContract<Void, PrefsFile>() {
companion object { companion object {
const val OUTPUT_PARAM = "prefs_file" const val OUTPUT_PARAM = "prefs_file"
} }
@ -74,6 +76,7 @@ class PrefFileListProvider @Inject constructor(
) { ) {
companion object { companion object {
private val path = File(Environment.getExternalStorageDirectory().toString()) private val path = File(Environment.getExternalStorageDirectory().toString())
private val aapsPath = File(path, "AAPS" + File.separator + "preferences") private val aapsPath = File(path, "AAPS" + File.separator + "preferences")
private const val IMPORT_AGE_NOT_YET_OLD_DAYS = 60 private const val IMPORT_AGE_NOT_YET_OLD_DAYS = 60
@ -96,7 +99,7 @@ class PrefFileListProvider @Inject constructor(
val detectedOld = !detectedNew && classicPrefsFormat.isPreferencesFile(it, contents) val detectedOld = !detectedNew && classicPrefsFormat.isPreferencesFile(it, contents)
if (detectedNew || detectedOld) { if (detectedNew || detectedOld) {
val formatHandler = if (detectedNew) PrefsFormatsHandler.ENCRYPTED else PrefsFormatsHandler.CLASSIC val formatHandler = if (detectedNew) PrefsFormatsHandler.ENCRYPTED else PrefsFormatsHandler.CLASSIC
prefFiles.add(PrefsFile(it, path, PrefsImportDir.ROOT_DIR, formatHandler, metadataFor(loadMetadata, formatHandler, contents))) prefFiles.add(PrefsFile(it.name, it, path, PrefsImportDir.ROOT_DIR, formatHandler, metadataFor(loadMetadata, formatHandler, contents)))
} }
} }
@ -104,7 +107,7 @@ class PrefFileListProvider @Inject constructor(
aapsPath.walk().filter { it.isFile && it.name.endsWith(".json") }.forEach { aapsPath.walk().filter { it.isFile && it.name.endsWith(".json") }.forEach {
val contents = storage.getFileContents(it) val contents = storage.getFileContents(it)
if (encryptedPrefsFormat.isPreferencesFile(it, contents)) { if (encryptedPrefsFormat.isPreferencesFile(it, contents)) {
prefFiles.add(PrefsFile(it, aapsPath, PrefsImportDir.AAPS_DIR, PrefsFormatsHandler.ENCRYPTED, metadataFor(loadMetadata, PrefsFormatsHandler.ENCRYPTED, contents))) prefFiles.add(PrefsFile(it.name, it, aapsPath, PrefsImportDir.AAPS_DIR, PrefsFormatsHandler.ENCRYPTED, metadataFor(loadMetadata, PrefsFormatsHandler.ENCRYPTED, contents)))
} }
} }

View file

@ -4,6 +4,7 @@ import com.jjoe64.graphview.DefaultLabelFormatter;
import java.text.DateFormat; import java.text.DateFormat;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Locale;
/** /**
* Created by mike on 09.06.2016. * Created by mike on 09.06.2016.
@ -20,10 +21,22 @@ public class TimeAsXAxisLabelFormatter extends DefaultLabelFormatter {
public String formatLabel(double value, boolean isValueX) { public String formatLabel(double value, boolean isValueX) {
if (isValueX) { if (isValueX) {
// format as date // format as date
DateFormat dateFormat = new SimpleDateFormat(mFormat); DateFormat dateFormat = new SimpleDateFormat(mFormat, Locale.getDefault());
return dateFormat.format((long) value); return dateFormat.format((long) value);
} else { } else {
return super.formatLabel(value, isValueX); try {
// unknown reason for crashing on this
// Fatal Exception: java.lang.NullPointerException
// Attempt to invoke virtual method 'double com.jjoe64.graphview.Viewport.getMaxY(boolean)' on a null object reference
// com.jjoe64.graphview.DefaultLabelFormatter.formatLabel (DefaultLabelFormatter.java:89)
// info.nightscout.androidaps.plugins.general.overview.graphExtensions.TimeAsXAxisLabelFormatter.formatLabel (TimeAsXAxisLabelFormatter.java:26)
// com.jjoe64.graphview.GridLabelRenderer.drawVerticalSteps (GridLabelRenderer.java:1057)
// com.jjoe64.graphview.GridLabelRenderer.draw (GridLabelRenderer.java:866)
// com.jjoe64.graphview.GraphView.onDraw (GraphView.java:296)
return super.formatLabel(value, isValueX);
} catch (Exception ignored) {
return "";
}
} }
} }
} }

View file

@ -0,0 +1,35 @@
package info.nightscout.androidaps.plugins.insulin
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.R
import info.nightscout.androidaps.interfaces.InsulinInterface
import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.plugins.bus.RxBusWrapper
import info.nightscout.androidaps.interfaces.ProfileFunction
import info.nightscout.androidaps.utils.resources.ResourceHelper
import javax.inject.Inject
import javax.inject.Singleton
@Singleton
class InsulinLyumjevPlugin @Inject constructor(
injector: HasAndroidInjector,
resourceHelper: ResourceHelper,
profileFunction: ProfileFunction,
rxBus: RxBusWrapper, aapsLogger: AAPSLogger
) : InsulinOrefBasePlugin(injector, resourceHelper, profileFunction, rxBus, aapsLogger) {
override fun getId(): Int = InsulinInterface.OREF_LYUMJEV
override fun getFriendlyName(): String = resourceHelper.gs(R.string.lyumjev)
override fun commentStandardText(): String = resourceHelper.gs(R.string.lyumjev)
override val peak = 45
init {
pluginDescription
.pluginName(R.string.lyumjev)
.description(R.string.description_insulin_lyumjev)
}
}

View file

@ -41,5 +41,6 @@ class InsulinOrefRapidActingPlugin @Inject constructor(
.pluginName(R.string.rapid_acting_oref) .pluginName(R.string.rapid_acting_oref)
.description(R.string.description_insulin_rapid) .description(R.string.description_insulin_rapid)
.setDefault() .setDefault()
.enableByDefault(true)
} }
} }

View file

@ -34,6 +34,5 @@ class InsulinOrefUltraRapidActingPlugin @Inject constructor(
pluginDescription pluginDescription
.pluginName(R.string.ultrarapid_oref) .pluginName(R.string.ultrarapid_oref)
.description(R.string.description_insulin_ultra_rapid) .description(R.string.description_insulin_ultra_rapid)
.enableByDefault(true)
} }
} }

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
@ -260,7 +260,7 @@ class CommandQueue @Inject constructor(
} else { } else {
add(CommandBolus(injector, detailedBolusInfo, callback, type)) add(CommandBolus(injector, detailedBolusInfo, callback, type))
if (type == CommandType.BOLUS) { // Bring up bolus progress dialog (start here, so the dialog is shown when the bolus is requested, if (type == CommandType.BOLUS) { // Bring up bolus progress dialog (start here, so the dialog is shown when the bolus is requested,
// not when the Bolus command is starting. The command closes the dialog upon completion). // not when the Bolus command is starting. The command closes the dialog upon completion).
showBolusProgressDialog(detailedBolusInfo.insulin, detailedBolusInfo.context) showBolusProgressDialog(detailedBolusInfo.insulin, detailedBolusInfo.context)
// Notify Wear about upcoming bolus // Notify Wear about upcoming bolus
rxBus.send(EventBolusRequested(detailedBolusInfo.insulin)) rxBus.send(EventBolusRequested(detailedBolusInfo.insulin))
@ -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

@ -16,10 +16,10 @@ import info.nightscout.androidaps.interfaces.ActivePluginProvider
import info.nightscout.androidaps.interfaces.CommandQueueProvider import info.nightscout.androidaps.interfaces.CommandQueueProvider
import info.nightscout.androidaps.interfaces.PluginBase import info.nightscout.androidaps.interfaces.PluginBase
import info.nightscout.androidaps.interfaces.PluginType import info.nightscout.androidaps.interfaces.PluginType
import info.nightscout.androidaps.interfaces.ProfileFunction
import info.nightscout.androidaps.plugins.aps.loop.LoopPlugin import info.nightscout.androidaps.plugins.aps.loop.LoopPlugin
import info.nightscout.androidaps.plugins.bus.RxBusWrapper import info.nightscout.androidaps.plugins.bus.RxBusWrapper
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin
import info.nightscout.androidaps.interfaces.ProfileFunction
import info.nightscout.androidaps.plugins.constraints.objectives.ObjectivesFragment import info.nightscout.androidaps.plugins.constraints.objectives.ObjectivesFragment
import info.nightscout.androidaps.plugins.constraints.objectives.ObjectivesPlugin import info.nightscout.androidaps.plugins.constraints.objectives.ObjectivesPlugin
import info.nightscout.androidaps.plugins.general.maintenance.ImportExportPrefs import info.nightscout.androidaps.plugins.general.maintenance.ImportExportPrefs
@ -30,12 +30,13 @@ import info.nightscout.androidaps.plugins.profile.local.LocalProfileFragment
import info.nightscout.androidaps.plugins.profile.local.LocalProfilePlugin import info.nightscout.androidaps.plugins.profile.local.LocalProfilePlugin
import info.nightscout.androidaps.plugins.profile.ns.NSProfileFragment import info.nightscout.androidaps.plugins.profile.ns.NSProfileFragment
import info.nightscout.androidaps.plugins.profile.ns.NSProfilePlugin import info.nightscout.androidaps.plugins.profile.ns.NSProfilePlugin
import info.nightscout.androidaps.plugins.pump.omnipod.OmnipodPumpPlugin
import info.nightscout.androidaps.setupwizard.elements.* import info.nightscout.androidaps.setupwizard.elements.*
import info.nightscout.androidaps.setupwizard.events.EventSWUpdate import info.nightscout.androidaps.setupwizard.events.EventSWUpdate
import info.nightscout.androidaps.utils.AndroidPermission import info.nightscout.androidaps.utils.AndroidPermission
import info.nightscout.androidaps.utils.CryptoUtil import info.nightscout.androidaps.utils.CryptoUtil
import info.nightscout.androidaps.utils.locale.LocaleHelper.update
import info.nightscout.androidaps.utils.extensions.isRunningTest import info.nightscout.androidaps.utils.extensions.isRunningTest
import info.nightscout.androidaps.utils.locale.LocaleHelper.update
import info.nightscout.androidaps.utils.protection.ProtectionCheck import info.nightscout.androidaps.utils.protection.ProtectionCheck
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
@ -313,11 +314,37 @@ class SWDefinition @Inject constructor(
}, null) }, null)
}) })
.visibility(SWValidator { (activePlugin.activePump as PluginBase).preferencesId > 0 })) .visibility(SWValidator { (activePlugin.activePump as PluginBase).preferencesId > 0 }))
.add(SWInfotext(injector)
.label(R.string.setupwizard_pump_pump_not_initialized)
.visibility(SWValidator { !isPumpInitialized() }))
.add( // Omnipod only
SWInfotext(injector)
.label(R.string.setupwizard_pump_waiting_for_riley_link_connection)
.visibility(SWValidator {
val activePump = activePlugin.activePump
activePump is OmnipodPumpPlugin && !activePump.isRileyLinkReady
}))
.add(SWButton(injector) .add(SWButton(injector)
.text(R.string.readstatus) .text(R.string.readstatus)
.action(Runnable { commandQueue.readStatus("Clicked connect to pump", null) })) .action(Runnable { commandQueue.readStatus("Clicked connect to pump", null) })
.visibility(SWValidator {
// Hide for Omnipod, because as we don't require a Pod to be paired in the setup wizard,
// Getting the status might not be possible
activePlugin.activePump !is OmnipodPumpPlugin
}))
.add(SWEventListener(injector, EventPumpStatusChanged::class.java)) .add(SWEventListener(injector, EventPumpStatusChanged::class.java))
.validator(SWValidator { activePlugin.activePump.isInitialized }) .validator(SWValidator {
isPumpInitialized()
})
private fun isPumpInitialized(): Boolean {
val activePump = activePlugin.activePump
// For Omnipod, consider the pump initialized when a RL has been configured successfully
// Users will be prompted to activate a Pod after completing the setup wizard.
return activePump.isInitialized || (activePump is OmnipodPumpPlugin && activePump.isRileyLinkReady)
}
private val screenAps = SWScreen(injector, R.string.configbuilder_aps) private val screenAps = SWScreen(injector, R.string.configbuilder_aps)
.skippable(false) .skippable(false)
.add(SWInfotext(injector) .add(SWInfotext(injector)

View file

@ -16,13 +16,14 @@ import info.nightscout.androidaps.events.EventPumpStatusChanged
import info.nightscout.androidaps.plugins.bus.RxBusWrapper import info.nightscout.androidaps.plugins.bus.RxBusWrapper
import info.nightscout.androidaps.plugins.general.nsclient.events.EventNSClientStatus import info.nightscout.androidaps.plugins.general.nsclient.events.EventNSClientStatus
import info.nightscout.androidaps.plugins.profile.local.LocalProfilePlugin import info.nightscout.androidaps.plugins.profile.local.LocalProfilePlugin
import info.nightscout.androidaps.plugins.pump.common.events.EventRileyLinkDeviceStatusChange
import info.nightscout.androidaps.setupwizard.elements.SWItem import info.nightscout.androidaps.setupwizard.elements.SWItem
import info.nightscout.androidaps.setupwizard.events.EventSWUpdate import info.nightscout.androidaps.setupwizard.events.EventSWUpdate
import info.nightscout.androidaps.utils.AndroidPermission import info.nightscout.androidaps.utils.AndroidPermission
import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.FabricPrivacy
import info.nightscout.androidaps.utils.locale.LocaleHelper.update
import info.nightscout.androidaps.utils.alertDialogs.OKDialog.show import info.nightscout.androidaps.utils.alertDialogs.OKDialog.show
import info.nightscout.androidaps.utils.alertDialogs.OKDialog.showConfirmation import info.nightscout.androidaps.utils.alertDialogs.OKDialog.showConfirmation
import info.nightscout.androidaps.utils.locale.LocaleHelper.update
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.android.schedulers.AndroidSchedulers import io.reactivex.android.schedulers.AndroidSchedulers
@ -81,6 +82,11 @@ class SetupWizardActivity : NoSplashAppCompatActivity() {
.observeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread())
.subscribe({ updateButtons() }) { fabricPrivacy.logException(it) } .subscribe({ updateButtons() }) { fabricPrivacy.logException(it) }
) )
disposable.add(rxBus
.toObservable(EventRileyLinkDeviceStatusChange::class.java)
.observeOn(AndroidSchedulers.mainThread())
.subscribe({ updateButtons() }) { fabricPrivacy.logException(it) }
)
disposable.add(rxBus disposable.add(rxBus
.toObservable(EventNSClientStatus::class.java) .toObservable(EventNSClientStatus::class.java)
.observeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread())
@ -104,6 +110,7 @@ class SetupWizardActivity : NoSplashAppCompatActivity() {
updateButtons() updateButtons()
}) { fabricPrivacy.logException(it) } }) { fabricPrivacy.logException(it) }
) )
updateButtons()
} }
private fun generateLayout() { private fun generateLayout() {
@ -172,7 +179,7 @@ class SetupWizardActivity : NoSplashAppCompatActivity() {
finish() finish()
} }
@Suppress("UNUSED_PARAMETER","SameParameterValue") @Suppress("UNUSED_PARAMETER", "SameParameterValue")
private fun nextPage(view: View?): Int { private fun nextPage(view: View?): Int {
var page = currentWizardPage + 1 var page = currentWizardPage + 1
while (page < screens.size) { while (page < screens.size) {
@ -182,7 +189,7 @@ class SetupWizardActivity : NoSplashAppCompatActivity() {
return min(currentWizardPage, screens.size - 1) return min(currentWizardPage, screens.size - 1)
} }
@Suppress("UNUSED_PARAMETER","SameParameterValue") @Suppress("UNUSED_PARAMETER", "SameParameterValue")
private fun previousPage(view: View?): Int { private fun previousPage(view: View?): Int {
var page = currentWizardPage - 1 var page = currentWizardPage - 1
while (page >= 0) { while (page >= 0) {

View file

@ -66,7 +66,7 @@ object PrefImportSummaryDialog {
rowLayout.setOnClickListener { rowLayout.setOnClickListener {
val msg = "[${context.getString(metaKey.label)}] ${metaEntry.info}" val msg = "[${context.getString(metaKey.label)}] ${metaEntry.info}"
when (metaEntry.status) { when (metaEntry.status) {
PrefsStatus.WARN -> ToastUtils.Long.warnToast(context, msg) PrefsStatus.WARN -> ToastUtils.Long.warnToast(context, msg)
PrefsStatus.ERROR -> ToastUtils.Long.errorToast(context, msg) PrefsStatus.ERROR -> ToastUtils.Long.errorToast(context, msg)
else -> ToastUtils.Long.infoToast(context, msg) else -> ToastUtils.Long.infoToast(context, msg)
} }
@ -132,6 +132,9 @@ object PrefImportSummaryDialog {
} }
val dialog = builder.show() val dialog = builder.show()
val textView = dialog.findViewById<View>(android.R.id.message) as TextView?
textView!!.textSize = 12f
textView!!.setPadding(10,0,0,0)
dialog.setCanceledOnTouchOutside(false) dialog.setCanceledOnTouchOutside(false)
} }

View file

@ -1,30 +1,43 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content">
android:orientation="vertical"
android:paddingBottom="10dp">
<TableLayout <androidx.core.widget.NestedScrollView
android:id="@+id/summary_table" android:id="@+id/scroll_content_frame"
android:layout_width="fill_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="210dp">
android:layout_marginLeft="8dp" <LinearLayout
android:layout_marginRight="8dp" android:layout_width="match_parent"
android:stretchColumns="2" /> android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="10dp">
<Button <TableLayout
android:id="@+id/summary_details_btn" android:id="@+id/summary_table"
style="?android:attr/buttonStyle" android:layout_width="fill_parent"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_height="wrap_content" android:layout_marginStart="8dp"
android:layout_gravity="center_horizontal" android:layout_marginEnd="8dp"
android:layout_marginLeft="10dp" android:stretchColumns="2" />
android:layout_marginTop="10dp"
android:layout_marginRight="10dp"
android:layout_marginBottom="3dp"
android:text="@string/check_preferences_details_btn"
android:textColor="@color/colorTreatmentButton"
android:visibility="gone" />
</LinearLayout> <Button
android:id="@+id/summary_details_btn"
style="?android:attr/buttonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:gravity="bottom"
android:layout_marginStart="10dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="10dp"
android:layout_marginBottom="3dp"
android:text="@string/check_preferences_details_btn"
android:textColor="@color/colorTreatmentButton"
android:visibility="gone" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View file

@ -3,7 +3,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical" android:orientation="vertical"
android:padding="20dp"> android:padding="10dp">
<TextView <TextView
android:id="@+id/password_prompt_title" android:id="@+id/password_prompt_title"

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://androidaps.readthedocs.io/en/latest/EN/Configuration/Sensitivity-detection-and-COB.html</string> <string name="setupwizard_sensitivity_url">https://github.com/MilosKozak/AndroidAPS/wiki/Sensitivity-detection-and-COB</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

@ -819,7 +819,7 @@
<string name="high_temptarget_raises_sensitivity_summary"><![CDATA[Erhöhe die Sensitivität für temporäre Ziele >= 100.]]></string> <string name="high_temptarget_raises_sensitivity_summary"><![CDATA[Erhöhe die Sensitivität für temporäre Ziele >= 100.]]></string>
<string name="low_temptarget_lowers_sensitivity_title">Niedrige temporäre Ziele senken die Sensitivität</string> <string name="low_temptarget_lowers_sensitivity_title">Niedrige temporäre Ziele senken die Sensitivität</string>
<string name="low_temptarget_lowers_sensitivity_summary"><![CDATA[Senke die Sensitivität für temporäre Ziele < 100.]]></string> <string name="low_temptarget_lowers_sensitivity_summary"><![CDATA[Senke die Sensitivität für temporäre Ziele < 100.]]></string>
<string name="resistance_lowers_target_title">Resistenz senkt Zielwert</string> <string name="resistance_lowers_target_title">Resistenz senkt den Zielwert</string>
<string name="resistance_lowers_target_summary">Wenn Resistenz festgestellt wird, senke den Glukose-Zielwert</string> <string name="resistance_lowers_target_summary">Wenn Resistenz festgestellt wird, senke den Glukose-Zielwert</string>
<string name="sensitivity_raises_target_title">Empfindlichkeit erhöht den Zielwert</string> <string name="sensitivity_raises_target_title">Empfindlichkeit erhöht den Zielwert</string>
<string name="sensitivity_raises_target_summary">Wenn eine höhere Empfindlichkeit festgestellt wird, wird der Glukose-Zielwert erhöht.</string> <string name="sensitivity_raises_target_summary">Wenn eine höhere Empfindlichkeit festgestellt wird, wird der Glukose-Zielwert erhöht.</string>
@ -1156,7 +1156,7 @@ Unerwartetes Verhalten.</string>
<string name="smscommunicator_otp_step2_provisioning_header">2. Scanne den Code zum Einrichten von AndroidAPS OTP-Codes</string> <string name="smscommunicator_otp_step2_provisioning_header">2. Scanne den Code zum Einrichten von AndroidAPS OTP-Codes</string>
<string name="smscommunicator_otp_step3_test_header">3. Teste das Einmal-Passwort</string> <string name="smscommunicator_otp_step3_test_header">3. Teste das Einmal-Passwort</string>
<string name="smscommunicator_otp_reset_header">Authentifikators zurücksetzen</string> <string name="smscommunicator_otp_reset_header">Authentifikators zurücksetzen</string>
<string name="smscommunicator_otp_install_info">Installiere auf jedem Folloer-Phone eine Authenticator-App, die RFC 6238 TOTP-Token unterstützt. Beliebte kostenlose Apps sind:\n Authy\n Google Authenticator\n LastPass Authenticator\n FreeOTP Authenticator</string> <string name="smscommunicator_otp_install_info">Installiere auf jedem Follower-Phone eine Authenticator-App, die RFC 6238 TOTP-Token unterstützt. Beliebte kostenlose Apps sind:\n Authy\n Google Authenticator\n LastPass Authenticator\n FreeOTP Authenticator</string>
<string name="smscommunicator_otp_provisioning_warning">Diesen Code NICHT ONLINE TEILEN!\nVerwende ihn nur zur Einrichtung der Authenticator App auf den Follower-Phones.</string> <string name="smscommunicator_otp_provisioning_warning">Diesen Code NICHT ONLINE TEILEN!\nVerwende ihn nur zur Einrichtung der Authenticator App auf den Follower-Phones.</string>
<string name="smscommunicator_otp_reset_warning">Wenn Du den Authentifikator zurücksetzt werden alle bestehenden Authentifikatoren ungültig. Du musst sie dann neu einrichten!</string> <string name="smscommunicator_otp_reset_warning">Wenn Du den Authentifikator zurücksetzt werden alle bestehenden Authentifikatoren ungültig. Du musst sie dann neu einrichten!</string>
<string name="onconnect">Beim Verbinden</string> <string name="onconnect">Beim Verbinden</string>

View file

@ -228,13 +228,13 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
<string name="smscommunicator">Communicateur SMS</string> <string name="smscommunicator">Communicateur SMS</string>
<string name="smscommunicator_allowednumbers">Numéros de tél autorisés</string> <string name="smscommunicator_allowednumbers">Numéros de tél autorisés</string>
<string name="smscommunicator_allowednumbers_summary">+XXXXXXXXXX;+YYYYYYYYYY</string> <string name="smscommunicator_allowednumbers_summary">+XXXXXXXXXX;+YYYYYYYYYY</string>
<string name="smscommunicator_bolusreplywithcode">Renvoyer le code %2$s pour injecter le bolus %1$.2fU</string> <string name="smscommunicator_bolusreplywithcode">Pour injecter le bolus de %1$.2f U, renvoyez le code %2$s</string>
<string name="smscommunicator_mealbolusreplywithcode">Pour injecter le bolus repas de %1$.2fU renvoyer le code %2$s</string> <string name="smscommunicator_mealbolusreplywithcode">Pour injecter le bolus repas de %1$.2f U, renvoyez le code %2$s</string>
<string name="smscommunicator_temptargetwithcode">Pour définir la Cible Temp %1$s renvoyer le code %2$s</string> <string name="smscommunicator_temptargetwithcode">Pour définir la cible temp %1$s, renvoyez le code %2$s</string>
<string name="smscommunicator_temptargetcancel">Pour annuler la Cible Temp renvoyer le code %1$s</string> <string name="smscommunicator_temptargetcancel">Pour annuler la cible temp, renvoyez le code %1$s</string>
<string name="smscommunicator_stopsmswithcode">Pour désactiver les commandes à distance SMS renvoyer le code %1$s.\n\nGardez à l\'esprit que vous ne pourrez le réactiver que directement à partir de l\'application AAPS du smartphone maître.</string> <string name="smscommunicator_stopsmswithcode">Pour désactiver les commandes à distance SMS, renvoyez le code %1$s.\n\nGardez à l\'esprit que vous ne pourrez le réactiver que directement à partir de l\'application AAPS du smartphone maître.</string>
<string name="smscommunicator_stoppedsms">Service de commande à distance SMS arrêté. Pour le réactiver, utilisez AAPS sur le smartphone maître.</string> <string name="smscommunicator_stoppedsms">Service de commande à distance SMS arrêté. Pour le réactiver, utilisez AAPS sur le smartphone maître.</string>
<string name="smscommunicator_calibrationreplywithcode">Renvoyer le code %2$s pour envoyer la calibration %1$.2f</string> <string name="smscommunicator_calibrationreplywithcode">Pour envoyer la calibration %1$.2f, renvoyez le code %2$s</string>
<string name="smscommunicator_bolusfailed">Échec du Bolus</string> <string name="smscommunicator_bolusfailed">Échec du Bolus</string>
<string name="smscommunicator_remotebolusmindistance_summary">Nombre minimum de minutes qu\'il doit y avoir entre un bolus distant et le suivant</string> <string name="smscommunicator_remotebolusmindistance_summary">Nombre minimum de minutes qu\'il doit y avoir entre un bolus distant et le suivant</string>
<string name="smscommunicator_remotebolusmindistance">Combien de minutes doit-il y avoir, au minimum, entre un bolus et le suivant</string> <string name="smscommunicator_remotebolusmindistance">Combien de minutes doit-il y avoir, au minimum, entre un bolus et le suivant</string>
@ -259,22 +259,22 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
<string name="smscommunicator_loopisenabled">La Boucle est activée</string> <string name="smscommunicator_loopisenabled">La Boucle est activée</string>
<string name="valuelimitedto">%1$.2f limité à %2$.2f</string> <string name="valuelimitedto">%1$.2f limité à %2$.2f</string>
<string name="valueoutofrange">La valeur %1$s est en dehors des limites</string> <string name="valueoutofrange">La valeur %1$s est en dehors des limites</string>
<string name="smscommunicator_pumpconnectwithcode">Pour connecter la pompe, répondre avec le code %1$s</string> <string name="smscommunicator_pumpconnectwithcode">Pour connecter la pompe, renvoyez le code %1$s</string>
<string name="smscommunicator_pumpconnectfail">Echec de la connexion pompe</string> <string name="smscommunicator_pumpconnectfail">Echec de la connexion pompe</string>
<string name="smscommunicator_pumpdisconnectwithcode">Pour déconnecter la pompe pendant %1d minutes, répondre avec le code %2$s</string> <string name="smscommunicator_pumpdisconnectwithcode">Pour déconnecter la pompe pendant %1d min, renvoyez le code %2$s</string>
<string name="smscommunicator_pumpdisconnected">Pompe déconnectée</string> <string name="smscommunicator_pumpdisconnected">Pompe déconnectée</string>
<string name="smscommunicator_reconnect">Pompe reconnectée</string> <string name="smscommunicator_reconnect">Pompe reconnectée</string>
<string name="smscommunicator_remotecommandnotallowed">La commande à distance n\'est pas autorisée</string> <string name="smscommunicator_remotecommandnotallowed">La commande à distance n\'est pas autorisée</string>
<string name="smscommunicator_remotebolusnotallowed">Bolus à distance non disponible. Réessayez plus tard.</string> <string name="smscommunicator_remotebolusnotallowed">Bolus à distance non disponible. Réessayez plus tard.</string>
<string name="smscommunicator_basalreplywithcode">Pour démarrer la basal de %1$.2f U/h pendant %2$d min, renvoyer le code %3$s</string> <string name="smscommunicator_basalreplywithcode">Pour démarrer la basal de %1$.2f U/h pendant %2$d min, renvoyez le code %3$s</string>
<string name="smscommunicator_profilereplywithcode">Pour changer le profil vers %1$s %2$d%%, renvoyer le code %3$s</string> <string name="smscommunicator_profilereplywithcode">Pour changer le profil vers %1$s %2$d%%, renvoyez le code %3$s</string>
<string name="smscommunicator_extendedreplywithcode">Pour démarrer le bolus étendu de %1$.2f U/h pendant %2$d min, renvoyer le code %3$s</string> <string name="smscommunicator_extendedreplywithcode">Pour démarrer le bolus étendu de %1$.2f U/h pendant %2$d min, renvoyez le code %3$s</string>
<string name="smscommunicator_carbsreplywithcode">Pour entrer %1$dg à %2$s renvoyer le code %3$s</string> <string name="smscommunicator_carbsreplywithcode">Pour entrer %1$dg à %2$s, renvoyez le code %3$s</string>
<string name="smscommunicator_basalpctreplywithcode">Pour démarrer la Basal %1$d%% pendant %2$d min, renvoyer le code %3$s</string> <string name="smscommunicator_basalpctreplywithcode">Pour démarrer la Basal %1$d%% pendant %2$d min, renvoyez le code %3$s</string>
<string name="smscommunicator_suspendreplywithcode">Envoyer le code %2$s pour suspendre la Boucle pour %1$d minutes</string> <string name="smscommunicator_suspendreplywithcode">Pour suspendre la boucle pendant %1$d min, renvoyez le code %2$s</string>
<string name="smscommunicator_loopresumereplywithcode">Pour reprendre la veuillez répondre avec le code %1$s</string> <string name="smscommunicator_loopresumereplywithcode">Pour reprendre la boucle, renvoyez le code %1$s</string>
<string name="smscommunicator_loopenablereplywithcode">Pour activer la boucle veuillez répondre avec le code %1$s</string> <string name="smscommunicator_loopenablereplywithcode">Pour activer la boucle, renvoyez le code %1$s</string>
<string name="smscommunicator_loopdisablereplywithcode">Pour désactiver la boucle veuillez répondre avec le code %1$s</string> <string name="smscommunicator_loopdisablereplywithcode">Pour désactiver la boucle, renvoyez le code %1$s</string>
<string name="smscommunicator_tempbasalset">Démarrage réussi pour %1$.2fU/h de basal temporaire pour %2$d min</string> <string name="smscommunicator_tempbasalset">Démarrage réussi pour %1$.2fU/h de basal temporaire pour %2$d min</string>
<string name="smscommunicator_extendedset">Le Bolus étendu %1$.2fU pendant %2$d min a commencé avec succès</string> <string name="smscommunicator_extendedset">Le Bolus étendu %1$.2fU pendant %2$d min a commencé avec succès</string>
<string name="smscommunicator_carbsset">%1$d g de glucides entrés avec succès</string> <string name="smscommunicator_carbsset">%1$d g de glucides entrés avec succès</string>
@ -282,15 +282,15 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
<string name="smscommunicator_tempbasalset_percent">Démarrage réussi pour %1$d%% de Basal temporaire pour %2$d min</string> <string name="smscommunicator_tempbasalset_percent">Démarrage réussi pour %1$d%% de Basal temporaire pour %2$d min</string>
<string name="smscommunicator_tempbasalfailed">Le démarrage du basal temporaire a échoué</string> <string name="smscommunicator_tempbasalfailed">Le démarrage du basal temporaire a échoué</string>
<string name="smscommunicator_extendedfailed">Le départ du Bolus étendu a échoué</string> <string name="smscommunicator_extendedfailed">Le départ du Bolus étendu a échoué</string>
<string name="smscommunicator_basalstopreplywithcode">Envoyer le code %1$s pour arrêter la Basal temporaire</string> <string name="smscommunicator_basalstopreplywithcode">Pour arrêter la basal temp, renvoyez le code %1$s</string>
<string name="smscommunicator_extendedstopreplywithcode">Pour arrêter le Bolus étendu, renvoyer le code %1$s</string> <string name="smscommunicator_extendedstopreplywithcode">Pour arrêter le bolus étendu, renvoyez le code %1$s</string>
<string name="smscommunicator_tempbasalcanceled">Basal temporaire annulé</string> <string name="smscommunicator_tempbasalcanceled">Basal temporaire annulé</string>
<string name="smscommunicator_extendedcanceled">Bolus étendu annulé</string> <string name="smscommunicator_extendedcanceled">Bolus étendu annulé</string>
<string name="smscommunicator_tempbasalcancelfailed">Echec de l\'annulation du basal temporaire</string> <string name="smscommunicator_tempbasalcancelfailed">Echec de l\'annulation du basal temporaire</string>
<string name="smscommunicator_extendedcancelfailed">Échec de l\'annulation du Bolus étendu</string> <string name="smscommunicator_extendedcancelfailed">Échec de l\'annulation du Bolus étendu</string>
<string name="smscommunicator_unknowncommand">Commande inconnue ou mauvaise réponse</string> <string name="smscommunicator_unknowncommand">Commande inconnue ou mauvaise réponse</string>
<string name="quickwizard">Assistant Rapide</string> <string name="quickwizard">Assistant Rapide</string>
<string name="quickwizardsettings">Paramètres de l\'Assistant Rapide</string> <string name="quickwizardsettings">Assistant Rapide</string>
<string name="overview_editquickwizard_buttontext">Texte du bouton :</string> <string name="overview_editquickwizard_buttontext">Texte du bouton :</string>
<string name="overview_editquickwizard_carbs">Glucides:</string> <string name="overview_editquickwizard_carbs">Glucides:</string>
<string name="overview_editquickwizard_valid">Valide:</string> <string name="overview_editquickwizard_valid">Valide:</string>
@ -306,7 +306,7 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
<string name="primefill">Amorcer/Remplir</string> <string name="primefill">Amorcer/Remplir</string>
<string name="fillwarning">Veuillez à ce que la quantité corresponde aux caractéristiques de votre cathéter !</string> <string name="fillwarning">Veuillez à ce que la quantité corresponde aux caractéristiques de votre cathéter !</string>
<string name="othersettings_title">Autres</string> <string name="othersettings_title">Autres</string>
<string name="fillbolus_title">Quantité d\'insuline par défaut pour Amorcer/Remplir</string> <string name="fillbolus_title">Insuline par défaut pour Amorcer/Remplir</string>
<string name="button1">Bouton 1</string> <string name="button1">Bouton 1</string>
<string name="button2">Bouton 2</string> <string name="button2">Bouton 2</string>
<string name="button3">Bouton 3</string> <string name="button3">Bouton 3</string>
@ -475,7 +475,7 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
<string name="xdripstatus">Barre d\'état pour xDrip (Montre)</string> <string name="xdripstatus">Barre d\'état pour xDrip (Montre)</string>
<string name="xdripstatus_shortname">xds</string> <string name="xdripstatus_shortname">xds</string>
<string name="wear_showbgi_title">Afficher lImpact Glycémie</string> <string name="wear_showbgi_title">Afficher lImpact Glycémie</string>
<string name="wear_showbgi_summary">Ajouter lIG sur la vue générale</string> <string name="wear_showbgi_summary">Ajouter lIGly sur la vue générale</string>
<string name="ns_noupload">Pas de téléchargement vers NS</string> <string name="ns_noupload">Pas de téléchargement vers NS</string>
<string name="ns_noupload_summary">Toutes les données envoyées à NS sont abandonnées. AAPS est connecté à NS mais aucun changement nest fait dans NS</string> <string name="ns_noupload_summary">Toutes les données envoyées à NS sont abandonnées. AAPS est connecté à NS mais aucun changement nest fait dans NS</string>
<string name="overview_extendedbolus_cancel_button">Annuler Bolus étendu</string> <string name="overview_extendedbolus_cancel_button">Annuler Bolus étendu</string>
@ -820,7 +820,7 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
<string name="high_temptarget_raises_sensitivity_summary"><![CDATA[Augmente la Sensibilité pour les cibles temporaires >= 100]]></string> <string name="high_temptarget_raises_sensitivity_summary"><![CDATA[Augmente la Sensibilité pour les cibles temporaires >= 100]]></string>
<string name="low_temptarget_lowers_sensitivity_title">Cible temp. basse abaisse la sensibilité</string> <string name="low_temptarget_lowers_sensitivity_title">Cible temp. basse abaisse la sensibilité</string>
<string name="low_temptarget_lowers_sensitivity_summary"><![CDATA[Diminue la Sensibilité pour les cibles temporaires < 100]]></string> <string name="low_temptarget_lowers_sensitivity_summary"><![CDATA[Diminue la Sensibilité pour les cibles temporaires < 100]]></string>
<string name="resistance_lowers_target_title">La résistance diminue la cible</string> <string name="resistance_lowers_target_title">Résistance diminue la cible</string>
<string name="resistance_lowers_target_summary">Quand une résistance est détectée, baisse de la glycémie cible</string> <string name="resistance_lowers_target_summary">Quand une résistance est détectée, baisse de la glycémie cible</string>
<string name="sensitivity_raises_target_title">Sensibilité augmente la cible</string> <string name="sensitivity_raises_target_title">Sensibilité augmente la cible</string>
<string name="sensitivity_raises_target_summary">Quand une sensibilité est détectée, augmentation de la glycémie cible</string> <string name="sensitivity_raises_target_summary">Quand une sensibilité est détectée, augmentation de la glycémie cible</string>

View file

@ -21,6 +21,7 @@
<string name="description_food">Visualizza i preset dei cibi definiti in Nightscout</string> <string name="description_food">Visualizza i preset dei cibi definiti in Nightscout</string>
<string name="description_insulin_rapid">Preset per insulina Humalog e NovoRapid / NovoLog</string> <string name="description_insulin_rapid">Preset per insulina Humalog e NovoRapid / NovoLog</string>
<string name="description_insulin_ultra_rapid">Preset per insulina Fiasp</string> <string name="description_insulin_ultra_rapid">Preset per insulina Fiasp</string>
<string name="description_insulin_lyumjev">Preset per insulina Lyumjev</string>
<string name="description_insulin_free_peak">Ti consente di definire il picco di attività dell\'insulina e deve essere utilizzato solo dagli utenti avanzati</string> <string name="description_insulin_free_peak">Ti consente di definire il picco di attività dell\'insulina e deve essere utilizzato solo dagli utenti avanzati</string>
<string name="description_loop">Attiva o disattiva l\'implementazione per la gestione del loop.</string> <string name="description_loop">Attiva o disattiva l\'implementazione per la gestione del loop.</string>
<string name="description_ns_client">Sincronizza i tuoi dati con Nightscout</string> <string name="description_ns_client">Sincronizza i tuoi dati con Nightscout</string>
@ -535,6 +536,7 @@
<string name="free_peak_oref">Free-Peak Oref</string> <string name="free_peak_oref">Free-Peak Oref</string>
<string name="rapid_acting_oref">Rapid-Acting Oref</string> <string name="rapid_acting_oref">Rapid-Acting Oref</string>
<string name="ultrarapid_oref">Ultra-Rapid Oref</string> <string name="ultrarapid_oref">Ultra-Rapid Oref</string>
<string name="lyumjev">Lyumjev</string>
<string name="dia_too_short">DIA di %1$f troppo breve - utilizzo %2$f.</string> <string name="dia_too_short">DIA di %1$f troppo breve - utilizzo %2$f.</string>
<string name="activate_profile">Attiva profilo</string> <string name="activate_profile">Attiva profilo</string>
<string name="invalid">NON VALIDO</string> <string name="invalid">NON VALIDO</string>

View file

@ -1213,4 +1213,5 @@
<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, bolusai, angliavandeniai, 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

@ -1,2 +1,168 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources></resources> <resources>
<string name="dia_whatmeansdia">Hva er riktig om DIA?</string>
<string name="dia_label_exam">Tema: Insulinvarighet (DIA)</string>
<string name="dia_minimumis3h">Minimumsverdien er 3 timer.</string>
<string name="dia_minimumis5h">Minimumsverdien er 5 timer.</string>
<string name="dia_hint1">https://androidaps.readthedocs.io/en/latest/EN/Configuration/Config-Builder.html?#insulin</string>
<string name="dia_meaningisequaltodiapump">Betydningen er lik DIA verdien angitt i pumpen.</string>
<string name="dia_valuemustbedetermined">Du må bestemme din individuelle verdi (men ikke mindre enn 5 timer).</string>
<string name="hypott_label">Tema: Hypo Temp Target</string>
<string name="hypott_whenhypott">Hva er hovedgrunnen til å velge en hypo TT?</string>
<string name="hypott_goinglow">Forhindre at BS går lavt hvis du allerede har en null temp gående.</string>
<string name="hypott_preventoversmb">Forhindre at AAPS skal doserer for mye insulin etter en BS stigning forårsaket av hurtigvirkende karbohydrater gitt for å behandle et lavt BS.</string>
<string name="hypott_hint1">https://androidaps.readthedocs.io/en/latest/EN/Usage/temptarget.html</string>
<string name="offlineprofile_whatprofile">Hvilken profiltype kan brukes og konfigureres offline?</string>
<string name="offlineprofile_label">Tema: Offline profil</string>
<string name="offlineprofile_nsprofile">NS profil kan brukes, men ikke konfigureres.</string>
<string name="offlineprofile_hint1">https://androidaps.readthedocs.io/en/latest/EN/Configuration/Config-Builder.html#profile</string>
<string name="pumpdisconnect_label">Tema: koble fra pumpen</string>
<string name="pumpdisconnect_whattodo">Hva bør gjøres innen du kobler fra pumpen?</string>
<string name="pumpdisconnect_letknow">Trykk på \"Koble fra pumpen\" slik at AAPS vet at ingen insulin vil bli levert.</string>
<string name="pumpdisconnect_suspend">Trykk \"Pause loop\" så AAPS stopper å loope mens pumpen er frakoblet.</string>
<string name="pumpdisconnect_dontchnage">Endre ikke på noe i AAPS, koble bare fra pumpen.</string>
<string name="pumpdisconnect_hint1">https://androidaps.readthedocs.io/en/latest/EN/Getting-Started/FAQ.html#other-settings</string>
<string name="objectives_label">Tema: AndroidAPS innstillinger</string>
<string name="objectives_howtosave">Hva er beste praksis for å ta backup av dine innstillinger?</string>
<string name="objectives_exportsettings">Eksportere dem lokalt fra Vedlikeholds menyen.</string>
<string name="objectives_storeelsewhere">Lagre den eksporterte filen til en annen plass som epost, Dropbox, Google Drive…</string>
<string name="objectives_doexportonstart">Eksporter dem rett etter installeringen av AAPS.</string>
<string name="objectives_doexportafterchange">Eksporter dem rett etter at du har gjort endringer i dine innstillinger.</string>
<string name="objectives_doexportafterobjective">Eksporter dem etter at du har fullført et nytt læringsmål.</string>
<string name="objectives_doexportafterfirtssettings">Eksporter dem etter at du har avsluttet dine første innstillinger.</string>
<string name="objectives_hint1">https://androidaps.readthedocs.io/en/latest/EN/Usage/ExportImportSettings.html</string>
<string name="objectives_hint2">https://androidaps.readthedocs.io/en/latest/EN/Getting-Started/FAQ.html#what-emergency-equipment-is-recommended-to-take-with-me</string>
<string name="noisycgm_label">Emne: CGM-målingern med støy</string>
<string name="noisycgm_whattodo">Hva bør gjøres hvis CGM data har støy?</string>
<string name="nothing">Ingenting, AAPS vil håndtere det.</string>
<string name="noisycgm_pause">Deaktiver loop for å unngå overdosering.</string>
<string name="noisycgm_replacesensor">Bytt CGM sensor.</string>
<string name="noisycgm_turnoffphone">Slå av telefonen.</string>
<string name="noisycgm_hint1">https://androidaps.readthedocs.io/en/latest/EN/Usage/Smoothing-Blood-Glucose-Data-in-xDrip.html#smoothing-blood-glucose-data</string>
<string name="noisycgm_checksmoothing">Kontroller at CGM appen din jevner ut BS målinger.</string>
<string name="exercise_label">Tema: Trening</string>
<string name="exercise_whattodo">Hvordan kan du hjelpe systemet med å håndtere trening?</string>
<string name="exercise_setactivitytt">Ved å bruke funksjonen for temp target/mål.</string>
<string name="exercise_switchprofilebelow100">Gjør et profilbytte til under 100%.</string>
<string name="exercise_switchprofileabove100">Gjør et profilbytte til over 100%.</string>
<string name="exercise_stoploop">Stopp loop.</string>
<string name="exercise_doitbeforestart">Angi et \"aktivitet\" temp mål før du begynner treningen.</string>
<string name="exercise_afterstart">Å angi et \"aktivitet\" temp mål etter at du har startet treningen fører til dårligere resultater enn om man startet før.</string>
<string name="exercise_hint1">https://androidaps.readthedocs.io/en/latest/EN/Usage/temptarget.html#active temp-target</string>
<string name="suspendloop_label">Tema: Stanset/pauset loop</string>
<string name="suspendloop_doigetinsulin">Får jag insulin når loop er stanset/pauset?</string>
<string name="suspendloop_yes">Ja, basal insulin vil fortsatt bli levert.</string>
<string name="suspendloop_no">Nei, levering av insulin er stanset.</string>
<string name="basaltest_label">Tema: Basal, ISF og IC testing</string>
<string name="basaltest_when">Når bør jeg validere basal, ISF og IC verdier?</string>
<string name="basaltest_beforeloop">Før jeg begynner å loope.</string>
<string name="basaltest_havingregularhypo">Om du ofte opplever lave BS verdier.</string>
<string name="basaltest_havingregularhyper">Om du ofte opplever høye BS verdier.</string>
<string name="basaltest_hint1">https://androidaps.readthedocs.io/en/latest/EN/Getting-Started/FAQ.html#androidaps-settings</string>
<string name="prerequisites_label">Tema: Forutsetninger før oppstart</string>
<string name="prerequisites_what">Hva trenger jeg?</string>
<string name="prerequisites_determinedcorrectprofile">Validert profil informasjon (basal, IC, ISF, DIA).</string>
<string name="prerequisites_computer">En datamaskin for å lage en APK.</string>
<string name="prerequisites_phone">En telefon som støttes.</string>
<string name="prerequisites_car">En bil.</string>
<string name="prerequisites_nightscout">Nightscout for å klare læringsmålene.</string>
<string name="prerequisites_tidepoolaccount">En Tidepool konto.</string>
<string name="prerequisites_googleaccount">En Google konto.</string>
<string name="prerequisites_githubaccount">En Github konto.</string>
<string name="prerequisites_beanandroiddeveloper">Erfaring med Android programmering.</string>
<string name="prerequisites_own670g">En MiniMed 670G pumpe.</string>
<string name="prerequisites_hint1">https://androidaps.readthedocs.io/en/latest/EN/Module/module.html</string>
<string name="prerequisites_smartwatch">En smartklokke.</string>
<string name="prerequisites_supportedcgm">En CGM som støttes.</string>
<string name="update_label">Tema: Oppdatering av AndroidAPS</string>
<string name="whatistrue">Hva er sant?</string>
<string name="update_git">Du må ha Git installert.</string>
<string name="update_asap">Oppdater så snart den nye versjonen er publisert og du har nok tid til å gjøre det.</string>
<string name="update_keys">Du bør bruke de samme signeringsnøklene.</string>
<string name="update_neverupdate">Aldri oppdater hvis systemet fungerer bra.</string>
<string name="update_askfriend">Spør en venn om den nye APK filen.</string>
<string name="update_hint1">https://androidaps.readthedocs.io/en/latest/EN/Installing-AndroidAPS/Update-to-new-version.html#update-to-a-new-version-or-branch</string>
<string name="troubleshooting_label">Tema: Feilsøking</string>
<string name="troubleshooting_wheretoask">Hvor skal jeg lete etter hjelp?</string>
<string name="troubleshooting_fb">Bli medlem av AndroidAPS Facebook gruppen.</string>
<string name="troubleshooting_wiki">Les AndroidAPS dokumentasjonen.</string>
<string name="troubleshooting_gitter">Besøk AndroidAPS Gitter rommet.</string>
<string name="troubleshooting_googlesupport">Besøk AndroidAPS Google support</string>
<string name="troubleshooting_yourendo">Snakk med din diabeteslege.</string>
<string name="troubleshooting_hint1">https://androidaps.readthedocs.io/en/latest/EN/Installing-AndroidAPS/Update-to-new-version.html#troubleshooting</string>
<string name="troubleshooting_hint2">https://www.facebook.com/groups/AndroidAPSUsers/</string>
<string name="troubleshooting_hint3">https://gitter.im/MilosKozak/AndroidAPS</string>
<string name="insulin_label">Tema: Insulin plugin</string>
<string name="insulin_ultrarapid">Hvilke typer insulin kan brukes sammen med insulinprofilen \"Ultra-Rapid-Oref\"?</string>
<string name="insulin_fiasp">Fiasp®</string>
<string name="insulin_novorapid">Novorapid®</string>
<string name="insulin_humalog">Humalog®</string>
<string name="insulin_actrapid">Actrapid®</string>
<string name="insulin_hint1">https://androidaps.readthedocs.io/en/latest/EN/Configuration/Config-Builder.html#insulin</string>
<string name="sensitivity_label">Tema: Sensitivitet plugin</string>
<string name="sensitivity_which">Hvilken sensitivitetsalgoritme har et konfigurerbart tidsintervall?</string>
<string name="sensitivity_hint1">https://androidaps.readthedocs.io/en/latest/EN/Configuration/Sensitivity-detection-and-COB.html</string>
<string name="sensitivityuam_which">Hvilken sensitivitets plugin må anvendes for å bruke UAM funksjonen?</string>
<string name="wrongcarbs_label">Tema: Feilaktig registrering av karbohydrater</string>
<string name="wrongcarbs_whattodo">Hva skal du gjøre hvis du har gjort en feilaktig registrering av karbohydrater?</string>
<string name="wrongcarbs_treatmentstab">I Behandlinger, slett den feilaktige registreringen og legg inn karbohydrater på nytt.</string>
<string name="wrongcarbs_addfakeinsulin">Legg inn falsk insulin ved å bruke prime/fyll funksjonen</string>
<string name="extendedcarbs_label">Tema: Mat med fett og protein</string>
<string name="extendedcarbs_handling">Hva skal du gjøre om maten inneholder store mengder fett og/eller proteiner?</string>
<string name="extendedcarbs_useextendedcarbs">Regn om fett og proteiner til karbohydrater og bruk eKarbo funksjonen.</string>
<string name="extendedcarbs_add">Regn om fett og proteiner til karbohydrater og legg det til bolus beregningen.</string>
<string name="extendedcarbs_useextendedbolus">Bruk forlenget bolus til å dekke inntaket av fett og proteiner.</string>
<string name="extendedcarbs_hint1">https://androidaps.readthedocs.io/en/latest/EN/Usage/Extended-Carbs.html</string>
<string name="nsclient_label">Tema: Fjernovervåking</string>
<string name="nsclient_howcanyou">Hvordan kan du overvåke AAPS for ditt barn på avstand?</string>
<string name="nsclient_nightscout">Ved å bruke Nightscout.</string>
<string name="nsclient_dexcomfollow">Dexcom Follow app hvis du bruker Dexcom appen (bare for BS).</string>
<string name="nsclient_dexcomfollowxdrip">Dexcom Follow hvis du bruker xDrip appen.</string>
<string name="nsclient_xdripfollower">xDrip app kjører i følger-modus.</string>
<string name="nsclient_looponiphone">Loop app på iPhone.</string>
<string name="nsclient_spikeiphone">Spike app på iPhone.</string>
<string name="nsclient_hint1">https://androidaps.readthedocs.io/en/latest/EN/Children/Children.html</string>
<string name="isf_label_exam">Tema: Insulin sensitivitetsfaktor (ISF)</string>
<string name="isf_increasingvalue">Høyere ISF verdier fører til mindre insulintilførsel når AAPS korrigerer for høyt BS.</string>
<string name="isf_decreasingvalue">Lavere ISF verdier fører til mindre insulintilførsel når AAPS korrigerer for høyt BS.</string>
<string name="isf_noeffect">Endring av ISF verdier har ingen effekt på mengden insulin som tilføres når AAPS korrigerer høyt BS.</string>
<string name="isf_preferences">Du må angi ISF i Innstillinger.</string>
<string name="isf_profile">Å endre ISF verdien i din profil er tilstrekkelig for å ta i bruk endringen.</string>
<string name="isf_hint1">https://androidaps.readthedocs.io/en/latest/EN/Getting-Started/FAQ.html#insulin-sensitivity-factor-isf-mmol-l-u-or-mg-dl-u</string>
<string name="isf_hint2">https://androidaps.readthedocs.io/en/latest/EN/Usage/Profiles.html</string>
<string name="ic_label_exam">Tema: Insulin-karbo (IK) forholdet</string>
<string name="ic_increasingvalue">Høyere IC forhold fører til at mindre insulin leveres for en gitt mengde karbohydrater.</string>
<string name="ic_decreasingvalue">Lavere IC forhold fører til at mindre insulin leveres for en gitt mengde karbohydrater.</string>
<string name="ic_noeffect">Hvis du har 0 COB, vil endring av IC forholdet føre til endring av insulinmengden som trengs for å korrigere ditt BS nivå.</string>
<string name="ic_different">IC vil være forskjellig hvis du regner en skive brød som 10g eller 12g.</string>
<string name="ic_meaning">IC betyr: Hvor mange brødenheter som dekkes av 1E insulin.</string>
<string name="ic_hint1">https://androidaps.readthedocs.io/en/latest/EN/Getting-Started/FAQ.html#carbohydrate-to-insulin-ratio-cr-g-u</string>
<string name="profileswitch_label">Tema: Profilbytte</string>
<string name="profileswitch_pctwillchange"> Når man angir 90% i profilbytte…</string>
<string name="profileswitch_basalhigher">Basal vil være 10% høyere.</string>
<string name="profileswitch_basallower">Basal vil være 10% lavere.</string>
<string name="profileswitch_ichigher">IC verdien vil være 10% høyere.</string>
<string name="profileswitch_iclower">IC verdien vil være 10% lavere.</string>
<string name="profileswitch_isfhigher">ISF verdien vil være 10% høyere.</string>
<string name="profileswitch_isflower">ISF verdien vil være 10% lavere.</string>
<string name="profileswitch_overall">Du vil få omtrent 10% mindre insulin totalt.</string>
<string name="profileswitch_targethigher">Mål BS vil bli 10% høyere.</string>
<string name="profileswitch_targetlower">Mål BS vil bli 10% lavere.</string>
<string name="profileswitch_targetbottom">Bare laveste BS grenseverdi vil bli 10% lavere.</string>
<string name="profileswitch_hint1" formatted="false">https://androidaps.readthedocs.io/en/latest/EN/Usage/Profiles.html?highlight=profile%20switch#profile-switch</string>
<string name="profileswitchtime_iwant">Hvis du våkner 1t tidligere enn normalt, hvordan skal du varsle AAPS om endringen i døgnrytmen din?</string>
<string name="profileswitchtime_1">Gjøre et profilbytte med en tidsforskyvning på 1t</string>
<string name="profileswitchtime__1">Gjøre et profil bytte med en tidsforskyvning på -1t</string>
<string name="profileswitchtime_hint1">https://androidaps.readthedocs.io/en/latest/EN/Usage/Profiles.html?highlight=profile%20switch#timeshift</string>
<string name="profileswitchtime_60">Gjør et profilbytte med en tidsforskyvning på 60</string>
<string name="profileswitchtime__60">Gjør et profilbytte med en tidsforskyvning på -60</string>
<string name="basalhelp_hint1">https://androidaps.readthedocs.io/en/latest/EN/Module/module.html#good-individual-dosage-algorithm-for-your-diabetes-therapy</string>
<string name="basalhelp_label">Tema: Hjelp med basaldoser</string>
<string name="basalhelp_where">Hvor finner du hjelp for basaldoser m. m.</string>
<string name="basalhelp_diabetesteam">Ditt diabetesteam</string>
<string name="basalhelp_google">Google</string>
<string name="basalhelp_facebook">Facebook</string>
<string name="other_medication_label">Annen medisinering</string>
<string name="other_medication_text">AAPS senker basalen for å øke glukosemengden i blodet. Medisiner av typen SGLT2-hemmere (glifloziner) kan motvirke den forventede økningen i BS og som kan resultere i livsfarlig insulinmangel eller ketoacidose (DKA). \nVanlige merker i markedet: Invokana®, Forxiga®, Jardiance®, Steglatro®, Suglat®, Apleway®, Deberza®, Synjardy®, Vokanamet®, Xigduo®.\n\n
Jeg lover herved å ALDRI ta slike medisiner samtidig som jeg bruker AAPS, eller jeg kommer til å ta en pause i looping så lenge jeg bruker slik medisin.</string>
</resources>

View file

@ -1,2 +1,29 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources></resources> <resources>
<string name="alert_r1_code">Påminnelses R1</string>
<string name="alert_r2_code">Påminnelse R2</string>
<string name="alert_r3_code">Påminnelse R3</string>
<string name="alert_r4_code">Påminnelse R4</string>
<string name="alert_r7_code">Påminnelse R7</string>
<string name="alert_w31_code">Advarsel W31</string>
<string name="alert_w32_code">Advarsel W32</string>
<string name="alert_w33_code">Advarsel W33</string>
<string name="alert_w34_code">Advarsel W34</string>
<string name="alert_w36_code">Advarsel W36</string>
<string name="alert_w38_code">8Advarsel W38</string>
<string name="alert_w39_code">Advarsel W39</string>
<string name="alert_m20_code">Vedlikehold M20</string>
<string name="alert_m21_code">Vedlikehold M21</string>
<string name="alert_m22_code">Vedlikehold M22</string>
<string name="alert_m23_code">Vedlikehold M23</string>
<string name="alert_m24_code">Vedlikehold M24</string>
<string name="alert_m25_code">Vedlikehold M25</string>
<string name="alert_m26_code">Vedlikehold M26</string>
<string name="alert_m27_code">Vedlikehold M27</string>
<string name="alert_m28_code">Vedlikehold M28</string>
<string name="alert_m29_code">Vedlikehold M29</string>
<string name="alert_m30_code">Vedlikehold M30</string>
<string name="alert_e6_code">Feil E6</string>
<string name="alert_e10_code">Feil E10</string>
<string name="alert_e13_code">Feil E13</string>
</resources>

View file

@ -1,2 +1,24 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources></resources> <resources>
<string name="alert_r7_description"><![CDATA[Mengde: <b>%1$d%%</b>\nVarighet: <b>%2$s t</b>]]></string>
<string name="alert_w31_description"><![CDATA[Ampullens innhold: <b>%1$s E</b>]]></string>
<string name="alert_w32_description">Bytt batteri.</string>
<string name="alert_w33_description">Angi tidspunkt/dato.</string>
<string name="alert_w34_description">Kontakt Accu-Chek kundestøtte.</string>
<string name="alert_w36_description"><![CDATA[Mengde: <b>%1$d%%</b><br/>\nVarighet: <b>%2$s t</b>]]></string>
<string name="alert_w38_description"><![CDATA[Angitt: <b>%1$s E</b><br/>Levert: <b>%2$s E</b>]]></string>
<string name="alert_m20_description">Sett inn ampulle.</string>
<string name="alert_m21_description">Bytt ampulle.</string>
<string name="alert_m22_description">Bytt batteri.</string>
<string name="alert_m23_description">Kontroller pumpestatus.</string>
<string name="alert_m24_description">Bytt infusjonssett.</string>
<string name="alert_m25_description">Kontakt Accu-Chek kundestøtte.</string>
<string name="alert_m26_description">Bytt ampulle.</string>
<string name="alert_m27_description">Restart nedlasting av data.</string>
<string name="alert_m28_description">Kontroller pumpestatus.</string>
<string name="alert_m29_description">Angi batteritype.</string>
<string name="alert_m30_description">Angi ampulle type.</string>
<string name="alert_e6_description">Bytt batteri og ampulle.</string>
<string name="alert_e10_description">Bytt ampulle.</string>
<string name="alert_e13_description">Bytt språk.</string>
</resources>

View file

@ -1,2 +1,29 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources></resources> <resources>
<string name="alert_r1_title">Tilfør bolus</string>
<string name="alert_r2_title">Manglende bolus</string>
<string name="alert_r3_title">Alarmklokke</string>
<string name="alert_r4_title">Bytt infusjonssett</string>
<string name="alert_r7_title">Midlertidig basaldose fullført</string>
<string name="alert_w31_title">Lavt ampulleinnhold</string>
<string name="alert_w32_title">Batteri lavt</string>
<string name="alert_w33_title">Ugyldig klokkeslett/dato</string>
<string name="alert_w34_title">Slutt på garanti</string>
<string name="alert_w36_title">Midlertidig basaldose avbrutt</string>
<string name="alert_w38_title">Bolus avbrutt</string>
<string name="alert_w39_title">Lånetidsadvarsel</string>
<string name="alert_m20_title">Ampulle ikke satt inn</string>
<string name="alert_m21_title">Ampulle tom</string>
<string name="alert_m22_title">Batteri tomt</string>
<string name="alert_m23_title">Automatisk av - pumpe stoppet</string>
<string name="alert_m24_title">Tilstopping</string>
<string name="alert_m25_title">Lånetid over - drift stoppes</string>
<string name="alert_m26_title">Bytte av ampulle ikke fullført</string>
<string name="alert_m27_title">Nedlasting av data mislyktes</string>
<string name="alert_m28_title">Tidsavbrudd for pausemodus</string>
<string name="alert_m29_title">Batteritype ikke angitt</string>
<string name="alert_m30_title">Ampulletype ikke angitt</string>
<string name="alert_e6_title">Mekanisk feil</string>
<string name="alert_e10_title">Tilbakespolingsfeil</string>
<string name="alert_e13_title">Språkfeil</string>
</resources>

View file

@ -1,2 +1,14 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources></resources> <resources>
<string name="connection_failed">Tilkobling mislyktes</string>
<string name="connection_lost">Mistet forbindelsen</string>
<string name="pairing_rejected">Sammenkobling avvist</string>
<string name="socket_creation_failed">Mislykket opprettelse av socket tilkobling</string>
<string name="timeout">Tidsavbrudd</string>
<string name="maximum_number_of_bolus_type_already_running">Maksimalt antall bolusdoser som allerede går</string>
<string name="no_active_tbr_to_cancel">Ingen aktiv midlertidig basaldose å kansellere</string>
<string name="no_active_tbr_to_change">Ingen aktiv midlertidig basaldose å endre</string>
<string name="no_such_bolus_to_cancel">Ingen slik bolus til å avbryte</string>
<string name="pump_already_in_that_state_exception">Pumpe allerede i den tilstanden</string>
<string name="run_mode_not_allowed">Kjør modus ikke tillatt</string>
</resources>

View file

@ -1,2 +1,69 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources></resources> <resources>
<string name="objectives_button_back">Tilbake</string>
<string name="objectives_button_start">Start</string>
<string name="objectives_button_verify">Kontroller</string>
<string name="nth_objective">%1$d. Læringsmål</string>
<string name="objectivenotstarted">Læringsmål %1$d ikke startet</string>
<string name="objectivenotfinished">Læringsmål %1$d er ikke ferdig</string>
<string name="objectives_0_objective">Stiller inn utseende og overvåking for analyser av basaler og forholdstall</string>
<string name="objectives_0_gate">Kontroller at BS er tilgjengelig i Nightscout og at insulindata fra pumpen lastes opp</string>
<string name="objectives_openloop_objective">Starter med åpen loop</string>
<string name="objectives_openloop_gate">Kjør i \"Åpen Loop\" modus i noen dager og aktiver flere temp basaler. Konfigurer og aktiver flere midlertidige og default temp BS mål (f.eks. for Aktivitet eller Hypo behandling)</string>
<string name="objectives_maxbasal_objective">Forstå din åpen loop, inkludert den temp basal anbefalingen</string>
<string name="objectives_maxbasal_gate">Ut ifra hva du har erfart og lært, avgjør hva din max basal skal være og still den inn i både pumpen og AAPS innstillinger</string>
<string name="objectives_maxiobzero_objective">Begynn å bruk lukket loop med aktivert funksjon for stopping av insulin ved lavt BS</string>
<string name="objectives_maxiobzero_gate">Aktiver closed loop med max IOB = 0 i noen dager uten for mange episoder hvor systemet stopper insulintilførsel på grunn av lavt BS</string>
<string name="objectives_maxiob_objective">Finjustering av lukket loop med gradvis økende maks IOB over 0 og redusering av BS målverdi</string>
<string name="objectives_maxiob_gate">Kjør i noen dager og opplev minst en natt uten lavt BS alarmer før du begynner å redusere målverdi for BS</string>
<string name="objectives_autosens_objective">Juster om nødvendig basal og forholdstall, og deretter aktiverer du autosens</string>
<string name="objectives_autosens_gate">1 uke vellykket looping på dagtid hvor alle måltider (KH) angis</string>
<string name="objectives_ama_objective">Aktiver ekstra funksjoner for bruk på dagtid, slik som avansert måltidsassistent (AMA)</string>
<string name="objectives_smb_objective">Aktiver ekstra funksjoner for bruk på dagtid, slik som SMB (Super Micro Bolus)</string>
<string name="objectives_auto_objective">Aktiver Automatisering</string>
<string name="objectives_smb_gate">Du må lese wiki og øke din maxIOB for å få SMB til å fungere. Et godt utgangspunkt er maxIOB = gjennomsnittlig måltidsbolus + 3*max daglig basal</string>
<string name="objectives_auto_gate">Les dokumentasjonen på hvordan Automatisering virker. Lag din første enkle regel. I stedet for å utføre en behandling, få AAPS AAPS til å bare vise en melding. Kun når du er sikker på at Automatisering virker riktig kan du erstatte meldingsvarselet med en behandlingskommando. (https://androidaps.readthedocs.io/en/latest/EN/Usage/Automation.html)</string>
<string name="objectives_bgavailableinns">BS tilgjengelig i NS</string>
<string name="objectives_pumpstatusavailableinns">Pumpe status tilgjengelig i NS</string>
<string name="objectives_manualenacts">Manuell kommando</string>
<string name="accomplished">Utført: %1$s</string>
<string name="objectives_usage_objective">Lær hvordan du kontrollerer AndroidAPS</string>
<string name="objectives_usage_gate">Utfør forskjellige handlinger i AndroidAPS</string>
<string name="objectives_useprofileswitch">Angi profil 90% for 10 min (langt-trykk på profilnavn i Oversikt)</string>
<string name="objectives_usedisconnectpump">Simuler dusjing. Frakoble pumpen i 1t (langt trykk på Åpen Loop)</string>
<string name="objectives_usereconnectpump">... og koble til igjen på samme måte</string>
<string name="objectives_usetemptarget">Opprett egendefinerte midlertidige BS mål med 10 min varighet (langt-trykk på gjeldende mål)</string>
<string name="objectives_useactions">I Konfigurasjonsverktøyet aktiverer du Hendelser plugin, og gjør det synlig og viser innholdet fra menyen i øverste linje</string>
<string name="objectives_useloop">Vis innholdet i Loop plugin</string>
<string name="objectives_usescale">Test skaleringsfunksjonen ved et langt trykk på BS grafen</string>
<string name="objectives_button_enter">Angi</string>
<string name="enter_code_obtained_from_developers_to_bypass_the_rest_of_objectives">Hvis du har minst 3 måneder erfaring med andre lukkede loop systemer kan du kanskje kvalifisere for en kode som lar deg hoppe over Læringsmålene. Se https://androidaps.readthedocs.io/en/latest/EN/Usage/Objectives.html#skip-objectives for mer detaljer.</string>
<string name="codeaccepted">Kode akseptert</string>
<string name="codeinvalid">Kode ugyldig</string>
<string name="objectives_exam_objective">Bevis kunnskapen din</string>
<string name="objectives_exam_gate">Studer og besvare spørsmålene riktig</string>
<string name="answerdisabledto">Besvarelser deaktivert til: %1$s</string>
<string name="wronganswer">Feil svar!</string>
<string name="unfinshed_button">Neste uferdig</string>
<string name="requestcode">Be om kode: %1$s</string>
<string name="objectives_hint">(kontroller alle riktige svar)</string>
<string name="disconnectpump_hint" formatted="false">https://androidaps.readthedocs.io/en/latest/EN/Getting-Started/FAQ.html#what-to-do-when-taking-a-shower-or-bath</string>
<string name="usetemptarget_hint" formatted="false">https://androidaps.readthedocs.io/en/latest/EN/Getting-Started/Screenshots.html#the-homescreen</string>
<string name="useaction_hint" formatted="false">https://androidaps.readthedocs.io/en/latest/EN/Getting-Started/Screenshots.html#config-builder</string>
<string name="usescale_hint" formatted="false">https://androidaps.readthedocs.io/en/latest/EN/Getting-Started/Screenshots.html#the-homescreen</string>
<string name="notconnected">Ikke koblet til Internett</string>
<string name="failedretrievetime">Feil ved henting av tid</string>
<string name="requirementnotmet">Læringmålets krav er ikke oppfylt</string>
<plurals name="objective_days">
<item quantity="one">%1$d dag</item>
<item quantity="other">%1$d dager</item>
</plurals>
<plurals name="objective_hours">
<item quantity="one">%1$d time</item>
<item quantity="other">%1$d timer</item>
</plurals>
<plurals name="objective_minutes">
<item quantity="one">%1$d minutt</item>
<item quantity="other">%1$d minutter</item>
</plurals>
</resources>

File diff suppressed because it is too large Load diff

View file

@ -21,6 +21,7 @@
<string name="description_food">Wyświetla dane posiłków zdefiniowanych w Nightscout</string> <string name="description_food">Wyświetla dane posiłków zdefiniowanych w Nightscout</string>
<string name="description_insulin_rapid">Profil insulinowy dla Humalog i Novorapid / NovoLog</string> <string name="description_insulin_rapid">Profil insulinowy dla Humalog i Novorapid / NovoLog</string>
<string name="description_insulin_ultra_rapid">Profil insulinowy dla Fiasp</string> <string name="description_insulin_ultra_rapid">Profil insulinowy dla Fiasp</string>
<string name="description_insulin_lyumjev">Profil insulinowy dla Lyumjev</string>
<string name="description_insulin_free_peak">Pozwala na określenie czasu wartości szczytowej działania insuliny i powinno być używane tylko przez zaawansowanych użytkowników</string> <string name="description_insulin_free_peak">Pozwala na określenie czasu wartości szczytowej działania insuliny i powinno być używane tylko przez zaawansowanych użytkowników</string>
<string name="description_loop">Włącz lub wyłącz działanie pętli.</string> <string name="description_loop">Włącz lub wyłącz działanie pętli.</string>
<string name="description_ns_client">Synchronizuje twoje dane z Nightscout</string> <string name="description_ns_client">Synchronizuje twoje dane z Nightscout</string>
@ -156,6 +157,7 @@
<string name="overview_tempbasal_button">BazaTymczasowa</string> <string name="overview_tempbasal_button">BazaTymczasowa</string>
<string name="overview_extendedbolus_button">Bolus Przedłużony</string> <string name="overview_extendedbolus_button">Bolus Przedłużony</string>
<string name="configbuilder_nightscoutversion_label">Wersja Nightscout:</string> <string name="configbuilder_nightscoutversion_label">Wersja Nightscout:</string>
<string name="missing_carbs">Brakuje %1$d g</string>
<string name="exported">Ustawienia wyeksportowane</string> <string name="exported">Ustawienia wyeksportowane</string>
<string name="export_to">Eksportuj ustawienia do</string> <string name="export_to">Eksportuj ustawienia do</string>
<string name="import_from">Importuj ustawienia z</string> <string name="import_from">Importuj ustawienia z</string>
@ -171,6 +173,11 @@
<string name="password_preferences_decrypt_prompt">Zostaniesz poproszony o hasło główne, które jest potrzebne do odszyfrowania zaimportowanych preferencji.</string> <string name="password_preferences_decrypt_prompt">Zostaniesz poproszony o hasło główne, które jest potrzebne do odszyfrowania zaimportowanych preferencji.</string>
<string name="preferences_export_canceled">Eksportowanie anulowane! Ustawienia NIE zostały wyeksportowane!</string> <string name="preferences_export_canceled">Eksportowanie anulowane! Ustawienia NIE zostały wyeksportowane!</string>
<string name="preferences_import_canceled">Import anulowany! Ustawienia NIE zostały zaimportowane!</string> <string name="preferences_import_canceled">Import anulowany! Ustawienia NIE zostały zaimportowane!</string>
<string name="preferences_import_impossible">Nie można zaimportować ustawień!</string>
<string name="goto_main_try_again">Wróć do ekranu głównego i spróbuj ponownie.</string>
<string name="old_master_password">Stare hasło główne</string>
<string name="different_password_used">Ten plik zaszyfrowano innym hasłem głównym. Podaj te stare hasło główne którego używałeś do eksportu, aby odszyfrować plik.</string>
<string name="master_password_will_be_replaced">W efekcie udanego importu bieżące hasło główne ZOSTANIE ZASTĄPIONE starym hasłem głównym z importowanych ustawień!</string>
<string name="preferences_import_list_title">Wybierz plik do zaimportowania</string> <string name="preferences_import_list_title">Wybierz plik do zaimportowania</string>
<string name="check_preferences_before_import">Proszę sprawdzić ustawienia przed importem:</string> <string name="check_preferences_before_import">Proszę sprawdzić ustawienia przed importem:</string>
<string name="check_preferences_cannot_import">Ustawienia nie mogą być zaimportowane!</string> <string name="check_preferences_cannot_import">Ustawienia nie mogą być zaimportowane!</string>
@ -232,6 +239,10 @@
<string name="smscommunicator_remotebolusmindistance_summary">Minimalna liczba minut która musi upłynąć pomiędzy jednym a drugim zdalnie podawanym bolusem</string> <string name="smscommunicator_remotebolusmindistance_summary">Minimalna liczba minut która musi upłynąć pomiędzy jednym a drugim zdalnie podawanym bolusem</string>
<string name="smscommunicator_remotebolusmindistance">Ile co najmniej minut musi upłynąć pomiędzy jednym a drugim bolusem</string> <string name="smscommunicator_remotebolusmindistance">Ile co najmniej minut musi upłynąć pomiędzy jednym a drugim bolusem</string>
<string name="smscommunicator_remotebolusmindistance_caveat">Dla twojego bezpieczeństwa, aby zmienić to ustawienie musisz dodać co najmniej 2 numery telefonów.</string> <string name="smscommunicator_remotebolusmindistance_caveat">Dla twojego bezpieczeństwa, aby zmienić to ustawienie musisz dodać co najmniej 2 numery telefonów.</string>
<string name="bolusdelivered">Bolus %1$.2f U podany prawidłowo</string>
<string name="bolusrequested">Zamierzam podać %1$.2f U</string>
<string name="smscommunicator_bolusdelivered">Bolus %1$.2f U podany prawidłowo</string>
<string name="smscommunicator_mealbolusdelivered">Pomyślnie podano %1$.2f U bolusa posiłkowego</string>
<string name="smscommunicator_mealbolusdelivered_tt">Cel %1$s na %2$d minut</string> <string name="smscommunicator_mealbolusdelivered_tt">Cel %1$s na %2$d minut</string>
<string name="smscommunicator_tt_set">Pomyślnie ustawiono cel %1$s na %2$d minuty</string> <string name="smscommunicator_tt_set">Pomyślnie ustawiono cel %1$s na %2$d minuty</string>
<string name="smscommunicator_tt_canceled">Pomyślnie anulowano cel tymczasowy</string> <string name="smscommunicator_tt_canceled">Pomyślnie anulowano cel tymczasowy</string>
@ -255,7 +266,9 @@
<string name="smscommunicator_reconnect">Pompa ponownie podłączona</string> <string name="smscommunicator_reconnect">Pompa ponownie podłączona</string>
<string name="smscommunicator_remotecommandnotallowed">Zdalne komendy nie są dozwolone</string> <string name="smscommunicator_remotecommandnotallowed">Zdalne komendy nie są dozwolone</string>
<string name="smscommunicator_remotebolusnotallowed">Bolus zdalny niedostępny. Spróbuj ponownie później.</string> <string name="smscommunicator_remotebolusnotallowed">Bolus zdalny niedostępny. Spróbuj ponownie później.</string>
<string name="smscommunicator_basalreplywithcode">Aby rozpocząć bazę %1$.2f U/h przez %2$d min. odpowiedz kodem %3$s</string>
<string name="smscommunicator_profilereplywithcode">Aby przełączyć profil na %1$s %2$d%% odpowiedz kodem %3$s</string> <string name="smscommunicator_profilereplywithcode">Aby przełączyć profil na %1$s %2$d%% odpowiedz kodem %3$s</string>
<string name="smscommunicator_extendedreplywithcode">Aby rozpocząć bolus przedłużony %1$.2f U przez %2$d min. odpowiedz kodem %3$s</string>
<string name="smscommunicator_carbsreplywithcode">Aby wprowadzić %1$dg o %2$s odeślij w SMS kod %3$s</string> <string name="smscommunicator_carbsreplywithcode">Aby wprowadzić %1$dg o %2$s odeślij w SMS kod %3$s</string>
<string name="smscommunicator_basalpctreplywithcode">Aby rozpocząć bolus przedłużony %1$d%% przez %2$d min. odpowiedz kodem %3$s</string> <string name="smscommunicator_basalpctreplywithcode">Aby rozpocząć bolus przedłużony %1$d%% przez %2$d min. odpowiedz kodem %3$s</string>
<string name="smscommunicator_suspendreplywithcode">Aby wstrzymać pętle na %1$d minut odpowiedz kodem %2$s</string> <string name="smscommunicator_suspendreplywithcode">Aby wstrzymać pętle na %1$d minut odpowiedz kodem %2$s</string>
@ -264,6 +277,7 @@
<string name="smscommunicator_loopdisablereplywithcode">Aby wyłączyć pętlę odpowiedz kodem %1$s</string> <string name="smscommunicator_loopdisablereplywithcode">Aby wyłączyć pętlę odpowiedz kodem %1$s</string>
<string name="smscommunicator_tempbasalset">Tymczasowa baza %1$.2fU/h przez %2$d min rozpoczęta</string> <string name="smscommunicator_tempbasalset">Tymczasowa baza %1$.2fU/h przez %2$d min rozpoczęta</string>
<string name="smscommunicator_extendedset">Bolus przedłużony %1$.2fU na %2$d min. rozpoczęty pomyślnie</string> <string name="smscommunicator_extendedset">Bolus przedłużony %1$.2fU na %2$d min. rozpoczęty pomyślnie</string>
<string name="smscommunicator_carbsset">Pomyślnie wprowadzono %1$d g węglowodanów</string>
<string name="smscommunicator_carbsfailed">Próba wprowadzenia %1$dg węglowodanów nie powiodła się</string> <string name="smscommunicator_carbsfailed">Próba wprowadzenia %1$dg węglowodanów nie powiodła się</string>
<string name="smscommunicator_tempbasalset_percent">Tymczasowa baza %1$d%% przez %2$d min. pomyślnie rozpoczęta</string> <string name="smscommunicator_tempbasalset_percent">Tymczasowa baza %1$d%% przez %2$d min. pomyślnie rozpoczęta</string>
<string name="smscommunicator_tempbasalfailed">Rozpoczęcie tymczasowej bazy nie powiodło się</string> <string name="smscommunicator_tempbasalfailed">Rozpoczęcie tymczasowej bazy nie powiodło się</string>
@ -523,6 +537,7 @@
<string name="free_peak_oref">Swobodny-Pik Oref</string> <string name="free_peak_oref">Swobodny-Pik Oref</string>
<string name="rapid_acting_oref">Szybko-Działający Oref</string> <string name="rapid_acting_oref">Szybko-Działający Oref</string>
<string name="ultrarapid_oref">Ultra-Szybki Oref</string> <string name="ultrarapid_oref">Ultra-Szybki Oref</string>
<string name="lyumjev">Lyumjev</string>
<string name="dia_too_short">DIA %1$f zbyt krótki - przyjmuję %2$f w zamian!</string> <string name="dia_too_short">DIA %1$f zbyt krótki - przyjmuję %2$f w zamian!</string>
<string name="activate_profile">Aktywuj profil</string> <string name="activate_profile">Aktywuj profil</string>
<string name="invalid">NIEPRAWIDŁOWY</string> <string name="invalid">NIEPRAWIDŁOWY</string>
@ -550,6 +565,7 @@
<string name="pump_unreachable">Pompa nieosiągalna</string> <string name="pump_unreachable">Pompa nieosiągalna</string>
<string name="missed_bg_readings">Pominięte odczyty BG</string> <string name="missed_bg_readings">Pominięte odczyty BG</string>
<string name="raise_notifications_as_android_notifications">Użyj powiadomień systemowych dla alertów i powiadomień</string> <string name="raise_notifications_as_android_notifications">Użyj powiadomień systemowych dla alertów i powiadomień</string>
<string name="gradually_increase_notification_volume">Stopniowo zwiększaj głośność ostrzeżeń i powiadomień</string>
<string name="localalertsettings_title">Alarmy lokalne</string> <string name="localalertsettings_title">Alarmy lokalne</string>
<string name="enable_missed_bg_readings_alert">Alarm, jeśli nie są odbierane odczyty BG</string> <string name="enable_missed_bg_readings_alert">Alarm, jeśli nie są odbierane odczyty BG</string>
<string name="enable_pump_unreachable_alert">Alarm, gdy pompa jest nieosiągalna</string> <string name="enable_pump_unreachable_alert">Alarm, gdy pompa jest nieosiągalna</string>
@ -638,6 +654,7 @@
<string name="enablesmbwithtemptarget">Włącz SMB z tymczasowym poziomem docelowym (TT)</string> <string name="enablesmbwithtemptarget">Włącz SMB z tymczasowym poziomem docelowym (TT)</string>
<string name="enablesmbwithtemptarget_summary">Włącz SMB gdy tymczasowy poziom docelowy (TT) jest aktywny (TT WkrótcePosiłek, TT ćwiczenia)</string> <string name="enablesmbwithtemptarget_summary">Włącz SMB gdy tymczasowy poziom docelowy (TT) jest aktywny (TT WkrótcePosiłek, TT ćwiczenia)</string>
<string name="enablesmbwithhightemptarget">Włącz SMB z wysokim tymczasowym poziomem docelowym</string> <string name="enablesmbwithhightemptarget">Włącz SMB z wysokim tymczasowym poziomem docelowym</string>
<string name="enablesmbwithhightemptarget_summary">Włącz SMB, gdy aktywowano wysoki cel tymczasowy (Ćwiczenia, powyżej 100 mg/dl lub 5, 5 mmol/l)</string>
<string name="overview_insulin_label">Insulina</string> <string name="overview_insulin_label">Insulina</string>
<string name="overview_carbs_label">Węglowod.</string> <string name="overview_carbs_label">Węglowod.</string>
<string name="overview_buttons_selection">Przyciski</string> <string name="overview_buttons_selection">Przyciski</string>
@ -671,6 +688,7 @@
<string name="do_not_bolus_record_only">Nie podawaj bolusa, tylko zapisz rekord</string> <string name="do_not_bolus_record_only">Nie podawaj bolusa, tylko zapisz rekord</string>
<string name="category">Kategoria</string> <string name="category">Kategoria</string>
<string name="subcategory">Podkategoria</string> <string name="subcategory">Podkategoria</string>
<string name="bolusrecordedonly">Bolus zostanie jedynie odnotowany (nie będzie podany przez pompę)</string>
<string name="ns_autobackfill_summary">Automatycznie wypełnij brakujące BG z NS</string> <string name="ns_autobackfill_summary">Automatycznie wypełnij brakujące BG z NS</string>
<string name="loop_smbsetbypump_label">SMB ustawiony przez pompę</string> <string name="loop_smbsetbypump_label">SMB ustawiony przez pompę</string>
<string name="overview_show_activity">Aktywność</string> <string name="overview_show_activity">Aktywność</string>
@ -787,6 +805,7 @@
<string name="askforpermission">Zapytaj o uprawnienia</string> <string name="askforpermission">Zapytaj o uprawnienia</string>
<string name="needsystemwindowpermission">Aplikacja wymaga uprawnienia systemowego okna dla powiadomień</string> <string name="needsystemwindowpermission">Aplikacja wymaga uprawnienia systemowego okna dla powiadomień</string>
<string name="needlocationpermission">Aplikacja wymaga dostępu do lokalizacji dla zarządzania bluetoothem i identyfikacją Wi-Fi</string> <string name="needlocationpermission">Aplikacja wymaga dostępu do lokalizacji dla zarządzania bluetoothem i identyfikacją Wi-Fi</string>
<string name="needstoragepermission">Aplikacja wymaga zgody na zapis do pamięci, aby móc przechować pliki logów i eksportować ustawienia</string>
<string name="request">Żądanie</string> <string name="request">Żądanie</string>
<string name="insulinsourcesetup">Skonfiguruj wtyczkę insuliny</string> <string name="insulinsourcesetup">Skonfiguruj wtyczkę insuliny</string>
<string name="exit">Wyjście</string> <string name="exit">Wyjście</string>
@ -842,6 +861,7 @@
<string name="code_compare">Czy kody wyświetlone na tym urządzeniu i na twojej pompie pasują?</string> <string name="code_compare">Czy kody wyświetlone na tym urządzeniu i na twojej pompie pasują?</string>
<string name="insight_pairing">Parowanie Insight</string> <string name="insight_pairing">Parowanie Insight</string>
<string name="insight_local">Accu-Chek Insight</string> <string name="insight_local">Accu-Chek Insight</string>
<string name="insight_delivered">podano %1$.2f U / %2$.2f U</string>
<string name="insight_alert_formatter">%1$s: %2$s</string> <string name="insight_alert_formatter">%1$s: %2$s</string>
<string name="tube_changed">Dren zmieniony</string> <string name="tube_changed">Dren zmieniony</string>
<string name="pump_time_updated">Czas pompy uaktualniony</string> <string name="pump_time_updated">Czas pompy uaktualniony</string>
@ -899,6 +919,7 @@
<string name="short_status_extended">Przedłużony: %1$.2f / %2$.2f U na %3$d min</string> <string name="short_status_extended">Przedłużony: %1$.2f / %2$.2f U na %3$d min</string>
<string name="short_status_multiwave">Multiwave (zwykły + przedłużony): %1$.2f / %2$.2f U for %3$d min</string> <string name="short_status_multiwave">Multiwave (zwykły + przedłużony): %1$.2f / %2$.2f U for %3$d min</string>
<string name="short_status_tdd">TDD: %1$.2f</string> <string name="short_status_tdd">TDD: %1$.2f</string>
<string name="short_status_reservoir">Zbiornik: %1$.2f U</string>
<string name="short_status_battery">Bat.: %1$d%%</string> <string name="short_status_battery">Bat.: %1$d%%</string>
<string name="max_recovery_duration">Max. czas odzyskiwania [s]</string> <string name="max_recovery_duration">Max. czas odzyskiwania [s]</string>
<string name="min_recovery_duration">Min. czas odzyskiwania [s]</string> <string name="min_recovery_duration">Min. czas odzyskiwania [s]</string>
@ -1041,6 +1062,8 @@
<string name="sendsmsactionlabel">Wyślij SMS: %1$s</string> <string name="sendsmsactionlabel">Wyślij SMS: %1$s</string>
<string name="sendsmsactiondescription">Wyślij SMS do wszystkich numerów</string> <string name="sendsmsactiondescription">Wyślij SMS do wszystkich numerów</string>
<string name="sendsmsactiontext">Wyślij SMS z tekstem</string> <string name="sendsmsactiontext">Wyślij SMS z tekstem</string>
<string name="cobvsiob">COB vs IOB</string>
<string name="bolusconstraintappliedwarn">Zastosowano ograniczenie bolusa: %1$.2f U do %2$.2f U</string>
<string name="slowabsorptiondetected"><![CDATA[<font color=\'%1$s\'>!!!!! Wykryto powolne wchłanianie węglowodanów: %2$d%% czasu. Sprawdź ponownie swoje obliczenia. COB mogły być przeszacowane przez co mogło być podane zbyt dużo insuliny !!!!!</font>]]></string> <string name="slowabsorptiondetected"><![CDATA[<font color=\'%1$s\'>!!!!! Wykryto powolne wchłanianie węglowodanów: %2$d%% czasu. Sprawdź ponownie swoje obliczenia. COB mogły być przeszacowane przez co mogło być podane zbyt dużo insuliny !!!!!</font>]]></string>
<string name="partialboluswizard">Dostarcz tą część dawki insuliny z wyniku kalkulatora bolusa [%]</string> <string name="partialboluswizard">Dostarcz tą część dawki insuliny z wyniku kalkulatora bolusa [%]</string>
<string name="deliverpartofboluswizard">Kreator bolusa wykonuje obliczenia, ale tylko ta część obliczonej dawki insuliny jest dostarczana. Pomocne z algorytmem SMB.</string> <string name="deliverpartofboluswizard">Kreator bolusa wykonuje obliczenia, ale tylko ta część obliczonej dawki insuliny jest dostarczana. Pomocne z algorytmem SMB.</string>
@ -1090,6 +1113,7 @@
<string name="nav_survey">Ankieta</string> <string name="nav_survey">Ankieta</string>
<string name="invalidage">Nieprawidłowy wpis wieku</string> <string name="invalidage">Nieprawidłowy wpis wieku</string>
<string name="invalidweight">Nieprawidłowy wpis wagi</string> <string name="invalidweight">Nieprawidłowy wpis wagi</string>
<string name="invalidpct">Nieprawidłowa wartość procentowa</string>
<string name="tirformat"><![CDATA[<b>%1$s:</b> Od: <b>%2$02d%%</b> Cel: <b>%3$02d%%</b> Do: <b>%4$02d%%</b>]]></string> <string name="tirformat"><![CDATA[<b>%1$s:</b> Od: <b>%2$02d%%</b> Cel: <b>%3$02d%%</b> Do: <b>%4$02d%%</b>]]></string>
<string name="average">Średnio</string> <string name="average">Średnio</string>
<string name="tir">TIR</string> <string name="tir">TIR</string>
@ -1116,10 +1140,15 @@
<string name="loop_tbrexecution_time_label">Czas wykonywania bazy tymczasowej</string> <string name="loop_tbrexecution_time_label">Czas wykonywania bazy tymczasowej</string>
<string name="insight_alert_notification_channel">Alarmy pompy Insight</string> <string name="insight_alert_notification_channel">Alarmy pompy 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">z aplikacji Authenticator dla: %1$s, z doklejonym PIN-em</string>
<string name="smscommunicator_otp_enabled">Włącz uwierzytelnianie</string> <string name="smscommunicator_otp_enabled">Włącz uwierzytelnianie</string>
<string name="smscommunicator_otp_enabled_summary">Uwierzytelnianie komend za pomocą haseł jednorazowych generowanych przez aplikację Google Authenticator lub podobnych aplikacji 2FA.</string> <string name="smscommunicator_otp_enabled_summary">Uwierzytelnianie komend za pomocą haseł jednorazowych generowanych przez aplikację Google Authenticator lub podobnych aplikacji 2FA.</string>
<string name="smscommunicator_otp_pin">Dodatkowy obowiązkowy PIN na końcu tokenu</string>
<string name="smscommunicator_otp_pin_summary">Dodatkowe cyfry, które powinny być zapamiętywane i przyklejone na końcu każdego wygenerowanego hasła jednorazowego</string> <string name="smscommunicator_otp_pin_summary">Dodatkowe cyfry, które powinny być zapamiętywane i przyklejone na końcu każdego wygenerowanego hasła jednorazowego</string>
<string name="smscomunicator_tab_otp_label">Ustawienia uwierzytelnienia</string> <string name="smscomunicator_tab_otp_label">Ustawienia uwierzytelnienia</string>
<string name="smscommunicator_code_verify_label">Kod do sprawdzenia:</string>
<string name="smscommunicator_code_verify_hint">OTP + PIN</string>
<string name="smscommunicator_code_verify_info">Kod weryfikacyjny składa się z 6 cyfr wyświetlanych przez aplikację uwierzytelniającą (tzw. OTP) po których następują co najmniej 3 cyfry obowiązkowego PIN-u.</string>
<string name="smscommunicator_otp_verify_label">OTP do sprawdzenia:</string> <string name="smscommunicator_otp_verify_label">OTP do sprawdzenia:</string>
<string name="smscommunicator_otp_reset_btn">Resetuj uwierzytelnianie</string> <string name="smscommunicator_otp_reset_btn">Resetuj uwierzytelnianie</string>
<string name="smscommunicator_otp_reset_title">Resetuj klucz uwierzytelniania</string> <string name="smscommunicator_otp_reset_title">Resetuj klucz uwierzytelniania</string>
@ -1154,5 +1183,38 @@
<string name="availableprofile">Dostępny profil</string> <string name="availableprofile">Dostępny profil</string>
<string name="profiletype">Typ profilu</string> <string name="profiletype">Typ profilu</string>
<string name="formatwithtdd">Wiek: %1$.0f TDD: %2$.0f U</string> <string name="formatwithtdd">Wiek: %1$.0f TDD: %2$.0f U</string>
<string name="formatwittddandpct">Wiek: %1$.0f TDD: %2$.0f U %3$d%%</string>
<string name="formatwithweight">Wiek: %1$.0f Waga: %2$.0f kg</string> <string name="formatwithweight">Wiek: %1$.0f Waga: %2$.0f kg</string>
<string name="basalpctfromtdd_label">% bazy</string>
<string name="dpvdefaultprofile">Domyślny profil DPV</string>
<string name="open_humans">Open Humans</string>
<string name="finishing_open_humans_setup">Kończenie konfiguracji Open Humans…</string>
<string name="this_may_take_a_while">To może chwilę potrwać. Nie wyłączaj telefonu ani tej wtyczki.</string>
<string name="setup_finished">Konfiguracja zakończona</string>
<string name="your_phone_will_upload_data">Twój telefon wkrótce prześle dane do Open Humans.</string>
<string name="your_phone_is_upload_data">Twój telefon przesyła teraz dane do Open Humans.</string>
<string name="setup_failed">Konfiguracja nie powiodła się</string>
<string name="there_was_an_error">Wystąpił błąd. Spróbuj zalogować się ponownie, aby kontynuować. Przepraszamy &amp; dziękujemy!</string>
<string name="open_humans_terms">To jest narzędzie open source, które skopiuje Twoje dane do projektu Open Humans. Nie zachowujemy żadnych praw do dzielenia się Twoimi danymi z osobami trzecimi bez Twojej wyraźnej zgody. Dane, które otrzymują projekt i aplikacja są identyfikowane za pomocą losowego identyfikatora użytkownika i będą bezpiecznie przesyłane na konto Open Humans za Twoją zgodą dla tego procesu. Możesz zatrzymać przesyłanie i usunąć swoje już przesłane dane w dowolnym momencie za pośrednictwem strony www.openhumans.org.</string>
<string name="i_understand_and_agree">Rozumiem i zgadzam się.</string>
<string name="login">Zaloguj się</string>
<string name="logout">Wyloguj się</string>
<string name="oh_logout_confirmation">Czy na pewno chcesz się wylogować i zaprzestać przekazywania danych na rzecz nauki?</string>
<string name="project_member_id">Identyfikator członka projektu: %s</string>
<string name="queue_size">Rozmiar kolejki: %d</string>
<string name="terms_of_use">Warunki użytkowania</string>
<string name="not_logged_in">Nie zalogowano</string>
<string name="you_need_to_accept_the_of_use_first">Najpierw musisz zaakceptować warunki użytkowania.</string>
<string name="successfully_logged_in">Pomyślnie zalogowano</string>
<string name="setup_will_continue_in_background">Konfiguracja zostanie teraz zakończona w tle. Dziękujemy za przesłanie swoich danych.\n\nProszę nie wyłączaj telefonu ani tej wtyczki jeszcze przez chwilę, aby umożliwić dokończenie się konfiguracji.</string>
<string name="completing_login">Kończenie logowania…</string>
<string name="donate_your_data_to_science">Przekaż swoje dane na rzecz nauki</string>
<string name="open_humans_short">OH</string>
<string name="you_have_been_signed_out_of_open_humans">Zostałeś wylogowany z Open Humans</string>
<string name="click_here_to_sign_in_again_if_this_wasnt_on_purpose">Kliknij tutaj, aby zalogować się ponownie, jeśli wylogowanie nie było celowe.</string>
<string name="only_upload_if_connected_to_wifi">Prześlij tylko jeśli połączono poprzez WiFi</string>
<string name="only_upload_if_charging">Prześlij tylko gdy telefon jest ładowany</string>
<string name="worker_state">Stan procesu: %s</string>
<string name="uploaded_data">Przesłane dane</string>
<string name="the_following_data_will_be_uploaded_to_your_open_humans_account">Następujące dane zostaną przesłane na konto Open Humans: wartości Glikemii, bolusy, węglowodany, zdarzenia z portalu opieki (z wyjątkiem notatek), rozszerzone bolusy, przełączenia profilu, całkowite dawki dobowe, bazy tymczasowe, cele tymczasowe, preferencje, wersja aplikacji, model urządzenia i wymiary ekranu. Dane niejawne lub prywatne, takie jak adres URL strony Nightscout lub klucz autoryzacji API, nie zostaną przesłane.</string>
</resources> </resources>

View file

@ -21,6 +21,7 @@
<string name="description_food">Exibe as predefinições de comida definidas no Nightscout</string> <string name="description_food">Exibe as predefinições de comida definidas no Nightscout</string>
<string name="description_insulin_rapid">Predefinição de Insulina Humalog e NovoRapid / NovoLog</string> <string name="description_insulin_rapid">Predefinição de Insulina Humalog e NovoRapid / NovoLog</string>
<string name="description_insulin_ultra_rapid">Predefinição de Insulina Fiasp</string> <string name="description_insulin_ultra_rapid">Predefinição de Insulina Fiasp</string>
<string name="description_insulin_lyumjev">Predefinição para Insulina Lyumjev</string>
<string name="description_insulin_free_peak">Permite definir o pico de atividade da insulina e deve ser usado somente por usuários avançados</string> <string name="description_insulin_free_peak">Permite definir o pico de atividade da insulina e deve ser usado somente por usuários avançados</string>
<string name="description_loop">Activar ou desactivar a aplicação que desencadeia o loop.</string> <string name="description_loop">Activar ou desactivar a aplicação que desencadeia o loop.</string>
<string name="description_ns_client">Sincroniza os seus dados com o Nightscout</string> <string name="description_ns_client">Sincroniza os seus dados com o Nightscout</string>
@ -535,6 +536,7 @@
<string name="free_peak_oref">Oref Pico-Livre</string> <string name="free_peak_oref">Oref Pico-Livre</string>
<string name="rapid_acting_oref">Oref Acção Rápida</string> <string name="rapid_acting_oref">Oref Acção Rápida</string>
<string name="ultrarapid_oref">Ultra-Rapid Oref</string> <string name="ultrarapid_oref">Ultra-Rapid Oref</string>
<string name="lyumjev">Lyumjev</string>
<string name="dia_too_short">Duração de Acção da Insulina (DIA) de %1$f demasiado curto - corrigido para %2$f!</string> <string name="dia_too_short">Duração de Acção da Insulina (DIA) de %1$f demasiado curto - corrigido para %2$f!</string>
<string name="activate_profile">Activar perfil</string> <string name="activate_profile">Activar perfil</string>
<string name="invalid">INVÁLIDO</string> <string name="invalid">INVÁLIDO</string>
@ -1141,6 +1143,7 @@
<string name="smscommunicator_otp_enabled_summary">Autenticar comandos usando Uma-Senha-Única que sejam geradas pelo Google Authenticator ou app 2FA similar.</string> <string name="smscommunicator_otp_enabled_summary">Autenticar comandos usando Uma-Senha-Única que sejam geradas pelo Google Authenticator ou app 2FA similar.</string>
<string name="smscommunicator_otp_pin_summary">Dígitos adicionais que devem ser memorizados e colados no final de cada Uma-Senha-Única que seja gerada</string> <string name="smscommunicator_otp_pin_summary">Dígitos adicionais que devem ser memorizados e colados no final de cada Uma-Senha-Única que seja gerada</string>
<string name="smscomunicator_tab_otp_label">Configuração do Autenticador</string> <string name="smscomunicator_tab_otp_label">Configuração do Autenticador</string>
<string name="smscommunicator_code_verify_label">Código para verificar:</string>
<string name="smscommunicator_otp_verify_label">OTP para verificar:</string> <string name="smscommunicator_otp_verify_label">OTP para verificar:</string>
<string name="smscommunicator_otp_reset_btn">Repor Autenticadores</string> <string name="smscommunicator_otp_reset_btn">Repor Autenticadores</string>
<string name="smscommunicator_otp_reset_title">Repor Chave Autenticador</string> <string name="smscommunicator_otp_reset_title">Repor Chave Autenticador</string>

View file

@ -13,7 +13,7 @@
<string name="reset_db_confirm">Вы действительно хотите обнулить базы данных?</string> <string name="reset_db_confirm">Вы действительно хотите обнулить базы данных?</string>
<string name="nav_exit">Выход</string> <string name="nav_exit">Выход</string>
<string name="ns_sync_use_absolute_title">Всегда пользуйтесь абсолютными величинами для базала</string> <string name="ns_sync_use_absolute_title">Всегда пользуйтесь абсолютными величинами для базала</string>
<string name="alert_dialog_storage_permission_text">Пожалуйста перезагрузите телефон или перезапустите AndroidAPS из системных настроек \иначе AndroidAPS не будет вести лог (важно для отслеживания и проверки алгоритмов)!</string> <string name="alert_dialog_storage_permission_text">Пожалуйста перезагрузите телефон или перезапустите AndroidAPS из системных настроек, иначе AndroidAPS не будет вести лог (важно для отслеживания и проверки алгоритмов)!</string>
<string name="alert_dialog_permission_battery_optimization_failed">Это устройство не поддерживает меню оптимизации батареи - могут быть проблемы с производительностью.</string> <string name="alert_dialog_permission_battery_optimization_failed">Это устройство не поддерживает меню оптимизации батареи - могут быть проблемы с производительностью.</string>
<string name="description_actions">Кнопки быстрого доступа к некоторым распространенным настройкам</string> <string name="description_actions">Кнопки быстрого доступа к некоторым распространенным настройкам</string>
<string name="description_config_builder">Применяется для настройки активных плагинов</string> <string name="description_config_builder">Применяется для настройки активных плагинов</string>
@ -21,6 +21,7 @@
<string name="description_food">Показывает предварительные настройки приема пищи из Nightscout</string> <string name="description_food">Показывает предварительные настройки приема пищи из Nightscout</string>
<string name="description_insulin_rapid">Предустановки для Humalog и Novorapid / Novolog</string> <string name="description_insulin_rapid">Предустановки для Humalog и Novorapid / Novolog</string>
<string name="description_insulin_ultra_rapid">Предустановки для Fiasp</string> <string name="description_insulin_ultra_rapid">Предустановки для Fiasp</string>
<string name="description_insulin_lyumjev">Параметры Lyumjev</string>
<string name="description_insulin_free_peak">Позволяет самостоятельно задавать пик активности инсулина - только для опытных пользователей</string> <string name="description_insulin_free_peak">Позволяет самостоятельно задавать пик активности инсулина - только для опытных пользователей</string>
<string name="description_loop">Активировать или деактивировать запуск цикла.</string> <string name="description_loop">Активировать или деактивировать запуск цикла.</string>
<string name="description_ns_client">Синхронизирует данные с Nightscout</string> <string name="description_ns_client">Синхронизирует данные с Nightscout</string>
@ -55,7 +56,7 @@
<string name="treatments_iobactivitytotal_label_string">Общая активность IOB:</string> <string name="treatments_iobactivitytotal_label_string">Общая активность IOB:</string>
<string name="tempbasals_realduration_label_string">длит:</string> <string name="tempbasals_realduration_label_string">длит:</string>
<string name="tempbasals_netratio_label_string">соотношение:</string> <string name="tempbasals_netratio_label_string">соотношение:</string>
<string name="tempbasals_netinsulin_label_string">инс:</string> <string name="tempbasals_netinsulin_label_string">инсулин:</string>
<string name="tempbasals_iob_label_string">IOB: активный инсулин</string> <string name="tempbasals_iob_label_string">IOB: активный инсулин</string>
<string name="tempbasals_iobtotal_label_string">общий IOB</string> <string name="tempbasals_iobtotal_label_string">общий IOB</string>
<string name="treatments_wizard_bg_label">гликемия</string> <string name="treatments_wizard_bg_label">гликемия</string>
@ -105,7 +106,7 @@
<string name="loop_aps_label">Система ИПЖ</string> <string name="loop_aps_label">Система ИПЖ</string>
<string name="loop_constraintsprocessed_label">после наложенных ограничений</string> <string name="loop_constraintsprocessed_label">после наложенных ограничений</string>
<string name="loop_tbrsetbypump_label">Временный базал определяется помпой</string> <string name="loop_tbrsetbypump_label">Временный базал определяется помпой</string>
<string name="openapsma_lastenact_label">Последнее предпринятое</string> <string name="openapsma_lastenact_label">Последнее выполненное</string>
<string name="noapsselected">APS не выбрана или не выдала результат</string> <string name="noapsselected">APS не выбрана или не выдала результат</string>
<string name="safety">безопасность</string> <string name="safety">безопасность</string>
<string name="openapsma_disabled">модуль не активен</string> <string name="openapsma_disabled">модуль не активен</string>
@ -154,7 +155,7 @@
<string name="careportal_newnstreatment_glucosetype">тип глюкозы</string> <string name="careportal_newnstreatment_glucosetype">тип глюкозы</string>
<string name="noprofile">профиль еще не загружен из NS</string> <string name="noprofile">профиль еще не загружен из NS</string>
<string name="overview_tempbasal_button">ВремБазал</string> <string name="overview_tempbasal_button">ВремБазал</string>
<string name="overview_extendedbolus_button">расширенный болюс</string> <string name="overview_extendedbolus_button">Пролонгированный болюс</string>
<string name="configbuilder_nightscoutversion_label">версия Nightscout:</string> <string name="configbuilder_nightscoutversion_label">версия Nightscout:</string>
<string name="missing_carbs">Не хватает %1$d г</string> <string name="missing_carbs">Не хватает %1$d г</string>
<string name="exported">настройки экспортированы</string> <string name="exported">настройки экспортированы</string>
@ -257,7 +258,7 @@
<string name="smscommunicator_loopisdisabled">зцикл не работает</string> <string name="smscommunicator_loopisdisabled">зцикл не работает</string>
<string name="smscommunicator_loopisenabled">зцикл работает</string> <string name="smscommunicator_loopisenabled">зцикл работает</string>
<string name="valuelimitedto">%1$.2f ограничено до %2$.2f</string> <string name="valuelimitedto">%1$.2f ограничено до %2$.2f</string>
<string name="valueoutofrange">Величина %1$s недопустима</string> <string name="valueoutofrange">Значение %1$s недопустимо</string>
<string name="smscommunicator_pumpconnectwithcode">Чтобы подсоединить помпу ответьте кодом %1$s</string> <string name="smscommunicator_pumpconnectwithcode">Чтобы подсоединить помпу ответьте кодом %1$s</string>
<string name="smscommunicator_pumpconnectfail">Ошибка подключения к помпе</string> <string name="smscommunicator_pumpconnectfail">Ошибка подключения к помпе</string>
<string name="smscommunicator_pumpdisconnectwithcode">Для разъединения с помпой на %1d мин ответьте кодом %2$s</string> <string name="smscommunicator_pumpdisconnectwithcode">Для разъединения с помпой на %1d мин ответьте кодом %2$s</string>
@ -300,7 +301,7 @@
<string name="correctionbous">коррекция</string> <string name="correctionbous">коррекция</string>
<string name="actions">действия</string> <string name="actions">действия</string>
<string name="ns_upload_only">только передача в NS (синхронизация отсутствует)</string> <string name="ns_upload_only">только передача в NS (синхронизация отсутствует)</string>
<string name="ns_upload_only_summary">только передача в NS. работает в SGV только если выбран местный источник вроде xdrip. не работает в профилях при действующем профиле NS</string> <string name="ns_upload_only_summary">только передача в NS. Не работает в SGV пока не выбран местный источник вроде xdrip. Не работает в Профилях при действующем профиле NS.</string>
<string name="pumpNotInitialized">помпа не инициализирована</string> <string name="pumpNotInitialized">помпа не инициализирована</string>
<string name="primefill">прайм/заполнение</string> <string name="primefill">прайм/заполнение</string>
<string name="fillwarning">убедитесь что количество соответствует характеристикам вашей инфузионной системы</string> <string name="fillwarning">убедитесь что количество соответствует характеристикам вашей инфузионной системы</string>
@ -358,7 +359,7 @@
<string name="smscommunicator_shortname">SMS</string> <string name="smscommunicator_shortname">SMS</string>
<string name="short_tabtitles">сокращенные имена табул</string> <string name="short_tabtitles">сокращенные имена табул</string>
<string name="always_use_shortavg">всегда используйте укороченное среднее приращение вместо простого</string> <string name="always_use_shortavg">всегда используйте укороченное среднее приращение вместо простого</string>
<string name="always_use_shortavg_summary">полезно когда данные из нефильтруемых источников вроде Xdrip зашумляются</string> <string name="always_use_shortavg_summary">Полезно когда данные из нефильтрованных источников вроде xDrip+ начинают \"шуметь\".</string>
<string name="profile">профиль</string> <string name="profile">профиль</string>
<string name="openapsama_max_daily_safety_multiplier_summary">значение по умолчанию:3 Это ключевой ограничитель безопасности OpenAPS. Он ограничивает величину вашего базала максимум до 3x максимума. Вам вероятно не понадобится менять эту величину но вам следует понимать, что она входит в формулу дуэта \"максимум 3x ежедневное; 4x текущее\"</string> <string name="openapsama_max_daily_safety_multiplier_summary">значение по умолчанию:3 Это ключевой ограничитель безопасности OpenAPS. Он ограничивает величину вашего базала максимум до 3x максимума. Вам вероятно не понадобится менять эту величину но вам следует понимать, что она входит в формулу дуэта \"максимум 3x ежедневное; 4x текущее\"</string>
<string name="openapsama_current_basal_safety_multiplier_summary">значение по умолчанию: 4 . Это вторая половина обеспечения безопасности OpenAPS из дуэта \"максимум 3x ежедневное; 4x текущее\" Означает что ваша база независимо от установок помпы не может быть выше чем это число умноженное на текущее значение базала. Ограничение для того, чтобы предотвратить вторжение в опасную зону из-за высокого уровня установленных значений базы без понимания алгоритма работы приложения. Большинству людей никогда не потребуется изменять это значение, скорее всего нужно поменять другие настройки если вы чувствуете, что вам мешает это ограничение.</string> <string name="openapsama_current_basal_safety_multiplier_summary">значение по умолчанию: 4 . Это вторая половина обеспечения безопасности OpenAPS из дуэта \"максимум 3x ежедневное; 4x текущее\" Означает что ваша база независимо от установок помпы не может быть выше чем это число умноженное на текущее значение базала. Ограничение для того, чтобы предотвратить вторжение в опасную зону из-за высокого уровня установленных значений базы без понимания алгоритма работы приложения. Большинству людей никогда не потребуется изменять это значение, скорее всего нужно поменять другие настройки если вы чувствуете, что вам мешает это ограничение.</string>
@ -374,7 +375,7 @@
<string name="send_calibration">Отправить калибровку %1$.1f на xDrip?</string> <string name="send_calibration">Отправить калибровку %1$.1f на xDrip?</string>
<string name="xdripnotinstalled">xdrip+ не установлен</string> <string name="xdripnotinstalled">xdrip+ не установлен</string>
<string name="calibrationsent">калибровка передается на xdrip</string> <string name="calibrationsent">калибровка передается на xdrip</string>
<string name="smscommunicator_calibrationsent">калибровка отправлена. в xdrip должен быть активирован прием</string> <string name="smscommunicator_calibrationsent">Калибровка отправлена. Активируйте прием в xDrip+.</string>
<string name="smscommunicator_calibrationfailed">xdrip не получает калибровок</string> <string name="smscommunicator_calibrationfailed">xdrip не получает калибровок</string>
<string name="pumpsuspended">Работа помпы остановлена</string> <string name="pumpsuspended">Работа помпы остановлена</string>
<string name="executing">выполнение</string> <string name="executing">выполнение</string>
@ -478,7 +479,7 @@
<string name="ns_noupload">данные не передаются в NS</string> <string name="ns_noupload">данные не передаются в NS</string>
<string name="ns_noupload_summary">данные передаваемые в NS не доходят. AAPS соединяется с NS но изменения туда не вносятся</string> <string name="ns_noupload_summary">данные передаваемые в NS не доходят. AAPS соединяется с NS но изменения туда не вносятся</string>
<string name="overview_extendedbolus_cancel_button">Отмена удлиненного болюса</string> <string name="overview_extendedbolus_cancel_button">Отмена удлиненного болюса</string>
<string name="careportal_sensorage_label">сенсор пропаботал</string> <string name="careportal_sensorage_label">Сенсор проработал</string>
<string name="careportal_canulaage_label">Катетер помпы проработал</string> <string name="careportal_canulaage_label">Катетер помпы проработал</string>
<string name="careportal_insulinage_label">Инсулин проработал</string> <string name="careportal_insulinage_label">Инсулин проработал</string>
<string name="doprofileswitch">Переключить профиль</string> <string name="doprofileswitch">Переключить профиль</string>
@ -508,7 +509,7 @@
<string name="careportal_pbage_label_short">ВозрБат</string> <string name="careportal_pbage_label_short">ВозрБат</string>
<string name="openaps_short">OAPS</string> <string name="openaps_short">OAPS</string>
<string name="uploader_short">ЗАГРУЗ</string> <string name="uploader_short">ЗАГРУЗ</string>
<string name="basal_short">БАЗ</string> <string name="basal_short">БАЗАЛ</string>
<string name="virtualpump_extendedbolus_label_short">УДЛИНН</string> <string name="virtualpump_extendedbolus_label_short">УДЛИНН</string>
<string name="keep_screen_on_title">Не отключать экран</string> <string name="keep_screen_on_title">Не отключать экран</string>
<string name="keep_screen_on_summary">Не давать системе Android отключать экран. Это увеличит потребление энергии при отключенной сети питания.</string> <string name="keep_screen_on_summary">Не давать системе Android отключать экран. Это увеличит потребление энергии при отключенной сети питания.</string>
@ -535,6 +536,7 @@
<string name="free_peak_oref">Свободный от пиков Oref</string> <string name="free_peak_oref">Свободный от пиков Oref</string>
<string name="rapid_acting_oref">Быстро действующий Oref</string> <string name="rapid_acting_oref">Быстро действующий Oref</string>
<string name="ultrarapid_oref">Сверхбыстрый Oref</string> <string name="ultrarapid_oref">Сверхбыстрый Oref</string>
<string name="lyumjev">Lyumjev</string>
<string name="dia_too_short">Значение длительности работы инс %1$f слишком мало - применено %2$f!</string> <string name="dia_too_short">Значение длительности работы инс %1$f слишком мало - применено %2$f!</string>
<string name="activate_profile">АКТИВИРОВАТЬ ПРОФИЛЬ</string> <string name="activate_profile">АКТИВИРОВАТЬ ПРОФИЛЬ</string>
<string name="invalid">НЕВЕРНО</string> <string name="invalid">НЕВЕРНО</string>
@ -558,7 +560,7 @@
<string name="shortprotein">Белки</string> <string name="shortprotein">Белки</string>
<string name="shortfat">Жиры</string> <string name="shortfat">Жиры</string>
<string name="active"><![CDATA[<Active>]]></string> <string name="active"><![CDATA[<Active>]]></string>
<string name="executingrightnow">Команда сейчас выполняется</string> <string name="executingrightnow">Команда выполняется</string>
<string name="pump_unreachable">Помпа недоступна</string> <string name="pump_unreachable">Помпа недоступна</string>
<string name="missed_bg_readings">Пропущенные данные СК</string> <string name="missed_bg_readings">Пропущенные данные СК</string>
<string name="raise_notifications_as_android_notifications">Использовать системные уведомления для предупреждений и уведомлений</string> <string name="raise_notifications_as_android_notifications">Использовать системные уведомления для предупреждений и уведомлений</string>
@ -710,7 +712,7 @@
<string name="combo_error_multiple_boluses_with_identical_timestamp">Только что импортировано несколько болюсов с одинаковым количеством инсулина в течение одной минуты. В лог лечения может быть добавлена только одна запись. Пожалуйста проверьте помпу и вручную введите запись о болюсе через вкладку портала назначений. Убедитесь, что данному времени соответствует только одна запись о болюсе.</string> <string name="combo_error_multiple_boluses_with_identical_timestamp">Только что импортировано несколько болюсов с одинаковым количеством инсулина в течение одной минуты. В лог лечения может быть добавлена только одна запись. Пожалуйста проверьте помпу и вручную введите запись о болюсе через вкладку портала назначений. Убедитесь, что данному времени соответствует только одна запись о болюсе.</string>
<string name="about_link_urls">\n\nhttp://www.androidaps.org\nhttp://www.androidaps.de (de) \n\nfacebook:\nhttp://facebook.androidaps.org\nhttp://facebook.androidaps.de (de)</string> <string name="about_link_urls">\n\nhttp://www.androidaps.org\nhttp://www.androidaps.de (de) \n\nfacebook:\nhttp://facebook.androidaps.org\nhttp://facebook.androidaps.de (de)</string>
<string name="combo_check_date">Новый болюс старше 24 часов или запись относится к будущему. Пожалуйста убедитесь что дата на помпе установлена правильно.</string> <string name="combo_check_date">Новый болюс старше 24 часов или запись относится к будущему. Пожалуйста убедитесь что дата на помпе установлена правильно.</string>
<string name="combo_suspious_bolus_time">Время/дата поданного болюса неверны. Вероятно, кол-во активного инсулина IOB также неверно. Пожалуйста, проверьте время/дату помпы.</string> <string name="combo_suspious_bolus_time">Время/дата поданного болюса неверны. Вероятно, кол-во активного инсулина IOB также неверно. Проверьте время/дату помпы.</string>
<string name="profileswitch_ismissing">Профиль не переключен. Пожалуйста переключите профиль или нажмите \"активировать профиль\" в LocalProfile.</string> <string name="profileswitch_ismissing">Профиль не переключен. Пожалуйста переключите профиль или нажмите \"активировать профиль\" в LocalProfile.</string>
<string name="combo_bolus_count">Отсчет болюса</string> <string name="combo_bolus_count">Отсчет болюса</string>
<string name="combo_tbr_count">Отсчет временного базала TBR</string> <string name="combo_tbr_count">Отсчет временного базала TBR</string>
@ -760,7 +762,7 @@
<string name="firstcarbsincrement">Первый шаг увеличения углеводов</string> <string name="firstcarbsincrement">Первый шаг увеличения углеводов</string>
<string name="secondcarbsincrement">Второй шаг увеличения углеводов</string> <string name="secondcarbsincrement">Второй шаг увеличения углеводов</string>
<string name="thirdcarbsincrement">Третий шаг увеличения углеводов</string> <string name="thirdcarbsincrement">Третий шаг увеличения углеводов</string>
<string name="cgm">Мониторинг СК</string> <string name="cgm">Мониторинг ГК</string>
<string name="ns_wifionly">Использовать только WiFi соединение</string> <string name="ns_wifionly">Использовать только WiFi соединение</string>
<string name="ns_wifi_ssids">WiFi SSID</string> <string name="ns_wifi_ssids">WiFi SSID</string>
<string name="ns_chargingonly">Только при зарядке</string> <string name="ns_chargingonly">Только при зарядке</string>
@ -775,7 +777,7 @@
<string name="value_unavailable_short">н/д</string> <string name="value_unavailable_short">н/д</string>
<string name="virtualpump_type">Тип виртуальной помпы</string> <string name="virtualpump_type">Тип виртуальной помпы</string>
<string name="virtualpump_definition">Определение помпы</string> <string name="virtualpump_definition">Определение помпы</string>
<string name="virtualpump_pump_def">Болюс: Шаг =%1$s\nПродленный Болюс: [Шаг =%2$s, Длительность =%3$sмин -%4$sh] \nБазал: Шаг =%5$s\ nTBR: %6$s (на %7$s), Длительность =%8$sмин -%9$sh\n%10$s</string> <string name="virtualpump_pump_def">Болюс: Шаг =%1$s\n Пролонгированный Болюс: [Шаг =%2$s, Продолжительность =%3$sмин -%4$sh] \nБазал: Шаг =%5$s\n ВБС: %6$s (на %7$s), Продолжительность =%8$sмин -%9$sh\n%10$s</string>
<string name="ns_autobackfill_title">Автозаполнение пропущенных данных СК</string> <string name="ns_autobackfill_title">Автозаполнение пропущенных данных СК</string>
<string name="wear_wizard_settings">Параметры мастера настройки смарт-часов wear</string> <string name="wear_wizard_settings">Параметры мастера настройки смарт-часов wear</string>
<string name="wear_wizard_settings_summary">Расчеты, включены в результат мастера настройки смарт-часов wear:</string> <string name="wear_wizard_settings_summary">Расчеты, включены в результат мастера настройки смарт-часов wear:</string>
@ -914,7 +916,7 @@ Context | Edit Context</string>
<string name="description_pump_insight_local">Интеграция с помпой Accu-Chek Insight</string> <string name="description_pump_insight_local">Интеграция с помпой Accu-Chek Insight</string>
<string name="not_inserted">Не вставлено</string> <string name="not_inserted">Не вставлено</string>
<string name="short_status_last_connected">Недавнее соединение: %1$d мин. назад</string> <string name="short_status_last_connected">Недавнее соединение: %1$d мин. назад</string>
<string name="short_status_tbr">Суммарная скорость базала: %1$d%% за %2$d / %3$d мин</string> <string name="short_status_tbr">Врем базал (TBR): %1$d%% на %2$d / %3$d мин</string>
<string name="short_status_extended">Пролонгированный: %1$.2f / %2$.2f U за %3$d мин</string> <string name="short_status_extended">Пролонгированный: %1$.2f / %2$.2f U за %3$d мин</string>
<string name="short_status_multiwave">Пролонгированный: %1$.2f / %2$.2f U за %3$d мин</string> <string name="short_status_multiwave">Пролонгированный: %1$.2f / %2$.2f U за %3$d мин</string>
<string name="short_status_tdd">Суммарный инсулин TDD: %1$.2f</string> <string name="short_status_tdd">Суммарный инсулин TDD: %1$.2f</string>

View file

@ -1213,4 +1213,5 @@
<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">Následujúce dáta budú nahraté do vašeho účtu Open Humans: hodnoty glykémie, bolusy, sacharidy, udalosti starostlivosti (okrem poznámok), rozložené bolusy, prepnutia profilov, celkové denné dávky, dočasné bazály, nastavenia, verzia aplikácie, model zariadenia a rozmery obrazovky. Tajné, alebo súkromné informácie, ako je URL, alebo API heslo vašeho Nightscoutu, nahraté nebudú.</string>
</resources> </resources>

View file

@ -45,6 +45,7 @@
<string name="description_food">Displays the food presets defined in Nightscout</string> <string name="description_food">Displays the food presets defined in Nightscout</string>
<string name="description_insulin_rapid">Insulin preset for Humalog and NovoRapid / NovoLog</string> <string name="description_insulin_rapid">Insulin preset for Humalog and NovoRapid / NovoLog</string>
<string name="description_insulin_ultra_rapid">Insulin preset for Fiasp</string> <string name="description_insulin_ultra_rapid">Insulin preset for Fiasp</string>
<string name="description_insulin_lyumjev">Insulin preset for Lyumjev</string>
<string name="description_insulin_free_peak">Allows you to define the peak of the insulin activity and should only be used by advanced users</string> <string name="description_insulin_free_peak">Allows you to define the peak of the insulin activity and should only be used by advanced users</string>
<string name="description_loop">Activate or deactivate the implementation triggering the loop.</string> <string name="description_loop">Activate or deactivate the implementation triggering the loop.</string>
<string name="description_ns_client">Synchronizes your data with Nightscout</string> <string name="description_ns_client">Synchronizes your data with Nightscout</string>
@ -630,6 +631,7 @@
<string name="free_peak_oref">Free-Peak Oref</string> <string name="free_peak_oref">Free-Peak Oref</string>
<string name="rapid_acting_oref">Rapid-Acting Oref</string> <string name="rapid_acting_oref">Rapid-Acting Oref</string>
<string name="ultrarapid_oref">Ultra-Rapid Oref</string> <string name="ultrarapid_oref">Ultra-Rapid Oref</string>
<string name="lyumjev">Lyumjev</string>
<string name="dia_too_short">DIA of %1$f too short - using %2$f instead!</string> <string name="dia_too_short">DIA of %1$f too short - using %2$f instead!</string>
<string name="activate_profile">Activate profile</string> <string name="activate_profile">Activate profile</string>
<string name="invalid">INVALID</string> <string name="invalid">INVALID</string>
@ -949,6 +951,8 @@
<string name="bgsourcesetup">Configure BG source</string> <string name="bgsourcesetup">Configure BG source</string>
<string name="setupwizard_profile_description">Please select source of profile. If patient is a child you should use NS profile. If there is nobody following you on Nightscout you will probably prefer Local profile. Please remember that you are only selecting the profile source. To use it you must activate it by executing \"Profile switch\"</string> <string name="setupwizard_profile_description">Please select source of profile. If patient is a child you should use NS profile. If there is nobody following you on Nightscout you will probably prefer Local profile. Please remember that you are only selecting the profile source. To use it you must activate it by executing \"Profile switch\"</string>
<string name="setupwizard_aps_description">Select one from availables algorithms. They are sorted from oldest to newest. Newer algorithm is usually more powerful and more aggressive. Thus if you are new looper you may probably start with AMA and not with latest one. Do not forget to read the OpenAPS documentation and configure it before use.</string> <string name="setupwizard_aps_description">Select one from availables algorithms. They are sorted from oldest to newest. Newer algorithm is usually more powerful and more aggressive. Thus if you are new looper you may probably start with AMA and not with latest one. Do not forget to read the OpenAPS documentation and configure it before use.</string>
<string name="setupwizard_pump_waiting_for_riley_link_connection">Waiting for RileyLink connection…\n</string>
<string name="setupwizard_pump_pump_not_initialized"><b>Note:</b> You can continue setup once the pump has been initialized.\n</string>
<string name="startobjective">Start your first objective</string> <string name="startobjective">Start your first objective</string>
<string name="permission">Permission</string> <string name="permission">Permission</string>
<string name="askforpermission">Ask for permission</string> <string name="askforpermission">Ask for permission</string>

View file

@ -0,0 +1,65 @@
package info.nightscout.androidaps.plugins.insulin
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.R
import info.nightscout.androidaps.interfaces.InsulinInterface
import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.plugins.bus.RxBusWrapper
import info.nightscout.androidaps.interfaces.ProfileFunction
import info.nightscout.androidaps.utils.resources.ResourceHelper
import org.junit.Assert.assertEquals
import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.mockito.ArgumentMatchers.eq
import org.mockito.Mock
import org.mockito.Mockito.`when`
import org.mockito.junit.MockitoJUnit
import org.mockito.junit.MockitoRule
class InsulinLyumjevPluginTest {
@get:Rule
val mockitoRule: MockitoRule = MockitoJUnit.rule()
private lateinit var sut: InsulinLyumjevPlugin
@Mock lateinit var resourceHelper: ResourceHelper
@Mock lateinit var rxBus: RxBusWrapper
@Mock lateinit var profileFunction: ProfileFunction
@Mock lateinit var aapsLogger: AAPSLogger
private var injector: HasAndroidInjector = HasAndroidInjector {
AndroidInjector {
}
}
@Before
fun setup() {
sut = InsulinLyumjevPlugin(injector, resourceHelper, profileFunction, rxBus, aapsLogger)
}
@Test
fun `simple peak test`() {
assertEquals(45, sut.peak)
}
@Test
fun getIdTest() {
assertEquals(InsulinInterface.OREF_LYUMJEV, sut.id)
}
@Test
fun commentStandardTextTest() {
`when`(resourceHelper.gs(eq(R.string.lyumjev))).thenReturn("Lyumjev")
assertEquals("Lyumjev", sut.commentStandardText())
}
@Test
fun getFriendlyNameTest() {
`when`(resourceHelper.gs(eq(R.string.lyumjev))).thenReturn("Lyumjev")
assertEquals("Lyumjev", sut.friendlyName)
}
}

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"
}
} }

View file

@ -13,7 +13,8 @@ buildscript {
coroutinesVersion = '1.3.7' coroutinesVersion = '1.3.7'
activityVersion = '1.2.0-alpha06' activityVersion = '1.2.0-alpha06'
fragmentVersion = '1.3.0-alpha07' fragmentVersion = '1.3.0-alpha07'
ormLiteVersion = "4.46" ormLiteVersion = '4.46'
nav_version = '2.3.0'
} }
repositories { repositories {
google() google()

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

@ -13,6 +13,7 @@ public interface InsulinInterface {
int OREF_RAPID_ACTING = 2; int OREF_RAPID_ACTING = 2;
int OREF_ULTRA_RAPID_ACTING = 3; int OREF_ULTRA_RAPID_ACTING = 3;
int OREF_FREE_PEAK = 4; int OREF_FREE_PEAK = 4;
int OREF_LYUMJEV = 5;
int getId(); int getId();

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,11 +1,10 @@
package info.nightscout.androidaps.utils package info.nightscout.androidaps.utils
import android.os.Build
import android.text.Html import android.text.Html
import android.text.Spanned import android.text.Spanned
object HtmlHelper { object HtmlHelper {
fun fromHtml(source: String): Spanned { fun fromHtml(source: String): Spanned {
return Html.fromHtml(source, Html.FROM_HTML_MODE_LEGACY) return Html.fromHtml(source, Html.FROM_HTML_MODE_LEGACY)
} }
} }

View file

@ -25,6 +25,7 @@ object AlertDialogHelper {
val titleLayout = LayoutInflater.from(ContextThemeWrapper(context, themeResId)).inflate(layoutResource, null) val titleLayout = LayoutInflater.from(ContextThemeWrapper(context, themeResId)).inflate(layoutResource, null)
(titleLayout.findViewById<View>(R.id.alertdialog_title) as TextView).text = title (titleLayout.findViewById<View>(R.id.alertdialog_title) as TextView).text = title
(titleLayout.findViewById<View>(R.id.alertdialog_icon) as ImageView).setImageResource(iconResource) (titleLayout.findViewById<View>(R.id.alertdialog_icon) as ImageView).setImageResource(iconResource)
titleLayout.findViewById<View>(R.id.alertdialog_title).setSelected(true)
return titleLayout return titleLayout
} }

View file

@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?><!--
<!--
Loading this view directly, without proper Theme, will likely result in crash due to lack of ?dialog... attribute definitions Loading this view directly, without proper Theme, will likely result in crash due to lack of ?dialog... attribute definitions
Please use AlertDialogHelper or wrap inflater context with ContextThemeWrapper(context, R.style.AppTheme) Please use AlertDialogHelper or wrap inflater context with ContextThemeWrapper(context, R.style.AppTheme)
--> -->
@ -29,8 +28,14 @@
android:layout_centerInParent="true" android:layout_centerInParent="true"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_marginStart="2dp" android:layout_marginStart="2dp"
android:layout_marginEnd="50dp" android:layout_marginEnd="40dp"
android:layout_toEndOf="@id/alertdialog_icon" android:layout_toEndOf="@id/alertdialog_icon"
android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:marqueeRepeatLimit="marquee_forever"
android:scrollHorizontally="true"
android:singleLine="true"
android:textAlignment="center" android:textAlignment="center"
android:textAppearance="?android:attr/textAppearanceLarge" android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="?dialogTitleColor" /> android:textColor="?dialogTitleColor" />

View file

@ -2,27 +2,216 @@
<resources> <resources>
<!-- Keys--> <!-- Keys-->
<!-- General--> <!-- General-->
<string name="error">Feil</string>
<string name="not_set_short">Ikke angitt</string>
<string name="failedupdatebasalprofile">Kunne ikke oppdatere basal profil</string>
<string name="profile_set_ok">Basal profil i pumpen er oppdatert</string>
<string name="invalidinput">Ugyldig inndata</string>
<string name="tempbasaldeliveryerror">Feil ved justering av Temp Basal</string>
<string name="goingtodeliver">Kommer til å levere %1$.2f enheter</string>
<string name="waitingforpump">Venter på pumpen</string>
<string name="connectingfor">Tilkobler i %1$d sek</string>
<string name="bolusdelivering">Leverer %1$.2f enheter</string>
<string name="handshaking">Tilkobling verifiseres</string>
<string name="connecting">Tilkobler</string>
<string name="connected">Tilkoblet</string>
<string name="disconnected">Frakoblet</string>
<string name="disconnecting">Frakobler</string>
<string name="androidaps_start">AndroidAPS startet</string>
<string name="formatinsulinunits1">%1$.1f E</string>
<string name="formatinsulinunits">%1$.2f E</string>
<string name="formatsignedinsulinunits">%1$+.2f E</string>
<string name="format_carbs">%1$d g</string>
<string name="reservoirvalue">%1$.0f / %2$d E</string>
<string name="pump_basebasalrate">%1$.2f E/t</string>
<string name="format_hours">%1$.2f t</string>
<string name="format_mins">%1$d min</string>
<string name="pumpbusy">Pumpen er opptatt</string>
<string name="connectionerror">Tilkoblingsfeil til pumpe</string>
<string name="youareonallowedlimit">Du har nådd din tillatte grense</string>
<string name="objectives">Opplæringsmål</string>
<string name="close">Lukk</string>
<string name="please_wait">Vennligst vent…</string>
<string name="mute">Lyd av</string>
<string name="reload">Last på nytt</string>
<string name="stoppressed">STOPP trykket</string>
<string name="stop">Stopp</string>
<string name="carbs">Karbohydrater</string>
<string name="invalidprofile">Ugyldig profil!!!</string>
<string name="noprofileset">INGEN PROFIL VALGT</string>
<string name="date">Dato</string>
<string name="units_label">Enheter</string>
<string name="dia_label">DIA</string>
<string name="ic_label">IK</string>
<string name="isf_label">ISF</string>
<string name="basal_label">Basal</string>
<string name="target_label">Målverdi</string>
<string name="initializing">Starter opp...</string>
<string name="serialnumber">Serienummer</string>
<string name="battery_label">Batteri</string>
<string name="lastconnection_label">Siste tilkobling</string>
<string name="lastbolus_label">Siste bolus</string>
<string name="dailyunits">Daglige enheter</string>
<string name="basebasalrate_label">Basis basal dose</string>
<string name="tempbasal_label">Temp basal</string>
<string name="virtualpump_extendedbolus_label">Forlenget bolus</string>
<string name="reservoir_label">Reservoar</string>
<string name="pumphistory">Pumpe historikk</string>
<string name="viewprofile">Vis profil</string>
<string name="eventtype">Hendelsestype</string>
<string name="mgdl">mg/dl</string>
<string name="mmol">mmol/l</string>
<string name="advancedsettings_title">Avanserte innstillinger</string>
<string name="bluetooth">Bluetooth</string>
<string name="btwatchdog_title">BT overvåker</string>
<string name="btwatchdog_summary">Restarter telefonens bluetooth i ett sekund hvis tilkobling til pumpen mislykkes. Dette hjelper på enkelte telefoner hvor bluetooth av og til stopper.</string>
<string name="pairing">Kobler sammen</string>
<!-- Constraints--> <!-- Constraints-->
<string name="limitingbasalratio">Begrenser maks basal dose til %1$.2f E/t på grunn av %2$s</string>
<string name="pumplimit">pumpebegrensning</string>
<string name="limitingpercentrate">Begrenser maks prosent sats til %1$d%% på grunn av %2$s</string>
<string name="itmustbepositivevalue">det på være positiv verdi</string>
<string name="limitingbolus">Begrenser bolus til %1$.1f E på grunn av %2$s</string>
<string name="pumpNotInitializedProfileNotSet">Pumpen ikke initialisert, ingen profil valgt!</string>
<!-- Dialogs--> <!-- Dialogs-->
<string name="confirmation">Bekreftelse</string>
<string name="message">Melding</string>
<string name="ok">OK</string>
<string name="cancel">Avbryt</string>
<string name="dismiss">Avvis</string>
<!-- BlePreCheck--> <!-- BlePreCheck-->
<string name="ble_not_supported">Lavenergi Bluetooth BLE er ikke støttet.</string>
<string name="ble_not_enabled">Bluetooth er ikke aktivert.</string>
<string name="location_not_found_title">Stedstjeneste er ikke aktivert</string>
<string name="location_not_found_message">Bluetooth søk på nye mobiler virker bare når posisjonstjeneste er aktivert. AAPS lagrer ikke dine posisjonsdata og den kan derfor slås av etter vellykket sammenkobling.</string>
<!-- DateUtil--> <!-- DateUtil-->
<string name="minago">%1$d min siden</string>
<string name="hoursago">%1$.1f timer siden</string>
<string name="shorthour">t</string>
<string name="days">dager</string>
<string name="hours">timer</string>
<string name="unit_second">sekund</string>
<string name="unit_minute">minutt</string>
<string name="unit_hour">time</string>
<string name="unit_day">dag</string>
<string name="unit_week">uke</string>
<string name="unit_seconds">sekunder</string>
<string name="unit_minutes">minutter</string>
<string name="unit_hours">timer</string>
<string name="unit_days">dager</string>
<string name="unit_weeks">uker</string>
<string name="shortminute">m</string>
<string name="shortday">d</string>
<!-- Protection--> <!-- Protection-->
<string name="wrongpassword">Feil passord</string>
<string name="passwords_dont_match">Passord stemmer ikke overens</string>
<!-- Profile--> <!-- Profile-->
<string name="basalprofilenotaligned">Basal verdier er ikke angitt på hele timer: %1$s</string>
<string name="minimalbasalvaluereplaced">Basal verdi erstattet med laveste tillate verdi: %1$s</string>
<string name="maximumbasalvaluereplaced">Basal verdi erstattet med høyeste tillate verdi: %1$s</string>
<string name="profile_per_unit">/E</string>
<string name="profile_ins_units_per_hour">E/t</string>
<string name="profile_carbs_per_unit">g/E</string>
<!-- ProfileFunction--> <!-- ProfileFunction-->
<string name="noprofileselected">Ingen profil valgt</string>
<!-- PumpType--> <!-- PumpType-->
<string name="def_extended_note">* Bare konkrete verdier støttes som granularitet for basal/bolus i virtuell pumpe, ingen verdiområder.</string>
<!-- APSResult--> <!-- APSResult-->
<string name="canceltemp">Avbryt temp basal</string>
<string name="let_temp_basal_run">Fortsett temp basal</string>
<string name="rate">Dose</string>
<string name="duration">Varighet</string>
<string name="reason">Årsak</string>
<string name="nochangerequested">Ingen endring behøves</string>
<!-- ProfileSwitch--> <!-- ProfileSwitch-->
<string name="zerovalueinprofile">Ugyldig profil: %1$s</string>
<!-- Temptarget--> <!-- Temptarget-->
<string name="mins">%1$d min</string>
<!-- TDD--> <!-- TDD-->
<string name="tddformat"><![CDATA[<b>%1$s:</b> ∑: <b>%2$.2f E</b> Bol: <b>%3$.2f E</b> Bas: <b>%4$.2f E(%5$.0f%%)</b>]]></string>
<string name="tddwithcarbsformat"><![CDATA[<b>%1$s:</b> ∑: <b>%2$.2f E</b> Bol: <b>%3$.2f E</b> Bas: <b>%4$.2f E(%5$.0f%%)</b> Karbo: <b>%6$.0f g</b>]]></string>
<!-- Translator--> <!-- Translator-->
<string name="careportal_bgcheck">BS kontroll</string>
<string name="careportal_mbg">Manuelt BS eller kalibrering</string>
<string name="careportal_announcement">Melding</string>
<string name="careportal_note">Merknad</string>
<string name="careportal_question">Spørsmål</string>
<string name="careportal_exercise">Trening</string>
<string name="careportal_pumpsitechange">Bytte av pumpens kanyle</string>
<string name="careportal_cgmsensorinsert">Bytte av CGM sensor</string>
<string name="careportal_cgmsensorstart">CGM sensor start</string>
<string name="careportal_insulincartridgechange">Bytte insulinreservoar</string>
<string name="careportal_profileswitch">Profil bytte</string>
<string name="careportal_snackbolus">Mellommåltids bolus</string>
<string name="careportal_mealbolus">Måltids bolus</string>
<string name="careportal_correctionbolus">Korreksjons bolus</string>
<string name="careportal_combobolus">Kombo bolus</string>
<string name="careportal_tempbasalstart">Temp Basal start</string>
<string name="careportal_tempbasalend">Temp basal slutt</string>
<string name="careportal_carbscorrection">Karbo korreksjon</string>
<string name="careportal_openapsoffline">OpenAPS offline</string>
<string name="careportal_pumpbatterychange">Bytte pumpebatteri</string>
<string name="careportal_temporarytarget">Temp mål</string>
<string name="careportal_temporarytargetcancel">Avbryt temp mål</string>
<string name="glucosetype_finger">Finger</string>
<string name="glucosetype_sensor">Sensor</string>
<string name="manual">Manuell</string>
<string name="unknown">ukjent</string>
<!-- Command--> <!-- Command-->
<string name="connectiontimedout">Tilkoblingen ble tidsavbrutt</string>
<!-- PumpEnactResult--> <!-- PumpEnactResult-->
<string name="enacted">Utført</string>
<string name="comment">Kommentar</string>
<string name="success">Suksess</string>
<string name="percent">Prosent</string>
<string name="absolute">Absolutt</string>
<string name="configbuilder_insulin">Insulin</string>
<string name="insulin_unit_shortname">E</string>
<string name="waitingforpumpresult">Venter på resultat</string>
<string name="smb_shortname">SMB</string>
<!-- CarbsReq--> <!-- CarbsReq-->
<string name="carbsreq">%d g ekstra karbo kreves innen %d minutter</string>
<!-- TDDStatsActivity--> <!-- TDDStatsActivity-->
<string name="stats">Statistikk</string>
<string name="cumulative_tdd">Akkumulert TDD</string>
<string name="expweight">Eksponentielt vektet TDD</string>
<string name="basalrate">Basal</string>
<string name="bolus">Bolus</string>
<string name="tdd">TDD</string>
<string name="ratio">Ratio</string>
<string name="amount_days">Antall dager</string>
<string name="weight">Vekt</string>
<string name="warning_Message">Kan vise feil hvis bolus brukes for priming/fylling!</string>
<string name="olddata_Message">Gamle data. Vennligst trykk \"HENT\"</string>
<string name="tbb">Total grunnbasal</string>
<string name="tbb2">TBB * 2</string>
<!-- Ntp--> <!-- Ntp-->
<string name="timedetection">Tidsdetektering</string>
<string name="format_hour_minute">%1$dt %2$dm</string>
<!-- PumoCommon - Pump Abstract --> <!-- PumoCommon - Pump Abstract -->
<string name="pump_operation_not_supported_by_pump_driver">Operasjonen støttes ikke av pumpen og/eller driveren.</string>
<string name="pump_operation_not_yet_supported_by_pump">Operasjonen støttes ikke av pumpen ennå.</string>
<string name="common_resultok">OK</string>
<!-- PumoCommon - Pump Status --> <!-- PumoCommon - Pump Status -->
<string name="pump_status_never_contacted">Aldri kontaktet</string>
<string name="pump_status_waking_up">Våkner opp</string>
<string name="pump_status_error_comm">Kommunikasjonsfeil</string>
<string name="pump_status_timeout_comm">Tidsavbrudd kommunikasjon</string>
<string name="pump_status_pump_unreachable">Pumpe utilgjengelig</string>
<string name="pump_status_invalid_config">Ugyldig oppsett</string>
<string name="pump_status_active">Aktiv</string>
<string name="pump_status_sleeping">Sover</string>
<!-- PumpCommon - History Group --> <!-- PumpCommon - History Group -->
<string name="history_group_basal">Basaldoser</string>
<string name="history_group_configuration">Innstillinger</string>
<string name="history_group_notification">Varsler</string>
<string name="history_group_statistic">Statistikk</string>
<string name="history_group_unknown">Ukjente</string>
<string name="history_group_all">Alle</string>
<string name="history_group_bolus">Boluser</string>
<string name="history_group_prime">Prime</string>
<string name="history_group_alarm">Alarmer</string>
<string name="history_group_glucose">Glukose</string>
<!-- <string name="medtronic_pump_status_never_contacted">Never contacted</string>--> <!-- <string name="medtronic_pump_status_never_contacted">Never contacted</string>-->
<!-- <string name="medtronic_pump_status_waking_up">Waking up</string>--> <!-- <string name="medtronic_pump_status_waking_up">Waking up</string>-->
<!-- <string name="medtronic_pump_status_error_comm">Error with communication</string>--> <!-- <string name="medtronic_pump_status_error_comm">Error with communication</string>-->

View file

@ -8,15 +8,22 @@
<string name="profile_set_ok">Profil bazowy w pompie uaktualniony</string> <string name="profile_set_ok">Profil bazowy w pompie uaktualniony</string>
<string name="invalidinput">Błędne dane wejściowe</string> <string name="invalidinput">Błędne dane wejściowe</string>
<string name="tempbasaldeliveryerror">Błąd podania bazy tymczasowej</string> <string name="tempbasaldeliveryerror">Błąd podania bazy tymczasowej</string>
<string name="goingtodeliver">Zamierzam podać %1$.2f U</string>
<string name="waitingforpump">Czekam na pompę</string> <string name="waitingforpump">Czekam na pompę</string>
<string name="connectingfor">Łączenie przez %1$d s</string> <string name="connectingfor">Łączenie przez %1$d s</string>
<string name="bolusdelivering">Podaję %1$.2f U</string>
<string name="handshaking">Uściskdłoni</string> <string name="handshaking">Uściskdłoni</string>
<string name="connecting">Łączę</string> <string name="connecting">Łączę</string>
<string name="connected">Połączono</string> <string name="connected">Połączono</string>
<string name="disconnected">Rozłączono</string> <string name="disconnected">Rozłączono</string>
<string name="disconnecting">Rozłączanie</string> <string name="disconnecting">Rozłączanie</string>
<string name="androidaps_start">AndroidAPS uruchomiony</string> <string name="androidaps_start">AndroidAPS uruchomiony</string>
<string name="formatinsulinunits1">%1$.1f U</string>
<string name="formatinsulinunits">%1$.2f U</string>
<string name="formatsignedinsulinunits">%1$+.2f U</string>
<string name="format_carbs">%1$d g</string>
<string name="reservoirvalue">%1$.0f / %2$d U</string> <string name="reservoirvalue">%1$.0f / %2$d U</string>
<string name="pump_basebasalrate">%1$.2f U/h</string>
<string name="format_hours">%1$.2f h</string> <string name="format_hours">%1$.2f h</string>
<string name="format_mins">%1$d min.</string> <string name="format_mins">%1$d min.</string>
<string name="pumpbusy">Pompa jest zajęta</string> <string name="pumpbusy">Pompa jest zajęta</string>
@ -78,6 +85,8 @@
<string name="location_not_found_title">Lokalizacja nie jest włączona</string> <string name="location_not_found_title">Lokalizacja nie jest włączona</string>
<string name="location_not_found_message">Aby uruchomić odnajdywanie Bluetooth na nowszych urządzeniach, lokalizacja musi być uruchomiona. AAPS nie śledzi twojej lokalizacji więc po udanym parowaniu urządzenia Bluetooth można wyłączyć lokalizację.</string> <string name="location_not_found_message">Aby uruchomić odnajdywanie Bluetooth na nowszych urządzeniach, lokalizacja musi być uruchomiona. AAPS nie śledzi twojej lokalizacji więc po udanym parowaniu urządzenia Bluetooth można wyłączyć lokalizację.</string>
<!-- DateUtil--> <!-- DateUtil-->
<string name="minago">%1$d min temu</string>
<string name="hoursago">%1$.1f godz. temu</string>
<string name="shorthour">h</string> <string name="shorthour">h</string>
<string name="days">dni</string> <string name="days">dni</string>
<string name="hours">godzin</string> <string name="hours">godzin</string>
@ -94,6 +103,8 @@
<string name="shortminute">m</string> <string name="shortminute">m</string>
<string name="shortday">d</string> <string name="shortday">d</string>
<!-- Protection--> <!-- Protection-->
<string name="wrongpassword">Złe hasło</string>
<string name="passwords_dont_match">Hasła się nie zgadzają</string>
<!-- Profile--> <!-- Profile-->
<string name="basalprofilenotaligned">Wartości bazy nie są ustawione w pełnych godzinach: %1$s</string> <string name="basalprofilenotaligned">Wartości bazy nie są ustawione w pełnych godzinach: %1$s</string>
<string name="minimalbasalvaluereplaced">Wartość bazy zastąpiona minimalną obsługiwaną wartością: %1$s</string> <string name="minimalbasalvaluereplaced">Wartość bazy zastąpiona minimalną obsługiwaną wartością: %1$s</string>
@ -115,9 +126,13 @@
<!-- ProfileSwitch--> <!-- ProfileSwitch-->
<string name="zerovalueinprofile">Nieprawidłowy profil: %1$s</string> <string name="zerovalueinprofile">Nieprawidłowy profil: %1$s</string>
<!-- Temptarget--> <!-- Temptarget-->
<string name="mins">%1$d min</string>
<!-- TDD--> <!-- TDD-->
<string name="tddformat"><![CDATA[<b>%1$s:</b> ∑: <b>%2$.2f U</b> Bol: <b>%3$.2f U</b> Baz: <b>%4$.2f U(%5$.0f%%)</b>]]></string>
<string name="tddwithcarbsformat"><![CDATA[<b>%1$s:</b> ∑: <b>%2$.2f U</b> Bol: <b>%3$.2f U</b> Baz: <b>%4$.2f U(%5$.0f%%)</b> Węgl.: <b>%6$.0f g</b>]]></string>
<!-- Translator--> <!-- Translator-->
<string name="careportal_bgcheck">Sprawdź BG</string> <string name="careportal_bgcheck">Sprawdź BG</string>
<string name="careportal_mbg">Ręczny pomiar cukru lub kalibracja</string>
<string name="careportal_announcement">Powiadomienie</string> <string name="careportal_announcement">Powiadomienie</string>
<string name="careportal_note">Notatka</string> <string name="careportal_note">Notatka</string>
<string name="careportal_question">Pytanie</string> <string name="careportal_question">Pytanie</string>
@ -155,6 +170,7 @@
<string name="waitingforpumpresult">Oczekiwanie na wynik</string> <string name="waitingforpumpresult">Oczekiwanie na wynik</string>
<string name="smb_shortname">SMB</string> <string name="smb_shortname">SMB</string>
<!-- CarbsReq--> <!-- CarbsReq-->
<string name="carbsreq">Zalecane podanie %d g węglowodanów w przeciągu %d minut</string>
<!-- TDDStatsActivity--> <!-- TDDStatsActivity-->
<string name="stats">Statystyki</string> <string name="stats">Statystyki</string>
<string name="cumulative_tdd">Kumulatywna TDD (dawka dzienna)</string> <string name="cumulative_tdd">Kumulatywna TDD (dawka dzienna)</string>
@ -171,10 +187,31 @@
<string name="tbb2">TBB * 2</string> <string name="tbb2">TBB * 2</string>
<!-- Ntp--> <!-- Ntp-->
<string name="timedetection">Wykrywanie czasu</string> <string name="timedetection">Wykrywanie czasu</string>
<string name="format_hour_minute">%1$dh %2$dm</string>
<!-- PumoCommon - Pump Abstract --> <!-- PumoCommon - Pump Abstract -->
<string name="pump_operation_not_supported_by_pump_driver">Operacja nie jest wspierana przez pompę i/lub sterownik pompy.</string>
<string name="pump_operation_not_yet_supported_by_pump">Operacja nie jest JESZCZE wspierana przez pompę.</string> <string name="pump_operation_not_yet_supported_by_pump">Operacja nie jest JESZCZE wspierana przez pompę.</string>
<string name="common_resultok">OK</string>
<!-- PumoCommon - Pump Status --> <!-- PumoCommon - Pump Status -->
<string name="pump_status_never_contacted">Nigdy nie połączona</string>
<string name="pump_status_waking_up">Wybudzanie</string>
<string name="pump_status_error_comm">Błąd komunikacji</string>
<string name="pump_status_timeout_comm">Przekroczony limit czasu połączenia</string>
<string name="pump_status_pump_unreachable">Pompa nieosiągalna</string>
<string name="pump_status_invalid_config">Nieprawidłowe ustawienia</string>
<string name="pump_status_active">Aktywna</string>
<string name="pump_status_sleeping">Uśpiona</string>
<!-- PumpCommon - History Group --> <!-- PumpCommon - History Group -->
<string name="history_group_basal">Dawki Bazowe</string>
<string name="history_group_configuration">Ustawienia</string>
<string name="history_group_notification">Powiadomienia</string>
<string name="history_group_statistic">Statystyki</string>
<string name="history_group_unknown">Nieznane</string>
<string name="history_group_all">Wszystko</string>
<string name="history_group_bolus">Bolusy</string>
<string name="history_group_prime">Napełnianie</string>
<string name="history_group_alarm">Alarmy</string>
<string name="history_group_glucose">Glukoza</string>
<!-- <string name="medtronic_pump_status_never_contacted">Never contacted</string>--> <!-- <string name="medtronic_pump_status_never_contacted">Never contacted</string>-->
<!-- <string name="medtronic_pump_status_waking_up">Waking up</string>--> <!-- <string name="medtronic_pump_status_waking_up">Waking up</string>-->
<!-- <string name="medtronic_pump_status_error_comm">Error with communication</string>--> <!-- <string name="medtronic_pump_status_error_comm">Error with communication</string>-->

View file

@ -1,2 +1,121 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources></resources> <resources>
<string name="danars_pairing">Kobler sammen</string>
<string name="danars_nodeviceavailable">Ingen enhet funnet foreløpig</string>
<string name="danars_pairingok">Sammenkobling OK</string>
<string name="danars_pairingtimedout">Sammenkobling ble tidsavbrutt</string>
<string name="danars_waitingforpairing">Venter på sammenkobling med pumpen</string>
<string name="danarspump">DanaRS</string>
<string name="danarspump_shortname">Dana</string>
<string name="description_pump_dana_rs">Pumpeintegrasjon for DANA Diabecare RS-pumper</string>
<string name="maxbolusviolation">Max bolus nådd</string>
<string name="commanderror">Kommando feil</string>
<string name="speederror">Hastighetsfeil</string>
<string name="insulinlimitviolation">Insulingrensen nådd</string>
<string name="boluserrorcode">Forespurt: %1$.2fE Levert: %2$.2fE Feilkode: %3$s</string>
<string name="danar_valuenotsetproperly">Verdien er ikke satt riktig</string>
<string name="danar_setbasalstep001">Sett basaltrinn til 0,01 E/t</string>
<string name="resetpairing">Tilbakestill sammenkoblingsinformasjon?</string>
<string name="dana_model">%1$s\nModell: %2$02X\nProtokoll: %3$02X\nKode: %4$02X</string>
<string name="processinghistory">Behandler hendelse</string>
<string name="danar_enableextendedbolus">Aktiver forlenget bolus på pumpen</string>
<string name="overview_bolusprogress_delivered">Levert</string>
<string name="overview_bolusprogress_stoped">Stoppet</string>
<string name="unsupportedfirmware">Pumpens firmvare støttes ikke</string>
<string name="pumperror">Pumpe feil</string>
<string name="lowbattery">Lavt batterinivå</string>
<string name="basalcompare">Levert mindre enn innstilt basaldose</string>
<string name="pumpshutdown">Pumpe avstenging</string>
<string name="batterydischarged">Pumpebatteri utladet</string>
<string name="occlusion">Okklusjon</string>
<string name="emptyreservoir">Tomt reservoar</string>
<string name="checkshaft">Kontroller aksel</string>
<string name="basalmax">Basal maks</string>
<string name="dailymax">Daglig maks</string>
<string name="bloodsugarmeasurementalert">Varsel for blodsukkermåling</string>
<string name="remaininsulinalert">Gjenværende insulinnivå</string>
<string name="missedbolus">Tapt bolus</string>
<string name="invalidpairing">Ugyldig parringsinformasjon. Krever ny sammenkobling</string>
<string name="gettingpumpstatus">Henter pumpestatus</string>
<string name="gettingextendedbolusstatus">Henter forlenget bolus status</string>
<string name="gettingbolusstatus">Henter bolus status</string>
<string name="gettingtempbasalstatus">Henter temp basal status</string>
<string name="gettingpumpsettings">Henter pumpe innstillinger</string>
<string name="gettingpumptime">Henter pumpens tid</string>
<string name="largetimedifftitle">Stor tidsforskjell</string>
<string name="largetimediff">Stor tidsforskjell:\nTiden i pumpen skiller mer enn 1,5 timer fra mobilen.\nVennligst juster tid manuelt på pumpen og sørg for at lesing av loggen fra pumpen ikke fører til uventet oppførsel.\nHvis mulig, fjern loggen fra pumpen før du endrer klokkeslettet eller deaktiver lukket loop for én DIA periode etter siste feil oppføring i historikk, men minst én DIA fra nå.</string>
<string name="pairfirst">Vennligst koble pumpen til telefonen!</string>
<string name="approachingdailylimit">Maksimal daglig insulindose er snart nådd</string>
<string name="startingbolus">Starter bolus dosering</string>
<string name="waitingforestimatedbolusend">Venter på bolus slutt. Gjenværende %1$d sek.</string>
<string name="stoppingtempbasal">Stopper temp basal</string>
<string name="settingextendedbolus">Setter forlenget bolus</string>
<string name="stoppingextendedbolus">Stopper forlenget bolus</string>
<string name="updatingbasalrates">Oppdaterer basaldoser</string>
<string name="settingtempbasal">Setter temp basal</string>
<string name="waitingfortimesynchronization">Venter på tidsykronisering (%1$d sek)</string>
<string name="wrongpumppassword">Feil pumpepassord!</string>
<string name="danar_history_alarm">Alarmer</string>
<string name="danar_history_basalhours">Basal timer</string>
<string name="danar_history_bolus">Boluser</string>
<string name="danar_history_carbohydrates">Karbohydrater</string>
<string name="danar_history_dailyinsulin">Daglig insulin</string>
<string name="danar_history_errors">Feil</string>
<string name="danar_history_glucose">Glukose</string>
<string name="danar_history_refill">Påfyll</string>
<string name="danar_history_syspend">Pauset</string>
<string name="danar_history_prime">Prime</string>
<string name="danar_useroptions">Bruker valg</string>
<string name="danar_timedisplay">Format for visning av tid</string>
<string name="danar_buttonscroll">Knapprulling</string>
<string name="danar_beep">Pip ved knapptrykking</string>
<string name="danar_pumpalarm">Alarm</string>
<string name="danar_pumpalarm_sound">Lyd</string>
<string name="danar_pumpalarm_vibrate">Vibrer</string>
<string name="danar_pumpalarm_both">Begge</string>
<string name="danar_screentimeout">LCD i tid [seconds]</string>
<string name="danar_backlight">Bakgrunnsbelysning i tid [seconds]</string>
<string name="danar_glucoseunits">Glukoseenheter</string>
<string name="danar_shutdown">Stopp [hours]</string>
<string name="danar_lowreservoir">Lavt reservoar [Units]</string>
<string name="danar_saveuseroptions">Lagre valg til pumpen</string>
<string name="description_pump_dana_r">Pumpeintegrasjon for DANA Diabecare R pumper</string>
<string name="description_pump_dana_r_korean">Pumpeintegrasjon for DANA Diabecare R pumper, koreansk versjon</string>
<string name="description_pump_dana_r_v2">Pumpeintegrasjon for DANA Diabecare R pumper med oppgradert firmware</string>
<string name="danarpump_shortname">DANA</string>
<string name="nobtadapter">Ingen bluetooth adapter funnet</string>
<string name="devicenotfound">Fant ikke valgte enhet</string>
<string name="danar_switchtouhmode">Bytt modus fra E/d til E/t på pumpe</string>
<string name="danarkoreanpump">DanaR Koreansk</string>
<string name="danarpump">DanaR</string>
<string name="pumpdrivercorrected">Pumpedriver korrigert</string>
<string name="danarv2pump">DanaRv2</string>
<string name="danar_disableeasymode">Deaktiver EasyUI modus i pumpe</string>
<string name="profile_set_failed">Innstilling av basalprofil mislyktes</string>
<string name="danar_bluetooth_status">Status for Bluetooth</string>
<string name="danar_iob_label">Pumpens IOB</string>
<string name="basal_step">Basal trinn</string>
<string name="bolus_step">Bolus trinn</string>
<string name="virtualpump_firmware_label">Firmware</string>
<string name="danar_pump_settings">Innstillinger for Dana pumpe</string>
<string name="timeformat12h">12t</string>
<string name="timeformat24h">24t</string>
<string name="option_on"></string>
<string name="option_off">Av</string>
<string name="danar_bt_name_title">DanaR Bluetooth enhet</string>
<string name="danars_password_title">Pumpe passord (kun v1)</string>
<string name="danar_password_title">Pumpe passord</string>
<string name="danar_useextended_title">Bruk forlenget bolus i &gt;200%%</string>
<string name="danar_visualizeextendedaspercentage_title">Vis forlenget bolus som %%</string>
<string name="bolusspeed">Bolus hastighet</string>
<string name="selectedpump">Valgt pumpe</string>
<string name="rs_loginsulinchange_title">Logg reservoar bytte</string>
<string name="rs_loginsulinchange_summary">Legg til \"Insulinbytte\" i Careportal når den oppdages i historikken</string>
<string name="rs_logcanulachange_title">Logg kanyle bytte</string>
<string name="rs_logcanulachange_summary">Legg til \"Kanylebytte\" i Careportal når den oppdages i historikken</string>
<string name="pin1">PIN1</string>
<string name="pin2">PIN2</string>
<string name="press_ok_on_the_pump">Trykk OK på pumpen\nog skriv inn de 2 viste tallene\nHold skjermen på pumpen PÅ ved å trykke minus knappen til du fullfører inntastingen.</string>
<string name="num1pin">1: (12 tall)</string>
<string name="num2pin">2: (8 tall)</string>
</resources>

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

@ -1,8 +1,46 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<!-- Medtronic (MDT) - Base --> <!-- Medtronic (MDT) - Base -->
<string name="description_pump_medtronic">Tilkobling av Medtronic pumpe krever en RileyLink enhet og spesifikk pumpemodell</string>
<!-- MDT Configuration --> <!-- MDT Configuration -->
<string name="medtronic_serial_number">Pumpens serienummer</string>
<string name="medtronic_pump_type">Pumpens modellnummer</string>
<string name="medtronic_pump_frequency">Pumpens frekvens</string>
<string name="medtronic_pump_bolus_delay">Forsinkelse før Bolus dose startes (sek)</string>
<string name="medtronic_pump_max_bolus">Maks Bolus dose på pumpen (Enheter)</string>
<string name="medtronic_pump_max_basal">Maks Basal på pumpen (Enheter/time)</string>
<string name="medtronic_pump_encoding">Medtronic koding</string>
<string name="medtronic_pump_frequency_us_ca">USA &amp; Canada (916 MHz)</string>
<string name="medtronic_pump_frequency_worldwide">Worldwide (868 Mhz)</string>
<string name="medtronic_pump_encoding_4b6b_local">Software 4b6b koding</string>
<string name="medtronic_pump_encoding_4b6b_rileylink">Hardware 4b6b koding</string>
<string name="medtronic_custom_action_wake_and_tune">Oppstart og enhetssøk</string>
<string name="medtronic_custom_action_clear_bolus_block">Nullstill Bolus blokk</string>
<string name="medtronic_custom_action_reset_rileylink">Tilbakestill RileyLink oppsett</string>
<string name="medtronic_pump_battery_select">Batteri type (Strømvisning)</string>
<string name="medtronic_pump_battery_no">Ikke valgt (Enkel visning)</string>
<string name="medtronic_pump_battery_alkaline">Alkaline (Utvidet visning)</string>
<string name="medtronic_pump_battery_lithium">Lithium (Utvidet visning)</string>
<string name="medtronic_pump_battery_nizn">NiZn (Utvidet visning)</string>
<string name="medtronic_pump_battery_nimh">NiMH (Utvidet visning)</string>
<string name="medtronic_bolus_debugging">Feilsøking bolus/behandlingsinformasjon</string>
<!-- MDT Errors --> <!-- MDT Errors -->
<string name="medtronic_errors">Feil</string>
<string name="medtronic_error_serial_not_set">Serienummer ikke definert.</string>
<string name="medtronic_error_serial_invalid">Serienummer ikke gyldig.</string>
<string name="medtronic_error_pump_type_not_set">Pumpetype ikke definert.</string>
<string name="medtronic_error_pump_type_invalid">Pumpetypen støttes ikke.</string>
<string name="medtronic_error_pump_frequency_not_set">Pumpefrekvens ikke innstilt.</string>
<string name="medtronic_error_pump_frequency_invalid">Pumpefrekvensen støttes ikke.</string>
<string name="medtronic_error_rileylink_address_invalid">RileyLink adressen er ugyldig.</string>
<string name="medtronic_error_pump_type_set_differs_from_detected">Oppdaget pumpetype er forskjellig fra innstilt pumpetype.</string>
<string name="medtronic_error_pump_basal_profiles_not_enabled">Basal profil/program innstilling ikke aktivert. Aktiver denne på pumpen.</string>
<string name="medtronic_error_pump_incorrect_basal_profile_selected">Basalprofil på pumpen er feil (må være STANDARD).</string>
<string name="medtronic_error_pump_wrong_tbr_type_set">Feil TBR valgt på pumpen (må være E/timen).</string>
<string name="medtronic_error_pump_wrong_max_bolus_set">Feil maks bolus valgt på pumpe (må være %1$.2f).</string>
<string name="medtronic_error_pump_wrong_max_basal_set">Feil maks basal valgt på pumpe (må være %1$.2f).</string>
<string name="medtronic_error_operation_not_possible_no_configuration">Operasjon ikke mulig.\n\n Du må konfigurere Medtronic pumpen før du kan bruke denne operasjonen.</string>
<string name="medtronic_error_pump_24h_time_change_requested">Mer enn 24t tidsendring ble forespurt.</string>
<!-- MDT History --> <!-- MDT History -->
<!-- <string name="medtronic_history_group_basal">Basals</string>--> <!-- <string name="medtronic_history_group_basal">Basals</string>-->
<!-- <string name="medtronic_history_group_configuration">Configurations</string>--> <!-- <string name="medtronic_history_group_configuration">Configurations</string>-->
@ -10,8 +48,37 @@
<!-- <string name="medtronic_history_group_statistic">Statistics</string>--> <!-- <string name="medtronic_history_group_statistic">Statistics</string>-->
<!-- <string name="medtronic_history_group_unknown">Unknowns</string>--> <!-- <string name="medtronic_history_group_unknown">Unknowns</string>-->
<!-- <string name="medtronic_history_group_all">All</string>--> <!-- <string name="medtronic_history_group_all">All</string>-->
<string name="medtronic_pump_history">Medtronic pumpe historie</string>
<!-- <string name="medtronic_cmd_profile_not_set">Remote Basal profile setting is not supported. Please modify Basal profile on your pump manually.</string> --> <!-- <string name="medtronic_cmd_profile_not_set">Remote Basal profile setting is not supported. Please modify Basal profile on your pump manually.</string> -->
<string name="medtronic_cmd_cancel_bolus_not_supported">Du kansellerte bolus, etter at den var satt på pumpen. Siden Medtronic pumper ikke støtter kansellering må dette gjøres manuelt. STOPP pumpen og velg GJENOPPTA (hvis du fortsatt ønsker å kansellere). Applikasjon vil lese inn endringen på neste pumpeavlesing (innen 5 minutter).</string>
<string name="medtronic_cmd_cant_read_tbr">Kunne ikke lese gjeldende TBR.</string>
<string name="medtronic_cmd_cant_cancel_tbr_stop_op">Kunne ikke avbryte gjeldende TBR. Stopper operasjonen.</string>
<string name="medtronic_cmd_set_profile_pattern_overflow">Profil sett feilet fordi påfølgende basalverdi i programmet har for høy verdi: %1$s</string>
<string name="medtronic_cmd_bolus_could_not_be_delivered">Bolus dose kunne ikke leveres.</string>
<string name="medtronic_cmd_bolus_could_not_be_delivered_no_insulin">Bolus kunne ikke leveres fordi tilgjengelig insulinmengde (%1$.2f) er mindre enn nødvendig bolus (%2$.2f).</string>
<string name="medtronic_cmd_tbr_could_not_be_delivered">TBR kunne ikke settes.</string>
<string name="medtronic_cmd_cant_cancel_tbr">Kunne ikke avbryte gjeldende TBR.</string>
<string name="medtronic_cmd_basal_profile_could_not_be_set">Basalprofilen kunne ikke settes.</string>
<string name="medtronic_cmd_basal_profile_not_set_is_same">Basalprofilen er den samme, så den blir ikke satt igjen.</string>
<string name="medtronic_cmd_desc_get_history">Henter historikk - side %1$d (%2$d/16)</string>
<string name="medtronic_cmd_desc_get_history_request">Henter historikk - side %1$d</string>
<string name="medtronic_cmd_desc_get_time">Henter pumpe tid</string>
<string name="medtronic_cmd_desc_get_settings">Henter innstillinger</string>
<string name="medtronic_cmd_desc_get_model">Henter pumpe modell</string>
<string name="medtronic_cmd_desc_get_basal_profile">Henter basal profil</string>
<string name="medtronic_cmd_desc_set_basal_profile">Angi basal profil</string>
<string name="medtronic_cmd_desc_get_tbr">Henter Temp Basal</string>
<string name="medtronic_cmd_desc_set_tbr">Angi Temp Basal</string>
<string name="medtronic_cmd_desc_set_bolus">Angi Bolus</string>
<string name="medtronic_pump_status_pump_unreachable">Pumpe utilgjengelig</string>
<string name="medtronic_warning">Advarsel</string>
<!-- medtronic_warning --> <!-- medtronic_warning -->
<string name="medtronic_pump_connected_now"></string>
<!-- combo_pump_connected_now --> <!-- combo_pump_connected_now -->
<string name="ago">siden</string>
<string name="medtronic_notification_check_time_date">Pumpens tid må oppdateres</string>
<!-- combo_notification_check_time_date --> <!-- combo_notification_check_time_date -->
<string name="common_on"></string>
<string name="common_off">Av</string>
<string name="pump_time_updated">Pumpens tid ble oppdatert</string>
</resources> </resources>

View file

@ -25,6 +25,7 @@
<string name="medtronic_pump_battery_nimh">NiMH (widok rozszerzony)</string> <string name="medtronic_pump_battery_nimh">NiMH (widok rozszerzony)</string>
<string name="medtronic_bolus_debugging">Bolus/Leczenie - debugowanie</string> <string name="medtronic_bolus_debugging">Bolus/Leczenie - debugowanie</string>
<!-- MDT Errors --> <!-- MDT Errors -->
<string name="medtronic_errors">Błędy</string>
<string name="medtronic_error_serial_not_set">Numer seryjny # nie ustawiony.</string> <string name="medtronic_error_serial_not_set">Numer seryjny # nie ustawiony.</string>
<string name="medtronic_error_serial_invalid">Numer seryjny # nieprawidłowy.</string> <string name="medtronic_error_serial_invalid">Numer seryjny # nieprawidłowy.</string>
<string name="medtronic_error_pump_type_not_set">Tyo pompy nie ustawiony.</string> <string name="medtronic_error_pump_type_not_set">Tyo pompy nie ustawiony.</string>
@ -47,6 +48,7 @@
<!-- <string name="medtronic_history_group_statistic">Statistics</string>--> <!-- <string name="medtronic_history_group_statistic">Statistics</string>-->
<!-- <string name="medtronic_history_group_unknown">Unknowns</string>--> <!-- <string name="medtronic_history_group_unknown">Unknowns</string>-->
<!-- <string name="medtronic_history_group_all">All</string>--> <!-- <string name="medtronic_history_group_all">All</string>-->
<string name="medtronic_pump_history">Historia pompy Medtronic</string>
<!-- <string name="medtronic_cmd_profile_not_set">Remote Basal profile setting is not supported. Please modify Basal profile on your pump manually.</string> --> <!-- <string name="medtronic_cmd_profile_not_set">Remote Basal profile setting is not supported. Please modify Basal profile on your pump manually.</string> -->
<string name="medtronic_cmd_cancel_bolus_not_supported">Anulowałeś bolus po jego ustawieniu na pompie. Ponieważ pompa Medtronic nie wspiera polecenia anuluj, musisz wprowadzić zmianę ręcznie. Wprowadź pompę w stan zawieszenia, a następnie przywróć jej działanie (jeżeli wciąż chcesz anulować). Aplikacja pobierze zmiany przy następnym uaktualnieniu (poniżej 5 minut).</string> <string name="medtronic_cmd_cancel_bolus_not_supported">Anulowałeś bolus po jego ustawieniu na pompie. Ponieważ pompa Medtronic nie wspiera polecenia anuluj, musisz wprowadzić zmianę ręcznie. Wprowadź pompę w stan zawieszenia, a następnie przywróć jej działanie (jeżeli wciąż chcesz anulować). Aplikacja pobierze zmiany przy następnym uaktualnieniu (poniżej 5 minut).</string>
<string name="medtronic_cmd_cant_read_tbr">Nie udało się odczytać aktualnej dawki tymczasowej (TBR).</string> <string name="medtronic_cmd_cant_read_tbr">Nie udało się odczytać aktualnej dawki tymczasowej (TBR).</string>
@ -68,8 +70,15 @@
<string name="medtronic_cmd_desc_get_tbr">Pobierz tymczasową dawkę bazową</string> <string name="medtronic_cmd_desc_get_tbr">Pobierz tymczasową dawkę bazową</string>
<string name="medtronic_cmd_desc_set_tbr">Ustaw tymczasową dawkę bazową</string> <string name="medtronic_cmd_desc_set_tbr">Ustaw tymczasową dawkę bazową</string>
<string name="medtronic_cmd_desc_set_bolus">Ustaw bolus</string> <string name="medtronic_cmd_desc_set_bolus">Ustaw bolus</string>
<string name="medtronic_pump_status_pump_unreachable">Pompa nieosiągalna</string>
<string name="medtronic_warning">Ostrzeżenie</string>
<!-- medtronic_warning --> <!-- medtronic_warning -->
<string name="medtronic_pump_connected_now">Teraz</string>
<!-- combo_pump_connected_now --> <!-- combo_pump_connected_now -->
<string name="ago">temu</string>
<string name="medtronic_notification_check_time_date">Potrzebna aktualizacja zegara pompy</string>
<!-- combo_notification_check_time_date --> <!-- combo_notification_check_time_date -->
<string name="common_on">Włącz</string>
<string name="common_off">Wyłącz</string>
<string name="pump_time_updated">Czas pompy uaktualniony</string> <string name="pump_time_updated">Czas pompy uaktualniony</string>
</resources> </resources>

View file

@ -75,6 +75,8 @@ dependencies {
implementation 'androidx.core:core-ktx:1.2.0' implementation 'androidx.core:core-ktx:1.2.0'
implementation "androidx.preference:preference-ktx:1.1.1" implementation "androidx.preference:preference-ktx:1.1.1"
implementation "androidx.activity:activity-ktx:${activityVersion}" implementation "androidx.activity:activity-ktx:${activityVersion}"
implementation "androidx.fragment:fragment:${fragmentVersion}"
implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
implementation 'com.google.android.material:material:1.1.0' implementation 'com.google.android.material:material:1.1.0'
implementation 'com.google.firebase:firebase-analytics-ktx:17.4.3' implementation 'com.google.firebase:firebase-analytics-ktx:17.4.3'
@ -86,12 +88,9 @@ dependencies {
implementation "com.joanzapata.iconify:android-iconify-fontawesome:2.2.2" implementation "com.joanzapata.iconify:android-iconify-fontawesome:2.2.2"
// Omnipod - start
implementation 'org.apache.commons:commons-lang3:3.10' implementation 'org.apache.commons:commons-lang3:3.10'
implementation 'net.danlew:android.joda:2.10.6' implementation 'net.danlew:android.joda:2.10.6'
implementation "com.google.code.gson:gson:2.8.6" implementation "com.google.code.gson:gson:2.8.6"
implementation(name: "com.atech-software.android.library.wizardpager-1.1.4", ext: "aar")
// Omnipod - end
implementation "com.google.dagger:dagger-android:$dagger_version" implementation "com.google.dagger:dagger-android:$dagger_version"
implementation "com.google.dagger:dagger-android-support:$dagger_version" implementation "com.google.dagger:dagger-android-support:$dagger_version"
@ -100,6 +99,12 @@ dependencies {
kapt "com.google.dagger:dagger-android-processor:$dagger_version" kapt "com.google.dagger:dagger-android-processor:$dagger_version"
kapt "com.google.dagger:dagger-compiler:$dagger_version" kapt "com.google.dagger:dagger-compiler:$dagger_version"
// Navigation
implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
implementation "androidx.navigation:navigation-ui-ktx:$nav_version"
implementation 'com.google.android.material:material:1.1.0'
testImplementation 'junit:junit:4.13' testImplementation 'junit:junit:4.13'
testImplementation "org.mockito:mockito-core:2.8.47" testImplementation "org.mockito:mockito-core:2.8.47"
testImplementation "org.powermock:powermock-api-mockito2:$powermockVersion" testImplementation "org.powermock:powermock-api-mockito2:$powermockVersion"

View file

@ -9,8 +9,7 @@
<activity android:name=".ui.PodManagementActivity" /> <activity android:name=".ui.PodManagementActivity" />
<activity android:name=".ui.PodHistoryActivity" /> <activity android:name=".ui.PodHistoryActivity" />
<activity <activity android:name=".ui.wizard.activation.PodActivationWizardActivity" />
android:name="com.atech.android.library.wizardpager.WizardPagerActivity" <activity android:name=".ui.wizard.deactivation.PodDeactivationWizardActivity" />
android:theme="@style/AppTheme.NoActionBar" />
</application> </application>
</manifest> </manifest>

View file

@ -12,15 +12,13 @@ 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.Date; import java.util.Date;
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;
@ -44,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;
@ -53,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;
@ -71,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;
@ -81,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.OmnipodOverviewFragment;
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;
@ -104,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;
@ -112,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;
@ -124,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 List<OmnipodStatusRequestType> statusRequestList = new ArrayList<>(); 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
@ -136,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(
@ -161,15 +164,16 @@ 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) //
.fragmentClass(OmnipodFragment.class.getName()) // .fragmentClass(OmnipodOverviewFragment.class.getName()) //
.pluginName(R.string.omnipod_name) // .pluginName(R.string.omnipod_name) //
.shortName(R.string.omnipod_name_short) // .shortName(R.string.omnipod_name_short) //
.preferencesId(R.xml.pref_omnipod) // .preferencesId(R.xml.pref_omnipod) //
.description(R.string.description_pump_omnipod), // .description(R.string.omnipod_pump_description), //
injector, aapsLogger, resourceHelper, commandQueue); injector, aapsLogger, resourceHelper, commandQueue);
this.aapsLogger = aapsLogger; this.aapsLogger = aapsLogger;
this.rxBus = rxBus; this.rxBus = rxBus;
@ -186,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) {
@ -228,14 +230,11 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface,
aapsOmnipodManager.createSuspendedFakeTbrIfNotExists(); aapsOmnipodManager.createSuspendedFakeTbrIfNotExists();
} }
if (!getCommandQueue().statusInQueue()) { if (OmnipodPumpPlugin.this.hasTimeDateOrTimeZoneChanged) {
if (!OmnipodPumpPlugin.this.statusRequestList.isEmpty()) { getCommandQueue().customCommand(new CommandHandleTimeChange(false), null);
getCommandQueue().readStatus("Status Refresh Requested", null); }
} else if (OmnipodPumpPlugin.this.hasTimeDateOrTimeZoneChanged) { if (!OmnipodPumpPlugin.this.verifyPodAlertConfiguration()) {
getCommandQueue().readStatus("Date or Time Zone Changed", null); getCommandQueue().customCommand(new CommandUpdateAlertConfiguration(), null);
} else if (!OmnipodPumpPlugin.this.verifyPodAlertConfiguration()) {
getCommandQueue().readStatus("Expiration Alerts Changed", null);
}
} }
doPodCheck(); doPodCheck();
@ -288,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)
@ -316,13 +315,17 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface,
); );
} }
public boolean isRileyLinkReady() {
return rileyLinkServiceData.rileyLinkServiceState.isReady();
}
private void updateAapsTbr() { private void updateAapsTbr() {
// As per the characteristics of the Omnipod, we only know whether or not a TBR is currently active // As per the characteristics of the Omnipod, we only know whether or not a TBR is currently active
// But it doesn't tell us the duration or amount, so we can only update TBR status in AAPS if // But it doesn't tell us the duration or amount, so we can only update TBR status in AAPS if
// 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();
} }
@ -348,13 +351,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_confirmation_pod_suspended), Notification.NORMAL);
rxBus.send(new EventNewNotification(notification)); rxBus.send(new EventNewNotification(notification));
} else {
rxBus.send(new EventDismissNotification(Notification.OMNIPOD_POD_SUSPENDED));
} }
} }
@ -362,7 +361,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();
@ -442,109 +440,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 (!statusRequestList.isEmpty()) { firstRun = false;
Iterator<OmnipodStatusRequestType> iterator = statusRequestList.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;
default:
aapsLogger.error(LTag.PUMP, "Unknown status request: " + statusRequest.name());
}
iterator.remove();
}
} else if (this.hasTimeDateOrTimeZoneChanged) {
PumpEnactResult result = executeCommand(OmnipodCommandType.SET_TIME, aapsOmnipodManager::setTime);
if (result.success) {
this.hasTimeDateOrTimeZoneChanged = false;
timeChangeRetries = 0;
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) {
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);
@ -563,7 +475,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
@ -618,7 +530,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
@ -660,7 +572,12 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface,
return new PumpEnactResult(getInjector()).success(true).enacted(false); return new PumpEnactResult(getInjector()).success(true).enacted(false);
} }
return executeCommand(OmnipodCommandType.CANCEL_TEMPORARY_BASAL, aapsOmnipodManager::cancelTemporaryBasal); isCancelTempBasalRunning = true;
try {
return executeCommand(OmnipodCommandType.CANCEL_TEMPORARY_BASAL, aapsOmnipodManager::cancelTemporaryBasal);
} finally {
isCancelTempBasalRunning = false;
}
} }
// TODO improve (i8n and more) // TODO improve (i8n and more)
@ -719,12 +636,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()) : "-";
@ -779,18 +696,145 @@ 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 DEACTIVATE_POD:
return executeCommand(OmnipodCommandType.DEACTIVATE_POD, aapsOmnipodManager::deactivatePod);
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_on_pod_updated),
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 (aapsOmnipodManager.isTimeChangeEventEnabled() && 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;
} }
} }
@ -819,10 +863,6 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface,
return false; return false;
} }
public void addPodStatusRequest(OmnipodStatusRequestType pumpStatusRequest) {
statusRequestList.add(pumpStatusRequest);
}
@Override @Override
public boolean isFakingTempsByExtendedBoluses() { public boolean isFakingTempsByExtendedBoluses() {
return false; return false;
@ -853,50 +893,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);
} }
private void initializeAfterRileyLinkConnection() { private void initializeAfterRileyLinkConnection() {
if (podStateManager.isPodInitialized() && podStateManager.getPodProgressStatus().isAtLeast(PodProgressStatus.PAIRING_COMPLETED)) { if (podStateManager.isPodInitialized() && podStateManager.getPodProgressStatus().isAtLeast(PodProgressStatus.PAIRING_COMPLETED)) {
PumpEnactResult result = executeCommand(OmnipodCommandType.GET_POD_STATUS, aapsOmnipodManager::getPodStatus); for (int i = 0; STARTUP_STATUS_REQUEST_TRIES > i; i++) {
if (result.success) { PumpEnactResult result = executeCommand(OmnipodCommandType.GET_POD_STATUS, aapsOmnipodManager::getPodStatus);
aapsLogger.debug(LTag.PUMP, "Successfully retrieved Pod status on startup"); if (result.success) {
} else { aapsLogger.debug(LTag.PUMP, "Successfully retrieved Pod status on startup");
aapsLogger.warn(LTag.PUMP, "Failed to retrieve Pod status on startup"); break;
} else {
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) {
@ -914,19 +951,14 @@ 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));
T pumpEnactResult = supplier.get(); return supplier.get();
} finally {
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());
return pumpEnactResult;
} finally {
currentCommand = null;
} }
} }
@ -946,7 +978,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

@ -0,0 +1,38 @@
package info.nightscout.androidaps.plugins.pump.omnipod.dagger
import androidx.lifecycle.ViewModel
import androidx.lifecycle.ViewModelProvider
import dagger.MapKey
import javax.inject.Inject
import javax.inject.Provider
import javax.inject.Qualifier
import javax.inject.Scope
import kotlin.reflect.KClass
@Qualifier
annotation class OmnipodPluginQualifier
@Target(AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER)
@kotlin.annotation.Retention(AnnotationRetention.RUNTIME)
@MapKey
internal annotation class ViewModelKey(val value: KClass<out ViewModel>)
// TODO: These annotations and Factories could be used globally -> move to core or app
@Suppress("UNCHECKED_CAST")
class ViewModelFactory @Inject constructor(
private val viewModels: MutableMap<Class<out ViewModel>, @JvmSuppressWildcards Provider<ViewModel>>
) : ViewModelProvider.Factory {
override fun <T : ViewModel> create(modelClass: Class<T>): T = viewModels[modelClass]?.get() as T
}
@MustBeDocumented
@Scope
@Retention(AnnotationRetention.RUNTIME)
annotation class ActivityScope
@MustBeDocumented
@Scope
@Retention(AnnotationRetention.RUNTIME)
annotation class FragmentScope

View file

@ -9,11 +9,8 @@ import info.nightscout.androidaps.plugins.pump.omnipod.manager.AapsPodStateManag
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.ui.PodHistoryActivity 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.activation.PodActivationWizardActivity
import info.nightscout.androidaps.plugins.pump.omnipod.ui.wizard.initpod.InitPodTask import info.nightscout.androidaps.plugins.pump.omnipod.ui.wizard.deactivation.PodDeactivationWizardActivity
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.removepod.RemoveActionFragment
@Module @Module
@Suppress("unused") @Suppress("unused")
@ -24,21 +21,23 @@ abstract class OmnipodModule {
abstract fun contributesPodManagementActivity(): PodManagementActivity abstract fun contributesPodManagementActivity(): PodManagementActivity
@ContributesAndroidInjector abstract fun contributesPodHistoryActivity(): PodHistoryActivity @ContributesAndroidInjector abstract fun contributesPodHistoryActivity(): PodHistoryActivity
// Fragments @ActivityScope
@ContributesAndroidInjector abstract fun initActionFragment(): InitActionFragment @ContributesAndroidInjector(modules = [OmnipodWizardModule::class])
@ContributesAndroidInjector abstract fun removeActionFragment(): RemoveActionFragment abstract fun contributesActivationWizardActivity(): PodActivationWizardActivity
@ContributesAndroidInjector abstract fun podInfoFragment(): PodInfoFragment
@ActivityScope
@ContributesAndroidInjector(modules = [OmnipodWizardModule::class])
abstract fun contributesDeactivationWizardActivity(): PodDeactivationWizardActivity
// Service // Service
@ContributesAndroidInjector @ContributesAndroidInjector
abstract fun omnipodCommunicationManagerProvider(): OmnipodRileyLinkCommunicationManager abstract fun omnipodCommunicationManagerProvider(): OmnipodRileyLinkCommunicationManager
// Data // Data
@ContributesAndroidInjector abstract fun initPodRefreshAction(): InitPodRefreshAction
@ContributesAndroidInjector abstract fun initPodTask(): InitPodTask
@ContributesAndroidInjector abstract fun rlHistoryItemOmnipod(): RLHistoryItemOmnipod @ContributesAndroidInjector abstract fun rlHistoryItemOmnipod(): RLHistoryItemOmnipod
companion object { companion object {
@Provides @Provides
fun podStateManagerProvider(aapsPodStateManager: AapsPodStateManager): PodStateManager = aapsPodStateManager fun podStateManagerProvider(aapsPodStateManager: AapsPodStateManager): PodStateManager = aapsPodStateManager
} }

View file

@ -0,0 +1,92 @@
package info.nightscout.androidaps.plugins.pump.omnipod.dagger
import androidx.lifecycle.ViewModel
import androidx.lifecycle.ViewModelProvider
import dagger.Binds
import dagger.Module
import dagger.Provides
import dagger.android.ContributesAndroidInjector
import dagger.multibindings.IntoMap
import info.nightscout.androidaps.plugins.pump.omnipod.ui.wizard.activation.fragment.AttachPodInfoFragment
import info.nightscout.androidaps.plugins.pump.omnipod.ui.wizard.activation.fragment.FillPodInfoFragment
import info.nightscout.androidaps.plugins.pump.omnipod.ui.wizard.activation.fragment.InitializePodActionFragment
import info.nightscout.androidaps.plugins.pump.omnipod.ui.wizard.activation.fragment.InsertCannulaActionFragment
import info.nightscout.androidaps.plugins.pump.omnipod.ui.wizard.activation.fragment.PodActivatedInfoFragment
import info.nightscout.androidaps.plugins.pump.omnipod.ui.wizard.activation.viewmodel.InitializePodActionViewModel
import info.nightscout.androidaps.plugins.pump.omnipod.ui.wizard.activation.viewmodel.InsertCannulaActionViewModel
import info.nightscout.androidaps.plugins.pump.omnipod.ui.wizard.deactivation.fragment.DeactivatePodActionFragment
import info.nightscout.androidaps.plugins.pump.omnipod.ui.wizard.deactivation.fragment.DeactivatePodInfoFragment
import info.nightscout.androidaps.plugins.pump.omnipod.ui.wizard.deactivation.fragment.PodDeactivatedInfoFragment
import info.nightscout.androidaps.plugins.pump.omnipod.ui.wizard.deactivation.fragment.PodDiscardedInfoFragment
import info.nightscout.androidaps.plugins.pump.omnipod.ui.wizard.deactivation.viewmodel.DeactivatePodActionViewModel
import javax.inject.Provider
@Module
abstract class OmnipodWizardModule {
companion object {
@Provides
@OmnipodPluginQualifier
fun providesViewModelFactory(@OmnipodPluginQualifier viewModels: MutableMap<Class<out ViewModel>, @JvmSuppressWildcards Provider<ViewModel>>): ViewModelProvider.Factory {
return ViewModelFactory(viewModels)
}
}
// #### VIEW MODELS ############################################################################
@Binds
@IntoMap
@OmnipodPluginQualifier
@ViewModelKey(InitializePodActionViewModel::class)
internal abstract fun initializePodActionViewModel(viewModel: InitializePodActionViewModel): ViewModel
@Binds
@IntoMap
@OmnipodPluginQualifier
@ViewModelKey(InsertCannulaActionViewModel::class)
internal abstract fun insertCannulaActionViewModel(viewModel: InsertCannulaActionViewModel): ViewModel
@Binds
@IntoMap
@OmnipodPluginQualifier
@ViewModelKey(DeactivatePodActionViewModel::class)
internal abstract fun deactivatePodActionViewModel(viewModel: DeactivatePodActionViewModel): ViewModel
// #### FRAGMENTS ##############################################################################
@FragmentScope
@ContributesAndroidInjector
internal abstract fun contributesDeactivatePodActionFragment(): DeactivatePodActionFragment
@FragmentScope
@ContributesAndroidInjector
internal abstract fun contributesInsertCannulaActionFragment(): InsertCannulaActionFragment
@FragmentScope
@ContributesAndroidInjector
internal abstract fun contributesInitializePodActionFragment(): InitializePodActionFragment
@FragmentScope
@ContributesAndroidInjector
internal abstract fun contributesAttachPodInfoFragment(): AttachPodInfoFragment
@FragmentScope
@ContributesAndroidInjector
internal abstract fun contributesDeactivatePodInfoFragment(): DeactivatePodInfoFragment
@FragmentScope
@ContributesAndroidInjector
internal abstract fun contributesFillPodInfoFragment(): FillPodInfoFragment
@FragmentScope
@ContributesAndroidInjector
internal abstract fun contributesPodDeactivatedInfoFragment(): PodDeactivatedInfoFragment
@FragmentScope
@ContributesAndroidInjector
internal abstract fun contributesPodDiscardedInfoFragment(): PodDiscardedInfoFragment
@FragmentScope
@ContributesAndroidInjector
internal abstract fun contributesPodActivatedInfoFragment(): PodActivatedInfoFragment
}

View file

@ -6,8 +6,8 @@ import info.nightscout.androidaps.plugins.pump.omnipod.R;
* Created by andy on 4.8.2019 * Created by andy on 4.8.2019
*/ */
public enum OmnipodCommandType { public enum OmnipodCommandType {
PAIR_AND_PRIME_POD(R.string.omnipod_cmd_pair_and_prime), // First step of Pod activation INITIALIZE_POD(R.string.omnipod_cmd_initialize_pod), // First step of Pod activation
FILL_CANNULA_AND_SET_BASAL_PROFILE(R.string.omnipod_cmd_fill_cannula_set_basal_profile), // Second step of Pod activation INSERT_CANNULA(R.string.omnipod_cmd_insert_cannula), // Second step of Pod activation
DEACTIVATE_POD(R.string.omnipod_cmd_deactivate_pod), // DEACTIVATE_POD(R.string.omnipod_cmd_deactivate_pod), //
SET_BASAL_PROFILE(R.string.omnipod_cmd_set_basal_schedule), // SET_BASAL_PROFILE(R.string.omnipod_cmd_set_basal_schedule), //
SET_BOLUS(R.string.omnipod_cmd_set_bolus), // SET_BOLUS(R.string.omnipod_cmd_set_bolus), //
@ -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,8 +0,0 @@
package info.nightscout.androidaps.plugins.pump.omnipod.definition;
public enum OmnipodStatusRequestType {
ACKNOWLEDGE_ALERTS,
GET_POD_STATE,
GET_PULSE_LOG,
SUSPEND_DELIVERY
}

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

@ -13,10 +13,10 @@ import info.nightscout.androidaps.plugins.pump.omnipod.R;
*/ */
public enum PodHistoryEntryType { public enum PodHistoryEntryType {
PAIR_AND_PRIME(1, R.string.omnipod_init_pod_wizard_step2_title, PumpHistoryEntryGroup.Prime), INITIALIZE_POD(1, R.string.omnipod_cmd_initialize_pod, PumpHistoryEntryGroup.Prime),
FILL_CANNULA_SET_BASAL_PROFILE(2, R.string.omnipod_init_pod_wizard_step4_title, PumpHistoryEntryGroup.Prime), INSERT_CANNULA(2, R.string.omnipod_cmd_insert_cannula, 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(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

@ -1,54 +0,0 @@
package info.nightscout.androidaps.plugins.pump.omnipod.definition;
import java.util.ArrayList;
import java.util.List;
import info.nightscout.androidaps.plugins.pump.omnipod.R;
public enum PodInitActionType {
PAIR_AND_PRIME_WIZARD_STEP(), //
PAIR_POD(R.string.omnipod_init_pod_pair_pod, PAIR_AND_PRIME_WIZARD_STEP), //
PRIME_POD(R.string.omnipod_init_pod_prime_pod, PAIR_AND_PRIME_WIZARD_STEP), //
FILL_CANNULA_SET_BASAL_PROFILE_WIZARD_STEP(), //
FILL_CANNULA(R.string.omnipod_init_pod_fill_cannula, FILL_CANNULA_SET_BASAL_PROFILE_WIZARD_STEP), //
SET_BASAL_PROFILE(R.string.omnipod_init_pod_set_basal_profile, FILL_CANNULA_SET_BASAL_PROFILE_WIZARD_STEP), //
DEACTIVATE_POD_WIZARD_STEP(), //
CANCEL_DELIVERY(R.string.omnipod_deactivate_pod_cancel_delivery, DEACTIVATE_POD_WIZARD_STEP), //
DEACTIVATE_POD(R.string.omnipod_deactivate_pod_deactivate_pod, DEACTIVATE_POD_WIZARD_STEP);
private int resourceId;
private PodInitActionType parent;
PodInitActionType(int resourceId, PodInitActionType parent) {
this.resourceId = resourceId;
this.parent = parent;
}
PodInitActionType() {
}
public boolean isParent() {
return this.parent == null;
}
public List<PodInitActionType> getChildren() {
List<PodInitActionType> outList = new ArrayList<>();
for (PodInitActionType value : values()) {
if (value.parent == this) {
outList.add(value);
}
}
return outList;
}
public int getResourceId() {
return resourceId;
}
}

View file

@ -1,7 +0,0 @@
package info.nightscout.androidaps.plugins.pump.omnipod.definition;
public interface PodInitReceiver {
void returnInitTaskStatus(PodInitActionType podInitActionType, boolean isSuccess, String errorMessage);
}

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

@ -69,7 +69,9 @@ public class PodInfoFaultEvent extends PodInfo implements StatusUpdatableRespons
unacknowledgedAlerts = new AlertSet(encodedData[15]); unacknowledgedAlerts = new AlertSet(encodedData[15]);
faultAccessingTables = encodedData[16] == 0x02; faultAccessingTables = encodedData[16] == 0x02;
logEventErrorType = LogEventErrorCode.fromByte((byte) (encodedData[17] >>> 4)); int i = ByteUtil.convertUnsignedByteToInt(encodedData[17]);
byte value = (byte) (i >>> 4);
logEventErrorType = LogEventErrorCode.fromByte(value);
logEventErrorPodProgressStatus = PodProgressStatus.fromByte((byte) (encodedData[17] & 0x0f)); logEventErrorPodProgressStatus = PodProgressStatus.fromByte((byte) (encodedData[17] & 0x0f));
receiverLowGain = (byte) (ByteUtil.convertUnsignedByteToInt(encodedData[18]) >>> 6); receiverLowGain = (byte) (ByteUtil.convertUnsignedByteToInt(encodedData[18]) >>> 6);
radioRSSI = (byte) (encodedData[18] & 0x3f); radioRSSI = (byte) (encodedData[18] & 0x3f);

View file

@ -21,10 +21,8 @@ public class OmnipodConstants {
public static final Duration AVERAGE_TEMP_BASAL_COMMAND_COMMUNICATION_DURATION = Duration.millis(1500); public static final Duration AVERAGE_TEMP_BASAL_COMMAND_COMMUNICATION_DURATION = Duration.millis(1500);
public static final Duration SERVICE_DURATION = Duration.standardHours(80); public static final Duration SERVICE_DURATION = Duration.standardHours(80);
public static final Duration EXPIRATION_ADVISORY_WINDOW = Duration.standardHours(9);
public static final Duration END_OF_SERVICE_IMMINENT_WINDOW = Duration.standardHours(1); public static final Duration END_OF_SERVICE_IMMINENT_WINDOW = Duration.standardHours(1);
public static final Duration NOMINAL_POD_LIFE = Duration.standardHours(72); public static final Duration NOMINAL_POD_LIFE = Duration.standardHours(72);
public static final double LOW_RESERVOIR_ALERT = 20.0;
public static final double POD_PRIME_BOLUS_UNITS = 2.6; public static final double POD_PRIME_BOLUS_UNITS = 2.6;
public static final double POD_CANNULA_INSERTION_BOLUS_UNITS = 0.5; public static final double POD_CANNULA_INSERTION_BOLUS_UNITS = 0.5;

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,16 @@
package info.nightscout.androidaps.plugins.pump.omnipod.driver.exception;
import info.nightscout.androidaps.plugins.pump.omnipod.driver.definition.PodProgressStatus;
public class PodProgressStatusVerificationFailedException extends OmnipodException {
private final PodProgressStatus expectedStatus;
public PodProgressStatusVerificationFailedException(PodProgressStatus expectedStatus, Throwable cause) {
super("Failed to verify Pod progress status (expected=" + expectedStatus + ")", cause, false);
this.expectedStatus = expectedStatus;
}
public PodProgressStatus getExpectedStatus() {
return expectedStatus;
}
}

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

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