Merge branch 'omnipod_eros_bart' into omnipod_eros_andy

This commit is contained in:
Andy Rozman 2019-09-18 11:39:40 +01:00
commit 5becad4127
26 changed files with 352 additions and 220 deletions

View file

@ -225,12 +225,12 @@ dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs') implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.google.android.gms:play-services-wearable:17.0.0' implementation 'com.google.android.gms:play-services-wearable:17.0.0'
implementation 'com.google.firebase:firebase-core:17.1.0' implementation 'com.google.firebase:firebase-core:17.2.0'
implementation("com.crashlytics.sdk.android:crashlytics:2.9.9@aar") { implementation("com.crashlytics.sdk.android:crashlytics:2.9.9@aar") {
transitive = true; transitive = true;
} }
implementation 'androidx.appcompat:appcompat:1.0.2' implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.legacy:legacy-support-v13:1.0.0' implementation 'androidx.legacy:legacy-support-v13:1.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0' implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.cardview:cardview:1.0.0' implementation 'androidx.cardview:cardview:1.0.0'

View file

@ -36,8 +36,8 @@ class ObjectivesExamDialog : DialogFragment() {
override fun onStart() { override fun onStart() {
super.onStart() super.onStart()
dialog.setCanceledOnTouchOutside(false) dialog?.setCanceledOnTouchOutside(false)
dialog.window?.setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); dialog?.window?.setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
} }
override fun onResume() { override fun onResume() {

View file

@ -17,31 +17,31 @@ public class Objective2 extends Objective {
@Override @Override
protected void setupTasks(List<Task> tasks) { protected void setupTasks(List<Task> tasks) {
tasks.add(new ExamTask(R.string.dia_meaningofdia, R.string.dia_whatmeansdia,"dia") tasks.add(new ExamTask(R.string.dia_label, R.string.dia_whatmeansdia,"dia")
.option(new Option(R.string.dia_minimumis3h, false)) .option(new Option(R.string.dia_minimumis3h, false))
.option(new Option(R.string.dia_minimumis5h, true)) .option(new Option(R.string.dia_minimumis5h, true))
.option(new Option(R.string.dia_meaningisequaltodiapump, false)) .option(new Option(R.string.dia_meaningisequaltodiapump, false))
.option(new Option(R.string.dia_valuemustbedetermined, true)) .option(new Option(R.string.dia_valuemustbedetermined, true))
.hint(new Hint(R.string.dia_hint1)) .hint(new Hint(R.string.dia_hint1))
); );
tasks.add(new ExamTask(R.string.hypott, R.string.hypott_whenhypott,"hypott") tasks.add(new ExamTask(R.string.hypott_label, R.string.hypott_whenhypott,"hypott")
.option(new Option(R.string.hypott_goinglow, false)) .option(new Option(R.string.hypott_goinglow, false))
.option(new Option(R.string.hypott_havinglow, false)) .option(new Option(R.string.hypott_havinglow, false))
.option(new Option(R.string.hypott_preventoversmb, true)) .option(new Option(R.string.hypott_preventoversmb, true))
.hint(new Hint(R.string.hypott_hint1)) .hint(new Hint(R.string.hypott_hint1))
); );
tasks.add(new ExamTask(R.string.offlineprofile, R.string.offlineprofile_whatprofile,"offlineprofile") tasks.add(new ExamTask(R.string.offlineprofile_label, R.string.offlineprofile_whatprofile,"offlineprofile")
.option(new Option(R.string.localprofile, true)) .option(new Option(R.string.localprofile, true))
.option(new Option(R.string.nsprofile, false)) .option(new Option(R.string.nsprofile, false))
.option(new Option(R.string.offlineprofile_nsprofile, true)) .option(new Option(R.string.offlineprofile_nsprofile, true))
.hint(new Hint(R.string.offlineprofile_hint1)) .hint(new Hint(R.string.offlineprofile_hint1))
); );
tasks.add(new ExamTask(R.string.pumpdisconnect, R.string.pumpdisconnect_whattodo,"pumpdisconnect") tasks.add(new ExamTask(R.string.pumpdisconnect_label, R.string.pumpdisconnect_label,"pumpdisconnect")
.option(new Option(R.string.pumpdisconnect_letknow, true)) .option(new Option(R.string.pumpdisconnect_letknow, true))
.option(new Option(R.string.pumpdisconnect_dontchnage, false)) .option(new Option(R.string.pumpdisconnect_dontchnage, false))
.hint(new Hint(R.string.pumpdisconnect_hint1)) .hint(new Hint(R.string.pumpdisconnect_hint1))
); );
tasks.add(new ExamTask(R.string.objectives, R.string.objectives_howtosave,"objectives") tasks.add(new ExamTask(R.string.objectives_label, R.string.objectives_howtosave,"objectives")
.option(new Option(R.string.objectives_exportsettings, true)) .option(new Option(R.string.objectives_exportsettings, true))
.option(new Option(R.string.objectives_storeelsewhere, true)) .option(new Option(R.string.objectives_storeelsewhere, true))
.option(new Option(R.string.objectives_doexportonstart, false)) .option(new Option(R.string.objectives_doexportonstart, false))
@ -50,7 +50,7 @@ public class Objective2 extends Objective {
.hint(new Hint(R.string.objectives_hint1)) .hint(new Hint(R.string.objectives_hint1))
.hint(new Hint(R.string.objectives_hint2)) .hint(new Hint(R.string.objectives_hint2))
); );
tasks.add(new ExamTask(R.string.noisycgm, R.string.noisycgm_whattodo,"noisycgm") tasks.add(new ExamTask(R.string.noisycgm_label, R.string.noisycgm_whattodo,"noisycgm")
.option(new Option(R.string.nothing, false)) .option(new Option(R.string.nothing, false))
.option(new Option(R.string.disconnectpumpfor1h, false)) .option(new Option(R.string.disconnectpumpfor1h, false))
.option(new Option(R.string.noisycgm_pause, true)) .option(new Option(R.string.noisycgm_pause, true))
@ -59,7 +59,7 @@ public class Objective2 extends Objective {
.option(new Option(R.string.noisycgm_checksmoothing, true)) .option(new Option(R.string.noisycgm_checksmoothing, true))
.hint(new Hint(R.string.noisycgm_hint1)) .hint(new Hint(R.string.noisycgm_hint1))
); );
tasks.add(new ExamTask(R.string.exercise, R.string.exercise_whattodo,"exercise") tasks.add(new ExamTask(R.string.exercise_label, R.string.exercise_whattodo,"exercise")
.option(new Option(R.string.nothing, false)) .option(new Option(R.string.nothing, false))
.option(new Option(R.string.exercise_setactivitytt, true)) .option(new Option(R.string.exercise_setactivitytt, true))
.option(new Option(R.string.exercise_switchprofilebelow100, true)) .option(new Option(R.string.exercise_switchprofilebelow100, true))
@ -69,17 +69,17 @@ public class Objective2 extends Objective {
.option(new Option(R.string.exercise_doitafterstart, false)) .option(new Option(R.string.exercise_doitafterstart, false))
.hint(new Hint(R.string.exercise_hint1)) .hint(new Hint(R.string.exercise_hint1))
); );
tasks.add(new ExamTask(R.string.suspendloop, R.string.suspendloop_doigetinsulin,"suspendloop") tasks.add(new ExamTask(R.string.suspendloop_label, R.string.suspendloop_doigetinsulin,"suspendloop")
.option(new Option(R.string.suspendloop_yes, true)) .option(new Option(R.string.suspendloop_yes, true))
.option(new Option(R.string.suspendloop_no, false)) .option(new Option(R.string.suspendloop_no, false))
); );
tasks.add(new ExamTask(R.string.basaltest, R.string.basaltest_when,"basaltest") tasks.add(new ExamTask(R.string.basaltest_label, R.string.basaltest_when,"basaltest")
.option(new Option(R.string.basaltest_beforeloop, true)) .option(new Option(R.string.basaltest_beforeloop, true))
.option(new Option(R.string.basaltest_havingregularhypo, true)) .option(new Option(R.string.basaltest_havingregularhypo, true))
.option(new Option(R.string.basaltest_havingregularhyper, true)) .option(new Option(R.string.basaltest_havingregularhyper, true))
.hint(new Hint(R.string.basaltest_hint1)) .hint(new Hint(R.string.basaltest_hint1))
); );
tasks.add(new ExamTask(R.string.prerequisites, R.string.prerequisites_what, "prerequisites") tasks.add(new ExamTask(R.string.prerequisites_label, R.string.prerequisites_what, "prerequisites")
.option(new Option(R.string.prerequisites_determinedcorrectprofile, true)) .option(new Option(R.string.prerequisites_determinedcorrectprofile, true))
.option(new Option(R.string.prerequisites_computer, true)) .option(new Option(R.string.prerequisites_computer, true))
.option(new Option(R.string.prerequisites_phone, true)) .option(new Option(R.string.prerequisites_phone, true))
@ -94,7 +94,7 @@ public class Objective2 extends Objective {
.option(new Option(R.string.prerequisites_supportedcgm, true)) .option(new Option(R.string.prerequisites_supportedcgm, true))
.hint(new Hint(R.string.prerequisites_hint1)) .hint(new Hint(R.string.prerequisites_hint1))
); );
tasks.add(new ExamTask(R.string.update_update, R.string.whatistrue,"update") tasks.add(new ExamTask(R.string.update_label, R.string.whatistrue,"update")
.option(new Option(R.string.update_git, true)) .option(new Option(R.string.update_git, true))
.option(new Option(R.string.update_asap, true)) .option(new Option(R.string.update_asap, true))
.option(new Option(R.string.update_keys, true)) .option(new Option(R.string.update_keys, true))
@ -102,7 +102,7 @@ public class Objective2 extends Objective {
.option(new Option(R.string.update_askfriend, false)) .option(new Option(R.string.update_askfriend, false))
.hint(new Hint(R.string.update_hint1)) .hint(new Hint(R.string.update_hint1))
); );
tasks.add(new ExamTask(R.string.troubleshooting, R.string.troubleshooting_wheretoask,"troubleshooting") tasks.add(new ExamTask(R.string.troubleshooting_label, R.string.troubleshooting_wheretoask,"troubleshooting")
.option(new Option(R.string.troubleshooting_fb, true)) .option(new Option(R.string.troubleshooting_fb, true))
.option(new Option(R.string.troubleshooting_wiki, true)) .option(new Option(R.string.troubleshooting_wiki, true))
.option(new Option(R.string.troubleshooting_gitter, true)) .option(new Option(R.string.troubleshooting_gitter, true))
@ -112,47 +112,47 @@ public class Objective2 extends Objective {
.hint(new Hint(R.string.troubleshooting_hint2)) .hint(new Hint(R.string.troubleshooting_hint2))
.hint(new Hint(R.string.troubleshooting_hint3)) .hint(new Hint(R.string.troubleshooting_hint3))
); );
tasks.add(new ExamTask(R.string.insulin, R.string.insulin_ultrarapid,"insulin") tasks.add(new ExamTask(R.string.insulin_label, R.string.insulin_ultrarapid,"insulin")
.option(new Option(R.string.insulin_fiasp, true)) .option(new Option(R.string.insulin_fiasp, true))
.option(new Option(R.string.insulin_novorapid, false)) .option(new Option(R.string.insulin_novorapid, false))
.option(new Option(R.string.insulin_humalog, false)) .option(new Option(R.string.insulin_humalog, false))
.option(new Option(R.string.insulin_actrapid, false)) .option(new Option(R.string.insulin_actrapid, false))
.hint(new Hint(R.string.insulin_hint1)) .hint(new Hint(R.string.insulin_hint1))
); );
tasks.add(new ExamTask(R.string.sensitivity, R.string.sensitivity_which,"sensitivity") tasks.add(new ExamTask(R.string.sensitivity_label, R.string.sensitivity_which,"sensitivity")
.option(new Option(R.string.sensitivityweightedaverage, true)) .option(new Option(R.string.sensitivityweightedaverage, true))
.option(new Option(R.string.sensitivityoref0, false)) .option(new Option(R.string.sensitivityoref0, false))
.option(new Option(R.string.sensitivityoref1, false)) .option(new Option(R.string.sensitivityoref1, false))
.option(new Option(R.string.sensitivityaaps, true)) .option(new Option(R.string.sensitivityaaps, true))
.hint(new Hint(R.string.sensitivity_hint1)) .hint(new Hint(R.string.sensitivity_hint1))
); );
tasks.add(new ExamTask(R.string.sensitivity, R.string.sensitivityuam_which,"sensitivityuam") tasks.add(new ExamTask(R.string.sensitivity_label, R.string.sensitivityuam_which,"sensitivityuam")
.option(new Option(R.string.sensitivityweightedaverage, false)) .option(new Option(R.string.sensitivityweightedaverage, false))
.option(new Option(R.string.sensitivityoref0, false)) .option(new Option(R.string.sensitivityoref0, false))
.option(new Option(R.string.sensitivityoref1, true)) .option(new Option(R.string.sensitivityoref1, true))
.option(new Option(R.string.sensitivityaaps, false)) .option(new Option(R.string.sensitivityaaps, false))
.hint(new Hint(R.string.sensitivity_hint1)) .hint(new Hint(R.string.sensitivity_hint1))
); );
tasks.add(new ExamTask(R.string.wrongcarbs, R.string.wrongcarbs_whattodo,"wrongcarbs") tasks.add(new ExamTask(R.string.wrongcarbs_label, R.string.wrongcarbs_whattodo,"wrongcarbs")
.option(new Option(R.string.wrongcarbs_addfakeinsulin, false)) .option(new Option(R.string.wrongcarbs_addfakeinsulin, false))
.option(new Option(R.string.wrongcarbs_treatmentstab, true)) .option(new Option(R.string.wrongcarbs_treatmentstab, true))
); );
tasks.add(new ExamTask(R.string.extendedcarbs, R.string.extendedcarbs_handling,"extendedcarbs") tasks.add(new ExamTask(R.string.extendedcarbs_label, R.string.extendedcarbs_handling,"extendedcarbs")
.option(new Option(R.string.extendedcarbs_useextendedcarbs, true)) .option(new Option(R.string.extendedcarbs_useextendedcarbs, true))
.option(new Option(R.string.extendedcarbs_add, false)) .option(new Option(R.string.extendedcarbs_add, false))
.option(new Option(R.string.extendedcarbs_useextendedbolus, false)) .option(new Option(R.string.extendedcarbs_useextendedbolus, false))
.hint(new Hint(R.string.extendedcarbs_hint1)) .hint(new Hint(R.string.extendedcarbs_hint1))
); );
tasks.add(new ExamTask(R.string.nsclient_monitoring, R.string.nsclient_howcanyou,"nsclient") tasks.add(new ExamTask(R.string.nsclient_label, R.string.nsclient_howcanyou,"nsclient")
.option(new Option(R.string.nightscout, true)) .option(new Option(R.string.nsclient_nightscout, true))
.option(new Option(R.string.nsclientinternal, true)) .option(new Option(R.string.nsclientinternal, true))
.option(new Option(R.string.dexcomfollow, true)) .option(new Option(R.string.nsclient_dexcomfollow, true))
.option(new Option(R.string.dexcomfollowxdrip, false)) .option(new Option(R.string.nsclient_dexcomfollowxdrip, false))
.option(new Option(R.string.xdripfollower, true)) .option(new Option(R.string.nsclient_xdripfollower, true))
.option(new Option(R.string.looponiphone, false)) .option(new Option(R.string.nsclient_looponiphone, false))
.option(new Option(R.string.spikeiphone, true)) .option(new Option(R.string.nsclient_spikeiphone, true))
); );
tasks.add(new ExamTask(R.string.nsprofileview_isf_label, R.string.whatistrue,"isf") tasks.add(new ExamTask(R.string.isf_label, R.string.whatistrue,"isf")
.option(new Option(R.string.isf_increasingvalue, true)) .option(new Option(R.string.isf_increasingvalue, true))
.option(new Option(R.string.isf_decreasingvalue, false)) .option(new Option(R.string.isf_decreasingvalue, false))
.option(new Option(R.string.isf_noeffect, false)) .option(new Option(R.string.isf_noeffect, false))
@ -161,7 +161,7 @@ public class Objective2 extends Objective {
.hint(new Hint(R.string.isf_hint1)) .hint(new Hint(R.string.isf_hint1))
.hint(new Hint(R.string.isf_hint2)) .hint(new Hint(R.string.isf_hint2))
); );
tasks.add(new ExamTask(R.string.nsprofileview_ic_label, R.string.whatistrue,"ic") tasks.add(new ExamTask(R.string.ic_label, R.string.whatistrue,"ic")
.option(new Option(R.string.ic_increasingvalue, true)) .option(new Option(R.string.ic_increasingvalue, true))
.option(new Option(R.string.ic_decreasingvalue, false)) .option(new Option(R.string.ic_decreasingvalue, false))
.option(new Option(R.string.ic_noeffect, false)) .option(new Option(R.string.ic_noeffect, false))
@ -169,7 +169,7 @@ public class Objective2 extends Objective {
.option(new Option(R.string.ic_meaning, false)) .option(new Option(R.string.ic_meaning, false))
.hint(new Hint(R.string.ic_hint1)) .hint(new Hint(R.string.ic_hint1))
); );
tasks.add(new ExamTask(R.string.profileswitch, R.string.profileswitch_pctwillchange,"profileswitch") tasks.add(new ExamTask(R.string.profileswitch_label, R.string.profileswitch_pctwillchange,"profileswitch")
.option(new Option(R.string.profileswitch_basalhigher, false)) .option(new Option(R.string.profileswitch_basalhigher, false))
.option(new Option(R.string.profileswitch_basallower, true)) .option(new Option(R.string.profileswitch_basallower, true))
.option(new Option(R.string.profileswitch_ichigher, true)) .option(new Option(R.string.profileswitch_ichigher, true))
@ -183,6 +183,14 @@ public class Objective2 extends Objective {
.hint(new Hint(R.string.profileswitch_hint1)) .hint(new Hint(R.string.profileswitch_hint1))
); );
tasks.add(new ExamTask(R.string.profileswitch_label, R.string.profileswitchtime_iwant,"profileswitchtime")
.option(new Option(R.string.profileswitchtime_1, false))
.option(new Option(R.string.profileswitchtime__1, true))
.option(new Option(R.string.profileswitchtime_60, false))
.option(new Option(R.string.profileswitchtime__60, false))
.hint(new Hint(R.string.profileswitchtime_hint1))
);
for (Task task : tasks) for (Task task : tasks)
Collections.shuffle(((ExamTask)task).options); Collections.shuffle(((ExamTask)task).options);
} }

View file

@ -26,7 +26,7 @@ class ChooseActionDialog : DialogFragment() {
checkedIndex = bundle.getInt("checkedIndex") checkedIndex = bundle.getInt("checkedIndex")
} }
dialog.setCanceledOnTouchOutside(false) dialog?.setCanceledOnTouchOutside(false)
return inflater.inflate(R.layout.automation_dialog_choose_action, container, false) return inflater.inflate(R.layout.automation_dialog_choose_action, container, false)
} }

View file

@ -29,7 +29,7 @@ class ChooseTriggerDialog : DialogFragment() {
checkedIndex = bundle.getInt("checkedIndex") checkedIndex = bundle.getInt("checkedIndex")
} }
dialog.setCanceledOnTouchOutside(false) dialog?.setCanceledOnTouchOutside(false)
return inflater.inflate(R.layout.automation_dialog_choose_trigger, container, false) return inflater.inflate(R.layout.automation_dialog_choose_trigger, container, false)
} }

View file

@ -26,7 +26,7 @@ class EditActionDialog : DialogFragment() {
bundle.getString("action")?.let { action = Action.instantiate(JSONObject(it)) } bundle.getString("action")?.let { action = Action.instantiate(JSONObject(it)) }
} }
dialog.setCanceledOnTouchOutside(false) dialog?.setCanceledOnTouchOutside(false)
return inflater.inflate(R.layout.automation_dialog_action, container, false) return inflater.inflate(R.layout.automation_dialog_action, container, false)
} }

View file

@ -35,7 +35,7 @@ class EditEventDialog : DialogFragment() {
bundle.getString("event")?.let { event = AutomationEvent().fromJSON(it) } bundle.getString("event")?.let { event = AutomationEvent().fromJSON(it) }
} }
dialog.setCanceledOnTouchOutside(false) dialog?.setCanceledOnTouchOutside(false)
return inflater.inflate(R.layout.automation_dialog_event, container, false) return inflater.inflate(R.layout.automation_dialog_event, container, false)
} }

