This commit is contained in:
Milos Kozak 2023-02-15 10:18:31 +01:00
parent 820f0db035
commit 24456e3c5d

View file

@ -1,8 +1,8 @@
package info.nightscout.pump.dana
import info.nightscout.interfaces.Constants
import info.nightscout.interfaces.profile.Profile
import info.nightscout.interfaces.profile.Instantiator
import info.nightscout.interfaces.profile.Profile
import info.nightscout.interfaces.profile.ProfileStore
import info.nightscout.interfaces.pump.PumpSync
import info.nightscout.interfaces.pump.defs.PumpType
@ -43,8 +43,8 @@ class DanaPump @Inject constructor(
SUSPENDED(0x01),
DAILY_MAX(0x02),
BOLUS_BLOCK(0x04),
ORDERDELIVERING(0x08),
NOPRIME(0x10);
ORDER_DELIVERING(0x08),
NO_PRIME(0x10);
companion object {
@ -128,11 +128,6 @@ class DanaPump @Inject constructor(
var tempBasalDuration: Long = 0 // in milliseconds
var tempBasalPercent = 0
var tempBasalTotalSec: Long
set(durationInSec) {
tempBasalDuration = T.secs(durationInSec).msecs()
}
get() = T.msecs(tempBasalDuration).mins()
var isTempBasalInProgress: Boolean
get() = tempBasalStart != 0L && dateUtil.now() in tempBasalStart..tempBasalStart + tempBasalDuration
set(isRunning) {