resolve rireylink -> pump-common dependency

This commit is contained in:
Milos Kozak 2022-11-08 12:17:53 +01:00
parent ed91df6341
commit 936192b0de
111 changed files with 307 additions and 252 deletions

View file

@ -200,6 +200,7 @@ dependencies {
implementation project(':insight') implementation project(':insight')
implementation project(':pump:medtronic') implementation project(':pump:medtronic')
implementation project(':pump:pump-common') implementation project(':pump:pump-common')
implementation project(':pump:pump-core')
implementation project(':pump:rileylink') implementation project(':pump:rileylink')
implementation project(':pump:omnipod-common') implementation project(':pump:omnipod-common')
implementation project(':pump:omnipod-eros') implementation project(':pump:omnipod-eros')

View file

@ -21,6 +21,7 @@ dependencies {
implementation project(':app-wear-shared:shared') implementation project(':app-wear-shared:shared')
implementation project(':core') implementation project(':core')
implementation project(':pump:pump-common') implementation project(':pump:pump-common')
implementation project(':pump:pump-core')
implementation project(':pump:rileylink') implementation project(':pump:rileylink')
implementation project(':interfaces') implementation project(':interfaces')
} }

View file

@ -13,9 +13,6 @@ import info.nightscout.androidaps.events.EventPumpStatusChanged
import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.interfaces.ActivePlugin
import info.nightscout.androidaps.interfaces.CommandQueue import info.nightscout.androidaps.interfaces.CommandQueue
import info.nightscout.androidaps.interfaces.PumpSync import info.nightscout.androidaps.interfaces.PumpSync
import info.nightscout.shared.interfaces.ResourceHelper
import info.nightscout.androidaps.plugins.pump.common.defs.PumpDeviceState
import info.nightscout.rx.events.EventRefreshButtonState
import info.nightscout.androidaps.plugins.pump.common.events.EventRileyLinkDeviceStatusChange import info.nightscout.androidaps.plugins.pump.common.events.EventRileyLinkDeviceStatusChange
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLinkServiceState import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLinkServiceState
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLinkTargetDevice import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLinkTargetDevice
@ -29,19 +26,22 @@ import info.nightscout.androidaps.plugins.pump.medtronic.driver.MedtronicPumpSta
import info.nightscout.androidaps.plugins.pump.medtronic.events.EventMedtronicPumpConfigurationChanged import info.nightscout.androidaps.plugins.pump.medtronic.events.EventMedtronicPumpConfigurationChanged
import info.nightscout.androidaps.plugins.pump.medtronic.events.EventMedtronicPumpValuesChanged import info.nightscout.androidaps.plugins.pump.medtronic.events.EventMedtronicPumpValuesChanged
import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil
import info.nightscout.interfaces.queue.Callback
import info.nightscout.rx.events.EventQueueChanged
import info.nightscout.shared.utils.DateUtil
import info.nightscout.androidaps.utils.FabricPrivacy import info.nightscout.androidaps.utils.FabricPrivacy
import info.nightscout.shared.utils.T
import info.nightscout.androidaps.utils.WarnColors import info.nightscout.androidaps.utils.WarnColors
import info.nightscout.androidaps.utils.alertDialogs.OKDialog import info.nightscout.androidaps.utils.alertDialogs.OKDialog
import info.nightscout.interfaces.queue.Callback
import info.nightscout.pump.core.defs.PumpDeviceState
import info.nightscout.rx.AapsSchedulers import info.nightscout.rx.AapsSchedulers
import info.nightscout.rx.bus.RxBus import info.nightscout.rx.bus.RxBus
import info.nightscout.rx.events.EventExtendedBolusChange import info.nightscout.rx.events.EventExtendedBolusChange
import info.nightscout.rx.events.EventQueueChanged
import info.nightscout.rx.events.EventRefreshButtonState
import info.nightscout.rx.events.EventTempBasalChange import info.nightscout.rx.events.EventTempBasalChange
import info.nightscout.rx.logging.AAPSLogger import info.nightscout.rx.logging.AAPSLogger
import info.nightscout.rx.logging.LTag import info.nightscout.rx.logging.LTag
import info.nightscout.shared.interfaces.ResourceHelper
import info.nightscout.shared.utils.DateUtil
import info.nightscout.shared.utils.T
import io.reactivex.rxjava3.disposables.CompositeDisposable import io.reactivex.rxjava3.disposables.CompositeDisposable
import io.reactivex.rxjava3.kotlin.plusAssign import io.reactivex.rxjava3.kotlin.plusAssign
import javax.inject.Inject import javax.inject.Inject

View file

@ -1,7 +1,6 @@
package info.nightscout.androidaps.plugins.pump.medtronic.comm package info.nightscout.androidaps.plugins.pump.medtronic.comm
import android.os.SystemClock import android.os.SystemClock
import info.nightscout.androidaps.plugins.pump.common.defs.PumpDeviceState
import info.nightscout.androidaps.plugins.pump.common.defs.PumpType import info.nightscout.androidaps.plugins.pump.common.defs.PumpType
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkCommunicationManager import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkCommunicationManager
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkConst import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkConst
@ -10,7 +9,6 @@ import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.Radi
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.RadioResponse import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.RadioResponse
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.defs.RLMessageType import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.defs.RLMessageType
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.tasks.WakeAndTuneTask import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.tasks.WakeAndTuneTask
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil
import info.nightscout.androidaps.plugins.pump.common.utils.DateTimeUtil import info.nightscout.androidaps.plugins.pump.common.utils.DateTimeUtil
import info.nightscout.androidaps.plugins.pump.medtronic.MedtronicPumpPlugin import info.nightscout.androidaps.plugins.pump.medtronic.MedtronicPumpPlugin
import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.RawHistoryPage import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.RawHistoryPage
@ -36,6 +34,8 @@ import info.nightscout.androidaps.plugins.pump.medtronic.driver.MedtronicPumpSta
import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil
import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil.Companion.createByteArray import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil.Companion.createByteArray
import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil.Companion.getByteArrayFromUnsignedShort import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil.Companion.getByteArrayFromUnsignedShort
import info.nightscout.pump.core.defs.PumpDeviceState
import info.nightscout.pump.core.utils.ByteUtil
import info.nightscout.rx.logging.LTag import info.nightscout.rx.logging.LTag
import org.joda.time.LocalDateTime import org.joda.time.LocalDateTime
import java.util.Calendar import java.util.Calendar

View file

