From 4a7f90b65bf86fdb6b43c22c2f91dc3e3f74bafb Mon Sep 17 00:00:00 2001 From: jbr7rr <> Date: Thu, 31 Aug 2023 15:26:24 +0200 Subject: [PATCH] Medtrum: Fix crash on missing ID --- .../main/java/info/nightscout/core/pump/PumpTypeExtension.kt | 4 ++-- .../nightscout/database/entities/embedments/InterfaceIDs.kt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/main/src/main/java/info/nightscout/core/pump/PumpTypeExtension.kt b/core/main/src/main/java/info/nightscout/core/pump/PumpTypeExtension.kt index cb7699d041..f92f0ccecf 100644 --- a/core/main/src/main/java/info/nightscout/core/pump/PumpTypeExtension.kt +++ b/core/main/src/main/java/info/nightscout/core/pump/PumpTypeExtension.kt @@ -59,7 +59,7 @@ fun PumpType.Companion.fromDbPumpType(pt: InterfaceIDs.PumpType): PumpType = InterfaceIDs.PumpType.USER -> PumpType.USER InterfaceIDs.PumpType.DIACONN_G8 -> PumpType.DIACONN_G8 InterfaceIDs.PumpType.EOPATCH2 -> PumpType.EOFLOW_EOPATCH2 - InterfaceIDs.PumpType.MEDTRUM_NANO -> PumpType.MEDTRUM_NANO + InterfaceIDs.PumpType.MEDTRUM -> PumpType.MEDTRUM_NANO InterfaceIDs.PumpType.MEDTRUM_300U -> PumpType.MEDTRUM_300U InterfaceIDs.PumpType.MEDTRUM_UNTESTED -> PumpType.MEDTRUM_UNTESTED InterfaceIDs.PumpType.CACHE -> PumpType.CACHE @@ -121,7 +121,7 @@ fun PumpType.toDbPumpType(): InterfaceIDs.PumpType = PumpType.USER -> InterfaceIDs.PumpType.USER PumpType.DIACONN_G8 -> InterfaceIDs.PumpType.DIACONN_G8 PumpType.EOFLOW_EOPATCH2 -> InterfaceIDs.PumpType.EOPATCH2 - PumpType.MEDTRUM_NANO -> InterfaceIDs.PumpType.MEDTRUM_NANO + PumpType.MEDTRUM_NANO -> InterfaceIDs.PumpType.MEDTRUM PumpType.MEDTRUM_300U -> InterfaceIDs.PumpType.MEDTRUM_300U PumpType.MEDTRUM_UNTESTED -> InterfaceIDs.PumpType.MEDTRUM_UNTESTED PumpType.CACHE -> InterfaceIDs.PumpType.CACHE diff --git a/database/entities/src/main/java/info/nightscout/database/entities/embedments/InterfaceIDs.kt b/database/entities/src/main/java/info/nightscout/database/entities/embedments/InterfaceIDs.kt index 2086a99e6e..a711ef22e5 100644 --- a/database/entities/src/main/java/info/nightscout/database/entities/embedments/InterfaceIDs.kt +++ b/database/entities/src/main/java/info/nightscout/database/entities/embedments/InterfaceIDs.kt @@ -43,7 +43,7 @@ data class InterfaceIDs( MDI, DIACONN_G8, EOPATCH2, - MEDTRUM_NANO, + MEDTRUM, MEDTRUM_300U, MEDTRUM_UNTESTED, USER,