Merge pull request #1108 from avereha/avereha/fix-1
Dash: Reconnect on pod activation
This commit is contained in:
commit
46b55157ba
3 changed files with 4 additions and 0 deletions
|
@ -377,6 +377,7 @@ class OmnipodDashManagerImpl @Inject constructor(
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
if (podStateManager.activationProgress.isBefore(ActivationProgress.INSERTING_CANNULA)) {
|
if (podStateManager.activationProgress.isBefore(ActivationProgress.INSERTING_CANNULA)) {
|
||||||
|
observables.add(observeConnectToPod) // connection can time out while waiting
|
||||||
observables.add(
|
observables.add(
|
||||||
Observable.defer {
|
Observable.defer {
|
||||||
Observable.timer(podStateManager.secondPrimeBolusVolume!!.toLong(), TimeUnit.SECONDS)
|
Observable.timer(podStateManager.secondPrimeBolusVolume!!.toLong(), TimeUnit.SECONDS)
|
||||||
|
|
|
@ -2,6 +2,7 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.util
|
||||||
|
|
||||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.R
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.R
|
||||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.FailedToConnectException
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.FailedToConnectException
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.NotConnectedException
|
||||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.ScanException
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.ScanException
|
||||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.ScanFailFoundTooManyException
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.ScanFailFoundTooManyException
|
||||||
import info.nightscout.androidaps.utils.resources.ResourceHelper
|
import info.nightscout.androidaps.utils.resources.ResourceHelper
|
||||||
|
@ -13,6 +14,7 @@ class I8n {
|
||||||
is FailedToConnectException -> rs.gs(R.string.omnipod_dash_failed_to_connect)
|
is FailedToConnectException -> rs.gs(R.string.omnipod_dash_failed_to_connect)
|
||||||
is ScanFailFoundTooManyException -> rs.gs(R.string.omnipod_dash_found_too_many_pods)
|
is ScanFailFoundTooManyException -> rs.gs(R.string.omnipod_dash_found_too_many_pods)
|
||||||
is ScanException -> rs.gs(R.string.omnipod_dash_scan_failed)
|
is ScanException -> rs.gs(R.string.omnipod_dash_scan_failed)
|
||||||
|
is NotConnectedException -> rs.gs(R.string.omnipod_dash_connection_lost)
|
||||||
else ->
|
else ->
|
||||||
rs.gs(R.string.omnipod_dash_generic_error, exception.toString())
|
rs.gs(R.string.omnipod_dash_generic_error, exception.toString())
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,4 +48,5 @@
|
||||||
<string name="omnipod_common_history_bolus_value">%1$.2f U</string>
|
<string name="omnipod_common_history_bolus_value">%1$.2f U</string>
|
||||||
<string name="dash_bolusdelivering">Delivering %1$.2f U</string>
|
<string name="dash_bolusdelivering">Delivering %1$.2f U</string>
|
||||||
<string name="omnipod_common_alert_delivery_suspended">Insulin delivery is suspended</string>
|
<string name="omnipod_common_alert_delivery_suspended">Insulin delivery is suspended</string>
|
||||||
|
<string name="omnipod_dash_connection_lost">Lost connection to pod</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in a new issue