dash/ble: remove retries for connect for now
It's easier to debug for now if we stop on the first issue/error
This commit is contained in:
parent
9c586c4942
commit
5647007190
|
@ -49,7 +49,8 @@ class OmnipodDashManagerImpl @Inject constructor(
|
||||||
|
|
||||||
private val observeConnectToPod: Observable<PodEvent>
|
private val observeConnectToPod: Observable<PodEvent>
|
||||||
get() = Observable.defer {
|
get() = Observable.defer {
|
||||||
bleManager.connect().retryWithBackoff(retries = 2, delay = 3, timeUnit = TimeUnit.SECONDS)
|
bleManager.connect()
|
||||||
|
|
||||||
} // TODO are these reasonable values?
|
} // TODO are these reasonable values?
|
||||||
|
|
||||||
private fun observeSendProgramBolusCommand(
|
private fun observeSendProgramBolusCommand(
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.session
|
||||||
|
|
||||||
|
import java.nio.ByteBuffer
|
||||||
|
|
||||||
|
class CryptSequence(var sqn: Long) {
|
||||||
|
|
||||||
|
fun incrementForEapAka():ByteArray {
|
||||||
|
sqn++
|
||||||
|
return ByteBuffer.allocate(8)
|
||||||
|
.putLong(sqn)
|
||||||
|
.array()
|
||||||
|
.copyOfRange(2, 8)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun incrementForEnDecrypt(podReceiving: Boolean):ByteArray{
|
||||||
|
sqn++
|
||||||
|
val ret = ByteBuffer.allocate(8)
|
||||||
|
.putLong(sqn)
|
||||||
|
.array()
|
||||||
|
.copyOfRange(3, 8)
|
||||||
|
if (podReceiving) {
|
||||||
|
ret[0] = (ret[0].toInt() and 127).toByte()
|
||||||
|
} else {
|
||||||
|
ret[0] = (ret[0].toInt() or 128).toByte()
|
||||||
|
}
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,4 @@
|
||||||
|
package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.session
|
||||||
|
|
||||||
|
class EapSqn {
|
||||||
|
}
|
Loading…
Reference in a new issue