format
This commit is contained in:
parent
1247fded3b
commit
29da89e7d6
6 changed files with 4 additions and 16 deletions
|
@ -1116,7 +1116,6 @@ class OmnipodDashPumpPlugin @Inject constructor(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private fun silenceAlerts(): PumpEnactResult {
|
private fun silenceAlerts(): PumpEnactResult {
|
||||||
// TODO filter alert types
|
// TODO filter alert types
|
||||||
return podStateManager.activeAlerts?.let {
|
return podStateManager.activeAlerts?.let {
|
||||||
|
@ -1141,7 +1140,7 @@ class OmnipodDashPumpPlugin @Inject constructor(
|
||||||
BeepRepetitionType.EVERY_MINUTE_AND_EVERY_15_MIN
|
BeepRepetitionType.EVERY_MINUTE_AND_EVERY_15_MIN
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
val ret = executeProgrammingCommand(
|
val ret = executeProgrammingCommand(
|
||||||
historyEntry = history.createRecord(OmnipodCommandType.CONFIGURE_ALERTS),
|
historyEntry = history.createRecord(OmnipodCommandType.CONFIGURE_ALERTS),
|
||||||
command = omnipodManager.programAlerts(alerts).ignoreElements(),
|
command = omnipodManager.programAlerts(alerts).ignoreElements(),
|
||||||
).toPumpEnactResult()
|
).toPumpEnactResult()
|
||||||
|
|
|
@ -22,7 +22,7 @@ interface OmnipodDashManager {
|
||||||
fun setBasalProgram(basalProgram: BasalProgram, hasBasalBeepEnabled: Boolean): Observable<PodEvent>
|
fun setBasalProgram(basalProgram: BasalProgram, hasBasalBeepEnabled: Boolean): Observable<PodEvent>
|
||||||
|
|
||||||
fun suspendDelivery(hasBasalBeepEnabled: Boolean): Observable<PodEvent>
|
fun suspendDelivery(hasBasalBeepEnabled: Boolean): Observable<PodEvent>
|
||||||
|
|
||||||
fun setTempBasal(rate: Double, durationInMinutes: Short, tempBasalBeeps: Boolean): Observable<PodEvent>
|
fun setTempBasal(rate: Double, durationInMinutes: Short, tempBasalBeeps: Boolean): Observable<PodEvent>
|
||||||
|
|
||||||
fun stopTempBasal(hasTempBasalBeepEnabled: Boolean): Observable<PodEvent>
|
fun stopTempBasal(hasTempBasalBeepEnabled: Boolean): Observable<PodEvent>
|
||||||
|
|
|
@ -498,7 +498,6 @@ class OmnipodDashManagerImpl @Inject constructor(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
override fun suspendDelivery(hasBasalBeepEnabled: Boolean): Observable<PodEvent> {
|
override fun suspendDelivery(hasBasalBeepEnabled: Boolean): Observable<PodEvent> {
|
||||||
return Observable.concat(
|
return Observable.concat(
|
||||||
observePodRunning,
|
observePodRunning,
|
||||||
|
|
|
@ -110,5 +110,4 @@ class SuspendDeliveryCommand private constructor(
|
||||||
private const val LENGTH: Short = 7
|
private const val LENGTH: Short = 7
|
||||||
private const val BODY_LENGTH: Byte = 5
|
private const val BODY_LENGTH: Byte = 5
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -650,10 +650,6 @@ class OmnipodDashOverviewFragment : DaggerFragment() {
|
||||||
return sp.getBoolean(R.string.omnipod_common_preferences_automatically_silence_alerts, false)
|
return sp.getBoolean(R.string.omnipod_common_preferences_automatically_silence_alerts, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun isSuspendDeliveryButtonEnabled(): Boolean {
|
|
||||||
return sp.getBoolean(R.string.key_omnipod_common_suspend_delivery_button_enabled, false)
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun displayErrorDialog(title: String, message: String, withSound: Boolean) {
|
private fun displayErrorDialog(title: String, message: String, withSound: Boolean) {
|
||||||
context?.let {
|
context?.let {
|
||||||
ErrorHelperActivity.runAlarm(it, message, title, if (withSound) R.raw.boluserror else 0)
|
ErrorHelperActivity.runAlarm(it, message, title, if (withSound) R.raw.boluserror else 0)
|
||||||
|
|
|
@ -104,12 +104,7 @@
|
||||||
android:key="@string/key_common_preferences_category_other_settings"
|
android:key="@string/key_common_preferences_category_other_settings"
|
||||||
android:title="@string/omnipod_common_preferences_category_other"
|
android:title="@string/omnipod_common_preferences_category_other"
|
||||||
app:initialExpandedChildrenCount="0">
|
app:initialExpandedChildrenCount="0">
|
||||||
|
|
||||||
<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
|
<SwitchPreference
|
||||||
android:defaultValue="true"
|
android:defaultValue="true"
|
||||||
android:key="@string/key_omnipod_common_time_change_event_enabled"
|
android:key="@string/key_omnipod_common_time_change_event_enabled"
|
||||||
|
|
Loading…
Reference in a new issue