From 966939a9de5d8986b0aa61c5791930ffde7d6108 Mon Sep 17 00:00:00 2001
From: jbr7rr <>
Date: Sun, 16 Jul 2023 11:59:36 +0200
Subject: [PATCH] Fix unit test, cleanup
---
.../src/main/java/info/nightscout/interfaces/pump/Medtrum.kt | 2 +-
core/ui/src/main/res/values/strings.xml | 2 +-
pump/medtrum/src/main/AndroidManifest.xml | 2 +-
.../pump/medtrum/bindingadapters/OnSafeClickListener.kt | 2 +-
.../java/info/nightscout/pump/medtrum/code/ConnectionState.kt | 2 +-
.../info/nightscout/pump/medtrum/comm/enums/AlarmState.kt | 2 +-
.../nightscout/pump/medtrum/comm/packets/GetRecordPacket.kt | 4 ++--
.../pump/medtrum/extension/AppCompatActivityExtension.kt | 2 +-
.../info/nightscout/pump/medtrum/services/MedtrumService.kt | 2 +-
.../info/nightscout/pump/medtrum/ui/MedtrumBaseActivity.kt | 2 +-
.../info/nightscout/pump/medtrum/ui/MedtrumBaseFragment.kt | 2 +-
.../info/nightscout/pump/medtrum/ui/MedtrumBaseNavigator.kt | 2 +-
.../nightscout/pump/medtrum/ui/MedtrumOverviewFragment.kt | 2 +-
.../info/nightscout/pump/medtrum/ui/event/SingleLiveEvent.kt | 2 +-
.../pump/medtrum/ui/viewmodel/MedtrumOverviewViewModel.kt | 1 -
.../nightscout/pump/medtrum/ui/viewmodel/MedtrumViewModel.kt | 2 +-
.../nightscout/pump/medtrum/ui/viewmodel/ViewModelFactory.kt | 2 +-
pump/medtrum/src/main/res/layout/activity_medtrum.xml | 2 +-
.../medtrum/src/main/res/layout/fragment_medtrum_activate.xml | 2 +-
.../main/res/layout/fragment_medtrum_activate_complete.xml | 2 +-
.../src/main/res/layout/fragment_medtrum_attach_patch.xml | 2 +-
.../src/main/res/layout/fragment_medtrum_deactivate_patch.xml | 2 +-
.../res/layout/fragment_medtrum_deactivation_complete.xml | 2 +-
.../src/main/res/layout/fragment_medtrum_prepare_patch.xml | 2 +-
.../res/layout/fragment_medtrum_prepare_patch_connect.xml | 2 +-
pump/medtrum/src/main/res/layout/fragment_medtrum_prime.xml | 2 +-
.../src/main/res/layout/fragment_medtrum_prime_complete.xml | 2 +-
pump/medtrum/src/main/res/layout/fragment_medtrum_priming.xml | 2 +-
.../src/main/res/layout/fragment_medtrum_retry_activation.xml | 2 +-
.../res/layout/fragment_medtrum_retry_activation_connect.xml | 2 +-
.../main/res/layout/fragment_medtrum_start_deactivation.xml | 2 +-
.../java/info/nightscout/androidaps/ProfileStoreObject.kt | 2 +-
.../pump/medtrum/comm/packets/GetRecordPacketTest.kt | 2 +-
.../pump/medtrum/comm/packets/NotificationPacketTest.kt | 2 +-
.../pump/medtrum/comm/packets/SynchronizePacketTest.kt | 4 ++--
35 files changed, 36 insertions(+), 37 deletions(-)
diff --git a/core/interfaces/src/main/java/info/nightscout/interfaces/pump/Medtrum.kt b/core/interfaces/src/main/java/info/nightscout/interfaces/pump/Medtrum.kt
index 3ce09a06cd..a574e3a609 100644
--- a/core/interfaces/src/main/java/info/nightscout/interfaces/pump/Medtrum.kt
+++ b/core/interfaces/src/main/java/info/nightscout/interfaces/pump/Medtrum.kt
@@ -10,4 +10,4 @@ interface Medtrum {
fun clearAlarms(): PumpEnactResult // clear alarms
fun deactivate(): PumpEnactResult // deactivate patch
fun updateTime(): PumpEnactResult // update time
-}
\ No newline at end of file
+}
diff --git a/core/ui/src/main/res/values/strings.xml b/core/ui/src/main/res/values/strings.xml
index be0935f3d0..5c07b780d4 100644
--- a/core/ui/src/main/res/values/strings.xml
+++ b/core/ui/src/main/res/values/strings.xml
@@ -393,7 +393,7 @@
CARBS %1$d g
EXTENDED BOLUS %1$.2f U %2$d min
LOAD EVENTS
- CLEAR_ALARMS
+ CLEAR ALARMS
DEACTIVATE
UPDATE TIME
LOAD HISTORY %1$d
diff --git a/pump/medtrum/src/main/AndroidManifest.xml b/pump/medtrum/src/main/AndroidManifest.xml
index 2e03434790..22b7e1ba50 100644
--- a/pump/medtrum/src/main/AndroidManifest.xml
+++ b/pump/medtrum/src/main/AndroidManifest.xml
@@ -14,4 +14,4 @@
android:exported="false" />
-
\ No newline at end of file
+
diff --git a/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/bindingadapters/OnSafeClickListener.kt b/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/bindingadapters/OnSafeClickListener.kt
index a62a645935..4475938960 100644
--- a/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/bindingadapters/OnSafeClickListener.kt
+++ b/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/bindingadapters/OnSafeClickListener.kt
@@ -23,4 +23,4 @@ class OnSafeClickListener(
// Set duplicate click prevention time
private const val MIN_CLICK_INTERVAL: Long = 1000
}
-}
\ No newline at end of file
+}
diff --git a/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/code/ConnectionState.kt b/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/code/ConnectionState.kt
index a4c0a6dc01..2b51faf0f0 100644
--- a/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/code/ConnectionState.kt
+++ b/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/code/ConnectionState.kt
@@ -5,4 +5,4 @@ enum class ConnectionState {
DISCONNECTED,
CONNECTING,
DISCONNECTING;
-}
\ No newline at end of file
+}
diff --git a/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/comm/enums/AlarmState.kt b/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/comm/enums/AlarmState.kt
index 392bf85dc3..50ae4e30f6 100644
--- a/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/comm/enums/AlarmState.kt
+++ b/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/comm/enums/AlarmState.kt
@@ -20,4 +20,4 @@ enum class AlarmState {
BASE_FAULT, // Mapped from pump status 101
BATTERY_OUT, // Mapped from pump status 102
NO_CALIBRATION // Mapped from pump status 103
-}
\ No newline at end of file
+}
diff --git a/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/comm/packets/GetRecordPacket.kt b/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/comm/packets/GetRecordPacket.kt
index b122ff3566..abae0e8463 100644
--- a/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/comm/packets/GetRecordPacket.kt
+++ b/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/comm/packets/GetRecordPacket.kt
@@ -223,7 +223,7 @@ class GetRecordPacket(injector: HasAndroidInjector, private val recordIndex: Int
var duration = (basalEndTime - basalStartTime)
// Work around for pumpSync not accepting 0 duration.
// sometimes we get 0 duration for very short basal because the pump only reports time in seconds
- if (duration < 250) duration = 250 // 250ms to make sure timestamp is unique
+ if (duration < 250) duration = 250 // 250ms to make sure AAPS accepts it
val newRecord = pumpSync.syncTemporaryBasalWithPumpId(
timestamp = basalStartTime,
@@ -306,4 +306,4 @@ class GetRecordPacket(injector: HasAndroidInjector, private val recordIndex: Int
return success
}
-}
\ No newline at end of file
+}
diff --git a/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/extension/AppCompatActivityExtension.kt b/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/extension/AppCompatActivityExtension.kt
index 7345091cb4..fd4c50713c 100644
--- a/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/extension/AppCompatActivityExtension.kt
+++ b/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/extension/AppCompatActivityExtension.kt
@@ -16,4 +16,4 @@ private inline fun FragmentManager.transact(action: FragmentTransaction.() -> Un
beginTransaction().apply {
action()
}.commit()
-}
\ No newline at end of file
+}
diff --git a/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/services/MedtrumService.kt b/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/services/MedtrumService.kt
index 5a83b3f714..14ddb372e7 100644
--- a/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/services/MedtrumService.kt
+++ b/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/services/MedtrumService.kt
@@ -240,7 +240,7 @@ class MedtrumService : DaggerService(), BLECommCallback {
fun loadEvents(): Boolean {
rxBus.send(EventPumpStatusChanged(rh.gs(R.string.gettingpumpstatus)))
- // Sync records (based on the info we have from the sync)
+ // Sync records
val result = syncRecords()
if (result) {
aapsLogger.debug(LTag.PUMPCOMM, "Events loaded")
diff --git a/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/ui/MedtrumBaseActivity.kt b/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/ui/MedtrumBaseActivity.kt
index 7861346883..110a18513f 100644
--- a/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/ui/MedtrumBaseActivity.kt
+++ b/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/ui/MedtrumBaseActivity.kt
@@ -54,4 +54,4 @@ abstract class MedtrumBaseActivity : DaggerAppCompatActivit
finish()
}
}
-}
\ No newline at end of file
+}
diff --git a/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/ui/MedtrumBaseFragment.kt b/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/ui/MedtrumBaseFragment.kt
index e09a283c0d..1add056d09 100644
--- a/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/ui/MedtrumBaseFragment.kt
+++ b/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/ui/MedtrumBaseFragment.kt
@@ -63,4 +63,4 @@ abstract class MedtrumBaseFragment : DaggerFragment(), Medt
override fun finish(finishAffinity: Boolean) {
baseActivity?.finish(finishAffinity)
}
-}
\ No newline at end of file
+}
diff --git a/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/ui/MedtrumBaseNavigator.kt b/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/ui/MedtrumBaseNavigator.kt
index ebd597a673..5e2cb70651 100644
--- a/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/ui/MedtrumBaseNavigator.kt
+++ b/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/ui/MedtrumBaseNavigator.kt
@@ -4,4 +4,4 @@ interface MedtrumBaseNavigator {
fun back()
fun finish(finishAffinity: Boolean = false)
-}
\ No newline at end of file
+}
diff --git a/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/ui/MedtrumOverviewFragment.kt b/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/ui/MedtrumOverviewFragment.kt
index bde7346ebc..4c6ad43766 100644
--- a/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/ui/MedtrumOverviewFragment.kt
+++ b/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/ui/MedtrumOverviewFragment.kt
@@ -61,4 +61,4 @@ class MedtrumOverviewFragment : MedtrumBaseFragment : MutableLiveData() {
fun call() {
value = null
}
-}
\ No newline at end of file
+}
diff --git a/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/ui/viewmodel/MedtrumOverviewViewModel.kt b/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/ui/viewmodel/MedtrumOverviewViewModel.kt
index 3c07719720..da742ea91d 100644
--- a/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/ui/viewmodel/MedtrumOverviewViewModel.kt
+++ b/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/ui/viewmodel/MedtrumOverviewViewModel.kt
@@ -187,4 +187,3 @@ class MedtrumOverviewViewModel @Inject constructor(
}
}
}
-
\ No newline at end of file
diff --git a/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/ui/viewmodel/MedtrumViewModel.kt b/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/ui/viewmodel/MedtrumViewModel.kt
index 8667be0588..21f5180fc7 100644
--- a/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/ui/viewmodel/MedtrumViewModel.kt
+++ b/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/ui/viewmodel/MedtrumViewModel.kt
@@ -140,6 +140,7 @@ class MedtrumViewModel @Inject constructor(
when (newPatchStep) {
PatchStep.CANCEL -> {
if (oldPatchStep !in listOf(
+ PatchStep.PREPARE_PATCH,
PatchStep.START_DEACTIVATION,
PatchStep.DEACTIVATE,
PatchStep.FORCE_DEACTIVATION,
@@ -148,7 +149,6 @@ class MedtrumViewModel @Inject constructor(
) {
medtrumService?.disconnect("Cancel")
}
- medtrumService?.disconnect("Cancel")
}
PatchStep.COMPLETE -> {
diff --git a/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/ui/viewmodel/ViewModelFactory.kt b/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/ui/viewmodel/ViewModelFactory.kt
index 6acf7d4404..0baf6a7679 100644
--- a/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/ui/viewmodel/ViewModelFactory.kt
+++ b/pump/medtrum/src/main/java/info/nightscout/pump/medtrum/ui/viewmodel/ViewModelFactory.kt
@@ -37,4 +37,4 @@ class ViewModelFactory @Inject constructor(private val creators: Map
-
\ No newline at end of file
+
diff --git a/pump/medtrum/src/main/res/layout/fragment_medtrum_activate.xml b/pump/medtrum/src/main/res/layout/fragment_medtrum_activate.xml
index 5d476a8a1a..517e8bd56b 100644
--- a/pump/medtrum/src/main/res/layout/fragment_medtrum_activate.xml
+++ b/pump/medtrum/src/main/res/layout/fragment_medtrum_activate.xml
@@ -77,4 +77,4 @@
-
\ No newline at end of file
+
diff --git a/pump/medtrum/src/main/res/layout/fragment_medtrum_activate_complete.xml b/pump/medtrum/src/main/res/layout/fragment_medtrum_activate_complete.xml
index 7e2b250fa1..aa93e8f5e9 100644
--- a/pump/medtrum/src/main/res/layout/fragment_medtrum_activate_complete.xml
+++ b/pump/medtrum/src/main/res/layout/fragment_medtrum_activate_complete.xml
@@ -76,4 +76,4 @@
-
\ No newline at end of file
+
diff --git a/pump/medtrum/src/main/res/layout/fragment_medtrum_attach_patch.xml b/pump/medtrum/src/main/res/layout/fragment_medtrum_attach_patch.xml
index a0a377a0b2..b94fb6b4ff 100644
--- a/pump/medtrum/src/main/res/layout/fragment_medtrum_attach_patch.xml
+++ b/pump/medtrum/src/main/res/layout/fragment_medtrum_attach_patch.xml
@@ -91,4 +91,4 @@
-
\ No newline at end of file
+
diff --git a/pump/medtrum/src/main/res/layout/fragment_medtrum_deactivate_patch.xml b/pump/medtrum/src/main/res/layout/fragment_medtrum_deactivate_patch.xml
index 03284721f8..7d58f38e02 100644
--- a/pump/medtrum/src/main/res/layout/fragment_medtrum_deactivate_patch.xml
+++ b/pump/medtrum/src/main/res/layout/fragment_medtrum_deactivate_patch.xml
@@ -78,4 +78,4 @@
-
\ No newline at end of file
+
diff --git a/pump/medtrum/src/main/res/layout/fragment_medtrum_deactivation_complete.xml b/pump/medtrum/src/main/res/layout/fragment_medtrum_deactivation_complete.xml
index 02cded0c0a..cc564f230f 100644
--- a/pump/medtrum/src/main/res/layout/fragment_medtrum_deactivation_complete.xml
+++ b/pump/medtrum/src/main/res/layout/fragment_medtrum_deactivation_complete.xml
@@ -89,4 +89,4 @@
-
\ No newline at end of file
+
diff --git a/pump/medtrum/src/main/res/layout/fragment_medtrum_prepare_patch.xml b/pump/medtrum/src/main/res/layout/fragment_medtrum_prepare_patch.xml
index da31494293..b9b654575f 100644
--- a/pump/medtrum/src/main/res/layout/fragment_medtrum_prepare_patch.xml
+++ b/pump/medtrum/src/main/res/layout/fragment_medtrum_prepare_patch.xml
@@ -106,4 +106,4 @@
-
\ No newline at end of file
+
diff --git a/pump/medtrum/src/main/res/layout/fragment_medtrum_prepare_patch_connect.xml b/pump/medtrum/src/main/res/layout/fragment_medtrum_prepare_patch_connect.xml
index bba17ab5ea..06843e91c4 100644
--- a/pump/medtrum/src/main/res/layout/fragment_medtrum_prepare_patch_connect.xml
+++ b/pump/medtrum/src/main/res/layout/fragment_medtrum_prepare_patch_connect.xml
@@ -106,4 +106,4 @@
-
\ No newline at end of file
+
diff --git a/pump/medtrum/src/main/res/layout/fragment_medtrum_prime.xml b/pump/medtrum/src/main/res/layout/fragment_medtrum_prime.xml
index b1709ae089..e5ba59c7c2 100644
--- a/pump/medtrum/src/main/res/layout/fragment_medtrum_prime.xml
+++ b/pump/medtrum/src/main/res/layout/fragment_medtrum_prime.xml
@@ -93,4 +93,4 @@
-
\ No newline at end of file
+
diff --git a/pump/medtrum/src/main/res/layout/fragment_medtrum_prime_complete.xml b/pump/medtrum/src/main/res/layout/fragment_medtrum_prime_complete.xml
index 246e9dc148..071e755529 100644
--- a/pump/medtrum/src/main/res/layout/fragment_medtrum_prime_complete.xml
+++ b/pump/medtrum/src/main/res/layout/fragment_medtrum_prime_complete.xml
@@ -93,4 +93,4 @@
-
\ No newline at end of file
+
diff --git a/pump/medtrum/src/main/res/layout/fragment_medtrum_priming.xml b/pump/medtrum/src/main/res/layout/fragment_medtrum_priming.xml
index 27e1d2f394..cebfa521df 100644
--- a/pump/medtrum/src/main/res/layout/fragment_medtrum_priming.xml
+++ b/pump/medtrum/src/main/res/layout/fragment_medtrum_priming.xml
@@ -104,4 +104,4 @@
-
\ No newline at end of file
+
diff --git a/pump/medtrum/src/main/res/layout/fragment_medtrum_retry_activation.xml b/pump/medtrum/src/main/res/layout/fragment_medtrum_retry_activation.xml
index 5340ff907b..7911876aa1 100644
--- a/pump/medtrum/src/main/res/layout/fragment_medtrum_retry_activation.xml
+++ b/pump/medtrum/src/main/res/layout/fragment_medtrum_retry_activation.xml
@@ -90,4 +90,4 @@
-
\ No newline at end of file
+
diff --git a/pump/medtrum/src/main/res/layout/fragment_medtrum_retry_activation_connect.xml b/pump/medtrum/src/main/res/layout/fragment_medtrum_retry_activation_connect.xml
index 04d2a769ad..852b0e6e73 100644
--- a/pump/medtrum/src/main/res/layout/fragment_medtrum_retry_activation_connect.xml
+++ b/pump/medtrum/src/main/res/layout/fragment_medtrum_retry_activation_connect.xml
@@ -63,4 +63,4 @@
-
\ No newline at end of file
+
diff --git a/pump/medtrum/src/main/res/layout/fragment_medtrum_start_deactivation.xml b/pump/medtrum/src/main/res/layout/fragment_medtrum_start_deactivation.xml
index 2983ac3ebd..bf58641e9f 100644
--- a/pump/medtrum/src/main/res/layout/fragment_medtrum_start_deactivation.xml
+++ b/pump/medtrum/src/main/res/layout/fragment_medtrum_start_deactivation.xml
@@ -88,4 +88,4 @@
-
\ No newline at end of file
+
diff --git a/pump/medtrum/src/test/java/info/nightscout/androidaps/ProfileStoreObject.kt b/pump/medtrum/src/test/java/info/nightscout/androidaps/ProfileStoreObject.kt
index e4040d0369..31037b0f43 100644
--- a/pump/medtrum/src/test/java/info/nightscout/androidaps/ProfileStoreObject.kt
+++ b/pump/medtrum/src/test/java/info/nightscout/androidaps/ProfileStoreObject.kt
@@ -104,4 +104,4 @@ class ProfileStoreObject(val injector: HasAndroidInjector, override val data: JS
.map { profileName -> getSpecificProfile(profileName.toString()) }
.map { pureProfile -> pureProfile?.let { ProfileSealed.Pure(pureProfile).isValid("allProfilesValid", activePlugin.activePump, config, rh, rxBus, hardLimits, false) } }
.all { it?.isValid == true }
-}
\ No newline at end of file
+}
diff --git a/pump/medtrum/src/test/java/info/nightscout/pump/medtrum/comm/packets/GetRecordPacketTest.kt b/pump/medtrum/src/test/java/info/nightscout/pump/medtrum/comm/packets/GetRecordPacketTest.kt
index a08f97e3d4..70b4405f58 100644
--- a/pump/medtrum/src/test/java/info/nightscout/pump/medtrum/comm/packets/GetRecordPacketTest.kt
+++ b/pump/medtrum/src/test/java/info/nightscout/pump/medtrum/comm/packets/GetRecordPacketTest.kt
@@ -59,4 +59,4 @@ class GetRecordPacketTest : MedtrumTestBase() {
assertEquals(false, result)
assertEquals(true, packet.failed)
}
-}
\ No newline at end of file
+}
diff --git a/pump/medtrum/src/test/java/info/nightscout/pump/medtrum/comm/packets/NotificationPacketTest.kt b/pump/medtrum/src/test/java/info/nightscout/pump/medtrum/comm/packets/NotificationPacketTest.kt
index 13be194534..5ee0c6ce13 100644
--- a/pump/medtrum/src/test/java/info/nightscout/pump/medtrum/comm/packets/NotificationPacketTest.kt
+++ b/pump/medtrum/src/test/java/info/nightscout/pump/medtrum/comm/packets/NotificationPacketTest.kt
@@ -88,4 +88,4 @@ class NotificationPacketTest : MedtrumTestBase() {
assertEquals(1.65, medtrumPump.bolusingTreatment!!.insulin, 0.01)
assertEquals(161.95, medtrumPump.reservoir, 0.01)
}
-}
\ No newline at end of file
+}
diff --git a/pump/medtrum/src/test/java/info/nightscout/pump/medtrum/comm/packets/SynchronizePacketTest.kt b/pump/medtrum/src/test/java/info/nightscout/pump/medtrum/comm/packets/SynchronizePacketTest.kt
index 6900f5a775..181cc525fc 100644
--- a/pump/medtrum/src/test/java/info/nightscout/pump/medtrum/comm/packets/SynchronizePacketTest.kt
+++ b/pump/medtrum/src/test/java/info/nightscout/pump/medtrum/comm/packets/SynchronizePacketTest.kt
@@ -93,10 +93,10 @@ class SynchronizePacketTest : MedtrumTestBase() {
assertEquals(25, packet.medtrumPump.lastBasalSequence)
assertEquals(14, packet.medtrumPump.lastBasalPatchId)
assertEquals(1685126612000, packet.medtrumPump.lastBasalStartTime)
+ assertEquals(8123, packet.medtrumPump.patchAge)
assertEquals(186.80, packet.medtrumPump.reservoir, 0.01)
- assertEquals(296585720, packet.medtrumPump.patchAge)
+ assertEquals(1685120120000, packet.medtrumPump.patchStartTime)
assertEquals(5.96875, packet.medtrumPump.batteryVoltage_A, 0.01)
assertEquals(2.8125, packet.medtrumPump.batteryVoltage_B, 0.01)
- assertEquals(1388542523000, packet.medtrumPump.patchStartTime)
}
}