RS: handle error state
This commit is contained in:
parent
bd15fae39e
commit
dac2241baa
2 changed files with 3 additions and 3 deletions
|
@ -210,7 +210,7 @@ class DanaRSPlugin @Inject constructor(
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun isSuspended(): Boolean {
|
override fun isSuspended(): Boolean {
|
||||||
return danaPump.pumpSuspended
|
return danaPump.pumpSuspended || danaPump.errorState != DanaPump.ErrorState.NONE
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun isBusy(): Boolean {
|
override fun isBusy(): Boolean {
|
||||||
|
|
|
@ -57,8 +57,8 @@ class DanaRS_Packet_General_Initial_Screen_Information(
|
||||||
//protocol 10+
|
//protocol 10+
|
||||||
dataIndex += dataSize
|
dataIndex += dataSize
|
||||||
dataSize = 1
|
dataSize = 1
|
||||||
danaPump.errorState = info.nightscout.androidaps.dana.DanaPump.ErrorState[byteArrayToInt(getBytes(data, dataIndex, dataSize))]
|
danaPump.errorState = DanaPump.ErrorState[byteArrayToInt(getBytes(data, dataIndex, dataSize))]
|
||||||
?: info.nightscout.androidaps.dana.DanaPump.ErrorState.NONE
|
?: DanaPump.ErrorState.NONE
|
||||||
aapsLogger.debug(LTag.PUMPCOMM, "ErrorState: " + danaPump.errorState.name)
|
aapsLogger.debug(LTag.PUMPCOMM, "ErrorState: " + danaPump.errorState.name)
|
||||||
}
|
}
|
||||||
aapsLogger.debug(LTag.PUMPCOMM, "Pump suspended: " + danaPump.pumpSuspended)
|
aapsLogger.debug(LTag.PUMPCOMM, "Pump suspended: " + danaPump.pumpSuspended)
|
||||||
|
|
Loading…
Reference in a new issue