@ -1,14 +1,14 @@
package info.nightscout.androidaps.plugins.pump.medtronic.comm package info.nightscout.androidaps.plugins.pump.medtronic.comm
import info.nightscout.androidaps.plugins.pump.common.defs.PumpType import info.nightscout.androidaps.plugins.pump.common.defs.PumpType
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil
import info.nightscout.androidaps.plugins.pump.common.utils.StringUtil
import info.nightscout.androidaps.plugins.pump.medtronic.data.dto.BasalProfile import info.nightscout.androidaps.plugins.pump.medtronic.data.dto.BasalProfile
import info.nightscout.androidaps.plugins.pump.medtronic.data.dto.BatteryStatusDTO import info.nightscout.androidaps.plugins.pump.medtronic.data.dto.BatteryStatusDTO
import info.nightscout.androidaps.plugins.pump.medtronic.data.dto.PumpSettingDTO import info.nightscout.androidaps.plugins.pump.medtronic.data.dto.PumpSettingDTO
import info.nightscout.androidaps.plugins.pump.medtronic.defs.MedtronicDeviceType import info.nightscout.androidaps.plugins.pump.medtronic.defs.MedtronicDeviceType
import info.nightscout.androidaps.plugins.pump.medtronic.defs.PumpConfigurationGroup import info.nightscout.androidaps.plugins.pump.medtronic.defs.PumpConfigurationGroup
import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil
import info.nightscout.pump.core.utils.ByteUtil
import info.nightscout.pump.core.utils.StringUtil
import info.nightscout.rx.logging.AAPSLogger import info.nightscout.rx.logging.AAPSLogger
import info.nightscout.rx.logging.LTag import info.nightscout.rx.logging.LTag
import org.joda.time.IllegalFieldValueException import org.joda.time.IllegalFieldValueException
@ -119,7 +119,8 @@ class MedtronicConverter @Inject constructor(
addSettingToMap("PCFG_MAX_BOLUS", "" + decodeMaxBolus(rd), PumpConfigurationGroup.Bolus, map) addSettingToMap("PCFG_MAX_BOLUS", "" + decodeMaxBolus(rd), PumpConfigurationGroup.Bolus, map)
addSettingToMap( addSettingToMap(
"PCFG_MAX_BASAL", "" "PCFG_MAX_BASAL", ""
+ decodeBasalInsulin(ByteUtil.makeUnsignedShort(rd[settingIndexMaxBasal].toInt(), + decodeBasalInsulin(
ByteUtil.makeUnsignedShort(rd[settingIndexMaxBasal].toInt(),
rd[settingIndexMaxBasal + 1].toInt())), PumpConfigurationGroup.Basal, map) rd[settingIndexMaxBasal + 1].toInt())), PumpConfigurationGroup.Basal, map)
addSettingToMap("CFG_BASE_CLOCK_MODE", if (rd[settingIndexTimeDisplayFormat].toInt() == 0) "12h" else "24h", addSettingToMap("CFG_BASE_CLOCK_MODE", if (rd[settingIndexTimeDisplayFormat].toInt() == 0) "12h" else "24h",
PumpConfigurationGroup.General, map) PumpConfigurationGroup.General, map)
@ -158,7 +159,8 @@ class MedtronicConverter @Inject constructor(
addSettingToMap("PCFG_MAX_BOLUS", "" + decodeMaxBolus(rd), PumpConfigurationGroup.Bolus, map) addSettingToMap("PCFG_MAX_BOLUS", "" + decodeMaxBolus(rd), PumpConfigurationGroup.Bolus, map)
addSettingToMap( addSettingToMap(
"PCFG_MAX_BASAL", "" "PCFG_MAX_BASAL", ""
+ decodeBasalInsulin(ByteUtil.makeUnsignedShort(rd[settingIndexMaxBasal].toInt(), + decodeBasalInsulin(
ByteUtil.makeUnsignedShort(rd[settingIndexMaxBasal].toInt(),
rd[settingIndexMaxBasal + 1].toInt())), PumpConfigurationGroup.Basal, map) rd[settingIndexMaxBasal + 1].toInt())), PumpConfigurationGroup.Basal, map)
addSettingToMap("CFG_BASE_CLOCK_MODE", if (rd[settingIndexTimeDisplayFormat].toInt() == 0) "12h" else "24h", addSettingToMap("CFG_BASE_CLOCK_MODE", if (rd[settingIndexTimeDisplayFormat].toInt() == 0) "12h" else "24h",
PumpConfigurationGroup.General, map) PumpConfigurationGroup.General, map)

View file

@ -1,8 +1,8 @@
package info.nightscout.androidaps.plugins.pump.medtronic.comm.history package info.nightscout.androidaps.plugins.pump.medtronic.comm.history
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil
import info.nightscout.androidaps.plugins.pump.common.utils.StringUtil
import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil
import info.nightscout.pump.core.utils.ByteUtil
import info.nightscout.pump.core.utils.StringUtil
import info.nightscout.rx.logging.AAPSLogger import info.nightscout.rx.logging.AAPSLogger
import info.nightscout.rx.logging.LTag import info.nightscout.rx.logging.LTag
import org.apache.commons.lang3.StringUtils import org.apache.commons.lang3.StringUtils
@ -16,7 +16,8 @@ import org.apache.commons.lang3.StringUtils
*/ */
abstract class MedtronicHistoryDecoder<T : MedtronicHistoryEntry?>(var aapsLogger: AAPSLogger, abstract class MedtronicHistoryDecoder<T : MedtronicHistoryEntry?>(var aapsLogger: AAPSLogger,
var medtronicUtil: MedtronicUtil, var medtronicUtil: MedtronicUtil,
var bitUtils: ByteUtil) : MedtronicHistoryDecoderInterface<T> { var bitUtils: ByteUtil
) : MedtronicHistoryDecoderInterface<T> {
// STATISTICS (remove at later time or not) // STATISTICS (remove at later time or not)
protected var statisticsEnabled = true protected var statisticsEnabled = true
@ -112,7 +113,7 @@ abstract class MedtronicHistoryDecoder<T : MedtronicHistoryEntry?>(var aapsLogge
} }
fun getFormattedFloat(value: Float, decimals: Int): String { fun getFormattedFloat(value: Float, decimals: Int): String {
return StringUtil.getFormatedValueUS(value, decimals) return StringUtil.getFormattedValueUS(value, decimals)
} }
} }

View file

@ -1,9 +1,9 @@
package info.nightscout.androidaps.plugins.pump.medtronic.comm.history package info.nightscout.androidaps.plugins.pump.medtronic.comm.history
import com.google.gson.annotations.Expose import com.google.gson.annotations.Expose
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil
import info.nightscout.androidaps.plugins.pump.common.utils.DateTimeUtil import info.nightscout.androidaps.plugins.pump.common.utils.DateTimeUtil
import info.nightscout.androidaps.plugins.pump.common.utils.StringUtil import info.nightscout.pump.core.utils.ByteUtil
import info.nightscout.pump.core.utils.StringUtil
/** /**
* This file was taken from GGC - GNU Gluco Control (ggc.sourceforge.net), application for diabetes * This file was taken from GGC - GNU Gluco Control (ggc.sourceforge.net), application for diabetes

View file

@ -1,8 +1,8 @@
package info.nightscout.androidaps.plugins.pump.medtronic.comm.history package info.nightscout.androidaps.plugins.pump.medtronic.comm.history
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil
import info.nightscout.androidaps.plugins.pump.common.utils.CRC import info.nightscout.androidaps.plugins.pump.common.utils.CRC
import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil
import info.nightscout.pump.core.utils.ByteUtil
import info.nightscout.rx.logging.AAPSLogger import info.nightscout.rx.logging.AAPSLogger
import info.nightscout.rx.logging.LTag import info.nightscout.rx.logging.LTag
import java.util.Arrays import java.util.Arrays

View file

@ -1,8 +1,8 @@
package info.nightscout.androidaps.plugins.pump.medtronic.comm.history.cgms package info.nightscout.androidaps.plugins.pump.medtronic.comm.history.cgms
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil
import info.nightscout.androidaps.plugins.pump.common.utils.DateTimeUtil import info.nightscout.androidaps.plugins.pump.common.utils.DateTimeUtil
import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.MedtronicHistoryEntry import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.MedtronicHistoryEntry
import info.nightscout.pump.core.utils.ByteUtil
import org.apache.commons.lang3.StringUtils import org.apache.commons.lang3.StringUtils
import org.joda.time.LocalDateTime import org.joda.time.LocalDateTime

View file

@ -1,11 +1,11 @@
package info.nightscout.androidaps.plugins.pump.medtronic.comm.history.cgms package info.nightscout.androidaps.plugins.pump.medtronic.comm.history.cgms
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil
import info.nightscout.androidaps.plugins.pump.common.utils.DateTimeUtil import info.nightscout.androidaps.plugins.pump.common.utils.DateTimeUtil
import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.MedtronicHistoryDecoder import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.MedtronicHistoryDecoder
import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.RecordDecodeStatus import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.RecordDecodeStatus
import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.cgms.CGMSHistoryEntryType.Companion.getByCode import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.cgms.CGMSHistoryEntryType.Companion.getByCode
import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil
import info.nightscout.pump.core.utils.ByteUtil
import info.nightscout.rx.logging.AAPSLogger import info.nightscout.rx.logging.AAPSLogger
import info.nightscout.rx.logging.LTag import info.nightscout.rx.logging.LTag
import okhttp3.internal.and import okhttp3.internal.and

View file

@ -1,6 +1,5 @@
package info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump package info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil
import info.nightscout.androidaps.plugins.pump.common.utils.DateTimeUtil import info.nightscout.androidaps.plugins.pump.common.utils.DateTimeUtil
import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.MedtronicHistoryDecoder import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.MedtronicHistoryDecoder
import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.RecordDecodeStatus import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.RecordDecodeStatus
@ -13,6 +12,7 @@ import info.nightscout.androidaps.plugins.pump.medtronic.data.dto.TempBasalPair
import info.nightscout.androidaps.plugins.pump.medtronic.defs.MedtronicDeviceType import info.nightscout.androidaps.plugins.pump.medtronic.defs.MedtronicDeviceType
import info.nightscout.androidaps.plugins.pump.medtronic.defs.PumpBolusType import info.nightscout.androidaps.plugins.pump.medtronic.defs.PumpBolusType
import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil
import info.nightscout.pump.core.utils.ByteUtil
import info.nightscout.rx.logging.AAPSLogger import info.nightscout.rx.logging.AAPSLogger
import info.nightscout.rx.logging.LTag import info.nightscout.rx.logging.LTag
import java.util.Locale import java.util.Locale

View file

@ -1,12 +1,12 @@
package info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump package info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump
import com.google.gson.annotations.Expose import com.google.gson.annotations.Expose
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil
import info.nightscout.androidaps.plugins.pump.common.utils.StringUtil
import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.MedtronicHistoryEntry import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.MedtronicHistoryEntry
import info.nightscout.androidaps.plugins.pump.medtronic.data.dto.BolusDTO import info.nightscout.androidaps.plugins.pump.medtronic.data.dto.BolusDTO
import info.nightscout.androidaps.plugins.pump.medtronic.defs.MedtronicDeviceType import info.nightscout.androidaps.plugins.pump.medtronic.defs.MedtronicDeviceType
import java.util.* import info.nightscout.pump.core.utils.ByteUtil
import info.nightscout.pump.core.utils.StringUtil
import java.util.Objects
/** /**
* This file was taken from GGC - GNU Gluco Control (ggc.sourceforge.net), application for diabetes * This file was taken from GGC - GNU Gluco Control (ggc.sourceforge.net), application for diabetes

View file

@ -1,6 +1,6 @@
package info.nightscout.androidaps.plugins.pump.medtronic.comm.message package info.nightscout.androidaps.plugins.pump.medtronic.comm.message
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil import info.nightscout.pump.core.utils.ByteUtil
import kotlin.experimental.and import kotlin.experimental.and
/** /**

View file

@ -1,6 +1,6 @@
package info.nightscout.androidaps.plugins.pump.medtronic.comm.message package info.nightscout.androidaps.plugins.pump.medtronic.comm.message
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil import info.nightscout.pump.core.utils.ByteUtil
/** /**
* Created by geoff on 5/29/16. * Created by geoff on 5/29/16.

View file

@ -1,8 +1,8 @@
package info.nightscout.androidaps.plugins.pump.medtronic.comm.message package info.nightscout.androidaps.plugins.pump.medtronic.comm.message
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.RLMessage import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.RLMessage
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil
import info.nightscout.androidaps.plugins.pump.medtronic.defs.MedtronicCommandType import info.nightscout.androidaps.plugins.pump.medtronic.defs.MedtronicCommandType
import info.nightscout.pump.core.utils.ByteUtil
import info.nightscout.rx.logging.AAPSLogger import info.nightscout.rx.logging.AAPSLogger
import info.nightscout.rx.logging.LTag import info.nightscout.rx.logging.LTag
import kotlin.math.min import kotlin.math.min

View file

@ -1,7 +1,6 @@
package info.nightscout.androidaps.plugins.pump.medtronic.comm.ui package info.nightscout.androidaps.plugins.pump.medtronic.comm.ui
import dagger.android.HasAndroidInjector import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.plugins.pump.common.defs.PumpDeviceState
import info.nightscout.androidaps.plugins.pump.common.events.EventRileyLinkDeviceStatusChange import info.nightscout.androidaps.plugins.pump.common.events.EventRileyLinkDeviceStatusChange
import info.nightscout.androidaps.plugins.pump.medtronic.comm.MedtronicCommunicationManager import info.nightscout.androidaps.plugins.pump.medtronic.comm.MedtronicCommunicationManager
import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.PumpHistoryEntry import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.PumpHistoryEntry
@ -12,6 +11,7 @@ import info.nightscout.androidaps.plugins.pump.medtronic.defs.MedtronicUIRespons
import info.nightscout.androidaps.plugins.pump.medtronic.driver.MedtronicPumpStatus import info.nightscout.androidaps.plugins.pump.medtronic.driver.MedtronicPumpStatus
import info.nightscout.androidaps.plugins.pump.medtronic.events.EventMedtronicPumpValuesChanged import info.nightscout.androidaps.plugins.pump.medtronic.events.EventMedtronicPumpValuesChanged
import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil
import info.nightscout.pump.core.defs.PumpDeviceState
import info.nightscout.rx.bus.RxBus import info.nightscout.rx.bus.RxBus
import info.nightscout.rx.logging.AAPSLogger import info.nightscout.rx.logging.AAPSLogger
import info.nightscout.rx.logging.LTag import info.nightscout.rx.logging.LTag
@ -155,10 +155,12 @@ class MedtronicUITask {
postprocessor.postProcessData(this) postprocessor.postProcessData(this)
} }
if (responseType === MedtronicUIResponseType.Invalid) { if (responseType === MedtronicUIResponseType.Invalid) {
rxBus.send(EventRileyLinkDeviceStatusChange(PumpDeviceState.ErrorWhenCommunicating, rxBus.send(EventRileyLinkDeviceStatusChange(
PumpDeviceState.ErrorWhenCommunicating,
"Unsupported command in MedtronicUITask")) "Unsupported command in MedtronicUITask"))
} else if (responseType === MedtronicUIResponseType.Error) { } else if (responseType === MedtronicUIResponseType.Error) {
rxBus.send(EventRileyLinkDeviceStatusChange(PumpDeviceState.ErrorWhenCommunicating, rxBus.send(EventRileyLinkDeviceStatusChange(
PumpDeviceState.ErrorWhenCommunicating,
errorDescription)) errorDescription))
} else { } else {
rxBus.send(EventMedtronicPumpValuesChanged()) rxBus.send(EventMedtronicPumpValuesChanged())

View file

@ -6,16 +6,13 @@ import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.data.DetailedBolusInfo import info.nightscout.androidaps.data.DetailedBolusInfo
import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.interfaces.ActivePlugin
import info.nightscout.androidaps.interfaces.PumpSync import info.nightscout.androidaps.interfaces.PumpSync
import info.nightscout.shared.interfaces.ResourceHelper
import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification
import info.nightscout.interfaces.notifications.Notification
import info.nightscout.androidaps.plugins.pump.common.defs.PumpType import info.nightscout.androidaps.plugins.pump.common.defs.PumpType
import info.nightscout.androidaps.plugins.pump.common.sync.PumpDbEntry import info.nightscout.androidaps.plugins.pump.common.sync.PumpDbEntry
import info.nightscout.androidaps.plugins.pump.common.sync.PumpDbEntryBolus import info.nightscout.androidaps.plugins.pump.common.sync.PumpDbEntryBolus
import info.nightscout.androidaps.plugins.pump.common.sync.PumpDbEntryTBR import info.nightscout.androidaps.plugins.pump.common.sync.PumpDbEntryTBR
import info.nightscout.androidaps.plugins.pump.common.sync.PumpSyncStorage import info.nightscout.androidaps.plugins.pump.common.sync.PumpSyncStorage
import info.nightscout.androidaps.plugins.pump.common.utils.DateTimeUtil import info.nightscout.androidaps.plugins.pump.common.utils.DateTimeUtil
import info.nightscout.androidaps.plugins.pump.common.utils.StringUtil
import info.nightscout.androidaps.plugins.pump.medtronic.R import info.nightscout.androidaps.plugins.pump.medtronic.R
import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.MedtronicPumpHistoryDecoder import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.MedtronicPumpHistoryDecoder
import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.PumpHistoryEntry import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.PumpHistoryEntry
@ -33,9 +30,12 @@ import info.nightscout.androidaps.plugins.pump.medtronic.defs.PumpBolusType
import info.nightscout.androidaps.plugins.pump.medtronic.driver.MedtronicPumpStatus import info.nightscout.androidaps.plugins.pump.medtronic.driver.MedtronicPumpStatus
import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicConst import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicConst
import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil
import info.nightscout.interfaces.notifications.Notification
import info.nightscout.pump.core.utils.StringUtil
import info.nightscout.rx.bus.RxBus import info.nightscout.rx.bus.RxBus
import info.nightscout.rx.logging.AAPSLogger import info.nightscout.rx.logging.AAPSLogger
import info.nightscout.rx.logging.LTag import info.nightscout.rx.logging.LTag
import info.nightscout.shared.interfaces.ResourceHelper
import info.nightscout.shared.sharedPreferences.SP import info.nightscout.shared.sharedPreferences.SP
import org.apache.commons.lang3.StringUtils import org.apache.commons.lang3.StringUtils
import org.joda.time.LocalDateTime import org.joda.time.LocalDateTime

View file

@ -2,8 +2,8 @@ package info.nightscout.androidaps.plugins.pump.medtronic.data.dto
import com.google.gson.annotations.Expose import com.google.gson.annotations.Expose
import info.nightscout.androidaps.plugins.pump.common.defs.PumpType import info.nightscout.androidaps.plugins.pump.common.defs.PumpType
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil
import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil
import info.nightscout.pump.core.utils.ByteUtil
import info.nightscout.rx.logging.AAPSLogger import info.nightscout.rx.logging.AAPSLogger
import info.nightscout.rx.logging.LTag import info.nightscout.rx.logging.LTag
import org.joda.time.Instant import org.joda.time.Instant

View file

@ -1,8 +1,8 @@
package info.nightscout.androidaps.plugins.pump.medtronic.data.dto package info.nightscout.androidaps.plugins.pump.medtronic.data.dto
import com.google.gson.annotations.Expose import com.google.gson.annotations.Expose
import info.nightscout.androidaps.plugins.pump.common.utils.StringUtil
import info.nightscout.androidaps.plugins.pump.medtronic.defs.PumpBolusType import info.nightscout.androidaps.plugins.pump.medtronic.defs.PumpBolusType
import info.nightscout.pump.core.utils.StringUtil
/** /**
* Application: GGC - GNU Gluco Control * Application: GGC - GNU Gluco Control
@ -73,7 +73,7 @@ class BolusDTO constructor(atechDateTime: Long,
} }
override fun getFormattedDecimal(value: Double): String { override fun getFormattedDecimal(value: Double): String {
return StringUtil.getFormatedValueUS(value, 2) return StringUtil.getFormattedValueUS(value, 2)
} }
val bolusKey: String val bolusKey: String

View file

@ -2,12 +2,12 @@ package info.nightscout.androidaps.plugins.pump.medtronic.data.dto
//import info.nightscout.androidaps.db.TDD //import info.nightscout.androidaps.db.TDD
import com.google.gson.annotations.Expose import com.google.gson.annotations.Expose
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil
import info.nightscout.androidaps.plugins.pump.common.utils.StringUtil
import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.PumpHistoryEntry import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.PumpHistoryEntry
import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.PumpHistoryEntryType import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.PumpHistoryEntryType
import info.nightscout.pump.core.utils.ByteUtil
import info.nightscout.pump.core.utils.StringUtil
import org.apache.commons.lang3.builder.ToStringBuilder import org.apache.commons.lang3.builder.ToStringBuilder
import java.util.* import java.util.Locale
/** /**
* Created by andy on 11/3/18. * Created by andy on 11/3/18.
@ -56,10 +56,10 @@ class DailyTotalsDTO(var entry: PumpHistoryEntry) {
private var bolusCountCorr: Int? = null private var bolusCountCorr: Int? = null
private fun setDisplayable() { private fun setDisplayable() {
if (insulinBasal == 0.0) { if (insulinBasal == 0.0) {
entry.displayableValue = "Total Insulin: " + StringUtil.getFormatedValueUS(insulinTotal, 2) entry.displayableValue = "Total Insulin: " + StringUtil.getFormattedValueUS(insulinTotal, 2)
} else { } else {
entry.displayableValue = ("Basal Insulin: " + StringUtil.getFormatedValueUS(insulinBasal, 2) entry.displayableValue = ("Basal Insulin: " + StringUtil.getFormattedValueUS(insulinBasal, 2)
+ ", Total Insulin: " + StringUtil.getFormatedValueUS(insulinTotal, 2)) + ", Total Insulin: " + StringUtil.getFormattedValueUS(insulinTotal, 2))
} }
} }

View file

@ -1,6 +1,6 @@
package info.nightscout.androidaps.plugins.pump.medtronic.data.dto package info.nightscout.androidaps.plugins.pump.medtronic.data.dto
import info.nightscout.androidaps.plugins.pump.common.utils.StringUtil import info.nightscout.pump.core.utils.StringUtil
/** /**
* Created by andy on 6/2/18. * Created by andy on 6/2/18.
@ -11,6 +11,6 @@ open class PumpTimeStampedRecord constructor(var atechDateTime: Long = 0) {
// var atechDateTime: Long = 0 // var atechDateTime: Long = 0
open fun getFormattedDecimal(value: Double): String? { open fun getFormattedDecimal(value: Double): String? {
return StringUtil.getFormatedValueUS(value, decimalPrecission) return StringUtil.getFormattedValueUS(value, decimalPrecission)
} }
} }

View file

@ -1,8 +1,8 @@
package info.nightscout.androidaps.plugins.pump.medtronic.data.dto package info.nightscout.androidaps.plugins.pump.medtronic.data.dto
import info.nightscout.androidaps.plugins.pump.common.defs.TempBasalPair import info.nightscout.androidaps.plugins.pump.common.defs.TempBasalPair
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil
import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil
import info.nightscout.pump.core.utils.ByteUtil
import info.nightscout.rx.logging.AAPSLogger import info.nightscout.rx.logging.AAPSLogger
import info.nightscout.rx.logging.LTag import info.nightscout.rx.logging.LTag
import java.util.Locale import java.util.Locale

View file

@ -3,13 +3,13 @@ package info.nightscout.androidaps.plugins.pump.medtronic.di
import dagger.Module import dagger.Module
import dagger.Provides import dagger.Provides
import dagger.android.ContributesAndroidInjector import dagger.android.ContributesAndroidInjector
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil
import info.nightscout.androidaps.plugins.pump.medtronic.MedtronicFragment import info.nightscout.androidaps.plugins.pump.medtronic.MedtronicFragment
import info.nightscout.androidaps.plugins.pump.medtronic.comm.MedtronicCommunicationManager import info.nightscout.androidaps.plugins.pump.medtronic.comm.MedtronicCommunicationManager
import info.nightscout.androidaps.plugins.pump.medtronic.comm.ui.MedtronicUIComm import info.nightscout.androidaps.plugins.pump.medtronic.comm.ui.MedtronicUIComm
import info.nightscout.androidaps.plugins.pump.medtronic.comm.ui.MedtronicUITask import info.nightscout.androidaps.plugins.pump.medtronic.comm.ui.MedtronicUITask
import info.nightscout.androidaps.plugins.pump.medtronic.dialog.MedtronicHistoryActivity import info.nightscout.androidaps.plugins.pump.medtronic.dialog.MedtronicHistoryActivity
import info.nightscout.androidaps.plugins.pump.medtronic.service.RileyLinkMedtronicService import info.nightscout.androidaps.plugins.pump.medtronic.service.RileyLinkMedtronicService
import info.nightscout.pump.core.utils.ByteUtil
@Module @Module
@Suppress("unused") @Suppress("unused")

View file

@ -1,7 +1,5 @@
package info.nightscout.androidaps.plugins.pump.medtronic.driver package info.nightscout.androidaps.plugins.pump.medtronic.driver
import info.nightscout.shared.interfaces.ResourceHelper
import info.nightscout.androidaps.plugins.pump.common.defs.PumpDeviceState
import info.nightscout.androidaps.plugins.pump.common.defs.PumpType import info.nightscout.androidaps.plugins.pump.common.defs.PumpType
import info.nightscout.androidaps.plugins.pump.common.events.EventRileyLinkDeviceStatusChange import info.nightscout.androidaps.plugins.pump.common.events.EventRileyLinkDeviceStatusChange
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil
@ -12,7 +10,9 @@ import info.nightscout.androidaps.plugins.pump.medtronic.defs.BasalProfileStatus
import info.nightscout.androidaps.plugins.pump.medtronic.defs.BatteryType import info.nightscout.androidaps.plugins.pump.medtronic.defs.BatteryType
import info.nightscout.androidaps.plugins.pump.medtronic.defs.MedtronicDeviceType import info.nightscout.androidaps.plugins.pump.medtronic.defs.MedtronicDeviceType
import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicConst import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicConst
import info.nightscout.pump.core.defs.PumpDeviceState
import info.nightscout.rx.bus.RxBus import info.nightscout.rx.bus.RxBus
import info.nightscout.shared.interfaces.ResourceHelper
import info.nightscout.shared.sharedPreferences.SP import info.nightscout.shared.sharedPreferences.SP
import java.util.Calendar import java.util.Calendar
import java.util.GregorianCalendar import java.util.GregorianCalendar

View file

@ -4,13 +4,11 @@ import android.content.Intent
import android.content.res.Configuration import android.content.res.Configuration
import android.os.Binder import android.os.Binder
import android.os.IBinder import android.os.IBinder
import info.nightscout.androidaps.plugins.pump.common.defs.PumpDeviceState
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkConst import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkConst
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.defs.RileyLinkEncodingType import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.defs.RileyLinkEncodingType
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.defs.RileyLinkTargetFrequency import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.defs.RileyLinkTargetFrequency
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLinkTargetDevice import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLinkTargetDevice
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.RileyLinkService import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.RileyLinkService
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil
import info.nightscout.androidaps.plugins.pump.medtronic.MedtronicPumpPlugin import info.nightscout.androidaps.plugins.pump.medtronic.MedtronicPumpPlugin
import info.nightscout.androidaps.plugins.pump.medtronic.R import info.nightscout.androidaps.plugins.pump.medtronic.R
import info.nightscout.androidaps.plugins.pump.medtronic.comm.MedtronicCommunicationManager import info.nightscout.androidaps.plugins.pump.medtronic.comm.MedtronicCommunicationManager
@ -19,8 +17,9 @@ import info.nightscout.androidaps.plugins.pump.medtronic.defs.MedtronicDeviceTyp
import info.nightscout.androidaps.plugins.pump.medtronic.driver.MedtronicPumpStatus import info.nightscout.androidaps.plugins.pump.medtronic.driver.MedtronicPumpStatus
import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicConst import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicConst
import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil
import info.nightscout.pump.core.defs.PumpDeviceState
import info.nightscout.pump.core.utils.ByteUtil
import info.nightscout.rx.logging.LTag import info.nightscout.rx.logging.LTag
import javax.inject.Inject import javax.inject.Inject
import javax.inject.Singleton import javax.inject.Singleton

View file

@ -1,14 +1,11 @@
package info.nightscout.androidaps.plugins.pump.medtronic.util package info.nightscout.androidaps.plugins.pump.medtronic.util
import com.google.gson.GsonBuilder import com.google.gson.GsonBuilder
import info.nightscout.shared.interfaces.ResourceHelper
import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification
import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification
import info.nightscout.interfaces.notifications.Notification
import info.nightscout.androidaps.plugins.pump.common.events.EventRileyLinkDeviceStatusChange import info.nightscout.androidaps.plugins.pump.common.events.EventRileyLinkDeviceStatusChange
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.RileyLinkServiceData import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.RileyLinkServiceData
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil
import info.nightscout.androidaps.plugins.pump.medtronic.data.dto.ClockDTO import info.nightscout.androidaps.plugins.pump.medtronic.data.dto.ClockDTO
import info.nightscout.androidaps.plugins.pump.medtronic.data.dto.PumpSettingDTO import info.nightscout.androidaps.plugins.pump.medtronic.data.dto.PumpSettingDTO
import info.nightscout.androidaps.plugins.pump.medtronic.data.dto.RLHistoryItemMedtronic import info.nightscout.androidaps.plugins.pump.medtronic.data.dto.RLHistoryItemMedtronic
@ -16,9 +13,12 @@ import info.nightscout.androidaps.plugins.pump.medtronic.defs.MedtronicCommandTy
import info.nightscout.androidaps.plugins.pump.medtronic.defs.MedtronicDeviceType import info.nightscout.androidaps.plugins.pump.medtronic.defs.MedtronicDeviceType
import info.nightscout.androidaps.plugins.pump.medtronic.defs.MedtronicNotificationType import info.nightscout.androidaps.plugins.pump.medtronic.defs.MedtronicNotificationType
import info.nightscout.androidaps.plugins.pump.medtronic.driver.MedtronicPumpStatus import info.nightscout.androidaps.plugins.pump.medtronic.driver.MedtronicPumpStatus
import info.nightscout.interfaces.notifications.Notification
import info.nightscout.pump.core.utils.ByteUtil
import info.nightscout.rx.bus.RxBus import info.nightscout.rx.bus.RxBus
import info.nightscout.rx.logging.AAPSLogger import info.nightscout.rx.logging.AAPSLogger
import info.nightscout.rx.logging.LTag import info.nightscout.rx.logging.LTag
import info.nightscout.shared.interfaces.ResourceHelper
import org.joda.time.LocalTime import org.joda.time.LocalTime
import java.nio.ByteBuffer import java.nio.ByteBuffer
import java.nio.ByteOrder import java.nio.ByteOrder

View file

@ -4,18 +4,18 @@ import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.interfaces.ActivePlugin import info.nightscout.androidaps.interfaces.ActivePlugin
import info.nightscout.androidaps.interfaces.PumpSync import info.nightscout.androidaps.interfaces.PumpSync
import info.nightscout.shared.interfaces.ResourceHelper
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil
import info.nightscout.androidaps.plugins.pump.common.sync.PumpSyncStorage import info.nightscout.androidaps.plugins.pump.common.sync.PumpSyncStorage
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil
import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.MedtronicPumpHistoryDecoder import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.MedtronicPumpHistoryDecoder
import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.PumpHistoryEntry import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.PumpHistoryEntry
import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.PumpHistoryEntryType import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.PumpHistoryEntryType
import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil
import info.nightscout.pump.core.utils.ByteUtil
import info.nightscout.rx.AapsSchedulers import info.nightscout.rx.AapsSchedulers
import info.nightscout.rx.TestAapsSchedulers import info.nightscout.rx.TestAapsSchedulers
import info.nightscout.rx.bus.RxBus import info.nightscout.rx.bus.RxBus
import info.nightscout.rx.logging.AAPSLoggerTest import info.nightscout.rx.logging.AAPSLoggerTest
import info.nightscout.shared.interfaces.ResourceHelper
import info.nightscout.shared.sharedPreferences.SP import info.nightscout.shared.sharedPreferences.SP
import org.junit.Before import org.junit.Before
import org.junit.Rule import org.junit.Rule

View file

@ -2,7 +2,6 @@ package info.nightscout.androidaps.plugins.pump.medtronic.comm
import android.util.Log import android.util.Log
import info.nightscout.androidaps.TestBase import info.nightscout.androidaps.TestBase
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil
import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.RawHistoryPage import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.RawHistoryPage
import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.MedtronicPumpHistoryDecoder import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.MedtronicPumpHistoryDecoder
import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.PumpHistoryEntry import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.PumpHistoryEntry
@ -13,6 +12,7 @@ import info.nightscout.androidaps.plugins.pump.medtronic.defs.MedtronicDeviceTyp
import info.nightscout.androidaps.plugins.pump.medtronic.driver.MedtronicPumpStatus import info.nightscout.androidaps.plugins.pump.medtronic.driver.MedtronicPumpStatus
import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil
import info.nightscout.androidaps.utils.serialisation.SealedClassHelper.gson import info.nightscout.androidaps.utils.serialisation.SealedClassHelper.gson
import info.nightscout.pump.core.utils.ByteUtil
import info.nightscout.rx.TestAapsSchedulers import info.nightscout.rx.TestAapsSchedulers
import info.nightscout.rx.bus.RxBus import info.nightscout.rx.bus.RxBus
import org.junit.Before import org.junit.Before

View file

@ -2,11 +2,11 @@ package info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump
//import dagger.android.HasAndroidInjector //import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.TestBase import info.nightscout.androidaps.TestBase
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil
import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.RawHistoryPage import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.RawHistoryPage
import info.nightscout.androidaps.plugins.pump.medtronic.defs.MedtronicDeviceType import info.nightscout.androidaps.plugins.pump.medtronic.defs.MedtronicDeviceType
import info.nightscout.androidaps.plugins.pump.medtronic.driver.MedtronicPumpStatus import info.nightscout.androidaps.plugins.pump.medtronic.driver.MedtronicPumpStatus
import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil
import info.nightscout.pump.core.utils.ByteUtil
import org.junit.Assert import org.junit.Assert
import org.junit.Before import org.junit.Before
import org.junit.Test import org.junit.Test

View file

@ -32,6 +32,7 @@ dependencies {
implementation project(':libraries') implementation project(':libraries')
implementation project(':core') implementation project(':core')
implementation project(':pump:pump-common') implementation project(':pump:pump-common')
implementation project(':pump:pump-core')
implementation project(':pump:rileylink') implementation project(':pump:rileylink')
implementation project(':pump:omnipod-common') implementation project(':pump:omnipod-common')
implementation project(':interfaces') implementation project(':interfaces')

View file

@ -4,7 +4,6 @@ import java.util.ArrayList;
import java.util.EnumSet; import java.util.EnumSet;
import java.util.List; import java.util.List;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.command.CancelDeliveryCommand; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.command.CancelDeliveryCommand;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.command.GetStatusCommand; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.command.GetStatusCommand;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.DeliveryType; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.DeliveryType;
@ -15,6 +14,7 @@ import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.Po
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.exception.CrcMismatchException; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.exception.CrcMismatchException;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.exception.MessageDecodingException; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.exception.MessageDecodingException;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.exception.NotEnoughDataException; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.exception.NotEnoughDataException;
import info.nightscout.pump.core.utils.ByteUtil;
import info.nightscout.rx.logging.AAPSLogger; import info.nightscout.rx.logging.AAPSLogger;
import info.nightscout.rx.logging.LTag; import info.nightscout.rx.logging.LTag;

View file

@ -1,11 +1,11 @@
package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message; package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message;
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.RLMessage; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.RLMessage;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.OmnipodCrc; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.OmnipodCrc;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.PacketType; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.PacketType;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.exception.CrcMismatchException; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.exception.CrcMismatchException;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.exception.IllegalPacketTypeException; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.exception.IllegalPacketTypeException;
import info.nightscout.pump.core.utils.ByteUtil;
/** /**
* Created by andy on 6/1/18. * Created by andy on 6/1/18.

View file

@ -4,11 +4,11 @@ import androidx.annotation.NonNull;
import java.util.Collections; import java.util.Collections;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.NonceResyncableMessageBlock; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.NonceResyncableMessageBlock;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.AlertSet; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.AlertSet;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.AlertSlot; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.AlertSlot;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.MessageBlockType; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.MessageBlockType;
import info.nightscout.pump.core.utils.ByteUtil;
public class AcknowledgeAlertsCommand extends NonceResyncableMessageBlock { public class AcknowledgeAlertsCommand extends NonceResyncableMessageBlock {

View file

@ -1,17 +1,18 @@
package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.command; package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.command;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import org.joda.time.Duration; import org.joda.time.Duration;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.MessageBlock; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.MessageBlock;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.MessageBlockType; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.MessageBlockType;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.OmnipodConstants; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.OmnipodConstants;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.schedule.BasalSchedule; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.schedule.BasalSchedule;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.schedule.RateEntry; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.schedule.RateEntry;
import info.nightscout.pump.core.utils.ByteUtil;
public class BasalScheduleExtraCommand extends MessageBlock { public class BasalScheduleExtraCommand extends MessageBlock {
private final boolean acknowledgementBeep; private final boolean acknowledgementBeep;

View file

@ -4,10 +4,10 @@ import androidx.annotation.NonNull;
import org.joda.time.Duration; import org.joda.time.Duration;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.MessageBlock; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.MessageBlock;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.BeepConfigType; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.BeepConfigType;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.MessageBlockType; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.MessageBlockType;
import info.nightscout.pump.core.utils.ByteUtil;
public class BeepConfigCommand extends MessageBlock { public class BeepConfigCommand extends MessageBlock {
private final BeepConfigType beepType; private final BeepConfigType beepType;

View file

@ -2,10 +2,10 @@ package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communicatio
import org.joda.time.Duration; import org.joda.time.Duration;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.MessageBlock; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.MessageBlock;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.MessageBlockType; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.MessageBlockType;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.OmnipodConstants; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.OmnipodConstants;
import info.nightscout.pump.core.utils.ByteUtil;
public class BolusExtraCommand extends MessageBlock { public class BolusExtraCommand extends MessageBlock {
private final boolean acknowledgementBeep; private final boolean acknowledgementBeep;

View file

@ -2,11 +2,11 @@ package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communicatio
import java.util.EnumSet; import java.util.EnumSet;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.NonceResyncableMessageBlock; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.NonceResyncableMessageBlock;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.BeepType; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.BeepType;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.DeliveryType; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.DeliveryType;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.MessageBlockType; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.MessageBlockType;
import info.nightscout.pump.core.utils.ByteUtil;
public class CancelDeliveryCommand extends NonceResyncableMessageBlock { public class CancelDeliveryCommand extends NonceResyncableMessageBlock {

View file

@ -4,10 +4,10 @@ import androidx.annotation.NonNull;
import java.util.List; import java.util.List;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.NonceResyncableMessageBlock; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.NonceResyncableMessageBlock;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.AlertConfiguration; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.AlertConfiguration;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.MessageBlockType; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.MessageBlockType;
import info.nightscout.pump.core.utils.ByteUtil;
public class ConfigureAlertsCommand extends NonceResyncableMessageBlock { public class ConfigureAlertsCommand extends NonceResyncableMessageBlock {
private final List<AlertConfiguration> configurations; private final List<AlertConfiguration> configurations;

View file

@ -2,9 +2,9 @@ package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communicatio
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.NonceResyncableMessageBlock; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.NonceResyncableMessageBlock;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.MessageBlockType; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.MessageBlockType;
import info.nightscout.pump.core.utils.ByteUtil;
public class DeactivatePodCommand extends NonceResyncableMessageBlock { public class DeactivatePodCommand extends NonceResyncableMessageBlock {
private int nonce; private int nonce;

View file

@ -2,9 +2,9 @@ package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communicatio
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.NonceResyncableMessageBlock; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.NonceResyncableMessageBlock;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.MessageBlockType; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.MessageBlockType;
import info.nightscout.pump.core.utils.ByteUtil;
public class FaultConfigCommand extends NonceResyncableMessageBlock { public class FaultConfigCommand extends NonceResyncableMessageBlock {
private final byte tab5sub16; private final byte tab5sub16;

View file

@ -2,7 +2,6 @@ package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communicatio
import org.joda.time.Duration; import org.joda.time.Duration;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.NonceResyncableMessageBlock; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.NonceResyncableMessageBlock;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.MessageBlockType; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.MessageBlockType;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.OmnipodConstants; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.OmnipodConstants;
@ -12,6 +11,7 @@ import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.sc
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.schedule.BolusDeliverySchedule; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.schedule.BolusDeliverySchedule;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.schedule.DeliverySchedule; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.schedule.DeliverySchedule;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.schedule.TempBasalDeliverySchedule; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.schedule.TempBasalDeliverySchedule;
import info.nightscout.pump.core.utils.ByteUtil;
public class SetInsulinScheduleCommand extends NonceResyncableMessageBlock { public class SetInsulinScheduleCommand extends NonceResyncableMessageBlock {

View file

@ -2,9 +2,9 @@ package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communicatio
import org.joda.time.DateTime; import org.joda.time.DateTime;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.MessageBlock; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.MessageBlock;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.MessageBlockType; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.MessageBlockType;
import info.nightscout.pump.core.utils.ByteUtil;
public class SetupPodCommand extends MessageBlock { public class SetupPodCommand extends MessageBlock {

View file

@ -5,11 +5,11 @@ import org.joda.time.Duration;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.MessageBlock; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.MessageBlock;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.MessageBlockType; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.MessageBlockType;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.OmnipodConstants; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.OmnipodConstants;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.schedule.RateEntry; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.schedule.RateEntry;
import info.nightscout.pump.core.utils.ByteUtil;
public class TempBasalExtraCommand extends MessageBlock { public class TempBasalExtraCommand extends MessageBlock {
private final boolean acknowledgementBeep; private final boolean acknowledgementBeep;

View file

@ -2,11 +2,11 @@ package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communicatio
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.MessageBlock; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.MessageBlock;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.FaultEventCode; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.FaultEventCode;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.MessageBlockType; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.MessageBlockType;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.PodProgressStatus; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.PodProgressStatus;
import info.nightscout.pump.core.utils.ByteUtil;
public class ErrorResponse extends MessageBlock { public class ErrorResponse extends MessageBlock {
public static final byte ERROR_RESPONSE_CODE_BAD_NONCE = (byte) 0x14; public static final byte ERROR_RESPONSE_CODE_BAD_NONCE = (byte) 0x14;

View file

@ -5,13 +5,13 @@ import org.joda.time.Duration;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.IOException; import java.io.IOException;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.MessageBlock; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.MessageBlock;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.AlertSet; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.AlertSet;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.DeliveryStatus; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.DeliveryStatus;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.MessageBlockType; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.MessageBlockType;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.OmnipodConstants; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.OmnipodConstants;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.PodProgressStatus; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.PodProgressStatus;
import info.nightscout.pump.core.utils.ByteUtil;
public class StatusResponse extends MessageBlock implements StatusUpdatableResponse { public class StatusResponse extends MessageBlock implements StatusUpdatableResponse {
private static final int MESSAGE_LENGTH = 10; private static final int MESSAGE_LENGTH = 10;

View file

@ -1,10 +1,10 @@
package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.response; package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.response;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.MessageBlock; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.MessageBlock;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.FirmwareVersion; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.FirmwareVersion;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.MessageBlockType; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.MessageBlockType;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.PodProgressStatus; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.PodProgressStatus;
import info.nightscout.pump.core.utils.ByteUtil;
public class VersionResponse extends MessageBlock { public class VersionResponse extends MessageBlock {
private static final int ASSIGN_ADDRESS_VERSION_RESPONSE_LENGTH = 0x15; private static final int ASSIGN_ADDRESS_VERSION_RESPONSE_LENGTH = 0x15;

View file

@ -5,10 +5,10 @@ import org.joda.time.Duration;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.AlertSlot; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.AlertSlot;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.OmnipodConstants; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.OmnipodConstants;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.PodInfoType; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.PodInfoType;
import info.nightscout.pump.core.utils.ByteUtil;
public class PodInfoActiveAlerts extends PodInfo { public class PodInfoActiveAlerts extends PodInfo {
private static final int MINIMUM_MESSAGE_LENGTH = 11; private static final int MINIMUM_MESSAGE_LENGTH = 11;

View file

@ -6,9 +6,9 @@ import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.FaultEventCode; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.FaultEventCode;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.PodInfoType; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.PodInfoType;
import info.nightscout.pump.core.utils.ByteUtil;
public class PodInfoDataLog extends PodInfo { public class PodInfoDataLog extends PodInfo {
private static final int MINIMUM_MESSAGE_LENGTH = 8; private static final int MINIMUM_MESSAGE_LENGTH = 8;

View file

@ -2,7 +2,6 @@ package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communicatio
import org.joda.time.Duration; import org.joda.time.Duration;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.response.StatusUpdatableResponse; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.response.StatusUpdatableResponse;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.AlertSet; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.AlertSet;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.DeliveryStatus; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.DeliveryStatus;
@ -11,6 +10,7 @@ import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.Fa
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.OmnipodConstants; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.OmnipodConstants;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.PodInfoType; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.PodInfoType;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.PodProgressStatus; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.PodProgressStatus;
import info.nightscout.pump.core.utils.ByteUtil;
public class PodInfoDetailedStatus extends PodInfo implements StatusUpdatableResponse { public class PodInfoDetailedStatus extends PodInfo implements StatusUpdatableResponse {
private static final int MINIMUM_MESSAGE_LENGTH = 21; private static final int MINIMUM_MESSAGE_LENGTH = 21;

View file

@ -6,8 +6,8 @@ import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.PodInfoType; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.PodInfoType;
import info.nightscout.pump.core.utils.ByteUtil;
public class PodInfoOlderPulseLog extends PodInfo { public class PodInfoOlderPulseLog extends PodInfo {
private static final int MINIMUM_MESSAGE_LENGTH = 3; private static final int MINIMUM_MESSAGE_LENGTH = 3;

View file

@ -6,8 +6,8 @@ import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.PodInfoType; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.PodInfoType;
import info.nightscout.pump.core.utils.ByteUtil;
public class PodInfoRecentPulseLog extends PodInfo { public class PodInfoRecentPulseLog extends PodInfo {
private static final int MINIMUM_MESSAGE_LENGTH = 3; private static final int MINIMUM_MESSAGE_LENGTH = 3;

View file

@ -1,9 +1,9 @@
package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.response.podinfo; package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.response.podinfo;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.MessageBlock; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.MessageBlock;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.MessageBlockType; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.MessageBlockType;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.PodInfoType; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.PodInfoType;
import info.nightscout.pump.core.utils.ByteUtil;
public class PodInfoResponse extends MessageBlock { public class PodInfoResponse extends MessageBlock {
private final PodInfoType subType; private final PodInfoType subType;

View file

@ -1,9 +1,10 @@
package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition; package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import org.joda.time.Duration; import org.joda.time.Duration;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil; import info.nightscout.pump.core.utils.ByteUtil;
public class AlertConfiguration { public class AlertConfiguration {
private final AlertType alertType; private final AlertType alertType;

View file

@ -1,6 +1,6 @@
package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition; package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil; import info.nightscout.pump.core.utils.ByteUtil;
public final class ErrorEventInfo { public final class ErrorEventInfo {
private final boolean insulinStateTableCorruption; private final boolean insulinStateTableCorruption;

View file

@ -2,8 +2,8 @@ package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.s
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.IRawRepresentable; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.IRawRepresentable;
import info.nightscout.pump.core.utils.ByteUtil;
public class BasalDeliverySchedule extends DeliverySchedule implements IRawRepresentable { public class BasalDeliverySchedule extends DeliverySchedule implements IRawRepresentable {

View file

@ -2,8 +2,8 @@ package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.s
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.IRawRepresentable; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.IRawRepresentable;
import info.nightscout.pump.core.utils.ByteUtil;
public class BasalTableEntry implements IRawRepresentable { public class BasalTableEntry implements IRawRepresentable {

View file

@ -4,9 +4,9 @@ import androidx.annotation.NonNull;
import org.joda.time.Duration; import org.joda.time.Duration;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.IRawRepresentable; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.IRawRepresentable;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.OmnipodConstants; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.OmnipodConstants;
import info.nightscout.pump.core.utils.ByteUtil;
public class BolusDeliverySchedule extends DeliverySchedule implements IRawRepresentable { public class BolusDeliverySchedule extends DeliverySchedule implements IRawRepresentable {

View file

@ -1,15 +1,15 @@
package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.schedule; package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.schedule;
import static info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.OmnipodConstants.BASAL_STEP_DURATION;
import org.joda.time.Duration; import org.joda.time.Duration;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.IRawRepresentable; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.IRawRepresentable;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.OmnipodConstants; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.OmnipodConstants;
import info.nightscout.pump.core.utils.ByteUtil;
import static info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.OmnipodConstants.BASAL_STEP_DURATION;
public class RateEntry implements IRawRepresentable { public class RateEntry implements IRawRepresentable {

View file

@ -1,7 +1,7 @@
package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.schedule; package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.schedule;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.IRawRepresentable; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.IRawRepresentable;
import info.nightscout.pump.core.utils.ByteUtil;
public class TempBasalDeliverySchedule extends DeliverySchedule implements IRawRepresentable { public class TempBasalDeliverySchedule extends DeliverySchedule implements IRawRepresentable {

View file

@ -1,6 +1,6 @@
package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.exception; package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.exception;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil; import info.nightscout.pump.core.utils.ByteUtil;
public class NotEnoughDataException extends OmnipodException { public class NotEnoughDataException extends OmnipodException {
private final byte[] data; private final byte[] data;

View file

@ -15,20 +15,14 @@ import javax.inject.Singleton;
import dagger.android.HasAndroidInjector; import dagger.android.HasAndroidInjector;
import info.nightscout.androidaps.data.DetailedBolusInfo; import info.nightscout.androidaps.data.DetailedBolusInfo;
import info.nightscout.interfaces.data.PumpEnactResult;
import info.nightscout.androidaps.data.PumpEnactResultImpl; import info.nightscout.androidaps.data.PumpEnactResultImpl;
import info.nightscout.androidaps.extensions.PumpStateExtensionKt; import info.nightscout.androidaps.extensions.PumpStateExtensionKt;
import info.nightscout.interfaces.ActivityNames;
import info.nightscout.androidaps.interfaces.Profile; import info.nightscout.androidaps.interfaces.Profile;
import info.nightscout.androidaps.interfaces.PumpSync; import info.nightscout.androidaps.interfaces.PumpSync;
import info.nightscout.shared.interfaces.ResourceHelper;
import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification; import info.nightscout.androidaps.plugins.general.overview.events.EventDismissNotification;
import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification; import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification;
import info.nightscout.rx.events.EventOverviewBolusProgress;
import info.nightscout.interfaces.notifications.Notification;
import info.nightscout.androidaps.plugins.pump.common.defs.PumpType; import info.nightscout.androidaps.plugins.pump.common.defs.PumpType;
import info.nightscout.androidaps.plugins.pump.common.defs.TempBasalPair; import info.nightscout.androidaps.plugins.pump.common.defs.TempBasalPair;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.common.definition.OmnipodCommandType; import info.nightscout.androidaps.plugins.pump.omnipod.common.definition.OmnipodCommandType;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.R; import info.nightscout.androidaps.plugins.pump.omnipod.eros.R;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.definition.OmnipodErosStorageKeys; import info.nightscout.androidaps.plugins.pump.omnipod.eros.definition.OmnipodErosStorageKeys;
@ -75,14 +69,20 @@ import info.nightscout.androidaps.plugins.pump.omnipod.eros.history.database.Ero
import info.nightscout.androidaps.plugins.pump.omnipod.eros.rileylink.manager.OmnipodRileyLinkCommunicationManager; import info.nightscout.androidaps.plugins.pump.omnipod.eros.rileylink.manager.OmnipodRileyLinkCommunicationManager;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.util.AapsOmnipodUtil; import info.nightscout.androidaps.plugins.pump.omnipod.eros.util.AapsOmnipodUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.util.OmnipodAlertUtil; import info.nightscout.androidaps.plugins.pump.omnipod.eros.util.OmnipodAlertUtil;
import info.nightscout.shared.utils.T; import info.nightscout.interfaces.ActivityNames;
import info.nightscout.interfaces.data.PumpEnactResult;
import info.nightscout.interfaces.notifications.Notification;
import info.nightscout.pump.core.utils.ByteUtil;
import info.nightscout.rx.AapsSchedulers; import info.nightscout.rx.AapsSchedulers;
import info.nightscout.rx.bus.RxBus; import info.nightscout.rx.bus.RxBus;
import info.nightscout.rx.events.Event; import info.nightscout.rx.events.Event;
import info.nightscout.rx.events.EventOverviewBolusProgress;
import info.nightscout.rx.events.EventRefreshOverview; import info.nightscout.rx.events.EventRefreshOverview;
import info.nightscout.rx.logging.AAPSLogger; import info.nightscout.rx.logging.AAPSLogger;
import info.nightscout.rx.logging.LTag; import info.nightscout.rx.logging.LTag;
import info.nightscout.shared.interfaces.ResourceHelper;
import info.nightscout.shared.sharedPreferences.SP; import info.nightscout.shared.sharedPreferences.SP;
import info.nightscout.shared.utils.T;
import io.reactivex.rxjava3.subjects.SingleSubject; import io.reactivex.rxjava3.subjects.SingleSubject;
@Singleton @Singleton

View file

@ -8,12 +8,10 @@ import java.util.List;
import javax.inject.Inject; import javax.inject.Inject;
import javax.inject.Singleton; import javax.inject.Singleton;
import info.nightscout.androidaps.plugins.pump.common.defs.PumpDeviceState;
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkCommunicationManager; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkCommunicationManager;
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RileyLinkCommunicationException; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RileyLinkCommunicationException;
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.defs.RLMessageType; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.defs.RLMessageType;
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.defs.RileyLinkBLEError; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.defs.RileyLinkBLEError;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.action.OmnipodAction; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.action.OmnipodAction;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.MessageBlock; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.MessageBlock;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.OmnipodMessage; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.OmnipodMessage;
@ -43,6 +41,8 @@ import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.exception.Ril
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.exception.RileyLinkUnexpectedException; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.exception.RileyLinkUnexpectedException;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.exception.RileyLinkUnreachableException; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.exception.RileyLinkUnreachableException;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.manager.ErosPodStateManager; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.manager.ErosPodStateManager;
import info.nightscout.pump.core.defs.PumpDeviceState;
import info.nightscout.pump.core.utils.ByteUtil;
import info.nightscout.rx.logging.LTag; import info.nightscout.rx.logging.LTag;
/** /**

View file

@ -9,7 +9,6 @@ import org.apache.commons.lang3.StringUtils;
import javax.inject.Inject; import javax.inject.Inject;
import info.nightscout.androidaps.plugins.pump.common.defs.PumpDeviceState;
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkCommunicationManager; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkCommunicationManager;
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkConst; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkConst;
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.defs.RileyLinkEncodingType; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.defs.RileyLinkEncodingType;
@ -20,6 +19,7 @@ import info.nightscout.androidaps.plugins.pump.omnipod.eros.OmnipodErosPumpPlugi
import info.nightscout.androidaps.plugins.pump.omnipod.eros.R; import info.nightscout.androidaps.plugins.pump.omnipod.eros.R;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.rileylink.manager.OmnipodRileyLinkCommunicationManager; import info.nightscout.androidaps.plugins.pump.omnipod.eros.rileylink.manager.OmnipodRileyLinkCommunicationManager;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.util.AapsOmnipodUtil; import info.nightscout.androidaps.plugins.pump.omnipod.eros.util.AapsOmnipodUtil;
import info.nightscout.pump.core.defs.PumpDeviceState;
import info.nightscout.rx.logging.LTag; import info.nightscout.rx.logging.LTag;

View file

@ -1,5 +1,10 @@
package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.command; package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.command;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import org.joda.time.Duration; import org.joda.time.Duration;
import org.junit.Test; import org.junit.Test;
@ -7,15 +12,10 @@ import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.schedule.BasalSchedule; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.schedule.BasalSchedule;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.schedule.BasalScheduleEntry; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.schedule.BasalScheduleEntry;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.schedule.RateEntry; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.schedule.RateEntry;
import info.nightscout.pump.core.utils.ByteUtil;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
public class BasalScheduleExtraCommandTest { public class BasalScheduleExtraCommandTest {
@Test @Test

View file

@ -1,12 +1,12 @@
package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.command; package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.command;
import static org.junit.Assert.assertArrayEquals;
import org.joda.time.Duration; import org.joda.time.Duration;
import org.junit.Test; import org.junit.Test;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.BeepConfigType; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.BeepConfigType;
import info.nightscout.pump.core.utils.ByteUtil;
import static org.junit.Assert.assertArrayEquals;
public class BeepConfigCommandTest { public class BeepConfigCommandTest {
@Test @Test

View file

@ -1,11 +1,11 @@
package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.command; package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.command;
import static org.junit.Assert.assertArrayEquals;
import org.joda.time.Duration; import org.joda.time.Duration;
import org.junit.Test; import org.junit.Test;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil; import info.nightscout.pump.core.utils.ByteUtil;
import static org.junit.Assert.assertArrayEquals;
public class BolusExtraCommandTest { public class BolusExtraCommandTest {
@Test @Test

View file

@ -1,14 +1,14 @@
package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.command; package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.command;
import static org.junit.Assert.assertArrayEquals;
import org.junit.Test; import org.junit.Test;
import java.util.EnumSet; import java.util.EnumSet;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.BeepType; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.BeepType;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.DeliveryType; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.DeliveryType;
import info.nightscout.pump.core.utils.ByteUtil;
import static org.junit.Assert.assertArrayEquals;
public class CancelDeliveryCommandTest { public class CancelDeliveryCommandTest {

View file

@ -1,12 +1,13 @@
package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.command; package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.command;
import static org.junit.Assert.assertArrayEquals;
import org.joda.time.Duration; import org.joda.time.Duration;
import org.junit.Test; import org.junit.Test;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.AlertConfiguration; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.AlertConfiguration;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.AlertSlot; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.AlertSlot;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.AlertType; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.AlertType;
@ -14,8 +15,7 @@ import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.Be
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.BeepType; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.BeepType;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.TimerAlertTrigger; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.TimerAlertTrigger;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.UnitsRemainingAlertTrigger; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.UnitsRemainingAlertTrigger;
import info.nightscout.pump.core.utils.ByteUtil;
import static org.junit.Assert.assertArrayEquals;
public class ConfigureAlertsCommandTest { public class ConfigureAlertsCommandTest {
@Test @Test

View file

@ -1,11 +1,11 @@
package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.command; package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.command;
import static org.junit.Assert.assertArrayEquals;
import org.junit.Test; import org.junit.Test;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.PodInfoType; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.PodInfoType;
import info.nightscout.pump.core.utils.ByteUtil;
import static org.junit.Assert.assertArrayEquals;
public class GetStatusCommandTest { public class GetStatusCommandTest {
@Test @Test

View file

@ -1,5 +1,7 @@
package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.command; package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.command;
import static org.junit.Assert.assertArrayEquals;
import org.joda.time.Duration; import org.joda.time.Duration;
import org.junit.Test; import org.junit.Test;
@ -7,12 +9,10 @@ import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.schedule.BasalSchedule; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.schedule.BasalSchedule;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.schedule.BasalScheduleEntry; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.schedule.BasalScheduleEntry;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.schedule.BolusDeliverySchedule; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.schedule.BolusDeliverySchedule;
import info.nightscout.pump.core.utils.ByteUtil;
import static org.junit.Assert.assertArrayEquals;
public class SetInsulinScheduleCommandTest { public class SetInsulinScheduleCommandTest {
@Test @Test

View file

@ -1,11 +1,11 @@
package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.command; package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.command;
import static org.junit.Assert.assertArrayEquals;
import org.joda.time.DateTime; import org.joda.time.DateTime;
import org.junit.Test; import org.junit.Test;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil; import info.nightscout.pump.core.utils.ByteUtil;
import static org.junit.Assert.assertArrayEquals;
public class SetupPodCommandTest { public class SetupPodCommandTest {
@Test @Test

View file

@ -1,11 +1,11 @@
package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.command; package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.command;
import static org.junit.Assert.assertArrayEquals;
import org.joda.time.Duration; import org.joda.time.Duration;
import org.junit.Test; import org.junit.Test;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil; import info.nightscout.pump.core.utils.ByteUtil;
import static org.junit.Assert.assertArrayEquals;
public class TempBasalExtraCommandTest { public class TempBasalExtraCommandTest {
@Test @Test

View file

@ -1,15 +1,15 @@
package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.response; package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.response;
import org.junit.Test;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.FaultEventCode;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.PodProgressStatus;
import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull; import static org.junit.Assert.assertNull;
import org.junit.Test;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.FaultEventCode;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.PodProgressStatus;
import info.nightscout.pump.core.utils.ByteUtil;
public class ErrorResponseTest { public class ErrorResponseTest {
@Test @Test
public void testGetRawData() { public void testGetRawData() {

View file

@ -1,19 +1,19 @@
package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.response; package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.response;
import org.joda.time.Duration;
import org.junit.Test;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.AlertSlot;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.DeliveryStatus;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.OmnipodConstants;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.PodProgressStatus;
import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull; import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import org.joda.time.Duration;
import org.junit.Test;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.AlertSlot;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.DeliveryStatus;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.OmnipodConstants;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.PodProgressStatus;
import info.nightscout.pump.core.utils.ByteUtil;
public class StatusResponseTest { public class StatusResponseTest {
// TODO add /extend tests // TODO add /extend tests

View file

@ -1,10 +1,5 @@
package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.response; package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.response;
import org.junit.Test;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.PodProgressStatus;
import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertFalse;
@ -12,6 +7,11 @@ import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull; import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import org.junit.Test;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.PodProgressStatus;
import info.nightscout.pump.core.utils.ByteUtil;
public class VersionResponseTest { public class VersionResponseTest {
@Test @Test
public void testRawDataAssignAddressVersionResponse() { public void testRawDataAssignAddressVersionResponse() {

View file

@ -1,14 +1,14 @@
package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.response.podinfo; package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.response.podinfo;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import org.joda.time.Duration; import org.joda.time.Duration;
import org.junit.Test; import org.junit.Test;
import java.util.List; import java.util.List;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil; import info.nightscout.pump.core.utils.ByteUtil;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
public class PodInfoActiveAlertsTest { public class PodInfoActiveAlertsTest {
@Test @Test

View file

@ -1,13 +1,13 @@
package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.response.podinfo; package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.response.podinfo;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import org.joda.time.Duration; import org.joda.time.Duration;
import org.junit.Test; import org.junit.Test;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.FaultEventCode; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.FaultEventCode;
import info.nightscout.pump.core.utils.ByteUtil;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
public class PodInfoDataLogTest { public class PodInfoDataLogTest {
@Test @Test

View file

@ -1,19 +1,19 @@
package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.response.podinfo; package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.response.podinfo;
import org.joda.time.Duration;
import org.junit.Test;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.DeliveryStatus;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.ErrorEventInfo;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.FaultEventCode;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.PodProgressStatus;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull; import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import org.joda.time.Duration;
import org.junit.Test;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.DeliveryStatus;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.ErrorEventInfo;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.FaultEventCode;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.PodProgressStatus;
import info.nightscout.pump.core.utils.ByteUtil;
// From https://github.com/ps2/rileylink_ios/blob/omnipod-testing/OmniKitTests/PodInfoTests.swift // From https://github.com/ps2/rileylink_ios/blob/omnipod-testing/OmniKitTests/PodInfoTests.swift
public class PodInfoDetailedStatusTest { public class PodInfoDetailedStatusTest {
@Test @Test

View file

@ -1,15 +1,15 @@
package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.response.podinfo; package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.response.podinfo;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import org.joda.time.DateTime; import org.joda.time.DateTime;
import org.joda.time.Duration; import org.joda.time.Duration;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Test; import org.junit.Test;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.FaultEventCode; import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.FaultEventCode;
import info.nightscout.pump.core.utils.ByteUtil;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
public class PodInfoFaultAndInitializationTimeTest { public class PodInfoFaultAndInitializationTimeTest {
@Test @Test

View file

@ -1,10 +1,10 @@
package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.response.podinfo; package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.response.podinfo;
import static org.junit.Assert.assertEquals;
import org.junit.Test; import org.junit.Test;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil; import info.nightscout.pump.core.utils.ByteUtil;
import static org.junit.Assert.assertEquals;
public class PodInfoRecentPulseLogTest { public class PodInfoRecentPulseLogTest {
@Test @Test

View file

@ -1,17 +1,15 @@
package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.response.podinfo; package info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.communication.message.response.podinfo;
import org.junit.Assert;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.PodInfoType;
import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertFalse;
import org.junit.Assert;
import org.junit.Test;
import info.nightscout.androidaps.plugins.pump.omnipod.eros.driver.definition.PodInfoType;
import info.nightscout.pump.core.utils.ByteUtil;
public class PodInfoResponseTest { public class PodInfoResponseTest {
@Test @Test
public void testRawData() { public void testRawData() {

View file

@ -15,11 +15,9 @@ enum class PumpDriverState(var resourceId: Int) {
Ready(R.string.pump_status_ready), Ready(R.string.pump_status_ready),
Busy(R.string.pump_status_busy), // Busy(R.string.pump_status_busy), //
Suspended(R.string.pump_status_suspended), // Suspended(R.string.pump_status_suspended), //
Sleeping(R.string.pump_status_sleeping),
ExecutingCommand(R.string.pump_status_executing_command), ExecutingCommand(R.string.pump_status_executing_command),
Disconnecting(R.string.disconnecting), Disconnecting(R.string.disconnecting),
Disconnected(R.string.disconnected), Disconnected(R.string.disconnected);
ErrorCommunicatingWithPump(R.string.pump_status_error_comm);
fun isConnected(): Boolean = this == Connected || this == Initialized || this == Busy || this == Suspended fun isConnected(): Boolean = this == Connected || this == Initialized || this == Busy || this == Suspended
fun isInitialized(): Boolean = this == Initialized || this == Busy || this == Suspended fun isInitialized(): Boolean = this == Initialized || this == Busy || this == Suspended

View file

@ -11,14 +11,6 @@
<!-- PumpCommon - Pump Status --> <!-- PumpCommon - Pump Status -->
<string name="pump_status_never_contacted">Never contacted</string>
<string name="pump_status_waking_up">Waking up</string>
<string name="pump_status_error_comm">Error with communication</string>
<string name="pump_status_timeout_comm">Timeout on communication</string>
<string name="pump_status_pump_unreachable">Pump unreachable</string>
<string name="pump_status_invalid_config">Invalid configuration</string>
<string name="pump_status_active">Active</string>
<string name="pump_status_sleeping">Sleeping</string>
<string name="pump_status_not_initialized">Not initialized</string> <string name="pump_status_not_initialized">Not initialized</string>
<string name="pump_status_initialized">Initialized</string> <string name="pump_status_initialized">Initialized</string>
<string name="pump_status_encrypt">Encrypting communication</string> <string name="pump_status_encrypt">Encrypting communication</string>

1
pump/pump-core/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/build

View file

@ -0,0 +1,20 @@
plugins {
id 'com.android.library'
id 'kotlin-android'
id 'kotlin-kapt'
id 'kotlin-allopen'
id 'com.hiya.jacoco-android'
}
apply from: "${project.rootDir}/core/android_dependencies.gradle"
apply from: "${project.rootDir}/core/android_module_dependencies.gradle"
apply from: "${project.rootDir}/core/allopen_dependencies.gradle"
apply from: "${project.rootDir}/core/test_dependencies.gradle"
apply from: "${project.rootDir}/core/jacoco_global.gradle"
android {
namespace 'info.nightscout.pump.core'
}
dependencies {
api "net.danlew:android.joda:$joda_version"
}

View file

21
pump/pump-core/proguard-rules.pro vendored Normal file
View file

@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest>
</manifest>

View file

@ -1,6 +1,6 @@
package info.nightscout.androidaps.plugins.pump.common.defs package info.nightscout.pump.core.defs
import info.nightscout.androidaps.plugins.pump.common.R import info.nightscout.pump.core.R
enum class PumpDeviceState(var resourceId: Int) { enum class PumpDeviceState(var resourceId: Int) {

View file

@ -1,4 +1,4 @@
package info.nightscout.androidaps.plugins.pump.common.utils; package info.nightscout.pump.core.utils;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
import java.util.ArrayList; import java.util.ArrayList;

View file

@ -1,22 +1,19 @@
package info.nightscout.androidaps.plugins.pump.common.utils; package info.nightscout.pump.core.utils;
import org.joda.time.LocalDateTime; import org.joda.time.LocalDateTime;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.text.DecimalFormat; import java.text.DecimalFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import info.nightscout.shared.utils.DateUtil;
/** /**
* Created by geoff on 4/28/15. * Created by geoff on 4/28/15.
* modified by Andy * modified by Andy
*/ */
public class StringUtil { public class StringUtil {
public static DecimalFormat[] DecimalFormaters = { public static DecimalFormat[] DecimalFormatters = {
new DecimalFormat("#0"), new DecimalFormat("#0.0"), new DecimalFormat("#0.00"), new DecimalFormat("#0.000")}; new DecimalFormat("#0"), new DecimalFormat("#0.0"), new DecimalFormat("#0.00"), new DecimalFormat("#0.000")};
@ -44,7 +41,7 @@ public class StringUtil {
public static String testJoin() { public static String testJoin() {
ArrayList<String> ra = new ArrayList<String>(); ArrayList<String> ra = new ArrayList<>();
ra.add("one"); ra.add("one");
ra.add("two"); ra.add("two");
ra.add("three"); ra.add("three");
@ -69,8 +66,8 @@ public class StringUtil {
} }
public static String getFormatedValueUS(Number value, int decimals) { public static String getFormattedValueUS(Number value, int decimals) {
return DecimalFormaters[decimals].format(value).replace(",", "."); return DecimalFormatters[decimals].format(value).replace(",", ".");
} }
@ -85,9 +82,8 @@ public class StringUtil {
} }
public static String toDateTimeString(DateUtil dateUtil, LocalDateTime localDateTime) { public static String toDateTimeString(LocalDateTime localDateTime) {
return dateUtil.dateAndTimeAndSecondsString(localDateTime.toDateTime().getMillis()); return localDateTime.toString("dd.MM.yyyy HH:mm:ss");
//return localDateTime.toString("dd.MM.yyyy HH:mm:ss");
} }

View file

@ -1,4 +1,4 @@
package info.nightscout.androidaps.plugins.pump.common.utils; package info.nightscout.pump.core.utils;
/** /**
* Created by geoff on 5/27/16. * Created by geoff on 5/27/16.

View file

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- PumpDeviceState -->
<string name="pump_status_never_contacted">Never contacted</string>
<string name="pump_status_sleeping">Sleeping</string>
<string name="pump_status_waking_up">Waking up</string>
<string name="pump_status_active">Active</string>
<string name="pump_status_error_comm">Error with communication</string>
<string name="pump_status_timeout_comm">Timeout on communication</string>
<string name="pump_status_pump_unreachable">Pump unreachable</string>
<string name="pump_status_invalid_config">Invalid configuration</string>
</resources>

View file

@ -20,5 +20,6 @@ dependencies {
implementation project(':app-wear-shared:shared') implementation project(':app-wear-shared:shared')
implementation project(':core') implementation project(':core')
implementation project(':pump:pump-common') implementation project(':pump:pump-common')
implementation project(':pump:pump-core')
implementation project(':interfaces') implementation project(':interfaces')
} }

View file

@ -1,10 +1,10 @@
package info.nightscout.androidaps.plugins.pump.common.events package info.nightscout.androidaps.plugins.pump.common.events
import info.nightscout.androidaps.events.EventStatus import info.nightscout.androidaps.events.EventStatus
import info.nightscout.androidaps.plugins.pump.common.defs.PumpDeviceState
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLinkError import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLinkError
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLinkServiceState import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLinkServiceState
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLinkTargetDevice import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLinkTargetDevice
import info.nightscout.pump.core.defs.PumpDeviceState
import info.nightscout.shared.interfaces.ResourceHelper import info.nightscout.shared.interfaces.ResourceHelper
open class EventRileyLinkDeviceStatusChange : EventStatus { open class EventRileyLinkDeviceStatusChange : EventStatus {

View file

@ -6,7 +6,6 @@ import javax.inject.Inject;
import dagger.android.HasAndroidInjector; import dagger.android.HasAndroidInjector;
import info.nightscout.androidaps.interfaces.ActivePlugin; import info.nightscout.androidaps.interfaces.ActivePlugin;
import info.nightscout.androidaps.plugins.pump.common.defs.PumpDeviceState;
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RFSpy; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RFSpy;
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RileyLinkCommunicationException; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.RileyLinkCommunicationException;
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.FrequencyScanResults; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.FrequencyScanResults;
@ -21,8 +20,9 @@ import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLin
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.RileyLinkServiceData; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.RileyLinkServiceData;
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.tasks.ServiceTaskExecutor; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.tasks.ServiceTaskExecutor;
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.tasks.WakeAndTuneTask; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.tasks.WakeAndTuneTask;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil;
import info.nightscout.interfaces.utils.Round; import info.nightscout.interfaces.utils.Round;
import info.nightscout.pump.core.defs.PumpDeviceState;
import info.nightscout.pump.core.utils.ByteUtil;
import info.nightscout.rx.logging.AAPSLogger; import info.nightscout.rx.logging.AAPSLogger;
import info.nightscout.rx.logging.LTag; import info.nightscout.rx.logging.LTag;
import info.nightscout.shared.sharedPreferences.SP; import info.nightscout.shared.sharedPreferences.SP;

View file

@ -12,7 +12,6 @@ import javax.inject.Inject;
import javax.inject.Singleton; import javax.inject.Singleton;
import dagger.android.HasAndroidInjector; import dagger.android.HasAndroidInjector;
import info.nightscout.shared.interfaces.ResourceHelper;
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.R; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.R;
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkConst; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkConst;
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil;
@ -32,13 +31,14 @@ import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.defs.Rile
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.defs.RileyLinkTargetFrequency; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.defs.RileyLinkTargetFrequency;
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.operations.BLECommOperationResult; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.operations.BLECommOperationResult;
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.RileyLinkServiceData; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.RileyLinkServiceData;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil; import info.nightscout.pump.core.utils.ByteUtil;
import info.nightscout.androidaps.plugins.pump.common.utils.StringUtil; import info.nightscout.pump.core.utils.StringUtil;
import info.nightscout.androidaps.plugins.pump.common.utils.ThreadUtil; import info.nightscout.pump.core.utils.ThreadUtil;
import info.nightscout.rx.bus.RxBus; import info.nightscout.rx.bus.RxBus;
import info.nightscout.rx.events.EventRefreshOverview; import info.nightscout.rx.events.EventRefreshOverview;
import info.nightscout.rx.logging.AAPSLogger; import info.nightscout.rx.logging.AAPSLogger;
import info.nightscout.rx.logging.LTag; import info.nightscout.rx.logging.LTag;
import info.nightscout.shared.interfaces.ResourceHelper;
import info.nightscout.shared.sharedPreferences.SP; import info.nightscout.shared.sharedPreferences.SP;
/** /**

View file

@ -4,8 +4,8 @@ import android.os.SystemClock
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.GattAttributes import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.GattAttributes
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.defs.RileyLinkEncodingType import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.defs.RileyLinkEncodingType
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.operations.BLECommOperationResult import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.operations.BLECommOperationResult
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil import info.nightscout.pump.core.utils.ByteUtil
import info.nightscout.androidaps.plugins.pump.common.utils.ThreadUtil import info.nightscout.pump.core.utils.ThreadUtil
import info.nightscout.rx.logging.AAPSLogger import info.nightscout.rx.logging.AAPSLogger
import info.nightscout.rx.logging.LTag import info.nightscout.rx.logging.LTag
import java.util.UUID import java.util.UUID

View file

@ -15,7 +15,6 @@ import android.content.pm.PackageManager
import android.os.Build import android.os.Build
import android.os.SystemClock import android.os.SystemClock
import androidx.core.content.ContextCompat import androidx.core.content.ContextCompat
import info.nightscout.interfaces.Config
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkConst import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkConst
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.GattAttributes import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.GattAttributes
@ -28,8 +27,9 @@ import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.operation
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLinkError import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLinkError
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLinkServiceState import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.defs.RileyLinkServiceState
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.RileyLinkServiceData import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.RileyLinkServiceData
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil import info.nightscout.interfaces.Config
import info.nightscout.androidaps.plugins.pump.common.utils.ThreadUtil import info.nightscout.pump.core.utils.ByteUtil
import info.nightscout.pump.core.utils.ThreadUtil
import info.nightscout.rx.logging.AAPSLogger import info.nightscout.rx.logging.AAPSLogger
import info.nightscout.rx.logging.LTag import info.nightscout.rx.logging.LTag
import info.nightscout.shared.sharedPreferences.SP import info.nightscout.shared.sharedPreferences.SP

View file

@ -10,7 +10,7 @@ import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.data.Radi
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.defs.RileyLinkCommandType; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.defs.RileyLinkCommandType;
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.defs.RileyLinkFirmwareVersion; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.ble.defs.RileyLinkFirmwareVersion;
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.RileyLinkServiceData; import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.service.RileyLinkServiceData;
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil; import info.nightscout.pump.core.utils.ByteUtil;
public class SendAndListen extends RileyLinkCommand { public class SendAndListen extends RileyLinkCommand {

Some files were not shown because too many files have changed in this diff Show more