diff --git a/app/build.gradle b/app/build.gradle
index aaeac79c7e..4bf7ed83e4 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -242,6 +242,7 @@ dependencies {
wearApp project(':wear')
implementation project(':core')
+ implementation project(':dana')
implementation project(':danars')
implementation fileTree(include: ['*.jar'], dir: 'libs')
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index f0cc562041..59f2a2d054 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -64,8 +64,8 @@
-
-
+
+
@@ -74,7 +74,7 @@
-
+
@@ -82,9 +82,9 @@
-
@@ -166,7 +166,7 @@
android:enabled="true"
android:exported="false" />
{
+ info.nightscout.androidaps.dana.comm.RecordTypes.RECORD_TYPE_BOLUS -> {
danaRHistoryRecord.recordDate = datetime
when (0xF0 and paramByte8.toInt()) {
0xA0 -> {
@@ -65,56 +65,56 @@ open class MsgHistoryAll(
danaRHistoryRecord.recordValue = value * 0.01
}
- RecordTypes.RECORD_TYPE_DAILY -> {
+ info.nightscout.androidaps.dana.comm.RecordTypes.RECORD_TYPE_DAILY -> {
messageType += "dailyinsulin"
danaRHistoryRecord.recordDate = date
danaRHistoryRecord.recordDailyBasal = dailyBasal
danaRHistoryRecord.recordDailyBolus = dailyBolus
}
- RecordTypes.RECORD_TYPE_PRIME -> {
+ info.nightscout.androidaps.dana.comm.RecordTypes.RECORD_TYPE_PRIME -> {
messageType += "prime"
danaRHistoryRecord.recordDate = datetimewihtsec
danaRHistoryRecord.recordValue = value * 0.01
}
- RecordTypes.RECORD_TYPE_ERROR -> {
+ info.nightscout.androidaps.dana.comm.RecordTypes.RECORD_TYPE_ERROR -> {
messageType += "error"
danaRHistoryRecord.recordDate = datetimewihtsec
danaRHistoryRecord.recordValue = value * 0.01
}
- RecordTypes.RECORD_TYPE_REFILL -> {
+ info.nightscout.androidaps.dana.comm.RecordTypes.RECORD_TYPE_REFILL -> {
messageType += "refill"
danaRHistoryRecord.recordDate = datetimewihtsec
danaRHistoryRecord.recordValue = value * 0.01
}
- RecordTypes.RECORD_TYPE_BASALHOUR -> {
+ info.nightscout.androidaps.dana.comm.RecordTypes.RECORD_TYPE_BASALHOUR -> {
messageType += "basal hour"
danaRHistoryRecord.recordDate = datetimewihtsec
danaRHistoryRecord.recordValue = value * 0.01
}
- RecordTypes.RECORD_TYPE_TB -> {
+ info.nightscout.androidaps.dana.comm.RecordTypes.RECORD_TYPE_TB -> {
messageType += "tb"
danaRHistoryRecord.recordDate = datetimewihtsec
danaRHistoryRecord.recordValue = value * 0.01
}
- RecordTypes.RECORD_TYPE_GLUCOSE -> {
+ info.nightscout.androidaps.dana.comm.RecordTypes.RECORD_TYPE_GLUCOSE -> {
messageType += "glucose"
danaRHistoryRecord.recordDate = datetimewihtsec
danaRHistoryRecord.recordValue = value
}
- RecordTypes.RECORD_TYPE_CARBO -> {
+ info.nightscout.androidaps.dana.comm.RecordTypes.RECORD_TYPE_CARBO -> {
messageType += "carbo"
danaRHistoryRecord.recordDate = datetimewihtsec
danaRHistoryRecord.recordValue = value
}
- RecordTypes.RECORD_TYPE_ALARM -> {
+ info.nightscout.androidaps.dana.comm.RecordTypes.RECORD_TYPE_ALARM -> {
messageType += "alarm"
danaRHistoryRecord.recordDate = datetimewihtsec
var strAlarm = "None"
@@ -128,7 +128,7 @@ open class MsgHistoryAll(
danaRHistoryRecord.recordValue = value * 0.01
}
- RecordTypes.RECORD_TYPE_SUSPEND -> {
+ info.nightscout.androidaps.dana.comm.RecordTypes.RECORD_TYPE_SUSPEND -> {
messageType += "suspend"
danaRHistoryRecord.recordDate = datetimewihtsec
var strRecordValue = "Off"
@@ -136,7 +136,7 @@ open class MsgHistoryAll(
danaRHistoryRecord.stringRecordValue = strRecordValue
}
- 17.toByte() -> failed = true
+ 17.toByte() -> failed = true
}
MainApp.getDbHelper().createOrUpdate(danaRHistoryRecord)
rxBus.send(EventDanaRSyncStatus(dateUtil.dateAndTimeString(danaRHistoryRecord.recordDate) + " " + messageType))
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgHistoryAllDone.kt b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgHistoryAllDone.kt
index bd5d634423..5caff7d6e9 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgHistoryAllDone.kt
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgHistoryAllDone.kt
@@ -2,11 +2,11 @@ package info.nightscout.androidaps.plugins.pump.danaR.comm
import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
class MsgHistoryAllDone(
private val aapsLogger: AAPSLogger,
- private val danaRPump: DanaRPump
+ private val danaRPump: info.nightscout.androidaps.dana.DanaRPump
) : MessageBase() {
init {
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgHistoryDone.kt b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgHistoryDone.kt
index 203b5f71d7..f0c3ba1170 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgHistoryDone.kt
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgHistoryDone.kt
@@ -2,11 +2,11 @@ package info.nightscout.androidaps.plugins.pump.danaR.comm
import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
class MsgHistoryDone(
private val aapsLogger: AAPSLogger,
- private val danaRPump: DanaRPump
+ private val danaRPump: info.nightscout.androidaps.dana.DanaRPump
) : MessageBase() {
init {
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgHistoryNewDone.kt b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgHistoryNewDone.kt
index e6d292d54e..b71179342a 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgHistoryNewDone.kt
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgHistoryNewDone.kt
@@ -2,11 +2,11 @@ package info.nightscout.androidaps.plugins.pump.danaR.comm
import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
class MsgHistoryNewDone(
private val aapsLogger: AAPSLogger,
- private val danaRPump: DanaRPump
+ private val danaRPump: info.nightscout.androidaps.dana.DanaRPump
) : MessageBase() {
init {
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgInitConnStatusBasic.kt b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgInitConnStatusBasic.kt
index f91042282e..be6ea26f4b 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgInitConnStatusBasic.kt
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgInitConnStatusBasic.kt
@@ -2,11 +2,11 @@ package info.nightscout.androidaps.plugins.pump.danaR.comm
import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
class MsgInitConnStatusBasic(
private val aapsLogger: AAPSLogger,
- private val danaRPump: DanaRPump
+ private val danaRPump: info.nightscout.androidaps.dana.DanaRPump
) : MessageBase() {
init {
@@ -33,10 +33,10 @@ class MsgInitConnStatusBasic(
val extendedBolusRate = intFromBuff(bytes, 18, 2) / 100.0
danaRPump.batteryRemaining = intFromBuff(bytes, 20, 1)
val bolusConfig = intFromBuff(bytes, 21, 1)
- val deliveryPrime = bolusConfig and DanaRPump.DELIVERY_PRIME != 0
- val deliveryStepBolus = bolusConfig and DanaRPump.DELIVERY_STEP_BOLUS != 0
- val deliveryBasal = bolusConfig and DanaRPump.DELIVERY_BASAL != 0
- val deliveryExtBolus = bolusConfig and DanaRPump.DELIVERY_EXT_BOLUS != 0
+ val deliveryPrime = bolusConfig and info.nightscout.androidaps.dana.DanaRPump.DELIVERY_PRIME != 0
+ val deliveryStepBolus = bolusConfig and info.nightscout.androidaps.dana.DanaRPump.DELIVERY_STEP_BOLUS != 0
+ val deliveryBasal = bolusConfig and info.nightscout.androidaps.dana.DanaRPump.DELIVERY_BASAL != 0
+ val deliveryExtBolus = bolusConfig and info.nightscout.androidaps.dana.DanaRPump.DELIVERY_EXT_BOLUS != 0
aapsLogger.debug(LTag.PUMPCOMM, "Delivery prime: $deliveryPrime")
aapsLogger.debug(LTag.PUMPCOMM, "Delivery step bolus: $deliveryStepBolus")
aapsLogger.debug(LTag.PUMPCOMM, "Delivery basal: $deliveryBasal")
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgInitConnStatusBolus.kt b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgInitConnStatusBolus.kt
index 580df8e133..9bd09848d7 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgInitConnStatusBolus.kt
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgInitConnStatusBolus.kt
@@ -7,14 +7,14 @@ import info.nightscout.androidaps.plugins.bus.RxBusWrapper
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.notifications.Notification
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
import info.nightscout.androidaps.utils.resources.ResourceHelper
class MsgInitConnStatusBolus(
private val aapsLogger: AAPSLogger,
private val rxBus: RxBusWrapper,
private val resourceHelper: ResourceHelper,
- private val danaRPump: DanaRPump
+ private val danaRPump: info.nightscout.androidaps.dana.DanaRPump
) : MessageBase() {
init {
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgInitConnStatusOption.kt b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgInitConnStatusOption.kt
index ee1d26ce3f..9b7ce29bea 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgInitConnStatusOption.kt
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgInitConnStatusOption.kt
@@ -8,14 +8,14 @@ import info.nightscout.androidaps.plugins.bus.RxBusWrapper
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.notifications.Notification
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
import info.nightscout.androidaps.utils.resources.ResourceHelper
class MsgInitConnStatusOption(
private val aapsLogger: AAPSLogger,
private val rxBus: RxBusWrapper,
private val resourceHelper: ResourceHelper,
- private val danaRPump: DanaRPump,
+ private val danaRPump: info.nightscout.androidaps.dana.DanaRPump,
private val activePlugin: ActivePluginProvider
) : MessageBase() {
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgInitConnStatusTime.kt b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgInitConnStatusTime.kt
index 7d1ded9f8f..dd0a975726 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgInitConnStatusTime.kt
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgInitConnStatusTime.kt
@@ -11,7 +11,7 @@ import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin
import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification
import info.nightscout.androidaps.plugins.general.overview.notifications.Notification
import info.nightscout.androidaps.plugins.pump.danaR.DanaRPlugin
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
import info.nightscout.androidaps.plugins.pump.danaRKorean.DanaRKoreanPlugin
import info.nightscout.androidaps.utils.DateUtil
import info.nightscout.androidaps.utils.resources.ResourceHelper
@@ -20,7 +20,7 @@ class MsgInitConnStatusTime(
private val aapsLogger: AAPSLogger,
private val rxBus: RxBusWrapper,
private val resourceHelper: ResourceHelper,
- private val danaRPump: DanaRPump,
+ private val danaRPump: info.nightscout.androidaps.dana.DanaRPump,
private val danaRPlugin: DanaRPlugin,
private val danaRKoreanPlugin: DanaRKoreanPlugin,
private val configBuilderPlugin: ConfigBuilderPlugin,
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSetCarbsEntry.kt b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSetCarbsEntry.kt
index 0e62c0d625..03fcfbca6b 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSetCarbsEntry.kt
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSetCarbsEntry.kt
@@ -15,7 +15,7 @@ class MsgSetCarbsEntry(
aapsLogger.debug(LTag.PUMPBTCOMM, "New message")
val calendar = Calendar.getInstance()
calendar.timeInMillis = time
- AddParamByte(RecordTypes.RECORD_TYPE_CARBO)
+ AddParamByte(info.nightscout.androidaps.dana.comm.RecordTypes.RECORD_TYPE_CARBO)
AddParamByte((calendar[Calendar.YEAR] % 100).toByte())
AddParamByte((calendar[Calendar.MONTH] + 1).toByte())
AddParamByte(calendar[Calendar.DAY_OF_MONTH].toByte())
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSetUserOptions.kt b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSetUserOptions.kt
index f2a579fd72..8a69890dd4 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSetUserOptions.kt
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSetUserOptions.kt
@@ -2,11 +2,11 @@ package info.nightscout.androidaps.plugins.pump.danaR.comm
import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
class MsgSetUserOptions(
private val aapsLogger: AAPSLogger,
- danaRPump: DanaRPump
+ danaRPump: info.nightscout.androidaps.dana.DanaRPump
) : MessageBase() {
init {
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingActiveProfile.kt b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingActiveProfile.kt
index 4da6770031..1319874016 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingActiveProfile.kt
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingActiveProfile.kt
@@ -2,11 +2,11 @@ package info.nightscout.androidaps.plugins.pump.danaR.comm
import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
class MsgSettingActiveProfile(
private val aapsLogger: AAPSLogger,
- private val danaRPump: DanaRPump
+ private val danaRPump: info.nightscout.androidaps.dana.DanaRPump
) : MessageBase() {
init {
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingBasal.kt b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingBasal.kt
index 256063ced1..1f06d35217 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingBasal.kt
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingBasal.kt
@@ -3,12 +3,12 @@ package info.nightscout.androidaps.plugins.pump.danaR.comm
import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag
import info.nightscout.androidaps.plugins.pump.danaR.DanaRPlugin
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
import java.util.*
class MsgSettingBasal(
private val aapsLogger: AAPSLogger,
- private val danaRPump: DanaRPump,
+ private val danaRPump: info.nightscout.androidaps.dana.DanaRPump,
private val danaRPlugin: DanaRPlugin
) : MessageBase() {
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingBasalProfileAll.kt b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingBasalProfileAll.kt
index c0270a29dd..3e3eb03a5a 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingBasalProfileAll.kt
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingBasalProfileAll.kt
@@ -2,7 +2,7 @@ package info.nightscout.androidaps.plugins.pump.danaR.comm
import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
import java.util.*
/**
@@ -15,7 +15,7 @@ import java.util.*
*/
class MsgSettingBasalProfileAll(
private val aapsLogger: AAPSLogger,
- private val danaRPump: DanaRPump
+ private val danaRPump: info.nightscout.androidaps.dana.DanaRPump
) : MessageBase() {
override fun handleMessage(bytes: ByteArray) {
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingGlucose.kt b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingGlucose.kt
index a4cad21293..86f3be273e 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingGlucose.kt
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingGlucose.kt
@@ -2,14 +2,14 @@ package info.nightscout.androidaps.plugins.pump.danaR.comm
import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
/**
* Created by mike on 05.07.2016.
*/
class MsgSettingGlucose(
private val aapsLogger: AAPSLogger,
- private val danaRPump: DanaRPump
+ private val danaRPump: info.nightscout.androidaps.dana.DanaRPump
) : MessageBase() {
init {
@@ -20,7 +20,7 @@ class MsgSettingGlucose(
override fun handleMessage(bytes: ByteArray) {
danaRPump.units = intFromBuff(bytes, 0, 1)
danaRPump.easyBasalMode = intFromBuff(bytes, 1, 1)
- aapsLogger.debug(LTag.PUMPCOMM, "Pump units: " + if (danaRPump.units == DanaRPump.UNITS_MGDL) "MGDL" else "MMOL")
+ aapsLogger.debug(LTag.PUMPCOMM, "Pump units: " + if (danaRPump.units == info.nightscout.androidaps.dana.DanaRPump.UNITS_MGDL) "MGDL" else "MMOL")
aapsLogger.debug(LTag.PUMPCOMM, "Easy basal mode: " + danaRPump.easyBasalMode)
}
}
\ No newline at end of file
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingMaxValues.kt b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingMaxValues.kt
index 437af793f8..f637e28842 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingMaxValues.kt
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingMaxValues.kt
@@ -2,11 +2,11 @@ package info.nightscout.androidaps.plugins.pump.danaR.comm
import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
class MsgSettingMaxValues(
private val aapsLogger: AAPSLogger,
- private val danaRPump: DanaRPump
+ private val danaRPump: info.nightscout.androidaps.dana.DanaRPump
) : MessageBase() {
init {
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingMeal.kt b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingMeal.kt
index df40a71cf1..8f0dfa15c4 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingMeal.kt
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingMeal.kt
@@ -8,7 +8,7 @@ import info.nightscout.androidaps.plugins.bus.RxBusWrapper
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.notifications.Notification
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
import info.nightscout.androidaps.plugins.pump.danaRKorean.DanaRKoreanPlugin
import info.nightscout.androidaps.utils.resources.ResourceHelper
@@ -16,7 +16,7 @@ class MsgSettingMeal(
private val aapsLogger: AAPSLogger,
private val rxBus: RxBusWrapper,
private val resourceHelper: ResourceHelper,
- private val danaRPump: DanaRPump,
+ private val danaRPump: info.nightscout.androidaps.dana.DanaRPump,
private val danaRKoreanPlugin: DanaRKoreanPlugin
) : MessageBase() {
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingProfileRatios.kt b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingProfileRatios.kt
index 6c29024677..609ce479f9 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingProfileRatios.kt
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingProfileRatios.kt
@@ -2,11 +2,11 @@ package info.nightscout.androidaps.plugins.pump.danaR.comm
import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
class MsgSettingProfileRatios(
private val aapsLogger: AAPSLogger,
- private val danaRPump: DanaRPump
+ private val danaRPump: info.nightscout.androidaps.dana.DanaRPump
) : MessageBase() {
init {
@@ -15,7 +15,7 @@ class MsgSettingProfileRatios(
}
override fun handleMessage(bytes: ByteArray) {
- if (danaRPump.units == DanaRPump.UNITS_MGDL) {
+ if (danaRPump.units == info.nightscout.androidaps.dana.DanaRPump.UNITS_MGDL) {
danaRPump.currentCIR = intFromBuff(bytes, 0, 2)
danaRPump.currentCF = intFromBuff(bytes, 2, 2).toDouble()
danaRPump.currentAI = intFromBuff(bytes, 4, 2) / 100.0
@@ -28,7 +28,7 @@ class MsgSettingProfileRatios(
danaRPump.currentTarget = intFromBuff(bytes, 6, 2) / 100.0
danaRPump.currentAIDR = intFromBuff(bytes, 8, 1)
}
- aapsLogger.debug(LTag.PUMPCOMM, "Pump units (saved): " + if (danaRPump.units == DanaRPump.UNITS_MGDL) "MGDL" else "MMOL")
+ aapsLogger.debug(LTag.PUMPCOMM, "Pump units (saved): " + if (danaRPump.units == info.nightscout.androidaps.dana.DanaRPump.UNITS_MGDL) "MGDL" else "MMOL")
aapsLogger.debug(LTag.PUMPCOMM, "Current pump CIR: " + danaRPump.currentCIR)
aapsLogger.debug(LTag.PUMPCOMM, "Current pump CF: " + danaRPump.currentCF)
aapsLogger.debug(LTag.PUMPCOMM, "Current pump AI: " + danaRPump.currentAI)
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingProfileRatiosAll.kt b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingProfileRatiosAll.kt
index 4f626e89df..201625bb66 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingProfileRatiosAll.kt
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingProfileRatiosAll.kt
@@ -2,11 +2,11 @@ package info.nightscout.androidaps.plugins.pump.danaR.comm
import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
class MsgSettingProfileRatiosAll(
private val aapsLogger: AAPSLogger,
- private val danaRPump: DanaRPump
+ private val danaRPump: info.nightscout.androidaps.dana.DanaRPump
) : MessageBase() {
init {
@@ -15,7 +15,7 @@ class MsgSettingProfileRatiosAll(
}
override fun handleMessage(bytes: ByteArray) {
- if (danaRPump.units == DanaRPump.UNITS_MGDL) {
+ if (danaRPump.units == info.nightscout.androidaps.dana.DanaRPump.UNITS_MGDL) {
danaRPump.morningCIR = intFromBuff(bytes, 0, 2)
danaRPump.morningCF = intFromBuff(bytes, 2, 2).toDouble()
danaRPump.afternoonCIR = intFromBuff(bytes, 4, 2)
@@ -34,7 +34,7 @@ class MsgSettingProfileRatiosAll(
danaRPump.nightCIR = intFromBuff(bytes, 12, 2)
danaRPump.nightCF = intFromBuff(bytes, 14, 2) / 100.0
}
- aapsLogger.debug(LTag.PUMPCOMM, "Pump units: " + if (danaRPump.units == DanaRPump.UNITS_MGDL) "MGDL" else "MMOL")
+ aapsLogger.debug(LTag.PUMPCOMM, "Pump units: " + if (danaRPump.units == info.nightscout.androidaps.dana.DanaRPump.UNITS_MGDL) "MGDL" else "MMOL")
aapsLogger.debug(LTag.PUMPCOMM, "Current pump morning CIR: " + danaRPump.morningCIR)
aapsLogger.debug(LTag.PUMPCOMM, "Current pump morning CF: " + danaRPump.morningCF)
aapsLogger.debug(LTag.PUMPCOMM, "Current pump afternoon CIR: " + danaRPump.afternoonCIR)
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingPumpTime.kt b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingPumpTime.kt
index 2d2f665043..0bfec34561 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingPumpTime.kt
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingPumpTime.kt
@@ -2,14 +2,14 @@ package info.nightscout.androidaps.plugins.pump.danaR.comm
import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
import info.nightscout.androidaps.utils.DateUtil
import org.joda.time.DateTime
import java.util.*
class MsgSettingPumpTime(
private val aapsLogger: AAPSLogger,
- private val danaRPump: DanaRPump,
+ private val danaRPump: info.nightscout.androidaps.dana.DanaRPump,
private val dateUtil: DateUtil
) : MessageBase() {
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingShippingInfo.kt b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingShippingInfo.kt
index 7d442e00d6..cde068bfd8 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingShippingInfo.kt
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingShippingInfo.kt
@@ -2,11 +2,11 @@ package info.nightscout.androidaps.plugins.pump.danaR.comm
import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
class MsgSettingShippingInfo(
private val aapsLogger: AAPSLogger,
- private val danaRPump: DanaRPump
+ private val danaRPump: info.nightscout.androidaps.dana.DanaRPump
) : MessageBase() {
init {
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingUserOptions.kt b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingUserOptions.kt
index 3678424499..eea5a9a7d0 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingUserOptions.kt
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingUserOptions.kt
@@ -2,12 +2,12 @@ package info.nightscout.androidaps.plugins.pump.danaR.comm
import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
import java.util.*
class MsgSettingUserOptions(
private val aapsLogger: AAPSLogger,
- private val danaRPump: DanaRPump
+ private val danaRPump: info.nightscout.androidaps.dana.DanaRPump
) : MessageBase() {
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgStatus.kt b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgStatus.kt
index e37ad1ebb6..e0f611b06c 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgStatus.kt
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgStatus.kt
@@ -2,11 +2,11 @@ package info.nightscout.androidaps.plugins.pump.danaR.comm
import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
class MsgStatus(
private val aapsLogger: AAPSLogger,
- private val danaRPump: DanaRPump
+ private val danaRPump: info.nightscout.androidaps.dana.DanaRPump
) : MessageBase() {
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgStatusBasic.kt b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgStatusBasic.kt
index 97b485eead..5eabda782a 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgStatusBasic.kt
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgStatusBasic.kt
@@ -2,11 +2,11 @@ package info.nightscout.androidaps.plugins.pump.danaR.comm
import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
class MsgStatusBasic(
private val aapsLogger: AAPSLogger,
- private val danaRPump: DanaRPump
+ private val danaRPump: info.nightscout.androidaps.dana.DanaRPump
) : MessageBase() {
init {
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgStatusBolusExtended.kt b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgStatusBolusExtended.kt
index b7151d8add..d96915d170 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgStatusBolusExtended.kt
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgStatusBolusExtended.kt
@@ -6,14 +6,14 @@ import info.nightscout.androidaps.db.Source
import info.nightscout.androidaps.interfaces.ActivePluginProvider
import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
import info.nightscout.androidaps.utils.DateUtil
import kotlin.math.ceil
class MsgStatusBolusExtended(
private val injector: HasAndroidInjector,
private val aapsLogger: AAPSLogger,
- private val danaRPump: DanaRPump,
+ private val danaRPump: info.nightscout.androidaps.dana.DanaRPump,
private val activePlugin: ActivePluginProvider,
private val dateUtil: DateUtil
) : MessageBase() {
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgStatusProfile.kt b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgStatusProfile.kt
index e8bd43012b..678ee859ac 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgStatusProfile.kt
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgStatusProfile.kt
@@ -2,11 +2,11 @@ package info.nightscout.androidaps.plugins.pump.danaR.comm
import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
class MsgStatusProfile(
private val aapsLogger: AAPSLogger,
- private val danaRPump: DanaRPump
+ private val danaRPump: info.nightscout.androidaps.dana.DanaRPump
) : MessageBase() {
init {
@@ -15,7 +15,7 @@ class MsgStatusProfile(
}
override fun handleMessage(bytes: ByteArray) {
- if (danaRPump.units == DanaRPump.UNITS_MGDL) {
+ if (danaRPump.units == info.nightscout.androidaps.dana.DanaRPump.UNITS_MGDL) {
danaRPump.currentCIR = intFromBuff(bytes, 0, 2)
danaRPump.currentCF = intFromBuff(bytes, 2, 2).toDouble()
danaRPump.currentAI = intFromBuff(bytes, 4, 2) / 100.0
@@ -26,7 +26,7 @@ class MsgStatusProfile(
danaRPump.currentAI = intFromBuff(bytes, 4, 2) / 100.0
danaRPump.currentTarget = intFromBuff(bytes, 6, 2) / 100.0
}
- aapsLogger.debug(LTag.PUMPCOMM, "Pump units (saved): " + if (danaRPump.units == DanaRPump.UNITS_MGDL) "MGDL" else "MMOL")
+ aapsLogger.debug(LTag.PUMPCOMM, "Pump units (saved): " + if (danaRPump.units == info.nightscout.androidaps.dana.DanaRPump.UNITS_MGDL) "MGDL" else "MMOL")
aapsLogger.debug(LTag.PUMPCOMM, "Current pump CIR: " + danaRPump.currentCIR)
aapsLogger.debug(LTag.PUMPCOMM, "Current pump CF: " + danaRPump.currentCF)
aapsLogger.debug(LTag.PUMPCOMM, "Current pump AI: " + danaRPump.currentAI)
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgStatusTempBasal.kt b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgStatusTempBasal.kt
index 67b865bed5..aa30e615f6 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgStatusTempBasal.kt
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgStatusTempBasal.kt
@@ -6,12 +6,12 @@ import info.nightscout.androidaps.db.TemporaryBasal
import info.nightscout.androidaps.interfaces.ActivePluginProvider
import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
import kotlin.math.ceil
class MsgStatusTempBasal(
private val aapsLogger: AAPSLogger,
- private val danaRPump: DanaRPump,
+ private val danaRPump: info.nightscout.androidaps.dana.DanaRPump,
private val activePlugin: ActivePluginProvider,
private val injector: HasAndroidInjector
) : MessageBase() {
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/services/AbstractDanaRExecutionService.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/services/AbstractDanaRExecutionService.java
index b6b707381f..3b77c9723e 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/services/AbstractDanaRExecutionService.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/services/AbstractDanaRExecutionService.java
@@ -17,6 +17,8 @@ import javax.inject.Inject;
import dagger.android.DaggerService;
import dagger.android.HasAndroidInjector;
import info.nightscout.androidaps.R;
+import info.nightscout.androidaps.dana.DanaRPump;
+import info.nightscout.androidaps.dana.comm.RecordTypes;
import info.nightscout.androidaps.data.Profile;
import info.nightscout.androidaps.data.PumpEnactResult;
import info.nightscout.androidaps.events.EventAppExit;
@@ -25,7 +27,6 @@ import info.nightscout.androidaps.events.EventPumpStatusChanged;
import info.nightscout.androidaps.logging.AAPSLogger;
import info.nightscout.androidaps.logging.LTag;
import info.nightscout.androidaps.plugins.bus.RxBusWrapper;
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump;
import info.nightscout.androidaps.plugins.pump.danaR.comm.MessageBase;
import info.nightscout.androidaps.plugins.pump.danaR.comm.MsgBolusStop;
import info.nightscout.androidaps.plugins.pump.danaR.comm.MsgHistoryAlarm;
@@ -39,7 +40,6 @@ import info.nightscout.androidaps.plugins.pump.danaR.comm.MsgHistoryRefill;
import info.nightscout.androidaps.plugins.pump.danaR.comm.MsgHistorySuspend;
import info.nightscout.androidaps.plugins.pump.danaR.comm.MsgPCCommStart;
import info.nightscout.androidaps.plugins.pump.danaR.comm.MsgPCCommStop;
-import info.nightscout.androidaps.plugins.pump.danaR.comm.RecordTypes;
import info.nightscout.androidaps.db.Treatment;
import info.nightscout.androidaps.utils.DateUtil;
import info.nightscout.androidaps.utils.FabricPrivacy;
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/services/DanaRExecutionService.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/services/DanaRExecutionService.java
index 2a357761f5..d32383bef4 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/services/DanaRExecutionService.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/services/DanaRExecutionService.java
@@ -1,6 +1,5 @@
package info.nightscout.androidaps.plugins.pump.danaR.services;
-import android.content.Context;
import android.os.Binder;
import android.os.SystemClock;
@@ -12,6 +11,8 @@ import javax.inject.Inject;
import dagger.android.HasAndroidInjector;
import info.nightscout.androidaps.Constants;
import info.nightscout.androidaps.R;
+import info.nightscout.androidaps.dana.DanaRPump;
+import info.nightscout.androidaps.dana.events.EventDanaRNewStatus;
import info.nightscout.androidaps.data.Profile;
import info.nightscout.androidaps.data.PumpEnactResult;
import info.nightscout.androidaps.db.Treatment;
@@ -25,14 +26,12 @@ import info.nightscout.androidaps.interfaces.ProfileFunction;
import info.nightscout.androidaps.logging.AAPSLogger;
import info.nightscout.androidaps.logging.LTag;
import info.nightscout.androidaps.plugins.bus.RxBusWrapper;
-import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
import info.nightscout.androidaps.plugins.configBuilder.ConstraintChecker;
import info.nightscout.androidaps.plugins.general.nsclient.NSUpload;
import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification;
import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress;
import info.nightscout.androidaps.plugins.general.overview.notifications.Notification;
import info.nightscout.androidaps.plugins.pump.danaR.DanaRPlugin;
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump;
import info.nightscout.androidaps.plugins.pump.danaR.SerialIOThread;
import info.nightscout.androidaps.plugins.pump.danaR.comm.MessageBase;
import info.nightscout.androidaps.plugins.pump.danaR.comm.MessageHashTableR;
@@ -62,7 +61,6 @@ import info.nightscout.androidaps.plugins.pump.danaR.comm.MsgStatus;
import info.nightscout.androidaps.plugins.pump.danaR.comm.MsgStatusBasic;
import info.nightscout.androidaps.plugins.pump.danaR.comm.MsgStatusBolusExtended;
import info.nightscout.androidaps.plugins.pump.danaR.comm.MsgStatusTempBasal;
-import info.nightscout.androidaps.plugins.pump.danaR.events.EventDanaRNewStatus;
import info.nightscout.androidaps.plugins.pump.danaRKorean.DanaRKoreanPlugin;
import info.nightscout.androidaps.queue.Callback;
import info.nightscout.androidaps.queue.commands.Command;
@@ -77,9 +75,7 @@ public class DanaRExecutionService extends AbstractDanaRExecutionService {
@Inject DanaRPump danaRPump;
@Inject DanaRPlugin danaRPlugin;
@Inject DanaRKoreanPlugin danaRKoreanPlugin;
- @Inject ConfigBuilderPlugin configBuilderPlugin;
@Inject CommandQueueProvider commandQueue;
- @Inject Context context;
@Inject MessageHashTableR messageHashTableR;
@Inject ActivePluginProvider activePlugin;
@Inject ProfileFunction profileFunction;
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/DanaRKoreanPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/DanaRKoreanPlugin.java
index ad079c06ce..01b70b63aa 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/DanaRKoreanPlugin.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/DanaRKoreanPlugin.java
@@ -13,6 +13,7 @@ import javax.inject.Singleton;
import dagger.android.HasAndroidInjector;
import info.nightscout.androidaps.R;
+import info.nightscout.androidaps.dana.DanaRPump;
import info.nightscout.androidaps.data.DetailedBolusInfo;
import info.nightscout.androidaps.data.Profile;
import info.nightscout.androidaps.data.PumpEnactResult;
@@ -29,7 +30,6 @@ import info.nightscout.androidaps.plugins.bus.RxBusWrapper;
import info.nightscout.androidaps.plugins.configBuilder.ConstraintChecker;
import info.nightscout.androidaps.plugins.pump.common.defs.PumpType;
import info.nightscout.androidaps.plugins.pump.danaR.AbstractDanaRPlugin;
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump;
import info.nightscout.androidaps.plugins.pump.danaRKorean.services.DanaRKoreanExecutionService;
import info.nightscout.androidaps.db.Treatment;
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin;
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/comm/MessageHashTableRKorean.kt b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/comm/MessageHashTableRKorean.kt
index 67ce3eb6b4..04a2c45ccd 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/comm/MessageHashTableRKorean.kt
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/comm/MessageHashTableRKorean.kt
@@ -9,7 +9,7 @@ import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin
import info.nightscout.androidaps.plugins.configBuilder.ConstraintChecker
import info.nightscout.androidaps.plugins.general.nsclient.NSUpload
import info.nightscout.androidaps.plugins.pump.danaR.DanaRPlugin
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
import info.nightscout.androidaps.plugins.pump.danaR.comm.*
import info.nightscout.androidaps.plugins.pump.danaRKorean.DanaRKoreanPlugin
import info.nightscout.androidaps.utils.DateUtil
@@ -24,7 +24,7 @@ class MessageHashTableRKorean @Inject constructor(
rxBus: RxBusWrapper,
resourceHelper: ResourceHelper,
constraintChecker: ConstraintChecker,
- danaRPump: DanaRPump,
+ danaRPump: info.nightscout.androidaps.dana.DanaRPump,
danaRPlugin: DanaRPlugin,
danaRKoreanPlugin: DanaRKoreanPlugin,
configBuilderPlugin: ConfigBuilderPlugin,
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/comm/MsgCheckValue_k.kt b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/comm/MsgCheckValue_k.kt
index 1742c4b1dd..90c5324be9 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/comm/MsgCheckValue_k.kt
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/comm/MsgCheckValue_k.kt
@@ -2,13 +2,13 @@ package info.nightscout.androidaps.plugins.pump.danaRKorean.comm
import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
import info.nightscout.androidaps.plugins.pump.danaR.comm.MessageBase
import info.nightscout.androidaps.plugins.pump.danaRKorean.DanaRKoreanPlugin
class MsgCheckValue_k(
private val aapsLogger: AAPSLogger,
- private val danaRPump: DanaRPump,
+ private val danaRPump: info.nightscout.androidaps.dana.DanaRPump,
private val danaRKoreanPlugin: DanaRKoreanPlugin
) : MessageBase() {
@@ -24,7 +24,7 @@ class MsgCheckValue_k(
danaRPump.hwModel = intFromBuff(bytes, 0, 1)
danaRPump.protocol = intFromBuff(bytes, 1, 1)
danaRPump.productCode = intFromBuff(bytes, 2, 1)
- if (danaRPump.hwModel != DanaRPump.DOMESTIC_MODEL) {
+ if (danaRPump.hwModel != info.nightscout.androidaps.dana.DanaRPump.DOMESTIC_MODEL) {
danaRKoreanPlugin.disconnect("Wrong Model")
aapsLogger.debug(LTag.PUMPCOMM, "Wrong model selected")
}
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/comm/MsgInitConnStatusBasic_k.kt b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/comm/MsgInitConnStatusBasic_k.kt
index 89a083f34a..e2496e9d55 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/comm/MsgInitConnStatusBasic_k.kt
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/comm/MsgInitConnStatusBasic_k.kt
@@ -7,7 +7,7 @@ import info.nightscout.androidaps.plugins.bus.RxBusWrapper
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.notifications.Notification
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
import info.nightscout.androidaps.plugins.pump.danaR.comm.MessageBase
import info.nightscout.androidaps.utils.resources.ResourceHelper
@@ -15,7 +15,7 @@ class MsgInitConnStatusBasic_k(
private val aapsLogger: AAPSLogger,
private val rxBus: RxBusWrapper,
private val resourceHelper: ResourceHelper,
- private val danaRPump: DanaRPump
+ private val danaRPump: info.nightscout.androidaps.dana.DanaRPump
) : MessageBase() {
init {
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/comm/MsgInitConnStatusBolus_k.kt b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/comm/MsgInitConnStatusBolus_k.kt
index f59778fa8f..f99fbb1cd2 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/comm/MsgInitConnStatusBolus_k.kt
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/comm/MsgInitConnStatusBolus_k.kt
@@ -8,7 +8,7 @@ import info.nightscout.androidaps.plugins.bus.RxBusWrapper
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.notifications.Notification
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
import info.nightscout.androidaps.plugins.pump.danaR.comm.MessageBase
import info.nightscout.androidaps.utils.resources.ResourceHelper
@@ -16,7 +16,7 @@ class MsgInitConnStatusBolus_k(
private val aapsLogger: AAPSLogger,
private val rxBus: RxBusWrapper,
private val resourceHelper: ResourceHelper,
- private val danaRPump: DanaRPump,
+ private val danaRPump: info.nightscout.androidaps.dana.DanaRPump,
private val activePlugin: ActivePluginProvider
) : MessageBase() {
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/comm/MsgInitConnStatusTime_k.kt b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/comm/MsgInitConnStatusTime_k.kt
index 78575809a3..8f1c9a56d9 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/comm/MsgInitConnStatusTime_k.kt
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/comm/MsgInitConnStatusTime_k.kt
@@ -11,7 +11,7 @@ import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin
import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification
import info.nightscout.androidaps.plugins.general.overview.notifications.Notification
import info.nightscout.androidaps.plugins.pump.danaR.DanaRPlugin
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
import info.nightscout.androidaps.plugins.pump.danaR.comm.MessageBase
import info.nightscout.androidaps.plugins.pump.danaRKorean.DanaRKoreanPlugin
import info.nightscout.androidaps.utils.DateUtil
@@ -21,7 +21,7 @@ class MsgInitConnStatusTime_k(
private val aapsLogger: AAPSLogger,
private val rxBus: RxBusWrapper,
private val resourceHelper: ResourceHelper,
- private val danaRPump: DanaRPump,
+ private val danaRPump: info.nightscout.androidaps.dana.DanaRPump,
private val danaRPlugin: DanaRPlugin,
private val danaRKoreanPlugin: DanaRKoreanPlugin,
private val configBuilderPlugin: ConfigBuilderPlugin,
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/comm/MsgSettingBasalProfileAll_k.kt b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/comm/MsgSettingBasalProfileAll_k.kt
index 9f33c81dbe..0c1b3475b9 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/comm/MsgSettingBasalProfileAll_k.kt
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/comm/MsgSettingBasalProfileAll_k.kt
@@ -2,7 +2,7 @@ package info.nightscout.androidaps.plugins.pump.danaRKorean.comm
import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
import info.nightscout.androidaps.plugins.pump.danaR.comm.MessageBase
import java.util.*
@@ -16,7 +16,7 @@ import java.util.*
*/
class MsgSettingBasalProfileAll_k(
private val aapsLogger: AAPSLogger,
- private val danaRPump: DanaRPump
+ private val danaRPump: info.nightscout.androidaps.dana.DanaRPump
) : MessageBase() {
init {
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/comm/MsgSettingBasal_k.kt b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/comm/MsgSettingBasal_k.kt
index 13b29aba9c..cbb46fa0be 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/comm/MsgSettingBasal_k.kt
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/comm/MsgSettingBasal_k.kt
@@ -2,14 +2,14 @@ package info.nightscout.androidaps.plugins.pump.danaRKorean.comm
import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
import info.nightscout.androidaps.plugins.pump.danaR.comm.MessageBase
import info.nightscout.androidaps.plugins.pump.danaRKorean.DanaRKoreanPlugin
import java.util.*
class MsgSettingBasal_k(
private val aapsLogger: AAPSLogger,
- private val danaRPump: DanaRPump,
+ private val danaRPump: info.nightscout.androidaps.dana.DanaRPump,
private val danaRKoreanPlugin: DanaRKoreanPlugin
) : MessageBase() {
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/comm/MsgStatusBasic_k.kt b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/comm/MsgStatusBasic_k.kt
index 8f08587c5c..6d3b8660f1 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/comm/MsgStatusBasic_k.kt
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/comm/MsgStatusBasic_k.kt
@@ -2,12 +2,12 @@ package info.nightscout.androidaps.plugins.pump.danaRKorean.comm
import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
import info.nightscout.androidaps.plugins.pump.danaR.comm.MessageBase
class MsgStatusBasic_k(
private val aapsLogger: AAPSLogger,
- private val danaRPump: DanaRPump
+ private val danaRPump: info.nightscout.androidaps.dana.DanaRPump
) : MessageBase() {
init {
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/comm/MsgStatus_k.kt b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/comm/MsgStatus_k.kt
index bef2e8a926..b4c2c68870 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/comm/MsgStatus_k.kt
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/comm/MsgStatus_k.kt
@@ -2,12 +2,12 @@ package info.nightscout.androidaps.plugins.pump.danaRKorean.comm
import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
import info.nightscout.androidaps.plugins.pump.danaR.comm.MessageBase
class MsgStatus_k(
private val aapsLogger: AAPSLogger,
- private val danaRPump: DanaRPump
+ private val danaRPump: info.nightscout.androidaps.dana.DanaRPump
) : MessageBase() {
init {
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/services/DanaRKoreanExecutionService.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/services/DanaRKoreanExecutionService.java
index d8da9b78c2..1e06b7a1de 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/services/DanaRKoreanExecutionService.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRKorean/services/DanaRKoreanExecutionService.java
@@ -1,6 +1,5 @@
package info.nightscout.androidaps.plugins.pump.danaRKorean.services;
-import android.content.Context;
import android.os.Binder;
import android.os.SystemClock;
@@ -11,25 +10,26 @@ import javax.inject.Inject;
import info.nightscout.androidaps.Constants;
import info.nightscout.androidaps.R;
+import info.nightscout.androidaps.dana.DanaRPump;
+import info.nightscout.androidaps.dana.events.EventDanaRNewStatus;
import info.nightscout.androidaps.data.Profile;
import info.nightscout.androidaps.data.PumpEnactResult;
+import info.nightscout.androidaps.db.Treatment;
import info.nightscout.androidaps.dialogs.BolusProgressDialog;
import info.nightscout.androidaps.events.EventInitializationChanged;
import info.nightscout.androidaps.events.EventProfileNeedsUpdate;
import info.nightscout.androidaps.events.EventPumpStatusChanged;
import info.nightscout.androidaps.interfaces.ActivePluginProvider;
import info.nightscout.androidaps.interfaces.CommandQueueProvider;
+import info.nightscout.androidaps.interfaces.ProfileFunction;
import info.nightscout.androidaps.logging.AAPSLogger;
import info.nightscout.androidaps.logging.LTag;
import info.nightscout.androidaps.plugins.bus.RxBusWrapper;
-import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
import info.nightscout.androidaps.plugins.configBuilder.ConstraintChecker;
-import info.nightscout.androidaps.interfaces.ProfileFunction;
import info.nightscout.androidaps.plugins.general.nsclient.NSUpload;
import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification;
import info.nightscout.androidaps.plugins.general.overview.notifications.Notification;
import info.nightscout.androidaps.plugins.pump.danaR.DanaRPlugin;
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump;
import info.nightscout.androidaps.plugins.pump.danaR.SerialIOThread;
import info.nightscout.androidaps.plugins.pump.danaR.comm.MsgBolusStart;
import info.nightscout.androidaps.plugins.pump.danaR.comm.MsgSetCarbsEntry;
@@ -48,14 +48,12 @@ import info.nightscout.androidaps.plugins.pump.danaR.comm.MsgSettingPumpTime;
import info.nightscout.androidaps.plugins.pump.danaR.comm.MsgSettingShippingInfo;
import info.nightscout.androidaps.plugins.pump.danaR.comm.MsgStatusBolusExtended;
import info.nightscout.androidaps.plugins.pump.danaR.comm.MsgStatusTempBasal;
-import info.nightscout.androidaps.plugins.pump.danaR.events.EventDanaRNewStatus;
import info.nightscout.androidaps.plugins.pump.danaR.services.AbstractDanaRExecutionService;
import info.nightscout.androidaps.plugins.pump.danaRKorean.DanaRKoreanPlugin;
import info.nightscout.androidaps.plugins.pump.danaRKorean.comm.MessageHashTableRKorean;
import info.nightscout.androidaps.plugins.pump.danaRKorean.comm.MsgCheckValue_k;
import info.nightscout.androidaps.plugins.pump.danaRKorean.comm.MsgSettingBasal_k;
import info.nightscout.androidaps.plugins.pump.danaRKorean.comm.MsgStatusBasic_k;
-import info.nightscout.androidaps.db.Treatment;
import info.nightscout.androidaps.queue.commands.Command;
import info.nightscout.androidaps.utils.DateUtil;
import info.nightscout.androidaps.utils.T;
@@ -69,9 +67,7 @@ public class DanaRKoreanExecutionService extends AbstractDanaRExecutionService {
@Inject DanaRPump danaRPump;
@Inject DanaRPlugin danaRPlugin;
@Inject DanaRKoreanPlugin danaRKoreanPlugin;
- @Inject ConfigBuilderPlugin configBuilderPlugin;
@Inject CommandQueueProvider commandQueue;
- @Inject Context context;
@Inject MessageHashTableRKorean messageHashTableRKorean;
@Inject ActivePluginProvider activePlugin;
@Inject ProfileFunction profileFunction;
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRv2/DanaRv2Plugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRv2/DanaRv2Plugin.java
index 992819a136..b7e03ec67e 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRv2/DanaRv2Plugin.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRv2/DanaRv2Plugin.java
@@ -13,6 +13,7 @@ import javax.inject.Singleton;
import dagger.android.HasAndroidInjector;
import info.nightscout.androidaps.R;
+import info.nightscout.androidaps.dana.DanaRPump;
import info.nightscout.androidaps.data.DetailedBolusInfo;
import info.nightscout.androidaps.data.Profile;
import info.nightscout.androidaps.data.PumpEnactResult;
@@ -27,7 +28,6 @@ import info.nightscout.androidaps.plugins.configBuilder.ConstraintChecker;
import info.nightscout.androidaps.plugins.pump.common.bolusInfo.DetailedBolusInfoStorage;
import info.nightscout.androidaps.plugins.pump.common.defs.PumpType;
import info.nightscout.androidaps.plugins.pump.danaR.AbstractDanaRPlugin;
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump;
import info.nightscout.androidaps.plugins.pump.danaRv2.services.DanaRv2ExecutionService;
import info.nightscout.androidaps.db.Treatment;
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin;
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRv2/comm/MessageHashTableRv2.kt b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRv2/comm/MessageHashTableRv2.kt
index 836de3d6cc..a5896b5a4c 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRv2/comm/MessageHashTableRv2.kt
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRv2/comm/MessageHashTableRv2.kt
@@ -10,7 +10,7 @@ import info.nightscout.androidaps.plugins.configBuilder.ConstraintChecker
import info.nightscout.androidaps.plugins.general.nsclient.NSUpload
import info.nightscout.androidaps.plugins.pump.common.bolusInfo.DetailedBolusInfoStorage
import info.nightscout.androidaps.plugins.pump.danaR.DanaRPlugin
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
import info.nightscout.androidaps.plugins.pump.danaR.comm.*
import info.nightscout.androidaps.plugins.pump.danaRKorean.DanaRKoreanPlugin
import info.nightscout.androidaps.plugins.pump.danaRv2.DanaRv2Plugin
@@ -27,7 +27,7 @@ class MessageHashTableRv2 @Inject constructor(
rxBus: RxBusWrapper,
resourceHelper: ResourceHelper,
constraintChecker: ConstraintChecker,
- danaRPump: DanaRPump,
+ danaRPump: info.nightscout.androidaps.dana.DanaRPump,
danaRPlugin: DanaRPlugin,
danaRKoreanPlugin: DanaRKoreanPlugin,
danaRv2Plugin: DanaRv2Plugin,
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRv2/comm/MsgCheckValue_v2.kt b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRv2/comm/MsgCheckValue_v2.kt
index 7d0b2b5e53..8f0ab31d36 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRv2/comm/MsgCheckValue_v2.kt
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRv2/comm/MsgCheckValue_v2.kt
@@ -11,7 +11,7 @@ import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin
import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification
import info.nightscout.androidaps.plugins.general.overview.notifications.Notification
import info.nightscout.androidaps.plugins.pump.danaR.DanaRPlugin
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
import info.nightscout.androidaps.plugins.pump.danaR.comm.MessageBase
import info.nightscout.androidaps.plugins.pump.danaRKorean.DanaRKoreanPlugin
import info.nightscout.androidaps.plugins.pump.danaRv2.DanaRv2Plugin
@@ -21,7 +21,7 @@ class MsgCheckValue_v2(
private val aapsLogger: AAPSLogger,
private val rxBus: RxBusWrapper,
private val resourceHelper: ResourceHelper,
- private val danaRPump: DanaRPump,
+ private val danaRPump: info.nightscout.androidaps.dana.DanaRPump,
private val danaRPlugin: DanaRPlugin,
private val danaRKoreanPlugin: DanaRKoreanPlugin,
private val danaRv2Plugin: DanaRv2Plugin,
@@ -41,7 +41,7 @@ class MsgCheckValue_v2(
danaRPump.hwModel = intFromBuff(bytes, 0, 1)
danaRPump.protocol = intFromBuff(bytes, 1, 1)
danaRPump.productCode = intFromBuff(bytes, 2, 1)
- if (danaRPump.hwModel != DanaRPump.EXPORT_MODEL) {
+ if (danaRPump.hwModel != info.nightscout.androidaps.dana.DanaRPump.EXPORT_MODEL) {
danaRPump.reset()
val notification = Notification(Notification.WRONG_DRIVER, resourceHelper.gs(R.string.pumpdrivercorrected), Notification.NORMAL)
rxBus.send(EventNewNotification(notification))
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRv2/comm/MsgHistoryEvents_v2.kt b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRv2/comm/MsgHistoryEvents_v2.kt
index 7b11695910..8b1bbf6e15 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRv2/comm/MsgHistoryEvents_v2.kt
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRv2/comm/MsgHistoryEvents_v2.kt
@@ -11,7 +11,7 @@ import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag
import info.nightscout.androidaps.plugins.bus.RxBusWrapper
import info.nightscout.androidaps.plugins.pump.common.bolusInfo.DetailedBolusInfoStorage
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
import info.nightscout.androidaps.plugins.pump.danaR.comm.MessageBase
import info.nightscout.androidaps.plugins.pump.danaRv2.DanaRv2Plugin
import info.nightscout.androidaps.plugins.treatments.TreatmentsPlugin
@@ -74,7 +74,7 @@ class MsgHistoryEvents_v2 constructor(
.pumpId(datetime)
val status: String
when (recordCode.toInt()) {
- DanaRPump.TEMPSTART -> {
+ info.nightscout.androidaps.dana.DanaRPump.TEMPSTART -> {
aapsLogger.debug(LTag.PUMPBTCOMM, "EVENT TEMPSTART (" + recordCode + ") " + dateUtil.dateAndTimeString(datetime) + " (" + datetime + ")" + " Ratio: " + param1 + "% Duration: " + param2 + "min")
temporaryBasal.percentRate = param1
temporaryBasal.durationInMinutes = param2
@@ -82,13 +82,13 @@ class MsgHistoryEvents_v2 constructor(
status = "TEMPSTART " + dateUtil.timeString(datetime)
}
- DanaRPump.TEMPSTOP -> {
+ info.nightscout.androidaps.dana.DanaRPump.TEMPSTOP -> {
aapsLogger.debug(LTag.PUMPBTCOMM, "EVENT TEMPSTOP (" + recordCode + ") " + dateUtil.dateAndTimeString(datetime))
treatmentsPlugin.addToHistoryTempBasal(temporaryBasal)
status = "TEMPSTOP " + dateUtil.timeString(datetime)
}
- DanaRPump.EXTENDEDSTART -> {
+ info.nightscout.androidaps.dana.DanaRPump.EXTENDEDSTART -> {
aapsLogger.debug(LTag.PUMPBTCOMM, "EVENT EXTENDEDSTART (" + recordCode + ") " + dateUtil.dateAndTimeString(datetime) + " (" + datetime + ")" + " Amount: " + param1 / 100.0 + "U Duration: " + param2 + "min")
extendedBolus.insulin = param1 / 100.0
extendedBolus.durationInMinutes = param2
@@ -96,13 +96,13 @@ class MsgHistoryEvents_v2 constructor(
status = "EXTENDEDSTART " + dateUtil.timeString(datetime)
}
- DanaRPump.EXTENDEDSTOP -> {
+ info.nightscout.androidaps.dana.DanaRPump.EXTENDEDSTOP -> {
aapsLogger.debug(LTag.PUMPBTCOMM, "EVENT EXTENDEDSTOP (" + recordCode + ") " + dateUtil.dateAndTimeString(datetime) + " (" + datetime + ")" + " Delivered: " + param1 / 100.0 + "U RealDuration: " + param2 + "min")
treatmentsPlugin.addToHistoryExtendedBolus(extendedBolus)
status = "EXTENDEDSTOP " + dateUtil.timeString(datetime)
}
- DanaRPump.BOLUS -> {
+ info.nightscout.androidaps.dana.DanaRPump.BOLUS -> {
val detailedBolusInfo = detailedBolusInfoStorage.findDetailedBolusInfo(datetime, param1 / 100.0)
?: DetailedBolusInfo()
detailedBolusInfo.date = datetime
@@ -114,7 +114,7 @@ class MsgHistoryEvents_v2 constructor(
status = "BOLUS " + dateUtil.timeString(datetime)
}
- DanaRPump.DUALBOLUS -> {
+ info.nightscout.androidaps.dana.DanaRPump.DUALBOLUS -> {
val detailedBolusInfo = detailedBolusInfoStorage.findDetailedBolusInfo(datetime, param1 / 100.0)
?: DetailedBolusInfo()
detailedBolusInfo.date = datetime
@@ -126,7 +126,7 @@ class MsgHistoryEvents_v2 constructor(
status = "DUALBOLUS " + dateUtil.timeString(datetime)
}
- DanaRPump.DUALEXTENDEDSTART -> {
+ info.nightscout.androidaps.dana.DanaRPump.DUALEXTENDEDSTART -> {
aapsLogger.debug(LTag.PUMPBTCOMM, "EVENT DUALEXTENDEDSTART (" + recordCode + ") " + dateUtil.dateAndTimeString(datetime) + " (" + datetime + ")" + " Amount: " + param1 / 100.0 + "U Duration: " + param2 + "min")
extendedBolus.insulin = param1 / 100.0
extendedBolus.durationInMinutes = param2
@@ -134,38 +134,38 @@ class MsgHistoryEvents_v2 constructor(
status = "DUALEXTENDEDSTART " + dateUtil.timeString(datetime)
}
- DanaRPump.DUALEXTENDEDSTOP -> {
+ info.nightscout.androidaps.dana.DanaRPump.DUALEXTENDEDSTOP -> {
aapsLogger.debug(LTag.PUMPBTCOMM, "EVENT DUALEXTENDEDSTOP (" + recordCode + ") " + dateUtil.dateAndTimeString(datetime) + " (" + datetime + ")" + " Delivered: " + param1 / 100.0 + "U RealDuration: " + param2 + "min")
treatmentsPlugin.addToHistoryExtendedBolus(extendedBolus)
status = "DUALEXTENDEDSTOP " + dateUtil.timeString(datetime)
}
- DanaRPump.SUSPENDON -> {
+ info.nightscout.androidaps.dana.DanaRPump.SUSPENDON -> {
aapsLogger.debug(LTag.PUMPBTCOMM, "EVENT SUSPENDON (" + recordCode + ") " + dateUtil.dateAndTimeString(datetime) + " (" + datetime + ")")
status = "SUSPENDON " + dateUtil.timeString(datetime)
}
- DanaRPump.SUSPENDOFF -> {
+ info.nightscout.androidaps.dana.DanaRPump.SUSPENDOFF -> {
aapsLogger.debug(LTag.PUMPBTCOMM, "EVENT SUSPENDOFF (" + recordCode + ") " + dateUtil.dateAndTimeString(datetime) + " (" + datetime + ")")
status = "SUSPENDOFF " + dateUtil.timeString(datetime)
}
- DanaRPump.REFILL -> {
+ info.nightscout.androidaps.dana.DanaRPump.REFILL -> {
aapsLogger.debug(LTag.PUMPBTCOMM, "EVENT REFILL (" + recordCode + ") " + dateUtil.dateAndTimeString(datetime) + " (" + datetime + ")" + " Amount: " + param1 / 100.0 + "U")
status = "REFILL " + dateUtil.timeString(datetime)
}
- DanaRPump.PRIME -> {
+ info.nightscout.androidaps.dana.DanaRPump.PRIME -> {
aapsLogger.debug(LTag.PUMPBTCOMM, "EVENT PRIME (" + recordCode + ") " + dateUtil.dateAndTimeString(datetime) + " (" + datetime + ")" + " Amount: " + param1 / 100.0 + "U")
status = "PRIME " + dateUtil.timeString(datetime)
}
- DanaRPump.PROFILECHANGE -> {
+ info.nightscout.androidaps.dana.DanaRPump.PROFILECHANGE -> {
aapsLogger.debug(LTag.PUMPBTCOMM, "EVENT PROFILECHANGE (" + recordCode + ") " + dateUtil.dateAndTimeString(datetime) + " (" + datetime + ")" + " No: " + param1 + " CurrentRate: " + param2 / 100.0 + "U/h")
status = "PROFILECHANGE " + dateUtil.timeString(datetime)
}
- DanaRPump.CARBS -> {
+ info.nightscout.androidaps.dana.DanaRPump.CARBS -> {
val emptyCarbsInfo = DetailedBolusInfo()
emptyCarbsInfo.carbs = param1.toDouble()
emptyCarbsInfo.date = datetime
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRv2/comm/MsgStatusAPS_v2.kt b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRv2/comm/MsgStatusAPS_v2.kt
index 1821c17321..f3ff2d1afd 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRv2/comm/MsgStatusAPS_v2.kt
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRv2/comm/MsgStatusAPS_v2.kt
@@ -2,12 +2,12 @@ package info.nightscout.androidaps.plugins.pump.danaRv2.comm
import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
import info.nightscout.androidaps.plugins.pump.danaR.comm.MessageBase
class MsgStatusAPS_v2(
private val aapsLogger: AAPSLogger,
- private val danaRPump: DanaRPump
+ private val danaRPump: info.nightscout.androidaps.dana.DanaRPump
) : MessageBase() {
init {
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRv2/comm/MsgStatusBolusExtended_v2.kt b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRv2/comm/MsgStatusBolusExtended_v2.kt
index b769b8a8f8..bef75168a6 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRv2/comm/MsgStatusBolusExtended_v2.kt
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRv2/comm/MsgStatusBolusExtended_v2.kt
@@ -2,13 +2,13 @@ package info.nightscout.androidaps.plugins.pump.danaRv2.comm
import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
import info.nightscout.androidaps.plugins.pump.danaR.comm.MessageBase
import kotlin.math.ceil
class MsgStatusBolusExtended_v2(
private val aapsLogger: AAPSLogger,
- private val danaRPump: DanaRPump
+ private val danaRPump: info.nightscout.androidaps.dana.DanaRPump
) : MessageBase() {
init {
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRv2/comm/MsgStatusTempBasal_v2.kt b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRv2/comm/MsgStatusTempBasal_v2.kt
index e4668fcd2b..ce13522cc8 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRv2/comm/MsgStatusTempBasal_v2.kt
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRv2/comm/MsgStatusTempBasal_v2.kt
@@ -2,14 +2,14 @@ package info.nightscout.androidaps.plugins.pump.danaRv2.comm
import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
import info.nightscout.androidaps.plugins.pump.danaR.comm.MessageBase
import info.nightscout.androidaps.utils.DateUtil
import kotlin.math.ceil
class MsgStatusTempBasal_v2(
private val aapsLogger: AAPSLogger,
- private val danaRPump: DanaRPump,
+ private val danaRPump: info.nightscout.androidaps.dana.DanaRPump,
private val dateUtil: DateUtil
) : MessageBase() {
diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRv2/services/DanaRv2ExecutionService.java b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRv2/services/DanaRv2ExecutionService.java
index f072d3a8e1..e3a88158b7 100644
--- a/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRv2/services/DanaRv2ExecutionService.java
+++ b/app/src/main/java/info/nightscout/androidaps/plugins/pump/danaRv2/services/DanaRv2ExecutionService.java
@@ -14,6 +14,8 @@ import dagger.android.HasAndroidInjector;
import info.nightscout.androidaps.Constants;
import info.nightscout.androidaps.R;
import info.nightscout.androidaps.activities.ErrorHelperActivity;
+import info.nightscout.androidaps.dana.DanaRPump;
+import info.nightscout.androidaps.dana.events.EventDanaRNewStatus;
import info.nightscout.androidaps.data.Profile;
import info.nightscout.androidaps.data.PumpEnactResult;
import info.nightscout.androidaps.db.Treatment;
@@ -36,7 +38,6 @@ import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewB
import info.nightscout.androidaps.plugins.general.overview.notifications.Notification;
import info.nightscout.androidaps.plugins.pump.common.bolusInfo.DetailedBolusInfoStorage;
import info.nightscout.androidaps.plugins.pump.danaR.DanaRPlugin;
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump;
import info.nightscout.androidaps.plugins.pump.danaR.SerialIOThread;
import info.nightscout.androidaps.plugins.pump.danaR.comm.MessageBase;
import info.nightscout.androidaps.plugins.pump.danaR.comm.MsgBolusStart;
@@ -62,7 +63,6 @@ import info.nightscout.androidaps.plugins.pump.danaR.comm.MsgSettingShippingInfo
import info.nightscout.androidaps.plugins.pump.danaR.comm.MsgSettingUserOptions;
import info.nightscout.androidaps.plugins.pump.danaR.comm.MsgStatus;
import info.nightscout.androidaps.plugins.pump.danaR.comm.MsgStatusBasic;
-import info.nightscout.androidaps.plugins.pump.danaR.events.EventDanaRNewStatus;
import info.nightscout.androidaps.plugins.pump.danaR.services.AbstractDanaRExecutionService;
import info.nightscout.androidaps.plugins.pump.danaRKorean.DanaRKoreanPlugin;
import info.nightscout.androidaps.plugins.pump.danaRv2.DanaRv2Plugin;
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRSMessageHashTableTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRSMessageHashTableTest.kt
similarity index 89%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRSMessageHashTableTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRSMessageHashTableTest.kt
index 4ad7df5359..c3a29d7891 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRSMessageHashTableTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRSMessageHashTableTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
@@ -6,8 +6,8 @@ import info.nightscout.androidaps.interfaces.ActivePluginProvider
import info.nightscout.androidaps.interfaces.Constraint
import info.nightscout.androidaps.plugins.configBuilder.ConstraintChecker
import info.nightscout.androidaps.plugins.pump.common.bolusInfo.DetailedBolusInfoStorage
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.dana.DanaRPump
+import info.nightscout.androidaps.danars.encryption.BleEncryption
import org.junit.Assert
import org.junit.Test
import org.junit.runner.RunWith
@@ -47,7 +47,7 @@ class DanaRSMessageHashTableTest : DanaRSTestBase() {
`when`(constraintChecker.applyBolusConstraints(anyObject())).thenReturn(Constraint(0.0))
val danaRSMessageHashTable = DanaRSMessageHashTable(packetInjector)
- val forTesting: DanaRS_Packet = DanaRS_Packet_APS_Set_Event_History(packetInjector, DanaRPump.CARBS, 0, 0, 0)
+ val forTesting: DanaRS_Packet = DanaRS_Packet_APS_Set_Event_History(packetInjector, info.nightscout.androidaps.dana.DanaRPump.CARBS, 0, 0, 0)
val testPacket: DanaRS_Packet = danaRSMessageHashTable.findMessage(forTesting.command)
Assert.assertEquals(BleEncryption.DANAR_PACKET__OPCODE__APS_SET_EVENT_HISTORY.toLong(), testPacket.getOpCode().toLong())
}
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRSTestBase.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRSTestBase.kt
similarity index 86%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRSTestBase.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRSTestBase.kt
index 1d82f58369..c12d651eea 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRSTestBase.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRSTestBase.kt
@@ -1,10 +1,10 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.TestBaseWithProfile
import info.nightscout.androidaps.db.TemporaryBasal
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
import info.nightscout.androidaps.utils.sharedPreferences.SP
import org.junit.Before
import org.mockito.Mock
@@ -24,7 +24,7 @@ open class DanaRSTestBase : TestBaseWithProfile() {
}
}
- lateinit var danaRPump: DanaRPump
+ lateinit var danaRPump: info.nightscout.androidaps.dana.DanaRPump
fun createArray(length: Int, fillWith: Byte): ByteArray {
val ret = ByteArray(length)
@@ -55,6 +55,6 @@ open class DanaRSTestBase : TestBaseWithProfile() {
@Before
fun setup() {
- danaRPump = DanaRPump(aapsLogger, sp, injector)
+ danaRPump = info.nightscout.androidaps.dana.DanaRPump(aapsLogger, sp, injector)
}
}
\ No newline at end of file
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_APS_Basal_Set_Temporary_BasalTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_APS_Basal_Set_Temporary_BasalTest.kt
similarity index 98%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_APS_Basal_Set_Temporary_BasalTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_APS_Basal_Set_Temporary_BasalTest.kt
index 8672867161..ae09fe8315 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_APS_Basal_Set_Temporary_BasalTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_APS_Basal_Set_Temporary_BasalTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_APS_History_EventsTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_APS_History_EventsTest.kt
similarity index 96%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_APS_History_EventsTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_APS_History_EventsTest.kt
index 20aaa5591d..dc4447fc22 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_APS_History_EventsTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_APS_History_EventsTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import android.content.Context
import dagger.android.AndroidInjector
@@ -6,7 +6,7 @@ import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.interfaces.ActivePluginProvider
import info.nightscout.androidaps.plugins.bus.RxBusWrapper
import info.nightscout.androidaps.plugins.pump.common.bolusInfo.DetailedBolusInfoStorage
-import info.nightscout.androidaps.plugins.pump.danaRS.DanaRSPlugin
+import info.nightscout.androidaps.danars.DanaRSPlugin
import info.nightscout.androidaps.utils.DateUtil
import org.junit.Assert
import org.junit.Test
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_APS_Set_Event_HistoryTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_APS_Set_Event_HistoryTest.kt
similarity index 80%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_APS_Set_Event_HistoryTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_APS_Set_Event_HistoryTest.kt
index 36146b4ca9..d38ee929b1 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_APS_Set_Event_HistoryTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_APS_Set_Event_HistoryTest.kt
@@ -1,8 +1,8 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
import info.nightscout.androidaps.utils.DateUtil
import org.junit.Assert
import org.junit.Test
@@ -27,23 +27,23 @@ class DanaRS_Packet_APS_Set_Event_HistoryTest : DanaRSTestBase() {
@Test fun runTest() { // test for negative carbs
val now = DateUtil.now()
- var historyTest = DanaRS_Packet_APS_Set_Event_History(packetInjector, DanaRPump.CARBS, now, -1, 0)
+ var historyTest = DanaRS_Packet_APS_Set_Event_History(packetInjector, info.nightscout.androidaps.dana.DanaRPump.CARBS, now, -1, 0)
var testparams = historyTest.requestParams
Assert.assertEquals(0.toByte(), testparams[8])
// 5g carbs
- historyTest = DanaRS_Packet_APS_Set_Event_History(packetInjector, DanaRPump.CARBS, now, 5, 0)
+ historyTest = DanaRS_Packet_APS_Set_Event_History(packetInjector, info.nightscout.androidaps.dana.DanaRPump.CARBS, now, 5, 0)
testparams = historyTest.requestParams
Assert.assertEquals(5.toByte(), testparams[8])
// 150g carbs
- historyTest = DanaRS_Packet_APS_Set_Event_History(packetInjector, DanaRPump.CARBS, now, 150, 0)
+ historyTest = DanaRS_Packet_APS_Set_Event_History(packetInjector, info.nightscout.androidaps.dana.DanaRPump.CARBS, now, 150, 0)
testparams = historyTest.requestParams
Assert.assertEquals(150.toByte(), testparams[8])
// test message generation
- historyTest = DanaRS_Packet_APS_Set_Event_History(packetInjector, DanaRPump.CARBS, now, 5, 0)
+ historyTest = DanaRS_Packet_APS_Set_Event_History(packetInjector, info.nightscout.androidaps.dana.DanaRPump.CARBS, now, 5, 0)
testparams = historyTest.requestParams
Assert.assertEquals(5.toByte(), testparams[8])
Assert.assertEquals(11, testparams.size)
- Assert.assertEquals(DanaRPump.CARBS.toByte(), testparams[0])
+ Assert.assertEquals(info.nightscout.androidaps.dana.DanaRPump.CARBS.toByte(), testparams[0])
// test message decoding
historyTest.handleMessage(byteArrayOf(0.toByte(), 0.toByte(), 0.toByte()))
Assert.assertEquals(false, historyTest.failed)
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Get_Basal_RateTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Get_Basal_RateTest.kt
similarity index 95%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Get_Basal_RateTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Get_Basal_RateTest.kt
index aa79c64b03..98a92ddaef 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Get_Basal_RateTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Get_Basal_RateTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Get_Profile_Basal_RateTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Get_Profile_Basal_RateTest.kt
similarity index 97%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Get_Profile_Basal_RateTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Get_Profile_Basal_RateTest.kt
index 7cc2d5cb5c..6bce045a98 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Get_Profile_Basal_RateTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Get_Profile_Basal_RateTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Get_Profile_NumberTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Get_Profile_NumberTest.kt
similarity index 94%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Get_Profile_NumberTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Get_Profile_NumberTest.kt
index 458370fdc5..7f53f69b19 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Get_Profile_NumberTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Get_Profile_NumberTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Get_Temporary_Basal_StateTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Get_Temporary_Basal_StateTest.kt
similarity index 96%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Get_Temporary_Basal_StateTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Get_Temporary_Basal_StateTest.kt
index 56e308fc1f..57790f279c 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Get_Temporary_Basal_StateTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Get_Temporary_Basal_StateTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Set_Basal_RateTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Set_Basal_RateTest.kt
similarity index 95%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Set_Basal_RateTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Set_Basal_RateTest.kt
index 58d89e6220..84450ababc 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Set_Basal_RateTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Set_Basal_RateTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Set_Cancel_Temporary_BasalTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Set_Cancel_Temporary_BasalTest.kt
similarity index 94%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Set_Cancel_Temporary_BasalTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Set_Cancel_Temporary_BasalTest.kt
index a48dc769eb..2cc549c533 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Set_Cancel_Temporary_BasalTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Set_Cancel_Temporary_BasalTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Set_Profile_Basal_RateTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Set_Profile_Basal_RateTest.kt
similarity index 95%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Set_Profile_Basal_RateTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Set_Profile_Basal_RateTest.kt
index 035387ac85..fcf254887f 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Set_Profile_Basal_RateTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Set_Profile_Basal_RateTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Set_Profile_NumberTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Set_Profile_NumberTest.kt
similarity index 95%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Set_Profile_NumberTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Set_Profile_NumberTest.kt
index a39c2efde9..2e7a720970 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Set_Profile_NumberTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Set_Profile_NumberTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Set_Suspend_OffTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Set_Suspend_OffTest.kt
similarity index 94%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Set_Suspend_OffTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Set_Suspend_OffTest.kt
index 50ce4c0c35..24abfb3538 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Set_Suspend_OffTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Set_Suspend_OffTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Set_Suspend_OnTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Set_Suspend_OnTest.kt
similarity index 94%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Set_Suspend_OnTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Set_Suspend_OnTest.kt
index 3665cd96b1..f0791ef578 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Set_Suspend_OnTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Set_Suspend_OnTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Set_Temporary_BasalTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Set_Temporary_BasalTest.kt
similarity index 90%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Set_Temporary_BasalTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Set_Temporary_BasalTest.kt
index 6fccfdcb81..841f2b8a24 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Set_Temporary_BasalTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Set_Temporary_BasalTest.kt
@@ -1,11 +1,10 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
import org.junit.Assert
import org.junit.Test
import org.junit.runner.RunWith
-import org.powermock.core.classloader.annotations.PrepareForTest
import org.powermock.modules.junit4.PowerMockRunner
@RunWith(PowerMockRunner::class)
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Bolus_OptionTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Bolus_OptionTest.kt
similarity index 96%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Bolus_OptionTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Bolus_OptionTest.kt
index ac17776c70..6840435153 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Bolus_OptionTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Bolus_OptionTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_CIR_CF_ArrayTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_CIR_CF_ArrayTest.kt
similarity index 85%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_CIR_CF_ArrayTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_CIR_CF_ArrayTest.kt
index 997014a92b..0d97178ae9 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_CIR_CF_ArrayTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_CIR_CF_ArrayTest.kt
@@ -1,8 +1,8 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
import org.junit.Assert
import org.junit.Test
import org.junit.runner.RunWith
@@ -27,7 +27,7 @@ class DanaRS_Packet_Bolus_Get_CIR_CF_ArrayTest : DanaRSTestBase() {
// test message decoding
packet.handleMessage(createArray(34, 0.toByte()))
// are pump units MG/DL ???
- Assert.assertEquals(DanaRPump.UNITS_MGDL, danaRPump.units)
+ Assert.assertEquals(info.nightscout.androidaps.dana.DanaRPump.UNITS_MGDL, danaRPump.units)
Assert.assertEquals(false, packet.failed)
packet.handleMessage(createArray(34, 3.toByte()))
Assert.assertEquals(true, packet.failed)
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Calculation_InformationTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Calculation_InformationTest.kt
similarity index 95%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Calculation_InformationTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Calculation_InformationTest.kt
index f09c01657f..d83edb311d 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Calculation_InformationTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Calculation_InformationTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Carbohydrate_Calculation_InformationTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Carbohydrate_Calculation_InformationTest.kt
similarity index 95%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Carbohydrate_Calculation_InformationTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Carbohydrate_Calculation_InformationTest.kt
index effd2fa235..b04fbd9dfb 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Carbohydrate_Calculation_InformationTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Carbohydrate_Calculation_InformationTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Dual_BolusTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Dual_BolusTest.kt
similarity index 95%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Dual_BolusTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Dual_BolusTest.kt
index 19ade4619b..4f745638de 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Dual_BolusTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Dual_BolusTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Extended_BolusTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Extended_BolusTest.kt
similarity index 95%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Extended_BolusTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Extended_BolusTest.kt
index 3d54ad98bc..b615090ac5 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Extended_BolusTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Extended_BolusTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Extended_Bolus_StateTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Extended_Bolus_StateTest.kt
similarity index 95%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Extended_Bolus_StateTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Extended_Bolus_StateTest.kt
index 1e2af1ae1e..50326edff1 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Extended_Bolus_StateTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Extended_Bolus_StateTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Extended_Menu_Option_StateTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Extended_Menu_Option_StateTest.kt
similarity index 95%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Extended_Menu_Option_StateTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Extended_Menu_Option_StateTest.kt
index c489cc6677..f78c827ff2 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Extended_Menu_Option_StateTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Extended_Menu_Option_StateTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Initial_BolusTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Initial_BolusTest.kt
similarity index 94%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Initial_BolusTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Initial_BolusTest.kt
index 6976effbdb..0bd7db33a3 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Initial_BolusTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Initial_BolusTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Step_Bolus_InformationTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Step_Bolus_InformationTest.kt
similarity index 97%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Step_Bolus_InformationTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Step_Bolus_InformationTest.kt
index 9d250d8872..35c7928f24 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Step_Bolus_InformationTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Step_Bolus_InformationTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_Bolus_OptionTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Set_Bolus_OptionTest.kt
similarity index 95%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_Bolus_OptionTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Set_Bolus_OptionTest.kt
index b4bfc7018a..7fa66dbe43 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_Bolus_OptionTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Set_Bolus_OptionTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_CIR_CF_ArrayTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Set_CIR_CF_ArrayTest.kt
similarity index 95%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_CIR_CF_ArrayTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Set_CIR_CF_ArrayTest.kt
index b749f9fb99..925dd1731b 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_CIR_CF_ArrayTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Set_CIR_CF_ArrayTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_Dual_BolusTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Set_Dual_BolusTest.kt
similarity index 95%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_Dual_BolusTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Set_Dual_BolusTest.kt
index 2aeba32298..5ae468084e 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_Dual_BolusTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Set_Dual_BolusTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_Extended_BolusTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Set_Extended_BolusTest.kt
similarity index 95%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_Extended_BolusTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Set_Extended_BolusTest.kt
index 55f3620850..aa3eb950d6 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_Extended_BolusTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Set_Extended_BolusTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_Extended_Bolus_CancelTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Set_Extended_Bolus_CancelTest.kt
similarity index 94%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_Extended_Bolus_CancelTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Set_Extended_Bolus_CancelTest.kt
index 2f0615f9c2..3d836828d9 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_Extended_Bolus_CancelTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Set_Extended_Bolus_CancelTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_Initial_BolusTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Set_Initial_BolusTest.kt
similarity index 95%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_Initial_BolusTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Set_Initial_BolusTest.kt
index 1fb3c6928d..dee94531fc 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_Initial_BolusTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Set_Initial_BolusTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_Step_Bolus_StartTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Set_Step_Bolus_StartTest.kt
similarity index 89%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_Step_Bolus_StartTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Set_Step_Bolus_StartTest.kt
index b69ffe2ee3..4da17b3646 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_Step_Bolus_StartTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Set_Step_Bolus_StartTest.kt
@@ -1,13 +1,14 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import android.content.Context
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
+import info.nightscout.androidaps.Config
+import info.nightscout.androidaps.danars.DanaRSPlugin
import info.nightscout.androidaps.interfaces.CommandQueueProvider
import info.nightscout.androidaps.interfaces.Constraint
import info.nightscout.androidaps.plugins.configBuilder.ConstraintChecker
import info.nightscout.androidaps.plugins.pump.common.bolusInfo.DetailedBolusInfoStorage
-import info.nightscout.androidaps.plugins.pump.danaRS.DanaRSPlugin
import org.junit.Assert
import org.junit.Before
import org.junit.Test
@@ -54,7 +55,7 @@ class DanaRS_Packet_Bolus_Set_Step_Bolus_StartTest : DanaRSTestBase() {
@Before
fun mock() {
- danaRSPlugin = DanaRSPlugin(HasAndroidInjector { AndroidInjector { Unit } }, aapsLogger, rxBus, context, resourceHelper, constraintChecker, profileFunction, treatmentsPlugin, sp, commandQueue, danaRPump, detailedBolusInfoStorage, fabricPrivacy, dateUtil)
+ danaRSPlugin = DanaRSPlugin(HasAndroidInjector { AndroidInjector { Unit } }, aapsLogger, rxBus, context, resourceHelper, constraintChecker, profileFunction, activePluginProvider, sp, commandQueue, danaRPump, detailedBolusInfoStorage, fabricPrivacy, dateUtil, Config())
Mockito.`when`(constraintChecker.applyBolusConstraints(anyObject())).thenReturn(Constraint(0.0))
}
}
\ No newline at end of file
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_Step_Bolus_StopTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Set_Step_Bolus_StopTest.kt
similarity index 94%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_Step_Bolus_StopTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Set_Step_Bolus_StopTest.kt
index 0b68225a54..03c42168dc 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_Step_Bolus_StopTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Set_Step_Bolus_StopTest.kt
@@ -1,11 +1,11 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.db.Treatment
import info.nightscout.androidaps.interfaces.ActivePluginProvider
import info.nightscout.androidaps.plugins.bus.RxBusWrapper
-import info.nightscout.androidaps.plugins.pump.danaRS.DanaRSPlugin
+import info.nightscout.androidaps.danars.DanaRSPlugin
import org.junit.Assert
import org.junit.Test
import org.junit.runner.RunWith
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Etc_Keep_ConnectionTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Etc_Keep_ConnectionTest.kt
similarity index 94%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Etc_Keep_ConnectionTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Etc_Keep_ConnectionTest.kt
index 1a8b2e6fbc..8316314b5e 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Etc_Keep_ConnectionTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Etc_Keep_ConnectionTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Etc_Set_History_SaveTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Etc_Set_History_SaveTest.kt
similarity index 95%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Etc_Set_History_SaveTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Etc_Set_History_SaveTest.kt
index cb82f0b277..e69ff881fb 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Etc_Set_History_SaveTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Etc_Set_History_SaveTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Delivery_StatusTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Delivery_StatusTest.kt
similarity index 94%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Delivery_StatusTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Delivery_StatusTest.kt
index 6515062bb0..03f46ecb5b 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Delivery_StatusTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Delivery_StatusTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Get_More_InformationTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Get_More_InformationTest.kt
similarity index 97%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Get_More_InformationTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Get_More_InformationTest.kt
index 7d93a60dbd..df2503b270 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Get_More_InformationTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Get_More_InformationTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Get_PasswordTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Get_PasswordTest.kt
similarity index 95%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Get_PasswordTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Get_PasswordTest.kt
index eac2fc9127..9f410bc69e 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Get_PasswordTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Get_PasswordTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Get_Pump_CheckTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Get_Pump_CheckTest.kt
similarity index 95%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Get_Pump_CheckTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Get_Pump_CheckTest.kt
index ed6a23541f..c9b9269cbc 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Get_Pump_CheckTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Get_Pump_CheckTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Get_Shipping_InformationTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Get_Shipping_InformationTest.kt
similarity index 95%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Get_Shipping_InformationTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Get_Shipping_InformationTest.kt
index f9247b152b..eb40c21843 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Get_Shipping_InformationTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Get_Shipping_InformationTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Get_Shipping_VerisonTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Get_Shipping_VerisonTest.kt
similarity index 95%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Get_Shipping_VerisonTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Get_Shipping_VerisonTest.kt
index 7aef230f52..88b9eb5afa 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Get_Shipping_VerisonTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Get_Shipping_VerisonTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Get_Today_Delivery_TotalTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Get_Today_Delivery_TotalTest.kt
similarity index 95%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Get_Today_Delivery_TotalTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Get_Today_Delivery_TotalTest.kt
index 8c2092a425..b24b19f5ea 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Get_Today_Delivery_TotalTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Get_Today_Delivery_TotalTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Get_User_Time_Change_FlagTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Get_User_Time_Change_FlagTest.kt
similarity index 95%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Get_User_Time_Change_FlagTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Get_User_Time_Change_FlagTest.kt
index 2dc51fb3af..69cada9822 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Get_User_Time_Change_FlagTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Get_User_Time_Change_FlagTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Initial_Screen_InformationTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Initial_Screen_InformationTest.kt
similarity index 95%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Initial_Screen_InformationTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Initial_Screen_InformationTest.kt
index 9f878e0be1..9a8e5a588a 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Initial_Screen_InformationTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Initial_Screen_InformationTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Set_History_Upload_ModeTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Set_History_Upload_ModeTest.kt
similarity index 94%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Set_History_Upload_ModeTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Set_History_Upload_ModeTest.kt
index b0e0867b4c..4e88396e27 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Set_History_Upload_ModeTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Set_History_Upload_ModeTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Set_User_Time_Change_Flag_ClearTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Set_User_Time_Change_Flag_ClearTest.kt
similarity index 94%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Set_User_Time_Change_Flag_ClearTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Set_User_Time_Change_Flag_ClearTest.kt
index 2ee55972da..20b312641a 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Set_User_Time_Change_Flag_ClearTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Set_User_Time_Change_Flag_ClearTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_AlarmTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_AlarmTest.kt
similarity index 69%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_AlarmTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_AlarmTest.kt
index 7b64daa632..3f4c681beb 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_AlarmTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_AlarmTest.kt
@@ -1,32 +1,21 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
-import info.nightscout.androidaps.MainApp
-import info.nightscout.androidaps.db.DatabaseHelper
-import info.nightscout.androidaps.plugins.pump.danaR.comm.RecordTypes
+import info.nightscout.androidaps.interfaces.DatabaseHelperInterface
+import info.nightscout.androidaps.plugins.general.nsclient.NSUpload
import org.junit.Assert
-import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.Mock
-import org.mockito.Mockito.`when`
-import org.powermock.api.mockito.PowerMockito
-import org.powermock.core.classloader.annotations.PrepareForTest
import org.powermock.modules.junit4.PowerMockRunner
import java.util.*
@RunWith(PowerMockRunner::class)
-@PrepareForTest(MainApp::class)
class DanaRS_Packet_History_AlarmTest : DanaRSTestBase() {
- @Mock lateinit var databaseHelper: DatabaseHelper
-
- @Before
- fun mock() {
- PowerMockito.mockStatic(MainApp::class.java)
- `when`(MainApp.getDbHelper()).thenReturn(databaseHelper)
- }
+ @Mock lateinit var databaseHelper: DatabaseHelperInterface
+ @Mock lateinit var nsUpload: NSUpload
private val packetInjector = HasAndroidInjector {
AndroidInjector {
@@ -36,6 +25,7 @@ class DanaRS_Packet_History_AlarmTest : DanaRSTestBase() {
}
if (it is DanaRS_Packet_History_Alarm) {
it.rxBus = rxBus
+ it.databaseHelper = databaseHelper
}
}
}
@@ -57,7 +47,7 @@ class DanaRS_Packet_History_AlarmTest : DanaRSTestBase() {
putByteToArray(array, 9, 100) // value
packet.handleMessage(array)
- Assert.assertEquals(RecordTypes.RECORD_TYPE_ALARM, packet.danaRHistoryRecord.recordCode)
+ Assert.assertEquals(info.nightscout.androidaps.dana.comm.RecordTypes.RECORD_TYPE_ALARM, packet.danaRHistoryRecord.recordCode)
Assert.assertEquals(Date(119, 1, 4, 20, 11, 35).time, packet.danaRHistoryRecord.recordDate)
Assert.assertEquals("Occlusion", packet.danaRHistoryRecord.recordAlarm)
Assert.assertEquals(3.56, packet.danaRHistoryRecord.recordValue, 0.01)
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_All_HistoryTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_All_HistoryTest.kt
similarity index 93%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_All_HistoryTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_All_HistoryTest.kt
index 6913ec5da1..8e2558f0e2 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_All_HistoryTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_All_HistoryTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_BasalTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_BasalTest.kt
similarity index 93%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_BasalTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_BasalTest.kt
index 227e305eba..f0ab651b9e 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_BasalTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_BasalTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_Blood_GlucoseTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_Blood_GlucoseTest.kt
similarity index 93%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_Blood_GlucoseTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_Blood_GlucoseTest.kt
index 9c1474ebe2..df83c63baa 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_Blood_GlucoseTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_Blood_GlucoseTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_BolusTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_BolusTest.kt
similarity index 93%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_BolusTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_BolusTest.kt
index 202f52d0be..e2bc27ae88 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_BolusTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_BolusTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_CarbohydrateTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_CarbohydrateTest.kt
similarity index 93%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_CarbohydrateTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_CarbohydrateTest.kt
index 93d40faac9..6a9aa52189 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_CarbohydrateTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_CarbohydrateTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_DailyTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_DailyTest.kt
similarity index 93%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_DailyTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_DailyTest.kt
index 00b407f32a..85719ce40d 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_DailyTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_DailyTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_PrimeTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_PrimeTest.kt
similarity index 93%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_PrimeTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_PrimeTest.kt
index 59ed19ac48..f06f0605b9 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_PrimeTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_PrimeTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_RefillTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_RefillTest.kt
similarity index 93%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_RefillTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_RefillTest.kt
index 832d52f6e6..fcbc0a182c 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_RefillTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_RefillTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_SuspendTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_SuspendTest.kt
similarity index 93%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_SuspendTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_SuspendTest.kt
index f1f612fe13..e6de597869 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_SuspendTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_SuspendTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_TemporaryTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_TemporaryTest.kt
similarity index 93%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_TemporaryTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_TemporaryTest.kt
index 0a74282ddd..9064a8d3b4 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_TemporaryTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_TemporaryTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Notify_AlarmTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Notify_AlarmTest.kt
similarity index 90%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Notify_AlarmTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Notify_AlarmTest.kt
index f10bb50efd..04df7d84f9 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Notify_AlarmTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Notify_AlarmTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
@@ -7,6 +7,7 @@ import org.junit.Assert
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
+import org.mockito.Mock
import org.powermock.api.mockito.PowerMockito
import org.powermock.core.classloader.annotations.PrepareForTest
import org.powermock.modules.junit4.PowerMockRunner
@@ -15,12 +16,15 @@ import org.powermock.modules.junit4.PowerMockRunner
@PrepareForTest(NSUpload::class)
class DanaRS_Packet_Notify_AlarmTest : DanaRSTestBase() {
+ @Mock lateinit var nsUpload: NSUpload
+
private val packetInjector = HasAndroidInjector {
AndroidInjector {
if (it is DanaRS_Packet_Notify_Alarm) {
it.aapsLogger = aapsLogger
it.rxBus = rxBus
it.resourceHelper = resourceHelper
+ it.nsUpload = nsUpload
}
}
}
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Notify_Delivery_CompleteTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Notify_Delivery_CompleteTest.kt
similarity index 94%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Notify_Delivery_CompleteTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Notify_Delivery_CompleteTest.kt
index 9e437107b1..c80419e165 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Notify_Delivery_CompleteTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Notify_Delivery_CompleteTest.kt
@@ -1,11 +1,11 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.db.Treatment
import info.nightscout.androidaps.interfaces.ActivePluginProvider
import info.nightscout.androidaps.plugins.bus.RxBusWrapper
-import info.nightscout.androidaps.plugins.pump.danaRS.DanaRSPlugin
+import info.nightscout.androidaps.danars.DanaRSPlugin
import org.junit.Assert
import org.junit.Test
import org.junit.runner.RunWith
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Notify_Delivery_Rate_DisplayTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Notify_Delivery_Rate_DisplayTest.kt
similarity index 91%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Notify_Delivery_Rate_DisplayTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Notify_Delivery_Rate_DisplayTest.kt
index d015035113..28ff206b5e 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Notify_Delivery_Rate_DisplayTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Notify_Delivery_Rate_DisplayTest.kt
@@ -1,15 +1,16 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import android.content.Context
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
+import info.nightscout.androidaps.Config
+import info.nightscout.androidaps.danars.DanaRSPlugin
import info.nightscout.androidaps.db.Treatment
import info.nightscout.androidaps.interfaces.ActivePluginProvider
import info.nightscout.androidaps.interfaces.CommandQueueProvider
import info.nightscout.androidaps.plugins.bus.RxBusWrapper
import info.nightscout.androidaps.plugins.configBuilder.ConstraintChecker
import info.nightscout.androidaps.plugins.pump.common.bolusInfo.DetailedBolusInfoStorage
-import info.nightscout.androidaps.plugins.pump.danaRS.DanaRSPlugin
import org.junit.Assert
import org.junit.Before
import org.junit.Test
@@ -67,7 +68,7 @@ class DanaRS_Packet_Notify_Delivery_Rate_DisplayTest : DanaRSTestBase() {
@Before
fun mock() {
- danaRSPlugin = DanaRSPlugin(HasAndroidInjector { AndroidInjector { Unit } }, aapsLogger, rxBus, context, resourceHelper, constraintChecker, profileFunction, treatmentsPlugin, sp, commandQueue, danaRPump, detailedBolusInfoStorage, fabricPrivacy, dateUtil)
+ danaRSPlugin = DanaRSPlugin(HasAndroidInjector { AndroidInjector { Unit } }, aapsLogger, rxBus, context, resourceHelper, constraintChecker, profileFunction, activePluginProvider, sp, commandQueue, danaRPump, detailedBolusInfoStorage, fabricPrivacy, dateUtil, Config())
danaRPump.bolusingTreatment = Treatment(packetInjector)
}
}
\ No newline at end of file
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Notify_Missed_Bolus_AlarmTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Notify_Missed_Bolus_AlarmTest.kt
similarity index 94%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Notify_Missed_Bolus_AlarmTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Notify_Missed_Bolus_AlarmTest.kt
index 9eae04dbec..164720f011 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Notify_Missed_Bolus_AlarmTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Notify_Missed_Bolus_AlarmTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Option_Get_Pump_TimeTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Option_Get_Pump_TimeTest.kt
similarity index 95%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Option_Get_Pump_TimeTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Option_Get_Pump_TimeTest.kt
index 1c64b0d82a..b0a2f04ec1 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Option_Get_Pump_TimeTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Option_Get_Pump_TimeTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Option_Get_User_OptionTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Option_Get_User_OptionTest.kt
similarity index 95%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Option_Get_User_OptionTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Option_Get_User_OptionTest.kt
index 4412f5b1fb..9adab432df 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Option_Get_User_OptionTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Option_Get_User_OptionTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Option_Set_Pump_TimeTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Option_Set_Pump_TimeTest.kt
similarity index 96%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Option_Set_Pump_TimeTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Option_Set_Pump_TimeTest.kt
index 67a9eed70d..b67447884e 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Option_Set_Pump_TimeTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Option_Set_Pump_TimeTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Option_Set_User_OptionTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Option_Set_User_OptionTest.kt
similarity index 95%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Option_Set_User_OptionTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Option_Set_User_OptionTest.kt
index 6f53976045..ab0238d448 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Option_Set_User_OptionTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Option_Set_User_OptionTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Review_Bolus_AvgTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Review_Bolus_AvgTest.kt
similarity index 94%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Review_Bolus_AvgTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Review_Bolus_AvgTest.kt
index 2842e99c74..5b5e179f7d 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Review_Bolus_AvgTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Review_Bolus_AvgTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Review_Get_Pump_Dec_RatioTest.kt b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Review_Get_Pump_Dec_RatioTest.kt
similarity index 93%
rename from app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Review_Get_Pump_Dec_RatioTest.kt
rename to app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Review_Get_Pump_Dec_RatioTest.kt
index 9c5a6f824c..615ed0da72 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Review_Get_Pump_Dec_RatioTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Review_Get_Pump_Dec_RatioTest.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
diff --git a/app/src/test/java/info/nightscout/androidaps/interfaces/ConstraintsCheckerTest.kt b/app/src/test/java/info/nightscout/androidaps/interfaces/ConstraintsCheckerTest.kt
index 7f5806e962..30ac7a766c 100644
--- a/app/src/test/java/info/nightscout/androidaps/interfaces/ConstraintsCheckerTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/interfaces/ConstraintsCheckerTest.kt
@@ -14,12 +14,14 @@ import info.nightscout.androidaps.plugins.configBuilder.ConstraintChecker
import info.nightscout.androidaps.plugins.constraints.objectives.ObjectivesPlugin
import info.nightscout.androidaps.plugins.constraints.objectives.objectives.Objective
import info.nightscout.androidaps.plugins.constraints.safety.SafetyPlugin
+import info.nightscout.androidaps.plugins.general.nsclient.NSUpload
+import info.nightscout.androidaps.plugins.general.nsclient.UploadQueue
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.IobCobCalculatorPlugin
import info.nightscout.androidaps.plugins.pump.combo.ComboPlugin
import info.nightscout.androidaps.plugins.pump.common.bolusInfo.DetailedBolusInfoStorage
import info.nightscout.androidaps.plugins.pump.danaR.DanaRPlugin
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
-import info.nightscout.androidaps.plugins.pump.danaRS.DanaRSPlugin
+import info.nightscout.androidaps.dana.DanaRPump
+import info.nightscout.androidaps.danars.DanaRSPlugin
import info.nightscout.androidaps.plugins.pump.insight.LocalInsightPlugin
import info.nightscout.androidaps.plugins.pump.virtual.VirtualPumpPlugin
import info.nightscout.androidaps.plugins.sensitivity.SensitivityOref1Plugin
@@ -57,9 +59,11 @@ class ConstraintsCheckerTest : TestBaseWithProfile() {
@Mock lateinit var glimpPlugin: GlimpPlugin
@Mock lateinit var sensitivityOref1Plugin: SensitivityOref1Plugin
@Mock lateinit var profiler: Profiler
+ @Mock lateinit var nsUpload: NSUpload
+ @Mock lateinit var uploadQueue: UploadQueue
private var buildHelper = BuildHelper(Config())
- lateinit var danaRPump: DanaRPump
+ lateinit var danaRPump: info.nightscout.androidaps.dana.DanaRPump
lateinit var constraintChecker: ConstraintChecker
private lateinit var safetyPlugin: SafetyPlugin
@@ -109,13 +113,13 @@ class ConstraintsCheckerTest : TestBaseWithProfile() {
`when`(activePlugin.activePump).thenReturn(virtualPumpPlugin)
constraintChecker = ConstraintChecker(activePlugin)
- danaRPump = DanaRPump(aapsLogger, sp, injector)
- hardLimits = HardLimits(aapsLogger, rxBus, sp, resourceHelper, context)
+ danaRPump = info.nightscout.androidaps.dana.DanaRPump(aapsLogger, sp, injector)
+ hardLimits = HardLimits(aapsLogger, rxBus, sp, resourceHelper, context, nsUpload)
objectivesPlugin = ObjectivesPlugin(injector, aapsLogger, resourceHelper, activePlugin, sp, Config())
comboPlugin = ComboPlugin(injector, aapsLogger, rxBus, resourceHelper, profileFunction, treatmentsPlugin, sp, commandQueue, context)
danaRPlugin = DanaRPlugin(injector, aapsLogger, rxBus, context, resourceHelper, constraintChecker, treatmentsPlugin, sp, commandQueue, danaRPump, dateUtil)
- danaRSPlugin = DanaRSPlugin(injector, aapsLogger, rxBus, context, resourceHelper, constraintChecker, profileFunction, treatmentsPlugin, sp, commandQueue, danaRPump, detailedBolusInfoStorage, fabricPrivacy, dateUtil)
- insightPlugin = LocalInsightPlugin(injector, aapsLogger, rxBus, resourceHelper, treatmentsPlugin, sp, commandQueue, profileFunction, context, Config(), dateUtil)
+ danaRSPlugin = DanaRSPlugin(injector, aapsLogger, rxBus, context, resourceHelper, constraintChecker, profileFunction, activePluginProvider, sp, commandQueue, danaRPump, detailedBolusInfoStorage, fabricPrivacy, dateUtil, Config())
+ insightPlugin = LocalInsightPlugin(injector, aapsLogger, rxBus, resourceHelper, treatmentsPlugin, sp, commandQueue, profileFunction, nsUpload, context, uploadQueue, Config(), dateUtil)
openAPSSMBPlugin = OpenAPSSMBPlugin(injector, aapsLogger, rxBus, constraintChecker, resourceHelper, profileFunction, context, activePlugin, treatmentsPlugin, iobCobCalculatorPlugin, hardLimits, profiler, fabricPrivacy)
openAPSAMAPlugin = OpenAPSAMAPlugin(injector, aapsLogger, rxBus, constraintChecker, resourceHelper, profileFunction, context, activePlugin, treatmentsPlugin, iobCobCalculatorPlugin, hardLimits, profiler, fabricPrivacy)
safetyPlugin = SafetyPlugin(injector, aapsLogger, resourceHelper, sp, rxBus, constraintChecker, openAPSAMAPlugin, openAPSSMBPlugin, sensitivityOref1Plugin, activePlugin, hardLimits, buildHelper, treatmentsPlugin, Config())
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/aps/loop/LoopPluginTest.kt b/app/src/test/java/info/nightscout/androidaps/plugins/aps/loop/LoopPluginTest.kt
index 28fb3668da..7d35e2f1b2 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/aps/loop/LoopPluginTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/plugins/aps/loop/LoopPluginTest.kt
@@ -9,10 +9,11 @@ import info.nightscout.androidaps.TestBase
import info.nightscout.androidaps.interfaces.ActivePluginProvider
import info.nightscout.androidaps.interfaces.CommandQueueProvider
import info.nightscout.androidaps.interfaces.PluginType
+import info.nightscout.androidaps.interfaces.ProfileFunction
import info.nightscout.androidaps.interfaces.PumpDescription
import info.nightscout.androidaps.plugins.bus.RxBusWrapper
import info.nightscout.androidaps.plugins.configBuilder.ConstraintChecker
-import info.nightscout.androidaps.interfaces.ProfileFunction
+import info.nightscout.androidaps.plugins.general.nsclient.NSUpload
import info.nightscout.androidaps.plugins.general.wear.ActionStringHandler
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.IobCobCalculatorPlugin
import info.nightscout.androidaps.plugins.pump.virtual.VirtualPumpPlugin
@@ -49,6 +50,7 @@ class LoopPluginTest : TestBase() {
@Mock lateinit var iobCobCalculatorPlugin: IobCobCalculatorPlugin
@Mock lateinit var fabricPrivacy: FabricPrivacy
@Mock lateinit var receiverStatusStore: ReceiverStatusStore
+ @Mock lateinit var nsUpload: NSUpload
private lateinit var hardLimits: HardLimits
@@ -56,9 +58,9 @@ class LoopPluginTest : TestBase() {
val injector = HasAndroidInjector { AndroidInjector { } }
@Before fun prepareMock() {
- hardLimits = HardLimits(aapsLogger, rxBus, sp, resourceHelper, context)
+ hardLimits = HardLimits(aapsLogger, rxBus, sp, resourceHelper, context, nsUpload)
- loopPlugin = LoopPlugin(injector, aapsLogger, rxBus, sp, constraintChecker, resourceHelper, profileFunction, context, commandQueue, activePlugin, treatmentsPlugin, virtualPumpPlugin, actionStringHandler, iobCobCalculatorPlugin, receiverStatusStore, fabricPrivacy, hardLimits)
+ loopPlugin = LoopPlugin(injector, aapsLogger, rxBus, sp, constraintChecker, resourceHelper, profileFunction, context, commandQueue, activePlugin, treatmentsPlugin, virtualPumpPlugin, actionStringHandler, iobCobCalculatorPlugin, receiverStatusStore, fabricPrivacy, nsUpload, hardLimits)
`when`(activePlugin.getActivePump()).thenReturn(virtualPumpPlugin)
}
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/constraints/safety/SafetyPluginTest.kt b/app/src/test/java/info/nightscout/androidaps/plugins/constraints/safety/SafetyPluginTest.kt
index 20474af664..4f85fb9b02 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/constraints/safety/SafetyPluginTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/plugins/constraints/safety/SafetyPluginTest.kt
@@ -13,6 +13,7 @@ import info.nightscout.androidaps.interfaces.PumpDescription
import info.nightscout.androidaps.plugins.aps.openAPSAMA.OpenAPSAMAPlugin
import info.nightscout.androidaps.plugins.aps.openAPSSMB.OpenAPSSMBPlugin
import info.nightscout.androidaps.plugins.configBuilder.ConstraintChecker
+import info.nightscout.androidaps.plugins.general.nsclient.NSUpload
import info.nightscout.androidaps.plugins.pump.virtual.VirtualPumpPlugin
import info.nightscout.androidaps.plugins.sensitivity.SensitivityOref1Plugin
import info.nightscout.androidaps.plugins.source.GlimpPlugin
@@ -42,6 +43,7 @@ class SafetyPluginTest : TestBaseWithProfile() {
@Mock lateinit var virtualPumpPlugin: VirtualPumpPlugin
@Mock lateinit var glimpPlugin: GlimpPlugin
@Mock lateinit var context: Context
+ @Mock lateinit var nsUpload: NSUpload
private lateinit var hardLimits: HardLimits
private lateinit var safetyPlugin: SafetyPlugin
@@ -73,7 +75,7 @@ class SafetyPluginTest : TestBaseWithProfile() {
`when`(activePlugin.activePump).thenReturn(virtualPumpPlugin)
`when`(virtualPumpPlugin.pumpDescription).thenReturn(pumpDescription)
- hardLimits = HardLimits(aapsLogger, rxBus, sp, resourceHelper, context)
+ hardLimits = HardLimits(aapsLogger, rxBus, sp, resourceHelper, context, nsUpload)
safetyPlugin = SafetyPlugin(injector, aapsLogger, resourceHelper, sp, rxBus, constraintChecker, openAPSAMAPlugin, openAPSSMBPlugin, sensitivityOref1Plugin, activePlugin, hardLimits, buildHelper, treatmentsPlugin, Config())
}
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/general/automation/actions/ActionNotificationTest.kt b/app/src/test/java/info/nightscout/androidaps/plugins/general/automation/actions/ActionNotificationTest.kt
index a2422d44d8..06307d2347 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/general/automation/actions/ActionNotificationTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/plugins/general/automation/actions/ActionNotificationTest.kt
@@ -5,7 +5,6 @@ import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.R
import info.nightscout.androidaps.TestBase
import info.nightscout.androidaps.data.PumpEnactResult
-import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.plugins.bus.RxBusWrapper
import info.nightscout.androidaps.plugins.general.automation.elements.InputString
import info.nightscout.androidaps.plugins.general.nsclient.NSUpload
@@ -29,6 +28,7 @@ class ActionNotificationTest : TestBase() {
@Mock lateinit var resourceHelper: ResourceHelper
@Mock lateinit var rxBus: RxBusWrapper
+ @Mock lateinit var nsUpload: NSUpload
private lateinit var sut: ActionNotification
var injector: HasAndroidInjector = HasAndroidInjector {
@@ -36,6 +36,7 @@ class ActionNotificationTest : TestBase() {
if (it is ActionNotification) {
it.resourceHelper = resourceHelper
it.rxBus = rxBus
+ it.nsUpload = nsUpload
}
if (it is PumpEnactResult) {
it.aapsLogger = aapsLogger
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/DanaRPluginTest.kt b/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/DanaRPluginTest.kt
index 0880445d72..f7fb9ac936 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/DanaRPluginTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/DanaRPluginTest.kt
@@ -29,7 +29,7 @@ class DanaRPluginTest : TestBaseWithProfile() {
@Mock lateinit var sp: SP
@Mock lateinit var commandQueue: CommandQueueProvider
- lateinit var danaRPump: DanaRPump
+ lateinit var danaRPump: info.nightscout.androidaps.dana.DanaRPump
private lateinit var danaRPlugin: DanaRPlugin
@@ -43,7 +43,7 @@ class DanaRPluginTest : TestBaseWithProfile() {
`when`(resourceHelper.gs(R.string.pumplimit)).thenReturn("pump limit")
`when`(resourceHelper.gs(R.string.limitingbasalratio)).thenReturn("Limiting max basal rate to %1\$.2f U/h because of %2\$s")
`when`(resourceHelper.gs(R.string.limitingpercentrate)).thenReturn("Limiting max percent rate to %1\$d%% because of %2\$s")
- danaRPump = DanaRPump(aapsLogger, sp, injector)
+ danaRPump = info.nightscout.androidaps.dana.DanaRPump(aapsLogger, sp, injector)
danaRPlugin = DanaRPlugin(injector, aapsLogger, rxBus, context, resourceHelper, constraintChecker, treatmentsPlugin, sp, commandQueue, danaRPump, dateUtil)
}
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/DanaRTestBase.kt b/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/DanaRTestBase.kt
index e2d094de22..2a46bd697c 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/DanaRTestBase.kt
+++ b/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/DanaRTestBase.kt
@@ -6,7 +6,7 @@ import info.nightscout.androidaps.TestBase
import info.nightscout.androidaps.db.TemporaryBasal
import info.nightscout.androidaps.interfaces.ActivePluginProvider
import info.nightscout.androidaps.interfaces.ProfileFunction
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
import info.nightscout.androidaps.utils.DateUtil
import info.nightscout.androidaps.utils.sharedPreferences.SP
import org.junit.Before
@@ -30,7 +30,7 @@ open class DanaRTestBase : TestBase() {
}
}
- lateinit var danaRPump: DanaRPump
+ lateinit var danaRPump: info.nightscout.androidaps.dana.DanaRPump
fun createArray(length: Int, fillWith: Byte): ByteArray {
val ret = ByteArray(length)
@@ -61,6 +61,6 @@ open class DanaRTestBase : TestBase() {
@Before
fun setup() {
- danaRPump = DanaRPump(aapsLogger, sp, injector)
+ danaRPump = info.nightscout.androidaps.dana.DanaRPump(aapsLogger, sp, injector)
}
}
\ No newline at end of file
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MessageHashTableRTest.kt b/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MessageHashTableRTest.kt
index efd97bea09..b17f8efc8d 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MessageHashTableRTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MessageHashTableRTest.kt
@@ -6,6 +6,7 @@ import info.nightscout.androidaps.interfaces.Constraint
import info.nightscout.androidaps.plugins.bus.RxBusWrapper
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin
import info.nightscout.androidaps.plugins.configBuilder.ConstraintChecker
+import info.nightscout.androidaps.plugins.general.nsclient.NSUpload
import info.nightscout.androidaps.plugins.pump.common.bolusInfo.DetailedBolusInfoStorage
import info.nightscout.androidaps.plugins.pump.danaR.DanaRPlugin
import info.nightscout.androidaps.plugins.pump.danaRKorean.DanaRKoreanPlugin
@@ -33,10 +34,11 @@ class MessageHashTableRTest : DanaRTestBase() {
@Mock lateinit var activePlugin: ActivePluginProvider
@Mock lateinit var detailedBolusInfoStorage: DetailedBolusInfoStorage
@Mock lateinit var treatmentsPlugin: TreatmentsPlugin
+ @Mock lateinit var nsUpload: NSUpload
@Test fun runTest() {
Mockito.`when`(constraintChecker.applyBolusConstraints(anyObject())).thenReturn(Constraint(0.0))
- val messageHashTable = MessageHashTableR(aapsLogger, rxBus, resourceHelper, constraintChecker, danaRPump, danaRPlugin, danaRKoreanPlugin, configBuilderPlugin, commandQueue, activePlugin, injector, dateUtil)
+ val messageHashTable = MessageHashTableR(aapsLogger, rxBus, resourceHelper, constraintChecker, danaRPump, danaRPlugin, danaRKoreanPlugin, configBuilderPlugin, commandQueue, activePlugin, nsUpload, injector, dateUtil)
val testMessage = messageHashTable.findMessage(0x41f2)
Assert.assertEquals("CMD_HISTORY_ALL", testMessage.messageName)
}
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgCheckValueTest.kt b/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgCheckValueTest.kt
index 2b5058241d..d6b43ff775 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgCheckValueTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgCheckValueTest.kt
@@ -1,7 +1,7 @@
package info.nightscout.androidaps.plugins.pump.danaR.comm
import info.nightscout.androidaps.plugins.pump.danaR.DanaRPlugin
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
import org.junit.Assert
import org.junit.Test
import org.junit.runner.RunWith
@@ -18,8 +18,8 @@ class MsgCheckValueTest : DanaRTestBase() {
// test message decoding
val array = ByteArray(100)
- putByteToArray(array, 0, DanaRPump.EXPORT_MODEL.toByte())
+ putByteToArray(array, 0, info.nightscout.androidaps.dana.DanaRPump.EXPORT_MODEL.toByte())
packet.handleMessage(array)
- Assert.assertEquals(DanaRPump.EXPORT_MODEL, danaRPump.hwModel)
+ Assert.assertEquals(info.nightscout.androidaps.dana.DanaRPump.EXPORT_MODEL, danaRPump.hwModel)
}
}
\ No newline at end of file
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgErrorTest.kt b/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgErrorTest.kt
index 2c372c4c21..d03dbf6f20 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgErrorTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgErrorTest.kt
@@ -16,11 +16,12 @@ import org.powermock.modules.junit4.PowerMockRunner
class MsgErrorTest : DanaRTestBase() {
@Mock lateinit var resourceHelper: ResourceHelper
+ @Mock lateinit var nsUpload: NSUpload
val rxBus = RxBusWrapper()
@Test fun runTest() {
PowerMockito.mockStatic(NSUpload::class.java)
- val packet = MsgError(aapsLogger, rxBus, resourceHelper, danaRPump)
+ val packet = MsgError(aapsLogger, rxBus, resourceHelper, danaRPump, nsUpload)
// test message decoding
val array = ByteArray(100)
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingProfileRatiosAllTest.kt b/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingProfileRatiosAllTest.kt
index be2f65f3ad..c263cf9134 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingProfileRatiosAllTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingProfileRatiosAllTest.kt
@@ -1,6 +1,6 @@
package info.nightscout.androidaps.plugins.pump.danaR.comm
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
import org.junit.Assert
import org.junit.Test
import org.junit.runner.RunWith
@@ -11,7 +11,7 @@ class MsgSettingProfileRatiosAllTest : DanaRTestBase() {
@Test fun runTest() {
val packet = MsgSettingProfileRatiosAll(aapsLogger, danaRPump)
- danaRPump.units = DanaRPump.UNITS_MGDL
+ danaRPump.units = info.nightscout.androidaps.dana.DanaRPump.UNITS_MGDL
// test message decoding
packet.handleMessage(createArray(34, 7.toByte()))
Assert.assertEquals(MessageBase.intFromBuff(createArray(10, 7.toByte()), 0, 2), danaRPump.morningCIR)
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingProfileRatiosTest.kt b/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingProfileRatiosTest.kt
index 080aef2a8d..f33f608b56 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingProfileRatiosTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingProfileRatiosTest.kt
@@ -1,6 +1,6 @@
package info.nightscout.androidaps.plugins.pump.danaR.comm
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
import org.junit.Assert
import org.junit.Test
import org.junit.runner.RunWith
@@ -11,7 +11,7 @@ class MsgSettingProfileRatiosTest : DanaRTestBase() {
@Test fun runTest() {
val packet = MsgSettingProfileRatios(aapsLogger, danaRPump)
- danaRPump.units = DanaRPump.UNITS_MGDL
+ danaRPump.units = info.nightscout.androidaps.dana.DanaRPump.UNITS_MGDL
// test message decoding
packet.handleMessage(createArray(34, 7.toByte()))
Assert.assertEquals(MessageBase.intFromBuff(createArray(10, 7.toByte()), 0, 2), danaRPump.currentCIR)
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingPumpTimeTest.kt b/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingPumpTimeTest.kt
index 28b69b98ef..8b5c462142 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingPumpTimeTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingPumpTimeTest.kt
@@ -1,6 +1,6 @@
package info.nightscout.androidaps.plugins.pump.danaR.comm
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
import org.junit.Assert
import org.junit.Test
import org.junit.runner.RunWith
@@ -12,7 +12,7 @@ class MsgSettingPumpTimeTest : DanaRTestBase() {
@Test fun runTest() {
val packet = MsgSettingPumpTime(aapsLogger, danaRPump, dateUtil)
- danaRPump.units = DanaRPump.UNITS_MGDL
+ danaRPump.units = info.nightscout.androidaps.dana.DanaRPump.UNITS_MGDL
// test message decoding
val bytes = createArray(34, 7.toByte())
val time = Date(
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingShippingInfoTest.kt b/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingShippingInfoTest.kt
index 7f9e2ea6c3..8001eec0df 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingShippingInfoTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingShippingInfoTest.kt
@@ -1,6 +1,6 @@
package info.nightscout.androidaps.plugins.pump.danaR.comm
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
import org.junit.Assert
import org.junit.Test
import org.junit.runner.RunWith
@@ -11,7 +11,7 @@ class MsgSettingShippingInfoTest : DanaRTestBase() {
@Test fun runTest() {
val packet = MsgSettingShippingInfo(aapsLogger, danaRPump)
- danaRPump.units = DanaRPump.UNITS_MGDL
+ danaRPump.units = info.nightscout.androidaps.dana.DanaRPump.UNITS_MGDL
// test message decoding
packet.handleMessage(createArray(34, 7.toByte()))
Assert.assertEquals(MessageBase.stringFromBuff(createArray(34, 7.toByte()), 0, 10), danaRPump.serialNumber)
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingUserOptionsTest.kt b/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingUserOptionsTest.kt
index 2be556b1e1..0d1b936aef 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingUserOptionsTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgSettingUserOptionsTest.kt
@@ -1,6 +1,6 @@
package info.nightscout.androidaps.plugins.pump.danaR.comm
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
import org.junit.Assert
import org.junit.Test
import org.junit.runner.RunWith
@@ -11,7 +11,7 @@ class MsgSettingUserOptionsTest : DanaRTestBase() {
@Test fun runTest() {
val packet = MsgSettingUserOptions(aapsLogger, danaRPump)
- danaRPump.units = DanaRPump.UNITS_MGDL
+ danaRPump.units = info.nightscout.androidaps.dana.DanaRPump.UNITS_MGDL
// test message decoding
packet.handleMessage(createArray(48, 7.toByte()))
Assert.assertEquals(7, danaRPump.lcdOnTimeSec)
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgStatusProfileTest.kt b/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgStatusProfileTest.kt
index 4af9c12894..bb9fa76163 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgStatusProfileTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/MsgStatusProfileTest.kt
@@ -1,6 +1,6 @@
package info.nightscout.androidaps.plugins.pump.danaR.comm
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
import org.junit.Assert
import org.junit.Test
import org.junit.runner.RunWith
@@ -11,7 +11,7 @@ class MsgStatusProfileTest : DanaRTestBase() {
@Test fun runTest() {
val packet = MsgStatusProfile(aapsLogger, danaRPump)
- danaRPump.units = DanaRPump.UNITS_MGDL
+ danaRPump.units = info.nightscout.androidaps.dana.DanaRPump.UNITS_MGDL
// test message decoding
packet.handleMessage(createArray(34, 7.toByte()))
Assert.assertEquals(MessageBase.intFromBuff(createArray(10, 7.toByte()), 0, 2), danaRPump.currentCIR)
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/RecordTypesTest.kt b/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/RecordTypesTest.kt
index 51f06e7ec9..c67d8c0b52 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/RecordTypesTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaR/comm/RecordTypesTest.kt
@@ -6,6 +6,6 @@ import org.junit.Test
class RecordTypesTest {
@Test fun runTest() {
- Assert.assertEquals(1.toByte(), RecordTypes.RECORD_TYPE_BOLUS)
+ Assert.assertEquals(1.toByte(), info.nightscout.androidaps.dana.comm.RecordTypes.RECORD_TYPE_BOLUS)
}
}
\ No newline at end of file
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRKorean/DanaRKoreanPluginTest.kt b/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRKorean/DanaRKoreanPluginTest.kt
index e35a45ed1f..defc719499 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRKorean/DanaRKoreanPluginTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRKorean/DanaRKoreanPluginTest.kt
@@ -10,7 +10,7 @@ import info.nightscout.androidaps.interfaces.CommandQueueProvider
import info.nightscout.androidaps.interfaces.Constraint
import info.nightscout.androidaps.interfaces.PluginType
import info.nightscout.androidaps.plugins.configBuilder.ConstraintChecker
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
import info.nightscout.androidaps.utils.sharedPreferences.SP
import org.junit.Assert
import org.junit.Before
@@ -30,7 +30,7 @@ class DanaRKoreanPluginTest : TestBaseWithProfile() {
@Mock lateinit var sp: SP
@Mock lateinit var commandQueue: CommandQueueProvider
- lateinit var danaRPump: DanaRPump
+ lateinit var danaRPump: info.nightscout.androidaps.dana.DanaRPump
private lateinit var danaRPlugin: DanaRKoreanPlugin
@@ -44,7 +44,7 @@ class DanaRKoreanPluginTest : TestBaseWithProfile() {
`when`(resourceHelper.gs(R.string.pumplimit)).thenReturn("pump limit")
`when`(resourceHelper.gs(R.string.limitingbasalratio)).thenReturn("Limiting max basal rate to %1\$.2f U/h because of %2\$s")
`when`(resourceHelper.gs(R.string.limitingpercentrate)).thenReturn("Limiting max percent rate to %1\$d%% because of %2\$s")
- danaRPump = DanaRPump(aapsLogger, sp, injector)
+ danaRPump = info.nightscout.androidaps.dana.DanaRPump(aapsLogger, sp, injector)
danaRPlugin = DanaRKoreanPlugin(injector, aapsLogger, rxBus, danaRPump, context, resourceHelper, constraintChecker, treatmentsPlugin, sp, commandQueue, dateUtil)
}
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRKorean/comm/MessageHashTableRKoreanTest.kt b/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRKorean/comm/MessageHashTableRKoreanTest.kt
index 94df6cc4fe..eb5660a162 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRKorean/comm/MessageHashTableRKoreanTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRKorean/comm/MessageHashTableRKoreanTest.kt
@@ -1,14 +1,15 @@
package info.nightscout.androidaps.plugins.pump.danaRKorean.comm
+import info.nightscout.androidaps.danars.comm.DanaRSTestBase
import info.nightscout.androidaps.interfaces.ActivePluginProvider
import info.nightscout.androidaps.interfaces.CommandQueueProvider
import info.nightscout.androidaps.interfaces.Constraint
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin
import info.nightscout.androidaps.plugins.configBuilder.ConstraintChecker
+import info.nightscout.androidaps.plugins.general.nsclient.NSUpload
import info.nightscout.androidaps.plugins.pump.common.bolusInfo.DetailedBolusInfoStorage
import info.nightscout.androidaps.plugins.pump.danaR.DanaRPlugin
import info.nightscout.androidaps.plugins.pump.danaRKorean.DanaRKoreanPlugin
-import info.nightscout.androidaps.plugins.pump.danaRS.comm.DanaRSTestBase
import org.junit.Assert
import org.junit.Test
import org.junit.runner.RunWith
@@ -28,10 +29,11 @@ class MessageHashTableRKoreanTest : DanaRSTestBase() {
@Mock lateinit var commandQueue: CommandQueueProvider
@Mock lateinit var activePlugin: ActivePluginProvider
@Mock lateinit var detailedBolusInfoStorage: DetailedBolusInfoStorage
+ @Mock lateinit var nsUpload: NSUpload
@Test fun runTest() {
Mockito.`when`(constraintChecker.applyBolusConstraints(anyObject())).thenReturn(Constraint(0.0))
- val messageHashTable = MessageHashTableRKorean(aapsLogger, rxBus, resourceHelper, constraintChecker, danaRPump, danaRPlugin, danaRKoreanPlugin, configBuilderPlugin, commandQueue, activePlugin, dateUtil, injector)
+ val messageHashTable = MessageHashTableRKorean(aapsLogger, rxBus, resourceHelper, constraintChecker, danaRPump, danaRPlugin, danaRKoreanPlugin, configBuilderPlugin, commandQueue, activePlugin, dateUtil, nsUpload, injector)
val testMessage = messageHashTable.findMessage(0x41f2)
Assert.assertEquals("CMD_HISTORY_ALL", testMessage.messageName)
}
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/DanaRSPluginTest.kt b/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/DanaRSPluginTest.kt
index effe08b5f8..371df0b44c 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/DanaRSPluginTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRS/DanaRSPluginTest.kt
@@ -3,15 +3,17 @@ package info.nightscout.androidaps.plugins.pump.danaRS
import android.content.Context
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
+import info.nightscout.androidaps.Config
import info.nightscout.androidaps.Constants
import info.nightscout.androidaps.R
+import info.nightscout.androidaps.danars.DanaRSPlugin
+import info.nightscout.androidaps.danars.comm.DanaRSTestBase
import info.nightscout.androidaps.interfaces.CommandQueueProvider
import info.nightscout.androidaps.interfaces.Constraint
import info.nightscout.androidaps.interfaces.PluginType
import info.nightscout.androidaps.plugins.bus.RxBusWrapper
import info.nightscout.androidaps.plugins.configBuilder.ConstraintChecker
import info.nightscout.androidaps.plugins.pump.common.bolusInfo.DetailedBolusInfoStorage
-import info.nightscout.androidaps.plugins.pump.danaRS.comm.DanaRSTestBase
import org.junit.Assert
import org.junit.Before
import org.junit.Test
@@ -63,6 +65,6 @@ class DanaRSPluginTest : DanaRSTestBase() {
Mockito.`when`(resourceHelper.gs(eq(R.string.limitingbasalratio), anyObject(), anyObject())).thenReturn("limitingbasalratio")
Mockito.`when`(resourceHelper.gs(eq(R.string.limitingpercentrate), anyObject(), anyObject())).thenReturn("limitingpercentrate")
- danaRSPlugin = DanaRSPlugin(HasAndroidInjector { AndroidInjector { Unit } }, aapsLogger, rxBus, context, resourceHelper, constraintChecker, profileFunction, treatmentsPlugin, sp, commandQueue, danaRPump, detailedBolusInfoStorage, fabricPrivacy, dateUtil)
+ danaRSPlugin = DanaRSPlugin(HasAndroidInjector { AndroidInjector { Unit } }, aapsLogger, rxBus, context, resourceHelper, constraintChecker, profileFunction, activePluginProvider, sp, commandQueue, danaRPump, detailedBolusInfoStorage, fabricPrivacy, dateUtil, Config())
}
}
\ No newline at end of file
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRv2/DanaRv2PluginTest.kt b/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRv2/DanaRv2PluginTest.kt
index 1c7a6083b5..28e45ef20f 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRv2/DanaRv2PluginTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRv2/DanaRv2PluginTest.kt
@@ -11,7 +11,7 @@ import info.nightscout.androidaps.interfaces.Constraint
import info.nightscout.androidaps.interfaces.PluginType
import info.nightscout.androidaps.plugins.configBuilder.ConstraintChecker
import info.nightscout.androidaps.plugins.pump.common.bolusInfo.DetailedBolusInfoStorage
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
@@ -30,7 +30,7 @@ class DanaRv2PluginTest : TestBaseWithProfile() {
@Mock lateinit var commandQueue: CommandQueueProvider
@Mock lateinit var detailedBolusInfoStorage: DetailedBolusInfoStorage
- lateinit var danaRPump: DanaRPump
+ lateinit var danaRPump: info.nightscout.androidaps.dana.DanaRPump
private lateinit var danaRv2Plugin: DanaRv2Plugin
@@ -44,7 +44,7 @@ class DanaRv2PluginTest : TestBaseWithProfile() {
`when`(resourceHelper.gs(R.string.pumplimit)).thenReturn("pump limit")
`when`(resourceHelper.gs(R.string.limitingbasalratio)).thenReturn("Limiting max basal rate to %1\$.2f U/h because of %2\$s")
`when`(resourceHelper.gs(R.string.limitingpercentrate)).thenReturn("Limiting max percent rate to %1\$d%% because of %2\$s")
- danaRPump = DanaRPump(aapsLogger, sp, injector)
+ danaRPump = info.nightscout.androidaps.dana.DanaRPump(aapsLogger, sp, injector)
danaRv2Plugin = DanaRv2Plugin(injector, aapsLogger, rxBus, context, danaRPump, resourceHelper, constraintChecker, treatmentsPlugin, sp, commandQueue, detailedBolusInfoStorage, dateUtil)
}
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRv2/comm/MessageHashTable_rv2Test.kt b/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRv2/comm/MessageHashTable_rv2Test.kt
index b497e88b95..28d07d33d9 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRv2/comm/MessageHashTable_rv2Test.kt
+++ b/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRv2/comm/MessageHashTable_rv2Test.kt
@@ -7,6 +7,7 @@ import info.nightscout.androidaps.interfaces.Constraint
import info.nightscout.androidaps.plugins.bus.RxBusWrapper
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin
import info.nightscout.androidaps.plugins.configBuilder.ConstraintChecker
+import info.nightscout.androidaps.plugins.general.nsclient.NSUpload
import info.nightscout.androidaps.plugins.pump.common.bolusInfo.DetailedBolusInfoStorage
import info.nightscout.androidaps.plugins.pump.danaR.DanaRPlugin
import info.nightscout.androidaps.plugins.pump.danaR.comm.DanaRTestBase
@@ -40,11 +41,12 @@ class MessageHashTable_rv2Test : DanaRTestBase() {
@Mock lateinit var activePlugin: ActivePluginProvider
@Mock lateinit var detailedBolusInfoStorage: DetailedBolusInfoStorage
@Mock lateinit var treatmentsPlugin: TreatmentsPlugin
+ @Mock lateinit var nsUpload: NSUpload
@Test
fun runTest() {
`when`(constraintChecker.applyBolusConstraints(anyObject())).thenReturn(Constraint(0.0))
- val messageHashTableRv2 = MessageHashTableRv2(aapsLogger, rxBus, resourceHelper, constraintChecker, danaRPump, danaRPlugin, danaRKoreanPlugin, danaRv2Plugin, configBuilderPlugin, commandQueue, activePlugin, detailedBolusInfoStorage, treatmentsPlugin, injector, DateUtil(context, resourceHelper))
+ val messageHashTableRv2 = MessageHashTableRv2(aapsLogger, rxBus, resourceHelper, constraintChecker, danaRPump, danaRPlugin, danaRKoreanPlugin, danaRv2Plugin, configBuilderPlugin, commandQueue, activePlugin, detailedBolusInfoStorage, treatmentsPlugin, nsUpload, injector, DateUtil(context, resourceHelper))
val forTesting: MessageBase = MsgStatusAPS_v2(aapsLogger, danaRPump)
val testPacket: MessageBase = messageHashTableRv2.findMessage(forTesting.command)
Assert.assertEquals(0xE001, testPacket.command.toLong())
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRv2/comm/MsgCheckValue_v2Test.kt b/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRv2/comm/MsgCheckValue_v2Test.kt
index dd199a9f46..cc064d48b6 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRv2/comm/MsgCheckValue_v2Test.kt
+++ b/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRv2/comm/MsgCheckValue_v2Test.kt
@@ -4,7 +4,7 @@ import info.nightscout.androidaps.interfaces.CommandQueueProvider
import info.nightscout.androidaps.plugins.bus.RxBusWrapper
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin
import info.nightscout.androidaps.plugins.pump.danaR.DanaRPlugin
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
+import info.nightscout.androidaps.dana.DanaRPump
import info.nightscout.androidaps.plugins.pump.danaR.comm.DanaRTestBase
import info.nightscout.androidaps.plugins.pump.danaRKorean.DanaRKoreanPlugin
import info.nightscout.androidaps.plugins.pump.danaRv2.DanaRv2Plugin
@@ -33,6 +33,6 @@ class MsgCheckValue_v2Test : DanaRTestBase() {
val packet = MsgCheckValue_v2(aapsLogger, rxBus, resourceHelper, danaRPump, danaRPlugin, danaRKoreanPlugin, danaRv2Plugin, configBuilderPlugin, commandQueue)
// test message decoding
packet.handleMessage(createArray(34, 3.toByte()))
- Assert.assertEquals(DanaRPump.EXPORT_MODEL, danaRPump.hwModel)
+ Assert.assertEquals(info.nightscout.androidaps.dana.DanaRPump.EXPORT_MODEL, danaRPump.hwModel)
}
}
\ No newline at end of file
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRv2/comm/MsgSetAPSTempBasalStart_v2Test.kt b/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRv2/comm/MsgSetAPSTempBasalStart_v2Test.kt
index 92ea976697..901596d7ff 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRv2/comm/MsgSetAPSTempBasalStart_v2Test.kt
+++ b/app/src/test/java/info/nightscout/androidaps/plugins/pump/danaRv2/comm/MsgSetAPSTempBasalStart_v2Test.kt
@@ -2,7 +2,7 @@ package info.nightscout.androidaps.plugins.pump.danaRv2.comm
import info.nightscout.androidaps.plugins.pump.danaR.comm.DanaRTestBase
import info.nightscout.androidaps.plugins.pump.danaR.comm.MessageBase.intFromBuff
-import info.nightscout.androidaps.plugins.pump.danaRS.comm.DanaRS_Packet_APS_Basal_Set_Temporary_Basal.Companion.PARAM30MIN
+import info.nightscout.androidaps.danars.comm.DanaRS_Packet_APS_Basal_Set_Temporary_Basal.Companion.PARAM30MIN
import org.junit.Assert
import org.junit.Test
import org.junit.runner.RunWith
diff --git a/app/src/test/java/info/nightscout/androidaps/plugins/treatments/TreatmentsPluginTest.kt b/app/src/test/java/info/nightscout/androidaps/plugins/treatments/TreatmentsPluginTest.kt
index f36a10ec7e..e0d17cc4ac 100644
--- a/app/src/test/java/info/nightscout/androidaps/plugins/treatments/TreatmentsPluginTest.kt
+++ b/app/src/test/java/info/nightscout/androidaps/plugins/treatments/TreatmentsPluginTest.kt
@@ -7,7 +7,7 @@ import info.nightscout.androidaps.MainApp
import info.nightscout.androidaps.TestBaseWithProfile
import info.nightscout.androidaps.db.DatabaseHelper
import info.nightscout.androidaps.db.TemporaryBasal
-import info.nightscout.androidaps.logging.LTag
+import info.nightscout.androidaps.plugins.general.nsclient.NSUpload
import info.nightscout.androidaps.plugins.insulin.InsulinOrefRapidActingPlugin
import info.nightscout.androidaps.utils.DateUtil
import info.nightscout.androidaps.utils.FabricPrivacy
@@ -19,7 +19,6 @@ import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.ArgumentMatchers
import org.mockito.Mock
-import org.mockito.Mockito
import org.mockito.Mockito.`when`
import org.powermock.api.mockito.PowerMockito
import org.powermock.core.classloader.annotations.PrepareForTest
@@ -33,6 +32,7 @@ class TreatmentsPluginTest : TestBaseWithProfile() {
@Mock lateinit var sp: SP
@Mock lateinit var databaseHelper: DatabaseHelper
@Mock lateinit var treatmentService: TreatmentService
+ @Mock lateinit var nsUpload: NSUpload
val injector = HasAndroidInjector {
AndroidInjector {
@@ -58,18 +58,18 @@ class TreatmentsPluginTest : TestBaseWithProfile() {
`when`(profileFunction.getProfile(ArgumentMatchers.anyLong())).thenReturn(validProfile)
`when`(activePluginProvider.activeInsulin).thenReturn(insulinOrefRapidActingPlugin)
- sot = TreatmentsPlugin(profileInjector, aapsLogger, rxBus, resourceHelper, context, sp, profileFunction, activePluginProvider, fabricPrivacy, dateUtil)
+ sot = TreatmentsPlugin(profileInjector, aapsLogger, rxBus, resourceHelper, context, sp, profileFunction, activePluginProvider, nsUpload, fabricPrivacy, dateUtil)
sot.service = treatmentService
}
@Test
fun `zero TBR should produce zero absolute insulin`() {
val now = DateUtil.now()
- val tbrs : MutableList = ArrayList()
- tbrs.add(TemporaryBasal(injector).date(now - T.hours(30). msecs()).duration(10000).percent(0))
+ val tbrs: MutableList = ArrayList()
+ tbrs.add(TemporaryBasal(injector).date(now - T.hours(30).msecs()).duration(10000).percent(0))
`when`(databaseHelper.getTemporaryBasalsDataFromTime(ArgumentMatchers.anyLong(), ArgumentMatchers.anyBoolean())).thenReturn(tbrs)
- sot.initializeData(T.hours(30). msecs())
+ sot.initializeData(T.hours(30).msecs())
val iob = sot.getAbsoluteIOBTempBasals(now)
Assert.assertEquals(0.0, iob.iob, 0.0)
}
@@ -77,13 +77,13 @@ class TreatmentsPluginTest : TestBaseWithProfile() {
@Test
fun `90% TBR and should produce less absolute insulin`() {
val now = DateUtil.now()
- val tbrs : MutableList = ArrayList()
+ val tbrs: MutableList = ArrayList()
`when`(databaseHelper.getTemporaryBasalsDataFromTime(ArgumentMatchers.anyLong(), ArgumentMatchers.anyBoolean())).thenReturn(tbrs)
- sot.initializeData(T.hours(30). msecs())
+ sot.initializeData(T.hours(30).msecs())
val iob100pct = sot.getAbsoluteIOBTempBasals(now)
- tbrs.add(TemporaryBasal(injector).date(now - T.hours(30). msecs()).duration(10000).percent(90))
- sot.initializeData(T.hours(30). msecs())
+ tbrs.add(TemporaryBasal(injector).date(now - T.hours(30).msecs()).duration(10000).percent(90))
+ sot.initializeData(T.hours(30).msecs())
val iob90pct = sot.getAbsoluteIOBTempBasals(now)
Assert.assertTrue(iob100pct.iob > iob90pct.iob)
}
@@ -91,13 +91,13 @@ class TreatmentsPluginTest : TestBaseWithProfile() {
@Test
fun `110% TBR and should produce 10% more absolute insulin`() {
val now = DateUtil.now()
- val tbrs : MutableList = ArrayList()
+ val tbrs: MutableList = ArrayList()
`when`(databaseHelper.getTemporaryBasalsDataFromTime(ArgumentMatchers.anyLong(), ArgumentMatchers.anyBoolean())).thenReturn(tbrs)
- sot.initializeData(T.hours(30). msecs())
+ sot.initializeData(T.hours(30).msecs())
val iob100pct = sot.getAbsoluteIOBTempBasals(now)
- tbrs.add(TemporaryBasal(injector).date(now - T.hours(30). msecs()).duration(10000).percent(110))
- sot.initializeData(T.hours(30). msecs())
+ tbrs.add(TemporaryBasal(injector).date(now - T.hours(30).msecs()).duration(10000).percent(110))
+ sot.initializeData(T.hours(30).msecs())
val iob110pct = sot.getAbsoluteIOBTempBasals(now)
Assert.assertEquals(1.1, iob110pct.iob / iob100pct.iob, 0.0001)
}
diff --git a/core/src/main/java/info/nightscout/androidaps/db/StaticInjector.kt b/core/src/main/java/info/nightscout/androidaps/db/StaticInjector.kt
index 65a31bd812..6472410bf3 100644
--- a/core/src/main/java/info/nightscout/androidaps/db/StaticInjector.kt
+++ b/core/src/main/java/info/nightscout/androidaps/db/StaticInjector.kt
@@ -7,14 +7,13 @@ import javax.inject.Inject
import javax.inject.Singleton
@Singleton
-@Deprecated("Only until DB is refactored")
class StaticInjector @Inject constructor(
private val injector: HasAndroidInjector
) : HasAndroidInjector {
companion object {
- @Deprecated("Only until DB is refactored")
private var instance : StaticInjector? = null
+ @Deprecated("Only until DB is refactored")
fun getInstance() : StaticInjector {
if (instance == null) throw IllegalStateException("StaticInjector not initialized")
return instance!!
diff --git a/core/src/main/java/info/nightscout/androidaps/interfaces/DatabaseHelperInterface.kt b/core/src/main/java/info/nightscout/androidaps/interfaces/DatabaseHelperInterface.kt
index b7753c8f02..e24d0fc678 100644
--- a/core/src/main/java/info/nightscout/androidaps/interfaces/DatabaseHelperInterface.kt
+++ b/core/src/main/java/info/nightscout/androidaps/interfaces/DatabaseHelperInterface.kt
@@ -7,7 +7,6 @@ import info.nightscout.androidaps.db.DanaRHistoryRecord
import info.nightscout.androidaps.db.DbRequest
import info.nightscout.androidaps.db.TDD
-@Deprecated("Remove with new DB")
interface DatabaseHelperInterface {
fun getAllBgreadingsDataFromTime(mills: Long, ascending: Boolean): List
diff --git a/dana/.gitignore b/dana/.gitignore
new file mode 100644
index 0000000000..796b96d1c4
--- /dev/null
+++ b/dana/.gitignore
@@ -0,0 +1 @@
+/build
diff --git a/dana/build.gradle b/dana/build.gradle
new file mode 100644
index 0000000000..1b83d2b2a2
--- /dev/null
+++ b/dana/build.gradle
@@ -0,0 +1,74 @@
+apply plugin: 'com.android.library'
+apply plugin: 'kotlin-android'
+apply plugin: 'kotlin-android-extensions'
+apply plugin: 'kotlin-kapt'
+
+android {
+ compileSdkVersion 28
+
+ defaultConfig {
+ minSdkVersion 23
+ targetSdkVersion 28
+ versionCode 1
+ versionName "1.0"
+
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
+ consumerProguardFiles 'consumer-rules.pro'
+ }
+
+ kotlinOptions {
+ jvmTarget = '1.8'
+ }
+
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
+ }
+ debug {
+ testCoverageEnabled(project.hasProperty('coverage'))
+ }
+ firebaseDisable {
+ System.setProperty("disableFirebase", "true")
+ ext.enableCrashlytics = false
+ }
+ }
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_1_8
+ targetCompatibility JavaVersion.VERSION_1_8
+ }
+}
+
+dependencies {
+ implementation project(':core')
+
+ implementation fileTree(dir: 'libs', include: ['*.jar'])
+ implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
+ implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
+ implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion"
+ implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesVersion"
+
+ implementation 'androidx.appcompat:appcompat:1.1.0'
+ implementation 'androidx.core:core-ktx:1.2.0'
+ implementation "androidx.preference:preference-ktx:1.1.1"
+ implementation "androidx.activity:activity:${activityVersion}"
+ implementation "androidx.activity:activity-ktx:${activityVersion}"
+
+ implementation "io.reactivex.rxjava2:rxandroid:2.1.1"
+
+ // Graphview cannot be upgraded
+ implementation "com.jjoe64:graphview:4.0.1"
+
+ implementation "com.joanzapata.iconify:android-iconify-fontawesome:2.2.2"
+
+ implementation "com.google.dagger:dagger-android:$dagger_version"
+ implementation "com.google.dagger:dagger-android-support:$dagger_version"
+ annotationProcessor "com.google.dagger:dagger-compiler:$dagger_version"
+ annotationProcessor "com.google.dagger:dagger-android-processor:$dagger_version"
+ kapt "com.google.dagger:dagger-android-processor:$dagger_version"
+ kapt "com.google.dagger:dagger-compiler:$dagger_version"
+
+ testImplementation 'junit:junit:4.13'
+ androidTestImplementation 'androidx.test.ext:junit:1.1.1'
+ androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
+}
diff --git a/dana/consumer-rules.pro b/dana/consumer-rules.pro
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/dana/proguard-rules.pro b/dana/proguard-rules.pro
new file mode 100644
index 0000000000..f1b424510d
--- /dev/null
+++ b/dana/proguard-rules.pro
@@ -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
diff --git a/dana/src/androidTest/java/info/nightscout/androidaps/dana/ExampleInstrumentedTest.kt b/dana/src/androidTest/java/info/nightscout/androidaps/dana/ExampleInstrumentedTest.kt
new file mode 100644
index 0000000000..92ec3b8644
--- /dev/null
+++ b/dana/src/androidTest/java/info/nightscout/androidaps/dana/ExampleInstrumentedTest.kt
@@ -0,0 +1,25 @@
+package info.nightscout.androidaps.dana
+
+import androidx.test.platform.app.InstrumentationRegistry
+import androidx.test.ext.junit.runners.AndroidJUnit4
+
+import org.junit.Test
+import org.junit.runner.RunWith
+
+import org.junit.Assert.*
+
+/**
+ * Instrumented test, which will execute on an Android device.
+ *
+ * See [testing documentation](http://d.android.com/tools/testing).
+ */
+@RunWith(AndroidJUnit4::class)
+class ExampleInstrumentedTest {
+
+ @Test
+ fun useAppContext() {
+ // Context of the app under test.
+ val appContext = InstrumentationRegistry.getInstrumentation().targetContext
+ assertEquals("info.nightscout.androidaps.dana.test", appContext.packageName)
+ }
+}
diff --git a/dana/src/main/AndroidManifest.xml b/dana/src/main/AndroidManifest.xml
new file mode 100644
index 0000000000..4701a95697
--- /dev/null
+++ b/dana/src/main/AndroidManifest.xml
@@ -0,0 +1,2 @@
+
diff --git a/dana/src/main/java/info/nightscout/androidaps/dana/DanaPumpInterface.kt b/dana/src/main/java/info/nightscout/androidaps/dana/DanaPumpInterface.kt
new file mode 100644
index 0000000000..56bbede985
--- /dev/null
+++ b/dana/src/main/java/info/nightscout/androidaps/dana/DanaPumpInterface.kt
@@ -0,0 +1,5 @@
+package info.nightscout.androidaps.dana
+
+interface DanaPumpInterface {
+ fun clearPairing()
+}
\ No newline at end of file
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/DanaRFragment.kt b/dana/src/main/java/info/nightscout/androidaps/dana/DanaRFragment.kt
similarity index 90%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/DanaRFragment.kt
rename to dana/src/main/java/info/nightscout/androidaps/dana/DanaRFragment.kt
index 7d3e561ec1..b71304dfaf 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/DanaRFragment.kt
+++ b/dana/src/main/java/info/nightscout/androidaps/dana/DanaRFragment.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaR
+package info.nightscout.androidaps.dana
import android.content.Intent
import android.os.Bundle
@@ -8,7 +8,7 @@ import android.view.View
import android.view.ViewGroup
import dagger.android.support.DaggerFragment
import info.nightscout.androidaps.activities.TDDStatsActivity
-import info.nightscout.androidaps.danars.R
+import info.nightscout.androidaps.dana.R
import info.nightscout.androidaps.dialogs.ProfileViewerDialog
import info.nightscout.androidaps.events.EventExtendedBolusChange
import info.nightscout.androidaps.events.EventInitializationChanged
@@ -21,10 +21,6 @@ import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag
import info.nightscout.androidaps.plugins.bus.RxBusWrapper
import info.nightscout.androidaps.plugins.pump.common.defs.PumpType
-import info.nightscout.androidaps.plugins.pump.danaR.activities.DanaRHistoryActivity
-import info.nightscout.androidaps.plugins.pump.danaR.activities.DanaRUserOptionsActivity
-import info.nightscout.androidaps.plugins.pump.danaR.events.EventDanaRNewStatus
-import info.nightscout.androidaps.plugins.pump.danaRS.DanaRSPlugin
import info.nightscout.androidaps.queue.events.EventQueueChanged
import info.nightscout.androidaps.utils.DateUtil
import info.nightscout.androidaps.utils.FabricPrivacy
@@ -45,7 +41,6 @@ class DanaRFragment : DaggerFragment() {
@Inject lateinit var fabricPrivacy: FabricPrivacy
@Inject lateinit var commandQueue: CommandQueueProvider
@Inject lateinit var activePlugin: ActivePluginProvider
- @Inject lateinit var danaRSPlugin: DanaRSPlugin
@Inject lateinit var danaRPump: DanaRPump
@Inject lateinit var resourceHelper: ResourceHelper
@Inject lateinit var sp: SP
@@ -74,7 +69,7 @@ class DanaRFragment : DaggerFragment() {
dana_pumpstatus.setBackgroundColor(resourceHelper.gc(R.color.colorInitializingBorder))
- danar_history.setOnClickListener { startActivity(Intent(context, DanaRHistoryActivity::class.java)) }
+ danar_history.setOnClickListener { startActivity(Intent(context, info.nightscout.androidaps.dana.activities.DanaRHistoryActivity::class.java)) }
danar_viewprofile.setOnClickListener {
val profile = danaRPump.createConvertedProfile()?.getDefaultProfile()
?: return@setOnClickListener
@@ -91,20 +86,17 @@ class DanaRFragment : DaggerFragment() {
pvd.show(childFragmentManager, "ProfileViewDialog")
}
danar_stats.setOnClickListener { startActivity(Intent(context, TDDStatsActivity::class.java)) }
- danar_user_options.setOnClickListener { startActivity(Intent(context, DanaRUserOptionsActivity::class.java)) }
+ danar_user_options.setOnClickListener { startActivity(Intent(context, info.nightscout.androidaps.dana.activities.DanaRUserOptionsActivity::class.java)) }
danar_btconnection.setOnClickListener {
aapsLogger.debug(LTag.PUMP, "Clicked connect to pump")
danaRPump.lastConnection = 0
commandQueue.readStatus("Clicked connect to pump", null)
}
- if (danaRSPlugin.isEnabled())
+ if (activePlugin.activePump.pumpDescription.pumpType == PumpType.DanaRS)
danar_btconnection.setOnLongClickListener {
activity?.let {
OKDialog.showConfirmation(it, resourceHelper.gs(R.string.resetpairing), Runnable {
- sp.remove(resourceHelper.gs(R.string.key_danars_pairingkey) + danaRSPlugin.mDeviceName)
- sp.remove(resourceHelper.gs(R.string.key_danars_v3_randompairingkey) + danaRSPlugin.mDeviceName)
- sp.remove(resourceHelper.gs(R.string.key_danars_v3_pairingkey) + danaRSPlugin.mDeviceName)
- sp.remove(resourceHelper.gs(R.string.key_danars_v3_randomsynckey) + danaRSPlugin.mDeviceName)
+ (activePlugin.activePump as DanaPumpInterface).clearPairing()
})
}
true
@@ -120,7 +112,7 @@ class DanaRFragment : DaggerFragment() {
.observeOn(AndroidSchedulers.mainThread())
.subscribe({ updateGUI() }, { fabricPrivacy.logException(it) })
disposable += rxBus
- .toObservable(EventDanaRNewStatus::class.java)
+ .toObservable(info.nightscout.androidaps.dana.events.EventDanaRNewStatus::class.java)
.observeOn(AndroidSchedulers.mainThread())
.subscribe({ updateGUI() }, { fabricPrivacy.logException(it) })
disposable += rxBus
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/DanaRPump.kt b/dana/src/main/java/info/nightscout/androidaps/dana/DanaRPump.kt
similarity index 99%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/DanaRPump.kt
rename to dana/src/main/java/info/nightscout/androidaps/dana/DanaRPump.kt
index e33ddb1dbc..519f713479 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/DanaRPump.kt
+++ b/dana/src/main/java/info/nightscout/androidaps/dana/DanaRPump.kt
@@ -1,8 +1,7 @@
-package info.nightscout.androidaps.plugins.pump.danaR
+package info.nightscout.androidaps.dana
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.Constants
-import info.nightscout.androidaps.danars.R
import info.nightscout.androidaps.data.Profile
import info.nightscout.androidaps.interfaces.ProfileStore
import info.nightscout.androidaps.logging.AAPSLogger
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/activities/DanaRHistoryActivity.kt b/dana/src/main/java/info/nightscout/androidaps/dana/activities/DanaRHistoryActivity.kt
similarity index 98%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/activities/DanaRHistoryActivity.kt
rename to dana/src/main/java/info/nightscout/androidaps/dana/activities/DanaRHistoryActivity.kt
index e9d69f3453..ef8d78b2f4 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/activities/DanaRHistoryActivity.kt
+++ b/dana/src/main/java/info/nightscout/androidaps/dana/activities/DanaRHistoryActivity.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaR.activities
+package info.nightscout.androidaps.dana.activities
import android.os.Bundle
import android.view.LayoutInflater
@@ -11,7 +11,8 @@ import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import info.nightscout.androidaps.Constants
import info.nightscout.androidaps.activities.NoSplashAppCompatActivity
-import info.nightscout.androidaps.danars.R
+import info.nightscout.androidaps.dana.R
+import info.nightscout.androidaps.dana.comm.RecordTypes
import info.nightscout.androidaps.data.Profile
import info.nightscout.androidaps.db.DanaRHistoryRecord
import info.nightscout.androidaps.events.EventPumpStatusChanged
@@ -23,7 +24,6 @@ import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag
import info.nightscout.androidaps.plugins.bus.RxBusWrapper
import info.nightscout.androidaps.plugins.pump.common.defs.PumpType
-import info.nightscout.androidaps.plugins.pump.danaR.comm.RecordTypes
import info.nightscout.androidaps.events.EventDanaRSyncStatus
import info.nightscout.androidaps.queue.Callback
import info.nightscout.androidaps.utils.DateUtil
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/activities/DanaRUserOptionsActivity.kt b/dana/src/main/java/info/nightscout/androidaps/dana/activities/DanaRUserOptionsActivity.kt
similarity index 97%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/activities/DanaRUserOptionsActivity.kt
rename to dana/src/main/java/info/nightscout/androidaps/dana/activities/DanaRUserOptionsActivity.kt
index 2d081c403f..42f101283d 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/activities/DanaRUserOptionsActivity.kt
+++ b/dana/src/main/java/info/nightscout/androidaps/dana/activities/DanaRUserOptionsActivity.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaR.activities
+package info.nightscout.androidaps.dana.activities
import android.content.Context
import android.content.Intent
@@ -6,7 +6,8 @@ import android.os.Bundle
import info.nightscout.androidaps.Constants
import info.nightscout.androidaps.activities.ErrorHelperActivity
import info.nightscout.androidaps.activities.NoSplashAppCompatActivity
-import info.nightscout.androidaps.danars.R
+import info.nightscout.androidaps.dana.DanaRPump
+import info.nightscout.androidaps.dana.R
import info.nightscout.androidaps.events.EventInitializationChanged
import info.nightscout.androidaps.interfaces.ActivePluginProvider
import info.nightscout.androidaps.interfaces.CommandQueueProvider
@@ -14,7 +15,6 @@ import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag
import info.nightscout.androidaps.plugins.bus.RxBusWrapper
import info.nightscout.androidaps.plugins.pump.common.defs.PumpType
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
import info.nightscout.androidaps.queue.Callback
import info.nightscout.androidaps.utils.FabricPrivacy
import info.nightscout.androidaps.utils.extensions.plusAssign
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/RecordTypes.kt b/dana/src/main/java/info/nightscout/androidaps/dana/comm/RecordTypes.kt
similarity index 91%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/RecordTypes.kt
rename to dana/src/main/java/info/nightscout/androidaps/dana/comm/RecordTypes.kt
index 74d594dc71..30ba45483e 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/comm/RecordTypes.kt
+++ b/dana/src/main/java/info/nightscout/androidaps/dana/comm/RecordTypes.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaR.comm
+package info.nightscout.androidaps.dana.comm
object RecordTypes {
const val RECORD_TYPE_BOLUS = 0x01.toByte()
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/events/EventDanaRNewStatus.kt b/dana/src/main/java/info/nightscout/androidaps/dana/events/EventDanaRNewStatus.kt
similarity index 58%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/events/EventDanaRNewStatus.kt
rename to dana/src/main/java/info/nightscout/androidaps/dana/events/EventDanaRNewStatus.kt
index 67b12d954c..f022e5b128 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaR/events/EventDanaRNewStatus.kt
+++ b/dana/src/main/java/info/nightscout/androidaps/dana/events/EventDanaRNewStatus.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaR.events
+package info.nightscout.androidaps.dana.events
import info.nightscout.androidaps.events.Event
diff --git a/danars/src/main/res/layout/danar_fragment.xml b/dana/src/main/res/layout/danar_fragment.xml
similarity index 100%
rename from danars/src/main/res/layout/danar_fragment.xml
rename to dana/src/main/res/layout/danar_fragment.xml
diff --git a/danars/src/main/res/layout/danar_history_item.xml b/dana/src/main/res/layout/danar_history_item.xml
similarity index 100%
rename from danars/src/main/res/layout/danar_history_item.xml
rename to dana/src/main/res/layout/danar_history_item.xml
diff --git a/danars/src/main/res/layout/danar_historyactivity.xml b/dana/src/main/res/layout/danar_historyactivity.xml
similarity index 100%
rename from danars/src/main/res/layout/danar_historyactivity.xml
rename to dana/src/main/res/layout/danar_historyactivity.xml
diff --git a/danars/src/main/res/layout/danar_user_options_activity.xml b/dana/src/main/res/layout/danar_user_options_activity.xml
similarity index 100%
rename from danars/src/main/res/layout/danar_user_options_activity.xml
rename to dana/src/main/res/layout/danar_user_options_activity.xml
diff --git a/danars/src/main/res/values/strings.xml b/dana/src/main/res/values/strings.xml
similarity index 100%
rename from danars/src/main/res/values/strings.xml
rename to dana/src/main/res/values/strings.xml
diff --git a/dana/src/test/java/info/nightscout/androidaps/dana/ExampleUnitTest.kt b/dana/src/test/java/info/nightscout/androidaps/dana/ExampleUnitTest.kt
new file mode 100644
index 0000000000..a85dae0d49
--- /dev/null
+++ b/dana/src/test/java/info/nightscout/androidaps/dana/ExampleUnitTest.kt
@@ -0,0 +1,18 @@
+package info.nightscout.androidaps.dana
+
+import org.junit.Test
+
+import org.junit.Assert.*
+
+/**
+ * Example local unit test, which will execute on the development machine (host).
+ *
+ * See [testing documentation](http://d.android.com/tools/testing).
+ */
+class ExampleUnitTest {
+
+ @Test
+ fun addition_isCorrect() {
+ assertEquals(4, 2 + 2)
+ }
+}
diff --git a/danars/build.gradle b/danars/build.gradle
index 42726eb8ab..f3831ea0cb 100644
--- a/danars/build.gradle
+++ b/danars/build.gradle
@@ -41,6 +41,7 @@ android {
dependencies {
implementation project(':core')
+ implementation project(':dana')
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
@@ -56,12 +57,10 @@ dependencies {
implementation "io.reactivex.rxjava2:rxandroid:2.1.1"
- implementation 'net.danlew:android.joda:2.10.6'
-
// Graphview cannot be upgraded
implementation "com.jjoe64:graphview:4.0.1"
- implementation "com.joanzapata.iconify:android-iconify-fontawesome:2.2.2"
+ implementation 'net.danlew:android.joda:2.10.6'
implementation "com.google.dagger:dagger-android:$dagger_version"
implementation "com.google.dagger:dagger-android-support:$dagger_version"
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/DanaRSPlugin.kt b/danars/src/main/java/info/nightscout/androidaps/danars/DanaRSPlugin.kt
similarity index 96%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/DanaRSPlugin.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/DanaRSPlugin.kt
index 92e5550afa..7a118ffdc6 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/DanaRSPlugin.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/DanaRSPlugin.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS
+package info.nightscout.androidaps.danars
import android.content.ComponentName
import android.content.Context
@@ -8,7 +8,9 @@ import android.os.IBinder
import android.text.format.DateFormat
import androidx.preference.Preference
import dagger.android.HasAndroidInjector
-import info.nightscout.androidaps.danars.R
+import info.nightscout.androidaps.dana.DanaPumpInterface
+import info.nightscout.androidaps.danars.events.EventDanaRSDeviceChange
+import info.nightscout.androidaps.danars.services.DanaRSService
import info.nightscout.androidaps.data.DetailedBolusInfo
import info.nightscout.androidaps.data.Profile
import info.nightscout.androidaps.data.PumpEnactResult
@@ -28,11 +30,6 @@ import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotifi
import info.nightscout.androidaps.plugins.general.overview.notifications.Notification
import info.nightscout.androidaps.plugins.pump.common.bolusInfo.DetailedBolusInfoStorage
import info.nightscout.androidaps.plugins.pump.common.defs.PumpType
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRFragment
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
-import info.nightscout.androidaps.plugins.pump.danaR.comm.RecordTypes
-import info.nightscout.androidaps.plugins.pump.danaRS.events.EventDanaRSDeviceChange
-import info.nightscout.androidaps.plugins.pump.danaRS.services.DanaRSService
import info.nightscout.androidaps.utils.*
import info.nightscout.androidaps.utils.resources.ResourceHelper
import info.nightscout.androidaps.utils.sharedPreferences.SP
@@ -57,20 +54,20 @@ class DanaRSPlugin @Inject constructor(
private val activePluginProvider: ActivePluginProvider,
private val sp: SP,
commandQueue: CommandQueueProvider,
- private val danaRPump: DanaRPump,
+ private val danaRPump: info.nightscout.androidaps.dana.DanaRPump,
private val detailedBolusInfoStorage: DetailedBolusInfoStorage,
private val fabricPrivacy: FabricPrivacy,
private val dateUtil: DateUtil,
private val config: ConfigInterface
) : PumpPluginBase(PluginDescription()
.mainType(PluginType.PUMP)
- .fragmentClass(DanaRFragment::class.java.name)
+ .fragmentClass(info.nightscout.androidaps.dana.DanaRFragment::class.java.name)
.pluginName(R.string.danarspump)
.shortName(R.string.danarspump_shortname)
.preferencesId(R.xml.pref_danars)
.description(R.string.description_pump_dana_rs),
injector, aapsLogger, resourceHelper, commandQueue
-), PumpInterface, DanaRInterface, ConstraintsInterface {
+), PumpInterface, DanaRInterface, ConstraintsInterface, DanaPumpInterface {
private val disposable = CompositeDisposable()
private var danaRSService: DanaRSService? = null
@@ -652,9 +649,15 @@ class DanaRSPlugin @Inject constructor(
}
override fun isFakingTempsByExtendedBoluses(): Boolean = false
- override fun loadTDDs(): PumpEnactResult = loadHistory(RecordTypes.RECORD_TYPE_DAILY)
+ override fun loadTDDs(): PumpEnactResult = loadHistory(info.nightscout.androidaps.dana.comm.RecordTypes.RECORD_TYPE_DAILY)
override fun getCustomActions(): List? = null
override fun executeCustomAction(customActionType: CustomActionType) {}
override fun canHandleDST(): Boolean = false
override fun timezoneOrDSTChanged(timeChangeType: TimeChangeType?) {}
+ override fun clearPairing() {
+ sp.remove(resourceHelper.gs(R.string.key_danars_pairingkey) + mDeviceName)
+ sp.remove(resourceHelper.gs(R.string.key_danars_v3_randompairingkey) + mDeviceName)
+ sp.remove(resourceHelper.gs(R.string.key_danars_v3_pairingkey) + mDeviceName)
+ sp.remove(resourceHelper.gs(R.string.key_danars_v3_randomsynckey) + mDeviceName)
+ }
}
\ No newline at end of file
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/activities/BLEScanActivity.kt b/danars/src/main/java/info/nightscout/androidaps/danars/activities/BLEScanActivity.kt
similarity index 97%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/activities/BLEScanActivity.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/activities/BLEScanActivity.kt
index 79024ca402..f49ee80376 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/activities/BLEScanActivity.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/activities/BLEScanActivity.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.activities
+package info.nightscout.androidaps.danars.activities
import android.annotation.SuppressLint
import android.bluetooth.BluetoothAdapter
@@ -17,7 +17,7 @@ import info.nightscout.androidaps.activities.NoSplashAppCompatActivity
import info.nightscout.androidaps.danars.R
import info.nightscout.androidaps.plugins.bus.RxBusWrapper
import info.nightscout.androidaps.plugins.pump.common.ble.BlePreCheck
-import info.nightscout.androidaps.plugins.pump.danaRS.events.EventDanaRSDeviceChange
+import info.nightscout.androidaps.danars.events.EventDanaRSDeviceChange
import info.nightscout.androidaps.utils.sharedPreferences.SP
import kotlinx.android.synthetic.main.danars_blescanner_activity.*
import java.util.*
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/activities/EnterPinActivity.kt b/danars/src/main/java/info/nightscout/androidaps/danars/activities/EnterPinActivity.kt
similarity index 95%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/activities/EnterPinActivity.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/activities/EnterPinActivity.kt
index 2c25053da2..ac97ce50a3 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/activities/EnterPinActivity.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/activities/EnterPinActivity.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.activities
+package info.nightscout.androidaps.danars.activities
import android.os.Bundle
import android.util.Base64
@@ -6,8 +6,8 @@ import info.nightscout.androidaps.activities.NoSplashAppCompatActivity
import info.nightscout.androidaps.danars.R
import info.nightscout.androidaps.events.EventPumpStatusChanged
import info.nightscout.androidaps.plugins.bus.RxBusWrapper
-import info.nightscout.androidaps.plugins.pump.danaRS.DanaRSPlugin
-import info.nightscout.androidaps.plugins.pump.danaRS.services.BLEComm
+import info.nightscout.androidaps.danars.DanaRSPlugin
+import info.nightscout.androidaps.danars.services.BLEComm
import info.nightscout.androidaps.utils.FabricPrivacy
import info.nightscout.androidaps.utils.alertDialogs.OKDialog
import info.nightscout.androidaps.utils.extensions.hexStringToByteArray
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/activities/PairingHelperActivity.kt b/danars/src/main/java/info/nightscout/androidaps/danars/activities/PairingHelperActivity.kt
similarity index 85%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/activities/PairingHelperActivity.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/activities/PairingHelperActivity.kt
index 5a2ab565ae..c7f5efc3a5 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/activities/PairingHelperActivity.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/activities/PairingHelperActivity.kt
@@ -1,11 +1,11 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.activities
+package info.nightscout.androidaps.danars.activities
import android.annotation.SuppressLint
import android.content.Intent
import android.content.pm.ActivityInfo
import android.os.Bundle
import info.nightscout.androidaps.activities.NoSplashAppCompatActivity
-import info.nightscout.androidaps.plugins.pump.danaRS.dialogs.PairingProgressDialog
+import info.nightscout.androidaps.danars.dialogs.PairingProgressDialog
class PairingHelperActivity : NoSplashAppCompatActivity() {
var dialog: PairingProgressDialog? = null
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRSMessageHashTable.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSMessageHashTable.kt
similarity index 98%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRSMessageHashTable.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSMessageHashTable.kt
index fea80dc506..9280187622 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRSMessageHashTable.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRSMessageHashTable.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import java.util.*
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet.java b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet.java
similarity index 96%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet.java
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet.java
index 245081e064..619700d90b 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet.java
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet.java
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm;
+package info.nightscout.androidaps.danars.comm;
import android.annotation.TargetApi;
import android.os.Build;
@@ -9,9 +9,9 @@ import java.util.Date;
import javax.inject.Inject;
import dagger.android.HasAndroidInjector;
+import info.nightscout.androidaps.danars.encryption.BleEncryption;
import info.nightscout.androidaps.logging.AAPSLogger;
import info.nightscout.androidaps.logging.LTag;
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption;
import info.nightscout.androidaps.utils.DateUtil;
public class DanaRS_Packet {
@@ -21,8 +21,8 @@ public class DanaRS_Packet {
protected HasAndroidInjector injector;
- protected static final int TYPE_START = 0;
- protected static final int OPCODE_START = 1;
+ private static final int TYPE_START = 0;
+ private static final int OPCODE_START = 1;
public static final int DATA_START = 2;
private boolean received;
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_APS_Basal_Set_Temporary_Basal.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_APS_Basal_Set_Temporary_Basal.kt
similarity index 93%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_APS_Basal_Set_Temporary_Basal.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_APS_Basal_Set_Temporary_Basal.kt
index bfcfeac676..ab1649f380 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_APS_Basal_Set_Temporary_Basal.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_APS_Basal_Set_Temporary_Basal.kt
@@ -1,8 +1,8 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.danars.encryption.BleEncryption
class DanaRS_Packet_APS_Basal_Set_Temporary_Basal(
injector: HasAndroidInjector,
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_APS_History_Events.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_APS_History_Events.kt
similarity index 88%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_APS_History_Events.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_APS_History_Events.kt
index 3fb7d1fd21..28e3116233 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_APS_History_Events.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_APS_History_Events.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.danars.R
@@ -13,8 +13,8 @@ import info.nightscout.androidaps.logging.LTag
import info.nightscout.androidaps.plugins.bus.RxBusWrapper
import info.nightscout.androidaps.plugins.general.nsclient.NSUpload
import info.nightscout.androidaps.plugins.pump.common.bolusInfo.DetailedBolusInfoStorage
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.dana.DanaRPump
+import info.nightscout.androidaps.danars.encryption.BleEncryption
import info.nightscout.androidaps.utils.DateUtil
import info.nightscout.androidaps.utils.resources.ResourceHelper
import info.nightscout.androidaps.utils.sharedPreferences.SP
@@ -29,7 +29,7 @@ open class DanaRS_Packet_APS_History_Events(
@Inject lateinit var rxBus: RxBusWrapper
@Inject lateinit var resourceHelper: ResourceHelper
@Inject lateinit var activePlugin: ActivePluginProvider
- @Inject lateinit var danaRPump: DanaRPump
+ @Inject lateinit var danaRPump: info.nightscout.androidaps.dana.DanaRPump
@Inject lateinit var detailedBolusInfoStorage: DetailedBolusInfoStorage
@Inject lateinit var sp: SP
@Inject lateinit var nsUpload: NSUpload
@@ -85,7 +85,7 @@ open class DanaRS_Packet_APS_History_Events(
val extendedBolus = ExtendedBolus(injector).date(datetime).source(Source.PUMP).pumpId(datetime)
val status: String
when (recordCode.toInt()) {
- DanaRPump.TEMPSTART -> {
+ info.nightscout.androidaps.dana.DanaRPump.TEMPSTART -> {
aapsLogger.debug(LTag.PUMPCOMM, "EVENT TEMPSTART (" + recordCode + ") " + dateUtil.dateAndTimeString(datetime) + " (" + datetime + ")" + " Ratio: " + param1 + "% Duration: " + param2 + "min")
temporaryBasal.percentRate = param1
temporaryBasal.durationInMinutes = param2
@@ -93,13 +93,13 @@ open class DanaRS_Packet_APS_History_Events(
status = "TEMPSTART " + dateUtil.timeString(datetime)
}
- DanaRPump.TEMPSTOP -> {
+ info.nightscout.androidaps.dana.DanaRPump.TEMPSTOP -> {
aapsLogger.debug(LTag.PUMPCOMM, "EVENT TEMPSTOP (" + recordCode + ") " + dateUtil.dateAndTimeString(datetime))
activePlugin.activeTreatments.addToHistoryTempBasal(temporaryBasal)
status = "TEMPSTOP " + dateUtil.timeString(datetime)
}
- DanaRPump.EXTENDEDSTART -> {
+ info.nightscout.androidaps.dana.DanaRPump.EXTENDEDSTART -> {
aapsLogger.debug(LTag.PUMPCOMM, "EVENT EXTENDEDSTART (" + recordCode + ") " + dateUtil.dateAndTimeString(datetime) + " (" + datetime + ")" + " Amount: " + param1 / 100.0 + "U Duration: " + param2 + "min")
extendedBolus.insulin = param1 / 100.0
extendedBolus.durationInMinutes = param2
@@ -107,13 +107,13 @@ open class DanaRS_Packet_APS_History_Events(
status = "EXTENDEDSTART " + dateUtil.timeString(datetime)
}
- DanaRPump.EXTENDEDSTOP -> {
+ info.nightscout.androidaps.dana.DanaRPump.EXTENDEDSTOP -> {
aapsLogger.debug(LTag.PUMPCOMM, "EVENT EXTENDEDSTOP (" + recordCode + ") " + dateUtil.dateAndTimeString(datetime) + " (" + datetime + ")" + " Delivered: " + param1 / 100.0 + "U RealDuration: " + param2 + "min")
activePlugin.activeTreatments.addToHistoryExtendedBolus(extendedBolus)
status = "EXTENDEDSTOP " + dateUtil.timeString(datetime)
}
- DanaRPump.BOLUS -> {
+ info.nightscout.androidaps.dana.DanaRPump.BOLUS -> {
val detailedBolusInfo = detailedBolusInfoStorage.findDetailedBolusInfo(datetime, param1 / 100.0)
?: DetailedBolusInfo()
detailedBolusInfo.date = datetime
@@ -125,7 +125,7 @@ open class DanaRS_Packet_APS_History_Events(
status = "BOLUS " + dateUtil.timeString(datetime)
}
- DanaRPump.DUALBOLUS -> {
+ info.nightscout.androidaps.dana.DanaRPump.DUALBOLUS -> {
val detailedBolusInfo = detailedBolusInfoStorage.findDetailedBolusInfo(datetime, param1 / 100.0)
?: DetailedBolusInfo()
detailedBolusInfo.date = datetime
@@ -137,7 +137,7 @@ open class DanaRS_Packet_APS_History_Events(
status = "DUALBOLUS " + dateUtil.timeString(datetime)
}
- DanaRPump.DUALEXTENDEDSTART -> {
+ info.nightscout.androidaps.dana.DanaRPump.DUALEXTENDEDSTART -> {
aapsLogger.debug(LTag.PUMPCOMM, "EVENT DUALEXTENDEDSTART (" + recordCode + ") " + dateUtil.dateAndTimeString(datetime) + " (" + datetime + ")" + " Amount: " + param1 / 100.0 + "U Duration: " + param2 + "min")
extendedBolus.insulin = param1 / 100.0
extendedBolus.durationInMinutes = param2
@@ -145,42 +145,42 @@ open class DanaRS_Packet_APS_History_Events(
status = "DUALEXTENDEDSTART " + dateUtil.timeString(datetime)
}
- DanaRPump.DUALEXTENDEDSTOP -> {
+ info.nightscout.androidaps.dana.DanaRPump.DUALEXTENDEDSTOP -> {
aapsLogger.debug(LTag.PUMPCOMM, "EVENT DUALEXTENDEDSTOP (" + recordCode + ") " + dateUtil.dateAndTimeString(datetime) + " (" + datetime + ")" + " Delivered: " + param1 / 100.0 + "U RealDuration: " + param2 + "min")
activePlugin.activeTreatments.addToHistoryExtendedBolus(extendedBolus)
status = "DUALEXTENDEDSTOP " + dateUtil.timeString(datetime)
}
- DanaRPump.SUSPENDON -> {
+ info.nightscout.androidaps.dana.DanaRPump.SUSPENDON -> {
aapsLogger.debug(LTag.PUMPCOMM, "EVENT SUSPENDON (" + recordCode + ") " + dateUtil.dateAndTimeString(datetime) + " (" + datetime + ")")
status = "SUSPENDON " + dateUtil.timeString(datetime)
}
- DanaRPump.SUSPENDOFF -> {
+ info.nightscout.androidaps.dana.DanaRPump.SUSPENDOFF -> {
aapsLogger.debug(LTag.PUMPCOMM, "EVENT SUSPENDOFF (" + recordCode + ") " + dateUtil.dateAndTimeString(datetime) + " (" + datetime + ")")
status = "SUSPENDOFF " + dateUtil.timeString(datetime)
}
- DanaRPump.REFILL -> {
+ info.nightscout.androidaps.dana.DanaRPump.REFILL -> {
aapsLogger.debug(LTag.PUMPCOMM, "EVENT REFILL (" + recordCode + ") " + dateUtil.dateAndTimeString(datetime) + " (" + datetime + ")" + " Amount: " + param1 / 100.0 + "U")
if (sp.getBoolean(R.string.key_rs_loginsulinchange, true))
nsUpload.generateCareportalEvent(CareportalEvent.INSULINCHANGE, datetime, resourceHelper.gs(R.string.danarspump))
status = "REFILL " + dateUtil.timeString(datetime)
}
- DanaRPump.PRIME -> {
+ info.nightscout.androidaps.dana.DanaRPump.PRIME -> {
aapsLogger.debug(LTag.PUMPCOMM, "EVENT PRIME (" + recordCode + ") " + dateUtil.dateAndTimeString(datetime) + " (" + datetime + ")" + " Amount: " + param1 / 100.0 + "U")
if (sp.getBoolean(R.string.key_rs_logcanulachange, true))
nsUpload.generateCareportalEvent(CareportalEvent.SITECHANGE, datetime, resourceHelper.gs(R.string.danarspump))
status = "PRIME " + dateUtil.timeString(datetime)
}
- DanaRPump.PROFILECHANGE -> {
+ info.nightscout.androidaps.dana.DanaRPump.PROFILECHANGE -> {
aapsLogger.debug(LTag.PUMPCOMM, "EVENT PROFILECHANGE (" + recordCode + ") " + dateUtil.dateAndTimeString(datetime) + " (" + datetime + ")" + " No: " + param1 + " CurrentRate: " + param2 / 100.0 + "U/h")
status = "PROFILECHANGE " + dateUtil.timeString(datetime)
}
- DanaRPump.CARBS -> {
+ info.nightscout.androidaps.dana.DanaRPump.CARBS -> {
val emptyCarbsInfo = DetailedBolusInfo()
emptyCarbsInfo.carbs = param1.toDouble()
emptyCarbsInfo.date = datetime
@@ -191,12 +191,12 @@ open class DanaRS_Packet_APS_History_Events(
status = "CARBS " + dateUtil.timeString(datetime)
}
- DanaRPump.PRIMECANNULA -> {
+ info.nightscout.androidaps.dana.DanaRPump.PRIMECANNULA -> {
aapsLogger.debug(LTag.PUMPCOMM, "EVENT PRIMECANNULA(" + recordCode + ") " + dateUtil.dateAndTimeString(datetime) + " (" + datetime + ")" + " Amount: " + param1 / 100.0 + "U")
status = "PRIMECANNULA " + dateUtil.timeString(datetime)
}
- else -> {
+ else -> {
aapsLogger.debug(LTag.PUMPCOMM, "Event: " + recordCode + " " + dateUtil.dateAndTimeString(datetime) + " (" + datetime + ")" + " Param1: " + param1 + " Param2: " + param2)
status = "UNKNOWN " + dateUtil.timeString(datetime)
}
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_APS_Set_Event_History.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_APS_Set_Event_History.kt
similarity index 87%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_APS_Set_Event_History.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_APS_Set_Event_History.kt
index 71c0b8887c..bb9f14dd32 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_APS_Set_Event_History.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_APS_Set_Event_History.kt
@@ -1,9 +1,9 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.dana.DanaRPump
+import info.nightscout.androidaps.danars.encryption.BleEncryption
import java.util.*
class DanaRS_Packet_APS_Set_Event_History(
@@ -16,7 +16,7 @@ class DanaRS_Packet_APS_Set_Event_History(
init {
opCode = BleEncryption.DANAR_PACKET__OPCODE__APS_SET_EVENT_HISTORY
- if ((packetType == DanaRPump.CARBS || packetType == DanaRPump.BOLUS) && param1 <= 0) this.param1 = 0
+ if ((packetType == info.nightscout.androidaps.dana.DanaRPump.CARBS || packetType == info.nightscout.androidaps.dana.DanaRPump.BOLUS) && param1 <= 0) this.param1 = 0
aapsLogger.debug(LTag.PUMPCOMM, "Set history entry: " + dateUtil.dateAndTimeString(time) + " type: " + packetType + " param1: " + param1 + " param2: " + param2)
}
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Get_Basal_Rate.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Get_Basal_Rate.kt
similarity index 90%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Get_Basal_Rate.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Get_Basal_Rate.kt
index 76dde13995..ba9d4c9741 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Get_Basal_Rate.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Get_Basal_Rate.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.danars.R
@@ -7,8 +7,8 @@ import info.nightscout.androidaps.plugins.bus.RxBusWrapper
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.notifications.Notification
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.dana.DanaRPump
+import info.nightscout.androidaps.danars.encryption.BleEncryption
import info.nightscout.androidaps.utils.resources.ResourceHelper
import java.util.*
import javax.inject.Inject
@@ -19,7 +19,7 @@ class DanaRS_Packet_Basal_Get_Basal_Rate(
@Inject lateinit var rxBus: RxBusWrapper
@Inject lateinit var resourceHelper: ResourceHelper
- @Inject lateinit var danaRPump: DanaRPump
+ @Inject lateinit var danaRPump: info.nightscout.androidaps.dana.DanaRPump
init {
opCode = BleEncryption.DANAR_PACKET__OPCODE_BASAL__GET_BASAL_RATE
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Get_Profile_Basal_Rate.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Get_Profile_Basal_Rate.kt
similarity index 84%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Get_Profile_Basal_Rate.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Get_Profile_Basal_Rate.kt
index bbac168239..02c0f97982 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Get_Profile_Basal_Rate.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Get_Profile_Basal_Rate.kt
@@ -1,9 +1,9 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.dana.DanaRPump
+import info.nightscout.androidaps.danars.encryption.BleEncryption
import java.util.*
import javax.inject.Inject
@@ -12,7 +12,7 @@ open class DanaRS_Packet_Basal_Get_Profile_Basal_Rate(
private val profileNumber: Int = 0
) : DanaRS_Packet(injector) {
- @Inject lateinit var danaRPump: DanaRPump
+ @Inject lateinit var danaRPump: info.nightscout.androidaps.dana.DanaRPump
init {
opCode = BleEncryption.DANAR_PACKET__OPCODE_BASAL__GET_PROFILE_BASAL_RATE
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Get_Profile_Number.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Get_Profile_Number.kt
similarity index 74%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Get_Profile_Number.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Get_Profile_Number.kt
index c973a5aa11..9800c8a685 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Get_Profile_Number.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Get_Profile_Number.kt
@@ -1,16 +1,16 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.dana.DanaRPump
+import info.nightscout.androidaps.danars.encryption.BleEncryption
import javax.inject.Inject
class DanaRS_Packet_Basal_Get_Profile_Number(
injector: HasAndroidInjector
) : DanaRS_Packet(injector) {
- @Inject lateinit var danaRPump: DanaRPump
+ @Inject lateinit var danaRPump: info.nightscout.androidaps.dana.DanaRPump
init {
opCode = BleEncryption.DANAR_PACKET__OPCODE_BASAL__GET_PROFILE_NUMBER
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Get_Temporary_Basal_State.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Get_Temporary_Basal_State.kt
similarity index 90%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Get_Temporary_Basal_State.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Get_Temporary_Basal_State.kt
index b807d0dc8a..19bb45c5dc 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Get_Temporary_Basal_State.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Get_Temporary_Basal_State.kt
@@ -1,9 +1,9 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.dana.DanaRPump
+import info.nightscout.androidaps.danars.encryption.BleEncryption
import javax.inject.Inject
import kotlin.math.ceil
@@ -11,7 +11,7 @@ class DanaRS_Packet_Basal_Get_Temporary_Basal_State(
injector: HasAndroidInjector
) : DanaRS_Packet(injector) {
- @Inject lateinit var danaRPump: DanaRPump
+ @Inject lateinit var danaRPump: info.nightscout.androidaps.dana.DanaRPump
init {
opCode = BleEncryption.DANAR_PACKET__OPCODE_BASAL__TEMPORARY_BASAL_STATE
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Set_Basal_Rate.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Set_Basal_Rate.kt
similarity index 89%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Set_Basal_Rate.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Set_Basal_Rate.kt
index f16bc7c0cf..de96fb2c4d 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Set_Basal_Rate.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Set_Basal_Rate.kt
@@ -1,8 +1,8 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.danars.encryption.BleEncryption
class DanaRS_Packet_Basal_Set_Basal_Rate(
injector: HasAndroidInjector,
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Set_Cancel_Temporary_Basal.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Set_Cancel_Temporary_Basal.kt
similarity index 85%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Set_Cancel_Temporary_Basal.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Set_Cancel_Temporary_Basal.kt
index c7fa4c3536..e20f2ba80e 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Set_Cancel_Temporary_Basal.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Set_Cancel_Temporary_Basal.kt
@@ -1,8 +1,8 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.danars.encryption.BleEncryption
class DanaRS_Packet_Basal_Set_Cancel_Temporary_Basal(
injector: HasAndroidInjector
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Set_Profile_Basal_Rate.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Set_Profile_Basal_Rate.kt
similarity index 90%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Set_Profile_Basal_Rate.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Set_Profile_Basal_Rate.kt
index ddf0adba78..6d397ca86f 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Set_Profile_Basal_Rate.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Set_Profile_Basal_Rate.kt
@@ -1,8 +1,8 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.danars.encryption.BleEncryption
class DanaRS_Packet_Basal_Set_Profile_Basal_Rate(
injector: HasAndroidInjector,
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Set_Profile_Number.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Set_Profile_Number.kt
similarity index 87%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Set_Profile_Number.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Set_Profile_Number.kt
index 7c0994196b..2f88623296 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Set_Profile_Number.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Set_Profile_Number.kt
@@ -1,8 +1,8 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.danars.encryption.BleEncryption
class DanaRS_Packet_Basal_Set_Profile_Number(
injector: HasAndroidInjector,
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Set_Suspend_Off.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Set_Suspend_Off.kt
similarity index 84%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Set_Suspend_Off.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Set_Suspend_Off.kt
index 3608ee30ca..cdd3b83f2c 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Set_Suspend_Off.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Set_Suspend_Off.kt
@@ -1,8 +1,8 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.danars.encryption.BleEncryption
class DanaRS_Packet_Basal_Set_Suspend_Off(
injector: HasAndroidInjector
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Set_Suspend_On.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Set_Suspend_On.kt
similarity index 84%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Set_Suspend_On.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Set_Suspend_On.kt
index df5bee1aac..6d0cb88052 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Set_Suspend_On.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Set_Suspend_On.kt
@@ -1,8 +1,8 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.danars.encryption.BleEncryption
class DanaRS_Packet_Basal_Set_Suspend_On(
injector: HasAndroidInjector
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Set_Temporary_Basal.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Set_Temporary_Basal.kt
similarity index 89%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Set_Temporary_Basal.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Set_Temporary_Basal.kt
index cbd91aa051..3e5725694f 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Basal_Set_Temporary_Basal.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Basal_Set_Temporary_Basal.kt
@@ -1,8 +1,8 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.danars.encryption.BleEncryption
open class DanaRS_Packet_Basal_Set_Temporary_Basal(
injector: HasAndroidInjector,
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Bolus_Option.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Bolus_Option.kt
similarity index 95%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Bolus_Option.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Bolus_Option.kt
index 9b8c9fb199..ec51a4d4a9 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Bolus_Option.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Bolus_Option.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.danars.R
@@ -7,8 +7,8 @@ import info.nightscout.androidaps.plugins.bus.RxBusWrapper
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.notifications.Notification
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.dana.DanaRPump
+import info.nightscout.androidaps.danars.encryption.BleEncryption
import info.nightscout.androidaps.utils.resources.ResourceHelper
import javax.inject.Inject
@@ -18,7 +18,7 @@ class DanaRS_Packet_Bolus_Get_Bolus_Option(
@Inject lateinit var rxBus: RxBusWrapper
@Inject lateinit var resourceHelper: ResourceHelper
- @Inject lateinit var danaRPump: DanaRPump
+ @Inject lateinit var danaRPump: info.nightscout.androidaps.dana.DanaRPump
init {
opCode = BleEncryption.DANAR_PACKET__OPCODE_BOLUS__GET_BOLUS_OPTION
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_CIR_CF_Array.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_CIR_CF_Array.kt
similarity index 92%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_CIR_CF_Array.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_CIR_CF_Array.kt
index 4af5c48fac..19591e2b7a 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_CIR_CF_Array.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_CIR_CF_Array.kt
@@ -1,16 +1,16 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.dana.DanaRPump
+import info.nightscout.androidaps.danars.encryption.BleEncryption
import javax.inject.Inject
class DanaRS_Packet_Bolus_Get_CIR_CF_Array(
injector: HasAndroidInjector
) : DanaRS_Packet(injector) {
- @Inject lateinit var danaRPump: DanaRPump
+ @Inject lateinit var danaRPump: info.nightscout.androidaps.dana.DanaRPump
init {
opCode = BleEncryption.DANAR_PACKET__OPCODE_BOLUS__GET_CIR_CF_ARRAY
@@ -48,7 +48,7 @@ class DanaRS_Packet_Bolus_Get_CIR_CF_Array(
val cf02: Double
val cf04: Double
val cf06: Double
- if (danaRPump.units == DanaRPump.UNITS_MGDL) {
+ if (danaRPump.units == info.nightscout.androidaps.dana.DanaRPump.UNITS_MGDL) {
dataIndex += dataSize
dataSize = 2
danaRPump.morningCF = byteArrayToInt(getBytes(data, dataIndex, dataSize)).toDouble()
@@ -95,7 +95,7 @@ class DanaRS_Packet_Bolus_Get_CIR_CF_Array(
}
if (danaRPump.units < 0 || danaRPump.units > 1) failed = true
aapsLogger.debug(LTag.PUMPCOMM, "Language: $language")
- aapsLogger.debug(LTag.PUMPCOMM, "Pump units: " + if (danaRPump.units == DanaRPump.UNITS_MGDL) "MGDL" else "MMOL")
+ aapsLogger.debug(LTag.PUMPCOMM, "Pump units: " + if (danaRPump.units == info.nightscout.androidaps.dana.DanaRPump.UNITS_MGDL) "MGDL" else "MMOL")
aapsLogger.debug(LTag.PUMPCOMM, "Current pump morning CIR: " + danaRPump.morningCIR)
aapsLogger.debug(LTag.PUMPCOMM, "Current pump morning CF: " + danaRPump.morningCF)
aapsLogger.debug(LTag.PUMPCOMM, "Current pump afternoon CIR: " + danaRPump.afternoonCIR)
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Calculation_Information.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Calculation_Information.kt
similarity index 85%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Calculation_Information.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Calculation_Information.kt
index 8f618bce4f..2512fcf342 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Calculation_Information.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Calculation_Information.kt
@@ -1,16 +1,16 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.dana.DanaRPump
+import info.nightscout.androidaps.danars.encryption.BleEncryption
import javax.inject.Inject
class DanaRS_Packet_Bolus_Get_Calculation_Information(
injector: HasAndroidInjector
) : DanaRS_Packet(injector) {
- @Inject lateinit var danaRPump: DanaRPump
+ @Inject lateinit var danaRPump: info.nightscout.androidaps.dana.DanaRPump
init {
opCode = BleEncryption.DANAR_PACKET__OPCODE_BOLUS__GET_CALCULATION_INFORMATION
@@ -42,14 +42,14 @@ class DanaRS_Packet_Bolus_Get_Calculation_Information(
dataIndex += dataSize
dataSize = 1
danaRPump.units = byteArrayToInt(getBytes(data, dataIndex, dataSize))
- if (danaRPump.units == DanaRPump.UNITS_MMOL) {
+ if (danaRPump.units == info.nightscout.androidaps.dana.DanaRPump.UNITS_MMOL) {
danaRPump.currentCF = danaRPump.currentCF / 100.0
danaRPump.currentTarget = danaRPump.currentTarget / 100.0
currentBG = currentBG / 100.0
}
if (error != 0) failed = true
aapsLogger.debug(LTag.PUMPCOMM, "Result: $error")
- aapsLogger.debug(LTag.PUMPCOMM, "Pump units: " + if (danaRPump.units == DanaRPump.UNITS_MGDL) "MGDL" else "MMOL")
+ aapsLogger.debug(LTag.PUMPCOMM, "Pump units: " + if (danaRPump.units == info.nightscout.androidaps.dana.DanaRPump.UNITS_MGDL) "MGDL" else "MMOL")
aapsLogger.debug(LTag.PUMPCOMM, "Current BG: $currentBG")
aapsLogger.debug(LTag.PUMPCOMM, "Carbs: $carbohydrate")
aapsLogger.debug(LTag.PUMPCOMM, "Current target: " + danaRPump.currentTarget)
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Carbohydrate_Calculation_Information.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Carbohydrate_Calculation_Information.kt
similarity index 83%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Carbohydrate_Calculation_Information.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Carbohydrate_Calculation_Information.kt
index ad7a5de3b7..28a0b9e661 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Carbohydrate_Calculation_Information.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Carbohydrate_Calculation_Information.kt
@@ -1,16 +1,16 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.dana.DanaRPump
+import info.nightscout.androidaps.danars.encryption.BleEncryption
import javax.inject.Inject
class DanaRS_Packet_Bolus_Get_Carbohydrate_Calculation_Information(
injector: HasAndroidInjector
) : DanaRS_Packet(injector) {
- @Inject lateinit var danaRPump: DanaRPump
+ @Inject lateinit var danaRPump: info.nightscout.androidaps.dana.DanaRPump
init {
opCode = BleEncryption.DANAR_PACKET__OPCODE_BOLUS__GET_CARBOHYDRATE_CALCULATION_INFORMATION
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Dual_Bolus.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Dual_Bolus.kt
similarity index 84%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Dual_Bolus.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Dual_Bolus.kt
index 8334d04028..e598818bdd 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Dual_Bolus.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Dual_Bolus.kt
@@ -1,16 +1,16 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.dana.DanaRPump
+import info.nightscout.androidaps.danars.encryption.BleEncryption
import javax.inject.Inject
class DanaRS_Packet_Bolus_Get_Dual_Bolus(
injector: HasAndroidInjector
) : DanaRS_Packet(injector) {
- @Inject lateinit var danaRPump: DanaRPump
+ @Inject lateinit var danaRPump: info.nightscout.androidaps.dana.DanaRPump
init {
opCode = BleEncryption.DANAR_PACKET__OPCODE_BOLUS__GET_DUAL_BOLUS
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Extended_Bolus.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Extended_Bolus.kt
similarity index 85%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Extended_Bolus.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Extended_Bolus.kt
index 4795b08482..0684e97bf0 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Extended_Bolus.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Extended_Bolus.kt
@@ -1,16 +1,16 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.dana.DanaRPump
+import info.nightscout.androidaps.danars.encryption.BleEncryption
import javax.inject.Inject
class DanaRS_Packet_Bolus_Get_Extended_Bolus(
injector: HasAndroidInjector
) : DanaRS_Packet(injector) {
- @Inject lateinit var danaRPump: DanaRPump
+ @Inject lateinit var danaRPump: info.nightscout.androidaps.dana.DanaRPump
init {
opCode = BleEncryption.DANAR_PACKET__OPCODE_BOLUS__GET_EXTENDED_BOLUS
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Extended_Bolus_State.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Extended_Bolus_State.kt
similarity index 89%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Extended_Bolus_State.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Extended_Bolus_State.kt
index ecf337987e..aa50fa1c81 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Extended_Bolus_State.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Extended_Bolus_State.kt
@@ -1,16 +1,16 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.dana.DanaRPump
+import info.nightscout.androidaps.danars.encryption.BleEncryption
import javax.inject.Inject
class DanaRS_Packet_Bolus_Get_Extended_Bolus_State(
injector: HasAndroidInjector
) : DanaRS_Packet(injector) {
- @Inject lateinit var danaRPump: DanaRPump
+ @Inject lateinit var danaRPump: info.nightscout.androidaps.dana.DanaRPump
init {
opCode = BleEncryption.DANAR_PACKET__OPCODE_BOLUS__GET_EXTENDED_BOLUS_STATE
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Extended_Menu_Option_State.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Extended_Menu_Option_State.kt
similarity index 79%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Extended_Menu_Option_State.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Extended_Menu_Option_State.kt
index 001107cfa2..cf75621379 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Extended_Menu_Option_State.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Extended_Menu_Option_State.kt
@@ -1,16 +1,16 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.dana.DanaRPump
+import info.nightscout.androidaps.danars.encryption.BleEncryption
import javax.inject.Inject
class DanaRS_Packet_Bolus_Get_Extended_Menu_Option_State(
injector: HasAndroidInjector
) : DanaRS_Packet(injector) {
- @Inject lateinit var danaRPump: DanaRPump
+ @Inject lateinit var danaRPump: info.nightscout.androidaps.dana.DanaRPump
init {
opCode = BleEncryption.DANAR_PACKET__OPCODE_BOLUS__GET_EXTENDED_MENU_OPTION_STATE
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Initial_Bolus.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Initial_Bolus.kt
similarity index 92%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Initial_Bolus.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Initial_Bolus.kt
index c301490a9f..3c58bc5175 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Initial_Bolus.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Initial_Bolus.kt
@@ -1,8 +1,8 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.danars.encryption.BleEncryption
class DanaRS_Packet_Bolus_Get_Initial_Bolus(
injector: HasAndroidInjector
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Step_Bolus_Information.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Step_Bolus_Information.kt
similarity index 87%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Step_Bolus_Information.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Step_Bolus_Information.kt
index 741cf38384..646d2858d4 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Get_Step_Bolus_Information.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Get_Step_Bolus_Information.kt
@@ -1,9 +1,9 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.dana.DanaRPump
+import info.nightscout.androidaps.danars.encryption.BleEncryption
import org.joda.time.DateTime
import javax.inject.Inject
@@ -11,7 +11,7 @@ class DanaRS_Packet_Bolus_Get_Step_Bolus_Information(
injector: HasAndroidInjector
) : DanaRS_Packet(injector) {
- @Inject lateinit var danaRPump: DanaRPump
+ @Inject lateinit var danaRPump: info.nightscout.androidaps.dana.DanaRPump
init {
opCode = BleEncryption.DANAR_PACKET__OPCODE_BOLUS__GET_STEP_BOLUS_INFORMATION
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_Bolus_Option.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Set_Bolus_Option.kt
similarity index 95%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_Bolus_Option.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Set_Bolus_Option.kt
index ebf19f1459..ac40d4ef56 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_Bolus_Option.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Set_Bolus_Option.kt
@@ -1,8 +1,8 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.danars.encryption.BleEncryption
class DanaRS_Packet_Bolus_Set_Bolus_Option(
injector: HasAndroidInjector,
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_CIR_CF_Array.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Set_CIR_CF_Array.kt
similarity index 95%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_CIR_CF_Array.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Set_CIR_CF_Array.kt
index cf2bfa44d1..783b874f4a 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_CIR_CF_Array.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Set_CIR_CF_Array.kt
@@ -1,8 +1,8 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.danars.encryption.BleEncryption
class DanaRS_Packet_Bolus_Set_CIR_CF_Array(
injector: HasAndroidInjector,
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_Dual_Bolus.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Set_Dual_Bolus.kt
similarity index 91%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_Dual_Bolus.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Set_Dual_Bolus.kt
index d9c18cb839..0f93dbf349 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_Dual_Bolus.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Set_Dual_Bolus.kt
@@ -1,8 +1,8 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.danars.encryption.BleEncryption
class DanaRS_Packet_Bolus_Set_Dual_Bolus(
injector: HasAndroidInjector,
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_Extended_Bolus.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Set_Extended_Bolus.kt
similarity index 90%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_Extended_Bolus.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Set_Extended_Bolus.kt
index 095f9f5080..749b72206c 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_Extended_Bolus.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Set_Extended_Bolus.kt
@@ -1,8 +1,8 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.danars.encryption.BleEncryption
class DanaRS_Packet_Bolus_Set_Extended_Bolus(
injector: HasAndroidInjector,
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_Extended_Bolus_Cancel.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Set_Extended_Bolus_Cancel.kt
similarity index 85%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_Extended_Bolus_Cancel.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Set_Extended_Bolus_Cancel.kt
index 4b36940aaf..7bc1cea154 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_Extended_Bolus_Cancel.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Set_Extended_Bolus_Cancel.kt
@@ -1,8 +1,8 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.danars.encryption.BleEncryption
class DanaRS_Packet_Bolus_Set_Extended_Bolus_Cancel(
injector: HasAndroidInjector
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_Initial_Bolus.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Set_Initial_Bolus.kt
similarity index 91%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_Initial_Bolus.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Set_Initial_Bolus.kt
index 0229c9434c..6b8278ac29 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_Initial_Bolus.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Set_Initial_Bolus.kt
@@ -1,8 +1,8 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.danars.encryption.BleEncryption
class DanaRS_Packet_Bolus_Set_Initial_Bolus(
injector: HasAndroidInjector,
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_Step_Bolus_Start.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Set_Step_Bolus_Start.kt
similarity index 87%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_Step_Bolus_Start.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Set_Step_Bolus_Start.kt
index 9dfc6016c7..01357331e1 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_Step_Bolus_Start.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Set_Step_Bolus_Start.kt
@@ -1,11 +1,11 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.interfaces.Constraint
import info.nightscout.androidaps.logging.LTag
import info.nightscout.androidaps.plugins.configBuilder.ConstraintChecker
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.dana.DanaRPump
+import info.nightscout.androidaps.danars.encryption.BleEncryption
import javax.inject.Inject
class DanaRS_Packet_Bolus_Set_Step_Bolus_Start(
@@ -14,7 +14,7 @@ class DanaRS_Packet_Bolus_Set_Step_Bolus_Start(
private var speed: Int = 0
) : DanaRS_Packet(injector) {
- @Inject lateinit var danaRPump: DanaRPump
+ @Inject lateinit var danaRPump: info.nightscout.androidaps.dana.DanaRPump
@Inject lateinit var constraintChecker: ConstraintChecker
init {
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_Step_Bolus_Stop.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Set_Step_Bolus_Stop.kt
similarity index 87%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_Step_Bolus_Stop.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Set_Step_Bolus_Stop.kt
index bb90a91c82..738caa4ed3 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Bolus_Set_Step_Bolus_Stop.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Bolus_Set_Step_Bolus_Stop.kt
@@ -1,12 +1,12 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.danars.R
import info.nightscout.androidaps.logging.LTag
import info.nightscout.androidaps.plugins.bus.RxBusWrapper
import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.dana.DanaRPump
+import info.nightscout.androidaps.danars.encryption.BleEncryption
import info.nightscout.androidaps.utils.resources.ResourceHelper
import javax.inject.Inject
@@ -16,7 +16,7 @@ open class DanaRS_Packet_Bolus_Set_Step_Bolus_Stop(
@Inject lateinit var rxBus: RxBusWrapper
@Inject lateinit var resourceHelper: ResourceHelper
- @Inject lateinit var danaRPump: DanaRPump
+ @Inject lateinit var danaRPump: info.nightscout.androidaps.dana.DanaRPump
init {
opCode = BleEncryption.DANAR_PACKET__OPCODE_BOLUS__SET_STEP_BOLUS_STOP
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Etc_Keep_Connection.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Etc_Keep_Connection.kt
similarity index 84%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Etc_Keep_Connection.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Etc_Keep_Connection.kt
index 89ae76b68e..0a5f5f10b4 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Etc_Keep_Connection.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Etc_Keep_Connection.kt
@@ -1,8 +1,8 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.danars.encryption.BleEncryption
class DanaRS_Packet_Etc_Keep_Connection(
injector: HasAndroidInjector
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Etc_Set_History_Save.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Etc_Set_History_Save.kt
similarity index 92%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Etc_Set_History_Save.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Etc_Set_History_Save.kt
index 2859aa8496..aa812ca588 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Etc_Set_History_Save.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Etc_Set_History_Save.kt
@@ -1,8 +1,8 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.danars.encryption.BleEncryption
class DanaRS_Packet_Etc_Set_History_Save(
injector: HasAndroidInjector,
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Delivery_Status.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Delivery_Status.kt
similarity index 84%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Delivery_Status.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Delivery_Status.kt
index eb71b50be1..9ff3884a57 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Delivery_Status.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Delivery_Status.kt
@@ -1,8 +1,8 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.danars.encryption.BleEncryption
class DanaRS_Packet_General_Delivery_Status(
injector: HasAndroidInjector
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Get_More_Information.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Get_More_Information.kt
similarity index 88%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Get_More_Information.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Get_More_Information.kt
index bd85b5a2aa..10c853ff87 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Get_More_Information.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Get_More_Information.kt
@@ -1,9 +1,9 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.dana.DanaRPump
+import info.nightscout.androidaps.danars.encryption.BleEncryption
import org.joda.time.DateTime
import javax.inject.Inject
@@ -11,7 +11,7 @@ class DanaRS_Packet_General_Get_More_Information(
injector: HasAndroidInjector
) : DanaRS_Packet(injector) {
- @Inject lateinit var danaRPump: DanaRPump
+ @Inject lateinit var danaRPump: info.nightscout.androidaps.dana.DanaRPump
init {
opCode = BleEncryption.DANAR_PACKET__OPCODE_REVIEW__GET_MORE_INFORMATION
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Get_Password.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Get_Password.kt
similarity index 79%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Get_Password.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Get_Password.kt
index dcbbb54136..766fb9cf20 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Get_Password.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Get_Password.kt
@@ -1,16 +1,16 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.dana.DanaRPump
+import info.nightscout.androidaps.danars.encryption.BleEncryption
import javax.inject.Inject
class DanaRS_Packet_General_Get_Password(
injector: HasAndroidInjector
) : DanaRS_Packet(injector) {
- @Inject lateinit var danaRPump: DanaRPump
+ @Inject lateinit var danaRPump: info.nightscout.androidaps.dana.DanaRPump
init {
opCode = BleEncryption.DANAR_PACKET__OPCODE_REVIEW__GET_PASSWORD
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Get_Pump_Check.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Get_Pump_Check.kt
similarity index 88%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Get_Pump_Check.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Get_Pump_Check.kt
index 7f99748239..fa06dc7257 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Get_Pump_Check.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Get_Pump_Check.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.danars.R
@@ -6,8 +6,8 @@ import info.nightscout.androidaps.logging.LTag
import info.nightscout.androidaps.plugins.bus.RxBusWrapper
import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification
import info.nightscout.androidaps.plugins.general.overview.notifications.Notification
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.dana.DanaRPump
+import info.nightscout.androidaps.danars.encryption.BleEncryption
import info.nightscout.androidaps.utils.resources.ResourceHelper
import javax.inject.Inject
@@ -17,7 +17,7 @@ class DanaRS_Packet_General_Get_Pump_Check(
@Inject lateinit var rxBus: RxBusWrapper
@Inject lateinit var resourceHelper: ResourceHelper
- @Inject lateinit var danaRPump: DanaRPump
+ @Inject lateinit var danaRPump: info.nightscout.androidaps.dana.DanaRPump
init {
opCode = BleEncryption.DANAR_PACKET__OPCODE_REVIEW__GET_PUMP_CHECK
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Get_Shipping_Information.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Get_Shipping_Information.kt
similarity index 84%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Get_Shipping_Information.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Get_Shipping_Information.kt
index 629ee5c439..c85fcd1d85 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Get_Shipping_Information.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Get_Shipping_Information.kt
@@ -1,16 +1,16 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.dana.DanaRPump
+import info.nightscout.androidaps.danars.encryption.BleEncryption
import javax.inject.Inject
class DanaRS_Packet_General_Get_Shipping_Information(
injector: HasAndroidInjector
) : DanaRS_Packet(injector) {
- @Inject lateinit var danaRPump: DanaRPump
+ @Inject lateinit var danaRPump: info.nightscout.androidaps.dana.DanaRPump
init {
opCode = BleEncryption.DANAR_PACKET__OPCODE_REVIEW__GET_SHIPPING_INFORMATION
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Get_Shipping_Version.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Get_Shipping_Version.kt
similarity index 75%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Get_Shipping_Version.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Get_Shipping_Version.kt
index e13912f666..336963a5d0 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Get_Shipping_Version.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Get_Shipping_Version.kt
@@ -1,9 +1,9 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.dana.DanaRPump
+import info.nightscout.androidaps.danars.encryption.BleEncryption
import java.nio.charset.Charset
import javax.inject.Inject
@@ -11,7 +11,7 @@ class DanaRS_Packet_General_Get_Shipping_Version(
injector: HasAndroidInjector
) : DanaRS_Packet(injector) {
- @Inject lateinit var danaRPump: DanaRPump
+ @Inject lateinit var danaRPump: info.nightscout.androidaps.dana.DanaRPump
init {
opCode = BleEncryption.DANAR_PACKET__OPCODE_GENERAL__GET_SHIPPING_VERSION
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Get_Today_Delivery_Total.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Get_Today_Delivery_Total.kt
similarity index 85%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Get_Today_Delivery_Total.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Get_Today_Delivery_Total.kt
index 2075528d8a..8b31babf73 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Get_Today_Delivery_Total.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Get_Today_Delivery_Total.kt
@@ -1,16 +1,16 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.dana.DanaRPump
+import info.nightscout.androidaps.danars.encryption.BleEncryption
import javax.inject.Inject
class DanaRS_Packet_General_Get_Today_Delivery_Total(
injector: HasAndroidInjector
) : DanaRS_Packet(injector) {
- @Inject lateinit var danaRPump: DanaRPump
+ @Inject lateinit var danaRPump: info.nightscout.androidaps.dana.DanaRPump
init {
opCode = BleEncryption.DANAR_PACKET__OPCODE_REVIEW__GET_TODAY_DELIVERY_TOTAL
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Get_User_Time_Change_Flag.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Get_User_Time_Change_Flag.kt
similarity index 86%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Get_User_Time_Change_Flag.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Get_User_Time_Change_Flag.kt
index 6ff8fa6231..eaaecf7f03 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Get_User_Time_Change_Flag.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Get_User_Time_Change_Flag.kt
@@ -1,8 +1,8 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.danars.encryption.BleEncryption
class DanaRS_Packet_General_Get_User_Time_Change_Flag(
injector: HasAndroidInjector
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Initial_Screen_Information.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Initial_Screen_Information.kt
similarity index 88%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Initial_Screen_Information.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Initial_Screen_Information.kt
index 586577be09..ee0f514d4b 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Initial_Screen_Information.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Initial_Screen_Information.kt
@@ -1,16 +1,16 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.dana.DanaRPump
+import info.nightscout.androidaps.danars.encryption.BleEncryption
import javax.inject.Inject
class DanaRS_Packet_General_Initial_Screen_Information(
injector: HasAndroidInjector
) : DanaRS_Packet(injector) {
- @Inject lateinit var danaRPump: DanaRPump
+ @Inject lateinit var danaRPump: info.nightscout.androidaps.dana.DanaRPump
init {
opCode = BleEncryption.DANAR_PACKET__OPCODE_REVIEW__INITIAL_SCREEN_INFORMATION
@@ -57,8 +57,8 @@ class DanaRS_Packet_General_Initial_Screen_Information(
//protocol 10+
dataIndex += dataSize
dataSize = 1
- danaRPump.errorState = DanaRPump.ErrorState[byteArrayToInt(getBytes(data, dataIndex, dataSize))]
- ?: DanaRPump.ErrorState.NONE
+ danaRPump.errorState = info.nightscout.androidaps.dana.DanaRPump.ErrorState[byteArrayToInt(getBytes(data, dataIndex, dataSize))]
+ ?: info.nightscout.androidaps.dana.DanaRPump.ErrorState.NONE
aapsLogger.debug(LTag.PUMPCOMM, "ErrorState: " + danaRPump.errorState.name)
}
aapsLogger.debug(LTag.PUMPCOMM, "Pump suspended: " + danaRPump.pumpSuspended)
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Set_History_Upload_Mode.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Set_History_Upload_Mode.kt
similarity index 87%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Set_History_Upload_Mode.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Set_History_Upload_Mode.kt
index 969dd36c87..c695632177 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Set_History_Upload_Mode.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Set_History_Upload_Mode.kt
@@ -1,8 +1,8 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.danars.encryption.BleEncryption
class DanaRS_Packet_General_Set_History_Upload_Mode(
injector: HasAndroidInjector,
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Set_User_Time_Change_Flag_Clear.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Set_User_Time_Change_Flag_Clear.kt
similarity index 85%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Set_User_Time_Change_Flag_Clear.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Set_User_Time_Change_Flag_Clear.kt
index 4190545f99..45a5d01962 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_General_Set_User_Time_Change_Flag_Clear.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_General_Set_User_Time_Change_Flag_Clear.kt
@@ -1,8 +1,8 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.danars.encryption.BleEncryption
class DanaRS_Packet_General_Set_User_Time_Change_Flag_Clear(
injector: HasAndroidInjector
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_.kt
similarity index 86%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_.kt
index 945885d605..5026d117d6 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_.kt
@@ -1,11 +1,11 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.db.DanaRHistoryRecord
import info.nightscout.androidaps.interfaces.DatabaseHelperInterface
import info.nightscout.androidaps.logging.LTag
import info.nightscout.androidaps.plugins.bus.RxBusWrapper
-import info.nightscout.androidaps.plugins.pump.danaR.comm.RecordTypes
+import info.nightscout.androidaps.dana.comm.RecordTypes
import info.nightscout.androidaps.events.EventDanaRSyncStatus
import org.joda.time.DateTime
import java.util.*
@@ -96,7 +96,7 @@ abstract class DanaRS_Packet_History_(
var messageType = ""
when (recordCode) {
0x02 -> {
- danaRHistoryRecord.recordCode = RecordTypes.RECORD_TYPE_BOLUS
+ danaRHistoryRecord.recordCode = info.nightscout.androidaps.dana.comm.RecordTypes.RECORD_TYPE_BOLUS
danaRHistoryRecord.recordDate = datetime.millis
when (0xF0 and paramByte8.toInt()) {
0xA0 -> {
@@ -126,7 +126,7 @@ abstract class DanaRS_Packet_History_(
}
0x03 -> {
- danaRHistoryRecord.recordCode = RecordTypes.RECORD_TYPE_DAILY
+ danaRHistoryRecord.recordCode = info.nightscout.androidaps.dana.comm.RecordTypes.RECORD_TYPE_DAILY
messageType += "dailyinsulin"
danaRHistoryRecord.recordDate = date.millis
danaRHistoryRecord.recordDailyBasal = dailyBasal
@@ -134,49 +134,49 @@ abstract class DanaRS_Packet_History_(
}
0x04 -> {
- danaRHistoryRecord.recordCode = RecordTypes.RECORD_TYPE_PRIME
+ danaRHistoryRecord.recordCode = info.nightscout.androidaps.dana.comm.RecordTypes.RECORD_TYPE_PRIME
messageType += "prime"
danaRHistoryRecord.recordDate = datetimewihtsec.millis
danaRHistoryRecord.recordValue = value * 0.01
}
0x05 -> {
- danaRHistoryRecord.recordCode = RecordTypes.RECORD_TYPE_REFILL
+ danaRHistoryRecord.recordCode = info.nightscout.androidaps.dana.comm.RecordTypes.RECORD_TYPE_REFILL
messageType += "refill"
danaRHistoryRecord.recordDate = datetimewihtsec.millis
danaRHistoryRecord.recordValue = value * 0.01
}
0x0b -> {
- danaRHistoryRecord.recordCode = RecordTypes.RECORD_TYPE_BASALHOUR
+ danaRHistoryRecord.recordCode = info.nightscout.androidaps.dana.comm.RecordTypes.RECORD_TYPE_BASALHOUR
messageType += "basal hour"
danaRHistoryRecord.recordDate = datetimewihtsec.millis
danaRHistoryRecord.recordValue = value * 0.01
}
0x99 -> {
- danaRHistoryRecord.recordCode = RecordTypes.RECORD_TYPE_TEMP_BASAL
+ danaRHistoryRecord.recordCode = info.nightscout.androidaps.dana.comm.RecordTypes.RECORD_TYPE_TEMP_BASAL
messageType += "tb"
danaRHistoryRecord.recordDate = datetimewihtsec.millis
danaRHistoryRecord.recordValue = value * 0.01
}
0x06 -> {
- danaRHistoryRecord.recordCode = RecordTypes.RECORD_TYPE_GLUCOSE
+ danaRHistoryRecord.recordCode = info.nightscout.androidaps.dana.comm.RecordTypes.RECORD_TYPE_GLUCOSE
messageType += "glucose"
danaRHistoryRecord.recordDate = datetimewihtsec.millis
danaRHistoryRecord.recordValue = value.toDouble()
}
0x07 -> {
- danaRHistoryRecord.recordCode = RecordTypes.RECORD_TYPE_CARBO
+ danaRHistoryRecord.recordCode = info.nightscout.androidaps.dana.comm.RecordTypes.RECORD_TYPE_CARBO
messageType += "carbo"
danaRHistoryRecord.recordDate = datetimewihtsec.millis
danaRHistoryRecord.recordValue = value.toDouble()
}
0x0a -> {
- danaRHistoryRecord.recordCode = RecordTypes.RECORD_TYPE_ALARM
+ danaRHistoryRecord.recordCode = info.nightscout.androidaps.dana.comm.RecordTypes.RECORD_TYPE_ALARM
messageType += "alarm"
danaRHistoryRecord.recordDate = datetimewihtsec.millis
var strAlarm = "None"
@@ -191,7 +191,7 @@ abstract class DanaRS_Packet_History_(
}
0x09 -> {
- danaRHistoryRecord.recordCode = RecordTypes.RECORD_TYPE_SUSPEND
+ danaRHistoryRecord.recordCode = info.nightscout.androidaps.dana.comm.RecordTypes.RECORD_TYPE_SUSPEND
messageType += "suspend"
danaRHistoryRecord.recordDate = datetimewihtsec.millis
var strRecordValue = "Off"
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_Alarm.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_Alarm.kt
similarity index 77%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_Alarm.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_Alarm.kt
index eef5b0bac1..23430fab80 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_Alarm.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_Alarm.kt
@@ -1,8 +1,8 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.danars.encryption.BleEncryption
class DanaRS_Packet_History_Alarm @JvmOverloads constructor(
injector: HasAndroidInjector,
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_All_History.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_All_History.kt
similarity index 76%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_All_History.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_All_History.kt
index 298d0005c9..c8cbc8e39e 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_All_History.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_All_History.kt
@@ -1,8 +1,8 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.danars.encryption.BleEncryption
class DanaRS_Packet_History_All_History(
injector: HasAndroidInjector,
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_Basal.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_Basal.kt
similarity index 77%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_Basal.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_Basal.kt
index afd2469f64..5166d9de0c 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_Basal.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_Basal.kt
@@ -1,8 +1,8 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.danars.encryption.BleEncryption
class DanaRS_Packet_History_Basal @JvmOverloads constructor(
injector: HasAndroidInjector,
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_Blood_Glucose.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_Blood_Glucose.kt
similarity index 78%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_Blood_Glucose.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_Blood_Glucose.kt
index eda50d6749..237006ef4a 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_Blood_Glucose.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_Blood_Glucose.kt
@@ -1,8 +1,8 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.danars.encryption.BleEncryption
class DanaRS_Packet_History_Blood_Glucose @JvmOverloads constructor(
injector: HasAndroidInjector,
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_Bolus.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_Bolus.kt
similarity index 77%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_Bolus.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_Bolus.kt
index 6970681afb..3b8cec0a6f 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_Bolus.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_Bolus.kt
@@ -1,8 +1,8 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.danars.encryption.BleEncryption
class DanaRS_Packet_History_Bolus @JvmOverloads constructor(
injector: HasAndroidInjector,
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_Carbohydrate.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_Carbohydrate.kt
similarity index 78%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_Carbohydrate.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_Carbohydrate.kt
index 2ddeae6a9a..6ac0f18b17 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_Carbohydrate.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_Carbohydrate.kt
@@ -1,8 +1,8 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.danars.encryption.BleEncryption
class DanaRS_Packet_History_Carbohydrate @JvmOverloads constructor(
injector: HasAndroidInjector,
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_Daily.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_Daily.kt
similarity index 77%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_Daily.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_Daily.kt
index 4ce5d88af5..d0b3625e6a 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_Daily.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_Daily.kt
@@ -1,8 +1,8 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.danars.encryption.BleEncryption
class DanaRS_Packet_History_Daily @JvmOverloads constructor(
injector: HasAndroidInjector,
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_Prime.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_Prime.kt
similarity index 77%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_Prime.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_Prime.kt
index 93dd90576f..4069f9be0b 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_Prime.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_Prime.kt
@@ -1,8 +1,8 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.danars.encryption.BleEncryption
class DanaRS_Packet_History_Prime @JvmOverloads constructor(
injector: HasAndroidInjector,
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_Refill.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_Refill.kt
similarity index 77%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_Refill.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_Refill.kt
index adeff980df..ba83640f5b 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_Refill.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_Refill.kt
@@ -1,8 +1,8 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.danars.encryption.BleEncryption
class DanaRS_Packet_History_Refill @JvmOverloads constructor(
injector: HasAndroidInjector,
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_Suspend.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_Suspend.kt
similarity index 77%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_Suspend.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_Suspend.kt
index e3d0ac2219..fdc4bb7086 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_Suspend.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_Suspend.kt
@@ -1,8 +1,8 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.danars.encryption.BleEncryption
class DanaRS_Packet_History_Suspend @JvmOverloads constructor(
injector: HasAndroidInjector,
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_Temporary.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_Temporary.kt
similarity index 76%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_Temporary.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_Temporary.kt
index 045457a699..534a0f0667 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_History_Temporary.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_History_Temporary.kt
@@ -1,8 +1,8 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.danars.encryption.BleEncryption
class DanaRS_Packet_History_Temporary(
injector: HasAndroidInjector,
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Notify_Alarm.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Notify_Alarm.kt
similarity index 95%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Notify_Alarm.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Notify_Alarm.kt
index b986f08b17..fe94033ea8 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Notify_Alarm.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Notify_Alarm.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.danars.R
@@ -7,7 +7,7 @@ import info.nightscout.androidaps.plugins.bus.RxBusWrapper
import info.nightscout.androidaps.plugins.general.nsclient.NSUpload
import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotification
import info.nightscout.androidaps.plugins.general.overview.notifications.Notification
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.danars.encryption.BleEncryption
import info.nightscout.androidaps.utils.resources.ResourceHelper
import javax.inject.Inject
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Notify_Delivery_Complete.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Notify_Delivery_Complete.kt
similarity index 86%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Notify_Delivery_Complete.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Notify_Delivery_Complete.kt
index 35adaa4b6a..61fd16286d 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Notify_Delivery_Complete.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Notify_Delivery_Complete.kt
@@ -1,12 +1,12 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.danars.R
import info.nightscout.androidaps.logging.LTag
import info.nightscout.androidaps.plugins.bus.RxBusWrapper
import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.dana.DanaRPump
+import info.nightscout.androidaps.danars.encryption.BleEncryption
import info.nightscout.androidaps.utils.resources.ResourceHelper
import javax.inject.Inject
import kotlin.math.min
@@ -17,7 +17,7 @@ class DanaRS_Packet_Notify_Delivery_Complete(
@Inject lateinit var rxBus: RxBusWrapper
@Inject lateinit var resourceHelper: ResourceHelper
- @Inject lateinit var danaRPump: DanaRPump
+ @Inject lateinit var danaRPump: info.nightscout.androidaps.dana.DanaRPump
init {
type = BleEncryption.DANAR_PACKET__TYPE_NOTIFY
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Notify_Delivery_Rate_Display.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Notify_Delivery_Rate_Display.kt
similarity index 86%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Notify_Delivery_Rate_Display.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Notify_Delivery_Rate_Display.kt
index c4963b497e..c95bba668f 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Notify_Delivery_Rate_Display.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Notify_Delivery_Rate_Display.kt
@@ -1,12 +1,12 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.danars.R
import info.nightscout.androidaps.logging.LTag
import info.nightscout.androidaps.plugins.bus.RxBusWrapper
import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.dana.DanaRPump
+import info.nightscout.androidaps.danars.encryption.BleEncryption
import info.nightscout.androidaps.utils.resources.ResourceHelper
import javax.inject.Inject
import kotlin.math.min
@@ -17,7 +17,7 @@ class DanaRS_Packet_Notify_Delivery_Rate_Display(
@Inject lateinit var rxBus: RxBusWrapper
@Inject lateinit var resourceHelper: ResourceHelper
- @Inject lateinit var danaRPump: DanaRPump
+ @Inject lateinit var danaRPump: info.nightscout.androidaps.dana.DanaRPump
init {
type = BleEncryption.DANAR_PACKET__TYPE_NOTIFY
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Notify_Missed_Bolus_Alarm.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Notify_Missed_Bolus_Alarm.kt
similarity index 91%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Notify_Missed_Bolus_Alarm.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Notify_Missed_Bolus_Alarm.kt
index afe2599866..8e5fcdfeaf 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Notify_Missed_Bolus_Alarm.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Notify_Missed_Bolus_Alarm.kt
@@ -1,8 +1,8 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.danars.encryption.BleEncryption
class DanaRS_Packet_Notify_Missed_Bolus_Alarm(
injector: HasAndroidInjector
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Option_Get_Pump_Time.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Option_Get_Pump_Time.kt
similarity index 86%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Option_Get_Pump_Time.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Option_Get_Pump_Time.kt
index 78ba5dc276..3d921048f7 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Option_Get_Pump_Time.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Option_Get_Pump_Time.kt
@@ -1,9 +1,9 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.dana.DanaRPump
+import info.nightscout.androidaps.danars.encryption.BleEncryption
import org.joda.time.DateTime
import javax.inject.Inject
@@ -11,7 +11,7 @@ class DanaRS_Packet_Option_Get_Pump_Time(
injector: HasAndroidInjector
) : DanaRS_Packet(injector) {
- @Inject lateinit var danaRPump: DanaRPump
+ @Inject lateinit var danaRPump: info.nightscout.androidaps.dana.DanaRPump
init {
opCode = BleEncryption.DANAR_PACKET__OPCODE_OPTION__GET_PUMP_TIME
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Option_Get_User_Option.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Option_Get_User_Option.kt
similarity index 92%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Option_Get_User_Option.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Option_Get_User_Option.kt
index 6e44cdace8..d4aead111c 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Option_Get_User_Option.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Option_Get_User_Option.kt
@@ -1,16 +1,16 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.dana.DanaRPump
+import info.nightscout.androidaps.danars.encryption.BleEncryption
import javax.inject.Inject
class DanaRS_Packet_Option_Get_User_Option(
injector: HasAndroidInjector
) : DanaRS_Packet(injector) {
- @Inject lateinit var danaRPump: DanaRPump
+ @Inject lateinit var danaRPump: info.nightscout.androidaps.dana.DanaRPump
init {
opCode = BleEncryption.DANAR_PACKET__OPCODE_OPTION__GET_USER_OPTION
@@ -74,7 +74,7 @@ class DanaRS_Packet_Option_Get_User_Option(
aapsLogger.debug(LTag.PUMPCOMM, "lcdOnTimeSec: " + danaRPump.lcdOnTimeSec)
aapsLogger.debug(LTag.PUMPCOMM, "backlightOnTimeSec: " + danaRPump.backlightOnTimeSec)
aapsLogger.debug(LTag.PUMPCOMM, "selectedLanguage: " + danaRPump.selectedLanguage)
- aapsLogger.debug(LTag.PUMPCOMM, "Pump units: " + if (danaRPump.units == DanaRPump.UNITS_MGDL) "MGDL" else "MMOL")
+ aapsLogger.debug(LTag.PUMPCOMM, "Pump units: " + if (danaRPump.units == info.nightscout.androidaps.dana.DanaRPump.UNITS_MGDL) "MGDL" else "MMOL")
aapsLogger.debug(LTag.PUMPCOMM, "shutdownHour: " + danaRPump.shutdownHour)
aapsLogger.debug(LTag.PUMPCOMM, "lowReservoirRate: " + danaRPump.lowReservoirRate)
aapsLogger.debug(LTag.PUMPCOMM, "refillAmount: " + danaRPump.refillAmount)
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Option_Set_Pump_Time.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Option_Set_Pump_Time.kt
similarity index 90%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Option_Set_Pump_Time.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Option_Set_Pump_Time.kt
index 1671a17c8c..dc4b6b0efe 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Option_Set_Pump_Time.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Option_Set_Pump_Time.kt
@@ -1,8 +1,8 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.danars.encryption.BleEncryption
import org.joda.time.DateTime
class DanaRS_Packet_Option_Set_Pump_Time(
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Option_Set_User_Option.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Option_Set_User_Option.kt
similarity index 90%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Option_Set_User_Option.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Option_Set_User_Option.kt
index 01ca99c2e5..45ec9d593b 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Option_Set_User_Option.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Option_Set_User_Option.kt
@@ -1,16 +1,16 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.dana.DanaRPump
+import info.nightscout.androidaps.danars.encryption.BleEncryption
import javax.inject.Inject
class DanaRS_Packet_Option_Set_User_Option(
injector: HasAndroidInjector
) : DanaRS_Packet(injector) {
- @Inject lateinit var danaRPump: DanaRPump
+ @Inject lateinit var danaRPump: info.nightscout.androidaps.dana.DanaRPump
init {
opCode = BleEncryption.DANAR_PACKET__OPCODE_OPTION__SET_USER_OPTION
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Review_Bolus_Avg.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Review_Bolus_Avg.kt
similarity index 92%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Review_Bolus_Avg.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Review_Bolus_Avg.kt
index 04751087eb..6e0af1260f 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Review_Bolus_Avg.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Review_Bolus_Avg.kt
@@ -1,8 +1,8 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.danars.encryption.BleEncryption
class DanaRS_Packet_Review_Bolus_Avg(
injector: HasAndroidInjector
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Review_Get_Pump_Dec_Ratio.kt b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Review_Get_Pump_Dec_Ratio.kt
similarity index 73%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Review_Get_Pump_Dec_Ratio.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Review_Get_Pump_Dec_Ratio.kt
index 182f58c3fe..8fefb4c454 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/comm/DanaRS_Packet_Review_Get_Pump_Dec_Ratio.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/comm/DanaRS_Packet_Review_Get_Pump_Dec_Ratio.kt
@@ -1,16 +1,16 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.comm
+package info.nightscout.androidaps.danars.comm
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.logging.LTag
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
+import info.nightscout.androidaps.dana.DanaRPump
+import info.nightscout.androidaps.danars.encryption.BleEncryption
import javax.inject.Inject
class DanaRS_Packet_Review_Get_Pump_Dec_Ratio(
injector: HasAndroidInjector
) : DanaRS_Packet(injector) {
- @Inject lateinit var danaRPump: DanaRPump
+ @Inject lateinit var danaRPump: info.nightscout.androidaps.dana.DanaRPump
init {
opCode = BleEncryption.DANAR_PACKET__OPCODE_REVIEW__GET_PUMP_DEC_RATIO
diff --git a/danars/src/main/java/info/nightscout/androidaps/danars/dependencyInjection/DanaRSActivitiesModule.kt b/danars/src/main/java/info/nightscout/androidaps/danars/dependencyInjection/DanaRSActivitiesModule.kt
index 269fa7a131..5af5be0d62 100644
--- a/danars/src/main/java/info/nightscout/androidaps/danars/dependencyInjection/DanaRSActivitiesModule.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/dependencyInjection/DanaRSActivitiesModule.kt
@@ -2,8 +2,8 @@ package info.nightscout.androidaps.danars.dependencyInjection
import dagger.Module
import dagger.android.ContributesAndroidInjector
-import info.nightscout.androidaps.plugins.pump.danaRS.activities.BLEScanActivity
-import info.nightscout.androidaps.plugins.pump.danaRS.activities.PairingHelperActivity
+import info.nightscout.androidaps.danars.activities.BLEScanActivity
+import info.nightscout.androidaps.danars.activities.PairingHelperActivity
@Module
@Suppress("unused")
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/dialogs/PairingProgressDialog.java b/danars/src/main/java/info/nightscout/androidaps/danars/dialogs/PairingProgressDialog.java
similarity index 95%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/dialogs/PairingProgressDialog.java
rename to danars/src/main/java/info/nightscout/androidaps/danars/dialogs/PairingProgressDialog.java
index 48a567c840..49dc7c8f07 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/dialogs/PairingProgressDialog.java
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/dialogs/PairingProgressDialog.java
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.dialogs;
+package info.nightscout.androidaps.danars.dialogs;
import android.app.Activity;
@@ -19,8 +19,8 @@ import javax.inject.Inject;
import dagger.android.support.DaggerDialogFragment;
import info.nightscout.androidaps.danars.R;
import info.nightscout.androidaps.plugins.bus.RxBusWrapper;
-import info.nightscout.androidaps.plugins.pump.danaRS.activities.PairingHelperActivity;
-import info.nightscout.androidaps.plugins.pump.danaRS.events.EventDanaRSPairingSuccess;
+import info.nightscout.androidaps.danars.activities.PairingHelperActivity;
+import info.nightscout.androidaps.danars.events.EventDanaRSPairingSuccess;
import info.nightscout.androidaps.utils.FabricPrivacy;
import info.nightscout.androidaps.utils.resources.ResourceHelper;
import io.reactivex.disposables.CompositeDisposable;
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/encryption/BleEncryption.java b/danars/src/main/java/info/nightscout/androidaps/danars/encryption/BleEncryption.java
similarity index 99%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/encryption/BleEncryption.java
rename to danars/src/main/java/info/nightscout/androidaps/danars/encryption/BleEncryption.java
index 425a5a87a2..418881d6df 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/encryption/BleEncryption.java
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/encryption/BleEncryption.java
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.encryption;
+package info.nightscout.androidaps.danars.encryption;
import android.content.Context;
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/events/EventDanaRSDeviceChange.kt b/danars/src/main/java/info/nightscout/androidaps/danars/events/EventDanaRSDeviceChange.kt
similarity index 58%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/events/EventDanaRSDeviceChange.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/events/EventDanaRSDeviceChange.kt
index 8b87d59ec1..3d7a0789d7 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/events/EventDanaRSDeviceChange.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/events/EventDanaRSDeviceChange.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.events
+package info.nightscout.androidaps.danars.events
import info.nightscout.androidaps.events.Event
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/events/EventDanaRSPairingSuccess.kt b/danars/src/main/java/info/nightscout/androidaps/danars/events/EventDanaRSPairingSuccess.kt
similarity index 59%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/events/EventDanaRSPairingSuccess.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/events/EventDanaRSPairingSuccess.kt
index 6e0379a4d3..605bf347ea 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/events/EventDanaRSPairingSuccess.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/events/EventDanaRSPairingSuccess.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.events
+package info.nightscout.androidaps.danars.events
import info.nightscout.androidaps.events.Event
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/services/BLEComm.kt b/danars/src/main/java/info/nightscout/androidaps/danars/services/BLEComm.kt
similarity index 97%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/services/BLEComm.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/services/BLEComm.kt
index 074cdc642f..b29ab6d8ef 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/services/BLEComm.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/services/BLEComm.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.services
+package info.nightscout.androidaps.danars.services
import android.bluetooth.*
import android.content.Context
@@ -15,14 +15,14 @@ import info.nightscout.androidaps.plugins.general.nsclient.NSUpload
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.notifications.Notification
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
-import info.nightscout.androidaps.plugins.pump.danaRS.DanaRSPlugin
-import info.nightscout.androidaps.plugins.pump.danaRS.activities.EnterPinActivity
-import info.nightscout.androidaps.plugins.pump.danaRS.activities.PairingHelperActivity
-import info.nightscout.androidaps.plugins.pump.danaRS.comm.DanaRSMessageHashTable
-import info.nightscout.androidaps.plugins.pump.danaRS.comm.DanaRS_Packet
-import info.nightscout.androidaps.plugins.pump.danaRS.encryption.BleEncryption
-import info.nightscout.androidaps.plugins.pump.danaRS.events.EventDanaRSPairingSuccess
+import info.nightscout.androidaps.dana.DanaRPump
+import info.nightscout.androidaps.danars.DanaRSPlugin
+import info.nightscout.androidaps.danars.activities.EnterPinActivity
+import info.nightscout.androidaps.danars.activities.PairingHelperActivity
+import info.nightscout.androidaps.danars.comm.DanaRSMessageHashTable
+import info.nightscout.androidaps.danars.comm.DanaRS_Packet
+import info.nightscout.androidaps.danars.encryption.BleEncryption
+import info.nightscout.androidaps.danars.events.EventDanaRSPairingSuccess
import info.nightscout.androidaps.utils.T
import info.nightscout.androidaps.utils.ToastUtils
import info.nightscout.androidaps.utils.extensions.notify
@@ -43,7 +43,7 @@ class BLEComm @Inject internal constructor(
private val rxBus: RxBusWrapper,
private val sp: SP,
private val danaRSMessageHashTable: DanaRSMessageHashTable,
- private val danaRPump: DanaRPump,
+ private val danaRPump: info.nightscout.androidaps.dana.DanaRPump,
private val danaRSPlugin: DanaRSPlugin,
private val bleEncryption: BleEncryption,
private val nsUpload: NSUpload
@@ -450,6 +450,9 @@ class BLEComm @Inject internal constructor(
} else if (decryptedBuffer.size == 9 && decryptedBuffer[2] == 'O'.toByte() && decryptedBuffer[3] == 'K'.toByte()) {
// v3 2nd layer encryption
v3Encryption = true
+ rxBus.send(EventNewNotification(Notification(Notification.UNSUPPORTED_FIRMWARE, resourceHelper.gs(R.string.unsupportedfirmware), Notification.URGENT)))
+ disconnect("Wrong firmware")
+ /*
val model = decryptedBuffer[5]
// val protocol = decryptedBuffer[7]
if (model == 0x05.toByte()) {
@@ -477,6 +480,7 @@ class BLEComm @Inject internal constructor(
val bytes: ByteArray = bleEncryption.getEncryptedPacket(BleEncryption.DANAR_PACKET__OPCODE_ENCRYPTION__GET_EASYMENU_CHECK, null, null)
writeCharacteristicNoResponse(uartWriteBTGattChar, bytes)
}
+ */
// response PUMP : error status
} else if (decryptedBuffer.size == 6 && decryptedBuffer[2] == 'P'.toByte() && decryptedBuffer[3] == 'U'.toByte() && decryptedBuffer[4] == 'M'.toByte() && decryptedBuffer[5] == 'P'.toByte()) {
aapsLogger.debug(LTag.PUMPBTCOMM, "<<<<< " + "ENCRYPTION__PUMP_CHECK (PUMP)" + " " + DanaRS_Packet.toHexString(decryptedBuffer))
diff --git a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/services/DanaRSService.kt b/danars/src/main/java/info/nightscout/androidaps/danars/services/DanaRSService.kt
similarity index 91%
rename from danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/services/DanaRSService.kt
rename to danars/src/main/java/info/nightscout/androidaps/danars/services/DanaRSService.kt
index 45c48a51f2..ca027e8f5a 100644
--- a/danars/src/main/java/info/nightscout/androidaps/plugins/pump/danaRS/services/DanaRSService.kt
+++ b/danars/src/main/java/info/nightscout/androidaps/danars/services/DanaRSService.kt
@@ -1,4 +1,4 @@
-package info.nightscout.androidaps.plugins.pump.danaRS.services
+package info.nightscout.androidaps.danars.services
import android.app.Service
import android.content.Context
@@ -31,11 +31,11 @@ import info.nightscout.androidaps.plugins.general.overview.events.EventNewNotifi
import info.nightscout.androidaps.plugins.general.overview.events.EventOverviewBolusProgress
import info.nightscout.androidaps.plugins.general.overview.notifications.Notification
import info.nightscout.androidaps.plugins.pump.common.bolusInfo.DetailedBolusInfoStorage
-import info.nightscout.androidaps.plugins.pump.danaR.DanaRPump
-import info.nightscout.androidaps.plugins.pump.danaR.comm.RecordTypes
-import info.nightscout.androidaps.plugins.pump.danaR.events.EventDanaRNewStatus
-import info.nightscout.androidaps.plugins.pump.danaRS.DanaRSPlugin
-import info.nightscout.androidaps.plugins.pump.danaRS.comm.*
+import info.nightscout.androidaps.dana.DanaRPump
+import info.nightscout.androidaps.dana.comm.RecordTypes
+import info.nightscout.androidaps.dana.events.EventDanaRNewStatus
+import info.nightscout.androidaps.danars.DanaRSPlugin
+import info.nightscout.androidaps.danars.comm.*
import info.nightscout.androidaps.queue.Callback
import info.nightscout.androidaps.queue.commands.Command
import info.nightscout.androidaps.utils.DateUtil
@@ -59,7 +59,7 @@ class DanaRSService : DaggerService() {
@Inject lateinit var commandQueue: CommandQueueProvider
@Inject lateinit var context: Context
@Inject lateinit var danaRSPlugin: DanaRSPlugin
- @Inject lateinit var danaRPump: DanaRPump
+ @Inject lateinit var danaRPump: info.nightscout.androidaps.dana.DanaRPump
@Inject lateinit var danaRSMessageHashTable: DanaRSMessageHashTable
@Inject lateinit var activePlugin: ActivePluginProvider
@Inject lateinit var constraintChecker: ConstraintChecker
@@ -138,7 +138,7 @@ class DanaRSService : DaggerService() {
// initial handshake was not successful
// de-initialize pump
danaRPump.reset()
- rxBus.send(EventDanaRNewStatus())
+ rxBus.send(info.nightscout.androidaps.dana.events.EventDanaRNewStatus())
rxBus.send(EventInitializationChanged())
return
}
@@ -169,7 +169,7 @@ class DanaRSService : DaggerService() {
//de-initialize pump
danaRPump.reset()
- rxBus.send(EventDanaRNewStatus())
+ rxBus.send(info.nightscout.androidaps.dana.events.EventDanaRNewStatus())
rxBus.send(EventInitializationChanged())
return
} else {
@@ -186,7 +186,7 @@ class DanaRSService : DaggerService() {
}
}
loadEvents()
- rxBus.send(EventDanaRNewStatus())
+ rxBus.send(info.nightscout.androidaps.dana.events.EventDanaRNewStatus())
rxBus.send(EventInitializationChanged())
//NSUpload.uploadDeviceStatus();
if (danaRPump.dailyTotalUnits > danaRPump.maxDailyTotalUnits * Constants.dailyLimitWarning) {
@@ -249,7 +249,7 @@ class DanaRSService : DaggerService() {
if (carbs > 0) {
// MsgSetCarbsEntry msg = new MsgSetCarbsEntry(carbTime, carbs); ####
// sendMessage(msg);
- val msgSetHistoryEntryV2 = DanaRS_Packet_APS_Set_Event_History(injector, DanaRPump.CARBS, carbTime, carbs, 0)
+ val msgSetHistoryEntryV2 = DanaRS_Packet_APS_Set_Event_History(injector, info.nightscout.androidaps.dana.DanaRPump.CARBS, carbTime, carbs, 0)
sendMessage(msgSetHistoryEntryV2)
lastHistoryFetched = min(lastHistoryFetched, carbTime - T.mins(1).msecs())
}
@@ -414,15 +414,15 @@ class DanaRSService : DaggerService() {
if (!isConnected) return result
var msg: DanaRS_Packet_History_? = null
when (type) {
- RecordTypes.RECORD_TYPE_ALARM -> msg = DanaRS_Packet_History_Alarm(injector)
- RecordTypes.RECORD_TYPE_PRIME -> msg = DanaRS_Packet_History_Prime(injector)
- RecordTypes.RECORD_TYPE_BASALHOUR -> msg = DanaRS_Packet_History_Basal(injector)
- RecordTypes.RECORD_TYPE_BOLUS -> msg = DanaRS_Packet_History_Bolus(injector)
- RecordTypes.RECORD_TYPE_CARBO -> msg = DanaRS_Packet_History_Carbohydrate(injector)
- RecordTypes.RECORD_TYPE_DAILY -> msg = DanaRS_Packet_History_Daily(injector)
- RecordTypes.RECORD_TYPE_GLUCOSE -> msg = DanaRS_Packet_History_Blood_Glucose(injector)
- RecordTypes.RECORD_TYPE_REFILL -> msg = DanaRS_Packet_History_Refill(injector)
- RecordTypes.RECORD_TYPE_SUSPEND -> msg = DanaRS_Packet_History_Suspend(injector)
+ info.nightscout.androidaps.dana.comm.RecordTypes.RECORD_TYPE_ALARM -> msg = DanaRS_Packet_History_Alarm(injector)
+ info.nightscout.androidaps.dana.comm.RecordTypes.RECORD_TYPE_PRIME -> msg = DanaRS_Packet_History_Prime(injector)
+ info.nightscout.androidaps.dana.comm.RecordTypes.RECORD_TYPE_BASALHOUR -> msg = DanaRS_Packet_History_Basal(injector)
+ info.nightscout.androidaps.dana.comm.RecordTypes.RECORD_TYPE_BOLUS -> msg = DanaRS_Packet_History_Bolus(injector)
+ info.nightscout.androidaps.dana.comm.RecordTypes.RECORD_TYPE_CARBO -> msg = DanaRS_Packet_History_Carbohydrate(injector)
+ info.nightscout.androidaps.dana.comm.RecordTypes.RECORD_TYPE_DAILY -> msg = DanaRS_Packet_History_Daily(injector)
+ info.nightscout.androidaps.dana.comm.RecordTypes.RECORD_TYPE_GLUCOSE -> msg = DanaRS_Packet_History_Blood_Glucose(injector)
+ info.nightscout.androidaps.dana.comm.RecordTypes.RECORD_TYPE_REFILL -> msg = DanaRS_Packet_History_Refill(injector)
+ info.nightscout.androidaps.dana.comm.RecordTypes.RECORD_TYPE_SUSPEND -> msg = DanaRS_Packet_History_Suspend(injector)
}
if (msg != null) {
sendMessage(DanaRS_Packet_General_Set_History_Upload_Mode(injector, 1))
diff --git a/danars/src/main/jniLibs/arm64-v8a/libBleEncryption.so b/danars/src/main/jniLibs/arm64-v8a/libBleEncryption.so
index 641efb745b..59e0c56433 100644
Binary files a/danars/src/main/jniLibs/arm64-v8a/libBleEncryption.so and b/danars/src/main/jniLibs/arm64-v8a/libBleEncryption.so differ
diff --git a/danars/src/main/jniLibs/armeabi-v7a/libBleEncryption.so b/danars/src/main/jniLibs/armeabi-v7a/libBleEncryption.so
index 560c7a8905..fabc03368a 100644
Binary files a/danars/src/main/jniLibs/armeabi-v7a/libBleEncryption.so and b/danars/src/main/jniLibs/armeabi-v7a/libBleEncryption.so differ
diff --git a/danars/src/main/jniLibs/x86/libBleEncryption.so b/danars/src/main/jniLibs/x86/libBleEncryption.so
index 59487f74cf..fb51d4816f 100644
Binary files a/danars/src/main/jniLibs/x86/libBleEncryption.so and b/danars/src/main/jniLibs/x86/libBleEncryption.so differ
diff --git a/danars/src/main/jniLibs/x86_64/libBleEncryption.so b/danars/src/main/jniLibs/x86_64/libBleEncryption.so
index 53a606a968..777d55b7f6 100644
Binary files a/danars/src/main/jniLibs/x86_64/libBleEncryption.so and b/danars/src/main/jniLibs/x86_64/libBleEncryption.so differ
diff --git a/danars/src/main/res/layout/danars_blescanner_activity.xml b/danars/src/main/res/layout/danars_blescanner_activity.xml
index fe9e25879c..9a22d37441 100644
--- a/danars/src/main/res/layout/danars_blescanner_activity.xml
+++ b/danars/src/main/res/layout/danars_blescanner_activity.xml
@@ -4,7 +4,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
- tools:context="info.nightscout.androidaps.plugins.pump.danaRS.activities.BLEScanActivity">
+ tools:context=".activities.BLEScanActivity">