View file

@ -23,7 +23,7 @@ class EditTriggerDialog : DialogFragment() {
bundle.getString("trigger")?.let { trigger = Trigger.instantiate(it) } bundle.getString("trigger")?.let { trigger = Trigger.instantiate(it) }
} }
dialog.setCanceledOnTouchOutside(false) dialog?.setCanceledOnTouchOutside(false)
return inflater.inflate(R.layout.automation_dialog_edit_trigger, container, false) return inflater.inflate(R.layout.automation_dialog_edit_trigger, container, false)
} }

View file

@ -24,7 +24,7 @@ class ErrorDialog : DialogFragment() {
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?): View? { savedInstanceState: Bundle?): View? {
dialog.setTitle(title) dialog?.setTitle(title)
isCancelable = false isCancelable = false
savedInstanceState?.let { bundle -> savedInstanceState?.let { bundle ->

View file

@ -53,7 +53,7 @@ class WizardDialog : DialogFragment() {
private var disposable: CompositeDisposable = CompositeDisposable() private var disposable: CompositeDisposable = CompositeDisposable()
override fun onAttach(context: Context?) { override fun onAttach(context: Context) {
super.onAttach(context) super.onAttach(context)
this.parentContext = context this.parentContext = context
} }
@ -78,10 +78,10 @@ class WizardDialog : DialogFragment() {
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?): View? { savedInstanceState: Bundle?): View? {
dialog.window?.requestFeature(Window.FEATURE_NO_TITLE) dialog?.window?.requestFeature(Window.FEATURE_NO_TITLE)
dialog.window?.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN) dialog?.window?.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN)
isCancelable = true isCancelable = true
dialog.setCanceledOnTouchOutside(false) dialog?.setCanceledOnTouchOutside(false)
return inflater.inflate(R.layout.overview_wizard_dialog, container, false) return inflater.inflate(R.layout.overview_wizard_dialog, container, false)
} }

View file

@ -0,0 +1,125 @@
package info.nightscout.androidaps.plugins.pump.omnipod;
import org.joda.time.DateTime;
import info.nightscout.androidaps.data.Profile;
import info.nightscout.androidaps.data.PumpEnactResult;
import info.nightscout.androidaps.plugins.pump.common.data.TempBasalPair;
import info.nightscout.androidaps.plugins.pump.omnipod.comm.OmnipodCommunicationService;
import info.nightscout.androidaps.plugins.pump.omnipod.defs.OmnipodCommunicationManagerInterface;
import info.nightscout.androidaps.plugins.pump.omnipod.defs.PodInfoType;
import info.nightscout.androidaps.plugins.pump.omnipod.defs.PodInitActionType;
import info.nightscout.androidaps.plugins.pump.omnipod.defs.PodInitReceiver;
import info.nightscout.androidaps.plugins.pump.omnipod.defs.state.PodSessionState;
public class AapsOmnipodManager implements OmnipodCommunicationManagerInterface {
private final OmnipodManager delegate;
private static AapsOmnipodManager instance;
// FIXME this is dirty
public static AapsOmnipodManager getInstance() {
return instance;
}
public AapsOmnipodManager(OmnipodCommunicationService communicationService, PodSessionState podState) {
delegate = new OmnipodManager(communicationService, podState);
instance = this;
}
@Override
public PumpEnactResult initPod(PodInitActionType podInitActionType, PodInitReceiver podInitReceiver) {
if (PodInitActionType.PairAndPrimeWizardStep.equals(podInitActionType)) {
PumpEnactResult result = delegate.pairAndPrime();
podInitReceiver.returnInitTaskStatus(podInitActionType, result.success, (result.success ? null : result.comment));
return result;
} else if(PodInitActionType.FillCannulaWizardStep.equals(podInitActionType)) {
// FIXME we need a basal profile here
PumpEnactResult result = delegate.insertCannula(null);
podInitReceiver.returnInitTaskStatus(podInitActionType, result.success, (result.success ? null : result.comment));
return result;
}
return new PumpEnactResult().success(false).enacted(false).comment("Illegal PodInitActionType: "+ podInitActionType.name());
}
@Override
public PumpEnactResult getPodStatus() {
return delegate.getPodStatus();
}
@Override
public PumpEnactResult deactivatePod() {
return delegate.deactivatePod();
}
@Override
public PumpEnactResult setBasalProfile(Profile basalProfile) {
return delegate.setBasalProfile(basalProfile);
}
@Override
public PumpEnactResult resetPodStatus() {
return delegate.resetPodState();
}
@Override
public PumpEnactResult setBolus(Double amount) {
return delegate.bolus(amount);
}
@Override
public PumpEnactResult cancelBolus() {
return delegate.cancelBolus();
}
@Override
public PumpEnactResult setTemporaryBasal(TempBasalPair tempBasalPair) {
return delegate.setTemporaryBasal(tempBasalPair);
}
@Override
public PumpEnactResult cancelTemporaryBasal() {
return delegate.cancelTemporaryBasal();
}
@Override
public PumpEnactResult acknowledgeAlerts() {
return delegate.acknowledgeAlerts();
}
// TODO should we add this to the OmnipodCommunicationManager interface?
public PumpEnactResult getPodInfo(PodInfoType podInfoType) {
return delegate.getPodInfo(podInfoType);
}
// TODO should we add this to the OmnipodCommunicationManager interface?
public PumpEnactResult suspendDelivery() {
return delegate.suspendDelivery();
}
// TODO should we add this to the OmnipodCommunicationManager interface?
public PumpEnactResult resumeDelivery() {
return delegate.resumeDelivery();
}
// TODO should we add this to the OmnipodCommunicationManager interface?
public PumpEnactResult setTime() {
return delegate.setTime();
}
public OmnipodCommunicationService getCommunicationService() {
return delegate.getCommunicationService();
}
public DateTime getTime() {
return delegate.getTime();
}
public boolean isInitialized() {
return delegate.isInitialized();
}
public String getPodStateAsString() {
return delegate.getPodStateAsString();
}
}

View file

@ -32,25 +32,16 @@ import info.nightscout.androidaps.plugins.pump.omnipod.comm.action.service.SetTe
import info.nightscout.androidaps.plugins.pump.omnipod.comm.message.response.StatusResponse; import info.nightscout.androidaps.plugins.pump.omnipod.comm.message.response.StatusResponse;
import info.nightscout.androidaps.plugins.pump.omnipod.comm.message.response.podinfo.PodInfoResponse; import info.nightscout.androidaps.plugins.pump.omnipod.comm.message.response.podinfo.PodInfoResponse;
import info.nightscout.androidaps.plugins.pump.omnipod.defs.DeliveryType; import info.nightscout.androidaps.plugins.pump.omnipod.defs.DeliveryType;
import info.nightscout.androidaps.plugins.pump.omnipod.defs.OmnipodCommunicationManagerInterface;
import info.nightscout.androidaps.plugins.pump.omnipod.defs.PodInfoType; import info.nightscout.androidaps.plugins.pump.omnipod.defs.PodInfoType;
import info.nightscout.androidaps.plugins.pump.omnipod.defs.PodInitActionType;
import info.nightscout.androidaps.plugins.pump.omnipod.defs.PodInitReceiver;
import info.nightscout.androidaps.plugins.pump.omnipod.defs.SetupProgress; import info.nightscout.androidaps.plugins.pump.omnipod.defs.SetupProgress;
import info.nightscout.androidaps.plugins.pump.omnipod.defs.schedule.BasalScheduleMapper; import info.nightscout.androidaps.plugins.pump.omnipod.defs.schedule.BasalScheduleMapper;
import info.nightscout.androidaps.plugins.pump.omnipod.defs.state.PodSessionState; import info.nightscout.androidaps.plugins.pump.omnipod.defs.state.PodSessionState;
import info.nightscout.androidaps.plugins.pump.omnipod.util.OmnipodConst; import info.nightscout.androidaps.plugins.pump.omnipod.util.OmnipodConst;
import info.nightscout.androidaps.utils.SP; import info.nightscout.androidaps.utils.SP;
public class OmnipodManager implements OmnipodCommunicationManagerInterface { public class OmnipodManager {
private final OmnipodCommunicationService communicationService; private final OmnipodCommunicationService communicationService;
private PodSessionState podState; private PodSessionState podState;
private static OmnipodManager instance;
// FIXME this is dirty
public static OmnipodManager getInstance() {
return instance;
}
public OmnipodManager(OmnipodCommunicationService communicationService, PodSessionState podState) { public OmnipodManager(OmnipodCommunicationService communicationService, PodSessionState podState) {
if (communicationService == null) { if (communicationService == null) {
@ -58,10 +49,8 @@ public class OmnipodManager implements OmnipodCommunicationManagerInterface {
} }
this.communicationService = communicationService; this.communicationService = communicationService;
this.podState = podState; this.podState = podState;
instance = this;
} }
public PumpEnactResult insertCannula(Profile profile) { public PumpEnactResult insertCannula(Profile profile) {
if (podState == null || podState.getSetupProgress().isBefore(SetupProgress.PRIMING_FINISHED)) { if (podState == null || podState.getSetupProgress().isBefore(SetupProgress.PRIMING_FINISHED)) {
// TODO use string resource // TODO use string resource
@ -88,7 +77,6 @@ public class OmnipodManager implements OmnipodCommunicationManagerInterface {
return new PumpEnactResult().success(true).enacted(true); return new PumpEnactResult().success(true).enacted(true);
} }
public PumpEnactResult pairAndPrime() { public PumpEnactResult pairAndPrime() {
try { try {
if (podState == null) { if (podState == null) {
@ -114,7 +102,6 @@ public class OmnipodManager implements OmnipodCommunicationManagerInterface {
return new PumpEnactResult().success(true).enacted(true); return new PumpEnactResult().success(true).enacted(true);
} }
@Override
public PumpEnactResult cancelBolus() { public PumpEnactResult cancelBolus() {
if (!isInitialized()) { if (!isInitialized()) {
return createNotInitializedResult(); return createNotInitializedResult();
@ -131,12 +118,6 @@ public class OmnipodManager implements OmnipodCommunicationManagerInterface {
return new PumpEnactResult().success(true).enacted(true); return new PumpEnactResult().success(true).enacted(true);
} }
@Override
public PumpEnactResult initPod(PodInitActionType podInitActionType, PodInitReceiver podIniReceiver) {
return null;
}
@Override
public PumpEnactResult getPodStatus() { public PumpEnactResult getPodStatus() {
if (podState == null) { if (podState == null) {
// TODO use string resource // TODO use string resource
@ -155,7 +136,6 @@ public class OmnipodManager implements OmnipodCommunicationManagerInterface {
return new PumpEnactResult().success(true).enacted(true); return new PumpEnactResult().success(true).enacted(true);
} }
@Override
public PumpEnactResult deactivatePod() { public PumpEnactResult deactivatePod() {
if (podState == null) { if (podState == null) {
// TODO use string resource // TODO use string resource
@ -174,7 +154,6 @@ public class OmnipodManager implements OmnipodCommunicationManagerInterface {
return new PumpEnactResult().success(true).enacted(true); return new PumpEnactResult().success(true).enacted(true);
} }
@Override
public PumpEnactResult setBasalProfile(Profile basalProfile) { public PumpEnactResult setBasalProfile(Profile basalProfile) {
if (!isInitialized()) { if (!isInitialized()) {
return createNotInitializedResult(); return createNotInitializedResult();
@ -193,18 +172,6 @@ public class OmnipodManager implements OmnipodCommunicationManagerInterface {
return new PumpEnactResult().success(true).enacted(true); return new PumpEnactResult().success(true).enacted(true);
} }
@Override
public PumpEnactResult resetPodStatus() {
return null;
}
@Override
public PumpEnactResult setBolus(Double amount) {
return null;
}
// TODO rename back
public PumpEnactResult resetPodState() { public PumpEnactResult resetPodState() {
podState = null; podState = null;
SP.remove(OmnipodConst.Prefs.PodState); SP.remove(OmnipodConst.Prefs.PodState);
@ -212,7 +179,6 @@ public class OmnipodManager implements OmnipodCommunicationManagerInterface {
return new PumpEnactResult().success(true).enacted(true); return new PumpEnactResult().success(true).enacted(true);
} }
// TODO rename back
public PumpEnactResult bolus(Double units) { public PumpEnactResult bolus(Double units) {
if (!isInitialized()) { if (!isInitialized()) {
return createNotInitializedResult(); return createNotInitializedResult();
@ -229,7 +195,6 @@ public class OmnipodManager implements OmnipodCommunicationManagerInterface {
return new PumpEnactResult().success(true).enacted(true); return new PumpEnactResult().success(true).enacted(true);
} }
@Override
public PumpEnactResult setTemporaryBasal(TempBasalPair tempBasalPair) { public PumpEnactResult setTemporaryBasal(TempBasalPair tempBasalPair) {
if (!isInitialized()) { if (!isInitialized()) {
return createNotInitializedResult(); return createNotInitializedResult();
@ -248,7 +213,6 @@ public class OmnipodManager implements OmnipodCommunicationManagerInterface {
return new PumpEnactResult().success(true).enacted(true); return new PumpEnactResult().success(true).enacted(true);
} }
@Override
public PumpEnactResult cancelTemporaryBasal() { public PumpEnactResult cancelTemporaryBasal() {
if (!isInitialized()) { if (!isInitialized()) {
return createNotInitializedResult(); return createNotInitializedResult();
@ -265,7 +229,6 @@ public class OmnipodManager implements OmnipodCommunicationManagerInterface {
return new PumpEnactResult().success(true).enacted(true); return new PumpEnactResult().success(true).enacted(true);
} }
@Override
public PumpEnactResult acknowledgeAlerts() { public PumpEnactResult acknowledgeAlerts() {
if (!isInitialized()) { if (!isInitialized()) {
return createNotInitializedResult(); return createNotInitializedResult();
@ -299,7 +262,6 @@ public class OmnipodManager implements OmnipodCommunicationManagerInterface {
return new PumpEnactResult().success(true).enacted(true); return new PumpEnactResult().success(true).enacted(true);
} }
// TODO should we add this to the OmnipodCommunicationManager interface?
public PumpEnactResult suspendDelivery() { public PumpEnactResult suspendDelivery() {
if (!isInitialized()) { if (!isInitialized()) {
return createNotInitializedResult(); return createNotInitializedResult();
@ -316,7 +278,6 @@ public class OmnipodManager implements OmnipodCommunicationManagerInterface {
return new PumpEnactResult().success(true).enacted(true); return new PumpEnactResult().success(true).enacted(true);
} }
// TODO should we add this to the OmnipodCommunicationManager interface?
public PumpEnactResult resumeDelivery() { public PumpEnactResult resumeDelivery() {
if (!isInitialized()) { if (!isInitialized()) {
return createNotInitializedResult(); return createNotInitializedResult();
@ -334,7 +295,6 @@ public class OmnipodManager implements OmnipodCommunicationManagerInterface {
return new PumpEnactResult().success(true).enacted(true); return new PumpEnactResult().success(true).enacted(true);
} }
// TODO should we add this to the OmnipodCommunicationManager interface?
public PumpEnactResult setTime() { public PumpEnactResult setTime() {
if (!isInitialized()) { if (!isInitialized()) {
return createNotInitializedResult(); return createNotInitializedResult();

View file

@ -109,7 +109,7 @@ public class OmnipodPumpPlugin extends PumpPluginAbstract implements OmnipodPump
OmnipodUtil.setOmnipodPodType(OmnipodPodType.Eros); OmnipodUtil.setOmnipodPodType(OmnipodPodType.Eros);
if (omnipodCommunicationManager == null) { if (omnipodCommunicationManager == null) {
omnipodCommunicationManager = OmnipodManager.getInstance(); omnipodCommunicationManager = AapsOmnipodManager.getInstance();
} }
omnipodUIComm = new OmnipodUIComm(omnipodCommunicationManager); omnipodUIComm = new OmnipodUIComm(omnipodCommunicationManager);

View file

@ -4,11 +4,11 @@ import org.joda.time.Duration;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil; import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.comm.message.MessageBlock; import info.nightscout.androidaps.plugins.pump.omnipod.comm.message.MessageBlock;
import info.nightscout.androidaps.plugins.pump.omnipod.defs.BeepType; import info.nightscout.androidaps.plugins.pump.omnipod.defs.BeepConfigType;
import info.nightscout.androidaps.plugins.pump.omnipod.defs.MessageBlockType; import info.nightscout.androidaps.plugins.pump.omnipod.defs.MessageBlockType;
public class BeepConfigCommand extends MessageBlock { public class BeepConfigCommand extends MessageBlock {
private final BeepType beepType; private final BeepConfigType beepType;
private final boolean basalCompletionBeep; private final boolean basalCompletionBeep;
private final Duration basalIntervalBeep; private final Duration basalIntervalBeep;
private final boolean tempBasalCompletionBeep; private final boolean tempBasalCompletionBeep;
@ -16,7 +16,7 @@ public class BeepConfigCommand extends MessageBlock {
private final boolean bolusCompletionBeep; private final boolean bolusCompletionBeep;
private final Duration bolusIntervalBeep; private final Duration bolusIntervalBeep;
public BeepConfigCommand(BeepType beepType, boolean basalCompletionBeep, Duration basalIntervalBeep, public BeepConfigCommand(BeepConfigType beepType, boolean basalCompletionBeep, Duration basalIntervalBeep,
boolean tempBasalCompletionBeep, Duration tempBasalIntervalBeep, boolean tempBasalCompletionBeep, Duration tempBasalIntervalBeep,
boolean bolusCompletionBeep, Duration bolusIntervalBeep) { boolean bolusCompletionBeep, Duration bolusIntervalBeep) {
this.beepType = beepType; this.beepType = beepType;
@ -30,7 +30,7 @@ public class BeepConfigCommand extends MessageBlock {
encode(); encode();
} }
public BeepConfigCommand(BeepType beepType) { public BeepConfigCommand(BeepConfigType beepType) {
this(beepType, false, Duration.ZERO, false, Duration.ZERO, false, Duration.ZERO); this(beepType, false, Duration.ZERO, false, Duration.ZERO, false, Duration.ZERO);
} }

View file

@ -0,0 +1,41 @@
package info.nightscout.androidaps.plugins.pump.omnipod.defs;
// BeepConfigType is used only for the $1E Beep Config Command.
public enum BeepConfigType {
// 0x0 always returns an error response for Beep Config (use 0xF for no beep)
BEEP_BEEP_BEEP_BEEP((byte) 0x01),
BIP_BEEP_BIP_BEEP_BIP_BEEP_BIP_BEEP((byte) 0x02),
BIP_BIP((byte) 0x03),
BEEP((byte) 0x04),
BEEP_BEEP_BEEP((byte) 0x05),
BEEEEEEP((byte) 0x06),
BIP_BIP_BIP_BIP_BIP_BIP((byte) 0x07),
BEEEP_BEEEP((byte) 0x08),
// 0x9 and 0xA always return an error response for Beep Config
BEEP_BEEP((byte) 0xB),
BEEEP((byte) 0xC),
BIP_BEEEEEP((byte) 0xD),
FIVE_SECONDS_BEEP((byte) 0xE), // can only be used if Pod is currently suspended
NO_BEEP((byte) 0xF);
private byte value;
BeepConfigType(byte value) {
this.value = value;
}
public static BeepConfigType fromByte(byte value) {
for (BeepConfigType type : values()) {
if (type.value == value) {
return type;
}
}
throw new IllegalArgumentException("Unknown BeepConfigType: " + value);
}
public byte getValue() {
return value;
}
}

View file

@ -1,5 +1,6 @@
package info.nightscout.androidaps.plugins.pump.omnipod.defs; package info.nightscout.androidaps.plugins.pump.omnipod.defs;
// BeepType is used for the $19 Configure Alerts and $1F Cancel Commands
public enum BeepType { public enum BeepType {
NO_BEEP((byte) 0x00), NO_BEEP((byte) 0x00),
BEEP_BEEP_BEEP_BEEP((byte) 0x01), BEEP_BEEP_BEEP_BEEP((byte) 0x01),
@ -9,12 +10,7 @@ public enum BeepType {
BEEP_BEEP_BEEP((byte) 0x05), BEEP_BEEP_BEEP((byte) 0x05),
BEEEEEEP((byte) 0x06), BEEEEEEP((byte) 0x06),
BIP_BIP_BIP_BIP_BIP_BIP((byte) 0x07), BIP_BIP_BIP_BIP_BIP_BIP((byte) 0x07),
BEEEP_BEEEP((byte) 0x08), BEEEP_BEEEP((byte) 0x08);
BEEP_BEEP((byte) 0xB),
BEEEP((byte) 0xC),
BIP_BEEEEEP((byte) 0xD),
FIVE_SECONDS_BEEP((byte) 0xE),
BEEP_CONFIG_NO_BEEP((byte) 0xF);
private byte value; private byte value;

View file

@ -11,14 +11,7 @@ public interface OmnipodCommunicationManagerInterface {
/** /**
* Initialize Pod * Initialize Pod
*/ */
PumpEnactResult initPod(PodInitActionType podInitActionType, PodInitReceiver podIniReceiver); PumpEnactResult initPod(PodInitActionType podInitActionType, PodInitReceiver podInitReceiver);
// TODO remove
//PumpEnactResult pairAndPrime();
// TODO remove
//PumpEnactResult insertCannula(Profile basalProfile);
/** /**
* Get Pod Status (is pod running, battery left ?, reservoir, etc) * Get Pod Status (is pod running, battery left ?, reservoir, etc)

View file

@ -23,7 +23,7 @@ import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLin
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLinkTargetDevice; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLinkTargetDevice;
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.RileyLinkService; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.RileyLinkService;
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.RileyLinkServiceData; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.RileyLinkServiceData;
import info.nightscout.androidaps.plugins.pump.omnipod.OmnipodManager; import info.nightscout.androidaps.plugins.pump.omnipod.AapsOmnipodManager;
import info.nightscout.androidaps.plugins.pump.omnipod.OmnipodPumpPlugin; import info.nightscout.androidaps.plugins.pump.omnipod.OmnipodPumpPlugin;
import info.nightscout.androidaps.plugins.pump.omnipod.comm.OmnipodCommunicationService; import info.nightscout.androidaps.plugins.pump.omnipod.comm.OmnipodCommunicationService;
import info.nightscout.androidaps.plugins.pump.omnipod.defs.OmnipodCommunicationManagerInterface; import info.nightscout.androidaps.plugins.pump.omnipod.defs.OmnipodCommunicationManagerInterface;
@ -112,7 +112,7 @@ public class RileyLinkOmnipodService extends RileyLinkService {
} }
private void initializeErosOmnipodManager() { private void initializeErosOmnipodManager() {
if(OmnipodManager.getInstance() == null) { if(AapsOmnipodManager.getInstance() == null) {
PodSessionState podState = null; PodSessionState podState = null;
if (SP.contains(OmnipodConst.Prefs.PodState)) { if (SP.contains(OmnipodConst.Prefs.PodState)) {
try { try {
@ -123,9 +123,9 @@ public class RileyLinkOmnipodService extends RileyLinkService {
LOG.error("Could not deserialize Pod state: " + ex.getClass().getSimpleName() + ": " + ex.getMessage()); LOG.error("Could not deserialize Pod state: " + ex.getClass().getSimpleName() + ": " + ex.getMessage());
} }
} }
omnipodCommunicationManager = new OmnipodManager(new OmnipodCommunicationService(rfspy), podState); omnipodCommunicationManager = new AapsOmnipodManager(new OmnipodCommunicationService(rfspy), podState);
} else { } else {
omnipodCommunicationManager = OmnipodManager.getInstance(); omnipodCommunicationManager = AapsOmnipodManager.getInstance();
} }
} }
@ -137,8 +137,8 @@ public class RileyLinkOmnipodService extends RileyLinkService {
@Override @Override
public RileyLinkCommunicationManager getDeviceCommunicationManager() { public RileyLinkCommunicationManager getDeviceCommunicationManager() {
if(omnipodCommunicationManager instanceof OmnipodManager) { // Eros if(omnipodCommunicationManager instanceof AapsOmnipodManager) { // Eros
return ((OmnipodManager) omnipodCommunicationManager).getCommunicationService(); return ((AapsOmnipodManager) omnipodCommunicationManager).getCommunicationService();
} }
// FIXME is this correct for Dash? // FIXME is this correct for Dash?
return (RileyLinkCommunicationManager)omnipodCommunicationManager; return (RileyLinkCommunicationManager)omnipodCommunicationManager;

View file

@ -21,7 +21,7 @@ class WizardInfoDialog : DialogFragment() {
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
savedInstanceState: Bundle?): View? { savedInstanceState: Bundle?): View? {
dialog.window?.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN) dialog?.window?.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN)
isCancelable = true isCancelable = true
return inflater.inflate(R.layout.treatments_wizardinfo_dialog, container, false) return inflater.inflate(R.layout.treatments_wizardinfo_dialog, container, false)
} }

View file

@ -84,7 +84,7 @@ class ProfileViewerDialog : DialogFragment() {
} }
override fun onResume() { override fun onResume() {
dialog.window?.setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT) dialog?.window?.setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)
super.onResume() super.onResume()
} }

View file

@ -1,27 +1,28 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<string name="dia_whatmeansdia">What is true about DIA?</string> <string name="dia_whatmeansdia">What is true about DIA?</string>
<string name="dia_meaningofdia">Meaning of DIA</string> <string name="dia_label">Topic: Duration of Insulin Action</string>
<string name="dia_minimumis3h">The predetermined minimum is 3 hours.</string> <string name="dia_minimumis3h">The predetermined minimum is 3 hours.</string>
<string name="dia_minimumis5h">The predetermined minimum is 5 hours.</string> <string name="dia_minimumis5h">The predetermined minimum is 5 hours.</string>
<string name="dia_hint1">https://androidaps.readthedocs.io/en/latest/EN/Configuration/Config-Builder.html?#insulin</string> <string name="dia_hint1">https://androidaps.readthedocs.io/en/latest/EN/Configuration/Config-Builder.html?#insulin</string>
<string name="dia_meaningisequaltodiapump">It is equal to the DIA parameter used in your pump.</string> <string name="dia_meaningisequaltodiapump">It is equal to the DIA parameter used in your pump.</string>
<string name="dia_valuemustbedetermined">You have to determine your individual value (but not less than 5 hours).</string> <string name="dia_valuemustbedetermined">You have to determine your individual value (but not less than 5 hours).</string>
<string name="hypott">Hypo temp target</string> <string name="hypott_label">Topic: Hypo Temp-Target</string>
<string name="hypott_whenhypott">Why is it useful to set a hypo TT?</string> <string name="hypott_whenhypott">Why is it useful to set a hypo TT?</string>
<string name="hypott_goinglow">Prevent to be low.</string> <string name="hypott_goinglow">Prevent BG from going low.</string>
<string name="hypott_havinglow">To help recovering from a low BG.</string> <string name="hypott_havinglow">To help recovering from a low BG.</string>
<string name="hypott_preventoversmb">To prevent SMB after a hypo rise from fast carbs</string> <string name="hypott_preventoversmb">To prevent SMB enactment after a hypo rise from fast carbs.</string>
<string name="hypott_hint1">https://androidaps.readthedocs.io/en/latest/EN/Usage/temptarget.html</string> <string name="hypott_hint1">https://androidaps.readthedocs.io/en/latest/EN/Usage/temptarget.html</string>
<string name="offlineprofile_whatprofile">Which profile can be used and configured offline?</string> <string name="offlineprofile_whatprofile">Which profile can be used and configured offline?</string>
<string name="offlineprofile">Offline profile</string> <string name="offlineprofile_label">Topic: Offline Profile</string>
<string name="offlineprofile_nsprofile">NS Profile can be used but not configured</string> <string name="offlineprofile_nsprofile">NS Profile can be used, but not configured.</string>
<string name="offlineprofile_hint1">https://androidaps.readthedocs.io/en/latest/EN/Configuration/Config-Builder.html#profile</string> <string name="offlineprofile_hint1">https://androidaps.readthedocs.io/en/latest/EN/Configuration/Config-Builder.html#profile</string>
<string name="pumpdisconnect">Taking off pump</string> <string name="pumpdisconnect_label">Topic: Disconnecting from the Pump</string>
<string name="pumpdisconnect_whattodo">What to do when taking the pump off?</string> <string name="pumpdisconnect_whattodo">What to do when taking the pump off?</string>
<string name="pumpdisconnect_letknow">Let loop know that there is no insulin running to your body by clicking disconnect pump.</string> <string name="pumpdisconnect_letknow">Let the loop know that there is no insulin being delivered to your body by clicking disconnect pump.</string>
<string name="pumpdisconnect_dontchnage">Don\'t change anything in loop, just take it off.</string> <string name="pumpdisconnect_dontchnage">Don\'t change anything in loop, just take the pump off.</string>
<string name="pumpdisconnect_hint1">https://androidaps.readthedocs.io/en/latest/EN/Getting-Started/FAQ.html#other-settings</string> <string name="pumpdisconnect_hint1">https://androidaps.readthedocs.io/en/latest/EN/Getting-Started/FAQ.html#other-settings</string>
<string name="objectives_label">Topic: AndroidAPS Settings</string>
<string name="objectives_howtosave">What are best practices to backup your settings?</string> <string name="objectives_howtosave">What are best practices to backup your settings?</string>
<string name="objectives_exportsettings">Locally export them from Maintenance menu.</string> <string name="objectives_exportsettings">Locally export them from Maintenance menu.</string>
<string name="objectives_storeelsewhere">Store exported file to another place like email, Dropbox, Google drive…</string> <string name="objectives_storeelsewhere">Store exported file to another place like email, Dropbox, Google drive…</string>
@ -30,118 +31,128 @@
<string name="objectives_doexportafterfirtssettings">Export them when you finish initial settings.</string> <string name="objectives_doexportafterfirtssettings">Export them when you finish initial settings.</string>
<string name="objectives_hint1">https://androidaps.readthedocs.io/en/latest/EN/Usage/ExportImportSettings.html</string> <string name="objectives_hint1">https://androidaps.readthedocs.io/en/latest/EN/Usage/ExportImportSettings.html</string>
<string name="objectives_hint2">https://androidaps.readthedocs.io/en/latest/EN/Getting-Started/FAQ.html#what-emergency-equipment-is-recommended-to-take-with-me</string> <string name="objectives_hint2">https://androidaps.readthedocs.io/en/latest/EN/Getting-Started/FAQ.html#what-emergency-equipment-is-recommended-to-take-with-me</string>
<string name="noisycgm">Noisy CGM</string> <string name="noisycgm_label">Topic: Noisy CGM Readings</string>
<string name="noisycgm_whattodo">What to do when you see CGM signals are too noisy?</string> <string name="noisycgm_whattodo">What to do when you see CGM signals are too noisy?</string>
<string name="nothing">Nothing, the loop will deal with it.</string> <string name="nothing">Nothing, the loop will deal with it.</string>
<string name="noisycgm_pause">Pause closed loop mode to avoid overdosing.</string> <string name="noisycgm_pause">Pause closed-loop mode to avoid overdosing.</string>
<string name="noisycgm_replacesensor">Replace sensor</string> <string name="noisycgm_replacesensor">Replace the CGM sensor.</string>
<string name="noisycgm_turnoffphone">Turn off the phone.</string> <string name="noisycgm_turnoffphone">Turn off the phone.</string>
<string name="noisycgm_hint1">https://androidaps.readthedocs.io/en/latest/EN/Usage/Smoothing-Blood-Glucose-Data-in-xDrip.html#smoothing-blood-glucose-data</string> <string name="noisycgm_hint1">https://androidaps.readthedocs.io/en/latest/EN/Usage/Smoothing-Blood-Glucose-Data-in-xDrip.html#smoothing-blood-glucose-data</string>
<string name="noisycgm_checksmoothing">Check if your CGM app smoothes data.</string> <string name="noisycgm_checksmoothing">Check if your CGM app smoothes data.</string>
<string name="exercise">Exercise</string> <string name="exercise_label">Topic: Exercise</string>
<string name="exercise_whattodo">How is the best practice to help the system deal with exercise</string> <string name="exercise_whattodo">How can you help the system deal with exercise?</string>
<string name="exercise_setactivitytt">Set activity temp target</string> <string name="exercise_setactivitytt">Set an activity temp-target.</string>
<string name="exercise_switchprofilebelow100">Do a profile switch below 100%</string> <string name="exercise_switchprofilebelow100">Do a profile switch below 100%.</string>
<string name="exercise_switchprofileabove100">Do profile switch above 100%</string> <string name="exercise_switchprofileabove100">Do a profile switch above 100%.</string>
<string name="exercise_stoploop">Stop loop</string> <string name="exercise_stoploop">Stop the loop.</string>
<string name="exercise_doitbeforestart">Help before start exercise</string> <string name="exercise_doitbeforestart">Set activity temp-target before the start of exercise.</string>
<string name="exercise_doitafterstart">Help after start exercise</string> <string name="exercise_doitafterstart">Set activity temp-target after the start of exercise.</string>
<string name="exercise_hint1">https://androidaps.readthedocs.io/en/latest/EN/Usage/temptarget.html#activity-temp-target</string> <string name="exercise_hint1">https://androidaps.readthedocs.io/en/latest/EN/Usage/temptarget.html#activity-temp-target</string>
<string name="suspendloop_doigetinsulin">Do I get insuling when loop is suspended?</string> <string name="suspendloop_label">Topic: Suspended Loop</string>
<string name="suspendloop_yes">Yes, common basal rate</string> <string name="suspendloop_doigetinsulin">Do I get insulin when loop is suspended?</string>
<string name="suspendloop_no">No, delivering of insulin is stopped</string> <string name="suspendloop_yes">Yes, the common basal rate.</string>
<string name="basaltest">Basal and ISF, IC testing</string> <string name="suspendloop_no">No, delivery of insulin is stopped.</string>
<string name="basaltest_when">When should I test basals, ISF and IC?</string> <string name="basaltest_label">Topic: Basal, ISF, and IC Testing</string>
<string name="basaltest_beforeloop">Before I start looping</string> <string name="basaltest_when">When should I validate basals, ISF, and IC values?</string>
<string name="basaltest_havingregularhypo">When having regular hypos</string> <string name="basaltest_beforeloop">Before I start looping.</string>
<string name="basaltest_havingregularhyper">When having regular hypers</string> <string name="basaltest_havingregularhypo">When having regular hypos BG\'s.</string>
<string name="basaltest_havingregularhyper">When having regular hypers BG\'s.</string>
<string name="basaltest_hint1">https://androidaps.readthedocs.io/en/latest/EN/Getting-Started/FAQ.html#androidaps-settings</string> <string name="basaltest_hint1">https://androidaps.readthedocs.io/en/latest/EN/Getting-Started/FAQ.html#androidaps-settings</string>
<string name="prerequisites">Prerequisites</string> <string name="prerequisites_label">Topic: Prerequisites</string>
<string name="prerequisites_what">What do I need?</string> <string name="prerequisites_what">What do I need?</string>
<string name="prerequisites_determinedcorrectprofile">Determined correct profile (Basals, IC, ISF, DIA)</string> <string name="prerequisites_determinedcorrectprofile">Determined correct profile (Basals, IC, ISF, DIA).</string>
<string name="prerequisites_computer">Computer to create an APK</string> <string name="prerequisites_computer">A computer to create an APK.</string>
<string name="prerequisites_phone">Supported phone</string> <string name="prerequisites_phone">A supported phone.</string>
<string name="prerequisites_car">Car</string> <string name="prerequisites_car">A Car.</string>
<string name="prerequisites_nightscout">Nightscout to pass objectives</string> <string name="prerequisites_nightscout">Nightscout to pass the objectives.</string>
<string name="prerequisites_tidepoolaccount">Tidepool account</string> <string name="prerequisites_tidepoolaccount">A Tidepool account.</string>
<string name="prerequisites_googleaccount">Google account</string> <string name="prerequisites_googleaccount">A Google account.</string>
<string name="prerequisites_githubaccount">Github account</string> <string name="prerequisites_githubaccount">A Github account.</string>
<string name="prerequisites_beanandroiddeveloper">To be an Android developer</string> <string name="prerequisites_beanandroiddeveloper">Need to be an Android developer.</string>
<string name="prerequisites_own670g">Own a 670g pump</string> <string name="prerequisites_own670g">A MiniMed 670G pump.</string>
<string name="prerequisites_hint1">https://androidaps.readthedocs.io/en/latest/EN/Module/module.html</string> <string name="prerequisites_hint1">https://androidaps.readthedocs.io/en/latest/EN/Module/module.html</string>
<string name="prerequisites_smartwatch">Smartwatch</string> <string name="prerequisites_smartwatch">A Smartwatch.</string>
<string name="prerequisites_supportedcgm">Supported CGM</string> <string name="prerequisites_supportedcgm">A Supported CGM.</string>
<string name="update_update">Updating of AndroidAPS</string> <string name="update_label">Topic: Updating of AndroidAPS</string>
<string name="whatistrue">What is true?</string> <string name="whatistrue">What is true?</string>
<string name="update_git">You need to have Git installed</string> <string name="update_git">You need to have Git installed.</string>
<string name="update_asap">Update as soon as new version is released</string> <string name="update_asap">Update as soon as new version is released.</string>
<string name="update_keys">Use the same signing keys</string> <string name="update_keys">You can use the same signing keys.</string>
<string name="update_neverupdate">Never update if system is working well</string> <string name="update_neverupdate">Never update if the system is working well.</string>
<string name="update_askfriend">Ask your friend for new APK</string> <string name="update_askfriend">Ask your friend for the new APK.</string>
<string name="update_hint1">https://androidaps.readthedocs.io/en/latest/EN/Installing-AndroidAPS/Update-to-new-version.html#update-to-a-new-version-or-branch</string> <string name="update_hint1">https://androidaps.readthedocs.io/en/latest/EN/Installing-AndroidAPS/Update-to-new-version.html#update-to-a-new-version-or-branch</string>
<string name="troubleshooting">Troubleshooting</string> <string name="troubleshooting_label">Topic: Troubleshooting</string>
<string name="troubleshooting_wheretoask">Where to look for help?</string> <string name="troubleshooting_wheretoask">Where to look for help?</string>
<string name="troubleshooting_fb">Facebook group</string> <string name="troubleshooting_fb">Join the AndroidAPS Facebook group.</string>
<string name="troubleshooting_wiki">Wiki</string> <string name="troubleshooting_wiki">Visit the AndroidAPS Wiki.</string>
<string name="troubleshooting_gitter">Gitter</string> <string name="troubleshooting_gitter">Visit AndroidAPS Gitter Room.</string>
<string name="troubleshooting_googlesupport">Google support</string> <string name="troubleshooting_googlesupport">Visit AndroidAPS Google support</string>
<string name="troubleshooting_yourendo">Your endo</string> <string name="troubleshooting_yourendo">Speak to your endocrinologist.</string>
<string name="troubleshooting_hint1">https://androidaps.readthedocs.io/en/latest/EN/Installing-AndroidAPS/Update-to-new-version.html#troubleshooting</string> <string name="troubleshooting_hint1">https://androidaps.readthedocs.io/en/latest/EN/Installing-AndroidAPS/Update-to-new-version.html#troubleshooting</string>
<string name="troubleshooting_hint2">https://www.facebook.com/groups/AndroidAPSUsers/</string> <string name="troubleshooting_hint2">https://www.facebook.com/groups/AndroidAPSUsers/</string>
<string name="troubleshooting_hint3">https://gitter.im/MilosKozak/AndroidAPS</string> <string name="troubleshooting_hint3">https://gitter.im/MilosKozak/AndroidAPS</string>
<string name="insulin">Insulin</string> <string name="insulin_label">Topic: Insulin</string>
<string name="insulin_ultrarapid">Which insulin can be used with Ultra-Rapid-Oref plugin?</string> <string name="insulin_ultrarapid">Which brand of insulin can be used with Ultra-Rapid-Oref plugin?</string>
<string name="insulin_fiasp">Fiasp</string> <string name="insulin_fiasp">Fiasp®</string>
<string name="insulin_novorapid">Novorapid</string> <string name="insulin_novorapid">NovoRapid®</string>
<string name="insulin_humalog">Humalog</string> <string name="insulin_humalog">Humalog®</string>
<string name="insulin_actrapid">Actrapid</string> <string name="insulin_actrapid">Actrapid®</string>
<string name="insulin_hint1">https://androidaps.readthedocs.io/en/latest/EN/Configuration/Config-Builder.html#insulin</string> <string name="insulin_hint1">https://androidaps.readthedocs.io/en/latest/EN/Configuration/Config-Builder.html#insulin</string>
<string name="sensitivity">Sensitivity plugin</string> <string name="sensitivity_label">Topic: Sensitivity Plugin</string>
<string name="sensitivity_which">Which sensitivity plugin has user defined time range for detection?</string> <string name="sensitivity_which">Which sensitivity plugin has user defined time range for detection?</string>
<string name="sensitivity_hint1">https://androidaps.readthedocs.io/en/latest/EN/Configuration/Sensitivity-detection-and-COB.html</string> <string name="sensitivity_hint1">https://androidaps.readthedocs.io/en/latest/EN/Configuration/Sensitivity-detection-and-COB.html</string>
<string name="sensitivityuam_which">Which sensitivity plugin must be used for UAM?</string> <string name="sensitivityuam_which">Which sensitivity plugin must be used for the UAM feature?</string>
<string name="wrongcarbs">Wrong carbs</string> <string name="wrongcarbs_label">Topic: Wrong Carb Entries</string>
<string name="wrongcarbs_whattodo">You see you have entered wrong carbs. What should you do?</string> <string name="wrongcarbs_whattodo">You see you have entered wrong carbs. What should you do?</string>
<string name="wrongcarbs_treatmentstab">Go to treatments, delete wrong carbs and enter new carbs</string> <string name="wrongcarbs_treatmentstab">Go to Treatments, delete wrong carbs and enter new carbs.</string>
<string name="wrongcarbs_addfakeinsulin">Add fake insulin by using Refill function</string> <string name="wrongcarbs_addfakeinsulin">Add fake insulin by using Refill function</string>
<string name="extendedcarbs">Food with fat and protein</string> <string name="extendedcarbs_label">Topic: Food with Fat and Protein</string>
<string name="extendedcarbs_handling">What to do if your food contains larger amount of fat or proteins?</string> <string name="extendedcarbs_handling">What to do if your food contains a large amount of fat and\/or proteins?</string>
<string name="extendedcarbs_useextendedcarbs">Recalculate fat and proteins to carbs and use \"Extended carbs\" feature to tell system about it</string> <string name="extendedcarbs_useextendedcarbs">Recalculate fat and proteins to carbs and use \"Extended carbs\" feature.</string>
<string name="extendedcarbs_add">Recalculate fat and proteins to carbs and add it to bolus calculation</string> <string name="extendedcarbs_add">Recalculate fat and proteins to carbs and add it to bolus calculation.</string>
<string name="extendedcarbs_useextendedbolus">Use extended bolus to cover fat and proteins</string> <string name="extendedcarbs_useextendedbolus">Use extended bolus to cover fat and proteins.</string>
<string name="extendedcarbs_hint1">https://androidaps.readthedocs.io/en/latest/EN/Usage/Extended-Carbs.html</string> <string name="extendedcarbs_hint1">https://androidaps.readthedocs.io/en/latest/EN/Usage/Extended-Carbs.html</string>
<string name="nsclient_monitoring">Monitoring children</string> <string name="nsclient_label">Topic: Monitoring Children</string>
<string name="nsclient_howcanyou">How can you monitor AAPS of your child remotely?</string> <string name="nsclient_howcanyou">How can you monitor AAPS of your child remotely?</string>
<string name="nightscout">Nightscout</string> <string name="nsclient_nightscout">Using a Nightscout site.</string>
<string name="dexcomfollow">Dexcom follow if you are using original Dexcom app</string> <string name="nsclient_dexcomfollow">Dexcom Follow app if you are using the original Dexcom app.</string>
<string name="dexcomfollowxdrip">Dexcom follow if you are using xDrip</string> <string name="nsclient_dexcomfollowxdrip">Dexcom Follow if you are using the xDrip app.</string>
<string name="xdripfollower">xDrip in follower mode</string> <string name="nsclient_xdripfollower">xDrip running in follower mode.</string>
<string name="looponiphone">Loop app on iPhone</string> <string name="nsclient_looponiphone">Loop app on iPhone.</string>
<string name="spikeiphone">Spike on iPhone</string> <string name="nsclient_spikeiphone">Spike app on iPhone.</string>
<string name="isf_increasingvalue">Assume you have high glycemia. Increasing ISF number will lead to giving less insulin if you try to correct high glycemia by bolus wizard</string> <string name="isf_label">Topic: Insulin Sensitivity Factor</string>
<string name="isf_decreasingvalue">Assume you have high glycemia. Decreasing ISF number will lead to giving less insulin if you try to correct high glycemia by bolus wizard</string> <string name="isf_increasingvalue">Increasing ISF number will lead to less insulin delivery if you are trying to lower your BG with the bolus wizard.</string>
<string name="isf_noeffect">Changing ISF has no effect on amount of insulin given by APS when trying to correct high glycemia</string> <string name="isf_decreasingvalue">Decreasing ISF number will lead to less insulin delivery if you are trying to lower your BG with the bolus wizard.</string>
<string name="isf_preferences">You have to enter ISF in preferences</string> <string name="isf_noeffect">Changing ISF has no effect on amount of insulin given by AAPS when trying to correct hyperglycemia.</string>
<string name="isf_profile">Changing ISF in profile is enough to apply the change</string> <string name="isf_preferences">You have to enter ISF in Preferences.</string>
<string name="isf_profile">Changing the ISF value in your profile is enough to apply the change.</string>
<string name="isf_hint1">https://androidaps.readthedocs.io/en/latest/EN/Getting-Started/FAQ.html#insulin-sensitivity-factor-isf-mmol-l-u-or-mg-dl-u</string> <string name="isf_hint1">https://androidaps.readthedocs.io/en/latest/EN/Getting-Started/FAQ.html#insulin-sensitivity-factor-isf-mmol-l-u-or-mg-dl-u</string>
<string name="isf_hint2">https://androidaps.readthedocs.io/en/latest/EN/Usage/Profiles.html</string> <string name="isf_hint2">https://androidaps.readthedocs.io/en/latest/EN/Usage/Profiles.html</string>
<string name="ic_increasingvalue">Increasing IC value will lead to giving less insulin for the same amount of carbs</string> <string name="ic_label">Topic: The IC Value</string>
<string name="ic_decreasingvalue">Decreasing IC value will lead to giving less insulin for the same amount of carbs</string> <string name="ic_increasingvalue">Increasing the IC value will lead to less insulin delivery for the same amount of carbs.</string>
<string name="ic_noeffect">Assume you have no active carbs. Changing IC will lead to different amount of insuling to correct your glycemia</string> <string name="ic_decreasingvalue">Decreasing the IC value will lead to less insulin delivery for the same amount of carbs.</string>
<string name="ic_different">IC will be different if you count bread unit as 10g or 12g</string> <string name="ic_noeffect">Assume you have 0 COB. Changing IC will lead to a different amount of insulin to correct your BG number.</string>
<string name="ic_meaning">IC meaning is: How much bread units is covered by 1U of insulin</string> <string name="ic_different">IC will be different if you count bread unit as 10g or 12g.</string>
<string name="ic_meaning">IC meaning is: How many bread units are covered by 1U of insulin.</string>
<string name="ic_hint1">https://androidaps.readthedocs.io/en/latest/EN/Getting-Started/FAQ.html#carbohydrate-to-insulin-ratio-cr-g-u</string> <string name="ic_hint1">https://androidaps.readthedocs.io/en/latest/EN/Getting-Started/FAQ.html#carbohydrate-to-insulin-ratio-cr-g-u</string>
<string name="profileswitch_pctwillchange">By specifying 90% in profile switch</string> <string name="profileswitch_label">Topic: Profile Switching</string>
<string name="profileswitch_basalhigher">Basals will be 10% higher</string> <string name="profileswitch_pctwillchange"> When specifying 90% in profile switch…</string>
<string name="profileswitch_basallower">Basals will be 10% lower</string> <string name="profileswitch_basalhigher">Basals will be 10% higher.</string>
<string name="profileswitch_ichigher">IC value will be 10% higher</string> <string name="profileswitch_basallower">Basals will be 10% lower.</string>
<string name="profileswitch_iclower">IC value will be 10% lower</string> <string name="profileswitch_ichigher">IC value will be 10% higher.</string>
<string name="profileswitch_isfhigher">ISF value will be 10% higher</string> <string name="profileswitch_iclower">IC value will be 10% lower.</string>
<string name="profileswitch_isflower">ISF value will be 10% lower</string> <string name="profileswitch_isfhigher">ISF value will be 10% higher.</string>
<string name="profileswitch_overall">You will get around 10% less insulin in total</string> <string name="profileswitch_isflower">ISF value will be 10% lower.</string>
<string name="profileswitch_targethigher">Target wiil be 10% higher</string> <string name="profileswitch_overall">You will get 10% less insulin in total.</string>
<string name="profileswitch_targetlower">Target will be 10% lower</string> <string name="profileswitch_targethigher">Target wiil be 10% higher.</string>
<string name="profileswitch_targetbottom">Only bottom target will be 10% lower</string> <string name="profileswitch_targetlower">Target will be 10% lower.</string>
<string name="profileswitch_targetbottom">Only bottom target will be 10% lower.</string>
<string name="profileswitch_hint1">https://androidaps.readthedocs.io/en/latest/EN/Usage/Profiles.html?highlight=profile%20switch#profile-switch</string> <string name="profileswitch_hint1">https://androidaps.readthedocs.io/en/latest/EN/Usage/Profiles.html?highlight=profile%20switch#profile-switch</string>
<string name="profileswitchtime_iwant">I want to do a profile switch because I had to wake up 1h earlier than usually, so it makes more sense to announce the change by the time shift with a profile switch. What number should I use?</string>
<string name="profileswitchtime_1">1</string>
<string name="profileswitchtime__1">-1</string>
<string name="profileswitchtime_hint1">https://androidaps.readthedocs.io/en/latest/EN/Usage/Profiles.html?highlight=profile%20switch#timeshift</string>
<string name="profileswitchtime_60">60</string>
<string name="profileswitchtime__60">-60</string>
</resources> </resources>

View file

@ -722,7 +722,7 @@
<string name="valuesnotstored">Values not stored!</string> <string name="valuesnotstored">Values not stored!</string>
<string name="combopump" translatable="false">Accu-Chek Combo</string> <string name="combopump" translatable="false">Accu-Chek Combo</string>
<string name="combopump_shortname" translatable="false">COMBO</string> <string name="combopump_shortname" translatable="false">COMBO</string>
<string name="ns_localbroadcasts">Enable broadcasts to other apps (like xDrip).</string> <string name="ns_localbroadcasts">Enable broadcasts to other apps (like xDrip). Do not enable if you have more than one instance of AAPS or NSClient installed!</string>
<string name="ns_localbroadcasts_title">Enable local Broadcasts.</string> <string name="ns_localbroadcasts_title">Enable local Broadcasts.</string>
<string name="careportal_activity_label">ACTIVITY &amp; FEEDBACK</string> <string name="careportal_activity_label">ACTIVITY &amp; FEEDBACK</string>
<string name="careportal_carbsandbolus_label">CARBS &amp; BOLUS</string> <string name="careportal_carbsandbolus_label">CARBS &amp; BOLUS</string>
@ -1516,7 +1516,7 @@
<string name="rileylink_state_not_started">Not Started</string> <string name="rileylink_state_not_started">Not Started</string>
<string name="rileylink_state_rl_init">RileyLink Initialization…</string> <string name="rileylink_state_rl_init">RileyLink Initialization…</string>
<string name="rileylink_state_rl_error">RileyLink Error</string> <string name="rileylink_state_rl_error">RileyLink Error</string>
<string name="rileylink_state_pc_tune_up">Tunning up RileyLink and Pump</string> <string name="rileylink_state_pc_tune_up">Tuning up RileyLink and Pump</string>
<string name="rileylink_state_pc_error">Problem connecting to Pump</string> <string name="rileylink_state_pc_error">Problem connecting to Pump</string>
<string name="rileylink_state_connected">Connected</string> <string name="rileylink_state_connected">Connected</string>

View file

@ -7,12 +7,12 @@ import org.mockito.ArgumentCaptor;
import org.mockito.Mock; import org.mockito.Mock;
import org.mockito.junit.MockitoJUnitRunner; import org.mockito.junit.MockitoJUnitRunner;
import info.nightscout.androidaps.Constants;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil; import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.comm.OmnipodCommunicationService; import info.nightscout.androidaps.plugins.pump.omnipod.comm.OmnipodCommunicationService;
import info.nightscout.androidaps.plugins.pump.omnipod.comm.message.OmnipodMessage; import info.nightscout.androidaps.plugins.pump.omnipod.comm.message.OmnipodMessage;
import info.nightscout.androidaps.plugins.pump.omnipod.comm.message.response.VersionResponse; import info.nightscout.androidaps.plugins.pump.omnipod.comm.message.response.VersionResponse;
import info.nightscout.androidaps.plugins.pump.omnipod.defs.state.PodSetupState; import info.nightscout.androidaps.plugins.pump.omnipod.defs.state.PodSetupState;
import info.nightscout.androidaps.plugins.pump.omnipod.util.OmnipodConst;
import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
@ -47,7 +47,7 @@ public class PairServiceTest {
VersionResponse versionResponse = new PairService().executeAssignAddressCommand(communicationService, setupState); VersionResponse versionResponse = new PairService().executeAssignAddressCommand(communicationService, setupState);
// verify // verify
verify(communicationService).exchangeMessages(eq(VersionResponse.class), eq(setupState), messageCaptor.capture(), eq(Constants.DEFAULT_ADDRESS), eq(0x1f173217)); verify(communicationService).exchangeMessages(eq(VersionResponse.class), eq(setupState), messageCaptor.capture(), eq(OmnipodConst.DEFAULT_ADDRESS), eq(0x1f173217));
verifyNoMoreInteractions(communicationService); verifyNoMoreInteractions(communicationService);
verifyZeroInteractions(response); verifyZeroInteractions(response);

View file

@ -4,14 +4,14 @@ import org.joda.time.Duration;
import org.junit.Test; import org.junit.Test;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil; import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.defs.BeepType; import info.nightscout.androidaps.plugins.pump.omnipod.defs.BeepConfigType;
import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertArrayEquals;
public class BeepConfigCommandTest { public class BeepConfigCommandTest {
@Test @Test
public void testConfidenceReminders() { public void testConfidenceReminders() {
BeepConfigCommand beepConfigCommand = new BeepConfigCommand(BeepType.BIP_BEEP_BIP_BEEP_BIP_BEEP_BIP_BEEP, true, BeepConfigCommand beepConfigCommand = new BeepConfigCommand(BeepConfigType.BIP_BEEP_BIP_BEEP_BIP_BEEP_BIP_BEEP, true,
Duration.ZERO, true, Duration.ZERO, Duration.ZERO, true, Duration.ZERO,
true, Duration.ZERO); true, Duration.ZERO);
assertArrayEquals(ByteUtil.fromHexString("1e0402404040"), beepConfigCommand.getRawData()); assertArrayEquals(ByteUtil.fromHexString("1e0402404040"), beepConfigCommand.getRawData());
@ -19,7 +19,7 @@ public class BeepConfigCommandTest {
@Test @Test
public void testProgramReminders() { public void testProgramReminders() {
BeepConfigCommand beepConfigCommand = new BeepConfigCommand(BeepType.BEEP_CONFIG_NO_BEEP, true, BeepConfigCommand beepConfigCommand = new BeepConfigCommand(BeepConfigType.NO_BEEP, true,
Duration.ZERO, false, Duration.standardMinutes(60), Duration.ZERO, false, Duration.standardMinutes(60),
false, Duration.standardMinutes(60)); false, Duration.standardMinutes(60));
assertArrayEquals(ByteUtil.fromHexString("1e040f403c3c"), beepConfigCommand.getRawData()); assertArrayEquals(ByteUtil.fromHexString("1e040f403c3c"), beepConfigCommand.getRawData());

View file

@ -3,10 +3,10 @@ package info.nightscout.androidaps.plugins.pump.omnipod.comm.message.response;
import org.joda.time.Duration; import org.joda.time.Duration;
import org.junit.Test; import org.junit.Test;
import info.nightscout.androidaps.Constants;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil; import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.defs.DeliveryStatus; import info.nightscout.androidaps.plugins.pump.omnipod.defs.DeliveryStatus;
import info.nightscout.androidaps.plugins.pump.omnipod.defs.PodProgressStatus; import info.nightscout.androidaps.plugins.pump.omnipod.defs.PodProgressStatus;
import info.nightscout.androidaps.plugins.pump.omnipod.util.OmnipodConst;
import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
@ -58,9 +58,9 @@ public class StatusResponseTest {
StatusResponse statusResponse = new StatusResponse(bytes); StatusResponse statusResponse = new StatusResponse(bytes);
assertEquals(Duration.standardMinutes(8191).getMillis(), statusResponse.getTimeActive().getMillis()); assertEquals(Duration.standardMinutes(8191).getMillis(), statusResponse.getTimeActive().getMillis());
assertEquals(Constants.POD_PULSE_SIZE * 1023, statusResponse.getInsulinNotDelivered(), 0.000001); assertEquals(OmnipodConst.POD_PULSE_SIZE * 1023, statusResponse.getInsulinNotDelivered(), 0.000001);
assertNull("Reservoir level should be null", statusResponse.getReservoirLevel()); assertNull("Reservoir level should be null", statusResponse.getReservoirLevel());
assertEquals(Constants.POD_PULSE_SIZE * 8191, statusResponse.getInsulin(), 0.0000001); assertEquals(OmnipodConst.POD_PULSE_SIZE * 8191, statusResponse.getInsulin(), 0.0000001);
assertEquals(15, statusResponse.getPodMessageCounter()); assertEquals(15, statusResponse.getPodMessageCounter());
assertEquals(8, statusResponse.getAlerts().getAlertSlots().size()); assertEquals(8, statusResponse.getAlerts().getAlertSlots().size());
} }

View file

@ -1,17 +1,15 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules. // Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript { buildscript {
ext.kotlin_version = '1.3.41' ext.kotlin_version = '1.3.50'
ext.butterknifeVersion = '10.1.0'
repositories { repositories {
google() google()
jcenter() jcenter()
//maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url 'https://maven.fabric.io/public' } maven { url 'https://maven.fabric.io/public' }
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:3.5.0' classpath 'com.android.tools.build:gradle:3.5.0'
classpath 'com.google.gms:google-services:4.3.0' classpath 'com.google.gms:google-services:4.3.2'
classpath 'io.fabric.tools:gradle:1.31.0' classpath 'io.fabric.tools:gradle:1.31.0'
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong