Move GarminPlugin to sync package.
This commit is contained in:
parent
5a17a05ee0
commit
6ee6b8b976
|
@ -43,7 +43,7 @@ import app.aaps.plugins.configuration.maintenance.MaintenancePlugin
|
||||||
import app.aaps.plugins.constraints.safety.SafetyPlugin
|
import app.aaps.plugins.constraints.safety.SafetyPlugin
|
||||||
import app.aaps.plugins.insulin.InsulinOrefFreePeakPlugin
|
import app.aaps.plugins.insulin.InsulinOrefFreePeakPlugin
|
||||||
import app.aaps.plugins.main.general.smsCommunicator.SmsCommunicatorPlugin
|
import app.aaps.plugins.main.general.smsCommunicator.SmsCommunicatorPlugin
|
||||||
import app.aaps.plugins.main.general.garmin.GarminPlugin
|
import app.aaps.plugins.sync.garmin.GarminPlugin
|
||||||
import app.aaps.plugins.main.general.wear.WearPlugin
|
import app.aaps.plugins.main.general.wear.WearPlugin
|
||||||
import app.aaps.plugins.sensitivity.SensitivityAAPSPlugin
|
import app.aaps.plugins.sensitivity.SensitivityAAPSPlugin
|
||||||
import app.aaps.plugins.sensitivity.SensitivityOref1Plugin
|
import app.aaps.plugins.sensitivity.SensitivityOref1Plugin
|
||||||
|
|
|
@ -22,7 +22,7 @@ import app.aaps.plugins.insulin.InsulinOrefRapidActingPlugin
|
||||||
import app.aaps.plugins.insulin.InsulinOrefUltraRapidActingPlugin
|
import app.aaps.plugins.insulin.InsulinOrefUltraRapidActingPlugin
|
||||||
import app.aaps.plugins.main.general.actions.ActionsPlugin
|
import app.aaps.plugins.main.general.actions.ActionsPlugin
|
||||||
import app.aaps.plugins.main.general.food.FoodPlugin
|
import app.aaps.plugins.main.general.food.FoodPlugin
|
||||||
import app.aaps.plugins.main.general.garmin.GarminPlugin
|
import app.aaps.plugins.sync.garmin.GarminPlugin
|
||||||
import app.aaps.plugins.main.general.overview.OverviewPlugin
|
import app.aaps.plugins.main.general.overview.OverviewPlugin
|
||||||
import app.aaps.plugins.main.general.persistentNotification.PersistentNotificationPlugin
|
import app.aaps.plugins.main.general.persistentNotification.PersistentNotificationPlugin
|
||||||
import app.aaps.plugins.main.general.smsCommunicator.SmsCommunicatorPlugin
|
import app.aaps.plugins.main.general.smsCommunicator.SmsCommunicatorPlugin
|
||||||
|
|
|
@ -2,7 +2,6 @@ package app.aaps.plugins.main.di
|
||||||
|
|
||||||
import app.aaps.core.interfaces.iob.IobCobCalculator
|
import app.aaps.core.interfaces.iob.IobCobCalculator
|
||||||
import app.aaps.core.interfaces.smsCommunicator.SmsCommunicator
|
import app.aaps.core.interfaces.smsCommunicator.SmsCommunicator
|
||||||
import app.aaps.plugins.main.general.garmin.GarminModule
|
|
||||||
import app.aaps.plugins.main.general.persistentNotification.DummyService
|
import app.aaps.plugins.main.general.persistentNotification.DummyService
|
||||||
import app.aaps.plugins.main.general.smsCommunicator.SmsCommunicatorPlugin
|
import app.aaps.plugins.main.general.smsCommunicator.SmsCommunicatorPlugin
|
||||||
import app.aaps.plugins.main.general.wear.WearFragment
|
import app.aaps.plugins.main.general.wear.WearFragment
|
||||||
|
@ -24,7 +23,6 @@ import dagger.android.ContributesAndroidInjector
|
||||||
ActionsModule::class,
|
ActionsModule::class,
|
||||||
WearModule::class,
|
WearModule::class,
|
||||||
OverviewModule::class,
|
OverviewModule::class,
|
||||||
GarminModule::class,
|
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
package app.aaps.plugins.main.general.garmin
|
|
||||||
|
|
||||||
import dagger.Binds
|
|
||||||
import dagger.Module
|
|
||||||
|
|
||||||
@Module
|
|
||||||
abstract class GarminModule {
|
|
||||||
@Suppress("unused")
|
|
||||||
@Binds abstract fun bindLoopHub(loopHub: LoopHubImpl): LoopHub
|
|
||||||
}
|
|
|
@ -401,8 +401,5 @@
|
||||||
<string name="default_range">DEFAULT RANGE</string>
|
<string name="default_range">DEFAULT RANGE</string>
|
||||||
<string name="target">target</string>
|
<string name="target">target</string>
|
||||||
<string name="rate_duration">Rate: %1$.2fU/h (%2$.2f%%) \nDuration %3$d min</string>
|
<string name="rate_duration">Rate: %1$.2fU/h (%2$.2f%%) \nDuration %3$d min</string>
|
||||||
<string name="garmin">Garmin</string>
|
|
||||||
<string name="garmin_description">Connection to Garmin device (Fenix, Edge, …)</string>
|
|
||||||
<string name="key_garmin_settings">Garmin settings</string>
|
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -7,6 +7,8 @@ import app.aaps.core.interfaces.nsclient.ProcessedDeviceStatusData
|
||||||
import app.aaps.core.interfaces.nsclient.StoreDataForDb
|
import app.aaps.core.interfaces.nsclient.StoreDataForDb
|
||||||
import app.aaps.core.interfaces.sync.DataSyncSelectorXdrip
|
import app.aaps.core.interfaces.sync.DataSyncSelectorXdrip
|
||||||
import app.aaps.core.interfaces.sync.XDripBroadcast
|
import app.aaps.core.interfaces.sync.XDripBroadcast
|
||||||
|
import app.aaps.plugins.sync.garmin.LoopHub
|
||||||
|
import app.aaps.plugins.sync.garmin.LoopHubImpl
|
||||||
import app.aaps.plugins.sync.nsShared.NSClientFragment
|
import app.aaps.plugins.sync.nsShared.NSClientFragment
|
||||||
import app.aaps.plugins.sync.nsShared.StoreDataForDbImpl
|
import app.aaps.plugins.sync.nsShared.StoreDataForDbImpl
|
||||||
import app.aaps.plugins.sync.nsclient.data.NSSettingsStatusImpl
|
import app.aaps.plugins.sync.nsclient.data.NSSettingsStatusImpl
|
||||||
|
@ -82,6 +84,7 @@ abstract class SyncModule {
|
||||||
@Binds fun bindDataSyncSelectorXdripInterface(dataSyncSelectorXdripImpl: DataSyncSelectorXdripImpl): DataSyncSelectorXdrip
|
@Binds fun bindDataSyncSelectorXdripInterface(dataSyncSelectorXdripImpl: DataSyncSelectorXdripImpl): DataSyncSelectorXdrip
|
||||||
@Binds fun bindStoreDataForDb(storeDataForDbImpl: StoreDataForDbImpl): StoreDataForDb
|
@Binds fun bindStoreDataForDb(storeDataForDbImpl: StoreDataForDbImpl): StoreDataForDb
|
||||||
@Binds fun bindXDripBroadcastInterface(xDripBroadcastImpl: XdripPlugin): XDripBroadcast
|
@Binds fun bindXDripBroadcastInterface(xDripBroadcastImpl: XdripPlugin): XDripBroadcast
|
||||||
|
@Binds fun bindLoopHub(loopHub: LoopHubImpl): LoopHub
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package app.aaps.plugins.main.general.garmin
|
package app.aaps.plugins.sync.garmin
|
||||||
|
|
||||||
import java.nio.ByteBuffer
|
import java.nio.ByteBuffer
|
||||||
import java.nio.ByteOrder
|
import java.nio.ByteOrder
|
|
@ -1,4 +1,4 @@
|
||||||
package app.aaps.plugins.main.general.garmin
|
package app.aaps.plugins.sync.garmin
|
||||||
|
|
||||||
import androidx.annotation.VisibleForTesting
|
import androidx.annotation.VisibleForTesting
|
||||||
import app.aaps.core.interfaces.db.GlucoseUnit
|
import app.aaps.core.interfaces.db.GlucoseUnit
|
||||||
|
@ -13,7 +13,7 @@ import app.aaps.core.interfaces.rx.events.EventNewBG
|
||||||
import app.aaps.core.interfaces.rx.events.EventPreferenceChange
|
import app.aaps.core.interfaces.rx.events.EventPreferenceChange
|
||||||
import app.aaps.core.interfaces.sharedPreferences.SP
|
import app.aaps.core.interfaces.sharedPreferences.SP
|
||||||
import app.aaps.database.entities.GlucoseValue
|
import app.aaps.database.entities.GlucoseValue
|
||||||
import app.aaps.plugins.main.R
|
import app.aaps.plugins.sync.R
|
||||||
import com.google.gson.JsonObject
|
import com.google.gson.JsonObject
|
||||||
import dagger.android.HasAndroidInjector
|
import dagger.android.HasAndroidInjector
|
||||||
import io.reactivex.rxjava3.disposables.CompositeDisposable
|
import io.reactivex.rxjava3.disposables.CompositeDisposable
|
||||||
|
@ -47,7 +47,7 @@ class GarminPlugin @Inject constructor(
|
||||||
private val sp: SP,
|
private val sp: SP,
|
||||||
) : PluginBase(
|
) : PluginBase(
|
||||||
PluginDescription()
|
PluginDescription()
|
||||||
.mainType(PluginType.GENERAL)
|
.mainType(PluginType.SYNC)
|
||||||
.pluginName(R.string.garmin)
|
.pluginName(R.string.garmin)
|
||||||
.shortName(R.string.garmin)
|
.shortName(R.string.garmin)
|
||||||
.description(R.string.garmin_description)
|
.description(R.string.garmin_description)
|
|
@ -1,4 +1,4 @@
|
||||||
package app.aaps.plugins.main.general.garmin
|
package app.aaps.plugins.sync.garmin
|
||||||
|
|
||||||
import android.os.StrictMode
|
import android.os.StrictMode
|
||||||
import androidx.annotation.VisibleForTesting
|
import androidx.annotation.VisibleForTesting
|
|
@ -1,4 +1,4 @@
|
||||||
package app.aaps.plugins.main.general.garmin
|
package app.aaps.plugins.sync.garmin
|
||||||
|
|
||||||
import app.aaps.core.interfaces.db.GlucoseUnit
|
import app.aaps.core.interfaces.db.GlucoseUnit
|
||||||
import app.aaps.core.interfaces.profile.Profile
|
import app.aaps.core.interfaces.profile.Profile
|
|
@ -1,4 +1,4 @@
|
||||||
package app.aaps.plugins.main.general.garmin
|
package app.aaps.plugins.sync.garmin
|
||||||
|
|
||||||
import androidx.annotation.VisibleForTesting
|
import androidx.annotation.VisibleForTesting
|
||||||
import app.aaps.core.interfaces.aps.Loop
|
import app.aaps.core.interfaces.aps.Loop
|
|
@ -182,4 +182,8 @@
|
||||||
<string name="data_broadcaster">Data Broadcaster</string>
|
<string name="data_broadcaster">Data Broadcaster</string>
|
||||||
<string name="data_broadcaster_description" translatable="false">Broadcast data to other apps like Garmin watch</string>
|
<string name="data_broadcaster_description" translatable="false">Broadcast data to other apps like Garmin watch</string>
|
||||||
|
|
||||||
|
<!-- GarminPlugin -->
|
||||||
|
<string name="garmin">Garmin</string>
|
||||||
|
<string name="garmin_description">Connection to Garmin device (Fenix, Edge, …)</string>
|
||||||
|
<string name="key_garmin_settings">Garmin settings</string>
|
||||||
</resources>
|
</resources>
|
|
@ -1,4 +1,4 @@
|
||||||
package app.aaps.plugins.main.general.garmin
|
package app.aaps.plugins.sync.garmin
|
||||||
|
|
||||||
|
|
||||||
import org.junit.jupiter.api.Assertions.assertArrayEquals
|
import org.junit.jupiter.api.Assertions.assertArrayEquals
|
|
@ -1,4 +1,4 @@
|
||||||
package app.aaps.plugins.main.general.garmin
|
package app.aaps.plugins.sync.garmin
|
||||||
|
|
||||||
import app.aaps.core.interfaces.resources.ResourceHelper
|
import app.aaps.core.interfaces.resources.ResourceHelper
|
||||||
import app.aaps.core.interfaces.rx.events.EventNewBG
|
import app.aaps.core.interfaces.rx.events.EventNewBG
|
|
@ -1,4 +1,4 @@
|
||||||
package app.aaps.plugins.main.general.garmin
|
package app.aaps.plugins.sync.garmin
|
||||||
|
|
||||||
import app.aaps.shared.tests.TestBase
|
import app.aaps.shared.tests.TestBase
|
||||||
import org.junit.jupiter.api.Assertions.assertEquals
|
import org.junit.jupiter.api.Assertions.assertEquals
|
|
@ -1,4 +1,4 @@
|
||||||
package app.aaps.plugins.main.general.garmin
|
package app.aaps.plugins.sync.garmin
|
||||||
|
|
||||||
|
|
||||||
import app.aaps.core.interfaces.aps.APSResult
|
import app.aaps.core.interfaces.aps.APSResult
|
Loading…
Reference in a new issue