Move several parts of Omnipod Eros driver to omnipod-common, did some renaming and added some preliminary Dash stuff
This commit is contained in:
parent
ad1f450820
commit
ecfabccffb
87 changed files with 1456 additions and 1163 deletions
|
@ -36,7 +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.medtronic.MedtronicFragment
|
||||
import info.nightscout.androidaps.plugins.pump.medtronic.dialog.RileyLinkStatusDeviceMedtronic
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.OmnipodOverviewFragment
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.OmnipodErosOverviewFragment
|
||||
import info.nightscout.androidaps.plugins.pump.virtual.VirtualPumpFragment
|
||||
import info.nightscout.androidaps.plugins.source.BGSourceFragment
|
||||
import info.nightscout.androidaps.plugins.treatments.TreatmentsFragment
|
||||
|
@ -68,7 +68,7 @@ abstract class FragmentsModule {
|
|||
@ContributesAndroidInjector abstract fun contributesLoopFragment(): LoopFragment
|
||||
@ContributesAndroidInjector abstract fun contributesMaintenanceFragment(): MaintenanceFragment
|
||||
@ContributesAndroidInjector abstract fun contributesMedtronicFragment(): MedtronicFragment
|
||||
@ContributesAndroidInjector abstract fun contributesOmnipodFragment(): OmnipodOverviewFragment
|
||||
@ContributesAndroidInjector abstract fun contributesOmnipodFragment(): OmnipodErosOverviewFragment
|
||||
@ContributesAndroidInjector abstract fun contributesNSProfileFragment(): NSProfileFragment
|
||||
@ContributesAndroidInjector abstract fun contributesNSClientFragment(): NSClientFragment
|
||||
@ContributesAndroidInjector
|
||||
|
|
|
@ -633,7 +633,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
|
|||
}
|
||||
|
||||
pump.isSuspended -> {
|
||||
binding.infoLayout.apsMode.setImageResource(if (pump.pumpDescription.pumpType == PumpType.Insulet_Omnipod) {
|
||||
binding.infoLayout.apsMode.setImageResource(if (pump.pumpDescription.pumpType == PumpType.Omnipod_Eros) {
|
||||
// For Omnipod, indicate the pump as disconnected when it's suspended.
|
||||
// The only way to 'reconnect' it, is through the Omnipod tab
|
||||
R.drawable.ic_loop_disconnected
|
||||
|
|
|
@ -40,7 +40,7 @@ class StatusLightHandler @Inject constructor(
|
|||
handleAge(careportal_pb_age, CareportalEvent.PUMPBATTERYCHANGE, R.string.key_statuslights_bage_warning, 216.0, R.string.key_statuslights_bage_critical, 240.0)
|
||||
}
|
||||
if (!config.NSCLIENT) {
|
||||
if (pump.model() == PumpType.Insulet_Omnipod) {
|
||||
if (pump.model() == PumpType.Omnipod_Eros) {
|
||||
handleOmnipodReservoirLevel(careportal_reservoir_level, R.string.key_statuslights_res_critical, 10.0, R.string.key_statuslights_res_warning, 80.0, pump.reservoirLevel, "U")
|
||||
} else {
|
||||
handleLevel(careportal_reservoir_level, R.string.key_statuslights_res_critical, 10.0, R.string.key_statuslights_res_warning, 80.0, pump.reservoirLevel, "U")
|
||||
|
@ -52,7 +52,7 @@ class StatusLightHandler @Inject constructor(
|
|||
}
|
||||
|
||||
if (!config.NSCLIENT) {
|
||||
if (pump.model() == PumpType.Insulet_Omnipod && pump is OmnipodErosPumpPlugin) { // instance of check is needed because at startup, pump can still be VirtualPumpPlugin and that will cause a crash because of the class cast below
|
||||
if (pump.model() == PumpType.Omnipod_Eros && pump is OmnipodErosPumpPlugin) { // instance of check is needed because at startup, pump can still be VirtualPumpPlugin and that will cause a crash because of the class cast below
|
||||
handleOmnipodBatteryLevel(careportal_battery_level, R.string.key_statuslights_bat_critical, 26.0, R.string.key_statuslights_bat_warning, 51.0, pump.batteryLevel.toDouble(), "%", pump.isUseRileyLinkBatteryLevel)
|
||||
} else if (pump.model() != PumpType.AccuChekCombo) {
|
||||
handleLevel(careportal_battery_level, R.string.key_statuslights_bat_critical, 26.0, R.string.key_statuslights_bat_warning, 51.0, pump.batteryLevel.toDouble(), "%")
|
||||
|
|
|
@ -98,12 +98,19 @@ public enum PumpType {
|
|||
|
||||
|
||||
// Insulet
|
||||
Insulet_Omnipod("Insulet Omnipod", ManufacturerType.Insulet, "Omnipod (Eros)", 0.05d, null, //
|
||||
Omnipod_Eros("Omnipod", ManufacturerType.Insulet, "Eros", 0.05d, null, //
|
||||
new DoseSettings(0.05d, 30, 8 * 60, 0.05d), //
|
||||
PumpTempBasalType.Absolute, //
|
||||
new DoseSettings(0.05d, 30, 12 * 60, 0d, 30.0d), PumpCapability.BasalRate_Duration30minAllowed, //
|
||||
0.05d, null, 0.05d, null, PumpCapability.OmnipodCapabilities, true),
|
||||
|
||||
Omnipod_Dash("Omnipod", ManufacturerType.Insulet, "Dash", 0.05d, null, //
|
||||
new DoseSettings(0.05d, 30, 8 * 60, 0.05d), //
|
||||
PumpTempBasalType.Absolute, //
|
||||
new DoseSettings(0.05d, 30, 12 * 60, 0d, 30.0d), PumpCapability.BasalRate_Duration30minAllowed, //
|
||||
0.05d, null, 0.05d, null, PumpCapability.OmnipodCapabilities, false),
|
||||
|
||||
|
||||
// Medtronic
|
||||
Medtronic_512_712("Medtronic 512/712", ManufacturerType.Medtronic, "512/712", 0.1d, null, //
|
||||
new DoseSettings(0.05d, 30, 8 * 60, 0.05d), //
|
||||
|
|
|
@ -45,6 +45,7 @@ dependencies {
|
|||
annotationProcessor "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"
|
||||
|
||||
testImplementation "junit:junit:$junit_version"
|
||||
androidTestImplementation "androidx.test.ext:junit:$androidx_junit"
|
||||
}
|
|
@ -2,4 +2,8 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="info.nightscout.androidaps.plugins.pump.omnipod.common">
|
||||
|
||||
<application>
|
||||
<activity android:name=".ui.wizard.activation.PodActivationWizardActivity" />
|
||||
<activity android:name=".ui.wizard.deactivation.PodDeactivationWizardActivity" />
|
||||
</application>
|
||||
</manifest>
|
|
@ -1,4 +0,0 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.common;
|
||||
|
||||
public class PlaceHolder {
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.common.queue.command;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import info.nightscout.androidaps.queue.commands.CustomCommand;
|
||||
|
||||
public final class CommandAcknowledgeAlerts implements CustomCommand {
|
||||
@NotNull @Override public String getStatusDescription() {
|
||||
return "ACKNOWLEDGE ALERTS";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.common.queue.command;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import info.nightscout.androidaps.queue.commands.CustomCommand;
|
||||
|
||||
public final class CommandDeactivatePod implements CustomCommand {
|
||||
@NotNull @Override public String getStatusDescription() {
|
||||
return "DEACTIVATE POD";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.common.queue.command;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import info.nightscout.androidaps.queue.commands.CustomCommand;
|
||||
|
||||
public final class CommandHandleTimeChange implements CustomCommand {
|
||||
private final boolean requestedByUser;
|
||||
|
||||
public CommandHandleTimeChange(boolean requestedByUser) {
|
||||
this.requestedByUser = requestedByUser;
|
||||
}
|
||||
|
||||
public boolean isRequestedByUser() {
|
||||
return requestedByUser;
|
||||
}
|
||||
|
||||
@NotNull @Override public String getStatusDescription() {
|
||||
return "HANDLE TIME CHANGE";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.common.queue.command;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import info.nightscout.androidaps.queue.commands.CustomCommand;
|
||||
|
||||
public class CommandPlayTestBeep implements CustomCommand {
|
||||
@NotNull @Override public String getStatusDescription() {
|
||||
return "PLAY TEST BEEP";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.common.queue.command;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import info.nightscout.androidaps.queue.commands.CustomCommand;
|
||||
|
||||
public final class CommandResumeDelivery implements CustomCommand {
|
||||
@NotNull @Override public String getStatusDescription() {
|
||||
return "RESUME DELIVERY";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.common.queue.command;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import info.nightscout.androidaps.queue.commands.CustomCommand;
|
||||
|
||||
public final class CommandSuspendDelivery implements CustomCommand {
|
||||
@NotNull @Override public String getStatusDescription() {
|
||||
return "SUSPEND DELIVERY";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.common.queue.command;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import info.nightscout.androidaps.queue.commands.CustomCommand;
|
||||
|
||||
public final class CommandUpdateAlertConfiguration implements CustomCommand {
|
||||
@NotNull @Override public String getStatusDescription() {
|
||||
return "UPDATE ALERT CONFIGURATION";
|
||||
}
|
||||
}
|
|
@ -1,11 +1,9 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.activation
|
||||
package info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.activation
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.annotation.IdRes
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.R
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.ActivationProgress
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.manager.PodStateManager
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.common.activity.OmnipodWizardActivityBase
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.R
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.common.activity.OmnipodWizardActivityBase
|
||||
import javax.inject.Inject
|
||||
|
||||
class PodActivationWizardActivity : OmnipodWizardActivityBase() {
|
|
@ -1,4 +1,4 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.activation.fragment
|
||||
package info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.activation.fragment
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
|
@ -7,16 +7,16 @@ import androidx.annotation.IdRes
|
|||
import androidx.annotation.StringRes
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.navigation.fragment.findNavController
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.R
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.common.fragment.InfoFragmentBase
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.R
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.common.fragment.InfoFragmentBase
|
||||
|
||||
class AttachPodInfoFragment : InfoFragmentBase() {
|
||||
|
||||
@StringRes
|
||||
override fun getTitleId(): Int = R.string.omnipod_pod_activation_wizard_attach_pod_title
|
||||
override fun getTitleId(): Int = R.string.omnipod_common_pod_activation_wizard_attach_pod_title
|
||||
|
||||
@StringRes
|
||||
override fun getTextId(): Int = R.string.omnipod_pod_activation_wizard_attach_pod_text
|
||||
override fun getTextId(): Int = R.string.omnipod_common_pod_activation_wizard_attach_pod_text
|
||||
|
||||
@IdRes
|
||||
override fun getNextPageActionId(): Int = R.id.action_attachPodInfoFragment_to_insertCannulaActionFragment
|
||||
|
@ -31,9 +31,9 @@ class AttachPodInfoFragment : InfoFragmentBase() {
|
|||
AlertDialog.Builder(it)
|
||||
.setIcon(android.R.drawable.ic_dialog_alert)
|
||||
.setTitle(getString(getTitleId()))
|
||||
.setMessage(getString(R.string.omnipod_pod_activation_wizard_attach_pod_confirm_insert_cannula_text))
|
||||
.setPositiveButton(getString(R.string.omnipod_ok)) { _, _ -> findNavController().navigate(getNextPageActionId()) }
|
||||
.setNegativeButton(getString(R.string.omnipod_cancel), null)
|
||||
.setMessage(getString(R.string.omnipod_common_pod_activation_wizard_attach_pod_confirm_insert_cannula_text))
|
||||
.setPositiveButton(getString(R.string.omnipod_common_ok)) { _, _ -> findNavController().navigate(getNextPageActionId()) }
|
||||
.setNegativeButton(getString(R.string.omnipod_common_cancel), null)
|
||||
.show()
|
||||
}
|
||||
}
|
|
@ -1,14 +1,14 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.activation.fragment
|
||||
package info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.activation.fragment
|
||||
|
||||
import androidx.annotation.IdRes
|
||||
import androidx.annotation.StringRes
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.R
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.common.fragment.InfoFragmentBase
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.R
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.common.fragment.InfoFragmentBase
|
||||
|
||||
class FillPodInfoFragment : InfoFragmentBase() {
|
||||
|
||||
@StringRes
|
||||
override fun getTitleId(): Int = R.string.omnipod_pod_activation_wizard_fill_pod_title
|
||||
override fun getTitleId(): Int = R.string.omnipod_common_pod_activation_wizard_fill_pod_title
|
||||
|
||||
@StringRes
|
||||
override fun getTextId(): Int = R.string.omnipod_pod_activation_wizard_fill_pod_text
|
|
@ -1,13 +1,12 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.activation.fragment
|
||||
package info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.activation.fragment
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.annotation.IdRes
|
||||
import androidx.annotation.StringRes
|
||||
import androidx.fragment.app.viewModels
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.R
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.dagger.OmnipodPluginQualifier
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.activation.viewmodel.InitializePodActionViewModel
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.R
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.activation.viewmodel.InitializePodActionViewModel
|
||||
import javax.inject.Inject
|
||||
|
||||
class InitializePodActionFragment : PodActivationActionFragmentBase() {
|
||||
|
@ -24,7 +23,7 @@ class InitializePodActionFragment : PodActivationActionFragmentBase() {
|
|||
}
|
||||
|
||||
@StringRes
|
||||
override fun getTitleId(): Int = R.string.omnipod_pod_activation_wizard_initialize_pod_title
|
||||
override fun getTitleId(): Int = R.string.omnipod_common_pod_activation_wizard_initialize_pod_title
|
||||
|
||||
@StringRes
|
||||
override fun getTextId(): Int = R.string.omnipod_pod_activation_wizard_initialize_pod_text
|
|
@ -1,13 +1,12 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.activation.fragment
|
||||
package info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.activation.fragment
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.annotation.IdRes
|
||||
import androidx.annotation.StringRes
|
||||
import androidx.fragment.app.viewModels
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.R
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.dagger.OmnipodPluginQualifier
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.activation.viewmodel.InsertCannulaActionViewModel
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.R
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.activation.viewmodel.InsertCannulaActionViewModel
|
||||
import javax.inject.Inject
|
||||
|
||||
class InsertCannulaActionFragment : PodActivationActionFragmentBase() {
|
||||
|
@ -24,10 +23,10 @@ class InsertCannulaActionFragment : PodActivationActionFragmentBase() {
|
|||
}
|
||||
|
||||
@StringRes
|
||||
override fun getTitleId(): Int = R.string.omnipod_pod_activation_wizard_insert_cannula_title
|
||||
override fun getTitleId(): Int = R.string.omnipod_common_pod_activation_wizard_insert_cannula_title
|
||||
|
||||
@StringRes
|
||||
override fun getTextId(): Int = R.string.omnipod_pod_activation_wizard_insert_cannula_text
|
||||
override fun getTextId(): Int = R.string.omnipod_common_pod_activation_wizard_insert_cannula_text
|
||||
|
||||
@IdRes
|
||||
override fun getNextPageActionId(): Int = R.id.action_insertCannulaActionFragment_to_PodActivatedInfoFragment
|
|
@ -0,0 +1,20 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.activation.fragment
|
||||
|
||||
import androidx.annotation.IdRes
|
||||
import androidx.annotation.StringRes
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.R
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.common.fragment.InfoFragmentBase
|
||||
|
||||
class PodActivatedInfoFragment : InfoFragmentBase() {
|
||||
|
||||
@StringRes
|
||||
override fun getTitleId(): Int = R.string.omnipod_common_pod_activation_wizard_pod_activated_title
|
||||
|
||||
@StringRes
|
||||
override fun getTextId(): Int = R.string.omnipod_common_pod_activation_wizard_pod_activated_text
|
||||
|
||||
@IdRes
|
||||
override fun getNextPageActionId(): Int? = null
|
||||
|
||||
override fun getIndex(): Int = 5
|
||||
}
|
|
@ -1,14 +1,12 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.activation.fragment
|
||||
package info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.activation.fragment
|
||||
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import android.widget.Button
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.R
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.ActivationProgress
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.manager.PodStateManager
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.common.fragment.ActionFragmentBase
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.deactivation.PodDeactivationWizardActivity
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.R
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.common.fragment.ActionFragmentBase
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.deactivation.PodDeactivationWizardActivity
|
||||
import javax.inject.Inject
|
||||
|
||||
abstract class PodActivationActionFragmentBase : ActionFragmentBase() {
|
|
@ -1,8 +1,8 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.activation.viewmodel
|
||||
package info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.activation.viewmodel
|
||||
|
||||
import info.nightscout.androidaps.data.PumpEnactResult
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.common.viewmodel.ActionViewModelBase
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.manager.AapsOmnipodManager
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.common.viewmodel.ActionViewModelBase
|
||||
import javax.inject.Inject
|
||||
|
||||
class InitializePodActionViewModel @Inject constructor(private val aapsOmnipodManager: AapsOmnipodManager) : ActionViewModelBase() {
|
|
@ -1,9 +1,9 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.activation.viewmodel
|
||||
package info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.activation.viewmodel
|
||||
|
||||
import info.nightscout.androidaps.data.PumpEnactResult
|
||||
import info.nightscout.androidaps.interfaces.ProfileFunction
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.common.viewmodel.ActionViewModelBase
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.manager.AapsOmnipodManager
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.common.viewmodel.ActionViewModelBase
|
||||
import javax.inject.Inject
|
||||
|
||||
class InsertCannulaActionViewModel @Inject constructor(private val aapsOmnipodManager: AapsOmnipodManager, private val profileFunction: ProfileFunction) : ActionViewModelBase() {
|
|
@ -1,10 +1,10 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.common.activity
|
||||
package info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.common.activity
|
||||
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.navigation.NavController
|
||||
import androidx.navigation.fragment.NavHostFragment
|
||||
import info.nightscout.androidaps.activities.NoSplashAppCompatActivity
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.R
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.R
|
||||
|
||||
abstract class OmnipodWizardActivityBase : NoSplashAppCompatActivity() {
|
||||
|
||||
|
@ -20,8 +20,8 @@ abstract class OmnipodWizardActivityBase : NoSplashAppCompatActivity() {
|
|||
.setIcon(android.R.drawable.ic_dialog_alert)
|
||||
.setTitle(getString(R.string.omnipod_common_wizard_exit_confirmation_title))
|
||||
.setMessage(getString(R.string.omnipod_common_wizard_exit_confirmation_text))
|
||||
.setPositiveButton(getString(R.string.omnipod_yes)) { _, _ -> finish() }
|
||||
.setNegativeButton(getString(R.string.omnipod_no), null)
|
||||
.setPositiveButton(getString(R.string.omnipod_common_yes)) { _, _ -> finish() }
|
||||
.setNegativeButton(getString(R.string.omnipod_common_no), null)
|
||||
.show()
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.common.fragment
|
||||
package info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.common.fragment
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.os.Bundle
|
||||
|
@ -6,8 +6,8 @@ import android.view.View
|
|||
import android.widget.Button
|
||||
import androidx.annotation.LayoutRes
|
||||
import androidx.annotation.StringRes
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.R
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.common.viewmodel.ActionViewModelBase
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.R
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.common.viewmodel.ActionViewModelBase
|
||||
import info.nightscout.androidaps.utils.extensions.toVisibility
|
||||
|
||||
abstract class ActionFragmentBase : WizardFragmentBase() {
|
|
@ -1,11 +1,11 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.common.fragment
|
||||
package info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.common.fragment
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import android.widget.TextView
|
||||
import androidx.annotation.LayoutRes
|
||||
import androidx.annotation.StringRes
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.R
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.R
|
||||
|
||||
abstract class InfoFragmentBase : WizardFragmentBase() {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.common.fragment
|
||||
package info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.common.fragment
|
||||
|
||||
import android.content.res.ColorStateList
|
||||
import android.os.Bundle
|
||||
|
@ -10,9 +10,8 @@ import androidx.annotation.LayoutRes
|
|||
import androidx.annotation.StringRes
|
||||
import androidx.navigation.fragment.findNavController
|
||||
import dagger.android.support.DaggerFragment
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.R
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.databinding.OmnipodWizardBaseFragmentBinding
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.common.activity.OmnipodWizardActivityBase
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.R
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.common.activity.OmnipodWizardActivityBase
|
||||
import kotlin.math.roundToInt
|
||||
|
||||
abstract class WizardFragmentBase : DaggerFragment() {
|
|
@ -1,4 +1,4 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.common.viewmodel
|
||||
package info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.common.viewmodel
|
||||
|
||||
import androidx.lifecycle.LiveData
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
|
@ -17,7 +17,7 @@ abstract class ActionViewModelBase : ViewModel() {
|
|||
|
||||
fun executeAction() {
|
||||
_isActionExecutingLiveData.postValue(true)
|
||||
SingleSubject.fromCallable<PumpEnactResult>(this::doExecuteAction)
|
||||
SingleSubject.fromCallable(this::doExecuteAction)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.doOnSuccess { result ->
|
||||
_isActionExecutingLiveData.postValue(false)
|
|
@ -1,8 +1,8 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.deactivation
|
||||
package info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.deactivation
|
||||
|
||||
import android.os.Bundle
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.R
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.common.activity.OmnipodWizardActivityBase
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.R
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.common.activity.OmnipodWizardActivityBase
|
||||
|
||||
class PodDeactivationWizardActivity : OmnipodWizardActivityBase() {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.deactivation.fragment
|
||||
package info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.deactivation.fragment
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
|
@ -9,11 +9,9 @@ import androidx.appcompat.app.AlertDialog
|
|||
import androidx.fragment.app.viewModels
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.navigation.fragment.findNavController
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.R
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.dagger.OmnipodPluginQualifier
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.manager.AapsOmnipodManager
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.common.fragment.ActionFragmentBase
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.deactivation.viewmodel.DeactivatePodActionViewModel
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.R
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.common.fragment.ActionFragmentBase
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.deactivation.viewmodel.DeactivatePodActionViewModel
|
||||
import info.nightscout.androidaps.utils.extensions.toVisibility
|
||||
import javax.inject.Inject
|
||||
|
||||
|
@ -37,18 +35,18 @@ class DeactivatePodActionFragment : ActionFragmentBase() {
|
|||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
buttonDiscardPod = view.findViewById(R.id.button_discard_pod)
|
||||
buttonDiscardPod = view.findViewById(R.id.omnipod_wizard_button_discard_pod)
|
||||
buttonDiscardPod.setOnClickListener {
|
||||
context?.let {
|
||||
AlertDialog.Builder(it)
|
||||
.setIcon(android.R.drawable.ic_dialog_alert)
|
||||
.setTitle(getString(R.string.omnipod_pod_deactivation_wizard_discard_pod))
|
||||
.setMessage(getString(R.string.omnipod_pod_deactivation_wizard_discard_pod_confirmation))
|
||||
.setPositiveButton(getString(R.string.omnipod_yes)) { _, _ ->
|
||||
.setTitle(getString(R.string.omnipod_common_pod_deactivation_wizard_discard_pod))
|
||||
.setMessage(getString(R.string.omnipod_common_pod_deactivation_wizard_discard_pod_confirmation))
|
||||
.setPositiveButton(getString(R.string.omnipod_common_yes)) { _, _ ->
|
||||
aapsOmnipodManager.discardPodState()
|
||||
findNavController().navigate(R.id.action_deactivatePodActionFragment_to_podDiscardedInfoFragment)
|
||||
}
|
||||
.setNegativeButton(getString(R.string.omnipod_no), null)
|
||||
.setNegativeButton(getString(R.string.omnipod_common_no), null)
|
||||
.show()
|
||||
}
|
||||
}
|
||||
|
@ -59,10 +57,10 @@ class DeactivatePodActionFragment : ActionFragmentBase() {
|
|||
}
|
||||
|
||||
@StringRes
|
||||
override fun getTitleId(): Int = R.string.omnipod_pod_deactivation_wizard_deactivating_pod_title
|
||||
override fun getTitleId(): Int = R.string.omnipod_common_pod_deactivation_wizard_deactivating_pod_title
|
||||
|
||||
@StringRes
|
||||
override fun getTextId(): Int = R.string.omnipod_pod_deactivation_wizard_deactivating_pod_text
|
||||
override fun getTextId(): Int = R.string.omnipod_common_pod_deactivation_wizard_deactivating_pod_text
|
||||
|
||||
@IdRes
|
||||
override fun getNextPageActionId(): Int = R.id.action_deactivatePodActionFragment_to_podDeactivatedInfoFragment
|
|
@ -0,0 +1,20 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.deactivation.fragment
|
||||
|
||||
import androidx.annotation.IdRes
|
||||
import androidx.annotation.StringRes
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.R
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.common.fragment.InfoFragmentBase
|
||||
|
||||
class DeactivatePodInfoFragment : InfoFragmentBase() {
|
||||
|
||||
@StringRes
|
||||
override fun getTitleId(): Int = R.string.omnipod_common_pod_deactivation_wizard_deactivate_pod_title
|
||||
|
||||
@StringRes
|
||||
override fun getTextId(): Int = R.string.omnipod_common_pod_deactivation_wizard_deactivate_pod_text
|
||||
|
||||
@IdRes
|
||||
override fun getNextPageActionId(): Int = R.id.action_deactivatePodInfoFragment_to_deactivatePodActionFragment
|
||||
|
||||
override fun getIndex(): Int = 1
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.deactivation.fragment
|
||||
|
||||
import androidx.annotation.IdRes
|
||||
import androidx.annotation.StringRes
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.R
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.common.fragment.InfoFragmentBase
|
||||
|
||||
class PodDeactivatedInfoFragment : InfoFragmentBase() {
|
||||
|
||||
@StringRes
|
||||
override fun getTitleId(): Int = R.string.omnipod_common_pod_deactivation_wizard_pod_deactivated_title
|
||||
|
||||
@StringRes
|
||||
override fun getTextId(): Int = R.string.omnipod_common_pod_deactivation_wizard_pod_deactivated_text
|
||||
|
||||
@IdRes
|
||||
override fun getNextPageActionId(): Int? = null
|
||||
|
||||
override fun getIndex(): Int = 3
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.deactivation.fragment
|
||||
|
||||
import androidx.annotation.IdRes
|
||||
import androidx.annotation.StringRes
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.R
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.common.fragment.InfoFragmentBase
|
||||
|
||||
class PodDiscardedInfoFragment : InfoFragmentBase() {
|
||||
|
||||
@StringRes
|
||||
override fun getTitleId(): Int = R.string.omnipod_common_pod_deactivation_wizard_pod_discarded_title
|
||||
|
||||
@StringRes
|
||||
override fun getTextId(): Int = R.string.omnipod_common_pod_deactivation_wizard_pod_discarded_text
|
||||
|
||||
@IdRes
|
||||
override fun getNextPageActionId(): Int? = null
|
||||
|
||||
override fun getIndex(): Int = 3
|
||||
}
|
|
@ -1,10 +1,10 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.deactivation.viewmodel
|
||||
package info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.deactivation.viewmodel
|
||||
|
||||
import info.nightscout.androidaps.data.PumpEnactResult
|
||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.common.viewmodel.ActionViewModelBase
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.manager.AapsOmnipodManager
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.queue.command.CommandDeactivatePod
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.common.viewmodel.ActionViewModelBase
|
||||
import info.nightscout.androidaps.queue.Callback
|
||||
import io.reactivex.subjects.SingleSubject
|
||||
import javax.inject.Inject
|
|
@ -106,7 +106,7 @@
|
|||
android:gravity="end"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:text="@string/omnipod_overview_pod_address"
|
||||
android:text="@string/omnipod_common_overview_pod_unique_id"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
|
@ -145,7 +145,7 @@
|
|||
android:gravity="end"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:text="@string/omnipod_lot"
|
||||
android:text="@string/omnipod_common_overview_lot_number"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
|
@ -184,7 +184,7 @@
|
|||
android:gravity="end"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:text="@string/omnipod_tid"
|
||||
android:text="@string/omnipod_common_overview_pod_sequence_number"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
|
@ -223,7 +223,7 @@
|
|||
android:gravity="end"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:text="@string/omnipod_overview_firmware_version"
|
||||
android:text="@string/omnipod_common_overview_firmware_version"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
|
@ -262,7 +262,7 @@
|
|||
android:gravity="end"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:text="@string/omnipod_overview_time_on_pod"
|
||||
android:text="@string/omnipod_common_overview_time_on_pod"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
|
@ -302,7 +302,7 @@
|
|||
android:gravity="end"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:text="@string/omnipod_overview_pod_expiry_date"
|
||||
android:text="@string/omnipod_common_overview_pod_expiry_date"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
|
@ -342,7 +342,7 @@
|
|||
android:gravity="end"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:text="@string/omnipod_overview_pod_status"
|
||||
android:text="@string/omnipod_common_overview_pod_status"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
|
@ -398,7 +398,7 @@
|
|||
android:gravity="end"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:text="@string/omnipod_overview_last_connection"
|
||||
android:text="@string/omnipod_common_overview_last_connection"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
|
@ -446,7 +446,7 @@
|
|||
android:gravity="end"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:text="@string/omnipod_overview_last_bolus"
|
||||
android:text="@string/omnipod_common_overview_last_bolus"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
|
@ -494,7 +494,7 @@
|
|||
android:gravity="end"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:text="@string/omnipod_overview_base_basal_rate"
|
||||
android:text="@string/omnipod_common_overview_base_basal_rate"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
|
@ -542,7 +542,7 @@
|
|||
android:gravity="end"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:text="@string/omnipod_overview_temp_basal_rate"
|
||||
android:text="@string/omnipod_common_overview_temp_basal_rate"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
|
@ -590,7 +590,7 @@
|
|||
android:gravity="end"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:text="@string/omnipod_overview_reservoir"
|
||||
android:text="@string/omnipod_common_overview_reservoir"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
|
@ -638,7 +638,7 @@
|
|||
android:gravity="end"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:text="@string/omnipod_overview_total_delivered"
|
||||
android:text="@string/omnipod_common_overview_total_delivered"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
|
@ -686,7 +686,7 @@
|
|||
android:gravity="end"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:text="@string/omnipod_overview_errors"
|
||||
android:text="@string/omnipod_common_overview_errors"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
|
@ -734,7 +734,7 @@
|
|||
android:gravity="end"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:text="@string/omnipod_overview_pod_active_alerts"
|
||||
android:text="@string/omnipod_common_overview_pod_active_alerts"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
|
@ -808,7 +808,7 @@
|
|||
android:layout_weight="1"
|
||||
android:drawableTop="@drawable/ic_omnipod_overview_pod_management"
|
||||
android:drawablePadding="@dimen/omnipod_icon_button_drawable_padding"
|
||||
android:text="@string/omnipod_overview_button_pod_management" />
|
||||
android:text="@string/omnipod_common_overview_button_pod_management" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/button_acknowledge_active_alerts"
|
||||
|
@ -818,7 +818,7 @@
|
|||
android:layout_weight="1"
|
||||
android:drawableTop="@drawable/ic_omnipod_overview_acknowledge_alerts"
|
||||
android:drawablePadding="@dimen/omnipod_icon_button_drawable_padding"
|
||||
android:text="@string/omnipod_overview_button_acknowledge_active_alerts" />
|
||||
android:text="@string/omnipod_common_overview_button_acknowledge_active_alerts" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/button_set_time"
|
||||
|
@ -828,7 +828,7 @@
|
|||
android:layout_weight="1"
|
||||
android:drawableTop="@drawable/ic_omnipod_overview_set_time"
|
||||
android:drawablePadding="@dimen/omnipod_icon_button_drawable_padding"
|
||||
android:text="@string/omnipod_overview_button_set_time"
|
||||
android:text="@string/omnipod_common_overview_button_set_time"
|
||||
android:visibility="gone" />
|
||||
|
||||
<Button
|
||||
|
@ -839,7 +839,7 @@
|
|||
android:layout_weight="1"
|
||||
android:drawableTop="@drawable/ic_omnipod_overview_resume_delivery"
|
||||
android:drawablePadding="@dimen/omnipod_icon_button_drawable_padding"
|
||||
android:text="@string/omnipod_overview_button_resume_delivery"
|
||||
android:text="@string/omnipod_common_overview_button_resume_delivery"
|
||||
android:visibility="gone" />
|
||||
|
||||
<Button
|
||||
|
@ -850,7 +850,7 @@
|
|||
android:layout_weight="1"
|
||||
android:drawableTop="@drawable/ic_omnipod_overview_suspend_delivery"
|
||||
android:drawablePadding="@dimen/omnipod_icon_button_drawable_padding"
|
||||
android:text="@string/omnipod_overview_button_suspend_delivery"
|
||||
android:text="@string/omnipod_common_overview_button_suspend_delivery"
|
||||
android:visibility="gone" />
|
||||
|
||||
</LinearLayout>
|
|
@ -4,7 +4,7 @@
|
|||
app:startDestination="@id/fillPodInfoFragment">
|
||||
<fragment
|
||||
android:id="@+id/fillPodInfoFragment"
|
||||
android:name="info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.activation.fragment.FillPodInfoFragment"
|
||||
android:name="info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.activation.fragment.FillPodInfoFragment"
|
||||
android:label="FillPodInfoFragment">
|
||||
<action
|
||||
android:id="@+id/action_fillPodInfoFragment_to_initializePodActionFragment"
|
||||
|
@ -12,7 +12,7 @@
|
|||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/initializePodActionFragment"
|
||||
android:name="info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.activation.fragment.InitializePodActionFragment"
|
||||
android:name="info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.activation.fragment.InitializePodActionFragment"
|
||||
android:label="initializePodActionFragment">
|
||||
<action
|
||||
android:id="@+id/action_initializePodActionFragment_to_attachPodInfoFragment"
|
||||
|
@ -20,7 +20,7 @@
|
|||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/attachPodInfoFragment"
|
||||
android:name="info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.activation.fragment.AttachPodInfoFragment"
|
||||
android:name="info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.activation.fragment.AttachPodInfoFragment"
|
||||
android:label="AttachPodInfoFragment">
|
||||
<action
|
||||
android:id="@+id/action_attachPodInfoFragment_to_insertCannulaActionFragment"
|
||||
|
@ -28,7 +28,7 @@
|
|||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/insertCannulaActionFragment"
|
||||
android:name="info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.activation.fragment.InsertCannulaActionFragment"
|
||||
android:name="info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.activation.fragment.InsertCannulaActionFragment"
|
||||
android:label="InsertCannulaActionFragment">
|
||||
<action
|
||||
android:id="@+id/action_insertCannulaActionFragment_to_PodActivatedInfoFragment"
|
||||
|
@ -36,6 +36,6 @@
|
|||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/PodActivatedInfoFragment"
|
||||
android:name="info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.activation.fragment.PodActivatedInfoFragment"
|
||||
android:name="info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.activation.fragment.PodActivatedInfoFragment"
|
||||
android:label="PodActivatedInfoFragment" />
|
||||
</navigation>
|
|
@ -4,7 +4,7 @@
|
|||
app:startDestination="@id/deactivatePodInfoFragment">
|
||||
<fragment
|
||||
android:id="@+id/deactivatePodInfoFragment"
|
||||
android:name="info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.deactivation.fragment.DeactivatePodInfoFragment"
|
||||
android:name="info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.deactivation.fragment.DeactivatePodInfoFragment"
|
||||
android:label="DeactivatePodInfoFragment">
|
||||
<action
|
||||
android:id="@+id/action_deactivatePodInfoFragment_to_deactivatePodActionFragment"
|
||||
|
@ -12,7 +12,7 @@
|
|||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/deactivatePodActionFragment"
|
||||
android:name="info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.deactivation.fragment.DeactivatePodActionFragment"
|
||||
android:name="info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.deactivation.fragment.DeactivatePodActionFragment"
|
||||
android:label="DeactivatePodActionFragment">
|
||||
<action
|
||||
android:id="@+id/action_deactivatePodActionFragment_to_podDeactivatedInfoFragment"
|
||||
|
@ -23,10 +23,10 @@
|
|||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/podDeactivatedInfoFragment"
|
||||
android:name="info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.deactivation.fragment.PodDeactivatedInfoFragment"
|
||||
android:name="info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.deactivation.fragment.PodDeactivatedInfoFragment"
|
||||
android:label="PodDeactivatedInfoFragment" />
|
||||
<fragment
|
||||
android:id="@+id/podDiscardedInfoFragment"
|
||||
android:name="info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.deactivation.fragment.PodDiscardedInfoFragment"
|
||||
android:name="info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.deactivation.fragment.PodDiscardedInfoFragment"
|
||||
android:label="PodDiscardedInfoFragment" />
|
||||
</navigation>
|
|
@ -1,6 +1,89 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Omnipod - Wizard common -->
|
||||
<!-- Omnipod - Keys -->
|
||||
<string name="key_omnipod_common_bolus_beeps_enabled" translatable="false">AAPS.Omnipod.bolus_beeps_enabled</string>
|
||||
<string name="key_omnipod_common_basal_beeps_enabled" translatable="false">AAPS.Omnipod.basal_beeps_enabled</string>
|
||||
<string name="key_omnipod_common_smb_beeps_enabled" translatable="false">AAPS.Omnipod.smb_beeps_enabled</string>
|
||||
<string name="key_omnipod_common_tbr_beeps_enabled" translatable="false">AAPS.Omnipod.tbr_beeps_enabled</string>
|
||||
<string name="key_omnipod_common_suspend_delivery_button_enabled" translatable="false">AAPS.Omnipod.suspend_delivery_button_enabled</string>
|
||||
<string name="key_omnipod_common_time_change_event_enabled" translatable="false">AAPS.Omnipod.time_change_enabled</string>
|
||||
<string name="key_omnipod_common_expiration_reminder_enabled" translatable="false">AAPS.Omnipod.expiration_reminder_enabled</string>
|
||||
<string name="key_omnipod_common_expiration_reminder_hours_before_shutdown" translatable="false">AAPS.Omnipod.expiration_reminder_hours_before_shutdown</string>
|
||||
<string name="key_omnipod_common_low_reservoir_alert_enabled" translatable="false">AAPS.Omnipod.low_reservoir_alert_enabled</string>
|
||||
<string name="key_omnipod_common_low_reservoir_alert_units" translatable="false">AAPS.Omnipod.low_reservoir_alert_units</string>
|
||||
<string name="key_omnipod_common_automatically_acknowledge_alerts_enabled" translatable="false">AAPS.Omnipod.automatically_acknowledge_alerts_enabled</string>
|
||||
|
||||
<!-- Omnipod - Pod Management -->
|
||||
<string name="omnipod_common_pod_management_title">Pod Management</string>
|
||||
<string name="omnipod_common_pod_management_heading_actions">Actions</string>
|
||||
<string name="omnipod_common_pod_management_heading_tools">Tools</string>
|
||||
<string name="omnipod_common_pod_management_button_activate_pod">Activate Pod</string>
|
||||
<string name="omnipod_common_pod_management_button_deactivate_pod">Deactivate Pod</string>
|
||||
<string name="omnipod_common_pod_management_button_discard_pod">Discard Pod</string>
|
||||
<string name="omnipod_common_pod_management_discard_pod_confirmation">If you discard the Pod, you will not be able to communicate with it anymore. You should only do this when all communication with the Pod persistently fails. If you can still communicate with the Pod, please use the <b>Deactivate Pod</b> option.\n\nIf you wish to proceed, please make sure to remove the Pod from your body!</string>
|
||||
<string name="omnipod_common_pod_management_button_play_test_beep">Play Test Beep</string>
|
||||
<string name="omnipod_common_pod_management_button_playing_test_beep">Playing Test Beep…</string>
|
||||
<string name="omnipod_common_pod_management_button_pod_history">Pod History</string>
|
||||
|
||||
<!-- Omnipod - Error -->
|
||||
<string name="omnipod_common_error_pod_not_attached">No active Pod</string>
|
||||
<string name="omnipod_common_error_set_basal_failed">Setting basal profile failed.</string>
|
||||
<string name="omnipod_common_error_bolus_did_not_succeed">Bolus did not succeed.</string>
|
||||
<string name="omnipod_common_error_failed_to_set_profile_empty_profile">Failed to set basal profile: received an empty profile. Make sure to activate your basal profile.</string>
|
||||
<string name="omnipod_common_error_set_initial_basal_schedule_no_profile">No basal profile is active. Make sure to activate your basal profile.</string>
|
||||
<string name="omnipod_common_error_unsupported_custom_command">Unsupported custom command: %1$s</string>
|
||||
<string name="omnipod_common_error_failed_to_refresh_status">Failed to refresh status</string>
|
||||
<string name="omnipod_common_error_failed_to_refresh_status_on_startup">Failed to refresh status on startup</string>
|
||||
<string name="omnipod_common_error_failed_to_acknowledge_alerts">Failed to acknowledge alerts</string>
|
||||
<string name="omnipod_common_error_failed_to_suspend_delivery">Failed to suspend delivery</string>
|
||||
<string name="omnipod_common_error_failed_to_set_time">Failed to set time</string>
|
||||
<string name="omnipod_common_error_failed_to_resume_delivery">Failed to resume delivery</string>
|
||||
<string name="omnipod_common_error_failed_to_initialize_pod">Failed to initialize the Pod</string>
|
||||
<string name="omnipod_common_error_failed_to_insert_cannula">Failed to insert cannula</string>
|
||||
<string name="omnipod_common_error_pod_fault_activation_time_exceeded">The Pod\'s activation time has been exceeded. This Pod can no longer be activated.</string>
|
||||
<string name="omnipod_common_error_failed_to_verify_activation_progress">Failed to verify activation progress. Please retry.</string>
|
||||
<string name="omnipod_common_error_pod_suspended">Pod suspended</string>
|
||||
<string name="omnipod_common_error_failed_to_play_test_beep">Failed to play test beep</string>
|
||||
<string name="omnipod_common_error_time_out_of_sync">The time on the Pod is out of sync. Please update the time in the Omnipod tab.</string>
|
||||
<string name="omnipod_common_error_unexpected_exception">An unexpected error occurred. Please report! (%1$s: %2$s).</string>
|
||||
|
||||
<!-- Omnipod - Confirmation -->
|
||||
<string name="omnipod_common_confirmation">Confirmation</string>
|
||||
<string name="omnipod_common_confirmation_time_or_timezone_change">Time and/or time zone changed on the Pod.</string>
|
||||
<string name="omnipod_common_confirmation_expiration_alerts_updated">Alert configuration has been updated in the Pod.</string>
|
||||
<string name="omnipod_common_confirmation_time_on_pod_updated">The time on the Pod has been updated.</string>
|
||||
<string name="omnipod_common_confirmation_suspended_delivery">All insulin delivery has been suspended.</string>
|
||||
<string name="omnipod_common_confirmation_acknowledged_alerts">Active alerts have been acknowledged.</string>
|
||||
<string name="omnipod_common_confirmation_delivery_resumed">Insulin delivery has been resumed.</string>
|
||||
|
||||
<!-- Omnipod - Overview -->
|
||||
<string name="omnipod_common_overview_button_set_time">Set time</string>
|
||||
<string name="omnipod_common_overview_button_suspend_delivery">Suspend</string>
|
||||
<string name="omnipod_common_overview_button_resume_delivery">Resume Delivery</string>
|
||||
<string name="omnipod_common_overview_button_pod_management">Pod Mgmt</string>
|
||||
<string name="omnipod_common_overview_button_acknowledge_active_alerts">Ack Alerts</string>
|
||||
<string name="omnipod_common_overview_pod_status">Pod Status</string>
|
||||
<string name="omnipod_common_overview_total_delivered">Total Delivered</string>
|
||||
<string name="omnipod_common_overview_total_delivered_value">%1$.2f U</string>
|
||||
<string name="omnipod_common_overview_pod_unique_id">Unique ID</string>
|
||||
<string name="omnipod_common_overview_lot_number">LOT Number</string>
|
||||
<string name="omnipod_common_overview_pod_sequence_number">Sequence Number</string>
|
||||
<string name="omnipod_common_overview_pod_expiry_date">Pod Expires</string>
|
||||
<string name="omnipod_common_overview_last_connection">Last Connection</string>
|
||||
<string name="omnipod_common_overview_last_bolus">Last Bolus</string>
|
||||
<string name="omnipod_common_overview_temp_basal_rate">Temp Basal Rate</string>
|
||||
<string name="omnipod_common_overview_base_basal_rate">Base Basal Rate</string>
|
||||
<string name="omnipod_common_overview_reservoir">Reservoir</string>
|
||||
<string name="omnipod_common_overview_pod_active_alerts">Active Pod Alerts</string>
|
||||
<string name="omnipod_common_overview_firmware_version">Firmware Version</string>
|
||||
<string name="omnipod_common_overview_time_on_pod">Time on Pod</string>
|
||||
<string name="omnipod_common_overview_temp_basal_value">%1$.2fU/h @%2$s (%3$d/%4$d minutes)</string>
|
||||
<string name="omnipod_common_overview_reservoir_value">%1$.2f U left</string>
|
||||
<string name="omnipod_common_overview_reservoir_value_over50">Over 50 U left</string>
|
||||
<string name="omnipod_common_overview_errors">Errors</string>
|
||||
<string name="omnipod_common_overview_last_bolus_value" translatable="false">%1$.2f %2$s (%3$s)</string>
|
||||
|
||||
<!-- Omnipod - Wizard Base -->
|
||||
<string name="omnipod_common_wizard_button_cancel">Cancel</string>
|
||||
<string name="omnipod_common_wizard_button_finish">Finish</string>
|
||||
<string name="omnipod_common_wizard_button_next">Next</string>
|
||||
|
@ -9,4 +92,128 @@
|
|||
<string name="omnipod_common_wizard_button_discard_pod">Discard Pod</string>
|
||||
<string name="omnipod_common_wizard_exit_confirmation_text">You haven\'t completed all steps yet. Are you sure you want to exit?</string>
|
||||
<string name="omnipod_common_wizard_exit_confirmation_title">Exit</string>
|
||||
|
||||
<!-- Omnipod - Pod Activation Wizard -->
|
||||
<string name="omnipod_common_pod_activation_wizard_fill_pod_title">Fill Pod</string>
|
||||
<string name="omnipod_common_pod_activation_wizard_initialize_pod_title">Initialize Pod</string>
|
||||
<string name="omnipod_common_pod_activation_wizard_attach_pod_title">Attach Pod</string>
|
||||
<string name="omnipod_common_pod_activation_wizard_attach_pod_text">Prepare the infusion site. Remove the Pod\'s needle cap and adhesive backing and attach the Pod to the infusion site.\n\nIf the cannula sticks out, please press <b>Cancel</b> and discard your Pod.\n\nPress <b>Next</b> to insert the cannula and begin basal delivery.</string>
|
||||
<string name="omnipod_common_pod_activation_wizard_attach_pod_confirm_insert_cannula_text">When you press <b>OK</b>, the cannula will be inserted. Make sure that you have attached the Pod to the infusion site.</string>
|
||||
<string name="omnipod_common_pod_activation_wizard_insert_cannula_title">Insert Cannula</string>
|
||||
<string name="omnipod_common_pod_activation_wizard_insert_cannula_text">Trying to set initial basal schedule and insert the cannula.\n\nWhen the cannula has successfully been inserted, you can press <b>Next</b>.</string>
|
||||
<string name="omnipod_common_pod_activation_wizard_pod_activated_title">Pod Activated</string>
|
||||
<string name="omnipod_common_pod_activation_wizard_pod_activated_text">The new Pod is now active.\n\nYour basal schedule has been programmed and the cannula has been inserted.\n\nPlease verify that the cannula has been inserted correctly and change your Pod if you think it has not.</string>
|
||||
|
||||
<!-- Omnipod - Pod Deactivation Wizard -->
|
||||
<string name="omnipod_common_pod_deactivation_wizard_deactivate_pod_title">Deactivate Pod</string>
|
||||
<string name="omnipod_common_pod_deactivation_wizard_deactivate_pod_text">Press <b>Next</b> to deactivate the Pod.\n\n<b>Note:</b> This will suspend all insulin delivery and deactivate the Pod.</string>
|
||||
<string name="omnipod_common_pod_deactivation_wizard_deactivating_pod_title">Deactivating Pod</string>
|
||||
<string name="omnipod_common_pod_deactivation_wizard_deactivating_pod_text">Deactivating the Pod.\n\nWhen deactivation has completed successfully, you can press <b>Next</b>.</string>
|
||||
<string name="omnipod_common_pod_deactivation_wizard_pod_deactivated_title">Pod Deactivated</string>
|
||||
<string name="omnipod_common_pod_deactivation_wizard_pod_deactivated_text">Your Pod has been deactivated.\n\nPlease remove the Pod from your body and recycle it.</string>
|
||||
<string name="omnipod_common_pod_deactivation_wizard_pod_discarded_title">Pod Discarded</string>
|
||||
<string name="omnipod_common_pod_deactivation_wizard_pod_discarded_text">The Pod state has been discarded. Insulin delivery has not been suspended because the Pod has not been properly deactivated!\n\nPlease remove the Pod from your body and recycle it.</string>
|
||||
<string name="omnipod_common_pod_deactivation_wizard_discard_pod_confirmation">If you discard the Pod, you will not be able to communicate with it anymore. You should only do this when all communication with the Pod persistently fails. Are you sure you want to discard the Pod?</string>
|
||||
<string name="omnipod_common_pod_deactivation_wizard_discard_pod">Discard Pod</string>
|
||||
|
||||
<!-- Omnipod - Preferences -->
|
||||
<string name="omnipod_common_preferences_bolus_beeps_enabled">Bolus beeps enabled</string>
|
||||
<string name="omnipod_common_preferences_basal_beeps_enabled">Basal beeps enabled</string>
|
||||
<string name="omnipod_common_preferences_smb_beeps_enabled">SMB beeps enabled</string>
|
||||
<string name="omnipod_common_preferences_tbr_beeps_enabled">TBR beeps enabled</string>
|
||||
<string name="omnipod_common_preferences_suspend_delivery_button_enabled">Show Suspend Delivery button in Omnipod tab</string>
|
||||
<string name="omnipod_common_preferences_time_change_enabled">DST/Time zone detection enabled</string>
|
||||
<string name="omnipod_common_preferences_expiration_reminder_enabled">Expiration reminder enabled</string>
|
||||
<string name="omnipod_common_preferences_expiration_reminder_hours_before_shutdown">Hours before shutdown</string>
|
||||
<string name="omnipod_common_preferences_low_reservoir_alert_enabled">Low reservoir alert enabled</string>
|
||||
<string name="omnipod_common_preferences_low_reservoir_alert_units">Number of units</string>
|
||||
<string name="omnipod_common_preferences_automatically_acknowledge_alerts">Automatically acknowledge Pod alerts</string>
|
||||
<string name="omnipod_common_preferences_category_other">Other</string>
|
||||
<string name="omnipod_common_preferences_category_alerts">Alerts</string>
|
||||
<string name="omnipod_common_preferences_category_confirmation_beeps">Confirmation Beeps</string>
|
||||
|
||||
<!-- Omnipod - Pod Status -->
|
||||
<string name="omnipod_common_pod_status_no_active_pod">No Active Pod</string>
|
||||
<string name="omnipod_common_pod_status_waiting_for_activation">Setup in progress (waiting for Pod activation)</string>
|
||||
<string name="omnipod_common_pod_status_waiting_for_cannula_insertion">Setup in progress (waiting for cannula insertion)</string>
|
||||
<string name="omnipod_common_pod_status_running">Running</string>
|
||||
<string name="omnipod_common_pod_status_suspended">Suspended</string>
|
||||
<string name="omnipod_common_pod_status_pod_fault">Pod Fault</string>
|
||||
<string name="omnipod_common_pod_status_activation_time_exceeded">Activation time exceeded</string>
|
||||
<string name="omnipod_common_pod_status_inactive">Inactive</string>
|
||||
<string name="omnipod_common_pod_status_pod_fault_description">Pod Fault: %1$03d %2$s</string>
|
||||
|
||||
<!-- Omnipod - Commands -->
|
||||
<string name="omnipod_common_cmd_deactivate_pod">Deactivate Pod</string>
|
||||
<string name="omnipod_common_cmd_discard_pod">Discard Pod</string>
|
||||
<string name="omnipod_common_cmd_set_bolus">Set Bolus</string>
|
||||
<string name="omnipod_common_cmd_cancel_bolus">Cancel Bolus</string>
|
||||
<string name="omnipod_common_cmd_set_tbr">Set Temporary Basal</string>
|
||||
<string name="omnipod_common_cmd_cancel_tbr_by_driver">Cancel Temporary Basal (internally by driver)</string>
|
||||
<string name="omnipod_common_cmd_cancel_tbr">Cancel Temporary Basal</string>
|
||||
<string name="omnipod_common_cmd_set_basal_schedule">Set Basal Schedule</string>
|
||||
<string name="omnipod_common_cmd_get_pod_status">Get Pod Status</string>
|
||||
<string name="omnipod_common_cmd_get_pod_info">Get Pod Info</string>
|
||||
<string name="omnipod_common_cmd_set_time">Set Time</string>
|
||||
<string name="omnipod_common_cmd_configure_alerts">Configure Alerts</string>
|
||||
<string name="omnipod_common_cmd_acknowledge_alerts">Acknowledge Alerts</string>
|
||||
<string name="omnipod_common_cmd_suspend_delivery">Suspend Delivery</string>
|
||||
<string name="omnipod_common_cmd_resume_delivery">Resume Delivery</string>
|
||||
<string name="omnipod_common_cmd_unknown_entry">Unknown Entry</string>
|
||||
<string name="omnipod_common_cmd_initialize_pod">Initialize Pod</string>
|
||||
<string name="omnipod_common_cmd_insert_cannula">Insert Cannula</string>
|
||||
<string name="omnipod_common_cmd_read_pulse_log">Read Pulse Log</string>
|
||||
<string name="omnipod_common_cmd_set_fake_suspended_tbr">Set fake temporary basal because the Pod is suspended</string>
|
||||
<string name="omnipod_common_cmd_cancel_fake_suspended_tbr">Cancel fake temporary basal that was created because the Pod was suspended</string>
|
||||
<string name="omnipod_common_cmd_split_tbr">Split temporary basal because of uncertain failure in cancellation</string>
|
||||
<string name="omnipod_common_cmd_beep_config">Beep Config</string>
|
||||
<string name="omnipod_common_cmd_play_test_beep">Play Test Beep</string>
|
||||
|
||||
<!-- Omnipod - Alerts -->
|
||||
<string name="omnipod_common_alert_finish_pairing_reminder">Finish pairing reminder</string>
|
||||
<string name="omnipod_common_alert_finish_setup_reminder_reminder">Finish setup reminder</string>
|
||||
<string name="omnipod_common_alert_expiration">Pod will expire soon</string>
|
||||
<string name="omnipod_common_alert_expiration_advisory">Pod will expire soon</string>
|
||||
<string name="omnipod_common_alert_shutdown_imminent">Shutdown is imminent</string>
|
||||
<string name="omnipod_common_alert_low_reservoir">Low Reservoir</string>
|
||||
<string name="omnipod_common_alert_unknown_alert">Unknown Alert</string>
|
||||
|
||||
<!-- Omnipod - Short status -->
|
||||
<string name="omnipod_common_short_status_no_active_pod">No Active Pod</string>
|
||||
<string name="omnipod_common_short_status_last_connection">LastConn: %1$d min ago</string>
|
||||
<string name="omnipod_common_short_status_last_bolus">LastBolus: %1$s @ %2$s</string>
|
||||
<string name="omnipod_common_short_status_temp_basal">Temp: %1$s</string>
|
||||
<string name="omnipod_common_short_status_extended_bolus">Extended: %1$s</string>
|
||||
<string name="omnipod_common_short_status_reservoir">Reserv: %1$sU</string>
|
||||
|
||||
<!-- Omnipod - Other -->
|
||||
<string name="omnipod_common_yes">Yes</string>
|
||||
<string name="omnipod_common_no">No</string>
|
||||
<string name="omnipod_common_ok">OK</string>
|
||||
<string name="omnipod_common_cancel">Cancel</string>
|
||||
<string name="omnipod_common_warning">Warning</string>
|
||||
<string name="omnipod_common_two_strings_concatenated_by_colon" translatable="false">%1$s: %2$s</string>
|
||||
|
||||
<!-- Omnipod - Times -->
|
||||
<string name="omnipod_common_time_with_timezone" translatable="false">%1$s (%2$s)</string>
|
||||
<string name="omnipod_common_moments_ago">Moments ago</string>
|
||||
<string name="omnipod_common_less_than_a_minute_ago">Less than a minute ago</string>
|
||||
<string name="omnipod_common_composite_time">%1$s and %2$s</string>
|
||||
<string name="omnipod_common_time_ago">%1$s ago</string>
|
||||
<plurals name="omnipod_common_minutes">
|
||||
<item quantity="one">%1$d minute</item>
|
||||
<item quantity="other">%1$d minutes</item>
|
||||
</plurals>
|
||||
<plurals name="omnipod_common_hours">
|
||||
<item quantity="one">%1$d hour</item>
|
||||
<item quantity="other">%1$d hours</item>
|
||||
</plurals>
|
||||
<plurals name="omnipod_common_days">
|
||||
<item quantity="one">%1$d day</item>
|
||||
<item quantity="other">%1$d days</item>
|
||||
</plurals>
|
||||
<plurals name="omnipod_common_pod_alerts">
|
||||
<item quantity="one">Pod Alert: %1$s</item>
|
||||
<item quantity="other">Pod Alerts: %1$s</item>
|
||||
</plurals>
|
||||
</resources>
|
|
@ -1,4 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest package="info.nightscout.androidaps.plugins.pump.omnipod.dash">
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="info.nightscout.androidaps.plugins.pump.omnipod.dash">
|
||||
|
||||
<uses-permission android:name="android.permission.BLUETOOTH" />
|
||||
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
</manifest>
|
|
@ -1,5 +1,170 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.dash;
|
||||
|
||||
public class OmnipodDashPumpPlugin {
|
||||
// TODO
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import info.nightscout.androidaps.data.DetailedBolusInfo;
|
||||
import info.nightscout.androidaps.data.Profile;
|
||||
import info.nightscout.androidaps.data.PumpEnactResult;
|
||||
import info.nightscout.androidaps.interfaces.PumpDescription;
|
||||
import info.nightscout.androidaps.interfaces.PumpInterface;
|
||||
import info.nightscout.androidaps.plugins.common.ManufacturerType;
|
||||
import info.nightscout.androidaps.plugins.general.actions.defs.CustomAction;
|
||||
import info.nightscout.androidaps.plugins.general.actions.defs.CustomActionType;
|
||||
import info.nightscout.androidaps.plugins.pump.common.defs.PumpType;
|
||||
import info.nightscout.androidaps.queue.commands.CustomCommand;
|
||||
import info.nightscout.androidaps.utils.TimeChangeType;
|
||||
|
||||
public class OmnipodDashPumpPlugin implements PumpInterface {
|
||||
@Override public boolean isInitialized() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override public boolean isSuspended() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override public boolean isBusy() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override public boolean isConnected() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override public boolean isConnecting() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override public boolean isHandshakeInProgress() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override public void finishHandshaking() {
|
||||
|
||||
}
|
||||
|
||||
@Override public void connect(String reason) {
|
||||
|
||||
}
|
||||
|
||||
@Override public void disconnect(String reason) {
|
||||
|
||||
}
|
||||
|
||||
@Override public void stopConnecting() {
|
||||
|
||||
}
|
||||
|
||||
@Override public void getPumpStatus(String reason) {
|
||||
|
||||
}
|
||||
|
||||
@NotNull @Override public PumpEnactResult setNewBasalProfile(Profile profile) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override public boolean isThisProfileSet(Profile profile) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override public long lastDataTime() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override public double getBaseBasalRate() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override public double getReservoirLevel() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override public int getBatteryLevel() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@NotNull @Override public PumpEnactResult deliverTreatment(DetailedBolusInfo detailedBolusInfo) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override public void stopBolusDelivering() {
|
||||
|
||||
}
|
||||
|
||||
@NotNull @Override public PumpEnactResult setTempBasalAbsolute(Double absoluteRate, Integer durationInMinutes, Profile profile, boolean enforceNew) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@NotNull @Override public PumpEnactResult setTempBasalPercent(Integer percent, Integer durationInMinutes, Profile profile, boolean enforceNew) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@NotNull @Override public PumpEnactResult setExtendedBolus(Double insulin, Integer durationInMinutes) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@NotNull @Override public PumpEnactResult cancelTempBasal(boolean enforceNew) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@NotNull @Override public PumpEnactResult cancelExtendedBolus() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@NotNull @Override public JSONObject getJSONStatus(Profile profile, String profileName, String version) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@NotNull @Override public ManufacturerType manufacturer() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@NotNull @Override public PumpType model() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@NotNull @Override public String serialNumber() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@NotNull @Override public PumpDescription getPumpDescription() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@NotNull @Override public String shortStatus(boolean veryShort) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override public boolean isFakingTempsByExtendedBoluses() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@NotNull @Override public PumpEnactResult loadTDDs() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override public boolean canHandleDST() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Nullable @Override public List<CustomAction> getCustomActions() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override public void executeCustomAction(CustomActionType customActionType) {
|
||||
|
||||
}
|
||||
|
||||
@Nullable @Override public PumpEnactResult executeCustomCommand(CustomCommand customCommand) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override public void timezoneOrDSTChanged(TimeChangeType timeChangeType) {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver;
|
||||
|
||||
public interface OmnipodDashManager {
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm;
|
||||
|
||||
public interface OmnipodDashCommunicationManager {
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.state;
|
||||
|
||||
public interface OmnipodDashPodStateManager {
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.dash.ui
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import dagger.android.support.DaggerFragment
|
||||
|
||||
class OmnipodDashOverviewFragment : DaggerFragment() {
|
||||
|
||||
private var _binding: OmnipodOverviewBinding? = null
|
||||
|
||||
// This property is only valid between onCreateView and
|
||||
// onDestroyView.
|
||||
private val binding get() = _binding!!
|
||||
|
||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View =
|
||||
OmnipodOverviewBinding.inflate(inflater, container, false).also { _binding = it }.root
|
||||
}
|
10
omnipod-dash/src/main/res/values/strings.xml
Normal file
10
omnipod-dash/src/main/res/values/strings.xml
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Omnipod Dash - Description -->
|
||||
<string name="omnipod_dash_name" translatable="false">Dash</string>
|
||||
<string name="omnipod_dash_name_short" translatable="false">Dash</string>
|
||||
<string name="omnipod_dash_pump_description">Pump integration for Omnipod Dash (the new, Bluetooth-enabled model with a blue needle cap).</string>
|
||||
|
||||
<!-- Omnipod Dash - Keys -->
|
||||
<string name="key_omnipod_dash_pod_state" translatable="false">AAPS.OmnipodDash.pod_state</string>
|
||||
</resources>
|
83
omnipod-dash/src/main/res/xml/omnipod_dash_preferences.xml
Normal file
83
omnipod-dash/src/main/res/xml/omnipod_dash_preferences.xml
Normal file
|
@ -0,0 +1,83 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:validate="http://schemas.android.com/apk/res-auto">
|
||||
<PreferenceCategory android:title="@string/omnipod_common_preferences_category_confirmation_beeps">
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="@string/key_omnipod_common_bolus_beeps_enabled"
|
||||
android:title="@string/omnipod_common_preferences_bolus_beeps_enabled" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="@string/key_omnipod_common_basal_beeps_enabled"
|
||||
android:title="@string/omnipod_common_preferences_basal_beeps_enabled" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="@string/key_omnipod_common_smb_beeps_enabled"
|
||||
android:title="@string/omnipod_common_preferences_smb_beeps_enabled" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="@string/key_omnipod_common_tbr_beeps_enabled"
|
||||
android:title="@string/omnipod_common_preferences_tbr_beeps_enabled" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory android:title="@string/omnipod_common_preferences_category_alerts">
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="@string/key_omnipod_common_expiration_reminder_enabled"
|
||||
android:title="@string/omnipod_common_preferences_expiration_reminder_enabled" />
|
||||
|
||||
<info.nightscout.androidaps.utils.textValidator.ValidatingEditTextPreference
|
||||
android:defaultValue="9"
|
||||
android:dependency="@string/key_omnipod_common_expiration_reminder_enabled"
|
||||
android:digits="0123456789"
|
||||
android:inputType="number"
|
||||
android:key="@string/key_omnipod_common_expiration_reminder_hours_before_shutdown"
|
||||
android:title="@string/omnipod_common_preferences_expiration_reminder_hours_before_shutdown"
|
||||
validate:maxNumber="24"
|
||||
validate:minNumber="2"
|
||||
validate:testType="numericRange" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="@string/key_omnipod_common_low_reservoir_alert_enabled"
|
||||
android:title="@string/omnipod_common_preferences_low_reservoir_alert_enabled" />
|
||||
|
||||
<info.nightscout.androidaps.utils.textValidator.ValidatingEditTextPreference
|
||||
android:defaultValue="20"
|
||||
android:dependency="@string/key_omnipod_common_low_reservoir_alert_enabled"
|
||||
android:digits="0123456789"
|
||||
android:inputType="number"
|
||||
android:key="@string/key_omnipod_common_low_reservoir_alert_units"
|
||||
android:title="@string/omnipod_common_preferences_low_reservoir_alert_units"
|
||||
validate:maxNumber="50"
|
||||
validate:minNumber="5"
|
||||
validate:testType="numericRange" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="@string/key_omnipod_common_automatically_acknowledge_alerts_enabled"
|
||||
android:title="@string/omnipod_common_preferences_automatically_acknowledge_alerts" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory android:title="@string/omnipod_common_preferences_category_other">
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="@string/key_omnipod_common_suspend_delivery_button_enabled"
|
||||
android:title="@string/omnipod_common_preferences_suspend_delivery_button_enabled" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="@string/key_omnipod_common_time_change_event_enabled"
|
||||
android:title="@string/omnipod_common_preferences_time_change_enabled" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
</androidx.preference.PreferenceScreen>
|
|
@ -7,9 +7,7 @@
|
|||
android:enabled="true"
|
||||
android:exported="true" />
|
||||
|
||||
<activity android:name=".ui.PodManagementActivity" />
|
||||
<activity android:name=".ui.PodHistoryActivity" />
|
||||
<activity android:name=".ui.wizard.activation.PodActivationWizardActivity" />
|
||||
<activity android:name=".ui.wizard.deactivation.PodDeactivationWizardActivity" />
|
||||
<activity android:name=".ui.ErosPodManagementActivity" />
|
||||
<activity android:name=".ui.ErosPodHistoryActivity" />
|
||||
</application>
|
||||
</manifest>
|
|
@ -66,10 +66,17 @@ import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLin
|
|||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLinkPumpInfo;
|
||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.RileyLinkServiceData;
|
||||
import info.nightscout.androidaps.plugins.pump.common.utils.DateTimeUtil;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.queue.command.CommandAcknowledgeAlerts;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.queue.command.CommandDeactivatePod;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.queue.command.CommandHandleTimeChange;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.queue.command.CommandPlayTestBeep;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.queue.command.CommandResumeDelivery;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.queue.command.CommandSuspendDelivery;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.queue.command.CommandUpdateAlertConfiguration;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.data.ActiveBolus;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.data.RLHistoryItemOmnipod;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.definition.OmnipodCommandType;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.definition.OmnipodStorageKeys;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.definition.OmnipodErosCommandType;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.definition.OmnipodErosStorageKeys;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.action.service.ExpirationReminderBuilder;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.response.podinfo.PodInfoRecentPulseLog;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.ActivationProgress;
|
||||
|
@ -83,16 +90,12 @@ import info.nightscout.androidaps.plugins.pump.omnipod.eros.event.EventOmnipodFa
|
|||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.event.EventOmnipodPumpValuesChanged;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.event.EventOmnipodTbrChanged;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.event.EventOmnipodUncertainTbrRecovered;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.manager.AapsOmnipodManager;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.queue.command.CommandAcknowledgeAlerts;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.queue.command.CommandHandleTimeChange;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.queue.command.CommandPlayTestBeep;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.queue.command.CommandUpdateAlertConfiguration;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.queue.command.OmnipodCustomCommand;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.queue.command.OmnipodCustomCommandType;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.manager.AapsOmnipodErosManager;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.queue.command.CommandGetPodStatus;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.queue.command.CommandReadPulseLog;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.rileylink.manager.OmnipodRileyLinkCommunicationManager;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.rileylink.service.RileyLinkOmnipodService;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.OmnipodOverviewFragment;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.OmnipodErosOverviewFragment;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.util.AapsOmnipodUtil;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.util.OmnipodAlertUtil;
|
||||
import info.nightscout.androidaps.queue.Callback;
|
||||
|
@ -123,7 +126,7 @@ public class OmnipodErosPumpPlugin extends PumpPluginBase implements PumpInterfa
|
|||
|
||||
private final PodStateManager podStateManager;
|
||||
private final RileyLinkServiceData rileyLinkServiceData;
|
||||
private final AapsOmnipodManager aapsOmnipodManager;
|
||||
private final AapsOmnipodErosManager aapsOmnipodErosManager;
|
||||
private final AapsOmnipodUtil aapsOmnipodUtil;
|
||||
private final RileyLinkUtil rileyLinkUtil;
|
||||
private final OmnipodAlertUtil omnipodAlertUtil;
|
||||
|
@ -140,7 +143,7 @@ public class OmnipodErosPumpPlugin extends PumpPluginBase implements PumpInterfa
|
|||
private final PumpDescription pumpDescription;
|
||||
private final ServiceConnection serviceConnection;
|
||||
private final OmnipodRileyLinkCommunicationManager omnipodRileyLinkCommunicationManager;
|
||||
private final PumpType pumpType = PumpType.Insulet_Omnipod;
|
||||
private final PumpType pumpType = PumpType.Omnipod_Eros;
|
||||
private final CompositeDisposable disposables = new CompositeDisposable();
|
||||
private final NSUpload nsUpload;
|
||||
|
||||
|
@ -168,7 +171,7 @@ public class OmnipodErosPumpPlugin extends PumpPluginBase implements PumpInterfa
|
|||
ActivePluginProvider activePlugin,
|
||||
SP sp,
|
||||
PodStateManager podStateManager,
|
||||
AapsOmnipodManager aapsOmnipodManager,
|
||||
AapsOmnipodErosManager aapsOmnipodErosManager,
|
||||
CommandQueueProvider commandQueue,
|
||||
FabricPrivacy fabricPrivacy,
|
||||
RileyLinkServiceData rileyLinkServiceData,
|
||||
|
@ -182,12 +185,12 @@ public class OmnipodErosPumpPlugin extends PumpPluginBase implements PumpInterfa
|
|||
) {
|
||||
super(new PluginDescription() //
|
||||
.mainType(PluginType.PUMP) //
|
||||
.fragmentClass(OmnipodOverviewFragment.class.getName()) //
|
||||
.fragmentClass(OmnipodErosOverviewFragment.class.getName()) //
|
||||
.pluginIcon(R.drawable.ic_pod_128)
|
||||
.pluginName(R.string.omnipod_name) //
|
||||
.shortName(R.string.omnipod_name_short) //
|
||||
.preferencesId(R.xml.pref_omnipod) //
|
||||
.description(R.string.omnipod_pump_description), //
|
||||
.pluginName(R.string.omnipod_eros_name) //
|
||||
.shortName(R.string.omnipod_eros_name_short) //
|
||||
.preferencesId(R.xml.omnipod_eros_preferences) //
|
||||
.description(R.string.omnipod_eros_pump_description), //
|
||||
injector, aapsLogger, resourceHelper, commandQueue);
|
||||
this.aapsLogger = aapsLogger;
|
||||
this.aapsSchedulers = aapsSchedulers;
|
||||
|
@ -200,7 +203,7 @@ public class OmnipodErosPumpPlugin extends PumpPluginBase implements PumpInterfa
|
|||
this.dateUtil = dateUtil;
|
||||
this.podStateManager = podStateManager;
|
||||
this.rileyLinkServiceData = rileyLinkServiceData;
|
||||
this.aapsOmnipodManager = aapsOmnipodManager;
|
||||
this.aapsOmnipodErosManager = aapsOmnipodErosManager;
|
||||
this.aapsOmnipodUtil = aapsOmnipodUtil;
|
||||
this.rileyLinkUtil = rileyLinkUtil;
|
||||
this.omnipodAlertUtil = omnipodAlertUtil;
|
||||
|
@ -242,9 +245,9 @@ public class OmnipodErosPumpPlugin extends PumpPluginBase implements PumpInterfa
|
|||
@Override public void run() {
|
||||
if (commandQueue.size() == 0) {
|
||||
if (podStateManager.isPodRunning() && !podStateManager.isSuspended()) {
|
||||
aapsOmnipodManager.cancelSuspendedFakeTbrIfExists();
|
||||
aapsOmnipodErosManager.cancelSuspendedFakeTbrIfExists();
|
||||
} else {
|
||||
aapsOmnipodManager.createSuspendedFakeTbrIfNotExists();
|
||||
aapsOmnipodErosManager.createSuspendedFakeTbrIfNotExists();
|
||||
}
|
||||
|
||||
if (OmnipodErosPumpPlugin.this.hasTimeDateOrTimeZoneChanged) {
|
||||
|
@ -254,7 +257,7 @@ public class OmnipodErosPumpPlugin extends PumpPluginBase implements PumpInterfa
|
|||
getCommandQueue().customCommand(new CommandUpdateAlertConfiguration(), null);
|
||||
}
|
||||
|
||||
if (aapsOmnipodManager.isAutomaticallyAcknowledgeAlertsEnabled() && podStateManager.isPodActivationCompleted() && !podStateManager.isPodDead() &&
|
||||
if (aapsOmnipodErosManager.isAutomaticallyAcknowledgeAlertsEnabled() && podStateManager.isPodActivationCompleted() && !podStateManager.isPodDead() &&
|
||||
podStateManager.getActiveAlerts().size() > 0 && !getCommandQueue().isCustomCommandInQueue(CommandAcknowledgeAlerts.class)) {
|
||||
queueAcknowledgeAlertsCommand();
|
||||
}
|
||||
|
@ -314,25 +317,25 @@ public class OmnipodErosPumpPlugin extends PumpPluginBase implements PumpInterfa
|
|||
.toObservable(EventPreferenceChange.class)
|
||||
.observeOn(aapsSchedulers.getIo())
|
||||
.subscribe(event -> {
|
||||
if (event.isChanged(getResourceHelper(), OmnipodStorageKeys.Preferences.BASAL_BEEPS_ENABLED) ||
|
||||
event.isChanged(getResourceHelper(), OmnipodStorageKeys.Preferences.BOLUS_BEEPS_ENABLED) ||
|
||||
event.isChanged(getResourceHelper(), OmnipodStorageKeys.Preferences.TBR_BEEPS_ENABLED) ||
|
||||
event.isChanged(getResourceHelper(), OmnipodStorageKeys.Preferences.SMB_BEEPS_ENABLED) ||
|
||||
event.isChanged(getResourceHelper(), OmnipodStorageKeys.Preferences.SUSPEND_DELIVERY_BUTTON_ENABLED) ||
|
||||
event.isChanged(getResourceHelper(), OmnipodStorageKeys.Preferences.PULSE_LOG_BUTTON_ENABLED) ||
|
||||
event.isChanged(getResourceHelper(), OmnipodStorageKeys.Preferences.RILEY_LINK_STATS_BUTTON_ENABLED) ||
|
||||
event.isChanged(getResourceHelper(), OmnipodStorageKeys.Preferences.SHOW_RILEY_LINK_BATTERY_LEVEL) ||
|
||||
event.isChanged(getResourceHelper(), OmnipodStorageKeys.Preferences.BATTERY_CHANGE_LOGGING_ENABLED) ||
|
||||
event.isChanged(getResourceHelper(), OmnipodStorageKeys.Preferences.TIME_CHANGE_EVENT_ENABLED) ||
|
||||
event.isChanged(getResourceHelper(), OmnipodStorageKeys.Preferences.NOTIFICATION_UNCERTAIN_TBR_SOUND_ENABLED) ||
|
||||
event.isChanged(getResourceHelper(), OmnipodStorageKeys.Preferences.NOTIFICATION_UNCERTAIN_SMB_SOUND_ENABLED) ||
|
||||
event.isChanged(getResourceHelper(), OmnipodStorageKeys.Preferences.NOTIFICATION_UNCERTAIN_BOLUS_SOUND_ENABLED) ||
|
||||
event.isChanged(getResourceHelper(), OmnipodStorageKeys.Preferences.AUTOMATICALLY_ACKNOWLEDGE_ALERTS_ENABLED)) {
|
||||
aapsOmnipodManager.reloadSettings();
|
||||
} else if (event.isChanged(getResourceHelper(), OmnipodStorageKeys.Preferences.EXPIRATION_REMINDER_ENABLED) ||
|
||||
event.isChanged(getResourceHelper(), OmnipodStorageKeys.Preferences.EXPIRATION_REMINDER_HOURS_BEFORE_SHUTDOWN) ||
|
||||
event.isChanged(getResourceHelper(), OmnipodStorageKeys.Preferences.LOW_RESERVOIR_ALERT_ENABLED) ||
|
||||
event.isChanged(getResourceHelper(), OmnipodStorageKeys.Preferences.LOW_RESERVOIR_ALERT_UNITS)) {
|
||||
if (event.isChanged(getResourceHelper(), OmnipodErosStorageKeys.Preferences.BASAL_BEEPS_ENABLED) ||
|
||||
event.isChanged(getResourceHelper(), OmnipodErosStorageKeys.Preferences.BOLUS_BEEPS_ENABLED) ||
|
||||
event.isChanged(getResourceHelper(), OmnipodErosStorageKeys.Preferences.TBR_BEEPS_ENABLED) ||
|
||||
event.isChanged(getResourceHelper(), OmnipodErosStorageKeys.Preferences.SMB_BEEPS_ENABLED) ||
|
||||
event.isChanged(getResourceHelper(), OmnipodErosStorageKeys.Preferences.SUSPEND_DELIVERY_BUTTON_ENABLED) ||
|
||||
event.isChanged(getResourceHelper(), OmnipodErosStorageKeys.Preferences.PULSE_LOG_BUTTON_ENABLED) ||
|
||||
event.isChanged(getResourceHelper(), OmnipodErosStorageKeys.Preferences.RILEY_LINK_STATS_BUTTON_ENABLED) ||
|
||||
event.isChanged(getResourceHelper(), OmnipodErosStorageKeys.Preferences.SHOW_RILEY_LINK_BATTERY_LEVEL) ||
|
||||
event.isChanged(getResourceHelper(), OmnipodErosStorageKeys.Preferences.BATTERY_CHANGE_LOGGING_ENABLED) ||
|
||||
event.isChanged(getResourceHelper(), OmnipodErosStorageKeys.Preferences.TIME_CHANGE_EVENT_ENABLED) ||
|
||||
event.isChanged(getResourceHelper(), OmnipodErosStorageKeys.Preferences.NOTIFICATION_UNCERTAIN_TBR_SOUND_ENABLED) ||
|
||||
event.isChanged(getResourceHelper(), OmnipodErosStorageKeys.Preferences.NOTIFICATION_UNCERTAIN_SMB_SOUND_ENABLED) ||
|
||||
event.isChanged(getResourceHelper(), OmnipodErosStorageKeys.Preferences.NOTIFICATION_UNCERTAIN_BOLUS_SOUND_ENABLED) ||
|
||||
event.isChanged(getResourceHelper(), OmnipodErosStorageKeys.Preferences.AUTOMATICALLY_ACKNOWLEDGE_ALERTS_ENABLED)) {
|
||||
aapsOmnipodErosManager.reloadSettings();
|
||||
} else if (event.isChanged(getResourceHelper(), OmnipodErosStorageKeys.Preferences.EXPIRATION_REMINDER_ENABLED) ||
|
||||
event.isChanged(getResourceHelper(), OmnipodErosStorageKeys.Preferences.EXPIRATION_REMINDER_HOURS_BEFORE_SHUTDOWN) ||
|
||||
event.isChanged(getResourceHelper(), OmnipodErosStorageKeys.Preferences.LOW_RESERVOIR_ALERT_ENABLED) ||
|
||||
event.isChanged(getResourceHelper(), OmnipodErosStorageKeys.Preferences.LOW_RESERVOIR_ALERT_UNITS)) {
|
||||
if (!verifyPodAlertConfiguration()) {
|
||||
getCommandQueue().customCommand(new CommandUpdateAlertConfiguration(), null);
|
||||
}
|
||||
|
@ -347,16 +350,16 @@ public class OmnipodErosPumpPlugin extends PumpPluginBase implements PumpInterfa
|
|||
// If so, add it to history
|
||||
// Needs to be done after EventAppInitialized because otherwise, TreatmentsPlugin.onStart() hasn't been called yet
|
||||
// so it didn't initialize a TreatmentService yet, resulting in a NullPointerException
|
||||
if (sp.contains(OmnipodStorageKeys.Preferences.ACTIVE_BOLUS)) {
|
||||
String activeBolusString = sp.getString(OmnipodStorageKeys.Preferences.ACTIVE_BOLUS, "");
|
||||
if (sp.contains(OmnipodErosStorageKeys.Preferences.ACTIVE_BOLUS)) {
|
||||
String activeBolusString = sp.getString(OmnipodErosStorageKeys.Preferences.ACTIVE_BOLUS, "");
|
||||
aapsLogger.warn(LTag.PUMP, "Found active bolus in SP: {}. Adding Treatment.", activeBolusString);
|
||||
try {
|
||||
ActiveBolus activeBolus = aapsOmnipodUtil.getGsonInstance().fromJson(activeBolusString, ActiveBolus.class);
|
||||
aapsOmnipodManager.addBolusToHistory(activeBolus.toDetailedBolusInfo(aapsLogger));
|
||||
aapsOmnipodErosManager.addBolusToHistory(activeBolus.toDetailedBolusInfo(aapsLogger));
|
||||
} catch (Exception ex) {
|
||||
aapsLogger.error(LTag.PUMP, "Failed to add active bolus to history", ex);
|
||||
}
|
||||
sp.remove(OmnipodStorageKeys.Preferences.ACTIVE_BOLUS);
|
||||
sp.remove(OmnipodErosStorageKeys.Preferences.ACTIVE_BOLUS);
|
||||
}
|
||||
}, fabricPrivacy::logException)
|
||||
);
|
||||
|
@ -367,8 +370,8 @@ public class OmnipodErosPumpPlugin extends PumpPluginBase implements PumpInterfa
|
|||
}
|
||||
|
||||
private void handleCancelledTbr() {
|
||||
if (!podStateManager.isTempBasalRunning() && activePlugin.getActiveTreatments().isTempBasalInProgress() && !aapsOmnipodManager.hasSuspendedFakeTbr()) {
|
||||
aapsOmnipodManager.reportCancelledTbr();
|
||||
if (!podStateManager.isTempBasalRunning() && activePlugin.getActiveTreatments().isTempBasalInProgress() && !aapsOmnipodErosManager.hasSuspendedFakeTbr()) {
|
||||
aapsOmnipodErosManager.reportCancelledTbr();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -378,7 +381,7 @@ public class OmnipodErosPumpPlugin extends PumpPluginBase implements PumpInterfa
|
|||
if (podStateManager.isTempBasalRunning() && tempBasal == null) {
|
||||
if (podStateManager.hasTempBasal()) {
|
||||
aapsLogger.warn(LTag.PUMP, "Registering TBR that AAPS was unaware of");
|
||||
long pumpId = aapsOmnipodManager.addTbrSuccessToHistory(podStateManager.getTempBasalStartTime().getMillis(),
|
||||
long pumpId = aapsOmnipodErosManager.addTbrSuccessToHistory(podStateManager.getTempBasalStartTime().getMillis(),
|
||||
new TempBasalPair(podStateManager.getTempBasalAmount(), false, (int) podStateManager.getTempBasalDuration().getStandardMinutes()));
|
||||
|
||||
TemporaryBasal temporaryBasal = new TemporaryBasal(getInjector()) //
|
||||
|
@ -392,7 +395,7 @@ public class OmnipodErosPumpPlugin extends PumpPluginBase implements PumpInterfa
|
|||
} else {
|
||||
// Not sure what's going on. Notify the user
|
||||
aapsLogger.error(LTag.PUMP, "Unknown TBR in both Pod state and AAPS");
|
||||
rxBus.send(new EventNewNotification(new Notification(Notification.OMNIPOD_UNKNOWN_TBR, resourceHelper.gs(R.string.omnipod_error_tbr_running_but_aaps_not_aware), Notification.NORMAL).sound(R.raw.boluserror)));
|
||||
rxBus.send(new EventNewNotification(new Notification(Notification.OMNIPOD_UNKNOWN_TBR, resourceHelper.gs(R.string.omnipod_eros_error_tbr_running_but_aaps_not_aware), Notification.NORMAL).sound(R.raw.boluserror)));
|
||||
}
|
||||
} else if (!podStateManager.isTempBasalRunning() && tempBasal != null) {
|
||||
aapsLogger.warn(LTag.PUMP, "Removing AAPS TBR that actually hadn't succeeded");
|
||||
|
@ -407,12 +410,12 @@ public class OmnipodErosPumpPlugin extends PumpPluginBase implements PumpInterfa
|
|||
AlertSet activeAlerts = podStateManager.getActiveAlerts();
|
||||
if (activeAlerts.size() > 0) {
|
||||
String alerts = TextUtils.join(", ", aapsOmnipodUtil.getTranslatedActiveAlerts(podStateManager));
|
||||
String notificationText = resourceHelper.gq(R.plurals.omnipod_pod_alerts, activeAlerts.size(), alerts);
|
||||
String notificationText = resourceHelper.gq(R.plurals.omnipod_common_pod_alerts, activeAlerts.size(), alerts);
|
||||
Notification notification = new Notification(Notification.OMNIPOD_POD_ALERTS, notificationText, Notification.URGENT);
|
||||
rxBus.send(new EventNewNotification(notification));
|
||||
nsUpload.uploadError(notificationText);
|
||||
|
||||
if (aapsOmnipodManager.isAutomaticallyAcknowledgeAlertsEnabled() && !getCommandQueue().isCustomCommandInQueue(CommandAcknowledgeAlerts.class)) {
|
||||
if (aapsOmnipodErosManager.isAutomaticallyAcknowledgeAlertsEnabled() && !getCommandQueue().isCustomCommandInQueue(CommandAcknowledgeAlerts.class)) {
|
||||
queueAcknowledgeAlertsCommand();
|
||||
}
|
||||
}
|
||||
|
@ -421,7 +424,7 @@ public class OmnipodErosPumpPlugin extends PumpPluginBase implements PumpInterfa
|
|||
|
||||
private void handlePodFaultEvent() {
|
||||
if (podStateManager.isPodFaulted()) {
|
||||
String notificationText = resourceHelper.gs(R.string.omnipod_pod_status_pod_fault_description, podStateManager.getFaultEventCode().getValue(), podStateManager.getFaultEventCode().name());
|
||||
String notificationText = resourceHelper.gs(R.string.omnipod_common_pod_status_pod_fault_description, podStateManager.getFaultEventCode().getValue(), podStateManager.getFaultEventCode().name());
|
||||
nsUpload.uploadError(notificationText);
|
||||
}
|
||||
}
|
||||
|
@ -451,19 +454,19 @@ public class OmnipodErosPumpPlugin extends PumpPluginBase implements PumpInterfa
|
|||
private void updatePodWarningNotifications() {
|
||||
if (System.currentTimeMillis() > this.nextPodWarningCheck) {
|
||||
if (!podStateManager.isPodRunning()) {
|
||||
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_common_error_pod_not_attached), Notification.NORMAL);
|
||||
rxBus.send(new EventNewNotification(notification));
|
||||
} else {
|
||||
rxBus.send(new EventDismissNotification(Notification.OMNIPOD_POD_NOT_ATTACHED));
|
||||
|
||||
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_common_error_pod_suspended), Notification.NORMAL);
|
||||
rxBus.send(new EventNewNotification(notification));
|
||||
} else {
|
||||
rxBus.send(new EventDismissNotification(Notification.OMNIPOD_POD_SUSPENDED));
|
||||
|
||||
if (podStateManager.timeDeviatesMoreThan(OmnipodConstants.TIME_DEVIATION_THRESHOLD)) {
|
||||
Notification notification = new Notification(Notification.OMNIPOD_TIME_OUT_OF_SYNC, resourceHelper.gs(R.string.omnipod_error_time_out_of_sync), Notification.NORMAL);
|
||||
Notification notification = new Notification(Notification.OMNIPOD_TIME_OUT_OF_SYNC, resourceHelper.gs(R.string.omnipod_common_error_time_out_of_sync), Notification.NORMAL);
|
||||
rxBus.send(new EventNewNotification(notification));
|
||||
} else {
|
||||
rxBus.send(new EventDismissNotification(Notification.OMNIPOD_TIME_OUT_OF_SYNC));
|
||||
|
@ -524,7 +527,7 @@ public class OmnipodErosPumpPlugin extends PumpPluginBase implements PumpInterfa
|
|||
}
|
||||
|
||||
@Override public RileyLinkPumpInfo getPumpInfo() {
|
||||
String frequency = resourceHelper.gs(R.string.omnipod_frequency);
|
||||
String frequency = resourceHelper.gs(R.string.omnipod_eros_frequency);
|
||||
String connectedModel = "Eros";
|
||||
String serialNumber = podStateManager.isPodInitialized() ? String.valueOf(podStateManager.getAddress()) : "-";
|
||||
return new RileyLinkPumpInfo(frequency, connectedModel, serialNumber);
|
||||
|
@ -578,13 +581,13 @@ public class OmnipodErosPumpPlugin extends PumpPluginBase implements PumpInterfa
|
|||
}
|
||||
|
||||
private PumpEnactResult getPodStatus() {
|
||||
return executeCommand(OmnipodCommandType.GET_POD_STATUS, aapsOmnipodManager::getPodStatus);
|
||||
return executeCommand(OmnipodErosCommandType.GET_POD_STATUS, aapsOmnipodErosManager::getPodStatus);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public PumpEnactResult setNewBasalProfile(Profile profile) {
|
||||
PumpEnactResult result = executeCommand(OmnipodCommandType.SET_BASAL_PROFILE, () -> aapsOmnipodManager.setBasalProfile(profile, true));
|
||||
PumpEnactResult result = executeCommand(OmnipodErosCommandType.SET_BASAL_PROFILE, () -> aapsOmnipodErosManager.setBasalProfile(profile, true));
|
||||
|
||||
aapsLogger.info(LTag.PUMP, "Basal Profile was set: " + result.success);
|
||||
|
||||
|
@ -598,7 +601,7 @@ public class OmnipodErosPumpPlugin extends PumpPluginBase implements PumpInterfa
|
|||
// When we activate a new Pod, we just use ProfileFunction to set the currently active profile
|
||||
return true;
|
||||
}
|
||||
return Objects.equals(podStateManager.getBasalSchedule(), AapsOmnipodManager.mapProfileToBasalSchedule(profile));
|
||||
return Objects.equals(podStateManager.getBasalSchedule(), AapsOmnipodErosManager.mapProfileToBasalSchedule(profile));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -628,7 +631,7 @@ public class OmnipodErosPumpPlugin extends PumpPluginBase implements PumpInterfa
|
|||
|
||||
@Override
|
||||
public int getBatteryLevel() {
|
||||
if (aapsOmnipodManager.isShowRileyLinkBatteryLevel()) {
|
||||
if (aapsOmnipodErosManager.isShowRileyLinkBatteryLevel()) {
|
||||
return Optional.ofNullable(rileyLinkServiceData.batteryLevel).orElse(0);
|
||||
}
|
||||
|
||||
|
@ -656,7 +659,7 @@ public class OmnipodErosPumpPlugin extends PumpPluginBase implements PumpInterfa
|
|||
|
||||
@Override
|
||||
public void stopBolusDelivering() {
|
||||
executeCommand(OmnipodCommandType.CANCEL_BOLUS, aapsOmnipodManager::cancelBolus);
|
||||
executeCommand(OmnipodErosCommandType.CANCEL_BOLUS, aapsOmnipodErosManager::cancelBolus);
|
||||
}
|
||||
|
||||
// if enforceNew is true, current temp basal is cancelled and new TBR set (duration is prolonged),
|
||||
|
@ -668,7 +671,7 @@ public class OmnipodErosPumpPlugin extends PumpPluginBase implements PumpInterfa
|
|||
aapsLogger.info(LTag.PUMP, "setTempBasalAbsolute: rate: {}, duration={}", absoluteRate, durationInMinutes);
|
||||
|
||||
if (durationInMinutes <= 0 || durationInMinutes % BASAL_STEP_DURATION.getStandardMinutes() != 0) {
|
||||
return new PumpEnactResult(getInjector()).success(false).comment(resourceHelper.gs(R.string.omnipod_error_set_temp_basal_failed_validation, BASAL_STEP_DURATION.getStandardMinutes()));
|
||||
return new PumpEnactResult(getInjector()).success(false).comment(resourceHelper.gs(R.string.omnipod_eros_error_set_temp_basal_failed_validation, BASAL_STEP_DURATION.getStandardMinutes()));
|
||||
}
|
||||
|
||||
// read current TBR
|
||||
|
@ -686,12 +689,12 @@ public class OmnipodErosPumpPlugin extends PumpPluginBase implements PumpInterfa
|
|||
}
|
||||
}
|
||||
|
||||
PumpEnactResult result = executeCommand(OmnipodCommandType.SET_TEMPORARY_BASAL, () -> aapsOmnipodManager.setTemporaryBasal(new TempBasalPair(absoluteRate, false, durationInMinutes)));
|
||||
PumpEnactResult result = executeCommand(OmnipodErosCommandType.SET_TEMPORARY_BASAL, () -> aapsOmnipodErosManager.setTemporaryBasal(new TempBasalPair(absoluteRate, false, durationInMinutes)));
|
||||
|
||||
aapsLogger.info(LTag.PUMP, "setTempBasalAbsolute - setTBR. Response: " + result.success);
|
||||
|
||||
if (result.success) {
|
||||
incrementStatistics(OmnipodStorageKeys.Statistics.TBRS_SET);
|
||||
incrementStatistics(OmnipodErosStorageKeys.Statistics.TBRS_SET);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@ -707,7 +710,7 @@ public class OmnipodErosPumpPlugin extends PumpPluginBase implements PumpInterfa
|
|||
return new PumpEnactResult(getInjector()).success(true).enacted(false);
|
||||
}
|
||||
|
||||
return executeCommand(OmnipodCommandType.CANCEL_TEMPORARY_BASAL, aapsOmnipodManager::cancelTemporaryBasal);
|
||||
return executeCommand(OmnipodErosCommandType.CANCEL_TEMPORARY_BASAL, aapsOmnipodErosManager::cancelTemporaryBasal);
|
||||
}
|
||||
|
||||
// TODO improve (i8n and more)
|
||||
|
@ -795,30 +798,30 @@ public class OmnipodErosPumpPlugin extends PumpPluginBase implements PumpInterfa
|
|||
@NonNull @Override
|
||||
public String shortStatus(boolean veryShort) {
|
||||
if (!podStateManager.isPodActivationCompleted()) {
|
||||
return resourceHelper.gs(R.string.omnipod_short_status_no_active_pod);
|
||||
return resourceHelper.gs(R.string.omnipod_common_short_status_no_active_pod);
|
||||
}
|
||||
String ret = "";
|
||||
if (lastConnectionTimeMillis != 0) {
|
||||
long agoMsec = System.currentTimeMillis() - lastConnectionTimeMillis;
|
||||
int agoMin = (int) (agoMsec / 60d / 1000d);
|
||||
ret += resourceHelper.gs(R.string.omnipod_short_status_last_connection, agoMin) + "\n";
|
||||
ret += resourceHelper.gs(R.string.omnipod_common_short_status_last_connection, agoMin) + "\n";
|
||||
}
|
||||
if (podStateManager.getLastBolusStartTime() != null) {
|
||||
ret += resourceHelper.gs(R.string.omnipod_short_status_last_bolus, DecimalFormatter.to2Decimal(podStateManager.getLastBolusAmount()),
|
||||
ret += resourceHelper.gs(R.string.omnipod_common_short_status_last_bolus, DecimalFormatter.to2Decimal(podStateManager.getLastBolusAmount()),
|
||||
android.text.format.DateFormat.format("HH:mm", podStateManager.getLastBolusStartTime().toDate())) + "\n";
|
||||
}
|
||||
TemporaryBasal activeTemp = activePlugin.getActiveTreatments().getRealTempBasalFromHistory(System.currentTimeMillis());
|
||||
if (activeTemp != null) {
|
||||
ret += resourceHelper.gs(R.string.omnipod_short_status_temp_basal, activeTemp.toStringFull()) + "\n";
|
||||
ret += resourceHelper.gs(R.string.omnipod_common_short_status_temp_basal, activeTemp.toStringFull()) + "\n";
|
||||
}
|
||||
ExtendedBolus activeExtendedBolus = activePlugin.getActiveTreatments().getExtendedBolusFromHistory(
|
||||
System.currentTimeMillis());
|
||||
if (activeExtendedBolus != null) {
|
||||
ret += resourceHelper.gs(R.string.omnipod_short_status_extended_bolus, activeExtendedBolus.toString()) + "\n";
|
||||
ret += resourceHelper.gs(R.string.omnipod_common_short_status_extended_bolus, activeExtendedBolus.toString()) + "\n";
|
||||
}
|
||||
ret += resourceHelper.gs(R.string.omnipod_short_status_reservoir, (getReservoirLevel() > OmnipodConstants.MAX_RESERVOIR_READING ? "50+" : DecimalFormatter.to0Decimal(getReservoirLevel()))) + "\n";
|
||||
ret += resourceHelper.gs(R.string.omnipod_common_short_status_reservoir, (getReservoirLevel() > OmnipodConstants.MAX_RESERVOIR_READING ? "50+" : DecimalFormatter.to0Decimal(getReservoirLevel()))) + "\n";
|
||||
if (isUseRileyLinkBatteryLevel()) {
|
||||
ret += resourceHelper.gs(R.string.omnipod_short_status_rl_battery, getBatteryLevel()) + "\n";
|
||||
ret += resourceHelper.gs(R.string.omnipod_eros_short_status_riley_link_battery, getBatteryLevel()) + "\n";
|
||||
}
|
||||
return ret.trim();
|
||||
}
|
||||
|
@ -835,52 +838,50 @@ public class OmnipodErosPumpPlugin extends PumpPluginBase implements PumpInterfa
|
|||
|
||||
@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()));
|
||||
if (command instanceof CommandAcknowledgeAlerts) {
|
||||
return executeCommand(OmnipodErosCommandType.ACKNOWLEDGE_ALERTS, aapsOmnipodErosManager::acknowledgeAlerts);
|
||||
}
|
||||
if (command instanceof CommandGetPodStatus) {
|
||||
return getPodStatus();
|
||||
}
|
||||
if (command instanceof CommandReadPulseLog) {
|
||||
return retrievePulseLog();
|
||||
}
|
||||
if (command instanceof CommandSuspendDelivery) {
|
||||
return executeCommand(OmnipodErosCommandType.SUSPEND_DELIVERY, aapsOmnipodErosManager::suspendDelivery);
|
||||
}
|
||||
if (command instanceof CommandResumeDelivery) {
|
||||
return executeCommand(OmnipodErosCommandType.RESUME_DELIVERY, () -> aapsOmnipodErosManager.setBasalProfile(profileFunction.getProfile(), false));
|
||||
}
|
||||
if (command instanceof CommandDeactivatePod) {
|
||||
return executeCommand(OmnipodErosCommandType.DEACTIVATE_POD, aapsOmnipodErosManager::deactivatePod);
|
||||
}
|
||||
if (command instanceof CommandHandleTimeChange) {
|
||||
return handleTimeChange(((CommandHandleTimeChange) command).isRequestedByUser());
|
||||
}
|
||||
if (command instanceof CommandUpdateAlertConfiguration) {
|
||||
return updateAlertConfiguration();
|
||||
}
|
||||
if (command instanceof CommandPlayTestBeep) {
|
||||
return executeCommand(OmnipodErosCommandType.PLAY_TEST_BEEP, () -> aapsOmnipodErosManager.playTestBeep(((CommandPlayTestBeep) command).getBeepType()));
|
||||
}
|
||||
|
||||
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 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();
|
||||
case PLAY_TEST_BEEP:
|
||||
return executeCommand(OmnipodCommandType.PLAY_TEST_BEEP, () -> aapsOmnipodManager.playTestBeep(((CommandPlayTestBeep) command).getBeepType()));
|
||||
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));
|
||||
}
|
||||
aapsLogger.warn(LTag.PUMP, "Unsupported custom command: " + command.getClass().getName());
|
||||
return new PumpEnactResult(getInjector()).success(false).enacted(false).comment(resourceHelper.gs(R.string.omnipod_common_error_unsupported_custom_command, command.getClass().getName()));
|
||||
}
|
||||
|
||||
private PumpEnactResult retrievePulseLog() {
|
||||
PodInfoRecentPulseLog result;
|
||||
try {
|
||||
result = executeCommand(OmnipodCommandType.READ_POD_PULSE_LOG, aapsOmnipodManager::readPulseLog);
|
||||
result = executeCommand(OmnipodErosCommandType.READ_POD_PULSE_LOG, aapsOmnipodErosManager::readPulseLog);
|
||||
} catch (Exception ex) {
|
||||
return new PumpEnactResult(getInjector()).success(false).enacted(false).comment(aapsOmnipodManager.translateException(ex));
|
||||
return new PumpEnactResult(getInjector()).success(false).enacted(false).comment(aapsOmnipodErosManager.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("status", resourceHelper.gs(R.string.omnipod_eros_pod_management_pulse_log_value) + ":\n" + result.toString());
|
||||
i.putExtra("title", resourceHelper.gs(R.string.omnipod_eros_pod_management_pulse_log));
|
||||
i.putExtra("clipboardContent", result.toString());
|
||||
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
context.startActivity(i);
|
||||
|
@ -897,7 +898,7 @@ public class OmnipodErosPumpPlugin extends PumpPluginBase implements PumpInterfa
|
|||
.lowReservoir(lowReservoirAlertUnits != null, Optional.ofNullable(lowReservoirAlertUnits).orElse(0)) //
|
||||
.build();
|
||||
|
||||
PumpEnactResult result = executeCommand(OmnipodCommandType.CONFIGURE_ALERTS, () -> aapsOmnipodManager.configureAlerts(alertConfigurations));
|
||||
PumpEnactResult result = executeCommand(OmnipodErosCommandType.CONFIGURE_ALERTS, () -> aapsOmnipodErosManager.configureAlerts(alertConfigurations));
|
||||
|
||||
if (result.success) {
|
||||
aapsLogger.info(LTag.PUMP, "Successfully configured alerts in Pod");
|
||||
|
@ -907,7 +908,7 @@ public class OmnipodErosPumpPlugin extends PumpPluginBase implements PumpInterfa
|
|||
|
||||
Notification notification = new Notification(
|
||||
Notification.OMNIPOD_POD_ALERTS_UPDATED,
|
||||
resourceHelper.gs(R.string.omnipod_confirmation_expiration_alerts_updated),
|
||||
resourceHelper.gs(R.string.omnipod_common_confirmation_expiration_alerts_updated),
|
||||
Notification.INFO, 60);
|
||||
rxBus.send(new EventNewNotification(notification));
|
||||
} else {
|
||||
|
@ -921,8 +922,8 @@ public class OmnipodErosPumpPlugin extends PumpPluginBase implements PumpInterfa
|
|||
aapsLogger.debug(LTag.PUMP, "Setting time, requestedByUser={}", requestedByUser);
|
||||
|
||||
PumpEnactResult result;
|
||||
if (requestedByUser || aapsOmnipodManager.isTimeChangeEventEnabled()) {
|
||||
result = executeCommand(OmnipodCommandType.SET_TIME, () -> aapsOmnipodManager.setTime(!requestedByUser));
|
||||
if (requestedByUser || aapsOmnipodErosManager.isTimeChangeEventEnabled()) {
|
||||
result = executeCommand(OmnipodErosCommandType.SET_TIME, () -> aapsOmnipodErosManager.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
|
||||
|
@ -933,10 +934,10 @@ public class OmnipodErosPumpPlugin extends PumpPluginBase implements PumpInterfa
|
|||
this.hasTimeDateOrTimeZoneChanged = false;
|
||||
timeChangeRetries = 0;
|
||||
|
||||
if (!requestedByUser && aapsOmnipodManager.isTimeChangeEventEnabled()) {
|
||||
if (!requestedByUser && aapsOmnipodErosManager.isTimeChangeEventEnabled()) {
|
||||
Notification notification = new Notification(
|
||||
Notification.TIME_OR_TIMEZONE_CHANGE,
|
||||
resourceHelper.gs(R.string.omnipod_confirmation_time_on_pod_updated),
|
||||
resourceHelper.gs(R.string.omnipod_common_confirmation_time_on_pod_updated),
|
||||
Notification.INFO, 60);
|
||||
rxBus.send(new EventNewNotification(notification));
|
||||
}
|
||||
|
@ -946,10 +947,10 @@ public class OmnipodErosPumpPlugin extends PumpPluginBase implements PumpInterfa
|
|||
timeChangeRetries++;
|
||||
|
||||
if (timeChangeRetries > 3) {
|
||||
if (aapsOmnipodManager.isTimeChangeEventEnabled()) {
|
||||
if (aapsOmnipodErosManager.isTimeChangeEventEnabled()) {
|
||||
Notification notification = new Notification(
|
||||
Notification.TIME_OR_TIMEZONE_CHANGE,
|
||||
resourceHelper.gs(R.string.omnipod_error_automatic_time_or_timezone_change_failed),
|
||||
resourceHelper.gs(R.string.omnipod_eros_error_automatic_time_or_timezone_change_failed),
|
||||
Notification.INFO, 60);
|
||||
rxBus.send(new EventNewNotification(notification));
|
||||
}
|
||||
|
@ -964,7 +965,7 @@ public class OmnipodErosPumpPlugin extends PumpPluginBase implements PumpInterfa
|
|||
|
||||
@Override
|
||||
public void timezoneOrDSTChanged(TimeChangeType timeChangeType) {
|
||||
aapsLogger.info(LTag.PUMP, "Time, Date and/or TimeZone changed. [changeType=" + timeChangeType.name() + ", eventHandlingEnabled=" + aapsOmnipodManager.isTimeChangeEventEnabled() + "]");
|
||||
aapsLogger.info(LTag.PUMP, "Time, Date and/or TimeZone changed. [changeType=" + timeChangeType.name() + ", eventHandlingEnabled=" + aapsOmnipodErosManager.isTimeChangeEventEnabled() + "]");
|
||||
|
||||
if (timeChangeType == TimeChangeType.TimeChanged) {
|
||||
aapsLogger.info(LTag.PUMP, "Ignoring time change because it is not a DST or TZ change");
|
||||
|
@ -1062,11 +1063,11 @@ public class OmnipodErosPumpPlugin extends PumpPluginBase implements PumpInterfa
|
|||
}
|
||||
|
||||
public boolean isUseRileyLinkBatteryLevel() {
|
||||
return aapsOmnipodManager.isShowRileyLinkBatteryLevel();
|
||||
return aapsOmnipodErosManager.isShowRileyLinkBatteryLevel();
|
||||
}
|
||||
|
||||
public boolean isBatteryChangeLoggingEnabled() {
|
||||
return aapsOmnipodManager.isBatteryChangeLoggingEnabled();
|
||||
return aapsOmnipodErosManager.isBatteryChangeLoggingEnabled();
|
||||
}
|
||||
|
||||
private void initializeAfterRileyLinkConnection() {
|
||||
|
@ -1082,7 +1083,7 @@ public class OmnipodErosPumpPlugin extends PumpPluginBase implements PumpInterfa
|
|||
}
|
||||
if (!success) {
|
||||
aapsLogger.warn(LTag.PUMP, "Failed to retrieve Pod status on startup");
|
||||
rxBus.send(new EventNewNotification(new Notification(Notification.OMNIPOD_STARTUP_STATUS_REFRESH_FAILED, resourceHelper.gs(R.string.omnipod_error_failed_to_refresh_status_on_startup), Notification.NORMAL)));
|
||||
rxBus.send(new EventNewNotification(new Notification(Notification.OMNIPOD_STARTUP_STATUS_REFRESH_FAILED, resourceHelper.gs(R.string.omnipod_common_error_failed_to_refresh_status_on_startup), Notification.NORMAL)));
|
||||
}
|
||||
} else {
|
||||
aapsLogger.debug(LTag.PUMP, "Not retrieving Pod status on startup: no Pod running");
|
||||
|
@ -1092,11 +1093,11 @@ public class OmnipodErosPumpPlugin extends PumpPluginBase implements PumpInterfa
|
|||
}
|
||||
|
||||
@NonNull private PumpEnactResult deliverBolus(final DetailedBolusInfo detailedBolusInfo) {
|
||||
PumpEnactResult result = executeCommand(OmnipodCommandType.SET_BOLUS, () -> aapsOmnipodManager.bolus(detailedBolusInfo));
|
||||
PumpEnactResult result = executeCommand(OmnipodErosCommandType.SET_BOLUS, () -> aapsOmnipodErosManager.bolus(detailedBolusInfo));
|
||||
|
||||
if (result.success) {
|
||||
incrementStatistics(detailedBolusInfo.isSMB ? OmnipodStorageKeys.Statistics.SMB_BOLUSES_DELIVERED
|
||||
: OmnipodStorageKeys.Statistics.STANDARD_BOLUSES_DELIVERED);
|
||||
incrementStatistics(detailedBolusInfo.isSMB ? OmnipodErosStorageKeys.Statistics.SMB_BOLUSES_DELIVERED
|
||||
: OmnipodErosStorageKeys.Statistics.STANDARD_BOLUSES_DELIVERED);
|
||||
|
||||
result.carbsDelivered(detailedBolusInfo.carbs);
|
||||
}
|
||||
|
@ -1104,7 +1105,7 @@ public class OmnipodErosPumpPlugin extends PumpPluginBase implements PumpInterfa
|
|||
return result;
|
||||
}
|
||||
|
||||
private <T> T executeCommand(OmnipodCommandType commandType, Supplier<T> supplier) {
|
||||
private <T> T executeCommand(OmnipodErosCommandType commandType, Supplier<T> supplier) {
|
||||
try {
|
||||
aapsLogger.debug(LTag.PUMP, "Executing command: {}", commandType);
|
||||
|
||||
|
|
|
@ -3,14 +3,14 @@ package info.nightscout.androidaps.plugins.pump.omnipod.eros.dagger
|
|||
import dagger.Module
|
||||
import dagger.Provides
|
||||
import dagger.android.ContributesAndroidInjector
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.activation.PodActivationWizardActivity
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.deactivation.PodDeactivationWizardActivity
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.data.RLHistoryItemOmnipod
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.manager.PodStateManager
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.manager.AapsPodStateManager
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.manager.AapsErosPodStateManager
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.rileylink.manager.OmnipodRileyLinkCommunicationManager
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.PodHistoryActivity
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.PodManagementActivity
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.activation.PodActivationWizardActivity
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.deactivation.PodDeactivationWizardActivity
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.ErosPodHistoryActivity
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.ErosPodManagementActivity
|
||||
|
||||
@Module
|
||||
@Suppress("unused")
|
||||
|
@ -18,8 +18,8 @@ abstract class OmnipodErosModule {
|
|||
|
||||
// Activities
|
||||
@ContributesAndroidInjector
|
||||
abstract fun contributesPodManagementActivity(): PodManagementActivity
|
||||
@ContributesAndroidInjector abstract fun contributesPodHistoryActivity(): PodHistoryActivity
|
||||
abstract fun contributesPodManagementActivity(): ErosPodManagementActivity
|
||||
@ContributesAndroidInjector abstract fun contributesPodHistoryActivity(): ErosPodHistoryActivity
|
||||
|
||||
@ActivityScope
|
||||
@ContributesAndroidInjector(modules = [OmnipodWizardModule::class])
|
||||
|
@ -39,6 +39,6 @@ abstract class OmnipodErosModule {
|
|||
companion object {
|
||||
|
||||
@Provides
|
||||
fun podStateManagerProvider(aapsPodStateManager: AapsPodStateManager): PodStateManager = aapsPodStateManager
|
||||
fun podStateManagerProvider(aapsErosPodStateManager: AapsErosPodStateManager): PodStateManager = aapsErosPodStateManager
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,18 +7,18 @@ import dagger.Module
|
|||
import dagger.Provides
|
||||
import dagger.android.ContributesAndroidInjector
|
||||
import dagger.multibindings.IntoMap
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.activation.fragment.AttachPodInfoFragment
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.activation.fragment.FillPodInfoFragment
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.activation.fragment.InitializePodActionFragment
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.activation.fragment.InsertCannulaActionFragment
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.activation.fragment.PodActivatedInfoFragment
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.activation.viewmodel.InitializePodActionViewModel
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.activation.viewmodel.InsertCannulaActionViewModel
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.deactivation.fragment.DeactivatePodActionFragment
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.deactivation.fragment.DeactivatePodInfoFragment
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.deactivation.fragment.PodDeactivatedInfoFragment
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.deactivation.fragment.PodDiscardedInfoFragment
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.deactivation.viewmodel.DeactivatePodActionViewModel
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.activation.fragment.AttachPodInfoFragment
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.activation.fragment.FillPodInfoFragment
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.activation.fragment.InitializePodActionFragment
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.activation.fragment.InsertCannulaActionFragment
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.activation.fragment.PodActivatedInfoFragment
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.activation.viewmodel.InitializePodActionViewModel
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.activation.viewmodel.InsertCannulaActionViewModel
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.deactivation.fragment.DeactivatePodActionFragment
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.deactivation.fragment.DeactivatePodInfoFragment
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.deactivation.fragment.PodDeactivatedInfoFragment
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.deactivation.fragment.PodDiscardedInfoFragment
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.deactivation.viewmodel.DeactivatePodActionViewModel
|
||||
import javax.inject.Provider
|
||||
|
||||
@Module
|
||||
|
|
|
@ -7,15 +7,15 @@ import javax.inject.Inject;
|
|||
import dagger.android.HasAndroidInjector;
|
||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.data.RLHistoryItem;
|
||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLinkTargetDevice;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.definition.OmnipodCommandType;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.definition.OmnipodErosCommandType;
|
||||
import info.nightscout.androidaps.utils.resources.ResourceHelper;
|
||||
|
||||
public class RLHistoryItemOmnipod extends RLHistoryItem {
|
||||
|
||||
@Inject ResourceHelper resourceHelper;
|
||||
private final OmnipodCommandType omnipodCommandType;
|
||||
private final OmnipodErosCommandType omnipodCommandType;
|
||||
|
||||
public RLHistoryItemOmnipod(HasAndroidInjector injector, OmnipodCommandType omnipodCommandType) {
|
||||
public RLHistoryItemOmnipod(HasAndroidInjector injector, OmnipodErosCommandType omnipodCommandType) {
|
||||
super(new LocalDateTime(), RLHistoryItemSource.OmnipodCommand, RileyLinkTargetDevice.Omnipod);
|
||||
injector.androidInjector().inject(this);
|
||||
this.omnipodCommandType = omnipodCommandType;
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.eros.definition;
|
||||
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.R;
|
||||
|
||||
/**
|
||||
* Created by andy on 4.8.2019
|
||||
*/
|
||||
public enum OmnipodCommandType {
|
||||
INITIALIZE_POD(R.string.omnipod_cmd_initialize_pod), // First 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), //
|
||||
SET_BASAL_PROFILE(R.string.omnipod_cmd_set_basal_schedule), //
|
||||
SET_BOLUS(R.string.omnipod_cmd_set_bolus), //
|
||||
CANCEL_BOLUS(R.string.omnipod_cmd_cancel_bolus), //
|
||||
SET_TEMPORARY_BASAL(R.string.omnipod_cmd_set_tbr), //
|
||||
CANCEL_TEMPORARY_BASAL(R.string.omnipod_cmd_cancel_tbr_by_driver), //
|
||||
DISCARD_POD(R.string.omnipod_cmd_discard_pod), //
|
||||
GET_POD_STATUS(R.string.omnipod_cmd_get_pod_status), //
|
||||
SET_TIME(R.string.omnipod_cmd_set_time), //
|
||||
CONFIGURE_ALERTS(R.string.omnipod_cmd_configure_alerts), //
|
||||
ACKNOWLEDGE_ALERTS(R.string.omnipod_cmd_acknowledge_alerts), //
|
||||
READ_POD_PULSE_LOG(R.string.omnipod_cmd_read_pulse_log), //
|
||||
SUSPEND_DELIVERY(R.string.omnipod_cmd_suspend_delivery),
|
||||
RESUME_DELIVERY(R.string.omnipod_cmd_resume_delivery),
|
||||
PLAY_TEST_BEEP(R.string.omnipod_cmd_play_test_beep);
|
||||
|
||||
private final int resourceId;
|
||||
|
||||
OmnipodCommandType(int resourceId) {
|
||||
this.resourceId = resourceId;
|
||||
}
|
||||
|
||||
public int getResourceId() {
|
||||
return resourceId;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.eros.definition;
|
||||
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.R;
|
||||
|
||||
/**
|
||||
* Created by andy on 4.8.2019
|
||||
*/
|
||||
public enum OmnipodErosCommandType {
|
||||
INITIALIZE_POD(R.string.omnipod_common_cmd_initialize_pod), // First step of Pod activation
|
||||
INSERT_CANNULA(R.string.omnipod_common_cmd_insert_cannula), // Second step of Pod activation
|
||||
DEACTIVATE_POD(R.string.omnipod_common_cmd_deactivate_pod), //
|
||||
SET_BASAL_PROFILE(R.string.omnipod_common_cmd_set_basal_schedule), //
|
||||
SET_BOLUS(R.string.omnipod_common_cmd_set_bolus), //
|
||||
CANCEL_BOLUS(R.string.omnipod_common_cmd_cancel_bolus), //
|
||||
SET_TEMPORARY_BASAL(R.string.omnipod_common_cmd_set_tbr), //
|
||||
CANCEL_TEMPORARY_BASAL(R.string.omnipod_common_cmd_cancel_tbr_by_driver), //
|
||||
DISCARD_POD(R.string.omnipod_common_cmd_discard_pod), //
|
||||
GET_POD_STATUS(R.string.omnipod_common_cmd_get_pod_status), //
|
||||
SET_TIME(R.string.omnipod_common_cmd_set_time), //
|
||||
CONFIGURE_ALERTS(R.string.omnipod_common_cmd_configure_alerts), //
|
||||
ACKNOWLEDGE_ALERTS(R.string.omnipod_common_cmd_acknowledge_alerts), //
|
||||
READ_POD_PULSE_LOG(R.string.omnipod_common_cmd_read_pulse_log), //
|
||||
SUSPEND_DELIVERY(R.string.omnipod_common_cmd_suspend_delivery),
|
||||
RESUME_DELIVERY(R.string.omnipod_common_cmd_resume_delivery),
|
||||
PLAY_TEST_BEEP(R.string.omnipod_common_cmd_play_test_beep);
|
||||
|
||||
private final int resourceId;
|
||||
|
||||
OmnipodErosCommandType(int resourceId) {
|
||||
this.resourceId = resourceId;
|
||||
}
|
||||
|
||||
public int getResourceId() {
|
||||
return resourceId;
|
||||
}
|
||||
}
|
|
@ -2,33 +2,33 @@ package info.nightscout.androidaps.plugins.pump.omnipod.eros.definition;
|
|||
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.R;
|
||||
|
||||
public class OmnipodStorageKeys {
|
||||
public class OmnipodErosStorageKeys {
|
||||
public static class Preferences {
|
||||
public static final int POD_STATE = R.string.key_omnipod_pod_state;
|
||||
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 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 TBR_BEEPS_ENABLED = R.string.key_omnipod_tbr_beeps_enabled;
|
||||
public static final int SUSPEND_DELIVERY_BUTTON_ENABLED = R.string.key_omnipod_suspend_delivery_button_enabled;
|
||||
public static final int PULSE_LOG_BUTTON_ENABLED = R.string.key_omnipod_pulse_log_button_enabled;
|
||||
public static final int TIME_CHANGE_EVENT_ENABLED = R.string.key_omnipod_time_change_event_enabled;
|
||||
public static final int EXPIRATION_REMINDER_ENABLED = R.string.key_omnipod_expiration_reminder_enabled;
|
||||
public static final int EXPIRATION_REMINDER_HOURS_BEFORE_SHUTDOWN = R.string.key_omnipod_expiration_reminder_hours_before_shutdown;
|
||||
public static final int LOW_RESERVOIR_ALERT_ENABLED = R.string.key_omnipod_low_reservoir_alert_enabled;
|
||||
public static final int LOW_RESERVOIR_ALERT_UNITS = R.string.key_omnipod_low_reservoir_alert_units;
|
||||
public static final int NOTIFICATION_UNCERTAIN_TBR_SOUND_ENABLED = R.string.key_omnipod_notification_uncertain_tbr_sound_enabled;
|
||||
public static final int NOTIFICATION_UNCERTAIN_SMB_SOUND_ENABLED = R.string.key_omnipod_notification_uncertain_smb_sound_enabled;
|
||||
public static final int NOTIFICATION_UNCERTAIN_BOLUS_SOUND_ENABLED = R.string.key_omnipod_notification_uncertain_bolus_sound_enabled;
|
||||
public static final int AUTOMATICALLY_ACKNOWLEDGE_ALERTS_ENABLED = R.string.key_omnipod_automatically_acknowledge_alerts_enabled;
|
||||
public static final int RILEY_LINK_STATS_BUTTON_ENABLED = R.string.key_omnipod_riley_link_stats_button_enabled;
|
||||
public static final int POD_STATE = R.string.key_omnipod_eros_pod_state;
|
||||
public static final int ACTIVE_BOLUS = R.string.key_omnipod_eros_current_bolus;
|
||||
public static final int BASAL_BEEPS_ENABLED = R.string.key_omnipod_common_basal_beeps_enabled;
|
||||
public static final int BOLUS_BEEPS_ENABLED = R.string.key_omnipod_common_bolus_beeps_enabled;
|
||||
public static final int SMB_BEEPS_ENABLED = R.string.key_omnipod_common_smb_beeps_enabled;
|
||||
public static final int TBR_BEEPS_ENABLED = R.string.key_omnipod_common_tbr_beeps_enabled;
|
||||
public static final int SUSPEND_DELIVERY_BUTTON_ENABLED = R.string.key_omnipod_common_suspend_delivery_button_enabled;
|
||||
public static final int PULSE_LOG_BUTTON_ENABLED = R.string.key_omnipod_eros_pulse_log_button_enabled;
|
||||
public static final int TIME_CHANGE_EVENT_ENABLED = R.string.key_omnipod_common_time_change_event_enabled;
|
||||
public static final int EXPIRATION_REMINDER_ENABLED = R.string.key_omnipod_common_expiration_reminder_enabled;
|
||||
public static final int EXPIRATION_REMINDER_HOURS_BEFORE_SHUTDOWN = R.string.key_omnipod_common_expiration_reminder_hours_before_shutdown;
|
||||
public static final int LOW_RESERVOIR_ALERT_ENABLED = R.string.key_omnipod_common_low_reservoir_alert_enabled;
|
||||
public static final int LOW_RESERVOIR_ALERT_UNITS = R.string.key_omnipod_common_low_reservoir_alert_units;
|
||||
public static final int NOTIFICATION_UNCERTAIN_TBR_SOUND_ENABLED = R.string.key_omnipod_eros_notification_uncertain_tbr_sound_enabled;
|
||||
public static final int NOTIFICATION_UNCERTAIN_SMB_SOUND_ENABLED = R.string.key_omnipod_eros_notification_uncertain_smb_sound_enabled;
|
||||
public static final int NOTIFICATION_UNCERTAIN_BOLUS_SOUND_ENABLED = R.string.key_omnipod_eros_notification_uncertain_bolus_sound_enabled;
|
||||
public static final int AUTOMATICALLY_ACKNOWLEDGE_ALERTS_ENABLED = R.string.key_omnipod_common_automatically_acknowledge_alerts_enabled;
|
||||
public static final int RILEY_LINK_STATS_BUTTON_ENABLED = R.string.key_omnipod_eros_riley_link_stats_button_enabled;
|
||||
public static final int SHOW_RILEY_LINK_BATTERY_LEVEL = R.string.key_riley_link_show_battery_level;
|
||||
public static final int BATTERY_CHANGE_LOGGING_ENABLED = R.string.key_omnipod_battery_change_logging_enabled;
|
||||
public static final int BATTERY_CHANGE_LOGGING_ENABLED = R.string.key_omnipod_eros_battery_change_logging_enabled;
|
||||
}
|
||||
|
||||
public static class Statistics {
|
||||
public static final int TBRS_SET = R.string.key_omnipod_tbrs_set;
|
||||
public static final int STANDARD_BOLUSES_DELIVERED = R.string.key_omnipod_std_boluses_delivered;
|
||||
public static final int SMB_BOLUSES_DELIVERED = R.string.key_omnipod_smb_boluses_delivered;
|
||||
public static final int TBRS_SET = R.string.key_omnipod_eros_tbrs_set;
|
||||
public static final int STANDARD_BOLUSES_DELIVERED = R.string.key_omnipod_eros_std_boluses_delivered;
|
||||
public static final int SMB_BOLUSES_DELIVERED = R.string.key_omnipod_eros_smb_boluses_delivered;
|
||||
}
|
||||
}
|
|
@ -13,35 +13,35 @@ import info.nightscout.androidaps.plugins.pump.omnipod.eros.R;
|
|||
*/
|
||||
public enum PodHistoryEntryType {
|
||||
|
||||
INITIALIZE_POD(1, R.string.omnipod_cmd_initialize_pod, PumpHistoryEntryGroup.Prime),
|
||||
INSERT_CANNULA(2, R.string.omnipod_cmd_insert_cannula, PumpHistoryEntryGroup.Prime),
|
||||
DEACTIVATE_POD(3, R.string.omnipod_cmd_deactivate_pod, PumpHistoryEntryGroup.Prime),
|
||||
DISCARD_POD(4, R.string.omnipod_cmd_discard_pod, PumpHistoryEntryGroup.Prime),
|
||||
INITIALIZE_POD(1, R.string.omnipod_common_cmd_initialize_pod, PumpHistoryEntryGroup.Prime),
|
||||
INSERT_CANNULA(2, R.string.omnipod_common_cmd_insert_cannula, PumpHistoryEntryGroup.Prime),
|
||||
DEACTIVATE_POD(3, R.string.omnipod_common_cmd_deactivate_pod, PumpHistoryEntryGroup.Prime),
|
||||
DISCARD_POD(4, R.string.omnipod_common_cmd_discard_pod, PumpHistoryEntryGroup.Prime),
|
||||
|
||||
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(12, R.string.omnipod_cmd_cancel_tbr, PumpHistoryEntryGroup.Basal),
|
||||
SET_FAKE_SUSPENDED_TEMPORARY_BASAL(13, R.string.omnipod_cmd_set_fake_suspended_tbr, PumpHistoryEntryGroup.Basal),
|
||||
CANCEL_FAKE_SUSPENDED_TEMPORARY_BASAL(14, R.string.omnipod_cmd_cancel_fake_suspended_tbr, PumpHistoryEntryGroup.Basal),
|
||||
SPLIT_TEMPORARY_BASAL(15, R.string.omnipod_cmd_split_tbr, PumpHistoryEntryGroup.Basal),
|
||||
SET_TEMPORARY_BASAL(10, R.string.omnipod_common_cmd_set_tbr, PumpHistoryEntryGroup.Basal),
|
||||
CANCEL_TEMPORARY_BASAL_BY_DRIVER(11, R.string.omnipod_common_cmd_cancel_tbr_by_driver, PumpHistoryEntryGroup.Basal),
|
||||
CANCEL_TEMPORARY_BASAL(12, R.string.omnipod_common_cmd_cancel_tbr, PumpHistoryEntryGroup.Basal),
|
||||
SET_FAKE_SUSPENDED_TEMPORARY_BASAL(13, R.string.omnipod_common_cmd_set_fake_suspended_tbr, PumpHistoryEntryGroup.Basal),
|
||||
CANCEL_FAKE_SUSPENDED_TEMPORARY_BASAL(14, R.string.omnipod_common_cmd_cancel_fake_suspended_tbr, PumpHistoryEntryGroup.Basal),
|
||||
SPLIT_TEMPORARY_BASAL(15, R.string.omnipod_common_cmd_split_tbr, PumpHistoryEntryGroup.Basal),
|
||||
|
||||
SET_BASAL_SCHEDULE(20, R.string.omnipod_cmd_set_basal_schedule, PumpHistoryEntryGroup.Basal),
|
||||
SET_BASAL_SCHEDULE(20, R.string.omnipod_common_cmd_set_basal_schedule, PumpHistoryEntryGroup.Basal),
|
||||
|
||||
GET_POD_STATUS(30, R.string.omnipod_cmd_get_pod_status, PumpHistoryEntryGroup.Configuration),
|
||||
GET_POD_INFO(31, R.string.omnipod_cmd_get_pod_info, PumpHistoryEntryGroup.Configuration),
|
||||
SET_TIME(32, R.string.omnipod_cmd_set_time, PumpHistoryEntryGroup.Configuration),
|
||||
GET_POD_STATUS(30, R.string.omnipod_common_cmd_get_pod_status, PumpHistoryEntryGroup.Configuration),
|
||||
GET_POD_INFO(31, R.string.omnipod_common_cmd_get_pod_info, PumpHistoryEntryGroup.Configuration),
|
||||
SET_TIME(32, R.string.omnipod_common_cmd_set_time, PumpHistoryEntryGroup.Configuration),
|
||||
|
||||
SET_BOLUS(40, R.string.omnipod_cmd_set_bolus, PumpHistoryEntryGroup.Bolus),
|
||||
CANCEL_BOLUS(41, R.string.omnipod_cmd_cancel_bolus, PumpHistoryEntryGroup.Bolus),
|
||||
SET_BOLUS(40, R.string.omnipod_common_cmd_set_bolus, PumpHistoryEntryGroup.Bolus),
|
||||
CANCEL_BOLUS(41, R.string.omnipod_common_cmd_cancel_bolus, PumpHistoryEntryGroup.Bolus),
|
||||
|
||||
CONFIGURE_ALERTS(50, R.string.omnipod_cmd_configure_alerts, PumpHistoryEntryGroup.Alarm),
|
||||
ACKNOWLEDGE_ALERTS(51, R.string.omnipod_cmd_acknowledge_alerts, PumpHistoryEntryGroup.Alarm),
|
||||
PLAY_TEST_BEEP(52, R.string.omnipod_cmd_play_test_beep, PumpHistoryEntryGroup.Alarm),
|
||||
CONFIGURE_ALERTS(50, R.string.omnipod_common_cmd_configure_alerts, PumpHistoryEntryGroup.Alarm),
|
||||
ACKNOWLEDGE_ALERTS(51, R.string.omnipod_common_cmd_acknowledge_alerts, PumpHistoryEntryGroup.Alarm),
|
||||
PLAY_TEST_BEEP(52, R.string.omnipod_common_cmd_play_test_beep, PumpHistoryEntryGroup.Alarm),
|
||||
|
||||
SUSPEND_DELIVERY(60, R.string.omnipod_cmd_suspend_delivery, PumpHistoryEntryGroup.Basal),
|
||||
RESUME_DELIVERY(61, R.string.omnipod_cmd_resume_delivery, PumpHistoryEntryGroup.Basal),
|
||||
SUSPEND_DELIVERY(60, R.string.omnipod_common_cmd_suspend_delivery, PumpHistoryEntryGroup.Basal),
|
||||
RESUME_DELIVERY(61, R.string.omnipod_common_cmd_resume_delivery, PumpHistoryEntryGroup.Basal),
|
||||
|
||||
UNKNOWN_ENTRY_TYPE(99, R.string.omnipod_cmd_unknown_entry);
|
||||
UNKNOWN_ENTRY_TYPE(99, R.string.omnipod_common_cmd_unknown_entry);
|
||||
|
||||
private final int code;
|
||||
private static final Map<Integer, PodHistoryEntryType> instanceMap;
|
||||
|
|
|
@ -7,7 +7,7 @@ import info.nightscout.androidaps.logging.AAPSLogger;
|
|||
import info.nightscout.androidaps.plugins.bus.RxBusWrapper;
|
||||
import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification;
|
||||
import info.nightscout.androidaps.plugins.general.overview.notifications.Notification;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.definition.OmnipodStorageKeys;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.definition.OmnipodErosStorageKeys;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.manager.PodStateManager;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.event.EventOmnipodActiveAlertsChanged;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.event.EventOmnipodFaultEventChanged;
|
||||
|
@ -16,12 +16,12 @@ import info.nightscout.androidaps.plugins.pump.omnipod.eros.event.EventOmnipodUn
|
|||
import info.nightscout.androidaps.utils.sharedPreferences.SP;
|
||||
|
||||
@Singleton
|
||||
public class AapsPodStateManager extends PodStateManager {
|
||||
public class AapsErosPodStateManager extends PodStateManager {
|
||||
private final SP sp;
|
||||
private final RxBusWrapper rxBus;
|
||||
|
||||
@Inject
|
||||
public AapsPodStateManager(AAPSLogger aapsLogger, SP sp, RxBusWrapper rxBus) {
|
||||
public AapsErosPodStateManager(AAPSLogger aapsLogger, SP sp, RxBusWrapper rxBus) {
|
||||
super(aapsLogger);
|
||||
this.sp = sp;
|
||||
this.rxBus = rxBus;
|
||||
|
@ -29,12 +29,12 @@ public class AapsPodStateManager extends PodStateManager {
|
|||
|
||||
@Override
|
||||
protected String readPodState() {
|
||||
return sp.getString(OmnipodStorageKeys.Preferences.POD_STATE, "");
|
||||
return sp.getString(OmnipodErosStorageKeys.Preferences.POD_STATE, "");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void storePodState(String podState) {
|
||||
sp.putString(OmnipodStorageKeys.Preferences.POD_STATE, podState);
|
||||
sp.putString(OmnipodErosStorageKeys.Preferences.POD_STATE, podState);
|
||||
}
|
||||
|
||||
@Override protected void onUncertainTbrRecovered() {
|
|
@ -43,8 +43,8 @@ import info.nightscout.androidaps.plugins.pump.common.defs.PumpType;
|
|||
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.R;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.data.ActiveBolus;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.definition.OmnipodCommandType;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.definition.OmnipodStorageKeys;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.definition.OmnipodErosCommandType;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.definition.OmnipodErosStorageKeys;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.definition.PodHistoryEntryType;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.response.StatusResponse;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.response.podinfo.PodInfoRecentPulseLog;
|
||||
|
@ -93,7 +93,7 @@ import info.nightscout.androidaps.utils.sharedPreferences.SP;
|
|||
import io.reactivex.subjects.SingleSubject;
|
||||
|
||||
@Singleton
|
||||
public class AapsOmnipodManager {
|
||||
public class AapsOmnipodErosManager {
|
||||
|
||||
private final PodStateManager podStateManager;
|
||||
private final AapsOmnipodUtil aapsOmnipodUtil;
|
||||
|
@ -127,21 +127,21 @@ public class AapsOmnipodManager {
|
|||
private boolean batteryChangeLoggingEnabled;
|
||||
|
||||
@Inject
|
||||
public AapsOmnipodManager(OmnipodRileyLinkCommunicationManager communicationService,
|
||||
PodStateManager podStateManager,
|
||||
AapsOmnipodUtil aapsOmnipodUtil,
|
||||
AAPSLogger aapsLogger,
|
||||
AapsSchedulers aapsSchedulers,
|
||||
RxBusWrapper rxBus,
|
||||
SP sp,
|
||||
ResourceHelper resourceHelper,
|
||||
HasAndroidInjector injector,
|
||||
ActivePluginProvider activePlugin,
|
||||
DatabaseHelperInterface databaseHelper,
|
||||
OmnipodAlertUtil omnipodAlertUtil,
|
||||
NSUpload nsUpload,
|
||||
ProfileFunction profileFunction,
|
||||
Context context) {
|
||||
public AapsOmnipodErosManager(OmnipodRileyLinkCommunicationManager communicationService,
|
||||
PodStateManager podStateManager,
|
||||
AapsOmnipodUtil aapsOmnipodUtil,
|
||||
AAPSLogger aapsLogger,
|
||||
AapsSchedulers aapsSchedulers,
|
||||
RxBusWrapper rxBus,
|
||||
SP sp,
|
||||
ResourceHelper resourceHelper,
|
||||
HasAndroidInjector injector,
|
||||
ActivePluginProvider activePlugin,
|
||||
DatabaseHelperInterface databaseHelper,
|
||||
OmnipodAlertUtil omnipodAlertUtil,
|
||||
NSUpload nsUpload,
|
||||
ProfileFunction profileFunction,
|
||||
Context context) {
|
||||
|
||||
this.podStateManager = podStateManager;
|
||||
this.aapsOmnipodUtil = aapsOmnipodUtil;
|
||||
|
@ -164,20 +164,20 @@ public class AapsOmnipodManager {
|
|||
}
|
||||
|
||||
public void reloadSettings() {
|
||||
basalBeepsEnabled = sp.getBoolean(OmnipodStorageKeys.Preferences.BASAL_BEEPS_ENABLED, true);
|
||||
bolusBeepsEnabled = sp.getBoolean(OmnipodStorageKeys.Preferences.BOLUS_BEEPS_ENABLED, true);
|
||||
smbBeepsEnabled = sp.getBoolean(OmnipodStorageKeys.Preferences.SMB_BEEPS_ENABLED, true);
|
||||
tbrBeepsEnabled = sp.getBoolean(OmnipodStorageKeys.Preferences.TBR_BEEPS_ENABLED, false);
|
||||
suspendDeliveryButtonEnabled = sp.getBoolean(OmnipodStorageKeys.Preferences.SUSPEND_DELIVERY_BUTTON_ENABLED, false);
|
||||
pulseLogButtonEnabled = sp.getBoolean(OmnipodStorageKeys.Preferences.PULSE_LOG_BUTTON_ENABLED, false);
|
||||
rileylinkStatsButtonEnabled = sp.getBoolean(OmnipodStorageKeys.Preferences.RILEY_LINK_STATS_BUTTON_ENABLED, false);
|
||||
showRileyLinkBatteryLevel = sp.getBoolean(OmnipodStorageKeys.Preferences.SHOW_RILEY_LINK_BATTERY_LEVEL, false);
|
||||
batteryChangeLoggingEnabled = sp.getBoolean(OmnipodStorageKeys.Preferences.BATTERY_CHANGE_LOGGING_ENABLED, false);
|
||||
timeChangeEventEnabled = sp.getBoolean(OmnipodStorageKeys.Preferences.TIME_CHANGE_EVENT_ENABLED, true);
|
||||
notificationUncertainTbrSoundEnabled = sp.getBoolean(OmnipodStorageKeys.Preferences.NOTIFICATION_UNCERTAIN_TBR_SOUND_ENABLED, false);
|
||||
notificationUncertainSmbSoundEnabled = sp.getBoolean(OmnipodStorageKeys.Preferences.NOTIFICATION_UNCERTAIN_SMB_SOUND_ENABLED, true);
|
||||
notificationUncertainBolusSoundEnabled = sp.getBoolean(OmnipodStorageKeys.Preferences.NOTIFICATION_UNCERTAIN_BOLUS_SOUND_ENABLED, true);
|
||||
automaticallyAcknowledgeAlertsEnabled = sp.getBoolean(OmnipodStorageKeys.Preferences.AUTOMATICALLY_ACKNOWLEDGE_ALERTS_ENABLED, false);
|
||||
basalBeepsEnabled = sp.getBoolean(OmnipodErosStorageKeys.Preferences.BASAL_BEEPS_ENABLED, true);
|
||||
bolusBeepsEnabled = sp.getBoolean(OmnipodErosStorageKeys.Preferences.BOLUS_BEEPS_ENABLED, true);
|
||||
smbBeepsEnabled = sp.getBoolean(OmnipodErosStorageKeys.Preferences.SMB_BEEPS_ENABLED, true);
|
||||
tbrBeepsEnabled = sp.getBoolean(OmnipodErosStorageKeys.Preferences.TBR_BEEPS_ENABLED, false);
|
||||
suspendDeliveryButtonEnabled = sp.getBoolean(OmnipodErosStorageKeys.Preferences.SUSPEND_DELIVERY_BUTTON_ENABLED, false);
|
||||
pulseLogButtonEnabled = sp.getBoolean(OmnipodErosStorageKeys.Preferences.PULSE_LOG_BUTTON_ENABLED, false);
|
||||
rileylinkStatsButtonEnabled = sp.getBoolean(OmnipodErosStorageKeys.Preferences.RILEY_LINK_STATS_BUTTON_ENABLED, false);
|
||||
showRileyLinkBatteryLevel = sp.getBoolean(OmnipodErosStorageKeys.Preferences.SHOW_RILEY_LINK_BATTERY_LEVEL, false);
|
||||
batteryChangeLoggingEnabled = sp.getBoolean(OmnipodErosStorageKeys.Preferences.BATTERY_CHANGE_LOGGING_ENABLED, false);
|
||||
timeChangeEventEnabled = sp.getBoolean(OmnipodErosStorageKeys.Preferences.TIME_CHANGE_EVENT_ENABLED, true);
|
||||
notificationUncertainTbrSoundEnabled = sp.getBoolean(OmnipodErosStorageKeys.Preferences.NOTIFICATION_UNCERTAIN_TBR_SOUND_ENABLED, false);
|
||||
notificationUncertainSmbSoundEnabled = sp.getBoolean(OmnipodErosStorageKeys.Preferences.NOTIFICATION_UNCERTAIN_SMB_SOUND_ENABLED, true);
|
||||
notificationUncertainBolusSoundEnabled = sp.getBoolean(OmnipodErosStorageKeys.Preferences.NOTIFICATION_UNCERTAIN_BOLUS_SOUND_ENABLED, true);
|
||||
automaticallyAcknowledgeAlertsEnabled = sp.getBoolean(OmnipodErosStorageKeys.Preferences.AUTOMATICALLY_ACKNOWLEDGE_ALERTS_ENABLED, false);
|
||||
}
|
||||
|
||||
public PumpEnactResult initializePod() {
|
||||
|
@ -189,7 +189,7 @@ public class AapsOmnipodManager {
|
|||
result.success(res).enacted(res);
|
||||
|
||||
if (!res) {
|
||||
result.comment(R.string.omnipod_error_failed_to_initialize_pod);
|
||||
result.comment(R.string.omnipod_common_error_failed_to_initialize_pod);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
result.success(false).enacted(false).comment(translateException(ex));
|
||||
|
@ -202,7 +202,7 @@ public class AapsOmnipodManager {
|
|||
|
||||
public PumpEnactResult insertCannula(Profile profile) {
|
||||
if (profile == null) {
|
||||
String comment = getStringResource(R.string.omnipod_error_set_initial_basal_schedule_no_profile);
|
||||
String comment = getStringResource(R.string.omnipod_common_error_set_initial_basal_schedule_no_profile);
|
||||
return new PumpEnactResult(injector).success(false).enacted(false).comment(comment);
|
||||
}
|
||||
|
||||
|
@ -216,7 +216,7 @@ public class AapsOmnipodManager {
|
|||
|
||||
result.success(res).enacted(res);
|
||||
if (!res) {
|
||||
result.comment(R.string.omnipod_error_failed_to_insert_cannula);
|
||||
result.comment(R.string.omnipod_common_error_failed_to_insert_cannula);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
result.success(false).enacted(false).comment(translateException(ex));
|
||||
|
@ -298,7 +298,7 @@ public class AapsOmnipodManager {
|
|||
|
||||
public PumpEnactResult setBasalProfile(Profile profile, boolean showNotifications) {
|
||||
if (profile == null) {
|
||||
String note = getStringResource(R.string.omnipod_error_failed_to_set_profile_empty_profile);
|
||||
String note = getStringResource(R.string.omnipod_common_error_failed_to_set_profile_empty_profile);
|
||||
if (showNotifications) {
|
||||
showNotification(Notification.FAILED_UDPATE_PROFILE, note, Notification.URGENT, R.raw.boluserror);
|
||||
}
|
||||
|
@ -313,14 +313,14 @@ public class AapsOmnipodManager {
|
|||
} catch (CommandFailedAfterChangingDeliveryStatusException ex) {
|
||||
createSuspendedFakeTbrIfNotExists();
|
||||
if (showNotifications) {
|
||||
showNotification(Notification.FAILED_UDPATE_PROFILE, getStringResource(R.string.omnipod_error_set_basal_failed_delivery_suspended), Notification.URGENT, R.raw.boluserror);
|
||||
showNotification(Notification.FAILED_UDPATE_PROFILE, getStringResource(R.string.omnipod_eros_error_set_basal_failed_delivery_suspended), Notification.URGENT, R.raw.boluserror);
|
||||
}
|
||||
String errorMessage = translateException(ex.getCause());
|
||||
addFailureToHistory(historyEntryType, errorMessage);
|
||||
return new PumpEnactResult(injector).success(false).enacted(false).comment(errorMessage);
|
||||
} catch (PrecedingCommandFailedUncertainlyException ex) {
|
||||
if (showNotifications) {
|
||||
showNotification(Notification.FAILED_UDPATE_PROFILE, getStringResource(R.string.omnipod_error_set_basal_failed_delivery_might_be_suspended), Notification.URGENT, R.raw.boluserror);
|
||||
showNotification(Notification.FAILED_UDPATE_PROFILE, getStringResource(R.string.omnipod_eros_error_set_basal_failed_delivery_might_be_suspended), Notification.URGENT, R.raw.boluserror);
|
||||
}
|
||||
String errorMessage = translateException(ex.getCause());
|
||||
addFailureToHistory(historyEntryType, errorMessage);
|
||||
|
@ -329,9 +329,9 @@ public class AapsOmnipodManager {
|
|||
if (showNotifications) {
|
||||
String note;
|
||||
if (OmnipodManager.isCertainFailure(ex)) {
|
||||
note = getStringResource(R.string.omnipod_error_set_basal_failed);
|
||||
note = getStringResource(R.string.omnipod_common_error_set_basal_failed);
|
||||
} else {
|
||||
note = getStringResource(R.string.omnipod_error_set_basal_might_have_failed_delivery_might_be_suspended);
|
||||
note = getStringResource(R.string.omnipod_eros_error_set_basal_might_have_failed_delivery_might_be_suspended);
|
||||
}
|
||||
showNotification(Notification.FAILED_UDPATE_PROFILE, note, Notification.URGENT, R.raw.boluserror);
|
||||
}
|
||||
|
@ -367,7 +367,7 @@ public class AapsOmnipodManager {
|
|||
|
||||
dismissNotification(Notification.OMNIPOD_POD_FAULT);
|
||||
sendEvent(new EventOmnipodPumpValuesChanged());
|
||||
sendEvent(new EventRefreshOverview("Omnipod command: " + OmnipodCommandType.DISCARD_POD, false));
|
||||
sendEvent(new EventRefreshOverview("Omnipod command: " + OmnipodErosCommandType.DISCARD_POD, false));
|
||||
|
||||
return new PumpEnactResult(injector).success(true).enacted(true);
|
||||
}
|
||||
|
@ -379,7 +379,7 @@ public class AapsOmnipodManager {
|
|||
|
||||
Date bolusStarted;
|
||||
try {
|
||||
bolusCommandResult = executeCommand(() -> delegate.bolus(PumpType.Insulet_Omnipod.determineCorrectBolusSize(detailedBolusInfo.insulin), beepsEnabled, beepsEnabled, detailedBolusInfo.isSMB ? null :
|
||||
bolusCommandResult = executeCommand(() -> delegate.bolus(PumpType.Omnipod_Eros.determineCorrectBolusSize(detailedBolusInfo.insulin), beepsEnabled, beepsEnabled, detailedBolusInfo.isSMB ? null :
|
||||
(estimatedUnitsDelivered, percentage) -> {
|
||||
EventOverviewBolusProgress progressUpdateEvent = EventOverviewBolusProgress.INSTANCE;
|
||||
progressUpdateEvent.setStatus(getStringResource(R.string.bolusdelivering, detailedBolusInfo.insulin));
|
||||
|
@ -397,9 +397,9 @@ public class AapsOmnipodManager {
|
|||
if (OmnipodManager.CommandDeliveryStatus.UNCERTAIN_FAILURE.equals(bolusCommandResult.getCommandDeliveryStatus())) {
|
||||
// For safety reasons, we treat this as a bolus that has successfully been delivered, in order to prevent insulin overdose
|
||||
if (detailedBolusInfo.isSMB) {
|
||||
showNotification(Notification.OMNIPOD_UNCERTAIN_SMB, getStringResource(R.string.omnipod_error_bolus_failed_uncertain_smb, detailedBolusInfo.insulin), Notification.URGENT, isNotificationUncertainSmbSoundEnabled() ? R.raw.boluserror : null);
|
||||
showNotification(Notification.OMNIPOD_UNCERTAIN_SMB, getStringResource(R.string.omnipod_eros_error_bolus_failed_uncertain_smb, detailedBolusInfo.insulin), Notification.URGENT, isNotificationUncertainSmbSoundEnabled() ? R.raw.boluserror : null);
|
||||
} else {
|
||||
showErrorDialog(getStringResource(R.string.omnipod_error_bolus_failed_uncertain), isNotificationUncertainBolusSoundEnabled() ? R.raw.boluserror : null);
|
||||
showErrorDialog(getStringResource(R.string.omnipod_eros_error_bolus_failed_uncertain), isNotificationUncertainBolusSoundEnabled() ? R.raw.boluserror : null);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -425,7 +425,7 @@ public class AapsOmnipodManager {
|
|||
// I discussed this with the AAPS team but nobody seems to care so we're stuck with this ugly workaround for now
|
||||
try {
|
||||
ActiveBolus activeBolus = ActiveBolus.fromDetailedBolusInfo(detailedBolusInfo);
|
||||
sp.putString(OmnipodStorageKeys.Preferences.ACTIVE_BOLUS, aapsOmnipodUtil.getGsonInstance().toJson(activeBolus));
|
||||
sp.putString(OmnipodErosStorageKeys.Preferences.ACTIVE_BOLUS, aapsOmnipodUtil.getGsonInstance().toJson(activeBolus));
|
||||
aapsLogger.debug(LTag.PUMP, "Stored active bolus to SP for recovery");
|
||||
} catch (Exception ex) {
|
||||
aapsLogger.error(LTag.PUMP, "Failed to store active bolus to SP", ex);
|
||||
|
@ -444,7 +444,7 @@ public class AapsOmnipodManager {
|
|||
|
||||
addBolusToHistory(detailedBolusInfo);
|
||||
|
||||
sp.remove(OmnipodStorageKeys.Preferences.ACTIVE_BOLUS);
|
||||
sp.remove(OmnipodErosStorageKeys.Preferences.ACTIVE_BOLUS);
|
||||
|
||||
return new PumpEnactResult(injector).success(true).enacted(true).carbsDelivered(detailedBolusInfo.carbs).bolusDelivered(detailedBolusInfo.insulin);
|
||||
}
|
||||
|
@ -459,7 +459,7 @@ public class AapsOmnipodManager {
|
|||
aapsLogger.debug(LTag.PUMP, "Bolus command successfully executed. Proceeding bolus cancellation");
|
||||
} else {
|
||||
aapsLogger.debug(LTag.PUMP, "Not cancelling bolus: bolus command failed");
|
||||
String comment = getStringResource(R.string.omnipod_error_bolus_did_not_succeed);
|
||||
String comment = getStringResource(R.string.omnipod_common_error_bolus_did_not_succeed);
|
||||
addFailureToHistory(System.currentTimeMillis(), PodHistoryEntryType.CANCEL_BOLUS, comment);
|
||||
return new PumpEnactResult(injector).success(true).enacted(false).comment(comment);
|
||||
}
|
||||
|
@ -491,7 +491,7 @@ public class AapsOmnipodManager {
|
|||
public PumpEnactResult setTemporaryBasal(TempBasalPair tempBasalPair) {
|
||||
boolean beepsEnabled = isTbrBeepsEnabled();
|
||||
try {
|
||||
executeCommand(() -> delegate.setTemporaryBasal(PumpType.Insulet_Omnipod.determineCorrectBasalSize(tempBasalPair.getInsulinRate()), Duration.standardMinutes(tempBasalPair.getDurationMinutes()), beepsEnabled, beepsEnabled));
|
||||
executeCommand(() -> delegate.setTemporaryBasal(PumpType.Omnipod_Eros.determineCorrectBasalSize(tempBasalPair.getInsulinRate()), Duration.standardMinutes(tempBasalPair.getDurationMinutes()), beepsEnabled, beepsEnabled));
|
||||
} catch (CommandFailedAfterChangingDeliveryStatusException ex) {
|
||||
String errorMessage = translateException(ex.getCause());
|
||||
addFailureToHistory(PodHistoryEntryType.SET_TEMPORARY_BASAL, errorMessage);
|
||||
|
@ -500,7 +500,7 @@ public class AapsOmnipodManager {
|
|||
String errorMessage = translateException(ex.getCause());
|
||||
addFailureToHistory(PodHistoryEntryType.SET_TEMPORARY_BASAL, errorMessage);
|
||||
|
||||
showNotification(Notification.OMNIPOD_TBR_ALERTS, getStringResource(R.string.omnipod_error_set_temp_basal_failed_old_tbr_might_be_cancelled), Notification.URGENT, isNotificationUncertainTbrSoundEnabled() ? R.raw.boluserror : null);
|
||||
showNotification(Notification.OMNIPOD_TBR_ALERTS, getStringResource(R.string.omnipod_eros_error_set_temp_basal_failed_old_tbr_might_be_cancelled), Notification.URGENT, isNotificationUncertainTbrSoundEnabled() ? R.raw.boluserror : null);
|
||||
|
||||
splitActiveTbr(); // Split any active TBR so when we recover from the uncertain TBR status,we only cancel the part after the cancellation
|
||||
|
||||
|
@ -510,7 +510,7 @@ public class AapsOmnipodManager {
|
|||
long pumpId = addFailureToHistory(PodHistoryEntryType.SET_TEMPORARY_BASAL, errorMessage);
|
||||
|
||||
if (!OmnipodManager.isCertainFailure(ex)) {
|
||||
showNotification(Notification.OMNIPOD_TBR_ALERTS, getStringResource(R.string.omnipod_error_set_temp_basal_failed_old_tbr_cancelled_new_might_have_failed), Notification.URGENT, isNotificationUncertainTbrSoundEnabled() ? R.raw.boluserror : null);
|
||||
showNotification(Notification.OMNIPOD_TBR_ALERTS, getStringResource(R.string.omnipod_eros_error_set_temp_basal_failed_old_tbr_cancelled_new_might_have_failed), Notification.URGENT, isNotificationUncertainTbrSoundEnabled() ? R.raw.boluserror : null);
|
||||
|
||||
// Assume that setting the temp basal succeeded here, because in case it didn't succeed,
|
||||
// The next StatusResponse that we receive will allow us to recover from the wrong state
|
||||
|
@ -533,7 +533,7 @@ public class AapsOmnipodManager {
|
|||
|
||||
return new PumpEnactResult(injector)
|
||||
.duration(tempBasalPair.getDurationMinutes())
|
||||
.absolute(PumpType.Insulet_Omnipod.determineCorrectBasalSize(tempBasalPair.getInsulinRate()))
|
||||
.absolute(PumpType.Omnipod_Eros.determineCorrectBasalSize(tempBasalPair.getInsulinRate()))
|
||||
.success(true).enacted(true);
|
||||
}
|
||||
|
||||
|
@ -542,7 +542,7 @@ public class AapsOmnipodManager {
|
|||
executeCommand(() -> delegate.cancelTemporaryBasal(isTbrBeepsEnabled()));
|
||||
} catch (Exception ex) {
|
||||
if (OmnipodManager.isCertainFailure(ex)) {
|
||||
showNotification(Notification.OMNIPOD_TBR_ALERTS, getStringResource(R.string.omnipod_error_cancel_temp_basal_failed_uncertain), Notification.URGENT, isNotificationUncertainTbrSoundEnabled() ? R.raw.boluserror : null);
|
||||
showNotification(Notification.OMNIPOD_TBR_ALERTS, getStringResource(R.string.omnipod_eros_error_cancel_temp_basal_failed_uncertain), Notification.URGENT, isNotificationUncertainTbrSoundEnabled() ? R.raw.boluserror : null);
|
||||
} else {
|
||||
splitActiveTbr(); // Split any active TBR so when we recover from the uncertain TBR status,we only cancel the part after the cancellation
|
||||
}
|
||||
|
@ -604,21 +604,21 @@ public class AapsOmnipodManager {
|
|||
} catch (CommandFailedAfterChangingDeliveryStatusException ex) {
|
||||
createSuspendedFakeTbrIfNotExists();
|
||||
if (showNotifications) {
|
||||
showNotification(Notification.FAILED_UDPATE_PROFILE, getStringResource(R.string.omnipod_error_set_time_failed_delivery_suspended), Notification.URGENT, R.raw.boluserror);
|
||||
showNotification(Notification.FAILED_UDPATE_PROFILE, getStringResource(R.string.omnipod_eros_error_set_time_failed_delivery_suspended), Notification.URGENT, R.raw.boluserror);
|
||||
}
|
||||
String errorMessage = translateException(ex.getCause());
|
||||
addFailureToHistory(PodHistoryEntryType.SET_TIME, errorMessage);
|
||||
return new PumpEnactResult(injector).success(false).enacted(false).comment(errorMessage);
|
||||
} catch (PrecedingCommandFailedUncertainlyException ex) {
|
||||
if (showNotifications) {
|
||||
showNotification(Notification.FAILED_UDPATE_PROFILE, getStringResource(R.string.omnipod_error_set_time_failed_delivery_might_be_suspended), Notification.URGENT, R.raw.boluserror);
|
||||
showNotification(Notification.FAILED_UDPATE_PROFILE, getStringResource(R.string.omnipod_eros_error_set_time_failed_delivery_might_be_suspended), Notification.URGENT, R.raw.boluserror);
|
||||
}
|
||||
String errorMessage = translateException(ex.getCause());
|
||||
addFailureToHistory(PodHistoryEntryType.SET_TIME, errorMessage);
|
||||
return new PumpEnactResult(injector).success(false).enacted(false).comment(errorMessage);
|
||||
} catch (Exception ex) {
|
||||
if (showNotifications) {
|
||||
showNotification(Notification.FAILED_UDPATE_PROFILE, getStringResource(R.string.omnipod_error_set_time_failed_delivery_might_be_suspended), Notification.URGENT, R.raw.boluserror);
|
||||
showNotification(Notification.FAILED_UDPATE_PROFILE, getStringResource(R.string.omnipod_eros_error_set_time_failed_delivery_might_be_suspended), Notification.URGENT, R.raw.boluserror);
|
||||
}
|
||||
String errorMessage = translateException(ex);
|
||||
addFailureToHistory(PodHistoryEntryType.SET_TIME, errorMessage);
|
||||
|
@ -899,56 +899,56 @@ public class AapsOmnipodManager {
|
|||
String comment;
|
||||
|
||||
if (ex instanceof CrcMismatchException) {
|
||||
comment = getStringResource(R.string.omnipod_error_crc_mismatch);
|
||||
comment = getStringResource(R.string.omnipod_eros_error_crc_mismatch);
|
||||
} else if (ex instanceof IllegalPacketTypeException) {
|
||||
comment = getStringResource(R.string.omnipod_error_invalid_packet_type);
|
||||
comment = getStringResource(R.string.omnipod_eros_error_invalid_packet_type);
|
||||
} else if (ex instanceof IllegalPodProgressException || ex instanceof IllegalActivationProgressException ||
|
||||
ex instanceof IllegalDeliveryStatusException) {
|
||||
comment = getStringResource(R.string.omnipod_error_invalid_progress_state);
|
||||
comment = getStringResource(R.string.omnipod_eros_error_invalid_progress_state);
|
||||
} else if (ex instanceof PodProgressStatusVerificationFailedException) {
|
||||
comment = getStringResource(R.string.omnipod_error_failed_to_verify_activation_progress);
|
||||
comment = getStringResource(R.string.omnipod_common_error_failed_to_verify_activation_progress);
|
||||
} else if (ex instanceof IllegalVersionResponseTypeException) {
|
||||
comment = getStringResource(R.string.omnipod_error_invalid_response);
|
||||
comment = getStringResource(R.string.omnipod_eros_error_invalid_response);
|
||||
} else if (ex instanceof IllegalResponseException) {
|
||||
comment = getStringResource(R.string.omnipod_error_invalid_response);
|
||||
comment = getStringResource(R.string.omnipod_eros_error_invalid_response);
|
||||
} else if (ex instanceof IllegalMessageSequenceNumberException) {
|
||||
comment = getStringResource(R.string.omnipod_error_invalid_message_sequence_number);
|
||||
comment = getStringResource(R.string.omnipod_eros_error_invalid_message_sequence_number);
|
||||
} else if (ex instanceof IllegalMessageAddressException) {
|
||||
comment = getStringResource(R.string.omnipod_error_invalid_message_address);
|
||||
comment = getStringResource(R.string.omnipod_eros_error_invalid_message_address);
|
||||
} else if (ex instanceof MessageDecodingException) {
|
||||
comment = getStringResource(R.string.omnipod_error_message_decoding_failed);
|
||||
comment = getStringResource(R.string.omnipod_eros_error_message_decoding_failed);
|
||||
} else if (ex instanceof NonceOutOfSyncException) {
|
||||
comment = getStringResource(R.string.omnipod_error_nonce_out_of_sync);
|
||||
comment = getStringResource(R.string.omnipod_eros_error_nonce_out_of_sync);
|
||||
} else if (ex instanceof NonceResyncException) {
|
||||
comment = getStringResource(R.string.omnipod_error_nonce_resync_failed);
|
||||
comment = getStringResource(R.string.omnipod_eros_error_nonce_resync_failed);
|
||||
} else if (ex instanceof NotEnoughDataException) {
|
||||
comment = getStringResource(R.string.omnipod_error_not_enough_data);
|
||||
comment = getStringResource(R.string.omnipod_eros_error_not_enough_data);
|
||||
} else if (ex instanceof PodFaultException) {
|
||||
FaultEventCode faultEventCode = ((PodFaultException) ex).getDetailedStatus().getFaultEventCode();
|
||||
comment = createPodFaultErrorMessage(faultEventCode);
|
||||
} else if (ex instanceof ActivationTimeExceededException) {
|
||||
comment = getStringResource(R.string.omnipod_error_pod_fault_activation_time_exceeded);
|
||||
comment = getStringResource(R.string.omnipod_common_error_pod_fault_activation_time_exceeded);
|
||||
} else if (ex instanceof PodReturnedErrorResponseException) {
|
||||
comment = getStringResource(R.string.omnipod_error_pod_returned_error_response);
|
||||
comment = getStringResource(R.string.omnipod_eros_error_pod_returned_error_response);
|
||||
} else if (ex instanceof RileyLinkUnreachableException) {
|
||||
comment = getStringResource(R.string.omnipod_error_communication_failed_no_response_from_riley_link);
|
||||
comment = getStringResource(R.string.omnipod_eros_error_communication_failed_no_response_from_riley_link);
|
||||
} else if (ex instanceof RileyLinkInterruptedException) {
|
||||
comment = getStringResource(R.string.omnipod_error_communication_failed_riley_link_interrupted);
|
||||
comment = getStringResource(R.string.omnipod_eros_error_communication_failed_riley_link_interrupted);
|
||||
} else if (ex instanceof RileyLinkTimeoutException) {
|
||||
comment = getStringResource(R.string.omnipod_error_communication_failed_no_response_from_pod);
|
||||
comment = getStringResource(R.string.omnipod_eros_error_communication_failed_no_response_from_pod);
|
||||
} else if (ex instanceof RileyLinkUnexpectedException) {
|
||||
Throwable cause = ex.getCause();
|
||||
comment = getStringResource(R.string.omnipod_error_unexpected_exception, cause.getClass().getName(), cause.getMessage());
|
||||
comment = getStringResource(R.string.omnipod_common_error_unexpected_exception, cause.getClass().getName(), cause.getMessage());
|
||||
} else {
|
||||
// Shouldn't be reachable
|
||||
comment = getStringResource(R.string.omnipod_error_unexpected_exception, ex.getClass().getName(), ex.getMessage());
|
||||
comment = getStringResource(R.string.omnipod_common_error_unexpected_exception, ex.getClass().getName(), ex.getMessage());
|
||||
}
|
||||
|
||||
return comment;
|
||||
}
|
||||
|
||||
private String createPodFaultErrorMessage(FaultEventCode faultEventCode) {
|
||||
return getStringResource(R.string.omnipod_error_pod_fault,
|
||||
return getStringResource(R.string.omnipod_eros_error_pod_fault,
|
||||
ByteUtil.convertUnsignedByteToInt(faultEventCode.getValue()), faultEventCode.name());
|
||||
}
|
||||
|
||||
|
@ -1002,7 +1002,7 @@ public class AapsOmnipodManager {
|
|||
}
|
||||
List<BasalScheduleEntry> entries = new ArrayList<>();
|
||||
for (Profile.ProfileValue basalValue : basalValues) {
|
||||
entries.add(new BasalScheduleEntry(PumpType.Insulet_Omnipod.determineCorrectBasalSize(basalValue.value),
|
||||
entries.add(new BasalScheduleEntry(PumpType.Omnipod_Eros.determineCorrectBasalSize(basalValue.value),
|
||||
Duration.standardSeconds(basalValue.timeAsSeconds)));
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.eros.queue.command;
|
||||
|
||||
public final class CommandAcknowledgeAlerts extends OmnipodCustomCommand {
|
||||
public CommandAcknowledgeAlerts() {
|
||||
super(OmnipodCustomCommandType.ACKNOWLEDGE_ALERTS);
|
||||
}
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.eros.queue.command;
|
||||
|
||||
public final class CommandDeactivatePod extends OmnipodCustomCommand {
|
||||
public CommandDeactivatePod() {
|
||||
super(OmnipodCustomCommandType.DEACTIVATE_POD);
|
||||
}
|
||||
}
|
|
@ -1,7 +1,11 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.eros.queue.command;
|
||||
|
||||
public final class CommandGetPodStatus extends OmnipodCustomCommand {
|
||||
public CommandGetPodStatus() {
|
||||
super(OmnipodCustomCommandType.GET_POD_STATUS);
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import info.nightscout.androidaps.queue.commands.CustomCommand;
|
||||
|
||||
public final class CommandGetPodStatus implements CustomCommand {
|
||||
@NotNull @Override public String getStatusDescription() {
|
||||
return "GET POD STATUS";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.eros.queue.command;
|
||||
|
||||
public final class CommandHandleTimeChange extends OmnipodCustomCommand {
|
||||
private final boolean requestedByUser;
|
||||
|
||||
public CommandHandleTimeChange(boolean requestedByUser) {
|
||||
super(OmnipodCustomCommandType.HANDLE_TIME_CHANGE);
|
||||
this.requestedByUser = requestedByUser;
|
||||
}
|
||||
|
||||
public boolean isRequestedByUser() {
|
||||
return requestedByUser;
|
||||
}
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.eros.queue.command;
|
||||
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.BeepConfigType;
|
||||
|
||||
public class CommandPlayTestBeep extends OmnipodCustomCommand {
|
||||
private final BeepConfigType beepType;
|
||||
|
||||
public CommandPlayTestBeep(BeepConfigType beepType) {
|
||||
super(OmnipodCustomCommandType.PLAY_TEST_BEEP);
|
||||
this.beepType = beepType;
|
||||
}
|
||||
|
||||
public BeepConfigType getBeepType() {
|
||||
return beepType;
|
||||
}
|
||||
}
|
|
@ -1,7 +1,11 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.eros.queue.command;
|
||||
|
||||
public final class CommandReadPulseLog extends OmnipodCustomCommand {
|
||||
public CommandReadPulseLog() {
|
||||
super(OmnipodCustomCommandType.READ_PULSE_LOG);
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import info.nightscout.androidaps.queue.commands.CustomCommand;
|
||||
|
||||
public final class CommandReadPulseLog implements CustomCommand {
|
||||
@NotNull @Override public String getStatusDescription() {
|
||||
return "READ PULSE LOG";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.eros.queue.command;
|
||||
|
||||
public final class CommandResumeDelivery extends OmnipodCustomCommand {
|
||||
public CommandResumeDelivery() {
|
||||
super(OmnipodCustomCommandType.RESUME_DELIVERY);
|
||||
}
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.eros.queue.command;
|
||||
|
||||
public final class CommandSuspendDelivery extends OmnipodCustomCommand {
|
||||
public CommandSuspendDelivery() {
|
||||
super(OmnipodCustomCommandType.SUSPEND_DELIVERY);
|
||||
}
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.eros.queue.command;
|
||||
|
||||
public final class CommandUpdateAlertConfiguration extends OmnipodCustomCommand {
|
||||
public CommandUpdateAlertConfiguration() {
|
||||
super(OmnipodCustomCommandType.UPDATE_ALERT_CONFIGURATION);
|
||||
}
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.eros.queue.command;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import info.nightscout.androidaps.queue.commands.CustomCommand;
|
||||
|
||||
public abstract class OmnipodCustomCommand implements CustomCommand {
|
||||
private final OmnipodCustomCommandType type;
|
||||
|
||||
OmnipodCustomCommand(@NonNull OmnipodCustomCommandType type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public final OmnipodCustomCommandType getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
@Override public final String getStatusDescription() {
|
||||
return type.getDescription();
|
||||
}
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.eros.queue.command;
|
||||
|
||||
public enum OmnipodCustomCommandType {
|
||||
ACKNOWLEDGE_ALERTS("ACKNOWLEDGE ALERTS"),
|
||||
GET_POD_STATUS("GET POD STATUS"),
|
||||
READ_PULSE_LOG("READ PULSE LOG"),
|
||||
SUSPEND_DELIVERY("SUSPEND DELIVERY"),
|
||||
RESUME_DELIVERY("RESUME DELIVERY"),
|
||||
DEACTIVATE_POD("DEACTIVATE POD"),
|
||||
HANDLE_TIME_CHANGE("HANDLE TIME CHANGE"),
|
||||
UPDATE_ALERT_CONFIGURATION("UPDATE ALERT CONFIGURATION"),
|
||||
PLAY_TEST_BEEP("PLAY TEST BEEP");
|
||||
|
||||
private final String description;
|
||||
|
||||
OmnipodCustomCommandType(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
String getDescription() {
|
||||
return description;
|
||||
}
|
||||
}
|
|
@ -21,7 +21,7 @@ import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.Riley
|
|||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.OmnipodErosPumpPlugin;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.R;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.manager.PodStateManager;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.manager.AapsOmnipodManager;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.manager.AapsOmnipodErosManager;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.rileylink.manager.OmnipodRileyLinkCommunicationManager;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.util.AapsOmnipodUtil;
|
||||
|
||||
|
@ -38,7 +38,7 @@ public class RileyLinkOmnipodService extends RileyLinkService {
|
|||
@Inject AapsOmnipodUtil aapsOmnipodUtil;
|
||||
@Inject PodStateManager podStateManager;
|
||||
@Inject DatabaseHelperInterface databaseHelper;
|
||||
@Inject AapsOmnipodManager aapsOmnipodManager;
|
||||
@Inject AapsOmnipodErosManager aapsOmnipodErosManager;
|
||||
@Inject OmnipodRileyLinkCommunicationManager omnipodRileyLinkCommunicationManager;
|
||||
|
||||
private final IBinder mBinder = new LocalBinder();
|
||||
|
@ -118,11 +118,11 @@ public class RileyLinkOmnipodService extends RileyLinkService {
|
|||
|
||||
if (StringUtils.isEmpty(rileyLinkAddress)) {
|
||||
aapsLogger.debug(LTag.PUMPBTCOMM, "RileyLink address invalid: no address");
|
||||
errorDescription = resourceHelper.gs(R.string.omnipod_error_rileylink_address_invalid);
|
||||
errorDescription = resourceHelper.gs(R.string.omnipod_eros_error_riley_link_address_invalid);
|
||||
return false;
|
||||
} else {
|
||||
if (!rileyLinkAddress.matches(REGEX_MAC)) {
|
||||
errorDescription = resourceHelper.gs(R.string.omnipod_error_rileylink_address_invalid);
|
||||
errorDescription = resourceHelper.gs(R.string.omnipod_eros_error_riley_link_address_invalid);
|
||||
aapsLogger.debug(LTag.PUMPBTCOMM, "RileyLink address invalid: {}", rileyLinkAddress);
|
||||
} else {
|
||||
if (!rileyLinkAddress.equals(this.rileyLinkAddress)) {
|
||||
|
|
|
@ -38,7 +38,7 @@ import info.nightscout.androidaps.plugins.pump.omnipod.eros.definition.PodHistor
|
|||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.util.AapsOmnipodUtil;
|
||||
import info.nightscout.androidaps.utils.resources.ResourceHelper;
|
||||
|
||||
public class PodHistoryActivity extends NoSplashAppCompatActivity {
|
||||
public class ErosPodHistoryActivity extends NoSplashAppCompatActivity {
|
||||
|
||||
@Inject AAPSLogger aapsLogger;
|
||||
@Inject AapsOmnipodUtil aapsOmnipodUtil;
|
||||
|
@ -60,7 +60,7 @@ public class PodHistoryActivity extends NoSplashAppCompatActivity {
|
|||
private List<TypeList> typeListFull;
|
||||
|
||||
|
||||
public PodHistoryActivity() {
|
||||
public ErosPodHistoryActivity() {
|
||||
super();
|
||||
}
|
||||
|
||||
|
@ -251,7 +251,7 @@ public class PodHistoryActivity extends NoSplashAppCompatActivity {
|
|||
case SET_TEMPORARY_BASAL:
|
||||
case SPLIT_TEMPORARY_BASAL: {
|
||||
TempBasalPair tempBasalPair = aapsOmnipodUtil.getGsonInstance().fromJson(historyEntry.getData(), TempBasalPair.class);
|
||||
valueView.setText(resourceHelper.gs(R.string.omnipod_history_tbr_value, tempBasalPair.getInsulinRate(), tempBasalPair.getDurationMinutes()));
|
||||
valueView.setText(resourceHelper.gs(R.string.omnipod_eros_history_tbr_value, tempBasalPair.getInsulinRate(), tempBasalPair.getDurationMinutes()));
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -266,9 +266,9 @@ public class PodHistoryActivity extends NoSplashAppCompatActivity {
|
|||
case SET_BOLUS: {
|
||||
if (historyEntry.getData().contains(";")) {
|
||||
String[] splitVal = historyEntry.getData().split(";");
|
||||
valueView.setText(resourceHelper.gs(R.string.omnipod_history_bolus_value_with_carbs, Double.valueOf(splitVal[0]), Double.valueOf(splitVal[1])));
|
||||
valueView.setText(resourceHelper.gs(R.string.omnipod_eros_history_bolus_value_with_carbs, Double.valueOf(splitVal[0]), Double.valueOf(splitVal[1])));
|
||||
} else {
|
||||
valueView.setText(resourceHelper.gs(R.string.omnipod_history_bolus_value, Double.valueOf(historyEntry.getData())));
|
||||
valueView.setText(resourceHelper.gs(R.string.omnipod_eros_history_bolus_value, Double.valueOf(historyEntry.getData())));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -309,7 +309,7 @@ public class PodHistoryActivity extends NoSplashAppCompatActivity {
|
|||
|
||||
try {
|
||||
Profile.ProfileValue[] profileValuesArray = aapsOmnipodUtil.getGsonInstance().fromJson(data, Profile.ProfileValue[].class);
|
||||
valueView.setText(ProfileUtil.getBasalProfilesDisplayable(profileValuesArray, PumpType.Insulet_Omnipod));
|
||||
valueView.setText(ProfileUtil.getBasalProfilesDisplayable(profileValuesArray, PumpType.Omnipod_Eros));
|
||||
} catch (Exception e) {
|
||||
aapsLogger.error(LTag.PUMP, "Problem parsing Profile json. Ex: {}, Data:\n{}", e.getMessage(), data);
|
||||
valueView.setText("");
|
|
@ -13,6 +13,9 @@ import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.dialog.RileyL
|
|||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.RileyLinkServiceData
|
||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.tasks.ResetRileyLinkConfigurationTask
|
||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.tasks.ServiceTaskExecutor
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.queue.command.CommandPlayTestBeep
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.activation.PodActivationWizardActivity
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.deactivation.PodDeactivationWizardActivity
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.OmnipodErosPumpPlugin
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.R
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.databinding.OmnipodPodManagementBinding
|
||||
|
@ -20,11 +23,8 @@ import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.Ac
|
|||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.BeepConfigType
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.manager.PodStateManager
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.event.EventOmnipodPumpValuesChanged
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.manager.AapsOmnipodManager
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.queue.command.CommandPlayTestBeep
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.manager.AapsOmnipodErosManager
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.queue.command.CommandReadPulseLog
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.activation.PodActivationWizardActivity
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.deactivation.PodDeactivationWizardActivity
|
||||
import info.nightscout.androidaps.queue.Callback
|
||||
import info.nightscout.androidaps.queue.events.EventQueueChanged
|
||||
import info.nightscout.androidaps.utils.FabricPrivacy
|
||||
|
@ -39,7 +39,7 @@ import javax.inject.Inject
|
|||
/**
|
||||
* Created by andy on 30/08/2019
|
||||
*/
|
||||
class PodManagementActivity : NoSplashAppCompatActivity() {
|
||||
class ErosPodManagementActivity : NoSplashAppCompatActivity() {
|
||||
|
||||
@Inject lateinit var rxBus: RxBusWrapper
|
||||
@Inject lateinit var fabricPrivacy: FabricPrivacy
|
||||
|
@ -47,7 +47,7 @@ class PodManagementActivity : NoSplashAppCompatActivity() {
|
|||
@Inject lateinit var podStateManager: PodStateManager
|
||||
@Inject lateinit var injector: HasAndroidInjector
|
||||
@Inject lateinit var rileyLinkServiceData: RileyLinkServiceData
|
||||
@Inject lateinit var aapsOmnipodManager: AapsOmnipodManager
|
||||
@Inject lateinit var aapsOmnipodManager: AapsOmnipodErosManager
|
||||
@Inject lateinit var context: Context
|
||||
@Inject lateinit var omnipodErosPumpPlugin: OmnipodErosPumpPlugin
|
||||
@Inject lateinit var serviceTaskExecutor: ServiceTaskExecutor
|
||||
|
@ -72,7 +72,7 @@ class PodManagementActivity : NoSplashAppCompatActivity() {
|
|||
|
||||
binding.buttonDiscardPod.setOnClickListener {
|
||||
OKDialog.showConfirmation(this,
|
||||
resourceHelper.gs(R.string.omnipod_pod_management_discard_pod_confirmation), Thread {
|
||||
resourceHelper.gs(R.string.omnipod_common_pod_management_discard_pod_confirmation), Thread {
|
||||
aapsOmnipodManager.discardPodState()
|
||||
})
|
||||
}
|
||||
|
@ -92,12 +92,12 @@ class PodManagementActivity : NoSplashAppCompatActivity() {
|
|||
|
||||
binding.buttonPlayTestBeep.setOnClickListener {
|
||||
binding.buttonPlayTestBeep.isEnabled = false
|
||||
binding.buttonPlayTestBeep.setText(R.string.omnipod_pod_management_button_playing_test_beep)
|
||||
binding.buttonPlayTestBeep.setText(R.string.omnipod_common_pod_management_button_playing_test_beep)
|
||||
|
||||
commandQueue.customCommand(CommandPlayTestBeep(BeepConfigType.BEEEP), object : Callback() {
|
||||
override fun run() {
|
||||
if (!result.success) {
|
||||
displayErrorDialog(resourceHelper.gs(R.string.omnipod_warning), resourceHelper.gs(R.string.omnipod_two_strings_concatenated_by_colon, resourceHelper.gs(R.string.omnipod_error_failed_to_play_test_beep), result.comment), false)
|
||||
displayErrorDialog(resourceHelper.gs(R.string.omnipod_common_warning), resourceHelper.gs(R.string.omnipod_common_two_strings_concatenated_by_colon, resourceHelper.gs(R.string.omnipod_common_error_failed_to_play_test_beep), result.comment), false)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -105,19 +105,19 @@ class PodManagementActivity : NoSplashAppCompatActivity() {
|
|||
|
||||
binding.buttonPulseLog.setOnClickListener {
|
||||
binding.buttonPulseLog.isEnabled = false
|
||||
binding.buttonPulseLog.setText(R.string.omnipod_pod_management_button_reading_pulse_log)
|
||||
binding.buttonPulseLog.setText(R.string.omnipod_eros_pod_management_button_reading_pulse_log)
|
||||
|
||||
commandQueue.customCommand(CommandReadPulseLog(), object : Callback() {
|
||||
override fun run() {
|
||||
if (!result.success) {
|
||||
displayErrorDialog(resourceHelper.gs(R.string.omnipod_warning), resourceHelper.gs(R.string.omnipod_two_strings_concatenated_by_colon, resourceHelper.gs(R.string.omnipod_error_failed_to_read_pulse_log), result.comment), false)
|
||||
displayErrorDialog(resourceHelper.gs(R.string.omnipod_common_warning), resourceHelper.gs(R.string.omnipod_common_two_strings_concatenated_by_colon, resourceHelper.gs(R.string.omnipod_eros_error_failed_to_read_pulse_log), result.comment), false)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
binding.buttonPodHistory.setOnClickListener {
|
||||
startActivity(Intent(this, PodHistoryActivity::class.java))
|
||||
startActivity(Intent(this, ErosPodHistoryActivity::class.java))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -164,14 +164,14 @@ class PodManagementActivity : NoSplashAppCompatActivity() {
|
|||
if (podStateManager.isPodInitialized && podStateManager.activationProgress.isAtLeast(ActivationProgress.PAIRING_COMPLETED)) {
|
||||
if (commandQueue.isCustomCommandInQueue(CommandPlayTestBeep::class.java)) {
|
||||
binding.buttonPlayTestBeep.isEnabled = false
|
||||
binding.buttonPlayTestBeep.setText(R.string.omnipod_pod_management_button_playing_test_beep)
|
||||
binding.buttonPlayTestBeep.setText(R.string.omnipod_common_pod_management_button_playing_test_beep)
|
||||
} else {
|
||||
binding.buttonPlayTestBeep.isEnabled = true
|
||||
binding.buttonPlayTestBeep.setText(R.string.omnipod_pod_management_button_play_test_beep)
|
||||
binding.buttonPlayTestBeep.setText(R.string.omnipod_common_pod_management_button_play_test_beep)
|
||||
}
|
||||
} else {
|
||||
binding.buttonPlayTestBeep.isEnabled = false
|
||||
binding.buttonPlayTestBeep.setText(R.string.omnipod_pod_management_button_play_test_beep)
|
||||
binding.buttonPlayTestBeep.setText(R.string.omnipod_common_pod_management_button_play_test_beep)
|
||||
}
|
||||
|
||||
if (discardButtonEnabled) {
|
||||
|
@ -181,18 +181,18 @@ class PodManagementActivity : NoSplashAppCompatActivity() {
|
|||
if (podStateManager.isPodActivationCompleted) {
|
||||
if (commandQueue.isCustomCommandInQueue(CommandReadPulseLog::class.java)) {
|
||||
binding.buttonPulseLog.isEnabled = false
|
||||
binding.buttonPulseLog.setText(R.string.omnipod_pod_management_button_reading_pulse_log)
|
||||
binding.buttonPulseLog.setText(R.string.omnipod_eros_pod_management_button_reading_pulse_log)
|
||||
} else {
|
||||
binding.buttonPulseLog.isEnabled = true
|
||||
binding.buttonPulseLog.setText(R.string.omnipod_pod_management_button_read_pulse_log)
|
||||
binding.buttonPulseLog.setText(R.string.omnipod_eros_pod_management_button_read_pulse_log)
|
||||
}
|
||||
} else {
|
||||
binding.buttonPulseLog.isEnabled = false
|
||||
binding.buttonPulseLog.setText(R.string.omnipod_pod_management_button_read_pulse_log)
|
||||
binding.buttonPulseLog.setText(R.string.omnipod_eros_pod_management_button_read_pulse_log)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
binding.buttonPlayTestBeep.setText(R.string.omnipod_pod_management_button_play_test_beep)
|
||||
binding.buttonPlayTestBeep.setText(R.string.omnipod_common_pod_management_button_play_test_beep)
|
||||
binding.buttonActivatePod.isEnabled = false
|
||||
binding.buttonDeactivatePod.isEnabled = false
|
||||
binding.buttonPlayTestBeep.isEnabled = false
|
||||
|
@ -202,7 +202,7 @@ class PodManagementActivity : NoSplashAppCompatActivity() {
|
|||
}
|
||||
if (pulseLogButtonEnabled) {
|
||||
binding.buttonPulseLog.isEnabled = false
|
||||
binding.buttonPulseLog.setText(R.string.omnipod_pod_management_button_read_pulse_log)
|
||||
binding.buttonPulseLog.setText(R.string.omnipod_eros_pod_management_button_read_pulse_log)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -221,8 +221,8 @@ class PodManagementActivity : NoSplashAppCompatActivity() {
|
|||
private fun displayNotConfiguredDialog() {
|
||||
context.let {
|
||||
UIRunnable {
|
||||
OKDialog.show(it, resourceHelper.gs(R.string.omnipod_warning),
|
||||
resourceHelper.gs(R.string.omnipod_error_operation_not_possible_no_configuration), null)
|
||||
OKDialog.show(it, resourceHelper.gs(R.string.omnipod_common_warning),
|
||||
resourceHelper.gs(R.string.omnipod_eros_error_operation_not_possible_no_configuration), null)
|
||||
}.run()
|
||||
}
|
||||
}
|
|
@ -22,6 +22,10 @@ import info.nightscout.androidaps.plugins.pump.common.events.EventRileyLinkDevic
|
|||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLinkServiceState
|
||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLinkTargetDevice
|
||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.RileyLinkServiceData
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.queue.command.CommandAcknowledgeAlerts
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.queue.command.CommandHandleTimeChange
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.queue.command.CommandResumeDelivery
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.queue.command.CommandSuspendDelivery
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.OmnipodErosPumpPlugin
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.R
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.databinding.OmnipodOverviewBinding
|
||||
|
@ -31,12 +35,8 @@ import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.Po
|
|||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.manager.PodStateManager
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.util.TimeUtil
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.event.EventOmnipodPumpValuesChanged
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.manager.AapsOmnipodManager
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.queue.command.CommandAcknowledgeAlerts
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.manager.AapsOmnipodErosManager
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.queue.command.CommandGetPodStatus
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.queue.command.CommandHandleTimeChange
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.queue.command.CommandResumeDelivery
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.queue.command.CommandSuspendDelivery
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.util.AapsOmnipodUtil
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.util.OmnipodAlertUtil
|
||||
import info.nightscout.androidaps.queue.Callback
|
||||
|
@ -58,7 +58,7 @@ import java.util.*
|
|||
import javax.inject.Inject
|
||||
import kotlin.collections.ArrayList
|
||||
|
||||
class OmnipodOverviewFragment : DaggerFragment() {
|
||||
class OmnipodErosOverviewFragment : DaggerFragment() {
|
||||
companion object {
|
||||
|
||||
private const val REFRESH_INTERVAL_MILLIS = 15 * 1000L // 15 seconds
|
||||
|
@ -77,7 +77,7 @@ class OmnipodOverviewFragment : DaggerFragment() {
|
|||
@Inject lateinit var omnipodAlertUtil: OmnipodAlertUtil
|
||||
@Inject lateinit var rileyLinkServiceData: RileyLinkServiceData
|
||||
@Inject lateinit var dateUtil: DateUtil
|
||||
@Inject lateinit var omnipodManager: AapsOmnipodManager
|
||||
@Inject lateinit var omnipodManager: AapsOmnipodErosManager
|
||||
@Inject lateinit var protectionCheck: ProtectionCheck
|
||||
@Inject lateinit var aapsSchedulers: AapsSchedulers
|
||||
|
||||
|
@ -111,7 +111,7 @@ class OmnipodOverviewFragment : DaggerFragment() {
|
|||
context?.let { context ->
|
||||
protectionCheck.queryProtection(
|
||||
activity, ProtectionCheck.Protection.PREFERENCES,
|
||||
UIRunnable { startActivity(Intent(context, PodManagementActivity::class.java)) }
|
||||
UIRunnable { startActivity(Intent(context, ErosPodManagementActivity::class.java)) }
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -123,35 +123,35 @@ class OmnipodOverviewFragment : DaggerFragment() {
|
|||
binding.buttonResumeDelivery.setOnClickListener {
|
||||
disablePodActionButtons()
|
||||
commandQueue.customCommand(CommandResumeDelivery(),
|
||||
DisplayResultDialogCallback(resourceHelper.gs(R.string.omnipod_error_failed_to_resume_delivery), true).messageOnSuccess(resourceHelper.gs(R.string.omnipod_confirmation_delivery_resumed)))
|
||||
DisplayResultDialogCallback(resourceHelper.gs(R.string.omnipod_common_error_failed_to_resume_delivery), true).messageOnSuccess(resourceHelper.gs(R.string.omnipod_common_confirmation_delivery_resumed)))
|
||||
}
|
||||
|
||||
binding.buttonRefreshStatus.setOnClickListener {
|
||||
disablePodActionButtons()
|
||||
commandQueue.customCommand(CommandGetPodStatus(),
|
||||
DisplayResultDialogCallback(resourceHelper.gs(R.string.omnipod_error_failed_to_refresh_status), false))
|
||||
DisplayResultDialogCallback(resourceHelper.gs(R.string.omnipod_common_error_failed_to_refresh_status), false))
|
||||
}
|
||||
|
||||
binding.buttonAcknowledgeActiveAlerts.setOnClickListener {
|
||||
disablePodActionButtons()
|
||||
commandQueue.customCommand(CommandAcknowledgeAlerts(),
|
||||
DisplayResultDialogCallback(resourceHelper.gs(R.string.omnipod_error_failed_to_acknowledge_alerts), false)
|
||||
.messageOnSuccess(resourceHelper.gs(R.string.omnipod_confirmation_acknowledged_alerts))
|
||||
DisplayResultDialogCallback(resourceHelper.gs(R.string.omnipod_common_error_failed_to_acknowledge_alerts), false)
|
||||
.messageOnSuccess(resourceHelper.gs(R.string.omnipod_common_confirmation_acknowledged_alerts))
|
||||
.actionOnSuccess { rxBus.send(EventDismissNotification(Notification.OMNIPOD_POD_ALERTS)) })
|
||||
}
|
||||
|
||||
binding.buttonSuspendDelivery.setOnClickListener {
|
||||
disablePodActionButtons()
|
||||
commandQueue.customCommand(CommandSuspendDelivery(),
|
||||
DisplayResultDialogCallback(resourceHelper.gs(R.string.omnipod_error_failed_to_suspend_delivery), true)
|
||||
.messageOnSuccess(resourceHelper.gs(R.string.omnipod_confirmation_suspended_delivery)))
|
||||
DisplayResultDialogCallback(resourceHelper.gs(R.string.omnipod_common_error_failed_to_suspend_delivery), true)
|
||||
.messageOnSuccess(resourceHelper.gs(R.string.omnipod_common_confirmation_suspended_delivery)))
|
||||
}
|
||||
|
||||
binding.buttonSetTime.setOnClickListener {
|
||||
disablePodActionButtons()
|
||||
commandQueue.customCommand(CommandHandleTimeChange(true),
|
||||
DisplayResultDialogCallback(resourceHelper.gs(R.string.omnipod_error_failed_to_set_time), true)
|
||||
.messageOnSuccess(resourceHelper.gs(R.string.omnipod_confirmation_time_on_pod_updated)))
|
||||
DisplayResultDialogCallback(resourceHelper.gs(R.string.omnipod_common_error_failed_to_set_time), true)
|
||||
.messageOnSuccess(resourceHelper.gs(R.string.omnipod_common_confirmation_time_on_pod_updated)))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -260,7 +260,7 @@ class OmnipodOverviewFragment : DaggerFragment() {
|
|||
binding.podAddress.text = podStateManager.address.toString()
|
||||
binding.podLot.text = podStateManager.lot.toString()
|
||||
binding.podTid.text = podStateManager.tid.toString()
|
||||
binding.firmwareVersion.text = resourceHelper.gs(R.string.omnipod_firmware_version_value, podStateManager.pmVersion.toString(), podStateManager.piVersion.toString())
|
||||
binding.firmwareVersion.text = resourceHelper.gs(R.string.omnipod_eros_overview_firmware_version_value, podStateManager.pmVersion.toString(), podStateManager.piVersion.toString())
|
||||
|
||||
binding.timeOnPod.text = readableZonedTime(podStateManager.time)
|
||||
binding.timeOnPod.setTextColor(if (podStateManager.timeDeviatesMoreThan(OmnipodConstants.TIME_DEVIATION_THRESHOLD)) {
|
||||
|
@ -283,7 +283,7 @@ class OmnipodOverviewFragment : DaggerFragment() {
|
|||
|
||||
if (podStateManager.isPodFaulted) {
|
||||
val faultEventCode = podStateManager.faultEventCode
|
||||
errors.add(resourceHelper.gs(R.string.omnipod_pod_status_pod_fault_description, faultEventCode.value, faultEventCode.name))
|
||||
errors.add(resourceHelper.gs(R.string.omnipod_common_pod_status_pod_fault_description, faultEventCode.value, faultEventCode.name))
|
||||
}
|
||||
|
||||
// base basal rate
|
||||
|
@ -295,20 +295,20 @@ class OmnipodOverviewFragment : DaggerFragment() {
|
|||
|
||||
// total delivered
|
||||
binding.totalDelivered.text = if (podStateManager.isPodActivationCompleted && podStateManager.totalInsulinDelivered != null) {
|
||||
resourceHelper.gs(R.string.omnipod_overview_total_delivered_value, podStateManager.totalInsulinDelivered - OmnipodConstants.POD_SETUP_UNITS)
|
||||
resourceHelper.gs(R.string.omnipod_common_overview_total_delivered_value, podStateManager.totalInsulinDelivered - OmnipodConstants.POD_SETUP_UNITS)
|
||||
} else {
|
||||
PLACEHOLDER
|
||||
}
|
||||
|
||||
// reservoir
|
||||
if (podStateManager.reservoirLevel == null) {
|
||||
binding.reservoir.text = resourceHelper.gs(R.string.omnipod_overview_reservoir_value_over50)
|
||||
binding.reservoir.text = resourceHelper.gs(R.string.omnipod_common_overview_reservoir_value_over50)
|
||||
binding.reservoir.setTextColor(Color.WHITE)
|
||||
} else {
|
||||
val lowReservoirThreshold = (omnipodAlertUtil.lowReservoirAlertUnits
|
||||
?: OmnipodConstants.DEFAULT_MAX_RESERVOIR_ALERT_THRESHOLD).toDouble()
|
||||
|
||||
binding.reservoir.text = resourceHelper.gs(R.string.omnipod_overview_reservoir_value, podStateManager.reservoirLevel)
|
||||
binding.reservoir.text = resourceHelper.gs(R.string.omnipod_common_overview_reservoir_value, podStateManager.reservoirLevel)
|
||||
binding.reservoir.setTextColor(if (podStateManager.reservoirLevel < lowReservoirThreshold) {
|
||||
Color.RED
|
||||
} else {
|
||||
|
@ -354,34 +354,34 @@ class OmnipodOverviewFragment : DaggerFragment() {
|
|||
|
||||
private fun updatePodStatus() {
|
||||
binding.podStatus.text = if (!podStateManager.hasPodState()) {
|
||||
resourceHelper.gs(R.string.omnipod_pod_status_no_active_pod)
|
||||
resourceHelper.gs(R.string.omnipod_common_pod_status_no_active_pod)
|
||||
} else if (!podStateManager.isPodActivationCompleted) {
|
||||
if (!podStateManager.isPodInitialized) {
|
||||
resourceHelper.gs(R.string.omnipod_pod_status_waiting_for_activation)
|
||||
resourceHelper.gs(R.string.omnipod_common_pod_status_waiting_for_activation)
|
||||
} else {
|
||||
if (podStateManager.activationProgress.isBefore(ActivationProgress.PRIMING_COMPLETED)) {
|
||||
resourceHelper.gs(R.string.omnipod_pod_status_waiting_for_activation)
|
||||
resourceHelper.gs(R.string.omnipod_common_pod_status_waiting_for_activation)
|
||||
} else {
|
||||
resourceHelper.gs(R.string.omnipod_pod_status_waiting_for_cannula_insertion)
|
||||
resourceHelper.gs(R.string.omnipod_common_pod_status_waiting_for_cannula_insertion)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (podStateManager.podProgressStatus.isRunning) {
|
||||
var status = if (podStateManager.isSuspended) {
|
||||
resourceHelper.gs(R.string.omnipod_pod_status_suspended)
|
||||
resourceHelper.gs(R.string.omnipod_common_pod_status_suspended)
|
||||
} else {
|
||||
resourceHelper.gs(R.string.omnipod_pod_status_running)
|
||||
resourceHelper.gs(R.string.omnipod_common_pod_status_running)
|
||||
}
|
||||
|
||||
if (!podStateManager.isBasalCertain) {
|
||||
status += " (" + resourceHelper.gs(R.string.omnipod_uncertain) + ")"
|
||||
status += " (" + resourceHelper.gs(R.string.omnipod_eros_uncertain) + ")"
|
||||
}
|
||||
|
||||
status
|
||||
} else if (podStateManager.podProgressStatus == PodProgressStatus.FAULT_EVENT_OCCURRED) {
|
||||
resourceHelper.gs(R.string.omnipod_pod_status_pod_fault)
|
||||
resourceHelper.gs(R.string.omnipod_common_pod_status_pod_fault)
|
||||
} else if (podStateManager.podProgressStatus == PodProgressStatus.INACTIVE) {
|
||||
resourceHelper.gs(R.string.omnipod_pod_status_inactive)
|
||||
resourceHelper.gs(R.string.omnipod_common_pod_status_inactive)
|
||||
} else {
|
||||
podStateManager.podProgressStatus.toString()
|
||||
}
|
||||
|
@ -397,14 +397,14 @@ class OmnipodOverviewFragment : DaggerFragment() {
|
|||
|
||||
private fun updateLastBolus() {
|
||||
if (podStateManager.isPodActivationCompleted && podStateManager.hasLastBolus()) {
|
||||
var text = resourceHelper.gs(R.string.omnipod_overview_last_bolus_value, omnipodErosPumpPlugin.model().determineCorrectBolusSize(podStateManager.lastBolusAmount), resourceHelper.gs(R.string.insulin_unit_shortname), readableDuration(podStateManager.lastBolusStartTime))
|
||||
var text = resourceHelper.gs(R.string.omnipod_common_overview_last_bolus_value, omnipodErosPumpPlugin.model().determineCorrectBolusSize(podStateManager.lastBolusAmount), resourceHelper.gs(R.string.insulin_unit_shortname), readableDuration(podStateManager.lastBolusStartTime))
|
||||
val textColor: Int
|
||||
|
||||
if (podStateManager.isLastBolusCertain) {
|
||||
textColor = Color.WHITE
|
||||
} else {
|
||||
textColor = Color.RED
|
||||
text += " (" + resourceHelper.gs(R.string.omnipod_uncertain) + ")"
|
||||
text += " (" + resourceHelper.gs(R.string.omnipod_eros_uncertain) + ")"
|
||||
}
|
||||
|
||||
binding.lastBolus.text = text
|
||||
|
@ -432,12 +432,12 @@ class OmnipodOverviewFragment : DaggerFragment() {
|
|||
|
||||
var text: String
|
||||
val textColor: Int
|
||||
text = resourceHelper.gs(R.string.omnipod_overview_temp_basal_value, amount, dateUtil.timeString(startTime.millis), minutesRunning, duration.standardMinutes)
|
||||
text = resourceHelper.gs(R.string.omnipod_common_overview_temp_basal_value, amount, dateUtil.timeString(startTime.millis), minutesRunning, duration.standardMinutes)
|
||||
if (podStateManager.isTempBasalCertain) {
|
||||
textColor = Color.WHITE
|
||||
} else {
|
||||
textColor = Color.RED
|
||||
text += " (" + resourceHelper.gs(R.string.omnipod_uncertain) + ")"
|
||||
text += " (" + resourceHelper.gs(R.string.omnipod_eros_uncertain) + ")"
|
||||
}
|
||||
|
||||
binding.tempBasal.text = text
|
||||
|
@ -451,7 +451,7 @@ class OmnipodOverviewFragment : DaggerFragment() {
|
|||
textColor = Color.WHITE
|
||||
} else {
|
||||
textColor = Color.RED
|
||||
text += " (" + resourceHelper.gs(R.string.omnipod_uncertain) + ")"
|
||||
text += " (" + resourceHelper.gs(R.string.omnipod_eros_uncertain) + ")"
|
||||
}
|
||||
|
||||
binding.tempBasal.text = text
|
||||
|
@ -529,8 +529,8 @@ class OmnipodOverviewFragment : DaggerFragment() {
|
|||
private fun displayNotConfiguredDialog() {
|
||||
context?.let {
|
||||
UIRunnable {
|
||||
OKDialog.show(it, resourceHelper.gs(R.string.omnipod_warning),
|
||||
resourceHelper.gs(R.string.omnipod_error_operation_not_possible_no_configuration), null)
|
||||
OKDialog.show(it, resourceHelper.gs(R.string.omnipod_common_warning),
|
||||
resourceHelper.gs(R.string.omnipod_eros_error_operation_not_possible_no_configuration), null)
|
||||
}.run()
|
||||
}
|
||||
}
|
||||
|
@ -564,7 +564,7 @@ class OmnipodOverviewFragment : DaggerFragment() {
|
|||
val isDaylightTime = timeZone.inDaylightTime(timeAsJavaData)
|
||||
val locale = resources.configuration.locales.get(0)
|
||||
val timeZoneDisplayName = timeZone.getDisplayName(isDaylightTime, TimeZone.SHORT, locale) + " " + timeZone.getDisplayName(isDaylightTime, TimeZone.LONG, locale)
|
||||
return resourceHelper.gs(R.string.omnipod_time_with_timezone, dateUtil.dateAndTimeString(timeAsJavaData), timeZoneDisplayName)
|
||||
return resourceHelper.gs(R.string.omnipod_common_time_with_timezone, dateUtil.dateAndTimeString(timeAsJavaData), timeZoneDisplayName)
|
||||
}
|
||||
|
||||
private fun readableDuration(dateTime: DateTime): String {
|
||||
|
@ -574,32 +574,32 @@ class OmnipodOverviewFragment : DaggerFragment() {
|
|||
val seconds = duration.standardSeconds.toInt()
|
||||
when {
|
||||
seconds < 10 -> {
|
||||
return resourceHelper.gs(R.string.omnipod_moments_ago)
|
||||
return resourceHelper.gs(R.string.omnipod_common_moments_ago)
|
||||
}
|
||||
|
||||
seconds < 60 -> {
|
||||
return resourceHelper.gs(R.string.omnipod_less_than_a_minute_ago)
|
||||
return resourceHelper.gs(R.string.omnipod_common_less_than_a_minute_ago)
|
||||
}
|
||||
|
||||
seconds < 60 * 60 -> { // < 1 hour
|
||||
return resourceHelper.gs(R.string.omnipod_time_ago, resourceHelper.gq(R.plurals.omnipod_minutes, minutes, minutes))
|
||||
return resourceHelper.gs(R.string.omnipod_common_time_ago, resourceHelper.gq(R.plurals.omnipod_common_minutes, minutes, minutes))
|
||||
}
|
||||
|
||||
seconds < 24 * 60 * 60 -> { // < 1 day
|
||||
val minutesLeft = minutes % 60
|
||||
if (minutesLeft > 0)
|
||||
return resourceHelper.gs(R.string.omnipod_time_ago,
|
||||
resourceHelper.gs(R.string.omnipod_composite_time, resourceHelper.gq(R.plurals.omnipod_hours, hours, hours), resourceHelper.gq(R.plurals.omnipod_minutes, minutesLeft, minutesLeft)))
|
||||
return resourceHelper.gs(R.string.omnipod_time_ago, resourceHelper.gq(R.plurals.omnipod_hours, hours, hours))
|
||||
return resourceHelper.gs(R.string.omnipod_common_time_ago,
|
||||
resourceHelper.gs(R.string.omnipod_common_composite_time, resourceHelper.gq(R.plurals.omnipod_common_hours, hours, hours), resourceHelper.gq(R.plurals.omnipod_common_minutes, minutesLeft, minutesLeft)))
|
||||
return resourceHelper.gs(R.string.omnipod_common_time_ago, resourceHelper.gq(R.plurals.omnipod_common_hours, hours, hours))
|
||||
}
|
||||
|
||||
else -> {
|
||||
val days = hours / 24
|
||||
val hoursLeft = hours % 24
|
||||
if (hoursLeft > 0)
|
||||
return resourceHelper.gs(R.string.omnipod_time_ago,
|
||||
resourceHelper.gs(R.string.omnipod_composite_time, resourceHelper.gq(R.plurals.omnipod_days, days, days), resourceHelper.gq(R.plurals.omnipod_hours, hoursLeft, hoursLeft)))
|
||||
return resourceHelper.gs(R.string.omnipod_time_ago, resourceHelper.gq(R.plurals.omnipod_days, days, days))
|
||||
return resourceHelper.gs(R.string.omnipod_common_time_ago,
|
||||
resourceHelper.gs(R.string.omnipod_common_composite_time, resourceHelper.gq(R.plurals.omnipod_common_days, days, days), resourceHelper.gq(R.plurals.omnipod_common_hours, hoursLeft, hoursLeft)))
|
||||
return resourceHelper.gs(R.string.omnipod_common_time_ago, resourceHelper.gq(R.plurals.omnipod_common_days, days, days))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -622,11 +622,11 @@ class OmnipodOverviewFragment : DaggerFragment() {
|
|||
if (result.success) {
|
||||
val messageOnSuccess = this.messageOnSuccess
|
||||
if (messageOnSuccess != null) {
|
||||
displayOkDialog(resourceHelper.gs(R.string.omnipod_confirmation), messageOnSuccess)
|
||||
displayOkDialog(resourceHelper.gs(R.string.omnipod_common_confirmation), messageOnSuccess)
|
||||
}
|
||||
actionOnSuccess?.run()
|
||||
} else {
|
||||
displayErrorDialog(resourceHelper.gs(R.string.omnipod_warning), resourceHelper.gs(R.string.omnipod_two_strings_concatenated_by_colon, errorMessagePrefix, result.comment), withSoundOnError)
|
||||
displayErrorDialog(resourceHelper.gs(R.string.omnipod_common_warning), resourceHelper.gs(R.string.omnipod_common_two_strings_concatenated_by_colon, errorMessagePrefix, result.comment), withSoundOnError)
|
||||
}
|
||||
}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.activation.fragment
|
||||
|
||||
import androidx.annotation.IdRes
|
||||
import androidx.annotation.StringRes
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.R
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.common.fragment.InfoFragmentBase
|
||||
|
||||
class PodActivatedInfoFragment : InfoFragmentBase() {
|
||||
|
||||
@StringRes
|
||||
override fun getTitleId(): Int = R.string.omnipod_pod_activation_wizard_pod_activated_title
|
||||
|
||||
@StringRes
|
||||
override fun getTextId(): Int = R.string.omnipod_pod_activation_wizard_pod_activated_text
|
||||
|
||||
@IdRes
|
||||
override fun getNextPageActionId(): Int? = null
|
||||
|
||||
override fun getIndex(): Int = 5
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.deactivation.fragment
|
||||
|
||||
import androidx.annotation.IdRes
|
||||
import androidx.annotation.StringRes
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.R
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.common.fragment.InfoFragmentBase
|
||||
|
||||
class DeactivatePodInfoFragment : InfoFragmentBase() {
|
||||
|
||||
@StringRes
|
||||
override fun getTitleId(): Int = R.string.omnipod_pod_deactivation_wizard_deactivate_pod_title
|
||||
|
||||
@StringRes
|
||||
override fun getTextId(): Int = R.string.omnipod_pod_deactivation_wizard_deactivate_pod_text
|
||||
|
||||
@IdRes
|
||||
override fun getNextPageActionId(): Int = R.id.action_deactivatePodInfoFragment_to_deactivatePodActionFragment
|
||||
|
||||
override fun getIndex(): Int = 1
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.deactivation.fragment
|
||||
|
||||
import androidx.annotation.IdRes
|
||||
import androidx.annotation.StringRes
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.R
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.common.fragment.InfoFragmentBase
|
||||
|
||||
class PodDeactivatedInfoFragment : InfoFragmentBase() {
|
||||
|
||||
@StringRes
|
||||
override fun getTitleId(): Int = R.string.omnipod_pod_deactivation_wizard_pod_deactivated_title
|
||||
|
||||
@StringRes
|
||||
override fun getTextId(): Int = R.string.omnipod_pod_deactivation_wizard_pod_deactivated_text
|
||||
|
||||
@IdRes
|
||||
override fun getNextPageActionId(): Int? = null
|
||||
|
||||
override fun getIndex(): Int = 3
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.deactivation.fragment
|
||||
|
||||
import androidx.annotation.IdRes
|
||||
import androidx.annotation.StringRes
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.R
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.ui.wizard.common.fragment.InfoFragmentBase
|
||||
|
||||
class PodDiscardedInfoFragment : InfoFragmentBase() {
|
||||
|
||||
@StringRes
|
||||
override fun getTitleId(): Int = R.string.omnipod_pod_deactivation_wizard_pod_discarded_title
|
||||
|
||||
@StringRes
|
||||
override fun getTextId(): Int = R.string.omnipod_pod_deactivation_wizard_pod_discarded_text
|
||||
|
||||
@IdRes
|
||||
override fun getNextPageActionId(): Int? = null
|
||||
|
||||
override fun getIndex(): Int = 3
|
||||
}
|
|
@ -68,21 +68,21 @@ public class AapsOmnipodUtil {
|
|||
|
||||
private String translateAlertType(AlertType alertType) {
|
||||
if (alertType == null) {
|
||||
return resourceHelper.gs(R.string.omnipod_alert_unknown_alert);
|
||||
return resourceHelper.gs(R.string.omnipod_common_alert_unknown_alert);
|
||||
}
|
||||
switch (alertType) {
|
||||
case FINISH_PAIRING_REMINDER:
|
||||
return resourceHelper.gs(R.string.omnipod_alert_finish_pairing_reminder);
|
||||
return resourceHelper.gs(R.string.omnipod_common_alert_finish_pairing_reminder);
|
||||
case FINISH_SETUP_REMINDER:
|
||||
return resourceHelper.gs(R.string.omnipod_alert_finish_setup_reminder_reminder);
|
||||
return resourceHelper.gs(R.string.omnipod_common_alert_finish_setup_reminder_reminder);
|
||||
case EXPIRATION_ALERT:
|
||||
return resourceHelper.gs(R.string.omnipod_alert_expiration);
|
||||
return resourceHelper.gs(R.string.omnipod_common_alert_expiration);
|
||||
case EXPIRATION_ADVISORY_ALERT:
|
||||
return resourceHelper.gs(R.string.omnipod_alert_expiration_advisory);
|
||||
return resourceHelper.gs(R.string.omnipod_common_alert_expiration_advisory);
|
||||
case SHUTDOWN_IMMINENT_ALARM:
|
||||
return resourceHelper.gs(R.string.omnipod_alert_shutdown_imminent);
|
||||
return resourceHelper.gs(R.string.omnipod_common_alert_shutdown_imminent);
|
||||
case LOW_RESERVOIR_ALERT:
|
||||
return resourceHelper.gs(R.string.omnipod_alert_low_reservoir);
|
||||
return resourceHelper.gs(R.string.omnipod_common_alert_low_reservoir);
|
||||
default:
|
||||
return alertType.name();
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ import org.joda.time.Duration;
|
|||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.definition.OmnipodStorageKeys;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.definition.OmnipodErosStorageKeys;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.OmnipodConstants;
|
||||
import info.nightscout.androidaps.utils.sharedPreferences.SP;
|
||||
|
||||
|
@ -19,12 +19,12 @@ public class OmnipodAlertUtil {
|
|||
}
|
||||
|
||||
public Duration getExpirationReminderTimeBeforeShutdown() {
|
||||
boolean expirationAlertEnabled = sp.getBoolean(OmnipodStorageKeys.Preferences.EXPIRATION_REMINDER_ENABLED, true);
|
||||
return expirationAlertEnabled ? Duration.standardHours(sp.getInt(OmnipodStorageKeys.Preferences.EXPIRATION_REMINDER_HOURS_BEFORE_SHUTDOWN, 9)) : null;
|
||||
boolean expirationAlertEnabled = sp.getBoolean(OmnipodErosStorageKeys.Preferences.EXPIRATION_REMINDER_ENABLED, true);
|
||||
return expirationAlertEnabled ? Duration.standardHours(sp.getInt(OmnipodErosStorageKeys.Preferences.EXPIRATION_REMINDER_HOURS_BEFORE_SHUTDOWN, 9)) : null;
|
||||
}
|
||||
|
||||
public Integer getLowReservoirAlertUnits() {
|
||||
boolean lowReservoirAlertEnabled = sp.getBoolean(OmnipodStorageKeys.Preferences.LOW_RESERVOIR_ALERT_ENABLED, true);
|
||||
return lowReservoirAlertEnabled ? sp.getInt(OmnipodStorageKeys.Preferences.LOW_RESERVOIR_ALERT_UNITS, OmnipodConstants.DEFAULT_MAX_RESERVOIR_ALERT_THRESHOLD) : null;
|
||||
boolean lowReservoirAlertEnabled = sp.getBoolean(OmnipodErosStorageKeys.Preferences.LOW_RESERVOIR_ALERT_ENABLED, true);
|
||||
return lowReservoirAlertEnabled ? sp.getInt(OmnipodErosStorageKeys.Preferences.LOW_RESERVOIR_ALERT_UNITS, OmnipodConstants.DEFAULT_MAX_RESERVOIR_ALERT_THRESHOLD) : null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:text="@string/omnipod_history_type"
|
||||
android:text="@string/omnipod_eros_history_type"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||
|
||||
<Spinner
|
||||
|
@ -34,7 +34,7 @@
|
|||
android:layout_weight="1"
|
||||
android:background="@drawable/pillborder"
|
||||
android:gravity="center_horizontal"
|
||||
android:text="@string/omnipod_history_title" />
|
||||
android:text="@string/omnipod_eros_history_title" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
|
|
@ -11,21 +11,21 @@
|
|||
android:id="@+id/omnipod_history_time"
|
||||
android:layout_width="88dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@string/omnipod_history_item_date"
|
||||
android:text="@string/omnipod_eros_history_item_date"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/omnipod_history_source"
|
||||
android:layout_width="132dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@string/omnipod_history_item_source"
|
||||
android:text="@string/omnipod_eros_history_item_source"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/omnipod_history_description"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@string/omnipod_history_item_description"
|
||||
android:text="@string/omnipod_eros_history_item_description"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
|
@ -5,7 +5,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
tools:context=".ui.PodManagementActivity">
|
||||
tools:context=".ui.ErosPodManagementActivity">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
|
@ -15,7 +15,7 @@
|
|||
android:layout_marginRight="10dp"
|
||||
android:layout_weight="0.5"
|
||||
android:gravity="center"
|
||||
android:text="@string/omnipod_pod_management_title"
|
||||
android:text="@string/omnipod_common_pod_management_title"
|
||||
android:textAlignment="center"
|
||||
android:textSize="12pt"
|
||||
android:textStyle="bold" />
|
||||
|
@ -42,7 +42,7 @@
|
|||
android:layout_marginRight="10dp"
|
||||
android:layout_weight="0.5"
|
||||
android:gravity="center"
|
||||
android:text="@string/omnipod_pod_management_waiting_for_rileylink_connection"
|
||||
android:text="@string/omnipod_eros_pod_management_waiting_for_riley_link_connection"
|
||||
android:textAlignment="center"
|
||||
android:textSize="8pt" />
|
||||
</LinearLayout>
|
||||
|
@ -53,7 +53,7 @@
|
|||
android:layout_marginTop="15dp"
|
||||
android:paddingStart="15dp"
|
||||
android:paddingEnd="15dp"
|
||||
android:text="@string/omnipod_pod_management_heading_actions" />
|
||||
android:text="@string/omnipod_common_pod_management_heading_actions" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -70,7 +70,7 @@
|
|||
android:layout_marginEnd="4dp"
|
||||
android:layout_weight="0.5"
|
||||
android:drawableTop="@drawable/ic_pod_management_activate_pod"
|
||||
android:text="@string/omnipod_pod_management_button_activate_pod"
|
||||
android:text="@string/omnipod_common_pod_management_button_activate_pod"
|
||||
android:textAllCaps="false" />
|
||||
|
||||
|
||||
|
@ -82,7 +82,7 @@
|
|||
android:layout_marginEnd="4dp"
|
||||
android:layout_weight="0.5"
|
||||
android:drawableTop="@drawable/ic_pod_management_deactivate_pod"
|
||||
android:text="@string/omnipod_pod_management_button_deactivate_pod"
|
||||
android:text="@string/omnipod_common_pod_management_button_deactivate_pod"
|
||||
android:textAllCaps="false" />
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -102,7 +102,7 @@
|
|||
android:layout_marginEnd="4dp"
|
||||
android:layout_weight="0.5"
|
||||
android:drawableTop="@drawable/ic_pod_management_play_test_beep"
|
||||
android:text="@string/omnipod_pod_management_button_play_test_beep"
|
||||
android:text="@string/omnipod_common_pod_management_button_play_test_beep"
|
||||
android:textAllCaps="false" />
|
||||
|
||||
|
||||
|
@ -114,7 +114,7 @@
|
|||
android:layout_marginEnd="4dp"
|
||||
android:layout_weight="0.5"
|
||||
android:drawableTop="@drawable/ic_pod_management_discard_pod"
|
||||
android:text="@string/omnipod_pod_management_button_discard_pod"
|
||||
android:text="@string/omnipod_common_pod_management_button_discard_pod"
|
||||
android:textAllCaps="false"
|
||||
android:visibility="gone" />
|
||||
|
||||
|
@ -126,7 +126,7 @@
|
|||
android:layout_marginTop="15dp"
|
||||
android:paddingStart="15dp"
|
||||
android:paddingEnd="15dp"
|
||||
android:text="@string/omnipod_pod_management_heading_tools" />
|
||||
android:text="@string/omnipod_common_pod_management_heading_tools" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -143,7 +143,7 @@
|
|||
android:layout_marginEnd="4dp"
|
||||
android:layout_weight="0.5"
|
||||
android:drawableTop="@drawable/ic_pod_management_pod_history"
|
||||
android:text="@string/omnipod_pod_management_button_pod_history"
|
||||
android:text="@string/omnipod_common_pod_management_button_pod_history"
|
||||
android:textAllCaps="false" />
|
||||
|
||||
<info.nightscout.androidaps.utils.ui.SingleClickButton
|
||||
|
@ -154,7 +154,7 @@
|
|||
android:layout_marginEnd="4dp"
|
||||
android:layout_weight="0.5"
|
||||
android:drawableTop="@drawable/ic_pod_management_rl_stats"
|
||||
android:text="@string/omnipod_pod_management_button_riley_link_stats"
|
||||
android:text="@string/omnipod_eros_pod_management_button_riley_link_stats"
|
||||
android:textAllCaps="false"
|
||||
android:visibility="gone" />
|
||||
|
||||
|
@ -175,7 +175,7 @@
|
|||
android:layout_marginEnd="4dp"
|
||||
android:layout_weight="0.5"
|
||||
android:drawableTop="@drawable/ic_pod_management_pulse_log"
|
||||
android:text="@string/omnipod_pod_management_button_read_pulse_log"
|
||||
android:text="@string/omnipod_eros_pod_management_button_read_pulse_log"
|
||||
android:textAllCaps="false"
|
||||
android:visibility="gone" />
|
||||
|
||||
|
@ -187,7 +187,7 @@
|
|||
android:layout_marginEnd="4dp"
|
||||
android:layout_weight="0.5"
|
||||
android:drawableTop="@drawable/ic_pod_activity_reset_rileylink_config"
|
||||
android:text="@string/omnipod_pod_management_button_reset_riley_link_config"
|
||||
android:text="@string/omnipod_eros_pod_management_button_reset_riley_link_config"
|
||||
android:textAllCaps="false" />
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
@ -1,290 +1,98 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Omnipod Eros - Description -->
|
||||
<string name="omnipod_eros_name" translatable="false">Omnipod</string>
|
||||
<string name="omnipod_eros_name_short" translatable="false">Pod</string>
|
||||
<string name="omnipod_eros_pump_description">Pump integration for Omnipod Eros (the older model with a transparent needle cap). Requires a RileyLink device with at least firmware version 2.0.</string>
|
||||
<string name="omnipod_eros_frequency" translatable="false">Omnipod (433.91 MHz)</string>
|
||||
|
||||
<!-- Omnipod - Keys -->
|
||||
<string name="key_omnipod_pod_state" translatable="false">AAPS.Omnipod.pod_state</string>
|
||||
<string name="key_omnipod_current_bolus" translatable="false">AAPS.Omnipod.current_bolus</string>
|
||||
<string name="key_omnipod_bolus_beeps_enabled" translatable="false">AAPS.Omnipod.bolus_beeps_enabled</string>
|
||||
<string name="key_omnipod_basal_beeps_enabled" translatable="false">AAPS.Omnipod.basal_beeps_enabled</string>
|
||||
<string name="key_omnipod_smb_beeps_enabled" translatable="false">AAPS.Omnipod.smb_beeps_enabled</string>
|
||||
<string name="key_omnipod_tbr_beeps_enabled" translatable="false">AAPS.Omnipod.tbr_beeps_enabled</string>
|
||||
<string name="key_omnipod_suspend_delivery_button_enabled" translatable="false">AAPS.Omnipod.suspend_delivery_button_enabled</string>
|
||||
<string name="key_omnipod_pulse_log_button_enabled" translatable="false">AAPS.Omnipod.pulse_log_button_enabled</string>
|
||||
<string name="key_omnipod_riley_link_stats_button_enabled" translatable="false">AAPS.Omnipod.rileylink_stats_button_enabled</string>
|
||||
<string name="key_omnipod_battery_change_logging_enabled" translatable="false">AAPS.Omnipod.enable_battery_change_logging</string>
|
||||
<string name="key_omnipod_time_change_event_enabled" translatable="false">AAPS.Omnipod.time_change_enabled</string>
|
||||
<string name="key_omnipod_expiration_reminder_enabled" translatable="false">AAPS.Omnipod.expiration_reminder_enabled</string>
|
||||
<string name="key_omnipod_expiration_reminder_hours_before_shutdown" translatable="false">AAPS.Omnipod.expiration_reminder_hours_before_shutdown</string>
|
||||
<string name="key_omnipod_low_reservoir_alert_enabled" translatable="false">AAPS.Omnipod.low_reservoir_alert_enabled</string>
|
||||
<string name="key_omnipod_low_reservoir_alert_units" translatable="false">AAPS.Omnipod.low_reservoir_alert_units</string>
|
||||
<string name="key_omnipod_automatically_acknowledge_alerts_enabled" translatable="false">AAPS.Omnipod.automatically_acknowledge_alerts_enabled</string>
|
||||
<string name="key_omnipod_notification_uncertain_tbr_sound_enabled" translatable="false">AAPS.Omnipod.notification_uncertain_tbr_sound_enabled</string>
|
||||
<string name="key_omnipod_notification_uncertain_smb_sound_enabled" translatable="false">AAPS.Omnipod.notification_uncertain_smb_sound_enabled</string>
|
||||
<string name="key_omnipod_notification_uncertain_bolus_sound_enabled" translatable="false">AAPS.Omnipod.notification_uncertain_bolus_sound_enabled</string>
|
||||
<string name="key_omnipod_tbrs_set" translatable="false">AAPS.Omnipod.tbrs_set</string>
|
||||
<string name="key_omnipod_std_boluses_delivered" translatable="false">AAPS.Omnipod.std_boluses_delivered</string>
|
||||
<string name="key_omnipod_smb_boluses_delivered" translatable="false">AAPS.Omnipod.smb_boluses_delivered</string>
|
||||
<!-- Omnipod Eros - Keys -->
|
||||
<string name="key_omnipod_eros_pod_state" translatable="false">AAPS.Omnipod.pod_state</string>
|
||||
<string name="key_omnipod_eros_current_bolus" translatable="false">AAPS.Omnipod.current_bolus</string>
|
||||
<string name="key_omnipod_eros_pulse_log_button_enabled" translatable="false">AAPS.Omnipod.pulse_log_button_enabled</string>
|
||||
<string name="key_omnipod_eros_riley_link_stats_button_enabled" translatable="false">AAPS.Omnipod.rileylink_stats_button_enabled</string>
|
||||
<string name="key_omnipod_eros_battery_change_logging_enabled" translatable="false">AAPS.Omnipod.enable_battery_change_logging</string>
|
||||
<string name="key_omnipod_eros_notification_uncertain_tbr_sound_enabled" translatable="false">AAPS.Omnipod.notification_uncertain_tbr_sound_enabled</string>
|
||||
<string name="key_omnipod_eros_notification_uncertain_smb_sound_enabled" translatable="false">AAPS.Omnipod.notification_uncertain_smb_sound_enabled</string>
|
||||
<string name="key_omnipod_eros_notification_uncertain_bolus_sound_enabled" translatable="false">AAPS.Omnipod.notification_uncertain_bolus_sound_enabled</string>
|
||||
<string name="key_omnipod_eros_tbrs_set" translatable="false">AAPS.Omnipod.tbrs_set</string>
|
||||
<string name="key_omnipod_eros_std_boluses_delivered" translatable="false">AAPS.Omnipod.std_boluses_delivered</string>
|
||||
<string name="key_omnipod_eros_smb_boluses_delivered" translatable="false">AAPS.Omnipod.smb_boluses_delivered</string>
|
||||
|
||||
<!-- Omnipod - Non translatable -->
|
||||
<string name="omnipod_name" translatable="false">Omnipod</string>
|
||||
<string name="omnipod_name_short" translatable="false">Pod</string>
|
||||
<string name="omnipod_frequency" translatable="false">Omnipod (433.91 MHz)</string>
|
||||
<string name="omnipod_lot" translatable="false">LOT</string>
|
||||
<string name="omnipod_tid" translatable="false">TID</string>
|
||||
<string name="omnipod_firmware_version_value" translatable="false">PM %1$s / PI %2$s</string>
|
||||
<string name="omnipod_time_with_timezone" translatable="false">%1$s (%2$s)</string>
|
||||
<string name="omnipod_two_strings_concatenated_by_colon" translatable="false">%1$s: %2$s</string>
|
||||
<string name="omnipod_overview_last_bolus_value" translatable="false">%1$.2f %2$s (%3$s)</string>
|
||||
<!-- Omnipod Eros - Overview -->
|
||||
<string name="omnipod_eros_overview_firmware_version_value" translatable="false">PM %1$s / PI %2$s</string>
|
||||
|
||||
<!-- Omnipod - Preferences -->
|
||||
<string name="omnipod_config_riley_link_configuration">RileyLink Configuration</string>
|
||||
<string name="omnipod_config_bolus_beeps_enabled">Bolus beeps enabled</string>
|
||||
<string name="omnipod_config_basal_beeps_enabled">Basal beeps enabled</string>
|
||||
<string name="omnipod_config_smb_beeps_enabled">SMB beeps enabled</string>
|
||||
<string name="omnipod_config_tbr_beeps_enabled">TBR beeps enabled</string>
|
||||
<string name="omnipod_config_suspend_delivery_button_enabled">Show Suspend Delivery button in Omnipod tab</string>
|
||||
<string name="omnipod_config_pulse_log_button_enabled">Show Pulse Log button in Pod Management menu</string>
|
||||
<string name="omnipod_config_rileylink_stats_button_enabled">Show RileyLink Stats button in Pod Management menu</string>
|
||||
<string name="omnipod_config_battery_change_logging_enabled">Enable battery change logging in Actions</string>
|
||||
<string name="omnipod_config_time_change_enabled">DST/Time zone detection enabled</string>
|
||||
<string name="omnipod_config_expiration_reminder_enabled">Expiration reminder enabled</string>
|
||||
<string name="omnipod_config_expiration_reminder_hours_before_shutdown">Hours before shutdown</string>
|
||||
<string name="omnipod_config_low_reservoir_alert_enabled">Low reservoir alert enabled</string>
|
||||
<string name="omnipod_config_low_reservoir_alert_units">Number of units</string>
|
||||
<string name="omnipod_config_notification_uncertain_tbr_sound_enabled">Sound for uncertain TBR notifications enabled</string>
|
||||
<string name="omnipod_config_notification_uncertain_smb_sound_enabled">Sound for uncertain SMB notifications enabled</string>
|
||||
<string name="omnipod_config_notification_uncertain_bolus_sound_enabled">Sound for uncertain bolus notifications enabled</string>
|
||||
<string name="omnipod_config_automatically_acknowledge_alerts">Automatically acknowledge Pod alerts</string>
|
||||
<string name="omnipod_preference_category_rileylink">RileyLink</string>
|
||||
<string name="omnipod_preference_category_other">Other</string>
|
||||
<string name="omnipod_preference_category_alerts">Alerts</string>
|
||||
<string name="omnipod_preference_category_confirmation_beeps">Confirmation Beeps</string>
|
||||
<string name="omnipod_preference_category_notifications">Notifications</string>
|
||||
<!-- Omnipod Eros - Preferences -->
|
||||
<string name="omnipod_eros_preferences_riley_link_configuration">RileyLink Configuration</string>
|
||||
<string name="omnipod_eros_preferences_category_notifications">Notifications</string>
|
||||
<string name="omnipod_eros_preferences_pulse_log_button_enabled">Show Pulse Log button in Pod Management menu</string>
|
||||
<string name="omnipod_eros_preferences_riley_link_stats_button_enabled">Show RileyLink Stats button in Pod Management menu</string>
|
||||
<string name="omnipod_eros_preferences_battery_change_logging_enabled">Enable battery change logging in Actions</string>
|
||||
<string name="omnipod_eros_preferences_category_riley_link">RileyLink</string>
|
||||
<string name="omnipod_eros_preferences_notification_uncertain_tbr_sound_enabled">Sound for uncertain TBR notifications enabled</string>
|
||||
<string name="omnipod_eros_preferences_notification_uncertain_smb_sound_enabled">Sound for uncertain SMB notifications enabled</string>
|
||||
<string name="omnipod_eros_preferences_notification_uncertain_bolus_sound_enabled">Sound for uncertain bolus notifications enabled</string>
|
||||
|
||||
<!-- Omnipod - Pod Status -->
|
||||
<string name="omnipod_pod_status_no_active_pod">No Active Pod</string>
|
||||
<string name="omnipod_pod_status_waiting_for_activation">Setup in progress (waiting for Pod activation)</string>
|
||||
<string name="omnipod_pod_status_waiting_for_cannula_insertion">Setup in progress (waiting for cannula insertion)</string>
|
||||
<string name="omnipod_pod_status_running">Running</string>
|
||||
<string name="omnipod_pod_status_suspended">Suspended</string>
|
||||
<string name="omnipod_pod_status_pod_fault">Pod Fault</string>
|
||||
<string name="omnipod_pod_status_activation_time_exceeded">Activation time exceeded</string>
|
||||
<string name="omnipod_pod_status_inactive">Inactive</string>
|
||||
<string name="omnipod_pod_status_pod_fault_description">Pod Fault: %1$03d %2$s</string>
|
||||
<!-- Omnipod Eros - History -->
|
||||
<string name="omnipod_eros_history_title">Pod History</string>
|
||||
<string name="omnipod_eros_history_item_description">Description</string>
|
||||
<string name="omnipod_eros_history_item_source">Source</string>
|
||||
<string name="omnipod_eros_history_item_date">Date</string>
|
||||
<string name="omnipod_eros_history_type">Type:</string>
|
||||
<string name="omnipod_eros_history_bolus_value">%1$.2f U</string>
|
||||
<string name="omnipod_eros_history_bolus_value_with_carbs">%1$.2f U, CH=%2$.1f g</string>
|
||||
<string name="omnipod_eros_history_tbr_value">Rate: %1$.2f U, duration: %2$d minutes</string>
|
||||
|
||||
<!-- Omnipod - Alerts -->
|
||||
<string name="omnipod_alert_finish_pairing_reminder">Finish pairing reminder</string>
|
||||
<string name="omnipod_alert_finish_setup_reminder_reminder">Finish setup reminder</string>
|
||||
<string name="omnipod_alert_expiration">Pod will expire soon</string>
|
||||
<string name="omnipod_alert_expiration_advisory">Pod will expire soon</string>
|
||||
<string name="omnipod_alert_shutdown_imminent">Shutdown is imminent</string>
|
||||
<string name="omnipod_alert_low_reservoir">Low Reservoir</string>
|
||||
<string name="omnipod_alert_unknown_alert">Unknown Alert</string>
|
||||
<!-- Omnipod Eros - Short Status -->
|
||||
<string name="omnipod_eros_short_status_riley_link_battery">RLBatt: %1$d</string>
|
||||
|
||||
<!-- Omnipod - History -->
|
||||
<string name="omnipod_history_title">Pod History</string>
|
||||
<string name="omnipod_history_item_description">Description</string>
|
||||
<string name="omnipod_history_item_source">Source</string>
|
||||
<string name="omnipod_history_item_date">Date</string>
|
||||
<string name="omnipod_history_type">Type:</string>
|
||||
<string name="omnipod_history_bolus_value">%1$.2f U</string>
|
||||
<string name="omnipod_history_bolus_value_with_carbs">%1$.2f U, CH=%2$.1f g</string>
|
||||
<string name="omnipod_history_tbr_value">Rate: %1$.2f U, duration: %2$d minutes</string>
|
||||
<!-- Omnipod Eros - Error -->
|
||||
<string name="omnipod_eros_error_riley_link_address_invalid">RileyLink address invalid.</string>
|
||||
<string name="omnipod_eros_error_crc_mismatch">Communication failed: message integrity verification failed</string>
|
||||
<string name="omnipod_eros_error_invalid_packet_type">Communication failed: received an invalid packet from the Pod</string>
|
||||
<string name="omnipod_eros_error_invalid_progress_state">Communication failed: the Pod is in a wrong state</string>
|
||||
<string name="omnipod_eros_error_invalid_response">Communication failed: received an invalid response from the Pod</string>
|
||||
<string name="omnipod_eros_error_invalid_message_sequence_number">Communication failed: received a message with an invalid sequence number from the Pod</string>
|
||||
<string name="omnipod_eros_error_invalid_message_address">Communication failed: received a message with an invalid address from the Pod</string>
|
||||
<string name="omnipod_eros_error_message_decoding_failed">Communication failed: failed to decode message from the Pod</string>
|
||||
<string name="omnipod_eros_error_nonce_resync_failed">Communication failed: nonce resync failed</string>
|
||||
<string name="omnipod_eros_error_nonce_out_of_sync">Communication failed: nonce out of sync</string>
|
||||
<string name="omnipod_eros_error_not_enough_data">Communication failed: not enough data received from the Pod</string>
|
||||
<string name="omnipod_eros_error_pod_fault">A Pod fault (%1$03d %2$s) has been detected. Please deactivate your Pod and activate a new one</string>
|
||||
<string name="omnipod_eros_error_pod_returned_error_response">Communication failed: the Pod returned an error response</string>
|
||||
<string name="omnipod_eros_error_communication_failed_no_response_from_riley_link">No response from RileyLink</string>
|
||||
<string name="omnipod_eros_error_communication_failed_riley_link_interrupted">RileyLink interrupted</string>
|
||||
<string name="omnipod_eros_error_communication_failed_no_response_from_pod">No response from Pod</string>
|
||||
<string name="omnipod_eros_error_set_basal_failed_delivery_might_be_suspended">Setting basal profile failed. Delivery might be suspended! Please manually refresh the Pod status from the Omnipod tab and resume delivery if needed.</string>
|
||||
<string name="omnipod_eros_error_set_basal_might_have_failed_delivery_might_be_suspended">Setting basal profile might have failed. Delivery might be suspended! Please manually refresh the Pod status from the Omnipod tab and resume delivery if needed.</string>
|
||||
<string name="omnipod_eros_error_set_basal_failed_delivery_suspended">Setting basal profile failed. Delivery is suspended! Please manually resume delivery from the Omnipod tab.</string>
|
||||
<string name="omnipod_eros_error_cancel_temp_basal_failed_uncertain">Cancelling temp basal might have failed. Please manually refresh the Pod status from the Omnipod tab.</string>
|
||||
<string name="omnipod_eros_error_set_temp_basal_failed_old_tbr_might_be_cancelled">Setting temp basal failed. If a temp basal was previously running, it might have been cancelled. Please manually refresh the Pod status from the Omnipod tab.</string>
|
||||
<string name="omnipod_eros_error_set_temp_basal_failed_old_tbr_cancelled_new_might_have_failed">Setting temp basal might have basal failed. If a temp basal was previously running, it has been cancelled. Please manually refresh the Pod status from the Omnipod tab.</string>
|
||||
<string name="omnipod_eros_error_set_temp_basal_failed_validation">TBR duration must be greater than zero and a multiple of %1$s minutes.</string>
|
||||
<string name="omnipod_eros_error_set_time_failed_delivery_might_be_suspended">Setting time might have failed. Delivery might be suspended! Please manually refresh the Pod status from the Omnipod tab and resume delivery if needed.</string>
|
||||
<string name="omnipod_eros_error_set_time_failed_delivery_suspended">Setting time failed. Delivery is suspended! Please manually resume delivery from the Omnipod tab.</string>
|
||||
<string name="omnipod_eros_error_failed_to_read_pulse_log">Failed to read Pulse Log</string>
|
||||
<string name="omnipod_eros_error_automatic_time_or_timezone_change_failed">Failed to automatically change time on the Pod. You should manually synchronize the time on the Omnipod tab.</string>
|
||||
<string name="omnipod_eros_error_operation_not_possible_no_configuration">Operation is not possible.\n\nYou need to configure Omnipod first, before you can use this operation.</string>
|
||||
<string name="omnipod_eros_error_bolus_failed_uncertain">Unable to verify whether the bolus succeeded. Please manually verify that your Pod is bolusing by listening to clicks. <b>If you are sure that the bolus didn\'t succeed, you should manually delete the bolus entry from Treatments, even if you click \'Cancel bolus\' now!</b></string>
|
||||
<string name="omnipod_eros_error_bolus_failed_uncertain_smb">Unable to verify whether SMB bolus (%1$.2f U) succeeded. <b>If you are sure that the Bolus didn\'t succeed, you should manually delete the SMB entry from Treatments.</b></string>
|
||||
<string name="omnipod_eros_error_tbr_running_but_aaps_not_aware">A temporary basal is running on the Pod, but AAPS is unaware of this temporary basal. Please cancel your temporary basal manually.</string>
|
||||
|
||||
<!-- Omnipod - Short status -->
|
||||
<string name="omnipod_short_status_no_active_pod">No Active Pod</string>
|
||||
<string name="omnipod_short_status_last_connection">LastConn: %1$d min ago</string>
|
||||
<string name="omnipod_short_status_last_bolus">LastBolus: %1$s @ %2$s</string>
|
||||
<string name="omnipod_short_status_temp_basal">Temp: %1$s</string>
|
||||
<string name="omnipod_short_status_extended_bolus">Extended: %1$s</string>
|
||||
<string name="omnipod_short_status_reservoir">Reserv: %1$sU</string>
|
||||
<string name="omnipod_short_status_rl_battery">RLBatt: %1$d</string>
|
||||
<!-- Omnipod Eros - Pod Management -->
|
||||
<string name="omnipod_eros_pod_management_button_riley_link_stats">RileyLink Stats</string>
|
||||
<string name="omnipod_eros_pod_management_waiting_for_riley_link_connection">Waiting for RileyLink connection…</string>
|
||||
<string name="omnipod_eros_pod_management_button_reset_riley_link_config">Reset RileyLink Config</string>
|
||||
<string name="omnipod_eros_pod_management_button_read_pulse_log">Read Pulse Log</string>
|
||||
<string name="omnipod_eros_pod_management_button_reading_pulse_log">Reading Pulse Log…</string>
|
||||
<string name="omnipod_eros_pod_management_pulse_log">Pulse Log</string>
|
||||
<string name="omnipod_eros_pod_management_pulse_log_value">Pulse Log (copied to clipboard)</string>
|
||||
|
||||
<!-- Omnipod - Error -->
|
||||
<string name="omnipod_warning">Warning</string>
|
||||
<string name="omnipod_error_rileylink_address_invalid">RileyLink address invalid.</string>
|
||||
<string name="omnipod_error_operation_not_possible_no_configuration">Operation is not possible.\n\nYou need to configure Omnipod first, before you can use this operation.</string>
|
||||
<string name="omnipod_error_pod_not_attached">No active Pod</string>
|
||||
<string name="omnipod_error_time_out_of_sync">The time on the Pod is out of sync. Please update the time in the Omnipod tab.</string>
|
||||
<string name="omnipod_error_unexpected_exception">An unexpected error occurred. Please report! (%1$s: %2$s).</string>
|
||||
<string name="omnipod_error_crc_mismatch">Communication failed: message integrity verification failed</string>
|
||||
<string name="omnipod_error_invalid_packet_type">Communication failed: received an invalid packet from the Pod</string>
|
||||
<string name="omnipod_error_invalid_progress_state">Communication failed: the Pod is in a wrong state</string>
|
||||
<string name="omnipod_error_invalid_response">Communication failed: received an invalid response from the Pod</string>
|
||||
<string name="omnipod_error_invalid_message_sequence_number">Communication failed: received a message with an invalid sequence number from the Pod</string>
|
||||
<string name="omnipod_error_invalid_message_address">Communication failed: received a message with an invalid address from the Pod</string>
|
||||
<string name="omnipod_error_message_decoding_failed">Communication failed: failed to decode message from the Pod</string>
|
||||
<string name="omnipod_error_nonce_resync_failed">Communication failed: nonce resync failed</string>
|
||||
<string name="omnipod_error_nonce_out_of_sync">Communication failed: nonce out of sync</string>
|
||||
<string name="omnipod_error_not_enough_data">Communication failed: not enough data received from the Pod</string>
|
||||
<string name="omnipod_error_pod_fault">A Pod fault (%1$03d %2$s) has been detected. Please deactivate your Pod and activate a new one</string>
|
||||
<string name="omnipod_error_pod_returned_error_response">Communication failed: the Pod returned an error response</string>
|
||||
<string name="omnipod_error_communication_failed_no_response_from_riley_link">No response from RileyLink</string>
|
||||
<string name="omnipod_error_communication_failed_riley_link_interrupted">RileyLink interrupted</string>
|
||||
<string name="omnipod_error_communication_failed_no_response_from_pod">No response from Pod</string>
|
||||
<string name="omnipod_error_set_basal_failed_delivery_might_be_suspended">Setting basal profile failed. Delivery might be suspended! Please manually refresh the Pod status from the Omnipod tab and resume delivery if needed.</string>
|
||||
<string name="omnipod_error_set_basal_might_have_failed_delivery_might_be_suspended">Setting basal profile might have failed. Delivery might be suspended! Please manually refresh the Pod status from the Omnipod tab and resume delivery if needed.</string>
|
||||
<string name="omnipod_error_set_basal_failed_delivery_suspended">Setting basal profile failed. Delivery is suspended! Please manually resume delivery from the Omnipod tab.</string>
|
||||
<string name="omnipod_error_set_basal_failed">Setting basal profile failed.</string>
|
||||
<string name="omnipod_error_cancel_temp_basal_failed_uncertain">Cancelling temp basal might have failed. Please manually refresh the Pod status from the Omnipod tab.</string>
|
||||
<string name="omnipod_error_set_temp_basal_failed_old_tbr_might_be_cancelled">Setting temp basal failed. If a temp basal was previously running, it might have been cancelled. Please manually refresh the Pod status from the Omnipod tab.</string>
|
||||
<string name="omnipod_error_set_temp_basal_failed_old_tbr_cancelled_new_might_have_failed">Setting temp basal might have basal failed. If a temp basal was previously running, it has been cancelled. Please manually refresh the Pod status from the Omnipod tab.</string>
|
||||
<string name="omnipod_error_set_temp_basal_failed_validation">TBR duration must be greater than zero and a multiple of %1$s minutes.</string>
|
||||
<string name="omnipod_error_set_time_failed_delivery_might_be_suspended">Setting time might have failed. Delivery might be suspended! Please manually refresh the Pod status from the Omnipod tab and resume delivery if needed.</string>
|
||||
<string name="omnipod_error_set_time_failed_delivery_suspended">Setting time failed. Delivery is suspended! Please manually resume delivery from the Omnipod tab.</string>
|
||||
<string name="omnipod_error_failed_to_set_profile_empty_profile">Failed to set basal profile: received an empty profile. Make sure to activate your basal profile.</string>
|
||||
<string name="omnipod_error_set_initial_basal_schedule_no_profile">No basal profile is active. Make sure to activate your basal profile.</string>
|
||||
<string name="omnipod_error_unknown_custom_command">Unknown custom command: %1$s</string>
|
||||
<string name="omnipod_error_failed_to_read_pulse_log">Failed to read Pulse Log</string>
|
||||
<string name="omnipod_error_failed_to_refresh_status">Failed to refresh status</string>
|
||||
<string name="omnipod_error_failed_to_refresh_status_on_startup">Failed to refresh status on startup</string>
|
||||
<string name="omnipod_error_failed_to_acknowledge_alerts">Failed to acknowledge alerts</string>
|
||||
<string name="omnipod_error_failed_to_suspend_delivery">Failed to suspend delivery</string>
|
||||
<string name="omnipod_error_failed_to_set_time">Failed to set time</string>
|
||||
<string name="omnipod_error_failed_to_resume_delivery">Failed to resume delivery</string>
|
||||
<string name="omnipod_error_automatic_time_or_timezone_change_failed">Failed to automatically change time on the Pod. You should manually synchronize the time on the Omnipod tab.</string>
|
||||
<string name="omnipod_error_bolus_failed_uncertain">Unable to verify whether the bolus succeeded. Please manually verify that your Pod is bolusing by listening to clicks. <b>If you are sure that the bolus didn\'t succeed, you should manually delete the bolus entry from Treatments, even if you click \'Cancel bolus\' now!</b></string>
|
||||
<string name="omnipod_error_bolus_failed_uncertain_smb">Unable to verify whether SMB bolus (%1$.2f U) succeeded. <b>If you are sure that the Bolus didn\'t succeed, you should manually delete the SMB entry from Treatments.</b></string>
|
||||
<string name="omnipod_error_bolus_did_not_succeed">Bolus did not succeed.</string>
|
||||
<string name="omnipod_error_failed_to_initialize_pod">Failed to initialize the Pod</string>
|
||||
<string name="omnipod_error_failed_to_insert_cannula">Failed to insert cannula</string>
|
||||
<string name="omnipod_error_pod_fault_activation_time_exceeded">The Pod\'s activation time has been exceeded. This Pod can no longer be activated.</string>
|
||||
<string name="omnipod_error_failed_to_verify_activation_progress">Failed to verify activation progress. Please retry.</string>
|
||||
<string name="omnipod_error_pod_suspended">Pod suspended</string>
|
||||
<string name="omnipod_error_failed_to_play_test_beep">Failed to play test beep</string>
|
||||
<string name="omnipod_error_tbr_running_but_aaps_not_aware">A temporary basal is running on the Pod, but AAPS is unaware of this temporary basal. Please cancel your temporary basal manually.</string>
|
||||
<!-- Omnipod Eros - Pod Activation Wizard -->
|
||||
<string name="omnipod_eros_pod_activation_wizard_fill_pod_text">Fill a new Pod with enough insulin for 3 days.\n\nListen for two beeps from the Pod during the filling process. These indicate that the minimum amount of 85U has been inserted. Be sure to completely empty the fill syringe, even after hearing the two beeps.\n\nAfter filling the Pod, please press <b>Next</b>.\n\n<b>Note:</b> do not remove the Pod\'s needle cap at this time.\n<b>Note:</b> please place the RileyLink in an upright position and place the Pod a few inches away from it.</string>
|
||||
<string name="omnipod_eros_pod_activation_wizard_initialize_pod_text">Trying to pair with the new Pod and prime it.\n\nWhen the initialization process has successfully been completed, you can press <b>Next</b>.\n\n<b>Note:</b> please place the RileyLink in an upright position and place the Pod a few inches away from it.</string>
|
||||
|
||||
<!-- Omnipod - Confirmation -->
|
||||
<string name="omnipod_confirmation">Confirmation</string>
|
||||
<string name="omnipod_confirmation_time_or_timezone_change">Time and/or time zone changed on the Pod.</string>
|
||||
<string name="omnipod_confirmation_expiration_alerts_updated">Alert configuration has been updated in the Pod.</string>
|
||||
<string name="omnipod_confirmation_time_on_pod_updated">The time on the Pod has been updated.</string>
|
||||
<string name="omnipod_confirmation_suspended_delivery">All insulin delivery has been suspended.</string>
|
||||
<string name="omnipod_confirmation_acknowledged_alerts">Active alerts have been acknowledged.</string>
|
||||
<string name="omnipod_confirmation_delivery_resumed">Insulin delivery has been resumed.</string>
|
||||
|
||||
<!-- Omnipod - Commands -->
|
||||
<string name="omnipod_cmd_deactivate_pod">Deactivate Pod</string>
|
||||
<string name="omnipod_cmd_discard_pod">Discard Pod</string>
|
||||
<string name="omnipod_cmd_set_bolus">Set Bolus</string>
|
||||
<string name="omnipod_cmd_cancel_bolus">Cancel Bolus</string>
|
||||
<string name="omnipod_cmd_set_tbr">Set Temporary Basal</string>
|
||||
<string name="omnipod_cmd_cancel_tbr_by_driver">Cancel Temporary Basal (internally by driver)</string>
|
||||
<string name="omnipod_cmd_cancel_tbr">Cancel Temporary Basal</string>
|
||||
<string name="omnipod_cmd_set_basal_schedule">Set Basal Schedule</string>
|
||||
<string name="omnipod_cmd_get_pod_status">Get Pod Status</string>
|
||||
<string name="omnipod_cmd_get_pod_info">Get Pod Info</string>
|
||||
<string name="omnipod_cmd_set_time">Set Time</string>
|
||||
<string name="omnipod_cmd_configure_alerts">Configure Alerts</string>
|
||||
<string name="omnipod_cmd_acknowledge_alerts">Acknowledge Alerts</string>
|
||||
<string name="omnipod_cmd_suspend_delivery">Suspend Delivery</string>
|
||||
<string name="omnipod_cmd_resume_delivery">Resume Delivery</string>
|
||||
<string name="omnipod_cmd_unknown_entry">Unknown Entry</string>
|
||||
<string name="omnipod_cmd_initialize_pod">Initialize Pod</string>
|
||||
<string name="omnipod_cmd_insert_cannula">Insert Cannula</string>
|
||||
<string name="omnipod_cmd_read_pulse_log">Read Pulse Log</string>
|
||||
<string name="omnipod_cmd_set_fake_suspended_tbr">Set fake temporary basal because the Pod is suspended</string>
|
||||
<string name="omnipod_cmd_cancel_fake_suspended_tbr">Cancel fake temporary basal that was created because the Pod was suspended</string>
|
||||
<string name="omnipod_cmd_split_tbr">Split temporary basal because of uncertain failure in cancellation</string>
|
||||
<string name="omnipod_cmd_beep_config">Beep Config</string>
|
||||
<string name="omnipod_cmd_play_test_beep">Play Test Beep</string>
|
||||
|
||||
<!-- Omnipod - Pod Management -->
|
||||
<string name="omnipod_pod_management_title">Pod Management</string>
|
||||
<string name="omnipod_pod_management_heading_actions">Actions</string>
|
||||
<string name="omnipod_pod_management_heading_tools">Tools</string>
|
||||
<string name="omnipod_pod_management_waiting_for_rileylink_connection">Waiting for RileyLink connection…</string>
|
||||
<string name="omnipod_pod_management_button_activate_pod">Activate Pod</string>
|
||||
<string name="omnipod_pod_management_button_deactivate_pod">Deactivate Pod</string>
|
||||
<string name="omnipod_pod_management_button_discard_pod">Discard Pod</string>
|
||||
<string name="omnipod_pod_management_button_pod_history">Pod History</string>
|
||||
<string name="omnipod_pod_management_button_riley_link_stats">RileyLink Stats</string>
|
||||
<string name="omnipod_pod_management_button_reset_riley_link_config">Reset RileyLink Config</string>
|
||||
<string name="omnipod_pod_management_button_read_pulse_log">Read Pulse Log</string>
|
||||
<string name="omnipod_pod_management_button_reading_pulse_log">Reading Pulse Log…</string>
|
||||
<string name="omnipod_pod_management_discard_pod_confirmation">If you discard the Pod, you will not be able to communicate with it anymore. You should only do this when all communication with the Pod persistently fails. If you can still communicate with the Pod, please use the <b>Deactivate Pod</b> option.\n\nIf you wish to proceed, please make sure to remove the Pod from your body!</string>
|
||||
<string name="omnipod_pod_management_button_play_test_beep">Play Test Beep</string>
|
||||
<string name="omnipod_pod_management_button_playing_test_beep">Playing Test Beep…</string>
|
||||
|
||||
<!-- Omnipod - Pod activation Wizard -->
|
||||
<string name="omnipod_pod_activation_wizard_fill_pod_title">Fill Pod</string>
|
||||
<string name="omnipod_pod_activation_wizard_fill_pod_text">Fill a new Pod with enough insulin for 3 days.\n\nListen for two beeps from the Pod during the filling process. These indicate that the minimum amount of 85U has been inserted. Be sure to completely empty the fill syringe, even after hearing the two beeps.\n\nAfter filling the Pod, please press <b>Next</b>.\n\n<b>Note:</b> do not remove the Pod\'s needle cap at this time.\n<b>Note:</b> please place the RileyLink in an upright position and place the Pod a few inches away from it.</string>
|
||||
<string name="omnipod_pod_activation_wizard_initialize_pod_title">Initialize Pod</string>
|
||||
<string name="omnipod_pod_activation_wizard_initialize_pod_text">Trying to pair with the new Pod and prime it.\n\nWhen the initialization process has successfully been completed, you can press <b>Next</b>.\n\n<b>Note:</b> please place the RileyLink in an upright position and place the Pod a few inches away from it.</string>
|
||||
<string name="omnipod_pod_activation_wizard_attach_pod_title">Attach Pod</string>
|
||||
<string name="omnipod_pod_activation_wizard_attach_pod_text">Prepare the infusion site. Remove the Pod\'s needle cap and adhesive backing and attach the Pod to the infusion site.\n\nIf the cannula sticks out, please press <b>Cancel</b> and discard your Pod.\n\nPress <b>Next</b> to insert the cannula and begin basal delivery.</string>
|
||||
<string name="omnipod_pod_activation_wizard_attach_pod_confirm_insert_cannula_text">When you press <b>OK</b>, the cannula will be inserted. Make sure that you have attached the Pod to the infusion site.</string>
|
||||
<string name="omnipod_pod_activation_wizard_insert_cannula_title">Insert Cannula</string>
|
||||
<string name="omnipod_pod_activation_wizard_insert_cannula_text">Trying to set initial basal schedule and insert the cannula.\n\nWhen the cannula has successfully been inserted, you can press <b>Next</b>.</string>
|
||||
<string name="omnipod_pod_activation_wizard_pod_activated_title">Pod Activated</string>
|
||||
<string name="omnipod_pod_activation_wizard_pod_activated_text">The new Pod is now active.\n\nYour basal schedule has been programmed and the cannula has been inserted.\n\nPlease verify that the cannula has been inserted correctly and change your Pod if you think it has not.</string>
|
||||
|
||||
<!-- Omnipod - Pod deactivation Wizard -->
|
||||
<string name="omnipod_pod_deactivation_wizard_deactivate_pod_title">Deactivate Pod</string>
|
||||
<string name="omnipod_pod_deactivation_wizard_deactivate_pod_text">Press <b>Next</b> to deactivate the Pod.\n\n<b>Note:</b> This will suspend all insulin delivery and deactivate the Pod.</string>
|
||||
<string name="omnipod_pod_deactivation_wizard_deactivating_pod_title">Deactivating Pod</string>
|
||||
<string name="omnipod_pod_deactivation_wizard_deactivating_pod_text">Deactivating the Pod.\n\nWhen deactivation has completed successfully, you can press <b>Next</b>.</string>
|
||||
<string name="omnipod_pod_deactivation_wizard_pod_deactivated_title">Pod Deactivated</string>
|
||||
<string name="omnipod_pod_deactivation_wizard_pod_deactivated_text">Your Pod has been deactivated.\n\nPlease remove the Pod from your body and recycle it.</string>
|
||||
<string name="omnipod_pod_deactivation_wizard_pod_discarded_title">Pod Discarded</string>
|
||||
<string name="omnipod_pod_deactivation_wizard_pod_discarded_text">The Pod state has been discarded. Insulin delivery has not been suspended because the Pod has not been properly deactivated!\n\nPlease remove the Pod from your body and recycle it.</string>
|
||||
<string name="omnipod_pod_deactivation_wizard_discard_pod_confirmation">If you discard the Pod, you will not be able to communicate with it anymore. You should only do this when all communication with the Pod persistently fails. Are you sure you want to discard the Pod?</string>
|
||||
<string name="omnipod_pod_deactivation_wizard_discard_pod">Discard Pod</string>
|
||||
|
||||
<!-- Omnipod - Overview -->
|
||||
<string name="omnipod_overview_button_set_time">Set time</string>
|
||||
<string name="omnipod_overview_button_suspend_delivery">Suspend</string>
|
||||
<string name="omnipod_overview_button_resume_delivery">Resume Delivery</string>
|
||||
<string name="omnipod_overview_button_pod_management">Pod Mgmt</string>
|
||||
<string name="omnipod_overview_button_acknowledge_active_alerts">Ack Alerts</string>
|
||||
<string name="omnipod_overview_pod_status">Pod Status</string>
|
||||
<string name="omnipod_overview_total_delivered">Total Delivered</string>
|
||||
<string name="omnipod_overview_total_delivered_value">%1$.2f U</string>
|
||||
<string name="omnipod_overview_pod_address">Pod Address</string>
|
||||
<string name="omnipod_overview_pod_expiry_date">Pod Expires</string>
|
||||
<string name="omnipod_overview_last_connection">Last Connection</string>
|
||||
<string name="omnipod_overview_last_bolus">Last Bolus</string>
|
||||
<string name="omnipod_overview_temp_basal_rate">Temp Basal Rate</string>
|
||||
<string name="omnipod_overview_base_basal_rate">Base Basal Rate</string>
|
||||
<string name="omnipod_overview_reservoir">Reservoir</string>
|
||||
<string name="omnipod_overview_pod_active_alerts">Active Pod Alerts</string>
|
||||
<string name="omnipod_overview_firmware_version">Firmware Version</string>
|
||||
<string name="omnipod_overview_time_on_pod">Time on Pod</string>
|
||||
<string name="omnipod_overview_temp_basal_value">%1$.2fU/h @%2$s (%3$d/%4$d minutes)</string>
|
||||
<string name="omnipod_overview_reservoir_value">%1$.2f U left</string>
|
||||
<string name="omnipod_overview_reservoir_value_over50">Over 50 U left</string>
|
||||
<string name="omnipod_overview_errors">Errors</string>
|
||||
|
||||
<!-- Omnipod - Other -->
|
||||
<string name="omnipod_pump_description">Pump integration for Omnipod, requires RileyLink (with at least 2.0 firmware) device.</string>
|
||||
<string name="omnipod_uncertain">uncertain</string>
|
||||
<string name="omnipod_pulse_log">Pulse log</string>
|
||||
<string name="omnipod_pulse_log_value">Pulse Log (copied to clipboard)</string>
|
||||
<string name="omnipod_yes">Yes</string>
|
||||
<string name="omnipod_no">No</string>
|
||||
<string name="omnipod_ok">OK</string>
|
||||
<string name="omnipod_cancel">Cancel</string>
|
||||
|
||||
<!-- Omnipod - Times -->
|
||||
<string name="omnipod_moments_ago">Moments ago</string>
|
||||
<string name="omnipod_less_than_a_minute_ago">Less than a minute ago</string>
|
||||
<string name="omnipod_composite_time">%1$s and %2$s</string>
|
||||
<string name="omnipod_time_ago">%1$s ago</string>
|
||||
<plurals name="omnipod_minutes">
|
||||
<item quantity="one">%1$d minute</item>
|
||||
<item quantity="other">%1$d minutes</item>
|
||||
</plurals>
|
||||
<plurals name="omnipod_hours">
|
||||
<item quantity="one">%1$d hour</item>
|
||||
<item quantity="other">%1$d hours</item>
|
||||
</plurals>
|
||||
<plurals name="omnipod_days">
|
||||
<item quantity="one">%1$d day</item>
|
||||
<item quantity="other">%1$d days</item>
|
||||
</plurals>
|
||||
<plurals name="omnipod_pod_alerts">
|
||||
<item quantity="one">Pod Alert: %1$s</item>
|
||||
<item quantity="other">Pod Alerts: %1$s</item>
|
||||
</plurals>
|
||||
<!-- Omnipod Eros - Other -->
|
||||
<string name="omnipod_eros_uncertain">uncertain</string>
|
||||
|
||||
</resources>
|
136
omnipod-eros/src/main/res/xml/omnipod_eros_preferences.xml
Normal file
136
omnipod-eros/src/main/res/xml/omnipod_eros_preferences.xml
Normal file
|
@ -0,0 +1,136 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:validate="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<PreferenceCategory android:title="@string/omnipod_eros_preferences_category_riley_link">
|
||||
|
||||
<Preference
|
||||
android:enabled="true"
|
||||
android:key="@string/key_rileylink_mac_address"
|
||||
android:title="@string/omnipod_eros_preferences_riley_link_configuration">
|
||||
<intent android:action="info.nightscout.androidaps.plugins.PumpCommon.dialog.RileyLinkBLEConfigActivity" />
|
||||
</Preference>
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="@string/key_riley_link_show_battery_level"
|
||||
android:summary="@string/riley_link_show_battery_level_summary"
|
||||
android:title="@string/riley_link_show_battery_level" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:dependency="@string/key_riley_link_show_battery_level"
|
||||
android:key="@string/key_omnipod_eros_battery_change_logging_enabled"
|
||||
android:title="@string/omnipod_eros_preferences_battery_change_logging_enabled" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory android:title="@string/omnipod_common_preferences_category_confirmation_beeps">
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="@string/key_omnipod_common_bolus_beeps_enabled"
|
||||
android:title="@string/omnipod_common_preferences_bolus_beeps_enabled" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="@string/key_omnipod_common_basal_beeps_enabled"
|
||||
android:title="@string/omnipod_common_preferences_basal_beeps_enabled" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="@string/key_omnipod_common_smb_beeps_enabled"
|
||||
android:title="@string/omnipod_common_preferences_smb_beeps_enabled" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="@string/key_omnipod_common_tbr_beeps_enabled"
|
||||
android:title="@string/omnipod_common_preferences_tbr_beeps_enabled" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory android:title="@string/omnipod_common_preferences_category_alerts">
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="@string/key_omnipod_common_expiration_reminder_enabled"
|
||||
android:title="@string/omnipod_common_preferences_expiration_reminder_enabled" />
|
||||
|
||||
<info.nightscout.androidaps.utils.textValidator.ValidatingEditTextPreference
|
||||
android:defaultValue="9"
|
||||
android:dependency="@string/key_omnipod_common_expiration_reminder_enabled"
|
||||
android:digits="0123456789"
|
||||
android:inputType="number"
|
||||
android:key="@string/key_omnipod_common_expiration_reminder_hours_before_shutdown"
|
||||
android:title="@string/omnipod_common_preferences_expiration_reminder_hours_before_shutdown"
|
||||
validate:maxNumber="24"
|
||||
validate:minNumber="2"
|
||||
validate:testType="numericRange" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="@string/key_omnipod_common_low_reservoir_alert_enabled"
|
||||
android:title="@string/omnipod_common_preferences_low_reservoir_alert_enabled" />
|
||||
|
||||
<info.nightscout.androidaps.utils.textValidator.ValidatingEditTextPreference
|
||||
android:defaultValue="20"
|
||||
android:dependency="@string/key_omnipod_common_low_reservoir_alert_enabled"
|
||||
android:digits="0123456789"
|
||||
android:inputType="number"
|
||||
android:key="@string/key_omnipod_common_low_reservoir_alert_units"
|
||||
android:title="@string/omnipod_common_preferences_low_reservoir_alert_units"
|
||||
validate:maxNumber="50"
|
||||
validate:minNumber="5"
|
||||
validate:testType="numericRange" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="@string/key_omnipod_common_automatically_acknowledge_alerts_enabled"
|
||||
android:title="@string/omnipod_common_preferences_automatically_acknowledge_alerts" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory android:title="@string/omnipod_eros_preferences_category_notifications">
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="@string/key_omnipod_eros_notification_uncertain_tbr_sound_enabled"
|
||||
android:title="@string/omnipod_eros_preferences_notification_uncertain_tbr_sound_enabled" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="@string/key_omnipod_eros_notification_uncertain_smb_sound_enabled"
|
||||
android:title="@string/omnipod_eros_preferences_notification_uncertain_smb_sound_enabled" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="@string/key_omnipod_eros_notification_uncertain_bolus_sound_enabled"
|
||||
android:title="@string/omnipod_eros_preferences_notification_uncertain_bolus_sound_enabled" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory android:title="@string/omnipod_common_preferences_category_other">
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="@string/key_omnipod_common_suspend_delivery_button_enabled"
|
||||
android:title="@string/omnipod_common_preferences_suspend_delivery_button_enabled" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="@string/key_omnipod_eros_pulse_log_button_enabled"
|
||||
android:title="@string/omnipod_eros_preferences_pulse_log_button_enabled" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="@string/key_omnipod_eros_riley_link_stats_button_enabled"
|
||||
android:title="@string/omnipod_eros_preferences_riley_link_stats_button_enabled" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="@string/key_omnipod_common_time_change_event_enabled"
|
||||
android:title="@string/omnipod_common_preferences_time_change_enabled" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
</androidx.preference.PreferenceScreen>
|
|
@ -1,136 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.preference.PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:validate="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<PreferenceCategory android:title="@string/omnipod_preference_category_rileylink">
|
||||
|
||||
<Preference
|
||||
android:enabled="true"
|
||||
android:key="@string/key_rileylink_mac_address"
|
||||
android:title="@string/omnipod_config_riley_link_configuration">
|
||||
<intent android:action="info.nightscout.androidaps.plugins.PumpCommon.dialog.RileyLinkBLEConfigActivity" />
|
||||
</Preference>
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="@string/key_riley_link_show_battery_level"
|
||||
android:summary="@string/riley_link_show_battery_level_summary"
|
||||
android:title="@string/riley_link_show_battery_level" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:dependency="@string/key_riley_link_show_battery_level"
|
||||
android:key="@string/key_omnipod_battery_change_logging_enabled"
|
||||
android:title="@string/omnipod_config_battery_change_logging_enabled" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory android:title="@string/omnipod_preference_category_confirmation_beeps">
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="@string/key_omnipod_bolus_beeps_enabled"
|
||||
android:title="@string/omnipod_config_bolus_beeps_enabled" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="@string/key_omnipod_basal_beeps_enabled"
|
||||
android:title="@string/omnipod_config_basal_beeps_enabled" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="@string/key_omnipod_smb_beeps_enabled"
|
||||
android:title="@string/omnipod_config_smb_beeps_enabled" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="@string/key_omnipod_tbr_beeps_enabled"
|
||||
android:title="@string/omnipod_config_tbr_beeps_enabled" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory android:title="@string/omnipod_preference_category_alerts">
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="@string/key_omnipod_expiration_reminder_enabled"
|
||||
android:title="@string/omnipod_config_expiration_reminder_enabled" />
|
||||
|
||||
<info.nightscout.androidaps.utils.textValidator.ValidatingEditTextPreference
|
||||
android:defaultValue="9"
|
||||
android:dependency="@string/key_omnipod_expiration_reminder_enabled"
|
||||
android:digits="0123456789"
|
||||
android:inputType="number"
|
||||
android:key="@string/key_omnipod_expiration_reminder_hours_before_shutdown"
|
||||
android:title="@string/omnipod_config_expiration_reminder_hours_before_shutdown"
|
||||
validate:maxNumber="24"
|
||||
validate:minNumber="2"
|
||||
validate:testType="numericRange" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="@string/key_omnipod_low_reservoir_alert_enabled"
|
||||
android:title="@string/omnipod_config_low_reservoir_alert_enabled" />
|
||||
|
||||
<info.nightscout.androidaps.utils.textValidator.ValidatingEditTextPreference
|
||||
android:defaultValue="20"
|
||||
android:dependency="@string/key_omnipod_low_reservoir_alert_enabled"
|
||||
android:digits="0123456789"
|
||||
android:inputType="number"
|
||||
android:key="@string/key_omnipod_low_reservoir_alert_units"
|
||||
android:title="@string/omnipod_config_low_reservoir_alert_units"
|
||||
validate:maxNumber="50"
|
||||
validate:minNumber="5"
|
||||
validate:testType="numericRange" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="@string/key_omnipod_automatically_acknowledge_alerts_enabled"
|
||||
android:title="@string/omnipod_config_automatically_acknowledge_alerts" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory android:title="@string/omnipod_preference_category_notifications">
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="@string/key_omnipod_notification_uncertain_tbr_sound_enabled"
|
||||
android:title="@string/omnipod_config_notification_uncertain_tbr_sound_enabled" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="@string/key_omnipod_notification_uncertain_smb_sound_enabled"
|
||||
android:title="@string/omnipod_config_notification_uncertain_smb_sound_enabled" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="@string/key_omnipod_notification_uncertain_bolus_sound_enabled"
|
||||
android:title="@string/omnipod_config_notification_uncertain_bolus_sound_enabled" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory android:title="@string/omnipod_preference_category_other">
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="@string/key_omnipod_suspend_delivery_button_enabled"
|
||||
android:title="@string/omnipod_config_suspend_delivery_button_enabled" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="@string/key_omnipod_pulse_log_button_enabled"
|
||||
android:title="@string/omnipod_config_pulse_log_button_enabled" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="@string/key_omnipod_riley_link_stats_button_enabled"
|
||||
android:title="@string/omnipod_config_rileylink_stats_button_enabled" />
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="@string/key_omnipod_time_change_event_enabled"
|
||||
android:title="@string/omnipod_config_time_change_enabled" />
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
</androidx.preference.PreferenceScreen>
|
|
@ -26,7 +26,7 @@ import info.nightscout.androidaps.plugins.bus.RxBusWrapper;
|
|||
import info.nightscout.androidaps.plugins.pump.common.data.TempBasalPair;
|
||||
import info.nightscout.androidaps.plugins.pump.common.defs.PumpType;
|
||||
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.manager.AapsOmnipodManager;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.manager.AapsOmnipodErosManager;
|
||||
import info.nightscout.androidaps.utils.resources.ResourceHelper;
|
||||
import info.nightscout.androidaps.utils.rx.TestAapsSchedulers;
|
||||
|
||||
|
@ -45,7 +45,7 @@ public class OmnipodErosPumpPluginTest {
|
|||
RxBusWrapper rxBusWrapper = new RxBusWrapper(new TestAapsSchedulers());
|
||||
@Mock ResourceHelper resourceHelper;
|
||||
@Mock(answer = Answers.RETURNS_DEEP_STUBS) ActivePluginProvider activePluginProvider;
|
||||
@Mock AapsOmnipodManager aapsOmnipodManager;
|
||||
@Mock AapsOmnipodErosManager aapsOmnipodErosManager;
|
||||
@Mock CommandQueueProvider commandQueueProvider;
|
||||
@Mock RileyLinkUtil rileyLinkUtil;
|
||||
|
||||
|
@ -59,7 +59,7 @@ public class OmnipodErosPumpPluginTest {
|
|||
// mock all the things
|
||||
PowerMockito.mockStatic(Looper.class);
|
||||
OmnipodErosPumpPlugin plugin = new OmnipodErosPumpPlugin(injector, aapsLogger, new TestAapsSchedulers(), rxBusWrapper, null,
|
||||
resourceHelper, activePluginProvider, null, null, aapsOmnipodManager, commandQueueProvider,
|
||||
resourceHelper, activePluginProvider, null, null, aapsOmnipodErosManager, commandQueueProvider,
|
||||
null, null, null, null,
|
||||
rileyLinkUtil, null, null, null, null
|
||||
);
|
||||
|
@ -73,7 +73,7 @@ public class OmnipodErosPumpPluginTest {
|
|||
|
||||
|
||||
// always return a PumpEnactResult containing same rate and duration as input
|
||||
when(aapsOmnipodManager.setTemporaryBasal(any(TempBasalPair.class))).thenAnswer(
|
||||
when(aapsOmnipodErosManager.setTemporaryBasal(any(TempBasalPair.class))).thenAnswer(
|
||||
invocation -> {
|
||||
TempBasalPair pair = invocation.getArgument(0);
|
||||
PumpEnactResult result = new PumpEnactResult(injector);
|
||||
|
@ -120,7 +120,7 @@ public class OmnipodErosPumpPluginTest {
|
|||
// When treatment
|
||||
result1 = plugin.setTempBasalPercent(80, 30, profile, false);
|
||||
// Then return sane values
|
||||
assertEquals(result1.absolute, PumpType.Insulet_Omnipod.determineCorrectBasalSize(500d * 0.8), 0.01d);
|
||||
assertEquals(result1.absolute, PumpType.Omnipod_Eros.determineCorrectBasalSize(500d * 0.8), 0.01d);
|
||||
assertEquals(result1.duration, 30);
|
||||
|
||||
// Given weird basal
|
||||
|
|
|
@ -11,12 +11,12 @@ import java.util.List;
|
|||
import info.nightscout.androidaps.data.Profile;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.schedule.BasalSchedule;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.schedule.BasalScheduleEntry;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.manager.AapsOmnipodManager;
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.manager.AapsOmnipodErosManager;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.mockito.Mockito.mock;
|
||||
|
||||
public class AapsOmnipodManagerTest {
|
||||
public class AapsOmnipodErosManagerTest {
|
||||
@Rule
|
||||
public ExpectedException thrown = ExpectedException.none();
|
||||
|
||||
|
@ -42,7 +42,7 @@ public class AapsOmnipodManagerTest {
|
|||
value3
|
||||
});
|
||||
|
||||
BasalSchedule basalSchedule = AapsOmnipodManager.mapProfileToBasalSchedule(profile);
|
||||
BasalSchedule basalSchedule = AapsOmnipodErosManager.mapProfileToBasalSchedule(profile);
|
||||
|
||||
List<BasalScheduleEntry> entries = basalSchedule.getEntries();
|
||||
assertEquals(3, entries.size());
|
||||
|
@ -64,14 +64,14 @@ public class AapsOmnipodManagerTest {
|
|||
public void invalidProfileNullProfile() {
|
||||
thrown.expect(IllegalArgumentException.class);
|
||||
thrown.expectMessage("Profile can not be null");
|
||||
AapsOmnipodManager.mapProfileToBasalSchedule(null);
|
||||
AapsOmnipodErosManager.mapProfileToBasalSchedule(null);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void invalidProfileNullEntries() {
|
||||
thrown.expect(IllegalArgumentException.class);
|
||||
thrown.expectMessage("Basal values can not be null");
|
||||
AapsOmnipodManager.mapProfileToBasalSchedule(mock(Profile.class));
|
||||
AapsOmnipodErosManager.mapProfileToBasalSchedule(mock(Profile.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -82,7 +82,7 @@ public class AapsOmnipodManagerTest {
|
|||
|
||||
PowerMockito.when(profile.getBasalValues()).thenReturn(new Profile.ProfileValue[0]);
|
||||
|
||||
AapsOmnipodManager.mapProfileToBasalSchedule(profile);
|
||||
AapsOmnipodErosManager.mapProfileToBasalSchedule(profile);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -100,7 +100,7 @@ public class AapsOmnipodManagerTest {
|
|||
value,
|
||||
});
|
||||
|
||||
AapsOmnipodManager.mapProfileToBasalSchedule(profile);
|
||||
AapsOmnipodErosManager.mapProfileToBasalSchedule(profile);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -123,7 +123,7 @@ public class AapsOmnipodManagerTest {
|
|||
value2
|
||||
});
|
||||
|
||||
AapsOmnipodManager.mapProfileToBasalSchedule(profile);
|
||||
AapsOmnipodErosManager.mapProfileToBasalSchedule(profile);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -141,7 +141,7 @@ public class AapsOmnipodManagerTest {
|
|||
value,
|
||||
});
|
||||
|
||||
AapsOmnipodManager.mapProfileToBasalSchedule(profile);
|
||||
AapsOmnipodErosManager.mapProfileToBasalSchedule(profile);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -156,7 +156,7 @@ public class AapsOmnipodManagerTest {
|
|||
value,
|
||||
});
|
||||
|
||||
BasalSchedule basalSchedule = AapsOmnipodManager.mapProfileToBasalSchedule(profile);
|
||||
BasalSchedule basalSchedule = AapsOmnipodErosManager.mapProfileToBasalSchedule(profile);
|
||||
BasalScheduleEntry basalScheduleEntry = basalSchedule.getEntries().get(0);
|
||||
|
||||
assertEquals(0.05D, basalScheduleEntry.getRate(), 0.000001);
|
|
@ -20,7 +20,7 @@ import info.nightscout.androidaps.utils.sharedPreferences.SP;
|
|||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
@RunWith(PowerMockRunner.class)
|
||||
public class AapsPodStateManagerTest {
|
||||
public class AapsErosPodStateManagerTest {
|
||||
@Mock AAPSLogger aapsLogger;
|
||||
@Mock SP sp;
|
||||
|
||||
|
@ -35,7 +35,7 @@ public class AapsPodStateManagerTest {
|
|||
|
||||
DateTimeUtils.setCurrentMillisFixed(now.getMillis());
|
||||
|
||||
AapsPodStateManager podStateManager = new AapsPodStateManager(aapsLogger, sp, rxBus);
|
||||
AapsErosPodStateManager podStateManager = new AapsErosPodStateManager(aapsLogger, sp, rxBus);
|
||||
podStateManager.initState(0x0);
|
||||
podStateManager.setInitializationParameters(0, 0, new FirmwareVersion(1, 1, 1),
|
||||
new FirmwareVersion(2, 2, 2), timeZone, PodProgressStatus.ABOVE_FIFTY_UNITS);
|
||||
|
@ -53,7 +53,7 @@ public class AapsPodStateManagerTest {
|
|||
|
||||
DateTimeUtils.setCurrentMillisFixed(now.getMillis());
|
||||
|
||||
AapsPodStateManager podStateManager = new AapsPodStateManager(aapsLogger, sp, rxBus);
|
||||
AapsErosPodStateManager podStateManager = new AapsErosPodStateManager(aapsLogger, sp, rxBus);
|
||||
podStateManager.initState(0x0);
|
||||
podStateManager.setInitializationParameters(0, 0, new FirmwareVersion(1, 1, 1),
|
||||
new FirmwareVersion(2, 2, 2), timeZone, PodProgressStatus.ABOVE_FIFTY_UNITS);
|
||||
|
@ -76,7 +76,7 @@ public class AapsPodStateManagerTest {
|
|||
|
||||
DateTimeUtils.setCurrentMillisFixed(now.getMillis());
|
||||
|
||||
AapsPodStateManager podStateManager = new AapsPodStateManager(aapsLogger, sp, rxBus);
|
||||
AapsErosPodStateManager podStateManager = new AapsErosPodStateManager(aapsLogger, sp, rxBus);
|
||||
podStateManager.initState(0x0);
|
||||
podStateManager.setInitializationParameters(0, 0, new FirmwareVersion(1, 1, 1),
|
||||
new FirmwareVersion(2, 2, 2), timeZone, PodProgressStatus.ABOVE_FIFTY_UNITS);
|
Loading…
Reference in a new issue