improve isConnecting
This commit is contained in:
parent
b845c06fca
commit
11fa4d842c
1 changed files with 5 additions and 8 deletions
|
@ -181,7 +181,6 @@ class OmnipodDashPumpPlugin @Inject constructor(
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun isInitialized(): Boolean {
|
override fun isInitialized(): Boolean {
|
||||||
// TODO
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -201,17 +200,15 @@ class OmnipodDashPumpPlugin @Inject constructor(
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun isConnecting(): Boolean {
|
override fun isConnecting(): Boolean {
|
||||||
// TODO
|
return stopConnecting != null && podStateManager.bluetoothConnectionState == OmnipodDashPodStateManager.BluetoothConnectionState.CONNECTING
|
||||||
return stopConnecting != null
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun isHandshakeInProgress(): Boolean {
|
override fun isHandshakeInProgress(): Boolean {
|
||||||
// TODO
|
return stopConnecting != null
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun finishHandshaking() {
|
override fun finishHandshaking() {
|
||||||
// TODO
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun connect(reason: String) {
|
override fun connect(reason: String) {
|
||||||
|
@ -337,8 +334,8 @@ class OmnipodDashPumpPlugin @Inject constructor(
|
||||||
podStateManager.createActiveCommand(historyId, basalProgram = basalProgram)
|
podStateManager.createActiveCommand(historyId, basalProgram = basalProgram)
|
||||||
},
|
},
|
||||||
command = omnipodManager.setBasalProgram(basalProgram, hasBasalBeepEnabled()).ignoreElements(),
|
command = omnipodManager.setBasalProgram(basalProgram, hasBasalBeepEnabled()).ignoreElements(),
|
||||||
post = failWhenUnconfirmed(deliverySuspended), // mark as failed even if it worked OK and try again vs. mark ok and
|
post = failWhenUnconfirmed(deliverySuspended),
|
||||||
// deny later
|
// mark as failed even if it worked OK and try again vs. mark ok and deny later
|
||||||
).toPumpEnactResult()
|
).toPumpEnactResult()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue