Skip to content

Commit

Permalink
Equil support
Browse files Browse the repository at this point in the history
  • Loading branch information
MilosKozak committed Mar 11, 2024
1 parent 2bbf05a commit 4340b0b
Show file tree
Hide file tree
Showing 176 changed files with 12,432 additions and 2 deletions.
1 change: 1 addition & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ dependencies {
implementation(project(":pump:danar"))
implementation(project(":pump:diaconn"))
implementation(project(":pump:eopatch"))
implementation(project(":pump:equil"))
implementation(project(":pump:medtrum"))
implementation(project(":insight"))
implementation(project(":pump:medtronic"))
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/kotlin/app/aaps/di/AppComponent.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import app.aaps.plugins.main.di.PluginsModule
import app.aaps.plugins.source.di.SourceModule
import app.aaps.plugins.sync.di.OpenHumansModule
import app.aaps.plugins.sync.di.SyncModule
import app.aaps.pump.equil.di.EquilModule
import app.aaps.pump.virtual.di.VirtualPumpModule
import app.aaps.shared.impl.di.SharedImplModule
import app.aaps.ui.di.UiModule
Expand Down Expand Up @@ -76,6 +77,7 @@ import javax.inject.Singleton
DanaRSModule::class,
DiaconnG8Module::class,
EopatchModule::class,
EquilModule::class,
InsightModule::class,
InsightDatabaseModule::class,
MedtronicModule::class,
Expand Down
7 changes: 7 additions & 0 deletions app/src/main/kotlin/app/aaps/di/PluginsListModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ import app.aaps.plugins.sync.nsclientV3.NSClientV3Plugin
import app.aaps.plugins.sync.openhumans.OpenHumansUploaderPlugin
import app.aaps.plugins.sync.tidepool.TidepoolPlugin
import app.aaps.plugins.sync.xdrip.XdripPlugin
import app.aaps.pump.equil.EquilPumpPlugin
import app.aaps.pump.virtual.VirtualPumpPlugin
import dagger.Binds
import dagger.Module
Expand Down Expand Up @@ -224,6 +225,12 @@ abstract class PluginsListModule {
@AllConfigs
@IntoMap
@IntKey(170)
abstract fun bindEquilPumpPlugin(plugin: EquilPumpPlugin): PluginBase

@Binds
@AllConfigs
@IntoMap
@IntKey(180)
abstract fun bindVirtualPumpPlugin(plugin: VirtualPumpPlugin): PluginBase

@Binds
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ enum class ManufacturerType(val description: String) {
Roche("Roche"),
Ypsomed("Ypsomed"),
G2e("G2e"),
Eoflow("Eoflow");
Eoflow("Eoflow"),
Equil("Equil");
}
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,24 @@ enum class PumpType {
description = "Medtrum untested",
model = "untested",
parent = MEDTRUM_NANO
),
EQUIL(
description = "Equil",
manufacturer = ManufacturerType.Equil,
model = "Equil",
bolusSize = 0.05,
specialBolusSize = null,
extendedBolusSettings = DoseSettings(0.05, 30, 5 * 60, 0.05),
pumpTempBasalType = PumpTempBasalType.Absolute,
tbrSettings = DoseSettings(0.05, 30, 24 * 60, 0.0, 35.0),
specialBasalDurations = PumpCapability.BasalRate_Duration30minAllowed,
baseBasalMinValue = 0.05,
baseBasalMaxValue = 3.0,
baseBasalStep = 0.01,
baseBasalSpecialSteps = null,
pumpCapability = PumpCapability.DiaconnCapabilities,
source = Source.EQuil,
useHardwareLink = true,
);

val description: String
Expand Down Expand Up @@ -506,7 +524,8 @@ enum class PumpType {
Medtrum,
MDI,
VirtualPump,
Unknown
Unknown,
EQuil
}

companion object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +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.EQUIL -> PumpType.EQUIL
InterfaceIDs.PumpType.MEDTRUM -> PumpType.MEDTRUM_NANO
InterfaceIDs.PumpType.MEDTRUM_300U -> PumpType.MEDTRUM_300U
InterfaceIDs.PumpType.MEDTRUM_UNTESTED -> PumpType.MEDTRUM_UNTESTED
Expand All @@ -84,6 +85,7 @@ fun PumpType.Source.toDbSource(): UserEntry.Sources =
PumpType.Source.Medtrum -> UserEntry.Sources.Medtrum
PumpType.Source.MDI -> UserEntry.Sources.MDI
PumpType.Source.VirtualPump -> UserEntry.Sources.VirtualPump
PumpType.Source.EQuil -> UserEntry.Sources.Equil
else -> UserEntry.Sources.Unknown
}

Expand Down Expand Up @@ -121,6 +123,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.EQUIL -> InterfaceIDs.PumpType.EQUIL
PumpType.MEDTRUM_NANO -> InterfaceIDs.PumpType.MEDTRUM
PumpType.MEDTRUM_300U -> InterfaceIDs.PumpType.MEDTRUM_300U
PumpType.MEDTRUM_UNTESTED -> InterfaceIDs.PumpType.MEDTRUM_UNTESTED
Expand Down
Binary file added core/ui/src/main/res/drawable/ic_equil_128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions crowdin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ files:
translation: /pump/danar/src/main/res/values-%android_code%/strings.xml
- source: /pump/danars/src/main/res/values/strings.xml
translation: /pump/danars/src/main/res/values-%android_code%/strings.xml
- source: /pump/equil/src/main/res/values/strings.xml
translation: /pump/equil/src/main/res/values-%android_code%/strings.xml
- source: /pump/medtronic/src/main/res/values/strings.xml
translation: /pump/medtronic/src/main/res/values-%android_code%/strings.xml
- source: /pump/medtrum/src/main/res/values/strings.xml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ data class UserEntry(
OmnipodEros,
OmnipodDash, //No entry currently
EOPatch2,
Equil,
Medtrum,
MDI,
VirtualPump,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ data class InterfaceIDs @Ignore constructor(
MDI,
DIACONN_G8,
EOPATCH2,
EQUIL,
MEDTRUM,
MEDTRUM_300U,
MEDTRUM_UNTESTED,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ class UserEntryPresentationHelperImpl @Inject constructor(
Sources.OmnipodEros -> R.drawable.ic_patch_pump_outline
Sources.OmnipodDash -> R.drawable.ic_patch_pump_outline
Sources.EOPatch2 -> app.aaps.core.ui.R.drawable.ic_eopatch2_128
Sources.Equil -> app.aaps.core.ui.R.drawable.ic_equil_128
Sources.Medtrum -> app.aaps.core.ui.R.drawable.ic_medtrum_128
Sources.MDI -> R.drawable.ic_ict
Sources.VirtualPump -> R.drawable.ic_virtual_pump
Expand Down
1 change: 1 addition & 0 deletions pump/equil/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
44 changes: 44 additions & 0 deletions pump/equil/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
plugins {
id("com.android.library")
id("kotlin-android")
id("kotlin-kapt")
id("android-module-dependencies")
id("test-module-dependencies")
id("jacoco-module-dependencies")
}


android {

namespace = "app.aaps.pump.equil"
defaultConfig {
kapt {
arguments {
arg("room.incremental", "true")
arg("room.schemaLocation", "$projectDir/schemas")
}
}
}
}

dependencies {
implementation(project(":core:interfaces"))
implementation(project(":core:libraries"))
implementation(project(":core:main"))
implementation(project(":core:utils"))
implementation(project(":core:ui"))
implementation(project(":core:validators"))
implementation(project(":pump:pump-common"))

api(Libs.AndroidX.fragment)
api(Libs.AndroidX.navigationFragment)

api(Libs.AndroidX.Room.room)
api(Libs.AndroidX.Room.runtime)
api(Libs.AndroidX.Room.rxJava3)
kapt(Libs.AndroidX.Room.compiler)
kapt(Libs.Dagger.compiler)
kapt(Libs.Dagger.androidProcessor)

implementation("com.github.bumptech.glide:glide:4.16.0")
}
21 changes: 21 additions & 0 deletions pump/equil/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -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
Loading

0 comments on commit 4340b0b

Please sign in to comment.