diff --git a/app/build.gradle b/app/build.gradle index 034941a068..28cc2ab5b7 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -199,6 +199,7 @@ dependencies { implementation project(':plugins:automation') implementation project(':plugins:configuration') implementation project(':plugins:constraints') + implementation project(':plugins:insulin') implementation project(':plugins:main') implementation project(':plugins:openhumans') implementation project(':plugins:sensitivity') diff --git a/app/src/main/java/info/nightscout/androidaps/activities/MyPreferenceFragment.kt b/app/src/main/java/info/nightscout/androidaps/activities/MyPreferenceFragment.kt index c7354fa881..b7ceb50785 100644 --- a/app/src/main/java/info/nightscout/androidaps/activities/MyPreferenceFragment.kt +++ b/app/src/main/java/info/nightscout/androidaps/activities/MyPreferenceFragment.kt @@ -28,6 +28,7 @@ import info.nightscout.automation.AutomationPlugin import info.nightscout.configuration.maintenance.MaintenancePlugin import info.nightscout.core.ui.dialogs.OKDialog import info.nightscout.implementation.plugin.PluginStore +import info.nightscout.insulin.InsulinOrefFreePeakPlugin import info.nightscout.interfaces.Config import info.nightscout.interfaces.nsclient.NSSettingsStatus import info.nightscout.interfaces.plugin.PluginBase @@ -47,7 +48,6 @@ import info.nightscout.plugins.general.autotune.AutotunePlugin import info.nightscout.plugins.general.smsCommunicator.SmsCommunicatorPlugin import info.nightscout.plugins.general.wear.WearPlugin import info.nightscout.plugins.general.xdripStatusline.StatusLinePlugin -import info.nightscout.plugins.insulin.InsulinOrefFreePeakPlugin import info.nightscout.plugins.pump.virtual.VirtualPumpPlugin import info.nightscout.plugins.source.AidexPlugin import info.nightscout.plugins.source.DexcomPlugin diff --git a/app/src/main/java/info/nightscout/androidaps/di/AppComponent.kt b/app/src/main/java/info/nightscout/androidaps/di/AppComponent.kt index 0acbea340a..ba16aa612b 100644 --- a/app/src/main/java/info/nightscout/androidaps/di/AppComponent.kt +++ b/app/src/main/java/info/nightscout/androidaps/di/AppComponent.kt @@ -20,6 +20,7 @@ import info.nightscout.core.di.CoreModule import info.nightscout.core.validators.di.ValidatorsModule import info.nightscout.database.impl.DatabaseModule import info.nightscout.implementation.di.ImplementationModule +import info.nightscout.insulin.di.InsulinModule import info.nightscout.plugins.aps.di.ApsModule import info.nightscout.plugins.constraints.di.PluginsConstraintsModule import info.nightscout.plugins.di.PluginsModule @@ -55,6 +56,7 @@ import javax.inject.Singleton CoreModule::class, DatabaseModule::class, ImplementationModule::class, + InsulinModule::class, OpenHumansModule::class, PluginsModule::class, RxModule::class, diff --git a/app/src/main/java/info/nightscout/androidaps/di/PluginsListModule.kt b/app/src/main/java/info/nightscout/androidaps/di/PluginsListModule.kt index f3dded5cc3..40922d18dc 100644 --- a/app/src/main/java/info/nightscout/androidaps/di/PluginsListModule.kt +++ b/app/src/main/java/info/nightscout/androidaps/di/PluginsListModule.kt @@ -8,7 +8,6 @@ import info.nightscout.androidaps.danaRKorean.DanaRKoreanPlugin import info.nightscout.androidaps.danaRv2.DanaRv2Plugin import info.nightscout.androidaps.danar.DanaRPlugin import info.nightscout.androidaps.plugin.general.openhumans.OpenHumansUploaderPlugin -import info.nightscout.plugins.general.persistentNotification.PersistentNotificationPlugin import info.nightscout.androidaps.plugins.pump.eopatch.EopatchPumpPlugin import info.nightscout.androidaps.plugins.pump.insight.LocalInsightPlugin import info.nightscout.androidaps.plugins.pump.medtronic.MedtronicPumpPlugin @@ -17,6 +16,10 @@ import info.nightscout.androidaps.plugins.pump.omnipod.eros.OmnipodErosPumpPlugi import info.nightscout.automation.AutomationPlugin import info.nightscout.configuration.configBuilder.ConfigBuilderPlugin import info.nightscout.configuration.maintenance.MaintenancePlugin +import info.nightscout.insulin.InsulinLyumjevPlugin +import info.nightscout.insulin.InsulinOrefFreePeakPlugin +import info.nightscout.insulin.InsulinOrefRapidActingPlugin +import info.nightscout.insulin.InsulinOrefUltraRapidActingPlugin import info.nightscout.interfaces.plugin.PluginBase import info.nightscout.plugins.aps.loop.LoopPlugin import info.nightscout.plugins.aps.openAPSAMA.OpenAPSAMAPlugin @@ -31,14 +34,11 @@ import info.nightscout.plugins.general.autotune.AutotunePlugin import info.nightscout.plugins.general.dataBroadcaster.DataBroadcastPlugin import info.nightscout.plugins.general.food.FoodPlugin import info.nightscout.plugins.general.overview.OverviewPlugin +import info.nightscout.plugins.general.persistentNotification.PersistentNotificationPlugin import info.nightscout.plugins.general.smsCommunicator.SmsCommunicatorPlugin import info.nightscout.plugins.general.themes.ThemeSwitcherPlugin import info.nightscout.plugins.general.wear.WearPlugin import info.nightscout.plugins.general.xdripStatusline.StatusLinePlugin -import info.nightscout.plugins.insulin.InsulinLyumjevPlugin -import info.nightscout.plugins.insulin.InsulinOrefFreePeakPlugin -import info.nightscout.plugins.insulin.InsulinOrefRapidActingPlugin -import info.nightscout.plugins.insulin.InsulinOrefUltraRapidActingPlugin import info.nightscout.plugins.iob.iobCobCalculator.IobCobCalculatorPlugin import info.nightscout.plugins.profile.ProfilePlugin import info.nightscout.plugins.pump.virtual.VirtualPumpPlugin diff --git a/plugins/main/src/main/java/info/nightscout/plugins/insulin/ActivityGraph.kt b/core/graph/src/main/java/info/nightscout/core/graph/ActivityGraph.kt similarity index 98% rename from plugins/main/src/main/java/info/nightscout/plugins/insulin/ActivityGraph.kt rename to core/graph/src/main/java/info/nightscout/core/graph/ActivityGraph.kt index beb9055f23..9f887ea40f 100644 --- a/plugins/main/src/main/java/info/nightscout/plugins/insulin/ActivityGraph.kt +++ b/core/graph/src/main/java/info/nightscout/core/graph/ActivityGraph.kt @@ -1,4 +1,4 @@ -package info.nightscout.plugins.insulin +package info.nightscout.core.graph import android.content.Context import android.graphics.Color diff --git a/crowdin.yml b/crowdin.yml index 8a46e75627..bad417b724 100644 --- a/crowdin.yml +++ b/crowdin.yml @@ -21,6 +21,8 @@ files: translation: /plugins/openhumans/src/main/res/values-%android_code%/strings.xml - source: /plugins/sensitivity/src/main/res/values/strings.xml translation: /plugins/sensitivity/src/main/res/values-%android_code%/strings.xml + - source: /plugins/insulin/src/main/res/values/strings.xml + translation: /plugins/insulin/src/main/res/values-%android_code%/strings.xml - source: /plugins/configuration/src/main/res/values/strings.xml translation: /plugins/configuration/src/main/res/values-%android_code%/strings.xml - source: /plugins/sync/src/main/res/values/strings.xml diff --git a/plugins/insulin/.gitignore b/plugins/insulin/.gitignore new file mode 100644 index 0000000000..42afabfd2a --- /dev/null +++ b/plugins/insulin/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/plugins/insulin/build.gradle b/plugins/insulin/build.gradle new file mode 100644 index 0000000000..4ebac085b2 --- /dev/null +++ b/plugins/insulin/build.gradle @@ -0,0 +1,28 @@ +plugins { + id 'com.android.library' + id 'kotlin-android' + id 'kotlin-kapt' + id 'kotlin-allopen' + id 'com.hiya.jacoco-android' +} + +apply from: "${project.rootDir}/core/main/android_dependencies.gradle" +apply from: "${project.rootDir}/core/main/android_module_dependencies.gradle" +apply from: "${project.rootDir}/core/main/allopen_dependencies.gradle" +apply from: "${project.rootDir}/core/main/test_dependencies.gradle" +apply from: "${project.rootDir}/core/main/jacoco_global.gradle" +android { + namespace 'info.nightscout.insulin' +} + + +dependencies { + implementation project(':app-wear-shared:shared') + implementation project(':core:graph') + implementation project(':core:graphview') + implementation project(':core:interfaces') + implementation project(':core:ui') + implementation project(':core:utils') + implementation project(':core:validators') + implementation project(':database:entities') +} \ No newline at end of file diff --git a/plugins/insulin/consumer-rules.pro b/plugins/insulin/consumer-rules.pro new file mode 100644 index 0000000000..e69de29bb2 diff --git a/plugins/insulin/proguard-rules.pro b/plugins/insulin/proguard-rules.pro new file mode 100644 index 0000000000..481bb43481 --- /dev/null +++ b/plugins/insulin/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 \ No newline at end of file diff --git a/plugins/insulin/src/main/AndroidManifest.xml b/plugins/insulin/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..44008a4332 --- /dev/null +++ b/plugins/insulin/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/plugins/main/src/main/java/info/nightscout/plugins/insulin/InsulinFragment.kt b/plugins/insulin/src/main/java/info/nightscout/insulin/InsulinFragment.kt similarity index 93% rename from plugins/main/src/main/java/info/nightscout/plugins/insulin/InsulinFragment.kt rename to plugins/insulin/src/main/java/info/nightscout/insulin/InsulinFragment.kt index a53150caa0..6c55e30cce 100644 --- a/plugins/main/src/main/java/info/nightscout/plugins/insulin/InsulinFragment.kt +++ b/plugins/insulin/src/main/java/info/nightscout/insulin/InsulinFragment.kt @@ -1,12 +1,12 @@ -package info.nightscout.plugins.insulin +package info.nightscout.insulin import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import dagger.android.support.DaggerFragment +import info.nightscout.insulin.databinding.InsulinFragmentBinding import info.nightscout.interfaces.plugin.ActivePlugin -import info.nightscout.plugins.databinding.InsulinFragmentBinding import info.nightscout.shared.interfaces.ResourceHelper import javax.inject.Inject diff --git a/plugins/main/src/main/java/info/nightscout/plugins/insulin/InsulinLyumjevPlugin.kt b/plugins/insulin/src/main/java/info/nightscout/insulin/InsulinLyumjevPlugin.kt similarity index 87% rename from plugins/main/src/main/java/info/nightscout/plugins/insulin/InsulinLyumjevPlugin.kt rename to plugins/insulin/src/main/java/info/nightscout/insulin/InsulinLyumjevPlugin.kt index 6f05cea720..dbd270c221 100644 --- a/plugins/main/src/main/java/info/nightscout/plugins/insulin/InsulinLyumjevPlugin.kt +++ b/plugins/insulin/src/main/java/info/nightscout/insulin/InsulinLyumjevPlugin.kt @@ -1,11 +1,11 @@ -package info.nightscout.plugins.insulin +package info.nightscout.insulin import dagger.android.HasAndroidInjector import info.nightscout.interfaces.Config import info.nightscout.interfaces.insulin.Insulin import info.nightscout.interfaces.profile.ProfileFunction +import info.nightscout.interfaces.ui.UiInteraction import info.nightscout.interfaces.utils.HardLimits -import info.nightscout.plugins.R import info.nightscout.rx.bus.RxBus import info.nightscout.rx.logging.AAPSLogger import info.nightscout.shared.interfaces.ResourceHelper @@ -21,8 +21,9 @@ class InsulinLyumjevPlugin @Inject constructor( rxBus: RxBus, aapsLogger: AAPSLogger, config: Config, - hardLimits: HardLimits -) : InsulinOrefBasePlugin(injector, rh, profileFunction, rxBus, aapsLogger, config, hardLimits) { + hardLimits: HardLimits, + uiInteraction: UiInteraction +) : InsulinOrefBasePlugin(injector, rh, profileFunction, rxBus, aapsLogger, config, hardLimits, uiInteraction) { override val id get(): Insulin.InsulinType = Insulin.InsulinType.OREF_LYUMJEV override val friendlyName get(): String = rh.gs(R.string.lyumjev) diff --git a/plugins/main/src/main/java/info/nightscout/plugins/insulin/InsulinOrefBasePlugin.kt b/plugins/insulin/src/main/java/info/nightscout/insulin/InsulinOrefBasePlugin.kt similarity index 91% rename from plugins/main/src/main/java/info/nightscout/plugins/insulin/InsulinOrefBasePlugin.kt rename to plugins/insulin/src/main/java/info/nightscout/insulin/InsulinOrefBasePlugin.kt index 2623e81cc2..4e5d3582ef 100644 --- a/plugins/main/src/main/java/info/nightscout/plugins/insulin/InsulinOrefBasePlugin.kt +++ b/plugins/insulin/src/main/java/info/nightscout/insulin/InsulinOrefBasePlugin.kt @@ -1,7 +1,6 @@ -package info.nightscout.plugins.insulin +package info.nightscout.insulin import dagger.android.HasAndroidInjector -import info.nightscout.core.events.EventNewNotification import info.nightscout.database.entities.Bolus import info.nightscout.database.entities.embedments.InsulinConfiguration import info.nightscout.interfaces.Config @@ -12,8 +11,8 @@ import info.nightscout.interfaces.plugin.PluginBase import info.nightscout.interfaces.plugin.PluginDescription import info.nightscout.interfaces.plugin.PluginType import info.nightscout.interfaces.profile.ProfileFunction +import info.nightscout.interfaces.ui.UiInteraction import info.nightscout.interfaces.utils.HardLimits -import info.nightscout.plugins.R import info.nightscout.rx.bus.RxBus import info.nightscout.rx.logging.AAPSLogger import info.nightscout.shared.interfaces.ResourceHelper @@ -34,7 +33,8 @@ abstract class InsulinOrefBasePlugin( val rxBus: RxBus, aapsLogger: AAPSLogger, config: Config, - val hardLimits: HardLimits + val hardLimits: HardLimits, + val uiInteraction: UiInteraction ) : PluginBase( PluginDescription() .mainType(PluginType.INSULIN) @@ -61,8 +61,7 @@ abstract class InsulinOrefBasePlugin( open fun sendShortDiaNotification(dia: Double) { if (System.currentTimeMillis() - lastWarned > 60 * 1000) { lastWarned = System.currentTimeMillis() - val notification = Notification(Notification.SHORT_DIA, String.format(notificationPattern, dia, hardLimits.minDia()), Notification.URGENT) - rxBus.send(EventNewNotification(notification)) + uiInteraction.addNotification(Notification.SHORT_DIA, String.format(notificationPattern, dia, hardLimits.minDia()), Notification.URGENT) } } diff --git a/plugins/main/src/main/java/info/nightscout/plugins/insulin/InsulinOrefFreePeakPlugin.kt b/plugins/insulin/src/main/java/info/nightscout/insulin/InsulinOrefFreePeakPlugin.kt similarity index 79% rename from plugins/main/src/main/java/info/nightscout/plugins/insulin/InsulinOrefFreePeakPlugin.kt rename to plugins/insulin/src/main/java/info/nightscout/insulin/InsulinOrefFreePeakPlugin.kt index 85a9037799..30ed94d058 100644 --- a/plugins/main/src/main/java/info/nightscout/plugins/insulin/InsulinOrefFreePeakPlugin.kt +++ b/plugins/insulin/src/main/java/info/nightscout/insulin/InsulinOrefFreePeakPlugin.kt @@ -1,4 +1,4 @@ -package info.nightscout.plugins.insulin +package info.nightscout.insulin import dagger.android.HasAndroidInjector import info.nightscout.core.extensions.putInt @@ -6,8 +6,8 @@ import info.nightscout.core.extensions.storeInt import info.nightscout.interfaces.Config import info.nightscout.interfaces.insulin.Insulin import info.nightscout.interfaces.profile.ProfileFunction +import info.nightscout.interfaces.ui.UiInteraction import info.nightscout.interfaces.utils.HardLimits -import info.nightscout.plugins.R import info.nightscout.rx.bus.RxBus import info.nightscout.rx.logging.AAPSLogger import info.nightscout.shared.interfaces.ResourceHelper @@ -28,16 +28,17 @@ class InsulinOrefFreePeakPlugin @Inject constructor( rxBus: RxBus, aapsLogger: AAPSLogger, config: Config, - hardLimits: HardLimits -) : InsulinOrefBasePlugin(injector, rh, profileFunction, rxBus, aapsLogger, config, hardLimits) { + hardLimits: HardLimits, + uiInteraction: UiInteraction +) : InsulinOrefBasePlugin(injector, rh, profileFunction, rxBus, aapsLogger, config, hardLimits, uiInteraction) { override val id get(): Insulin.InsulinType = Insulin.InsulinType.OREF_FREE_PEAK override val friendlyName get(): String = rh.gs(R.string.free_peak_oref) - override fun configuration(): JSONObject = JSONObject().putInt(R.string.key_insulin_oref_peak, sp, rh) + override fun configuration(): JSONObject = JSONObject().putInt(info.nightscout.core.utils.R.string.key_insulin_oref_peak, sp, rh) override fun applyConfiguration(configuration: JSONObject) { - configuration.storeInt(R.string.key_insulin_oref_peak, sp, rh) + configuration.storeInt(info.nightscout.core.utils.R.string.key_insulin_oref_peak, sp, rh) } override fun commentStandardText(): String { @@ -45,7 +46,7 @@ class InsulinOrefFreePeakPlugin @Inject constructor( } override val peak: Int - get() = sp.getInt(R.string.key_insulin_oref_peak, DEFAULT_PEAK) + get() = sp.getInt(info.nightscout.core.utils.R.string.key_insulin_oref_peak, DEFAULT_PEAK) companion object { diff --git a/plugins/main/src/main/java/info/nightscout/plugins/insulin/InsulinOrefRapidActingPlugin.kt b/plugins/insulin/src/main/java/info/nightscout/insulin/InsulinOrefRapidActingPlugin.kt similarity index 88% rename from plugins/main/src/main/java/info/nightscout/plugins/insulin/InsulinOrefRapidActingPlugin.kt rename to plugins/insulin/src/main/java/info/nightscout/insulin/InsulinOrefRapidActingPlugin.kt index e86c6a3261..16d4764b96 100644 --- a/plugins/main/src/main/java/info/nightscout/plugins/insulin/InsulinOrefRapidActingPlugin.kt +++ b/plugins/insulin/src/main/java/info/nightscout/insulin/InsulinOrefRapidActingPlugin.kt @@ -1,11 +1,11 @@ -package info.nightscout.plugins.insulin +package info.nightscout.insulin import dagger.android.HasAndroidInjector import info.nightscout.interfaces.Config import info.nightscout.interfaces.insulin.Insulin import info.nightscout.interfaces.profile.ProfileFunction +import info.nightscout.interfaces.ui.UiInteraction import info.nightscout.interfaces.utils.HardLimits -import info.nightscout.plugins.R import info.nightscout.rx.bus.RxBus import info.nightscout.rx.logging.AAPSLogger import info.nightscout.shared.interfaces.ResourceHelper @@ -24,8 +24,9 @@ class InsulinOrefRapidActingPlugin @Inject constructor( rxBus: RxBus, aapsLogger: AAPSLogger, config: Config, - hardLimits: HardLimits -) : InsulinOrefBasePlugin(injector, rh, profileFunction, rxBus, aapsLogger, config, hardLimits) { + hardLimits: HardLimits, + uiInteraction: UiInteraction +) : InsulinOrefBasePlugin(injector, rh, profileFunction, rxBus, aapsLogger, config, hardLimits, uiInteraction) { override val id get(): Insulin.InsulinType = Insulin.InsulinType.OREF_RAPID_ACTING override val friendlyName get(): String = rh.gs(R.string.rapid_acting_oref) diff --git a/plugins/main/src/main/java/info/nightscout/plugins/insulin/InsulinOrefUltraRapidActingPlugin.kt b/plugins/insulin/src/main/java/info/nightscout/insulin/InsulinOrefUltraRapidActingPlugin.kt similarity index 87% rename from plugins/main/src/main/java/info/nightscout/plugins/insulin/InsulinOrefUltraRapidActingPlugin.kt rename to plugins/insulin/src/main/java/info/nightscout/insulin/InsulinOrefUltraRapidActingPlugin.kt index 180eb731cd..b4a0bb19a5 100644 --- a/plugins/main/src/main/java/info/nightscout/plugins/insulin/InsulinOrefUltraRapidActingPlugin.kt +++ b/plugins/insulin/src/main/java/info/nightscout/insulin/InsulinOrefUltraRapidActingPlugin.kt @@ -1,11 +1,11 @@ -package info.nightscout.plugins.insulin +package info.nightscout.insulin import dagger.android.HasAndroidInjector import info.nightscout.interfaces.Config import info.nightscout.interfaces.insulin.Insulin import info.nightscout.interfaces.profile.ProfileFunction +import info.nightscout.interfaces.ui.UiInteraction import info.nightscout.interfaces.utils.HardLimits -import info.nightscout.plugins.R import info.nightscout.rx.bus.RxBus import info.nightscout.rx.logging.AAPSLogger import info.nightscout.shared.interfaces.ResourceHelper @@ -24,8 +24,9 @@ class InsulinOrefUltraRapidActingPlugin @Inject constructor( rxBus: RxBus, aapsLogger: AAPSLogger, config: Config, - hardLimits: HardLimits -) : InsulinOrefBasePlugin(injector, rh, profileFunction, rxBus, aapsLogger, config, hardLimits) { + hardLimits: HardLimits, + uiInteraction: UiInteraction +) : InsulinOrefBasePlugin(injector, rh, profileFunction, rxBus, aapsLogger, config, hardLimits, uiInteraction) { override val id get(): Insulin.InsulinType = Insulin.InsulinType.OREF_ULTRA_RAPID_ACTING override val friendlyName get(): String = rh.gs(R.string.ultra_rapid_oref) diff --git a/plugins/main/src/main/java/info/nightscout/plugins/di/InsulinModule.kt b/plugins/insulin/src/main/java/info/nightscout/insulin/di/InsulinModule.kt similarity index 71% rename from plugins/main/src/main/java/info/nightscout/plugins/di/InsulinModule.kt rename to plugins/insulin/src/main/java/info/nightscout/insulin/di/InsulinModule.kt index 42cce3d1f1..0f0e3af34a 100644 --- a/plugins/main/src/main/java/info/nightscout/plugins/di/InsulinModule.kt +++ b/plugins/insulin/src/main/java/info/nightscout/insulin/di/InsulinModule.kt @@ -1,8 +1,8 @@ -package info.nightscout.plugins.di +package info.nightscout.insulin.di import dagger.Module import dagger.android.ContributesAndroidInjector -import info.nightscout.plugins.insulin.InsulinFragment +import info.nightscout.insulin.InsulinFragment @Module @Suppress("unused") diff --git a/plugins/main/src/main/res/drawable/ic_insulin.xml b/plugins/insulin/src/main/res/drawable/ic_insulin.xml similarity index 100% rename from plugins/main/src/main/res/drawable/ic_insulin.xml rename to plugins/insulin/src/main/res/drawable/ic_insulin.xml diff --git a/plugins/main/src/main/res/layout/insulin_fragment.xml b/plugins/insulin/src/main/res/layout/insulin_fragment.xml similarity index 92% rename from plugins/main/src/main/res/layout/insulin_fragment.xml rename to plugins/insulin/src/main/res/layout/insulin_fragment.xml index 7733829b41..4d07600c91 100644 --- a/plugins/main/src/main/res/layout/insulin_fragment.xml +++ b/plugins/insulin/src/main/res/layout/insulin_fragment.xml @@ -2,7 +2,7 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" - tools:context=".insulin.InsulinFragment"> + tools:context="info.nightscout.insulin.InsulinFragment"> - + + + insulin_oref_peak_settings + + Lyumjev + Insulin preset for Humalog and NovoRapid / NovoLog + Insulin preset for Fiasp + Insulin preset for Lyumjev + Allows you to define the peak of the insulin activity and should only be used by advanced users + INS + IOB Curve Peak Time + Peak Time [min] + Free-Peak Oref + Rapid-Acting Oref + Ultra-Rapid Oref + DIA of %1$f too short - using %2$f instead! + Novorapid, Novolog, Humalog + Fiasp + + + \ No newline at end of file diff --git a/plugins/main/src/main/res/xml/pref_insulinoreffreepeak.xml b/plugins/insulin/src/main/res/xml/pref_insulinoreffreepeak.xml similarity index 100% rename from plugins/main/src/main/res/xml/pref_insulinoreffreepeak.xml rename to plugins/insulin/src/main/res/xml/pref_insulinoreffreepeak.xml diff --git a/plugins/insulin/src/test/java/info/nightscout/androidaps/TestBase.kt b/plugins/insulin/src/test/java/info/nightscout/androidaps/TestBase.kt new file mode 100644 index 0000000000..4fd2aef548 --- /dev/null +++ b/plugins/insulin/src/test/java/info/nightscout/androidaps/TestBase.kt @@ -0,0 +1,37 @@ +package info.nightscout.androidaps + +import info.nightscout.rx.AapsSchedulers +import info.nightscout.rx.TestAapsSchedulers +import info.nightscout.rx.logging.AAPSLoggerTest +import org.junit.jupiter.api.BeforeEach +import org.junit.jupiter.api.extension.ExtendWith +import org.mockito.Mockito +import org.mockito.junit.jupiter.MockitoExtension +import org.mockito.junit.jupiter.MockitoSettings +import org.mockito.quality.Strictness +import java.util.Locale + +@ExtendWith(MockitoExtension::class) +@MockitoSettings(strictness = Strictness.LENIENT) +open class TestBase { + + val aapsLogger = AAPSLoggerTest() + val aapsSchedulers: AapsSchedulers = TestAapsSchedulers() + + @BeforeEach + fun setupLocale() { + Locale.setDefault(Locale.ENGLISH) + System.setProperty("disableFirebase", "true") + } + + // Workaround for Kotlin nullability. + // https://medium.com/@elye.project/befriending-kotlin-and-mockito-1c2e7b0ef791 + // https://stackoverflow.com/questions/30305217/is-it-possible-to-use-mockito-in-kotlin + fun anyObject(): T { + Mockito.any() + return uninitialized() + } + + @Suppress("Unchecked_Cast") + fun uninitialized(): T = null as T +} \ No newline at end of file diff --git a/plugins/main/src/test/java/info/nightscout/plugins/insulin/InsulinLyumjevPluginTest.kt b/plugins/insulin/src/test/java/info/nightscout/insulin/InsulinLyumjevPluginTest.kt similarity index 78% rename from plugins/main/src/test/java/info/nightscout/plugins/insulin/InsulinLyumjevPluginTest.kt rename to plugins/insulin/src/test/java/info/nightscout/insulin/InsulinLyumjevPluginTest.kt index 0987238522..e03fce024a 100644 --- a/plugins/main/src/test/java/info/nightscout/plugins/insulin/InsulinLyumjevPluginTest.kt +++ b/plugins/insulin/src/test/java/info/nightscout/insulin/InsulinLyumjevPluginTest.kt @@ -1,16 +1,16 @@ -package info.nightscout.plugins.insulin +package info.nightscout.insulin import dagger.android.AndroidInjector import dagger.android.HasAndroidInjector import info.nightscout.interfaces.Config import info.nightscout.interfaces.insulin.Insulin import info.nightscout.interfaces.profile.ProfileFunction +import info.nightscout.interfaces.ui.UiInteraction import info.nightscout.interfaces.utils.HardLimits -import info.nightscout.plugins.R import info.nightscout.rx.bus.RxBus import info.nightscout.rx.logging.AAPSLogger import info.nightscout.shared.interfaces.ResourceHelper -import org.junit.Assert.assertEquals +import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -33,6 +33,7 @@ class InsulinLyumjevPluginTest { @Mock lateinit var aapsLogger: AAPSLogger @Mock lateinit var config: Config @Mock lateinit var hardLimits: HardLimits + @Mock lateinit var uiInteraction: UiInteraction private var injector: HasAndroidInjector = HasAndroidInjector { AndroidInjector { @@ -41,29 +42,29 @@ class InsulinLyumjevPluginTest { @BeforeEach fun setup() { - sut = InsulinLyumjevPlugin(injector, rh, profileFunction, rxBus, aapsLogger, config, hardLimits) + sut = InsulinLyumjevPlugin(injector, rh, profileFunction, rxBus, aapsLogger, config, hardLimits, uiInteraction) } @Test fun `simple peak test`() { - assertEquals(45, sut.peak) + Assertions.assertEquals(45, sut.peak) } @Test fun getIdTest() { - assertEquals(Insulin.InsulinType.OREF_LYUMJEV, sut.id) + Assertions.assertEquals(Insulin.InsulinType.OREF_LYUMJEV, sut.id) } @Test fun commentStandardTextTest() { `when`(rh.gs(eq(R.string.lyumjev))).thenReturn("Lyumjev") - assertEquals("Lyumjev", sut.commentStandardText()) + Assertions.assertEquals("Lyumjev", sut.commentStandardText()) } @Test fun getFriendlyNameTest() { `when`(rh.gs(eq(R.string.lyumjev))).thenReturn("Lyumjev") - assertEquals("Lyumjev", sut.friendlyName) + Assertions.assertEquals("Lyumjev", sut.friendlyName) } } \ No newline at end of file diff --git a/plugins/main/src/test/java/info/nightscout/plugins/insulin/InsulinOrefBasePluginTest.kt b/plugins/insulin/src/test/java/info/nightscout/insulin/InsulinOrefBasePluginTest.kt similarity index 77% rename from plugins/main/src/test/java/info/nightscout/plugins/insulin/InsulinOrefBasePluginTest.kt rename to plugins/insulin/src/test/java/info/nightscout/insulin/InsulinOrefBasePluginTest.kt index 5ad4a08781..4a3550392a 100644 --- a/plugins/main/src/test/java/info/nightscout/plugins/insulin/InsulinOrefBasePluginTest.kt +++ b/plugins/insulin/src/test/java/info/nightscout/insulin/InsulinOrefBasePluginTest.kt @@ -1,4 +1,4 @@ -package info.nightscout.plugins.insulin +package info.nightscout.insulin import dagger.android.AndroidInjector import dagger.android.HasAndroidInjector @@ -7,12 +7,13 @@ import info.nightscout.interfaces.Config import info.nightscout.interfaces.Constants import info.nightscout.interfaces.insulin.Insulin import info.nightscout.interfaces.profile.ProfileFunction +import info.nightscout.interfaces.ui.UiInteraction import info.nightscout.interfaces.utils.HardLimits import info.nightscout.rx.bus.RxBus import info.nightscout.rx.logging.AAPSLogger import info.nightscout.shared.interfaces.ResourceHelper import org.json.JSONObject -import org.junit.Assert +import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -38,7 +39,7 @@ class InsulinOrefBasePluginTest { aapsLogger: AAPSLogger, config: Config, hardLimits: HardLimits - ) : InsulinOrefBasePlugin(injector, rh, profileFunction, rxBus, aapsLogger, config, hardLimits) { + ) : InsulinOrefBasePlugin(injector, rh, profileFunction, rxBus, aapsLogger, config, hardLimits, uiInteraction) { override fun sendShortDiaNotification(dia: Double) { shortDiaNotificationSend = true @@ -65,6 +66,7 @@ class InsulinOrefBasePluginTest { @Mock lateinit var aapsLogger: AAPSLogger @Mock lateinit var config: Config @Mock lateinit var hardLimits: HardLimits + @Mock lateinit var uiInteraction: UiInteraction private var injector: HasAndroidInjector = HasAndroidInjector { AndroidInjector { @@ -79,12 +81,12 @@ class InsulinOrefBasePluginTest { @Test fun testGetDia() { - Assert.assertEquals(5.0, sut.dia, 0.0) + Assertions.assertEquals(5.0, sut.dia, 0.0) testUserDefinedDia = 5.0 + 1 - Assert.assertEquals(5.0 + 1, sut.dia, 0.0) + Assertions.assertEquals(5.0 + 1, sut.dia, 0.0) testUserDefinedDia = 5.0 - 1 - Assert.assertEquals(5.0, sut.dia, 0.0) - Assert.assertTrue(shortDiaNotificationSend) + Assertions.assertEquals(5.0, sut.dia, 0.0) + Assertions.assertTrue(shortDiaNotificationSend) } @Test @@ -96,22 +98,22 @@ class InsulinOrefBasePluginTest { // check directly after bolus treatment.timestamp = time treatment.amount = 10.0 - Assert.assertEquals(10.0, sut.iobCalcForTreatment(treatment, time, Constants.defaultDIA).iobContrib, 0.1) + Assertions.assertEquals(10.0, sut.iobCalcForTreatment(treatment, time, Constants.defaultDIA).iobContrib, 0.1) // check after 1 hour treatment.timestamp = time - 1 * 60 * 60 * 1000 // 1 hour treatment.amount = 10.0 - Assert.assertEquals(3.92, sut.iobCalcForTreatment(treatment, time, Constants.defaultDIA).iobContrib, 0.1) + Assertions.assertEquals(3.92, sut.iobCalcForTreatment(treatment, time, Constants.defaultDIA).iobContrib, 0.1) // check after 2 hour treatment.timestamp = time - 2 * 60 * 60 * 1000 // 2 hours treatment.amount = 10.0 - Assert.assertEquals(0.77, sut.iobCalcForTreatment(treatment, time, Constants.defaultDIA).iobContrib, 0.1) + Assertions.assertEquals(0.77, sut.iobCalcForTreatment(treatment, time, Constants.defaultDIA).iobContrib, 0.1) // check after 3 hour treatment.timestamp = time - 3 * 60 * 60 * 1000 // 3 hours treatment.amount = 10.0 - Assert.assertEquals(0.10, sut.iobCalcForTreatment(treatment, time, Constants.defaultDIA).iobContrib, 0.1) + Assertions.assertEquals(0.10, sut.iobCalcForTreatment(treatment, time, Constants.defaultDIA).iobContrib, 0.1) // check after dia treatment.timestamp = time - 4 * 60 * 60 * 1000 // 4 hours treatment.amount = 10.0 - Assert.assertEquals(0.0, sut.iobCalcForTreatment(treatment, time, Constants.defaultDIA).iobContrib, 0.1) + Assertions.assertEquals(0.0, sut.iobCalcForTreatment(treatment, time, Constants.defaultDIA).iobContrib, 0.1) } } \ No newline at end of file diff --git a/plugins/main/src/test/java/info/nightscout/plugins/insulin/InsulinOrefFreePeakPluginTest.kt b/plugins/insulin/src/test/java/info/nightscout/insulin/InsulinOrefFreePeakPluginTest.kt similarity index 69% rename from plugins/main/src/test/java/info/nightscout/plugins/insulin/InsulinOrefFreePeakPluginTest.kt rename to plugins/insulin/src/test/java/info/nightscout/insulin/InsulinOrefFreePeakPluginTest.kt index 0974ba91b5..5e20dc2eb1 100644 --- a/plugins/main/src/test/java/info/nightscout/plugins/insulin/InsulinOrefFreePeakPluginTest.kt +++ b/plugins/insulin/src/test/java/info/nightscout/insulin/InsulinOrefFreePeakPluginTest.kt @@ -1,4 +1,4 @@ -package info.nightscout.plugins.insulin +package info.nightscout.insulin import dagger.android.AndroidInjector import dagger.android.HasAndroidInjector @@ -6,12 +6,12 @@ import info.nightscout.androidaps.TestBase import info.nightscout.interfaces.Config import info.nightscout.interfaces.insulin.Insulin import info.nightscout.interfaces.profile.ProfileFunction +import info.nightscout.interfaces.ui.UiInteraction import info.nightscout.interfaces.utils.HardLimits -import info.nightscout.plugins.R import info.nightscout.rx.bus.RxBus import info.nightscout.shared.interfaces.ResourceHelper import info.nightscout.shared.sharedPreferences.SP -import org.junit.Assert.assertEquals +import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test import org.mockito.ArgumentMatchers.anyInt @@ -33,6 +33,7 @@ class InsulinOrefFreePeakPluginTest : TestBase() { @Mock lateinit var profileFunction: ProfileFunction @Mock lateinit var config: Config @Mock lateinit var hardLimits: HardLimits + @Mock lateinit var uiInteraction: UiInteraction private var injector: HasAndroidInjector = HasAndroidInjector { AndroidInjector { @@ -41,30 +42,30 @@ class InsulinOrefFreePeakPluginTest : TestBase() { @BeforeEach fun setup() { - sut = InsulinOrefFreePeakPlugin(injector, sp, rh, profileFunction, rxBus, aapsLogger, config, hardLimits) + sut = InsulinOrefFreePeakPlugin(injector, sp, rh, profileFunction, rxBus, aapsLogger, config, hardLimits, uiInteraction) } @Test fun `simple peak test`() { - `when`(sp.getInt(eq(R.string.key_insulin_oref_peak), anyInt())).thenReturn(90) - assertEquals(90, sut.peak) + `when`(sp.getInt(eq(info.nightscout.core.utils.R.string.key_insulin_oref_peak), anyInt())).thenReturn(90) + Assertions.assertEquals(90, sut.peak) } @Test fun getIdTest() { - assertEquals(Insulin.InsulinType.OREF_FREE_PEAK, sut.id) + Assertions.assertEquals(Insulin.InsulinType.OREF_FREE_PEAK, sut.id) } @Test fun commentStandardTextTest() { - `when`(sp.getInt(eq(R.string.key_insulin_oref_peak), anyInt())).thenReturn(90) + `when`(sp.getInt(eq(info.nightscout.core.utils.R.string.key_insulin_oref_peak), anyInt())).thenReturn(90) `when`(rh.gs(eq(R.string.insulin_peak_time))).thenReturn("Peak Time [min]") - assertEquals("Peak Time [min]: 90", sut.commentStandardText()) + Assertions.assertEquals("Peak Time [min]: 90", sut.commentStandardText()) } @Test fun getFriendlyNameTest() { `when`(rh.gs(eq(R.string.free_peak_oref))).thenReturn("Free-Peak Oref") - assertEquals("Free-Peak Oref", sut.friendlyName) + Assertions.assertEquals("Free-Peak Oref", sut.friendlyName) } } \ No newline at end of file diff --git a/plugins/main/src/test/java/info/nightscout/plugins/insulin/InsulinOrefRapidActingPluginTest.kt b/plugins/insulin/src/test/java/info/nightscout/insulin/InsulinOrefRapidActingPluginTest.kt similarity index 77% rename from plugins/main/src/test/java/info/nightscout/plugins/insulin/InsulinOrefRapidActingPluginTest.kt rename to plugins/insulin/src/test/java/info/nightscout/insulin/InsulinOrefRapidActingPluginTest.kt index cf1898abcf..d8d7d2a697 100644 --- a/plugins/main/src/test/java/info/nightscout/plugins/insulin/InsulinOrefRapidActingPluginTest.kt +++ b/plugins/insulin/src/test/java/info/nightscout/insulin/InsulinOrefRapidActingPluginTest.kt @@ -1,16 +1,16 @@ -package info.nightscout.plugins.insulin +package info.nightscout.insulin import dagger.android.AndroidInjector import dagger.android.HasAndroidInjector import info.nightscout.interfaces.Config import info.nightscout.interfaces.insulin.Insulin import info.nightscout.interfaces.profile.ProfileFunction +import info.nightscout.interfaces.ui.UiInteraction import info.nightscout.interfaces.utils.HardLimits -import info.nightscout.plugins.R import info.nightscout.rx.bus.RxBus import info.nightscout.rx.logging.AAPSLogger import info.nightscout.shared.interfaces.ResourceHelper -import org.junit.Assert.assertEquals +import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -33,6 +33,7 @@ class InsulinOrefRapidActingPluginTest { @Mock lateinit var aapsLogger: AAPSLogger @Mock lateinit var config: Config @Mock lateinit var hardLimits: HardLimits + @Mock lateinit var uiInteraction: UiInteraction private var injector: HasAndroidInjector = HasAndroidInjector { AndroidInjector { @@ -41,29 +42,29 @@ class InsulinOrefRapidActingPluginTest { @BeforeEach fun setup() { - sut = InsulinOrefRapidActingPlugin(injector, rh, profileFunction, rxBus, aapsLogger, config, hardLimits) + sut = InsulinOrefRapidActingPlugin(injector, rh, profileFunction, rxBus, aapsLogger, config, hardLimits, uiInteraction) } @Test fun `simple peak test`() { - assertEquals(75, sut.peak) + Assertions.assertEquals(75, sut.peak) } @Test fun getIdTest() { - assertEquals(Insulin.InsulinType.OREF_RAPID_ACTING, sut.id) + Assertions.assertEquals(Insulin.InsulinType.OREF_RAPID_ACTING, sut.id) } @Test fun commentStandardTextTest() { `when`(rh.gs(eq(R.string.fast_acting_insulin_comment))).thenReturn("Novorapid, Novolog, Humalog") - assertEquals("Novorapid, Novolog, Humalog", sut.commentStandardText()) + Assertions.assertEquals("Novorapid, Novolog, Humalog", sut.commentStandardText()) } @Test fun getFriendlyNameTest() { `when`(rh.gs(eq(R.string.rapid_acting_oref))).thenReturn("Rapid-Acting Oref") - assertEquals("Rapid-Acting Oref", sut.friendlyName) + Assertions.assertEquals("Rapid-Acting Oref", sut.friendlyName) } } \ No newline at end of file diff --git a/plugins/main/src/test/java/info/nightscout/plugins/insulin/InsulinOrefUltraRapidActingPluginTest.kt b/plugins/insulin/src/test/java/info/nightscout/insulin/InsulinOrefUltraRapidActingPluginTest.kt similarity index 78% rename from plugins/main/src/test/java/info/nightscout/plugins/insulin/InsulinOrefUltraRapidActingPluginTest.kt rename to plugins/insulin/src/test/java/info/nightscout/insulin/InsulinOrefUltraRapidActingPluginTest.kt index 9ae7fe1964..ec8dc09c5e 100644 --- a/plugins/main/src/test/java/info/nightscout/plugins/insulin/InsulinOrefUltraRapidActingPluginTest.kt +++ b/plugins/insulin/src/test/java/info/nightscout/insulin/InsulinOrefUltraRapidActingPluginTest.kt @@ -1,16 +1,16 @@ -package info.nightscout.plugins.insulin +package info.nightscout.insulin import dagger.android.AndroidInjector import dagger.android.HasAndroidInjector import info.nightscout.interfaces.Config import info.nightscout.interfaces.insulin.Insulin import info.nightscout.interfaces.profile.ProfileFunction +import info.nightscout.interfaces.ui.UiInteraction import info.nightscout.interfaces.utils.HardLimits -import info.nightscout.plugins.R import info.nightscout.rx.bus.RxBus import info.nightscout.rx.logging.AAPSLogger import info.nightscout.shared.interfaces.ResourceHelper -import org.junit.Assert.assertEquals +import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test import org.junit.jupiter.api.extension.ExtendWith @@ -33,6 +33,7 @@ class InsulinOrefUltraRapidActingPluginTest { @Mock lateinit var aapsLogger: AAPSLogger @Mock lateinit var config: Config @Mock lateinit var hardLimits: HardLimits + @Mock lateinit var uiInteraction: UiInteraction private var injector: HasAndroidInjector = HasAndroidInjector { AndroidInjector { @@ -41,29 +42,29 @@ class InsulinOrefUltraRapidActingPluginTest { @BeforeEach fun setup() { - sut = InsulinOrefUltraRapidActingPlugin(injector, rh, profileFunction, rxBus, aapsLogger, config, hardLimits) + sut = InsulinOrefUltraRapidActingPlugin(injector, rh, profileFunction, rxBus, aapsLogger, config, hardLimits, uiInteraction) } @Test fun `simple peak test`() { - assertEquals(55, sut.peak) + Assertions.assertEquals(55, sut.peak) } @Test fun getIdTest() { - assertEquals(Insulin.InsulinType.OREF_ULTRA_RAPID_ACTING, sut.id) + Assertions.assertEquals(Insulin.InsulinType.OREF_ULTRA_RAPID_ACTING, sut.id) } @Test fun commentStandardTextTest() { `when`(rh.gs(eq(R.string.ultra_fast_acting_insulin_comment))).thenReturn("Fiasp") - assertEquals("Fiasp", sut.commentStandardText()) + Assertions.assertEquals("Fiasp", sut.commentStandardText()) } @Test fun getFriendlyNameTest() { `when`(rh.gs(eq(R.string.ultra_rapid_oref))).thenReturn("Ultra-Rapid Oref") - assertEquals("Ultra-Rapid Oref", sut.friendlyName) + Assertions.assertEquals("Ultra-Rapid Oref", sut.friendlyName) } } \ No newline at end of file diff --git a/plugins/main/src/main/java/info/nightscout/plugins/di/PluginsModule.kt b/plugins/main/src/main/java/info/nightscout/plugins/di/PluginsModule.kt index 5fda8f728e..412cd23353 100644 --- a/plugins/main/src/main/java/info/nightscout/plugins/di/PluginsModule.kt +++ b/plugins/main/src/main/java/info/nightscout/plugins/di/PluginsModule.kt @@ -14,7 +14,6 @@ import info.nightscout.plugins.iob.iobCobCalculator.data.AutosensDataObject @Module( includes = [ PluginsModule.Bindings::class, - InsulinModule::class, FoodModule::class, SMSCommunicatorModule::class, ProfileModule::class, diff --git a/plugins/main/src/main/java/info/nightscout/plugins/iob/iobCobCalculator/IobCobCalculatorPlugin.kt b/plugins/main/src/main/java/info/nightscout/plugins/iob/iobCobCalculator/IobCobCalculatorPlugin.kt index 345005de50..44d4f8b4ff 100644 --- a/plugins/main/src/main/java/info/nightscout/plugins/iob/iobCobCalculator/IobCobCalculatorPlugin.kt +++ b/plugins/main/src/main/java/info/nightscout/plugins/iob/iobCobCalculator/IobCobCalculatorPlugin.kt @@ -129,7 +129,7 @@ class IobCobCalculatorPlugin @Inject constructor( event.isChanged(rh.gs(info.nightscout.core.utils.R.string.key_absorption_cutoff)) || event.isChanged(rh.gs(info.nightscout.core.utils.R.string.key_openapsama_autosens_max)) || event.isChanged(rh.gs(info.nightscout.core.utils.R.string.key_openapsama_autosens_min)) || - event.isChanged(rh.gs(R.string.key_insulin_oref_peak)) + event.isChanged(rh.gs(info.nightscout.core.utils.R.string.key_insulin_oref_peak)) ) { resetDataAndRunCalculation("onEventPreferenceChange", event) } diff --git a/plugins/main/src/main/res/layout/profile_fragment.xml b/plugins/main/src/main/res/layout/profile_fragment.xml index 00f9d49681..b1936437f4 100644 --- a/plugins/main/src/main/res/layout/profile_fragment.xml +++ b/plugins/main/src/main/res/layout/profile_fragment.xml @@ -198,7 +198,7 @@ - TBR duration must be a multiple of %1$d minutes and greater than 0. QR Code for setup one time password - - insulin_oref_peak - insulin_oref_peak_settings - - Lyumjev - Insulin preset for Humalog and NovoRapid / NovoLog - Insulin preset for Fiasp - Insulin preset for Lyumjev - Allows you to define the peak of the insulin activity and should only be used by advanced users - INS - IOB Curve Peak Time - Peak Time [min] - Free-Peak Oref - Rapid-Acting Oref - Ultra-Rapid Oref - DIA of %1$f too short - using %2$f instead! - Novorapid, Novolog, Humalog - Fiasp - xdripstatus_detailediob xdripstatus_showbgi diff --git a/settings.gradle b/settings.gradle index a7ff95a7d4..f47c3e1f04 100644 --- a/settings.gradle +++ b/settings.gradle @@ -18,6 +18,7 @@ include ':implementation' include ':plugins:aps' include ':plugins:automation' include ':plugins:configuration' +include ':plugins:insulin' include ':plugins:main' include ':plugins:openhumans' include ':plugins:sensitivity'