Merge branch 'dev' into mdt_syncstorage
This commit is contained in:
commit
9e59390d75
|
@ -6,6 +6,7 @@ import android.content.IntentFilter
|
|||
import android.net.ConnectivityManager
|
||||
import android.net.wifi.WifiManager
|
||||
import android.os.Build
|
||||
import com.uber.rxdogtag.RxDogTag
|
||||
import dagger.android.AndroidInjector
|
||||
import dagger.android.DaggerApplication
|
||||
import info.nightscout.androidaps.database.AppRepository
|
||||
|
@ -62,6 +63,7 @@ class MainApp : DaggerApplication() {
|
|||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
aapsLogger.debug("onCreate")
|
||||
RxDogTag.install()
|
||||
update(this)
|
||||
|
||||
var gitRemote: String? = BuildConfig.REMOTE
|
||||
|
@ -134,4 +136,4 @@ class MainApp : DaggerApplication() {
|
|||
keepAliveManager.cancelAlarm(this)
|
||||
super.onTerminate()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,6 +31,7 @@ import info.nightscout.androidaps.plugins.profile.local.LocalProfilePlugin
|
|||
import info.nightscout.androidaps.plugins.profile.local.events.EventLocalProfileChanged
|
||||
import info.nightscout.androidaps.events.EventTreatmentUpdateGui
|
||||
import info.nightscout.androidaps.activities.fragments.TreatmentsProfileSwitchFragment.RecyclerProfileViewAdapter.ProfileSwitchViewHolder
|
||||
import info.nightscout.androidaps.events.EventEffectiveProfileSwitchChanged
|
||||
import info.nightscout.androidaps.utils.DateUtil
|
||||
import info.nightscout.androidaps.utils.FabricPrivacy
|
||||
import info.nightscout.androidaps.utils.T
|
||||
|
@ -92,6 +93,7 @@ class TreatmentsProfileSwitchFragment : DaggerFragment() {
|
|||
onError = { aapsLogger.error("Error removing entries", it) },
|
||||
onComplete = {
|
||||
rxBus.send(EventProfileSwitchChanged())
|
||||
rxBus.send(EventEffectiveProfileSwitchChanged(0L))
|
||||
rxBus.send(EventNewHistoryData(0, false))
|
||||
}
|
||||
)
|
||||
|
|
|
@ -78,9 +78,9 @@ class CompatDBHelper @Inject constructor(
|
|||
aapsLogger.debug(LTag.DATABASE, "Firing EventProfileSwitchChanged")
|
||||
rxBus.send(EventProfileSwitchChanged())
|
||||
}
|
||||
it.filterIsInstance<EffectiveProfileSwitch>().firstOrNull()?.let {
|
||||
it.filterIsInstance<EffectiveProfileSwitch>().firstOrNull()?.let { eps ->
|
||||
aapsLogger.debug(LTag.DATABASE, "Firing EventProfileSwitchChanged")
|
||||
rxBus.send(EventProfileSwitchChanged())
|
||||
rxBus.send(EventEffectiveProfileSwitchChanged(eps))
|
||||
}
|
||||
it.filterIsInstance<OfflineEvent>().firstOrNull()?.let {
|
||||
aapsLogger.debug(LTag.DATABASE, "Firing EventOfflineChange")
|
||||
|
|
|
@ -23,6 +23,7 @@ import info.nightscout.androidaps.plugins.iob.iobCobCalculator.IobCobCalculatorP
|
|||
import info.nightscout.androidaps.plugins.pump.PumpSyncImplementation
|
||||
import info.nightscout.androidaps.queue.CommandQueue
|
||||
import info.nightscout.androidaps.utils.DateUtil
|
||||
import info.nightscout.androidaps.utils.FabricPrivacy
|
||||
import info.nightscout.androidaps.utils.HardLimits
|
||||
import info.nightscout.androidaps.utils.androidNotification.NotificationHolderImpl
|
||||
import info.nightscout.androidaps.utils.buildHelper.BuildHelper
|
||||
|
@ -74,11 +75,12 @@ open class AppModule {
|
|||
fun provideProfileFunction(
|
||||
aapsLogger: AAPSLogger, sp: SP, rxBus: RxBusWrapper, resourceHelper:
|
||||
ResourceHelper, activePlugin:
|
||||
ActivePlugin, repository: AppRepository, dateUtil: DateUtil, config: Config, hardLimits: HardLimits
|
||||
ActivePlugin, repository: AppRepository, dateUtil: DateUtil, config: Config, hardLimits: HardLimits,
|
||||
aapsSchedulers: AapsSchedulers, fabricPrivacy: FabricPrivacy
|
||||
): ProfileFunction =
|
||||
ProfileFunctionImplementation(
|
||||
aapsLogger, sp, rxBus, resourceHelper, activePlugin, repository, dateUtil,
|
||||
config, hardLimits
|
||||
config, hardLimits, aapsSchedulers, fabricPrivacy
|
||||
)
|
||||
|
||||
@Module
|
||||
|
|
|
@ -42,6 +42,7 @@ import info.nightscout.androidaps.plugins.pump.combo.ComboPlugin
|
|||
import info.nightscout.androidaps.plugins.pump.insight.LocalInsightPlugin
|
||||
import info.nightscout.androidaps.plugins.pump.mdi.MDIPlugin
|
||||
import info.nightscout.androidaps.plugins.pump.medtronic.MedtronicPumpPlugin
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.OmnipodDashPumpPlugin
|
||||
import info.nightscout.androidaps.plugins.pump.virtual.VirtualPumpPlugin
|
||||
import info.nightscout.androidaps.plugins.sensitivity.SensitivityAAPSPlugin
|
||||
import info.nightscout.androidaps.plugins.sensitivity.SensitivityOref1Plugin
|
||||
|
@ -154,11 +155,11 @@ abstract class PluginsModule {
|
|||
@IntKey(150)
|
||||
abstract fun bindMedtronicPumpPlugin(plugin: MedtronicPumpPlugin): PluginBase
|
||||
|
||||
// @Binds
|
||||
// @PumpDriver
|
||||
// @IntoMap
|
||||
// @IntKey(155)
|
||||
// abstract fun bindOmnipodPumpPlugin(plugin: OmnipodErosPumpPlugin): PluginBase
|
||||
@Binds
|
||||
@PumpDriver
|
||||
@IntoMap
|
||||
@IntKey(156)
|
||||
abstract fun bindOmnipodDashPumpPlugin(plugin: OmnipodDashPumpPlugin): PluginBase
|
||||
|
||||
@Binds
|
||||
@PumpDriver
|
||||
|
@ -370,4 +371,4 @@ abstract class PluginsModule {
|
|||
@Qualifier
|
||||
annotation class APS
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
package info.nightscout.androidaps.events
|
||||
|
||||
class EventNewBasalProfile : Event()
|
|
@ -8,15 +8,18 @@ import info.nightscout.androidaps.database.AppRepository
|
|||
import info.nightscout.androidaps.database.ValueWrapper
|
||||
import info.nightscout.androidaps.database.entities.ProfileSwitch
|
||||
import info.nightscout.androidaps.database.transactions.InsertOrUpdateProfileSwitch
|
||||
import info.nightscout.androidaps.events.EventEffectiveProfileSwitchChanged
|
||||
import info.nightscout.androidaps.extensions.fromConstant
|
||||
import info.nightscout.androidaps.interfaces.*
|
||||
import info.nightscout.androidaps.logging.AAPSLogger
|
||||
import info.nightscout.androidaps.logging.LTag
|
||||
import info.nightscout.androidaps.plugins.bus.RxBusWrapper
|
||||
import info.nightscout.androidaps.utils.DateUtil
|
||||
import info.nightscout.androidaps.utils.FabricPrivacy
|
||||
import info.nightscout.androidaps.utils.HardLimits
|
||||
import info.nightscout.androidaps.utils.T
|
||||
import info.nightscout.androidaps.utils.resources.ResourceHelper
|
||||
import info.nightscout.androidaps.utils.rx.AapsSchedulers
|
||||
import info.nightscout.androidaps.utils.sharedPreferences.SP
|
||||
import io.reactivex.disposables.CompositeDisposable
|
||||
import io.reactivex.rxkotlin.plusAssign
|
||||
|
@ -34,13 +37,33 @@ class ProfileFunctionImplementation @Inject constructor(
|
|||
private val repository: AppRepository,
|
||||
private val dateUtil: DateUtil,
|
||||
private val config: Config,
|
||||
private val hardLimits: HardLimits
|
||||
private val hardLimits: HardLimits,
|
||||
private val aapsSchedulers: AapsSchedulers,
|
||||
private val fabricPrivacy: FabricPrivacy
|
||||
) : ProfileFunction {
|
||||
|
||||
val cache = LongSparseArray<Profile>()
|
||||
|
||||
private val disposable = CompositeDisposable()
|
||||
|
||||
init {
|
||||
disposable += rxBus
|
||||
.toObservable(EventEffectiveProfileSwitchChanged::class.java)
|
||||
.observeOn(aapsSchedulers.io)
|
||||
.subscribe(
|
||||
{
|
||||
for (index in cache.size() - 1 downTo 0) {
|
||||
if (cache.keyAt(index) > it.startDate) {
|
||||
aapsLogger.debug(LTag.AUTOSENS, "Removing from profileCache: " + dateUtil.dateAndTimeAndSecondsString(cache.keyAt(index)))
|
||||
cache.removeAt(index)
|
||||
} else {
|
||||
break
|
||||
}
|
||||
}
|
||||
}, fabricPrivacy::logException
|
||||
)
|
||||
}
|
||||
|
||||
override fun getProfileName(): String =
|
||||
getProfileName(System.currentTimeMillis(), customized = true, showRemainingTime = false)
|
||||
|
||||
|
@ -92,7 +115,7 @@ class ProfileFunctionImplementation @Inject constructor(
|
|||
if (sp.getString(R.string.key_units, Constants.MGDL) == Constants.MGDL) GlucoseUnit.MGDL
|
||||
else GlucoseUnit.MMOL
|
||||
|
||||
override fun buildProfileSwitch(profileStore: ProfileStore, profileName: String, durationInMinutes: Int, percentage: Int, timeShiftInHours: Int, timestamp: Long) : ProfileSwitch {
|
||||
override fun buildProfileSwitch(profileStore: ProfileStore, profileName: String, durationInMinutes: Int, percentage: Int, timeShiftInHours: Int, timestamp: Long): ProfileSwitch {
|
||||
val pureProfile = profileStore.getSpecificProfile(profileName)
|
||||
?: throw InvalidParameterSpecException(profileName)
|
||||
return ProfileSwitch(
|
||||
|
|
|
@ -5,9 +5,10 @@ import android.content.Intent
|
|||
import android.content.pm.ResolveInfo
|
||||
import android.os.Bundle
|
||||
import dagger.android.HasAndroidInjector
|
||||
import info.nightscout.androidaps.interfaces.Config
|
||||
import info.nightscout.androidaps.R
|
||||
import info.nightscout.androidaps.events.*
|
||||
import info.nightscout.androidaps.extensions.durationInMinutes
|
||||
import info.nightscout.androidaps.extensions.toStringFull
|
||||
import info.nightscout.androidaps.interfaces.*
|
||||
import info.nightscout.androidaps.logging.AAPSLogger
|
||||
import info.nightscout.androidaps.logging.LTag
|
||||
|
@ -22,8 +23,6 @@ import info.nightscout.androidaps.services.Intents
|
|||
import info.nightscout.androidaps.utils.DateUtil
|
||||
import info.nightscout.androidaps.utils.DefaultValueHelper
|
||||
import info.nightscout.androidaps.utils.FabricPrivacy
|
||||
import info.nightscout.androidaps.extensions.durationInMinutes
|
||||
import info.nightscout.androidaps.extensions.toStringFull
|
||||
import info.nightscout.androidaps.utils.resources.ResourceHelper
|
||||
import info.nightscout.androidaps.utils.rx.AapsSchedulers
|
||||
import io.reactivex.disposables.CompositeDisposable
|
||||
|
@ -79,7 +78,7 @@ class DataBroadcastPlugin @Inject constructor(
|
|||
.observeOn(aapsSchedulers.io)
|
||||
.subscribe({ sendData(it) }, fabricPrivacy::logException))
|
||||
disposable.add(rxBus
|
||||
.toObservable(EventNewBasalProfile::class.java)
|
||||
.toObservable(EventEffectiveProfileSwitchChanged::class.java)
|
||||
.observeOn(aapsSchedulers.io)
|
||||
.subscribe({ sendData(it) }, fabricPrivacy::logException))
|
||||
disposable.add(rxBus
|
||||
|
|
|
@ -14,7 +14,9 @@ import info.nightscout.androidaps.plugins.profile.local.LocalProfilePlugin
|
|||
import info.nightscout.androidaps.utils.DateUtil
|
||||
import info.nightscout.androidaps.utils.sharedPreferences.SP
|
||||
import javax.inject.Inject
|
||||
import javax.inject.Singleton
|
||||
|
||||
@Singleton
|
||||
class DataSyncSelectorImplementation @Inject constructor(
|
||||
private val sp: SP,
|
||||
private val aapsLogger: AAPSLogger,
|
||||
|
@ -26,6 +28,42 @@ class DataSyncSelectorImplementation @Inject constructor(
|
|||
private val localProfilePlugin: LocalProfilePlugin
|
||||
) : DataSyncSelector {
|
||||
|
||||
class QueueCounter (
|
||||
var bolusesRemaining: Long = 0L,
|
||||
var carbsRemaining: Long = 0L,
|
||||
var bcrRemaining: Long = 0L,
|
||||
var ttsRemaining: Long = 0L,
|
||||
var foodsRemaining: Long = 0L,
|
||||
var gvsRemaining: Long = 0L,
|
||||
var tesRemaining: Long = 0L,
|
||||
var dssRemaining: Long = 0L,
|
||||
var tbrsRemaining: Long = 0L,
|
||||
var ebsRemaining: Long = 0L,
|
||||
var pssRemaining: Long = 0L,
|
||||
var epssRemaining: Long = 0L,
|
||||
var oesRemaining: Long = 0L
|
||||
) {
|
||||
|
||||
fun size(): Long =
|
||||
bolusesRemaining +
|
||||
carbsRemaining +
|
||||
bcrRemaining +
|
||||
ttsRemaining +
|
||||
foodsRemaining +
|
||||
gvsRemaining +
|
||||
tesRemaining +
|
||||
dssRemaining +
|
||||
tbrsRemaining +
|
||||
ebsRemaining +
|
||||
pssRemaining +
|
||||
epssRemaining +
|
||||
oesRemaining
|
||||
}
|
||||
|
||||
private val queueCounter = QueueCounter()
|
||||
|
||||
override fun queueSize(): Long = queueCounter.size()
|
||||
|
||||
override fun doUpload() {
|
||||
if (sp.getBoolean(R.string.key_ns_upload, true)) {
|
||||
processChangedBolusesCompat()
|
||||
|
@ -80,8 +118,8 @@ class DataSyncSelectorImplementation @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
@Volatile private var lastBolusId = -1L
|
||||
@Volatile private var lastBolusTime = -1L
|
||||
//private var lastBolusId = -1L
|
||||
//private var lastBolusTime = -1L
|
||||
override fun processChangedBolusesCompat(): Boolean {
|
||||
val lastDbIdWrapped = appRepository.getLastBolusIdWrapped().blockingGet()
|
||||
val lastDbId = if (lastDbIdWrapped is ValueWrapper.Existing) lastDbIdWrapped.value else 0L
|
||||
|
@ -90,18 +128,27 @@ class DataSyncSelectorImplementation @Inject constructor(
|
|||
sp.putLong(R.string.key_ns_bolus_last_synced_id, 0)
|
||||
startId = 0
|
||||
}
|
||||
if (startId == lastBolusId && dateUtil.now() - lastBolusTime < 5000) return false
|
||||
lastBolusId = startId
|
||||
lastBolusTime = dateUtil.now()
|
||||
//if (startId == lastBolusId && dateUtil.now() - lastBolusTime < 5000) return false
|
||||
//lastBolusId = startId
|
||||
//lastBolusTime = dateUtil.now()
|
||||
queueCounter.bolusesRemaining = lastDbId - startId
|
||||
appRepository.getNextSyncElementBolus(startId).blockingGet()?.let { bolus ->
|
||||
aapsLogger.info(LTag.DATABASE, "Loading Bolus data Start: $startId ID: ${bolus.first.id} HistoryID: ${bolus.second} ")
|
||||
aapsLogger.info(LTag.DATABASE, "Loading Bolus data Start: $startId ID: ${bolus.first.id} HistoryID: ${bolus.second.id} ")
|
||||
when {
|
||||
// only NsId changed, no need to upload
|
||||
bolus.first.onlyNsIdAdded(bolus.second) -> {
|
||||
confirmLastBolusIdIfGreater(bolus.second.id)
|
||||
//lastBolusId = -1
|
||||
processChangedBolusesCompat()
|
||||
aapsLogger.info(LTag.DATABASE, "Ignoring Bolus. Only NS id changed ID: ${bolus.first.id} HistoryID: ${bolus.second.id} ")
|
||||
return false
|
||||
}
|
||||
// without nsId = create new
|
||||
bolus.first.interfaceIDs.nightscoutId == null ->
|
||||
nsClientPlugin.nsClientService?.dbAdd("treatments", bolus.first.toJson(true, dateUtil), DataSyncSelector.PairBolus(bolus.first, bolus.second), "$startId/$lastDbId")
|
||||
nsClientPlugin.nsClientService?.dbAdd("treatments", bolus.first.toJson(true, dateUtil), DataSyncSelector.PairBolus(bolus.first, bolus.second.id), "$startId/$lastDbId")
|
||||
// with nsId = update
|
||||
bolus.first.interfaceIDs.nightscoutId != null ->
|
||||
nsClientPlugin.nsClientService?.dbUpdate("treatments", bolus.first.interfaceIDs.nightscoutId, bolus.first.toJson(false, dateUtil), DataSyncSelector.PairBolus(bolus.first, bolus.second), "$startId/$lastDbId")
|
||||
nsClientPlugin.nsClientService?.dbUpdate("treatments", bolus.first.interfaceIDs.nightscoutId, bolus.first.toJson(false, dateUtil), DataSyncSelector.PairBolus(bolus.first, bolus.second.id), "$startId/$lastDbId")
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
@ -123,8 +170,8 @@ class DataSyncSelectorImplementation @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
@Volatile private var lastCarbsId = -1L
|
||||
@Volatile private var lastCarbsTime = -1L
|
||||
//private var lastCarbsId = -1L
|
||||
//private var lastCarbsTime = -1L
|
||||
override fun processChangedCarbsCompat(): Boolean {
|
||||
val lastDbIdWrapped = appRepository.getLastCarbsIdWrapped().blockingGet()
|
||||
val lastDbId = if (lastDbIdWrapped is ValueWrapper.Existing) lastDbIdWrapped.value else 0L
|
||||
|
@ -133,18 +180,27 @@ class DataSyncSelectorImplementation @Inject constructor(
|
|||
sp.putLong(R.string.key_ns_carbs_last_synced_id, 0)
|
||||
startId = 0
|
||||
}
|
||||
if (startId == lastCarbsId && dateUtil.now() - lastCarbsTime < 5000) return false
|
||||
lastCarbsId = startId
|
||||
lastCarbsTime = dateUtil.now()
|
||||
//if (startId == lastCarbsId && dateUtil.now() - lastCarbsTime < 5000) return false
|
||||
//lastCarbsId = startId
|
||||
//lastCarbsTime = dateUtil.now()
|
||||
queueCounter.carbsRemaining = lastDbId - startId
|
||||
appRepository.getNextSyncElementCarbs(startId).blockingGet()?.let { carb ->
|
||||
aapsLogger.info(LTag.DATABASE, "Loading Carbs data Start: $startId ID: ${carb.first.id} HistoryID: ${carb.second} ")
|
||||
aapsLogger.info(LTag.DATABASE, "Loading Carbs data Start: $startId ID: ${carb.first.id} HistoryID: ${carb.second.id} ")
|
||||
when {
|
||||
// only NsId changed, no need to upload
|
||||
carb.first.onlyNsIdAdded(carb.second) -> {
|
||||
confirmLastCarbsIdIfGreater(carb.second.id)
|
||||
//lastCarbsId = -1
|
||||
processChangedCarbsCompat()
|
||||
aapsLogger.info(LTag.DATABASE, "Ignoring Carbs. Only NS id changed ID: ${carb.first.id} HistoryID: ${carb.second.id} ")
|
||||
return false
|
||||
}
|
||||
// without nsId = create new
|
||||
carb.first.interfaceIDs.nightscoutId == null ->
|
||||
nsClientPlugin.nsClientService?.dbAdd("treatments", carb.first.toJson(true, dateUtil), DataSyncSelector.PairCarbs(carb.first, carb.second), "$startId/$lastDbId")
|
||||
nsClientPlugin.nsClientService?.dbAdd("treatments", carb.first.toJson(true, dateUtil), DataSyncSelector.PairCarbs(carb.first, carb.second.id), "$startId/$lastDbId")
|
||||
// with nsId = update
|
||||
carb.first.interfaceIDs.nightscoutId != null ->
|
||||
nsClientPlugin.nsClientService?.dbUpdate("treatments", carb.first.interfaceIDs.nightscoutId, carb.first.toJson(false, dateUtil), DataSyncSelector.PairCarbs(carb.first, carb.second), "$startId/$lastDbId")
|
||||
nsClientPlugin.nsClientService?.dbUpdate("treatments", carb.first.interfaceIDs.nightscoutId, carb.first.toJson(false, dateUtil), DataSyncSelector.PairCarbs(carb.first, carb.second.id), "$startId/$lastDbId")
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
@ -166,8 +222,8 @@ class DataSyncSelectorImplementation @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
@Volatile private var lastBcrId = -1L
|
||||
@Volatile private var lastBcrTime = -1L
|
||||
//private var lastBcrId = -1L
|
||||
//private var lastBcrTime = -1L
|
||||
override fun processChangedBolusCalculatorResultsCompat(): Boolean {
|
||||
val lastDbIdWrapped = appRepository.getLastBolusCalculatorResultIdWrapped().blockingGet()
|
||||
val lastDbId = if (lastDbIdWrapped is ValueWrapper.Existing) lastDbIdWrapped.value else 0L
|
||||
|
@ -176,18 +232,28 @@ class DataSyncSelectorImplementation @Inject constructor(
|
|||
sp.putLong(R.string.key_ns_bolus_calculator_result_last_synced_id, 0)
|
||||
startId = 0
|
||||
}
|
||||
if (startId == lastBcrId && dateUtil.now() - lastBcrTime < 5000) return false
|
||||
lastBcrId = startId
|
||||
lastBcrTime = dateUtil.now()
|
||||
//if (startId == lastBcrId && dateUtil.now() - lastBcrTime < 5000) return false
|
||||
//lastBcrId = startId
|
||||
//lastBcrTime = dateUtil.now()
|
||||
queueCounter.bcrRemaining = lastDbId - startId
|
||||
appRepository.getNextSyncElementBolusCalculatorResult(startId).blockingGet()?.let { bolusCalculatorResult ->
|
||||
aapsLogger.info(LTag.DATABASE, "Loading BolusCalculatorResult data Start: $startId ID: ${bolusCalculatorResult.first.id} HistoryID: ${bolusCalculatorResult.second} ")
|
||||
aapsLogger.info(LTag.DATABASE, "Loading BolusCalculatorResult data Start: $startId ID: ${bolusCalculatorResult.first.id} HistoryID: ${bolusCalculatorResult.second.id} ")
|
||||
when {
|
||||
// only NsId changed, no need to upload
|
||||
bolusCalculatorResult.first.onlyNsIdAdded(bolusCalculatorResult.second) -> {
|
||||
confirmLastBolusCalculatorResultsIdIfGreater(bolusCalculatorResult.second.id)
|
||||
//lastBcrId = -1
|
||||
processChangedBolusCalculatorResultsCompat()
|
||||
aapsLogger.info(LTag.DATABASE, "Ignoring BolusCalculatorResult. Only NS id changed ID: ${bolusCalculatorResult.first.id} HistoryID: ${bolusCalculatorResult.second.id} ")
|
||||
return false
|
||||
}
|
||||
// without nsId = create new
|
||||
bolusCalculatorResult.first.interfaceIDs.nightscoutId == null ->
|
||||
nsClientPlugin.nsClientService?.dbAdd("treatments", bolusCalculatorResult.first.toJson(true, dateUtil), DataSyncSelector.PairBolusCalculatorResult(bolusCalculatorResult.first, bolusCalculatorResult.second), "$startId/$lastDbId")
|
||||
nsClientPlugin.nsClientService?.dbAdd("treatments", bolusCalculatorResult.first.toJson(true, dateUtil), DataSyncSelector.PairBolusCalculatorResult(bolusCalculatorResult.first, bolusCalculatorResult.second.id), "$startId/$lastDbId")
|
||||
// with nsId = update
|
||||
bolusCalculatorResult.first.interfaceIDs.nightscoutId != null ->
|
||||
nsClientPlugin.nsClientService?.dbUpdate("treatments", bolusCalculatorResult.first.interfaceIDs.nightscoutId, bolusCalculatorResult.first.toJson(false, dateUtil), DataSyncSelector.PairBolusCalculatorResult(bolusCalculatorResult.first, bolusCalculatorResult.second), "$startId/$lastDbId")
|
||||
nsClientPlugin.nsClientService?.dbUpdate("treatments", bolusCalculatorResult.first.interfaceIDs.nightscoutId, bolusCalculatorResult.first.toJson(false, dateUtil),
|
||||
DataSyncSelector.PairBolusCalculatorResult(bolusCalculatorResult.first, bolusCalculatorResult.second.id), "$startId/$lastDbId")
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
@ -209,8 +275,8 @@ class DataSyncSelectorImplementation @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
@Volatile private var lastTtId = -1L
|
||||
@Volatile private var lastTtTime = -1L
|
||||
//private var lastTtId = -1L
|
||||
//private var lastTtTime = -1L
|
||||
override fun processChangedTempTargetsCompat(): Boolean {
|
||||
val lastDbIdWrapped = appRepository.getLastTempTargetIdWrapped().blockingGet()
|
||||
val lastDbId = if (lastDbIdWrapped is ValueWrapper.Existing) lastDbIdWrapped.value else 0L
|
||||
|
@ -219,18 +285,27 @@ class DataSyncSelectorImplementation @Inject constructor(
|
|||
sp.putLong(R.string.key_ns_temporary_target_last_synced_id, 0)
|
||||
startId = 0
|
||||
}
|
||||
if (startId == lastTtId && dateUtil.now() - lastTtTime < 5000) return false
|
||||
lastTtId = startId
|
||||
lastTtTime = dateUtil.now()
|
||||
//if (startId == lastTtId && dateUtil.now() - lastTtTime < 5000) return false
|
||||
//lastTtId = startId
|
||||
//lastTtTime = dateUtil.now()
|
||||
queueCounter.ttsRemaining = lastDbId - startId
|
||||
appRepository.getNextSyncElementTemporaryTarget(startId).blockingGet()?.let { tt ->
|
||||
aapsLogger.info(LTag.DATABASE, "Loading TemporaryTarget data Start: $startId ID: ${tt.first.id} HistoryID: ${tt.second} ")
|
||||
aapsLogger.info(LTag.DATABASE, "Loading TemporaryTarget data Start: $startId ID: ${tt.first.id} HistoryID: ${tt.second.id} ")
|
||||
when {
|
||||
// only NsId changed, no need to upload
|
||||
tt.first.onlyNsIdAdded(tt.second) -> {
|
||||
confirmLastTempTargetsIdIfGreater(tt.second.id)
|
||||
//lastTtId = -1
|
||||
processChangedTempTargetsCompat()
|
||||
aapsLogger.info(LTag.DATABASE, "Ignoring TemporaryTarget. Only NS id changed ID: ${tt.first.id} HistoryID: ${tt.second.id} ")
|
||||
return false
|
||||
}
|
||||
// without nsId = create new
|
||||
tt.first.interfaceIDs.nightscoutId == null ->
|
||||
nsClientPlugin.nsClientService?.dbAdd("treatments", tt.first.toJson(true, profileFunction.getUnits(), dateUtil), DataSyncSelector.PairTemporaryTarget(tt.first, tt.second), "$startId/$lastDbId")
|
||||
nsClientPlugin.nsClientService?.dbAdd("treatments", tt.first.toJson(true, profileFunction.getUnits(), dateUtil), DataSyncSelector.PairTemporaryTarget(tt.first, tt.second.id), "$startId/$lastDbId")
|
||||
// existing with nsId = update
|
||||
tt.first.interfaceIDs.nightscoutId != null ->
|
||||
nsClientPlugin.nsClientService?.dbUpdate("treatments", tt.first.interfaceIDs.nightscoutId, tt.first.toJson(false, profileFunction.getUnits(), dateUtil), DataSyncSelector.PairTemporaryTarget(tt.first, tt.second), "$startId/$lastDbId")
|
||||
nsClientPlugin.nsClientService?.dbUpdate("treatments", tt.first.interfaceIDs.nightscoutId, tt.first.toJson(false, profileFunction.getUnits(), dateUtil), DataSyncSelector.PairTemporaryTarget(tt.first, tt.second.id), "$startId/$lastDbId")
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
@ -252,8 +327,8 @@ class DataSyncSelectorImplementation @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
@Volatile private var lastFoodId = -1L
|
||||
@Volatile private var lastFoodTime = -1L
|
||||
//private var lastFoodId = -1L
|
||||
//private var lastFoodTime = -1L
|
||||
override fun processChangedFoodsCompat(): Boolean {
|
||||
val lastDbIdWrapped = appRepository.getLastFoodIdWrapped().blockingGet()
|
||||
val lastDbId = if (lastDbIdWrapped is ValueWrapper.Existing) lastDbIdWrapped.value else 0L
|
||||
|
@ -262,18 +337,27 @@ class DataSyncSelectorImplementation @Inject constructor(
|
|||
sp.putLong(R.string.key_ns_food_last_synced_id, 0)
|
||||
startId = 0
|
||||
}
|
||||
if (startId == lastFoodId && dateUtil.now() - lastFoodTime < 5000) return false
|
||||
lastFoodId = startId
|
||||
lastFoodTime = dateUtil.now()
|
||||
//if (startId == lastFoodId && dateUtil.now() - lastFoodTime < 5000) return false
|
||||
//lastFoodId = startId
|
||||
//lastFoodTime = dateUtil.now()
|
||||
queueCounter.foodsRemaining = lastDbId - startId
|
||||
appRepository.getNextSyncElementFood(startId).blockingGet()?.let { food ->
|
||||
aapsLogger.info(LTag.DATABASE, "Loading Food data Start: $startId ID: ${food.first.id} HistoryID: ${food.second} ")
|
||||
when {
|
||||
// only NsId changed, no need to upload
|
||||
food.first.onlyNsIdAdded(food.second) -> {
|
||||
confirmLastFoodIdIfGreater(food.second.id)
|
||||
//lastFoodId = -1
|
||||
processChangedFoodsCompat()
|
||||
aapsLogger.info(LTag.DATABASE, "Ignoring Food. Only NS id changed ID: ${food.first.id} HistoryID: ${food.second.id} ")
|
||||
return false
|
||||
}
|
||||
// without nsId = create new
|
||||
food.first.interfaceIDs.nightscoutId == null ->
|
||||
nsClientPlugin.nsClientService?.dbAdd("food", food.first.toJson(true), DataSyncSelector.PairFood(food.first, food.second), "$startId/$lastDbId")
|
||||
nsClientPlugin.nsClientService?.dbAdd("food", food.first.toJson(true), DataSyncSelector.PairFood(food.first, food.second.id), "$startId/$lastDbId")
|
||||
// with nsId = update
|
||||
food.first.interfaceIDs.nightscoutId != null ->
|
||||
nsClientPlugin.nsClientService?.dbUpdate("food", food.first.interfaceIDs.nightscoutId, food.first.toJson(false), DataSyncSelector.PairFood(food.first, food.second), "$startId/$lastDbId")
|
||||
nsClientPlugin.nsClientService?.dbUpdate("food", food.first.interfaceIDs.nightscoutId, food.first.toJson(false), DataSyncSelector.PairFood(food.first, food.second.id), "$startId/$lastDbId")
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
@ -295,8 +379,8 @@ class DataSyncSelectorImplementation @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
@Volatile private var lastGvId = -1L
|
||||
@Volatile private var lastGvTime = -1L
|
||||
//private var lastGvId = -1L
|
||||
//private var lastGvTime = -1L
|
||||
override fun processChangedGlucoseValuesCompat(): Boolean {
|
||||
val lastDbIdWrapped = appRepository.getLastGlucoseValueIdWrapped().blockingGet()
|
||||
val lastDbId = if (lastDbIdWrapped is ValueWrapper.Existing) lastDbIdWrapped.value else 0L
|
||||
|
@ -305,24 +389,33 @@ class DataSyncSelectorImplementation @Inject constructor(
|
|||
sp.putLong(R.string.key_ns_glucose_value_last_synced_id, 0)
|
||||
startId = 0
|
||||
}
|
||||
if (startId == lastGvId && dateUtil.now() - lastGvTime < 5000) return false
|
||||
lastGvId = startId
|
||||
lastGvTime = dateUtil.now()
|
||||
//if (startId == lastGvId && dateUtil.now() - lastGvTime < 5000) return false
|
||||
//lastGvId = startId
|
||||
//lastGvTime = dateUtil.now()
|
||||
queueCounter.gvsRemaining = lastDbId - startId
|
||||
appRepository.getNextSyncElementGlucoseValue(startId).blockingGet()?.let { gv ->
|
||||
aapsLogger.info(LTag.DATABASE, "Loading GlucoseValue data Start: $startId ID: ${gv.first.id} HistoryID: ${gv.second} ")
|
||||
aapsLogger.info(LTag.DATABASE, "Loading GlucoseValue data ID: ${gv.first.id} HistoryID: ${gv.second.id} ")
|
||||
if (activePlugin.activeBgSource.shouldUploadToNs(gv.first)) {
|
||||
when {
|
||||
// only NsId changed, no need to upload
|
||||
gv.first.onlyNsIdAdded(gv.second) -> {
|
||||
confirmLastGlucoseValueIdIfGreater(gv.second.id)
|
||||
//lastGvId = -1
|
||||
processChangedGlucoseValuesCompat()
|
||||
aapsLogger.info(LTag.DATABASE, "Ignoring GlucoseValue. Only NS id changed ID: ${gv.first.id} HistoryID: ${gv.second.id} ")
|
||||
return false
|
||||
}
|
||||
// without nsId = create new
|
||||
gv.first.interfaceIDs.nightscoutId == null ->
|
||||
nsClientPlugin.nsClientService?.dbAdd("entries", gv.first.toJson(true, dateUtil), DataSyncSelector.PairGlucoseValue(gv.first, gv.second), "$startId/$lastDbId")
|
||||
nsClientPlugin.nsClientService?.dbAdd("entries", gv.first.toJson(true, dateUtil), DataSyncSelector.PairGlucoseValue(gv.first, gv.second.id), "$startId/$lastDbId")
|
||||
// with nsId = update
|
||||
gv.first.interfaceIDs.nightscoutId != null ->
|
||||
nsClientPlugin.nsClientService?.dbUpdate("entries", gv.first.interfaceIDs.nightscoutId, gv.first.toJson(false, dateUtil), DataSyncSelector.PairGlucoseValue(gv.first, gv.second), "$startId/$lastDbId")
|
||||
nsClientPlugin.nsClientService?.dbUpdate("entries", gv.first.interfaceIDs.nightscoutId, gv.first.toJson(false, dateUtil), DataSyncSelector.PairGlucoseValue(gv.first, gv.second.id), "$startId/$lastDbId")
|
||||
}
|
||||
return true
|
||||
} else {
|
||||
confirmLastGlucoseValueIdIfGreater(gv.second)
|
||||
lastGvId = -1
|
||||
confirmLastGlucoseValueIdIfGreater(gv.second.id)
|
||||
//lastGvId = -1
|
||||
processChangedGlucoseValuesCompat()
|
||||
}
|
||||
}
|
||||
|
@ -344,8 +437,8 @@ class DataSyncSelectorImplementation @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
@Volatile private var lastTeId = -1L
|
||||
@Volatile private var lastTeTime = -1L
|
||||
//private var lastTeId = -1L
|
||||
//private var lastTeTime = -1L
|
||||
override fun processChangedTherapyEventsCompat(): Boolean {
|
||||
val lastDbIdWrapped = appRepository.getLastTherapyEventIdWrapped().blockingGet()
|
||||
val lastDbId = if (lastDbIdWrapped is ValueWrapper.Existing) lastDbIdWrapped.value else 0L
|
||||
|
@ -354,18 +447,27 @@ class DataSyncSelectorImplementation @Inject constructor(
|
|||
sp.putLong(R.string.key_ns_therapy_event_last_synced_id, 0)
|
||||
startId = 0
|
||||
}
|
||||
if (startId == lastTeId && dateUtil.now() - lastTeTime < 5000) return false
|
||||
lastTeId = startId
|
||||
lastTeTime = dateUtil.now()
|
||||
//if (startId == lastTeId && dateUtil.now() - lastTeTime < 5000) return false
|
||||
//lastTeId = startId
|
||||
//lastTeTime = dateUtil.now()
|
||||
queueCounter.tesRemaining = lastDbId - startId
|
||||
appRepository.getNextSyncElementTherapyEvent(startId).blockingGet()?.let { te ->
|
||||
aapsLogger.info(LTag.DATABASE, "Loading TherapyEvents data Start: $startId ID: ${te.first.id} HistoryID: ${te.second} ")
|
||||
when {
|
||||
// only NsId changed, no need to upload
|
||||
te.first.onlyNsIdAdded(te.second) -> {
|
||||
confirmLastTherapyEventIdIfGreater(te.second.id)
|
||||
//lastTeId = -1
|
||||
processChangedTherapyEventsCompat()
|
||||
aapsLogger.info(LTag.DATABASE, "Ignoring TherapyEvents. Only NS id changed ID: ${te.first.id} HistoryID: ${te.second.id} ")
|
||||
return false
|
||||
}
|
||||
// without nsId = create new
|
||||
te.first.interfaceIDs.nightscoutId == null ->
|
||||
nsClientPlugin.nsClientService?.dbAdd("treatments", te.first.toJson(true, dateUtil), DataSyncSelector.PairTherapyEvent(te.first, te.second), "$startId/$lastDbId")
|
||||
nsClientPlugin.nsClientService?.dbAdd("treatments", te.first.toJson(true, dateUtil), DataSyncSelector.PairTherapyEvent(te.first, te.second.id), "$startId/$lastDbId")
|
||||
// nsId = update
|
||||
te.first.interfaceIDs.nightscoutId != null ->
|
||||
nsClientPlugin.nsClientService?.dbUpdate("treatments", te.first.interfaceIDs.nightscoutId, te.first.toJson(false, dateUtil), DataSyncSelector.PairTherapyEvent(te.first, te.second), "$startId/$lastDbId")
|
||||
nsClientPlugin.nsClientService?.dbUpdate("treatments", te.first.interfaceIDs.nightscoutId, te.first.toJson(false, dateUtil), DataSyncSelector.PairTherapyEvent(te.first, te.second.id), "$startId/$lastDbId")
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
@ -386,8 +488,8 @@ class DataSyncSelectorImplementation @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
@Volatile private var lastDsId = -1L
|
||||
@Volatile private var lastDsTime = -1L
|
||||
//private var lastDsId = -1L
|
||||
//private var lastDsTime = -1L
|
||||
override fun processChangedDeviceStatusesCompat(): Boolean {
|
||||
val lastDbIdWrapped = appRepository.getLastDeviceStatusIdWrapped().blockingGet()
|
||||
val lastDbId = if (lastDbIdWrapped is ValueWrapper.Existing) lastDbIdWrapped.value else 0L
|
||||
|
@ -396,9 +498,10 @@ class DataSyncSelectorImplementation @Inject constructor(
|
|||
sp.putLong(R.string.key_ns_device_status_last_synced_id, 0)
|
||||
startId = 0
|
||||
}
|
||||
if (startId == lastDsId && dateUtil.now() - lastDsTime < 5000) return false
|
||||
lastDsId = startId
|
||||
lastDsTime = dateUtil.now()
|
||||
//if (startId == lastDsId && dateUtil.now() - lastDsTime < 5000) return false
|
||||
//lastDsId = startId
|
||||
//lastDsTime = dateUtil.now()
|
||||
queueCounter.dssRemaining = lastDbId - startId
|
||||
appRepository.getNextSyncElementDeviceStatus(startId).blockingGet()?.let { deviceStatus ->
|
||||
aapsLogger.info(LTag.DATABASE, "Loading DeviceStatus data Start: $startId ID: ${deviceStatus.id}")
|
||||
when {
|
||||
|
@ -428,8 +531,8 @@ class DataSyncSelectorImplementation @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
@Volatile private var lastTbrId = -1L
|
||||
@Volatile private var lastTbrTime = -1L
|
||||
//private var lastTbrId = -1L
|
||||
//private var lastTbrTime = -1L
|
||||
override fun processChangedTemporaryBasalsCompat(): Boolean {
|
||||
val useAbsolute = sp.getBoolean(R.string.key_ns_sync_use_absolute, false)
|
||||
val lastDbIdWrapped = appRepository.getLastTemporaryBasalIdWrapped().blockingGet()
|
||||
|
@ -439,25 +542,34 @@ class DataSyncSelectorImplementation @Inject constructor(
|
|||
sp.putLong(R.string.key_ns_temporary_basal_last_synced_id, 0)
|
||||
startId = 0
|
||||
}
|
||||
if (startId == lastTbrId && dateUtil.now() - lastTbrTime < 5000) return false
|
||||
lastTbrId = startId
|
||||
lastTbrTime = dateUtil.now()
|
||||
//if (startId == lastTbrId && dateUtil.now() - lastTbrTime < 5000) return false
|
||||
//lastTbrId = startId
|
||||
//lastTbrTime = dateUtil.now()
|
||||
queueCounter.tbrsRemaining = lastDbId - startId
|
||||
appRepository.getNextSyncElementTemporaryBasal(startId).blockingGet()?.let { tb ->
|
||||
aapsLogger.info(LTag.DATABASE, "Loading TemporaryBasal data Start: $startId ID: ${tb.first.id} HistoryID: ${tb.second} ")
|
||||
val profile = profileFunction.getProfile(tb.first.timestamp)
|
||||
if (profile != null) {
|
||||
when {
|
||||
// only NsId changed, no need to upload
|
||||
tb.first.onlyNsIdAdded(tb.second) -> {
|
||||
confirmLastTemporaryBasalIdIfGreater(tb.second.id)
|
||||
//lastTbrId = -1
|
||||
processChangedTemporaryBasalsCompat()
|
||||
aapsLogger.info(LTag.DATABASE, "Ignoring TemporaryBasal. Only NS id changed ID: ${tb.first.id} HistoryID: ${tb.second.id} ")
|
||||
return false
|
||||
}
|
||||
// without nsId = create new
|
||||
tb.first.interfaceIDs.nightscoutId == null ->
|
||||
nsClientPlugin.nsClientService?.dbAdd("treatments", tb.first.toJson(true, profile, dateUtil, useAbsolute), DataSyncSelector.PairTemporaryBasal(tb.first, tb.second), "$startId/$lastDbId")
|
||||
nsClientPlugin.nsClientService?.dbAdd("treatments", tb.first.toJson(true, profile, dateUtil, useAbsolute), DataSyncSelector.PairTemporaryBasal(tb.first, tb.second.id), "$startId/$lastDbId")
|
||||
// with nsId = update
|
||||
tb.first.interfaceIDs.nightscoutId != null ->
|
||||
nsClientPlugin.nsClientService?.dbUpdate("treatments", tb.first.interfaceIDs.nightscoutId, tb.first.toJson(false, profile, dateUtil, useAbsolute), DataSyncSelector.PairTemporaryBasal(tb.first, tb.second), "$startId/$lastDbId")
|
||||
nsClientPlugin.nsClientService?.dbUpdate("treatments", tb.first.interfaceIDs.nightscoutId, tb.first.toJson(false, profile, dateUtil, useAbsolute), DataSyncSelector.PairTemporaryBasal(tb.first, tb.second.id), "$startId/$lastDbId")
|
||||
}
|
||||
return true
|
||||
} else {
|
||||
confirmLastTemporaryBasalIdIfGreater(tb.second)
|
||||
lastTbrId = -1
|
||||
confirmLastTemporaryBasalIdIfGreater(tb.second.id)
|
||||
//lastTbrId = -1
|
||||
processChangedTemporaryBasalsCompat()
|
||||
}
|
||||
}
|
||||
|
@ -479,8 +591,8 @@ class DataSyncSelectorImplementation @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
@Volatile private var lastEbId = -1L
|
||||
@Volatile private var lastEbTime = -1L
|
||||
//private var lastEbId = -1L
|
||||
//private var lastEbTime = -1L
|
||||
override fun processChangedExtendedBolusesCompat(): Boolean {
|
||||
val useAbsolute = sp.getBoolean(R.string.key_ns_sync_use_absolute, false)
|
||||
val lastDbIdWrapped = appRepository.getLastExtendedBolusIdWrapped().blockingGet()
|
||||
|
@ -490,25 +602,34 @@ class DataSyncSelectorImplementation @Inject constructor(
|
|||
sp.putLong(R.string.key_ns_extended_bolus_last_synced_id, 0)
|
||||
startId = 0
|
||||
}
|
||||
if (startId == lastEbId && dateUtil.now() - lastEbTime < 5000) return false
|
||||
lastEbId = startId
|
||||
lastEbTime = dateUtil.now()
|
||||
//if (startId == lastEbId && dateUtil.now() - lastEbTime < 5000) return false
|
||||
//lastEbId = startId
|
||||
//lastEbTime = dateUtil.now()
|
||||
queueCounter.ebsRemaining = lastDbId - startId
|
||||
appRepository.getNextSyncElementExtendedBolus(startId).blockingGet()?.let { eb ->
|
||||
aapsLogger.info(LTag.DATABASE, "Loading ExtendedBolus data Start: $startId ID: ${eb.first.id} HistoryID: ${eb.second} ")
|
||||
val profile = profileFunction.getProfile(eb.first.timestamp)
|
||||
if (profile != null) {
|
||||
when {
|
||||
// only NsId changed, no need to upload
|
||||
eb.first.onlyNsIdAdded(eb.second) -> {
|
||||
confirmLastExtendedBolusIdIfGreater(eb.second.id)
|
||||
//lastEbId = -1
|
||||
processChangedExtendedBolusesCompat()
|
||||
aapsLogger.info(LTag.DATABASE, "Ignoring ExtendedBolus. Only NS id changed ID: ${eb.first.id} HistoryID: ${eb.second.id} ")
|
||||
return false
|
||||
}
|
||||
// without nsId = create new
|
||||
eb.first.interfaceIDs.nightscoutId == null ->
|
||||
nsClientPlugin.nsClientService?.dbAdd("treatments", eb.first.toJson(true, profile, dateUtil, useAbsolute), DataSyncSelector.PairExtendedBolus(eb.first, eb.second), "$startId/$lastDbId")
|
||||
nsClientPlugin.nsClientService?.dbAdd("treatments", eb.first.toJson(true, profile, dateUtil, useAbsolute), DataSyncSelector.PairExtendedBolus(eb.first, eb.second.id), "$startId/$lastDbId")
|
||||
// with nsId = update
|
||||
eb.first.interfaceIDs.nightscoutId != null ->
|
||||
nsClientPlugin.nsClientService?.dbUpdate("treatments", eb.first.interfaceIDs.nightscoutId, eb.first.toJson(false, profile, dateUtil, useAbsolute), DataSyncSelector.PairExtendedBolus(eb.first, eb.second), "$startId/$lastDbId")
|
||||
nsClientPlugin.nsClientService?.dbUpdate("treatments", eb.first.interfaceIDs.nightscoutId, eb.first.toJson(false, profile, dateUtil, useAbsolute), DataSyncSelector.PairExtendedBolus(eb.first, eb.second.id), "$startId/$lastDbId")
|
||||
}
|
||||
return true
|
||||
} else {
|
||||
confirmLastExtendedBolusIdIfGreater(eb.second)
|
||||
lastEbId = -1
|
||||
confirmLastExtendedBolusIdIfGreater(eb.second.id)
|
||||
//lastEbId = -1
|
||||
processChangedExtendedBolusesCompat()
|
||||
}
|
||||
}
|
||||
|
@ -529,8 +650,8 @@ class DataSyncSelectorImplementation @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
@Volatile private var lastPsId = -1L
|
||||
@Volatile private var lastPsTime = -1L
|
||||
//private var lastPsId = -1L
|
||||
//private var lastPsTime = -1L
|
||||
override fun processChangedProfileSwitchesCompat(): Boolean {
|
||||
val lastDbIdWrapped = appRepository.getLastProfileSwitchIdWrapped().blockingGet()
|
||||
val lastDbId = if (lastDbIdWrapped is ValueWrapper.Existing) lastDbIdWrapped.value else 0L
|
||||
|
@ -539,18 +660,27 @@ class DataSyncSelectorImplementation @Inject constructor(
|
|||
sp.putLong(R.string.key_ns_profile_switch_last_synced_id, 0)
|
||||
startId = 0
|
||||
}
|
||||
if (startId == lastPsId && dateUtil.now() - lastPsTime < 5000) return false
|
||||
lastPsId = startId
|
||||
lastPsTime = dateUtil.now()
|
||||
//if (startId == lastPsId && dateUtil.now() - lastPsTime < 5000) return false
|
||||
//lastPsId = startId
|
||||
//lastPsTime = dateUtil.now()
|
||||
queueCounter.pssRemaining = lastDbId - startId
|
||||
appRepository.getNextSyncElementProfileSwitch(startId).blockingGet()?.let { ps ->
|
||||
aapsLogger.info(LTag.DATABASE, "Loading ProfileSwitch data Start: $startId ID: ${ps.first.id} HistoryID: ${ps.second} ")
|
||||
when {
|
||||
// only NsId changed, no need to upload
|
||||
ps.first.onlyNsIdAdded(ps.second) -> {
|
||||
confirmLastProfileSwitchIdIfGreater(ps.second.id)
|
||||
//lastPsId = -1
|
||||
processChangedProfileSwitchesCompat()
|
||||
aapsLogger.info(LTag.DATABASE, "Ignoring ProfileSwitch. Only NS id changed ID: ${ps.first.id} HistoryID: ${ps.second.id} ")
|
||||
return false
|
||||
}
|
||||
// without nsId = create new
|
||||
ps.first.interfaceIDs.nightscoutId == null ->
|
||||
nsClientPlugin.nsClientService?.dbAdd("treatments", ps.first.toJson(true, dateUtil), DataSyncSelector.PairProfileSwitch(ps.first, ps.second), "$startId/$lastDbId")
|
||||
nsClientPlugin.nsClientService?.dbAdd("treatments", ps.first.toJson(true, dateUtil), DataSyncSelector.PairProfileSwitch(ps.first, ps.second.id), "$startId/$lastDbId")
|
||||
// with nsId = update
|
||||
ps.first.interfaceIDs.nightscoutId != null ->
|
||||
nsClientPlugin.nsClientService?.dbUpdate("treatments", ps.first.interfaceIDs.nightscoutId, ps.first.toJson(false, dateUtil), DataSyncSelector.PairProfileSwitch(ps.first, ps.second), "$startId/$lastDbId")
|
||||
nsClientPlugin.nsClientService?.dbUpdate("treatments", ps.first.interfaceIDs.nightscoutId, ps.first.toJson(false, dateUtil), DataSyncSelector.PairProfileSwitch(ps.first, ps.second.id), "$startId/$lastDbId")
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
@ -571,8 +701,8 @@ class DataSyncSelectorImplementation @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
@Volatile private var lastEpsId = -1L
|
||||
@Volatile private var lastEpsTime = -1L
|
||||
//private var lastEpsId = -1L
|
||||
//private var lastEpsTime = -1L
|
||||
override fun processChangedEffectiveProfileSwitchesCompat(): Boolean {
|
||||
val lastDbIdWrapped = appRepository.getLastEffectiveProfileSwitchIdWrapped().blockingGet()
|
||||
val lastDbId = if (lastDbIdWrapped is ValueWrapper.Existing) lastDbIdWrapped.value else 0L
|
||||
|
@ -581,18 +711,27 @@ class DataSyncSelectorImplementation @Inject constructor(
|
|||
sp.putLong(R.string.key_ns_effective_profile_switch_last_synced_id, 0)
|
||||
startId = 0
|
||||
}
|
||||
if (startId == lastEpsId && dateUtil.now() - lastEpsTime < 5000) return false
|
||||
lastEpsId = startId
|
||||
lastEpsTime = dateUtil.now()
|
||||
//if (startId == lastEpsId && dateUtil.now() - lastEpsTime < 5000) return false
|
||||
//lastEpsId = startId
|
||||
//lastEpsTime = dateUtil.now()
|
||||
queueCounter.epssRemaining = lastDbId - startId
|
||||
appRepository.getNextSyncElementEffectiveProfileSwitch(startId).blockingGet()?.let { ps ->
|
||||
aapsLogger.info(LTag.DATABASE, "Loading EffectiveProfileSwitch data Start: $startId ID: ${ps.first.id} HistoryID: ${ps.second} ")
|
||||
when {
|
||||
// only NsId changed, no need to upload
|
||||
ps.first.onlyNsIdAdded(ps.second) -> {
|
||||
confirmLastEffectiveProfileSwitchIdIfGreater(ps.second.id)
|
||||
//lastEpsId = -1
|
||||
processChangedEffectiveProfileSwitchesCompat()
|
||||
aapsLogger.info(LTag.DATABASE, "Ignoring EffectiveProfileSwitch. Only NS id changed ID: ${ps.first.id} HistoryID: ${ps.second.id} ")
|
||||
return false
|
||||
}
|
||||
// without nsId = create new
|
||||
ps.first.interfaceIDs.nightscoutId == null ->
|
||||
nsClientPlugin.nsClientService?.dbAdd("treatments", ps.first.toJson(true, dateUtil), DataSyncSelector.PairEffectiveProfileSwitch(ps.first, ps.second), "$startId/$lastDbId")
|
||||
nsClientPlugin.nsClientService?.dbAdd("treatments", ps.first.toJson(true, dateUtil), DataSyncSelector.PairEffectiveProfileSwitch(ps.first, ps.second.id), "$startId/$lastDbId")
|
||||
// with nsId = update
|
||||
ps.first.interfaceIDs.nightscoutId != null ->
|
||||
nsClientPlugin.nsClientService?.dbUpdate("treatments", ps.first.interfaceIDs.nightscoutId, ps.first.toJson(false, dateUtil), DataSyncSelector.PairEffectiveProfileSwitch(ps.first, ps.second), "$startId/$lastDbId")
|
||||
nsClientPlugin.nsClientService?.dbUpdate("treatments", ps.first.interfaceIDs.nightscoutId, ps.first.toJson(false, dateUtil), DataSyncSelector.PairEffectiveProfileSwitch(ps.first, ps.second.id), "$startId/$lastDbId")
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
@ -614,8 +753,8 @@ class DataSyncSelectorImplementation @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
@Volatile private var lastOeId = -1L
|
||||
@Volatile private var lastOeTime = -1L
|
||||
//private var lastOeId = -1L
|
||||
//private var lastOeTime = -1L
|
||||
override fun processChangedOfflineEventsCompat(): Boolean {
|
||||
val lastDbIdWrapped = appRepository.getLastOfflineEventIdWrapped().blockingGet()
|
||||
val lastDbId = if (lastDbIdWrapped is ValueWrapper.Existing) lastDbIdWrapped.value else 0L
|
||||
|
@ -624,18 +763,27 @@ class DataSyncSelectorImplementation @Inject constructor(
|
|||
sp.putLong(R.string.key_ns_offline_event_last_synced_id, 0)
|
||||
startId = 0
|
||||
}
|
||||
if (startId == lastOeId && dateUtil.now() - lastOeTime < 5000) return false
|
||||
lastOeId = startId
|
||||
lastOeTime = dateUtil.now()
|
||||
//if (startId == lastOeId && dateUtil.now() - lastOeTime < 5000) return false
|
||||
//lastOeId = startId
|
||||
//lastOeTime = dateUtil.now()
|
||||
queueCounter.oesRemaining = lastDbId - startId
|
||||
appRepository.getNextSyncElementOfflineEvent(startId).blockingGet()?.let { oe ->
|
||||
aapsLogger.info(LTag.DATABASE, "Loading OfflineEvent data Start: $startId ID: ${oe.first.id} HistoryID: ${oe.second} ")
|
||||
when {
|
||||
// only NsId changed, no need to upload
|
||||
oe.first.onlyNsIdAdded(oe.second) -> {
|
||||
confirmLastOfflineEventIdIfGreater(oe.second.id)
|
||||
//lastOeId = -1
|
||||
processChangedOfflineEventsCompat()
|
||||
aapsLogger.info(LTag.DATABASE, "Ignoring OfflineEvent. Only NS id changed ID: ${oe.first.id} HistoryID: ${oe.second.id} ")
|
||||
return false
|
||||
}
|
||||
// without nsId = create new
|
||||
oe.first.interfaceIDs.nightscoutId == null ->
|
||||
nsClientPlugin.nsClientService?.dbAdd("treatments", oe.first.toJson(true, dateUtil), DataSyncSelector.PairOfflineEvent(oe.first, oe.second), "$startId/$lastDbId")
|
||||
nsClientPlugin.nsClientService?.dbAdd("treatments", oe.first.toJson(true, dateUtil), DataSyncSelector.PairOfflineEvent(oe.first, oe.second.id), "$startId/$lastDbId")
|
||||
// existing with nsId = update
|
||||
oe.first.interfaceIDs.nightscoutId != null ->
|
||||
nsClientPlugin.nsClientService?.dbUpdate("treatments", oe.first.interfaceIDs.nightscoutId, oe.first.toJson(false, dateUtil), DataSyncSelector.PairOfflineEvent(oe.first, oe.second), "$startId/$lastDbId")
|
||||
nsClientPlugin.nsClientService?.dbUpdate("treatments", oe.first.interfaceIDs.nightscoutId, oe.first.toJson(false, dateUtil), DataSyncSelector.PairOfflineEvent(oe.first, oe.second.id), "$startId/$lastDbId")
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
|
|
@ -101,5 +101,6 @@ class NSClientFragment : DaggerFragment() {
|
|||
if (nsClientPlugin.autoscroll) binding.logScrollview.fullScroll(ScrollView.FOCUS_DOWN)
|
||||
binding.url.text = nsClientPlugin.url()
|
||||
binding.status.text = nsClientPlugin.status
|
||||
binding.queue.text = dataSyncSelector.queueSize().toString()
|
||||
}
|
||||
}
|
|
@ -6,6 +6,7 @@ import dagger.android.HasAndroidInjector
|
|||
import info.nightscout.androidaps.R
|
||||
import info.nightscout.androidaps.database.AppRepository
|
||||
import info.nightscout.androidaps.database.ValueWrapper
|
||||
import info.nightscout.androidaps.database.entities.EffectiveProfileSwitch
|
||||
import info.nightscout.androidaps.events.*
|
||||
import info.nightscout.androidaps.extensions.*
|
||||
import info.nightscout.androidaps.interfaces.*
|
||||
|
@ -136,9 +137,12 @@ class OverviewPlugin @Inject constructor(
|
|||
.observeOn(aapsSchedulers.io)
|
||||
.subscribe({ overviewData.preparePredictions("EventLoopInvoked") }, fabricPrivacy::logException)
|
||||
disposable += rxBus
|
||||
.toObservable(EventNewBasalProfile::class.java)
|
||||
.toObservable(EventEffectiveProfileSwitchChanged::class.java)
|
||||
.observeOn(aapsSchedulers.io)
|
||||
.subscribe({ loadProfile("EventNewBasalProfile") }, fabricPrivacy::logException)
|
||||
.subscribe({
|
||||
loadProfile("EventEffectiveProfileSwitchChanged")
|
||||
overviewData.prepareBasalData("EventEffectiveProfileSwitchChanged")
|
||||
}, fabricPrivacy::logException)
|
||||
disposable += rxBus
|
||||
.toObservable(EventAutosensCalculationFinished::class.java)
|
||||
.observeOn(aapsSchedulers.io)
|
||||
|
|
|
@ -10,18 +10,17 @@ import androidx.core.app.RemoteInput
|
|||
import dagger.android.HasAndroidInjector
|
||||
import info.nightscout.androidaps.Constants
|
||||
import info.nightscout.androidaps.R
|
||||
import info.nightscout.androidaps.interfaces.Profile
|
||||
import info.nightscout.androidaps.events.*
|
||||
import info.nightscout.androidaps.extensions.toStringShort
|
||||
import info.nightscout.androidaps.extensions.valueToUnitsString
|
||||
import info.nightscout.androidaps.interfaces.*
|
||||
import info.nightscout.androidaps.logging.AAPSLogger
|
||||
import info.nightscout.androidaps.plugins.bus.RxBusWrapper
|
||||
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatusProvider
|
||||
import info.nightscout.androidaps.utils.DecimalFormatter
|
||||
import info.nightscout.androidaps.utils.FabricPrivacy
|
||||
import info.nightscout.androidaps.extensions.toStringShort
|
||||
import info.nightscout.androidaps.utils.resources.ResourceHelper
|
||||
import info.nightscout.androidaps.utils.rx.AapsSchedulers
|
||||
import info.nightscout.androidaps.extensions.valueToUnitsString
|
||||
import io.reactivex.disposables.CompositeDisposable
|
||||
import javax.inject.Inject
|
||||
import javax.inject.Singleton
|
||||
|
@ -89,7 +88,7 @@ class PersistentNotificationPlugin @Inject constructor(
|
|||
.observeOn(aapsSchedulers.io)
|
||||
.subscribe({ triggerNotificationUpdate() }, fabricPrivacy::logException))
|
||||
disposable.add(rxBus
|
||||
.toObservable(EventNewBasalProfile::class.java)
|
||||
.toObservable(EventEffectiveProfileSwitchChanged::class.java)
|
||||
.observeOn(aapsSchedulers.io)
|
||||
.subscribe({ triggerNotificationUpdate() }, fabricPrivacy::logException))
|
||||
disposable.add(rxBus
|
||||
|
|
|
@ -68,7 +68,7 @@ class WearPlugin @Inject constructor(
|
|||
.observeOn(aapsSchedulers.io)
|
||||
.subscribe({ sendDataToWatch(status = true, basals = true, bgValue = false) }, fabricPrivacy::logException))
|
||||
disposable.add(rxBus
|
||||
.toObservable(EventNewBasalProfile::class.java)
|
||||
.toObservable(EventEffectiveProfileSwitchChanged::class.java)
|
||||
.observeOn(aapsSchedulers.io)
|
||||
.subscribe({ sendDataToWatch(status = false, basals = true, bgValue = false) }, fabricPrivacy::logException))
|
||||
disposable.add(rxBus
|
||||
|
|
|
@ -60,12 +60,13 @@ class IobCobCalculatorPlugin @Inject constructor(
|
|||
private val fabricPrivacy: FabricPrivacy,
|
||||
private val dateUtil: DateUtil,
|
||||
private val repository: AppRepository
|
||||
) : PluginBase(PluginDescription()
|
||||
.mainType(PluginType.GENERAL)
|
||||
.pluginName(R.string.iobcobcalculator)
|
||||
.showInList(false)
|
||||
.neverVisible(true)
|
||||
.alwaysEnabled(true),
|
||||
) : PluginBase(
|
||||
PluginDescription()
|
||||
.mainType(PluginType.GENERAL)
|
||||
.pluginName(R.string.iobcobcalculator)
|
||||
.showInList(false)
|
||||
.neverVisible(true)
|
||||
.alwaysEnabled(true),
|
||||
aapsLogger, resourceHelper, injector
|
||||
), IobCobCalculator {
|
||||
|
||||
|
@ -86,38 +87,51 @@ class IobCobCalculatorPlugin @Inject constructor(
|
|||
disposable += rxBus
|
||||
.toObservable(EventConfigBuilderChange::class.java)
|
||||
.observeOn(aapsSchedulers.io)
|
||||
.subscribe({ event -> resetDataAndRunCalculation("onEventConfigBuilderChange", event) }, fabricPrivacy::logException)
|
||||
// EventNewBasalProfile
|
||||
.subscribe({ event ->
|
||||
resetDataAndRunCalculation("onEventConfigBuilderChange", event)
|
||||
}, fabricPrivacy::logException)
|
||||
// EventEffectiveProfileSwitchChanged
|
||||
disposable += rxBus
|
||||
.toObservable(EventNewBasalProfile::class.java)
|
||||
.toObservable(EventEffectiveProfileSwitchChanged::class.java)
|
||||
.observeOn(aapsSchedulers.io)
|
||||
.subscribe({ event -> resetDataAndRunCalculation("onNewProfile", event) }, fabricPrivacy::logException)
|
||||
.subscribe({ event ->
|
||||
newHistoryData(event.startDate, false, event)
|
||||
}, fabricPrivacy::logException)
|
||||
// EventPreferenceChange
|
||||
disposable += rxBus
|
||||
.toObservable(EventPreferenceChange::class.java)
|
||||
.observeOn(aapsSchedulers.io)
|
||||
.subscribe({ event ->
|
||||
if (event.isChanged(resourceHelper, R.string.key_openapsama_autosens_period) ||
|
||||
event.isChanged(resourceHelper, R.string.key_age) ||
|
||||
event.isChanged(resourceHelper, R.string.key_absorption_maxtime) ||
|
||||
event.isChanged(resourceHelper, R.string.key_openapsama_min_5m_carbimpact) ||
|
||||
event.isChanged(resourceHelper, R.string.key_absorption_cutoff) ||
|
||||
event.isChanged(resourceHelper, R.string.key_openapsama_autosens_max) ||
|
||||
event.isChanged(resourceHelper, R.string.key_openapsama_autosens_min) ||
|
||||
event.isChanged(resourceHelper, R.string.key_insulin_oref_peak)) {
|
||||
resetDataAndRunCalculation("onEventPreferenceChange", event)
|
||||
}
|
||||
}, fabricPrivacy::logException)
|
||||
if (event.isChanged(resourceHelper, R.string.key_openapsama_autosens_period) ||
|
||||
event.isChanged(resourceHelper, R.string.key_age) ||
|
||||
event.isChanged(resourceHelper, R.string.key_absorption_maxtime) ||
|
||||
event.isChanged(resourceHelper, R.string.key_openapsama_min_5m_carbimpact) ||
|
||||
event.isChanged(resourceHelper, R.string.key_absorption_cutoff) ||
|
||||
event.isChanged(resourceHelper, R.string.key_openapsama_autosens_max) ||
|
||||
event.isChanged(resourceHelper, R.string.key_openapsama_autosens_min) ||
|
||||
event.isChanged(resourceHelper, R.string.key_insulin_oref_peak)
|
||||
) {
|
||||
resetDataAndRunCalculation("onEventPreferenceChange", event)
|
||||
}
|
||||
}, fabricPrivacy::logException)
|
||||
// EventAppInitialized
|
||||
disposable += rxBus
|
||||
.toObservable(EventAppInitialized::class.java)
|
||||
.observeOn(aapsSchedulers.io)
|
||||
.subscribe({ event -> runCalculation("onEventAppInitialized", System.currentTimeMillis(), bgDataReload = true, limitDataToOldestAvailable = true, cause = event) }, fabricPrivacy::logException)
|
||||
.subscribe(
|
||||
{ event -> runCalculation("onEventAppInitialized", System.currentTimeMillis(), bgDataReload = true, limitDataToOldestAvailable = true, cause = event) },
|
||||
fabricPrivacy::logException
|
||||
)
|
||||
// EventNewHistoryData
|
||||
disposable += rxBus
|
||||
.toObservable(EventNewHistoryData::class.java)
|
||||
.observeOn(aapsSchedulers.io)
|
||||
.subscribe({ event -> newHistoryData(event.oldDataTimestamp, event.reloadBgData, if (event.newestGlucoseValue != null) EventNewBG(event.newestGlucoseValue) else event) }, fabricPrivacy::logException)
|
||||
.subscribe(
|
||||
{ event ->
|
||||
newHistoryData(event.oldDataTimestamp, event.reloadBgData, if (event.newestGlucoseValue != null) EventNewBG(event.newestGlucoseValue) else event)
|
||||
},
|
||||
fabricPrivacy::logException
|
||||
)
|
||||
}
|
||||
|
||||
override fun onStop() {
|
||||
|
@ -187,7 +201,8 @@ class IobCobCalculatorPlugin @Inject constructor(
|
|||
duration = 240,
|
||||
rate = 0.0,
|
||||
isAbsolute = true,
|
||||
type = TemporaryBasal.Type.NORMAL)
|
||||
type = TemporaryBasal.Type.NORMAL
|
||||
)
|
||||
if (t.timestamp < time) {
|
||||
val calc = t.iobCalc(time, profile, activePlugin.activeInsulin)
|
||||
basalIobWithZeroTemp.plus(calc)
|
||||
|
@ -214,7 +229,8 @@ class IobCobCalculatorPlugin @Inject constructor(
|
|||
duration = 240,
|
||||
rate = 0.0,
|
||||
isAbsolute = true,
|
||||
type = TemporaryBasal.Type.NORMAL)
|
||||
type = TemporaryBasal.Type.NORMAL
|
||||
)
|
||||
if (t.timestamp < time) {
|
||||
val profile = profileFunction.getProfile(t.timestamp)
|
||||
if (profile != null) {
|
||||
|
@ -400,7 +416,7 @@ class IobCobCalculatorPlugin @Inject constructor(
|
|||
}
|
||||
ads.newHistoryData(time, aapsLogger, dateUtil)
|
||||
}
|
||||
runCalculation("onEventNewHistoryData", System.currentTimeMillis(), bgDataReload, true, event)
|
||||
runCalculation(event.javaClass.simpleName, System.currentTimeMillis(), bgDataReload, true, event)
|
||||
//log.debug("Releasing onNewHistoryData");
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ import info.nightscout.androidaps.database.entities.ProfileSwitch
|
|||
import info.nightscout.androidaps.database.interfaces.end
|
||||
import info.nightscout.androidaps.dialogs.BolusProgressDialog
|
||||
import info.nightscout.androidaps.events.EventBolusRequested
|
||||
import info.nightscout.androidaps.events.EventNewBasalProfile
|
||||
import info.nightscout.androidaps.events.EventProfileSwitchChanged
|
||||
import info.nightscout.androidaps.extensions.getCustomizedName
|
||||
import info.nightscout.androidaps.interfaces.*
|
||||
|
@ -80,8 +79,7 @@ class CommandQueue @Inject constructor(
|
|||
.toObservable(EventProfileSwitchChanged::class.java)
|
||||
.observeOn(aapsSchedulers.io)
|
||||
.subscribe({
|
||||
if (config.NSCLIENT) { // Effective profileswitch should be synced over NS
|
||||
rxBus.send(EventNewBasalProfile())
|
||||
if (config.NSCLIENT) { // Effective profileswitch should be synced over NS, do not create EffectiveProfileSwitch here
|
||||
return@subscribe
|
||||
}
|
||||
aapsLogger.debug(LTag.PROFILE, "onProfileSwitch")
|
||||
|
@ -110,7 +108,6 @@ class CommandQueue @Inject constructor(
|
|||
insulinConfiguration = it.insulinConfiguration
|
||||
)
|
||||
)
|
||||
rxBus.send(EventNewBasalProfile())
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
@ -5,141 +5,159 @@
|
|||
android:orientation="vertical"
|
||||
tools:context=".plugins.general.nsclient.NSClientFragment">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_horizontal">
|
||||
android:text="@string/nsclientinternal_url" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/nsclientinternal_url" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/url"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:autoLink="web"
|
||||
tools:ignore="RtlHardcoded" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_horizontal">
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/paused"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/paused" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/autoscroll"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:text="@string/nsclientinternal_autoscroll"
|
||||
tools:ignore="RtlHardcoded" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
<TextView
|
||||
android:id="@+id/url"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:autoLink="web"
|
||||
tools:ignore="RtlHardcoded" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/paused"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/paused" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/autoscroll"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:text="@string/nsclientinternal_autoscroll"
|
||||
tools:ignore="RtlHardcoded" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="5dp"
|
||||
android:orientation="horizontal">
|
||||
android:text="@string/status"
|
||||
tools:ignore="RtlHardcoded" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="5dp"
|
||||
android:text="@string/status"
|
||||
tools:ignore="RtlHardcoded" />
|
||||
<TextView
|
||||
android:id="@+id/status"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textStyle="normal|bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/status"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textStyle="normal|bold" />
|
||||
<TextView
|
||||
android:id="@+id/textView3"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/queue" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
<TextView
|
||||
android:id="@+id/queue"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_marginTop="10dp">
|
||||
android:layout_marginRight="5dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/clear_log"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/clearlog"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@android:color/holo_orange_light"
|
||||
android:textStyle="normal|bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/restart"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/restart"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@android:color/holo_orange_light"
|
||||
android:textStyle="normal|bold" />
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/deliver_now"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/deliver_now"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@android:color/holo_orange_light"
|
||||
android:textStyle="normal|bold" />
|
||||
<TextView
|
||||
android:id="@+id/clear_log"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/clearlog"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@android:color/holo_orange_light"
|
||||
android:textStyle="normal|bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/full_sync"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/full_sync"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@android:color/holo_orange_light"
|
||||
android:textStyle="normal|bold" />
|
||||
<TextView
|
||||
android:id="@+id/restart"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/restart"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@android:color/holo_orange_light"
|
||||
android:textStyle="normal|bold" />
|
||||
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:id="@+id/deliver_now"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/deliver_now"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@android:color/holo_orange_light"
|
||||
android:textStyle="normal|bold" />
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/log_scrollview"
|
||||
<TextView
|
||||
android:id="@+id/full_sync"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/full_sync"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@android:color/holo_orange_light"
|
||||
android:textStyle="normal|bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/log_scrollview"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/log"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="5dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/log"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="" />
|
||||
</ScrollView>
|
||||
android:layout_height="wrap_content"
|
||||
android:text="" />
|
||||
</ScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
@ -72,7 +72,6 @@
|
|||
<string name="overview">Oorsig</string>
|
||||
<string name="treatments">Behandelings</string>
|
||||
<string name="virtualpump">Virtuele Pomp</string>
|
||||
<string name="careportal">Careportal</string>
|
||||
<string name="configbuilder_pump">Pomp</string>
|
||||
<string name="configbuilder_pump_description">Watter pomp wil jy gebruik met AndroidAPS?</string>
|
||||
<string name="configbuilder_profile">Profiel</string>
|
||||
|
@ -196,7 +195,6 @@
|
|||
<string name="ongoingnotificaction">Voortgesette kennisgewing</string>
|
||||
<string name="old_data">OU DATA</string>
|
||||
<string name="sms_minago">%1$d min terug</string>
|
||||
<string name="localprofile">Plaaslike profiel</string>
|
||||
<string name="openapsama">OpenAPS AMA</string>
|
||||
<string name="array_of_elements">Matriks van %1$d elemente. \nWerklike waarde:</string>
|
||||
<string name="openapsma_autosensdata_label">Autosens data</string>
|
||||
|
|
|
@ -78,7 +78,6 @@
|
|||
<string name="overview">Общ</string>
|
||||
<string name="treatments">Лечения</string>
|
||||
<string name="virtualpump">Виртуална помпа</string>
|
||||
<string name="careportal">Careportal</string>
|
||||
<string name="configbuilder_pump">Помпа</string>
|
||||
<string name="configbuilder_pump_description">Каква помпа използвате с AndroidAPS?</string>
|
||||
<string name="configbuilder_profile">Профил</string>
|
||||
|
@ -256,7 +255,6 @@
|
|||
<string name="ongoingnotificaction">Текущи известия</string>
|
||||
<string name="old_data">СТАРИ ДАННИ</string>
|
||||
<string name="sms_minago">преди %1$d мин</string>
|
||||
<string name="localprofile">Локален профил</string>
|
||||
<string name="openapsama">OpenAPS AMA</string>
|
||||
<string name="array_of_elements">Общо %1$d елемента.\nАктуална стойност:</string>
|
||||
<string name="openapsma_autosensdata_label">Autosens данни</string>
|
||||
|
@ -746,7 +744,6 @@
|
|||
<string name="clone_label">Клонирай</string>
|
||||
<string name="saveorresetchangesfirst">Първо запазете или се откажете от промените</string>
|
||||
<string name="deletecurrentprofile">Изтриване на текущия профил?</string>
|
||||
<string name="copytolocalprofile">Желаете ли да създадете нов локален профил от този профил?</string>
|
||||
<string name="profilenamecontainsdot">Името на профила съдържа точка.\nТова не се поддържа от НС.\nПрофилът не е качен в НС.</string>
|
||||
<string name="low_mark_comment">Ниската граница на диапазона (графика)</string>
|
||||
<string name="high_mark_comment">Високата граница на диапазона (графика)</string>
|
||||
|
@ -827,7 +824,6 @@
|
|||
<string name="dpvdefaultprofile">Профил по подразбиране</string>
|
||||
<string name="setupwizard_pump_riley_link_status">RileyLink статус:</string>
|
||||
<string name="filter">Филтър</string>
|
||||
<string name="copytolocalprofile_invalid">Не може да се създаде локален профил. Профилът е невалиден.</string>
|
||||
<string name="cta_dont_kill_my_app_info">Не убивай приложението?</string>
|
||||
<string name="smscommunicator_report_pump_ureachable_summary">Изпращане на SMS, ако помпата е недостъпна</string>
|
||||
<string name="smscommunicator_pump_ureachable">Докладвай недостъпна помпа</string>
|
||||
|
@ -845,5 +841,4 @@
|
|||
<string name="clear_filter">Премахни филтъра</string>
|
||||
<string name="trend_arrow">Стрелка тенденция</string>
|
||||
<string name="cannula">Канюла</string>
|
||||
<string name="ns_receive_profile_store_summary">Синхронизирай NS профила с локалния</string>
|
||||
</resources>
|
||||
|
|
|
@ -78,7 +78,6 @@
|
|||
<string name="overview">Přehled</string>
|
||||
<string name="treatments">Ošetření</string>
|
||||
<string name="virtualpump">Virtuální pumpa</string>
|
||||
<string name="careportal">Péče</string>
|
||||
<string name="configbuilder_pump">Pumpa</string>
|
||||
<string name="configbuilder_pump_description">Jakou pumpu chcete používat s AndroidAPS?</string>
|
||||
<string name="configbuilder_profile">Profil</string>
|
||||
|
@ -257,7 +256,7 @@
|
|||
<string name="ongoingnotificaction">Průběžné oznámení</string>
|
||||
<string name="old_data">ZASTARALÉ</string>
|
||||
<string name="sms_minago">před %1$d min</string>
|
||||
<string name="localprofile">Místní profil</string>
|
||||
<string name="localprofile">Profil</string>
|
||||
<string name="openapsama">OpenAPS AMA</string>
|
||||
<string name="array_of_elements">Pole %1$d prvků.\nAktuální hodnota:</string>
|
||||
<string name="openapsma_autosensdata_label">Data detekce senzitivity</string>
|
||||
|
@ -751,7 +750,7 @@
|
|||
<string name="clone_label">Klonovat</string>
|
||||
<string name="saveorresetchangesfirst">Nejprve uložte nebo resetujte aktuální změny</string>
|
||||
<string name="deletecurrentprofile">Odstranit aktuální profil?</string>
|
||||
<string name="copytolocalprofile">Vytvořit z tohoto profilu nový místní profil?</string>
|
||||
<string name="copytolocalprofile">Vytvořit z tohoto profilu nový profil?</string>
|
||||
<string name="profilenamecontainsdot">Název profilu obsahuje tečky.\nToto není v NS podporováno.\nProfil není přenesen do NS.</string>
|
||||
<string name="low_mark_comment">Spodní hodnota oblasti v rozsahu (pouze zobrazování)</string>
|
||||
<string name="high_mark_comment">Horní hodnota oblasti v rozsahu (pouze zobrazování)</string>
|
||||
|
@ -833,7 +832,7 @@
|
|||
<string name="dpvdefaultprofile">Výchozí profil DPV</string>
|
||||
<string name="setupwizard_pump_riley_link_status">Status RileyLink:</string>
|
||||
<string name="filter">Filtr</string>
|
||||
<string name="copytolocalprofile_invalid">Nelze vytvořit lokální profil. Profil je neplatný.</string>
|
||||
<string name="copytolocalprofile_invalid">Nelze vytvořit profil. Profil je neplatný.</string>
|
||||
<string name="cta_dont_kill_my_app_info">Nezabíjet mou aplikaci?</string>
|
||||
<string name="smscommunicator_report_pump_ureachable_summary">Odeslat SMS, pokud je detekována nedostupná pumpa</string>
|
||||
<string name="smscommunicator_pump_ureachable">Nahlásit nedostupnou pumpu</string>
|
||||
|
@ -863,7 +862,7 @@
|
|||
<string name="ns_upload_summary">Profily, bolusy, sacharidy, dočasné bazály jsou nahrány do NS</string>
|
||||
<string name="ns_upload">Nahrávat data do NS</string>
|
||||
<string name="ns_receive_profile_store">Přijímat úložiště profilu</string>
|
||||
<string name="ns_receive_profile_store_summary">Synchronizovat profily z NS do místního profilu</string>
|
||||
<string name="ns_receive_profile_store_summary">Synchronizovat profily z editoru profilu v NS</string>
|
||||
<string name="ns_receive_temp_target">Přijímat dočasné cíle</string>
|
||||
<string name="ns_receive_temp_target_summary">Přijmout dočasné cíle zadané prostřednictvím NS nebo NSClienta</string>
|
||||
<string name="ns_receive_profile_switch">Přijímat přepnutí profilu</string>
|
||||
|
|
|
@ -78,7 +78,6 @@
|
|||
<string name="overview">Übersicht</string>
|
||||
<string name="treatments">Behandlungen</string>
|
||||
<string name="virtualpump">Virtuelle Pumpe</string>
|
||||
<string name="careportal">Careportal</string>
|
||||
<string name="configbuilder_pump">Pumpe</string>
|
||||
<string name="configbuilder_pump_description">Welche Pumpe möchtest Du mit AndroidAPS nutzen?</string>
|
||||
<string name="configbuilder_profile">Profil</string>
|
||||
|
@ -257,7 +256,7 @@
|
|||
<string name="ongoingnotificaction">Anhaltende Benachrichtigung</string>
|
||||
<string name="old_data">VERALTETE DATEN</string>
|
||||
<string name="sms_minago">%1$d\' her</string>
|
||||
<string name="localprofile">Lokales Profil</string>
|
||||
<string name="localprofile">Profil</string>
|
||||
<string name="openapsama">OpenAPS AMA</string>
|
||||
<string name="array_of_elements">Array mit %1$d Elementen.\nWert:</string>
|
||||
<string name="openapsma_autosensdata_label">Autosens-Daten</string>
|
||||
|
@ -752,7 +751,7 @@ Unerwartetes Verhalten.</string>
|
|||
<string name="clone_label">Klonen</string>
|
||||
<string name="saveorresetchangesfirst">Speichere oder verwerfe die aktuellen Änderungen zuerst</string>
|
||||
<string name="deletecurrentprofile">Aktuelles Profil löschen?</string>
|
||||
<string name="copytolocalprofile">Neues lokales Profil auf Basis dieses Profils erstellen?</string>
|
||||
<string name="copytolocalprofile">Neues Profil auf Basis dieses Profils erstellen?</string>
|
||||
<string name="profilenamecontainsdot">Profilname enthält Punkte.\nDies wird von NS nicht unterstützt.\nProfil wird nicht zu NS hochgeladen.</string>
|
||||
<string name="low_mark_comment">Unterer Wert des Zielbereichs (nur Anzeige)</string>
|
||||
<string name="high_mark_comment">Oberer Wert des Zielbereichs (nur Anzeige)</string>
|
||||
|
@ -834,7 +833,7 @@ Unerwartetes Verhalten.</string>
|
|||
<string name="dpvdefaultprofile">DPV-Standard-Profil</string>
|
||||
<string name="setupwizard_pump_riley_link_status">RileyLink Status:</string>
|
||||
<string name="filter">Filter</string>
|
||||
<string name="copytolocalprofile_invalid">Lokales Profil kann nicht erstellt werden. Profil ist ungültig.</string>
|
||||
<string name="copytolocalprofile_invalid">Profil kann nicht erstellt werden. Profil ist ungültig.</string>
|
||||
<string name="cta_dont_kill_my_app_info">Don\'t kill my app?</string>
|
||||
<string name="smscommunicator_report_pump_ureachable_summary">SMS senden, wenn Pumpe nicht erreichbar</string>
|
||||
<string name="smscommunicator_pump_ureachable">Hinweis Pumpe nicht erreichbar</string>
|
||||
|
@ -864,7 +863,7 @@ Unerwartetes Verhalten.</string>
|
|||
<string name="ns_upload_summary">Profile, Boli, Kohlenhydrate und temporäre Basalraten werden zu NS hochgeladen</string>
|
||||
<string name="ns_upload">Daten zu NS hochladen</string>
|
||||
<string name="ns_receive_profile_store">Gespeicherte Profile abrufen</string>
|
||||
<string name="ns_receive_profile_store_summary">Profile vom NS-Profil-Editors zu lokalen Profil synchronisieren</string>
|
||||
<string name="ns_receive_profile_store_summary">Profile mit NS Profil-Editor synchronisieren</string>
|
||||
<string name="ns_receive_temp_target">Temporäre Ziele abrufen</string>
|
||||
<string name="ns_receive_temp_target_summary">Temp. Ziele akzeptieren, die in NS oder NSClient eingegeben wurden</string>
|
||||
<string name="ns_receive_profile_switch">Profilwechsel abrufen</string>
|
||||
|
|
|
@ -74,7 +74,6 @@
|
|||
<string name="overview">Επισκόπηση</string>
|
||||
<string name="treatments">Θεραπείες</string>
|
||||
<string name="virtualpump">Εικονική Αντλία</string>
|
||||
<string name="careportal">Φροντίδα</string>
|
||||
<string name="configbuilder_pump">Αντλία</string>
|
||||
<string name="configbuilder_pump_description">Ποια αντλία θα θέλατε να χρησιμοποιήσετε με το AndroidAPS;</string>
|
||||
<string name="configbuilder_profile">Προφίλ</string>
|
||||
|
@ -198,7 +197,6 @@
|
|||
<string name="ongoingnotificaction">Συνεχής Ειδοποίηση</string>
|
||||
<string name="old_data">Παλιά Δεδομένα</string>
|
||||
<string name="sms_minago">πριν από %1$d λεπτά</string>
|
||||
<string name="localprofile">Τοπικό Προφίλ</string>
|
||||
<string name="openapsama">OpenAPS AMA</string>
|
||||
<string name="array_of_elements">Πεδίο %1$d Στοιχεία.\nΤρέχουσα τιμή:</string>
|
||||
<string name="openapsma_autosensdata_label">Δεδομένα Autosens</string>
|
||||
|
|
|
@ -78,7 +78,6 @@
|
|||
<string name="overview">Inicio</string>
|
||||
<string name="treatments">Tratamientos</string>
|
||||
<string name="virtualpump">Bomba virtual</string>
|
||||
<string name="careportal">Portal de Tratamientos</string>
|
||||
<string name="configbuilder_pump">Bomba</string>
|
||||
<string name="configbuilder_pump_description">¿Qué bomba quieres utilizar con AndroidAPS?</string>
|
||||
<string name="configbuilder_profile">Perfil</string>
|
||||
|
@ -256,7 +255,6 @@
|
|||
<string name="ongoingnotificaction">Avisos permanentes</string>
|
||||
<string name="old_data">DATOS CADUCADOS</string>
|
||||
<string name="sms_minago">hace %1$d min</string>
|
||||
<string name="localprofile">Perfil Local</string>
|
||||
<string name="openapsama">OpenAPS AMA</string>
|
||||
<string name="array_of_elements">Matriz de %1$d elementos.\nValor actual:</string>
|
||||
<string name="openapsma_autosensdata_label">Datos Autosens</string>
|
||||
|
@ -746,7 +744,6 @@
|
|||
<string name="clone_label">Clonar</string>
|
||||
<string name="saveorresetchangesfirst">Guardar o restablecer los cambios actuales primero</string>
|
||||
<string name="deletecurrentprofile">¿Eliminar el perfil actual?</string>
|
||||
<string name="copytolocalprofile">¿Crear un perfil local nuevo a partir de este perfil?</string>
|
||||
<string name="profilenamecontainsdot">El nombre de perfil contiene puntos.\nEsto no está soportado por NS.\nEl perfil no se carga en NS.</string>
|
||||
<string name="low_mark_comment">Valor inferior del área de rango (sólo visualización)</string>
|
||||
<string name="high_mark_comment">Valor superior al área de rango (sólo visualización)</string>
|
||||
|
@ -827,7 +824,6 @@
|
|||
<string name="dpvdefaultprofile">Perfil DPV por defecto</string>
|
||||
<string name="setupwizard_pump_riley_link_status">Estado de RileyLink:</string>
|
||||
<string name="filter">Filtro</string>
|
||||
<string name="copytolocalprofile_invalid">No se puede crear el perfil local. El perfil no es válido.</string>
|
||||
<string name="cta_dont_kill_my_app_info">¿No matar mi aplicación?</string>
|
||||
<string name="smscommunicator_report_pump_ureachable_summary">Enviar SMS si se activa un evento de bomba inaccesible</string>
|
||||
<string name="smscommunicator_pump_ureachable">Reportar bomba inalcanzable</string>
|
||||
|
|
|
@ -78,7 +78,6 @@
|
|||
<string name="overview">Aperçu</string>
|
||||
<string name="treatments">Traitements</string>
|
||||
<string name="virtualpump">Pompe virtuelle</string>
|
||||
<string name="careportal">Careportal</string>
|
||||
<string name="configbuilder_pump">Pompe</string>
|
||||
<string name="configbuilder_pump_description">Quelle pompe souhaitez-vous utiliser avec AndroidAPS ?</string>
|
||||
<string name="configbuilder_profile">Profil</string>
|
||||
|
@ -258,7 +257,7 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
|
|||
<string name="ongoingnotificaction">Notification en cours</string>
|
||||
<string name="old_data">DONNÉES ANCIENNES</string>
|
||||
<string name="sms_minago">il y a %1$d min</string>
|
||||
<string name="localprofile">Profil Local</string>
|
||||
<string name="localprofile">Profil</string>
|
||||
<string name="openapsama">OpenAPS AMA</string>
|
||||
<string name="array_of_elements">Tableau de %1$d éléments.\nValeur Actuelle :</string>
|
||||
<string name="openapsma_autosensdata_label">Données Autosens</string>
|
||||
|
@ -752,7 +751,7 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
|
|||
<string name="clone_label">Dupliquer</string>
|
||||
<string name="saveorresetchangesfirst">Sauver ou réinitialiser les modifications actuelles en premier</string>
|
||||
<string name="deletecurrentprofile">Supprimer le profil actuel ?</string>
|
||||
<string name="copytolocalprofile">Créer un nouveau profil local à partir de ce profil ?</string>
|
||||
<string name="copytolocalprofile">Créer un nouveau profil à partir de ce profil ?</string>
|
||||
<string name="profilenamecontainsdot">Le nom du profil contient des points.\nCe n\'est pas pris en charge par NS.\nLe profil n\'est pas remonté dans NS.</string>
|
||||
<string name="low_mark_comment">Valeur inférieure dans la plage (affichage uniquement)</string>
|
||||
<string name="high_mark_comment">Valeur supérieure dans la plage (affichage uniquement)</string>
|
||||
|
@ -834,7 +833,7 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
|
|||
<string name="dpvdefaultprofile">Profil par défaut DPV</string>
|
||||
<string name="setupwizard_pump_riley_link_status">État du RileyLink :</string>
|
||||
<string name="filter">Filtrer</string>
|
||||
<string name="copytolocalprofile_invalid">Impossible de créer le profil local. Le profil est invalide.</string>
|
||||
<string name="copytolocalprofile_invalid">Impossible de créer le profil. Le profil est invalide.</string>
|
||||
<string name="cta_dont_kill_my_app_info">Garder l\'appli en arrière plan ?</string>
|
||||
<string name="smscommunicator_report_pump_ureachable_summary">Envoyer un SMS si l\'événement Pompe hors de portée est déclenché</string>
|
||||
<string name="smscommunicator_pump_ureachable">Signaler Pompe hors de portée</string>
|
||||
|
@ -864,7 +863,7 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
|
|||
<string name="ns_upload_summary">Profils, boluses, glucides, basals temporaires sont téléchargés vers NS</string>
|
||||
<string name="ns_upload">Télécharger des données vers NS</string>
|
||||
<string name="ns_receive_profile_store">Recevoir les profils sauvegardés</string>
|
||||
<string name="ns_receive_profile_store_summary">Synchroniser les profils à partir de l\'éditeur de profil NS vers le profil local</string>
|
||||
<string name="ns_receive_profile_store_summary">Synchroniser les profils à partir de l\'éditeur de profil NS</string>
|
||||
<string name="ns_receive_temp_target">Recevoir les cibles temporaires</string>
|
||||
<string name="ns_receive_temp_target_summary">Accepter les cibles temporaires entrées via NS ou NSClient</string>
|
||||
<string name="ns_receive_profile_switch">Recevoir les changements de profil</string>
|
||||
|
|
|
@ -86,7 +86,6 @@
|
|||
<string name="mdi">MDI</string>
|
||||
<string name="MM640g">MM640g</string>
|
||||
<string name="sms_minago">%1$dnóim ó shin</string>
|
||||
<string name="localprofile">Próifíl áitiúil</string>
|
||||
<string name="openapsama">OpenAPS AMA</string>
|
||||
<string name="actions_shortname">GNÍ</string>
|
||||
<string name="loop_shortname">LÚB</string>
|
||||
|
|
|
@ -78,7 +78,6 @@
|
|||
<string name="overview">Panoramica</string>
|
||||
<string name="treatments">Trattamenti</string>
|
||||
<string name="virtualpump">Micro virtuale</string>
|
||||
<string name="careportal">Portale</string>
|
||||
<string name="configbuilder_pump">Micro</string>
|
||||
<string name="configbuilder_pump_description">Quale microinfusore desideri usare con AndroidAPS?</string>
|
||||
<string name="configbuilder_profile">Profilo</string>
|
||||
|
@ -257,7 +256,6 @@
|
|||
<string name="ongoingnotificaction">Notifica persistente</string>
|
||||
<string name="old_data">DATI VECCHI</string>
|
||||
<string name="sms_minago">%1$dmin fa</string>
|
||||
<string name="localprofile">Profilo locale</string>
|
||||
<string name="openapsama">OpenAPS AMA</string>
|
||||
<string name="array_of_elements">Matrice di %1$d elementi.\nValore attuale:</string>
|
||||
<string name="openapsma_autosensdata_label">Dati autosens</string>
|
||||
|
@ -750,7 +748,6 @@
|
|||
<string name="clone_label">Clona</string>
|
||||
<string name="saveorresetchangesfirst">Salva o resetta prima le modifiche correnti</string>
|
||||
<string name="deletecurrentprofile">Rimuovere il profilo corrente?</string>
|
||||
<string name="copytolocalprofile">Creare un nuovo profilo locale da questo profilo?</string>
|
||||
<string name="profilenamecontainsdot">Il nome profilo contiene dei punti.\nQuesto non è supportato da NS.\nIl profilo non viene caricato in NS.</string>
|
||||
<string name="low_mark_comment">Valore più basso per l\'intervallo di visualizzazione dell\'area \"in range\"</string>
|
||||
<string name="high_mark_comment">Valore più alto per l\'intervallo di visualizzazione dell\'area \"in range\"</string>
|
||||
|
@ -832,7 +829,6 @@
|
|||
<string name="dpvdefaultprofile">Profilo DPV predefinito</string>
|
||||
<string name="setupwizard_pump_riley_link_status">Stato RileyLink:</string>
|
||||
<string name="filter">Filtro</string>
|
||||
<string name="copytolocalprofile_invalid">Impossibile creare il profilo locale. Il profilo non è valido.</string>
|
||||
<string name="cta_dont_kill_my_app_info">Non terminare l\'app?</string>
|
||||
<string name="smscommunicator_report_pump_ureachable_summary">Invia SMS se si verifica l\'evento \"micro irraggiungibile\"</string>
|
||||
<string name="smscommunicator_pump_ureachable">Segnala micro irraggiungibile</string>
|
||||
|
@ -862,7 +858,6 @@
|
|||
<string name="ns_upload_summary">Profili, boli, CHO, basali temporanee vengono caricati su NS</string>
|
||||
<string name="ns_upload">Carica dati su NS</string>
|
||||
<string name="ns_receive_profile_store">Ricevi \"store\" profilo</string>
|
||||
<string name="ns_receive_profile_store_summary">Sincronizza i profili da NS al profilo locale</string>
|
||||
<string name="ns_receive_temp_target">Ricevi target temporanei</string>
|
||||
<string name="ns_receive_temp_target_summary">Accetta target temporanei inseriti tramite NS o NSClient</string>
|
||||
<string name="ns_receive_profile_switch">Ricevi cambi profilo</string>
|
||||
|
|
|
@ -78,7 +78,6 @@
|
|||
<string name="overview">סקירה כללית</string>
|
||||
<string name="treatments">טיפולים</string>
|
||||
<string name="virtualpump">משאבה וירטואלית</string>
|
||||
<string name="careportal">פורטל טיפולים</string>
|
||||
<string name="configbuilder_pump">משאבה</string>
|
||||
<string name="configbuilder_pump_description">עם איזו משאבה אתם מעוניינים להשתמש ב-AndroidAPS?</string>
|
||||
<string name="configbuilder_profile">פרופיל</string>
|
||||
|
@ -257,7 +256,7 @@
|
|||
<string name="ongoingnotificaction">התראה מתמשכת</string>
|
||||
<string name="old_data">נתונים ישנים</string>
|
||||
<string name="sms_minago">לפני %1$d דקות</string>
|
||||
<string name="localprofile">פרופיל מקומי</string>
|
||||
<string name="localprofile">פרופיל</string>
|
||||
<string name="openapsama">OpenAPS AMA</string>
|
||||
<string name="array_of_elements">מערך של %1$d אלמנטים. \n ערך נוכחי:</string>
|
||||
<string name="openapsma_autosensdata_label">נתוני חישוב רגישות אוטו\'</string>
|
||||
|
@ -830,7 +829,7 @@
|
|||
<string name="formatwittddandpct">גיל: %1$.0f יח\' מינון יומי כולל: %2$.0f יח\' %3$d%%</string>
|
||||
<string name="formatwithweight">גיל: %1$.0f יח\' משקל: %2$.0f ק\"ג</string>
|
||||
<string name="basalpctfromtdd_label">% של הבזאלי</string>
|
||||
<string name="dpvdefaultprofile">פרופיל ברירת מחדל</string>
|
||||
<string name="dpvdefaultprofile">פרופיל ברירת מחדל DPV</string>
|
||||
<string name="setupwizard_pump_riley_link_status">מצב ריילילינק:</string>
|
||||
<string name="filter">סינון</string>
|
||||
<string name="copytolocalprofile_invalid">לא ניתן ליצור פרופיל מקומי. הפרופיל אינו חוקי.</string>
|
||||
|
|
|
@ -78,7 +78,6 @@
|
|||
<string name="overview">홈</string>
|
||||
<string name="treatments">관리</string>
|
||||
<string name="virtualpump">가상펌프</string>
|
||||
<string name="careportal">케어포털</string>
|
||||
<string name="configbuilder_pump">펌프</string>
|
||||
<string name="configbuilder_pump_description">어떤 펌프를 AndroidAPS에서 사용하시겠습니까?</string>
|
||||
<string name="configbuilder_profile">프로파일</string>
|
||||
|
@ -257,7 +256,6 @@
|
|||
<string name="ongoingnotificaction">연속 알림</string>
|
||||
<string name="old_data">오래된 데이터</string>
|
||||
<string name="sms_minago">%dmin ago</string>
|
||||
<string name="localprofile">로컬 프로파일</string>
|
||||
<string name="openapsama">OpenAPS AMA</string>
|
||||
<string name="array_of_elements">%1$d 요소의 배열.\n실제 값:</string>
|
||||
<string name="openapsma_autosensdata_label">Autosens 정보</string>
|
||||
|
@ -750,7 +748,6 @@
|
|||
<string name="clone_label">복사</string>
|
||||
<string name="saveorresetchangesfirst">우선 현재 변경사항을을 저장하거나 재설정하세요</string>
|
||||
<string name="deletecurrentprofile">현재 프로파일을 삭제 하시겠습니까?</string>
|
||||
<string name="copytolocalprofile">프로파일에서 새로운 로컬 프로파일을 만드시겠습니까?</string>
|
||||
<string name="profilenamecontainsdot">프로파일명에 점을 포함하고 있습니다.\n이는 NS에서 지원하지 않습니다.\n프로파일이 NS에 업로드되지 않습니다.</string>
|
||||
<string name="low_mark_comment">혈당 정상범위의 하한값(표시 전용)</string>
|
||||
<string name="high_mark_comment">혈당 정상범위의 상한값(표시 전용)</string>
|
||||
|
@ -832,7 +829,6 @@
|
|||
<string name="dpvdefaultprofile">DPV 기본 프로파일</string>
|
||||
<string name="setupwizard_pump_riley_link_status">RileyLink 상태:</string>
|
||||
<string name="filter">필터</string>
|
||||
<string name="copytolocalprofile_invalid">로컬 프로파일 생성 불가능. 프로파일이 유효하지 않습니다.</string>
|
||||
<string name="cta_dont_kill_my_app_info">앱이 종료되지 않도록 합니다?</string>
|
||||
<string name="smscommunicator_report_pump_ureachable_summary">허용되지 않는 펌프 이벤트가 발생하면 SMS를 보내기</string>
|
||||
<string name="smscommunicator_pump_ureachable">허용되지 않는 펌프 기록</string>
|
||||
|
@ -862,7 +858,6 @@
|
|||
<string name="ns_upload_summary">프로파일, bolus, 탄수화물, 임시 basal이 NS에 업로드 됨</string>
|
||||
<string name="ns_upload">NS에 데이터 업로드하기</string>
|
||||
<string name="ns_receive_profile_store">프로파일 목록 받기</string>
|
||||
<string name="ns_receive_profile_store_summary">NS 프로파일 편집기에서 로컬 프로파일로 프로파일들 동기화하기</string>
|
||||
<string name="ns_receive_temp_target">임시 목표들 받기</string>
|
||||
<string name="ns_receive_temp_target_summary">NS 또는 NSClient에서 입력한 임시 목표 수락하기</string>
|
||||
<string name="ns_receive_profile_switch">프로파일 변경 받기</string>
|
||||
|
|
|
@ -132,6 +132,7 @@
|
|||
<string name="wronginsulin_label">Insulino suleidimo / įrašų klaidos</string>
|
||||
<string name="wronginsulin_whattodo">Ką turėtumėte daryti, jei buvo suleista mažiau insulino nei rodo pompos istorija, pvz. dėl užsikimšimo, neveikiančios kaniulės ar pamiršus po dušo vėl pritvirtinti pompą? </string>
|
||||
<string name="wronginsulin_careportal">Ištrinti insulino suleidimo įrašą per Nightscout Careportal, kad pašalintumėte jį iš pompos istorijos.</string>
|
||||
<string name="wronginsulin_compare">Palyginti įrašus AndroidAPS ir pompos istorijoje (jei tai palaikoma pompoje).</string>
|
||||
<string name="wronginsulin_prime">Susileisti trūkstamą insulino kiekį švirkštu ar naudojantis infuzinės sistemos užpildymo funkcija.</string>
|
||||
<string name="wronginsulin_donothing">Nieko nedaryti ir leisti AndroidAPS koreguoti padidėjusį gliukozės kiekį kraujyje.</string>
|
||||
<string name="iob_label">Aktyvus insulinas organizme (AIO)</string>
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
<string name="description_source_glimp">Gauti kraujo gliukozės vertes iš Glimp.</string>
|
||||
<string name="description_source_mm640g">Gauti kraujo gliukozės vertes iš 600SeriesAndroidUploader.</string>
|
||||
<string name="description_source_ns_client">Gauti kraujo gliukozės vertes iš Nightscout</string>
|
||||
<string name="description_source_xdrip">Gauti kraujo gliukozės reikšmes iš xDrip+.</string>
|
||||
<string name="description_treatments">Išsaugoti visus terapijos pakeitimus</string>
|
||||
<string name="description_wear">Stebėti ir kontroliuoti AndroidAPS naudojant WearOS laikrodį.</string>
|
||||
<string name="description_xdrip_status_line">Rodyti Ciklo informaciją laikrodyje, xDrip+ pradžios ekrane.</string>
|
||||
|
@ -77,7 +78,6 @@
|
|||
<string name="overview">Apžvalga</string>
|
||||
<string name="treatments">Terapija</string>
|
||||
<string name="virtualpump">Virtuali pompa</string>
|
||||
<string name="careportal">Priežiūra</string>
|
||||
<string name="configbuilder_pump">Pompa</string>
|
||||
<string name="configbuilder_pump_description">Kokią pompą naudosite su AndroidAPS?</string>
|
||||
<string name="configbuilder_profile">Profilis</string>
|
||||
|
@ -108,6 +108,7 @@
|
|||
<string name="changeyourinput">Pakeiskite įvestus duomenis!</string>
|
||||
<string name="configbuilder_bgsource">Glikemijos šaltinis</string>
|
||||
<string name="configbuilder_bgsource_description">Iš kur AndroidAPS gaus duomenis?</string>
|
||||
<string name="xdrip">xDrip+</string>
|
||||
<string name="apsmode_title">DKS režimas</string>
|
||||
<string name="closedloop">Uždaras Ciklas</string>
|
||||
<string name="openloop">Atviras Ciklas</string>
|
||||
|
@ -131,6 +132,7 @@
|
|||
<string name="configbuilder_nightscoutversion_label">Nightscout versija:</string>
|
||||
<string name="missing_carbs">Trūksta %1$d g</string>
|
||||
<string name="exported">Nustatymai eksportuoti</string>
|
||||
<string name="ue_exported">Vartotojo įrašai eksportuoti</string>
|
||||
<string name="export_to">Eksportuoti nustatymus</string>
|
||||
<string name="import_from">Importuoti nustatymus iš</string>
|
||||
<string name="setting_imported">Nustatymai importuoti</string>
|
||||
|
@ -226,6 +228,7 @@
|
|||
<string name="mealbolus">Maistas</string>
|
||||
<string name="correctionbous">Korekcija</string>
|
||||
<string name="actions">Veiksmai</string>
|
||||
<string name="ns_upload_only">(PAVOJINGA IŠJUNGTI) Tik įkeliama į NS</string>
|
||||
<string name="pumpNotInitialized">Pompa neprijungta!</string>
|
||||
<string name="primefill">Užpildymas</string>
|
||||
<string name="fillwarning">Įsitikinkite, kad nurodytas kiekis atitinka Jūsų infuzijos rinkinio specifikaciją!</string>
|
||||
|
@ -252,12 +255,13 @@
|
|||
<string name="ongoingnotificaction">Nuolatinis pranešimas</string>
|
||||
<string name="old_data">SENI DUOMENYS</string>
|
||||
<string name="sms_minago">prieš %1$dmin</string>
|
||||
<string name="localprofile">Vietinis profilis</string>
|
||||
<string name="localprofile">Profilis</string>
|
||||
<string name="openapsama">OpenAPS AMA</string>
|
||||
<string name="array_of_elements">%1$d elementų masyvas. \naktuali vertė:</string>
|
||||
<string name="openapsma_autosensdata_label">Autosens duomenys</string>
|
||||
<string name="openapsma_scriptdebugdata_label">Scenarijų derinimas</string>
|
||||
<string name="openapsama_useautosens">Naudoti Autosens funkciją</string>
|
||||
<string name="refresheventsfromnightscout">Atnaujinti iš NS</string>
|
||||
<string name="deletefuturetreatments">Ištrinti ateities įrašus</string>
|
||||
<string name="actions_shortname">VEIKS</string>
|
||||
<string name="configbuilder_shortname">KONF</string>
|
||||
|
@ -272,6 +276,7 @@
|
|||
<string name="smscommunicator_shortname">SMS</string>
|
||||
<string name="short_tabtitles">Naudoti sutrumpintus skirtukų pavadinimus</string>
|
||||
<string name="always_use_shortavg">Visada naudoti trumpo laikotarpio vidutinį pokyti vietoj paprasto pokyčio</string>
|
||||
<string name="always_use_shortavg_summary">Naudinga, kai duomenys, gaunami iš nefiltruoto šaltinio, tokio kaip xDrip+, tampa nestabilūs.</string>
|
||||
<string name="profile">Profilis</string>
|
||||
<string name="openapsama_max_daily_safety_multiplier_summary">Numatytoji reikšmė: 3 tai pagrindinis OpenAPS saugiklis. Jis apriboja Jūsų valandinę bazę iki trigubos maksimalios valandinės bazės (standartiniu atveju). Jums greičiausiai neprireiks šios reikšmės keisti, tačiau turėtumėte žinoti, kad ji naudojama kaip saugiklis apskaičiuojant \"3x maksimali dienos bazė; 4x dabartinė valandinė bazė\".</string>
|
||||
<string name="openapsama_current_basal_safety_multiplier_summary">Numatytoji reikšmė: 4 tai antras pagrindinis OpenAPS saugiklis, apskaičiuojant \"3x maksimali dienos bazė; 4x dabartinė valandinė bazė\". Jis reiškia, kad jūsų valandinė bazė, nepriklausomai nuo to, kokia maksimali valandinė bazė suprogramuota pompoje, negali būti didesnė, nei keturguba dabartinė valandinė bazė. Tai apsaugo Jus nuo pavojingų situacijų, kai nustatoma pernelyg didelė valandinė bazė, pilnai nesuprantant, kaip veikia algoritmas. Numatytoji reikšmė yra 4x; daugumai vartotojų niekada neprireikia šio skaičiaus keisti, o pajutus, kad \"atsitrenkiama\" į saugiklį, rekomenduojama peržiūrėti kitus nustatymus.</string>
|
||||
|
@ -285,6 +290,9 @@
|
|||
<string name="smscommunicator_invalidphonennumber">Neteisingas SMS telefono numeris</string>
|
||||
<string name="overview_calibration">Kalibravimas</string>
|
||||
<string name="xdripnotinstalled">xDrip+ neįdiegta</string>
|
||||
<string name="calibrationsent">Kalibracija nusiųsta į xDrip+</string>
|
||||
<string name="smscommunicator_calibrationsent">Kalibracija išsiųsta. xDrip+ programoje turi būti įgalintas gavimas.</string>
|
||||
<string name="smscommunicator_calibrationfailed">xDrip+ negauna kalibracijų</string>
|
||||
<string name="pumpsuspended">Pompa sustabdyta</string>
|
||||
<string name="executing">Vykdoma</string>
|
||||
<string name="virtualpump_settings">Virtualios pompos nustatymai</string>
|
||||
|
@ -367,8 +375,12 @@
|
|||
<string name="statuslights_sage_critical">Jutiklio kritinio laiko įspėjimas [h]</string>
|
||||
<string name="statuslights_sbat_warning">Įspėjimo apie žemą sensoriaus baterijos lygį riba [%]</string>
|
||||
<string name="statuslights_sbat_critical">Įspėjimo apie kritiškai žemą sensoriaus baterijos lygį riba [%]</string>
|
||||
<string name="statuslights_bage_warning">Pompos baterijos ribinio laiko įspėjimas [h]</string>
|
||||
<string name="statuslights_bage_critical">Pompos baterijos kritinio laiko įspėjimas [h]</string>
|
||||
<string name="statuslights_res_warning">Įspėjimo apie žemą rezervuaro lygį riba [U]</string>
|
||||
<string name="statuslights_res_critical">Įspėjimo apie kritiškai žemą rezervuaro lygį riba [U]</string>
|
||||
<string name="statuslights_bat_warning">Pompos baterijos ribinio įkrovimo lygio įspėjimas [%]</string>
|
||||
<string name="statuslights_bat_critical">Pompos baterijos kritinio įkrovimo lygio įspėjimas [%]</string>
|
||||
<string name="prediction_shortname">PROGN</string>
|
||||
<string name="basal_shortname">VB</string>
|
||||
<string name="deviation_shortname">DEV</string>
|
||||
|
@ -378,6 +390,8 @@
|
|||
<string name="nav_about">Apie</string>
|
||||
<string name="smscommunicator_missingsmspermission">Trūksta leidimo SMS</string>
|
||||
<string name="smscommunicator_missingphonestatepermission">Trūksta telefono būsenos leidimo</string>
|
||||
<string name="xdripstatus_settings">xDrip+ statusas (laikrodyje)</string>
|
||||
<string name="xdripstatus">xDrip+ būsenos juosta (laikrodyje)</string>
|
||||
<string name="xdripstatus_shortname">xds</string>
|
||||
<string name="wear_showbgi_title">Rodyti KG</string>
|
||||
<string name="wear_showbgi_summary">Pridėti KG prie statuso linijos</string>
|
||||
|
@ -416,6 +430,7 @@
|
|||
<string name="mdtp_cancel">Atšaukti</string>
|
||||
<string name="notloadedplugins">Ne visi profiliai įkelti!</string>
|
||||
<string name="valuesnotstored">Reikšmės neišsaugotos!</string>
|
||||
<string name="ns_localbroadcasts">Įgalinti perdavimą į kitas programas (pvz., xDrip+). Neįgalinkite, jei įdiegta daugiau nei vienas AAPS arba NSClient egzempliorius!</string>
|
||||
<string name="ns_localbroadcasts_title">Įgalinti lokalų duomenų perdavimą.</string>
|
||||
<string name="openapssmb">OpenAPS SMB</string>
|
||||
<string name="enableuam">Įjungti NDM</string>
|
||||
|
@ -440,6 +455,7 @@
|
|||
<string name="activity_target">\"Aktyvumas\" tikslas</string>
|
||||
<string name="hypo_duration">\"Hipo\" trukmė</string>
|
||||
<string name="hypo_target">\"Hipo\" tikslas</string>
|
||||
<string name="reuse_profile_pct_hours">Pakartotinai naudoti %1$d%% %2$dh</string>
|
||||
<string name="wearcontrol_title">Laikrodžio valdikliai</string>
|
||||
<string name="wearcontrol_summary">Nustatyti Laikinus Tikslus ir įvesti terapinius įrašus iš laikrodžio.</string>
|
||||
<string name="food">Maistas</string>
|
||||
|
@ -475,6 +491,7 @@
|
|||
<string name="dexcomg5_xdripupload_title">Siųsti KG duomenis į xDrip+</string>
|
||||
<string name="dexcomg5_xdripupload_summary">Xdrip+ pasirinkite 640g/Eversense duomenų šaltinį</string>
|
||||
<string name="nsclientbg">NSClient KG</string>
|
||||
<string name="nsclientbgshort">NS KG</string>
|
||||
<string name="overview_editquickwizard_usebg">KG apskaičiavimas</string>
|
||||
<string name="overview_editquickwizard_usebolusiob">Bolusų AIO apskaičiavimas</string>
|
||||
<string name="overview_editquickwizard_usebasaliob">Bazės AIO apskaičiavimas</string>
|
||||
|
@ -536,6 +553,7 @@
|
|||
<string name="bolusrecordedonly">Bolusai bus tik įrašyti (nebus suleisti iš pompos)</string>
|
||||
<string name="loop_smbsetbypump_label">SMB nustatyta iš pompos</string>
|
||||
<string name="overview_show_activity">Aktyvumas</string>
|
||||
<string name="overview_show_bgi">KG įtaka</string>
|
||||
<string name="overview_show_sensitivity">Jautrumas insulinui</string>
|
||||
<string name="overview_show_deviations">Nuokrypiai</string>
|
||||
<string name="overview_show_cob">Aktyvūs angliavandeniai</string>
|
||||
|
@ -730,7 +748,7 @@
|
|||
<string name="clone_label">Klonuoti</string>
|
||||
<string name="saveorresetchangesfirst">Pirmiausia išsaugoti arba anuliuoti dabartinius pokyčius</string>
|
||||
<string name="deletecurrentprofile">Ištrinti esamą profilį?</string>
|
||||
<string name="copytolocalprofile">Kurti naują vietinį profilį iš šito?</string>
|
||||
<string name="copytolocalprofile">Kurti naują profilį iš šito profilio?</string>
|
||||
<string name="profilenamecontainsdot">Profilio pavadinime yra taškų.\nŠios funkcijos NS nepalaiko.\nProfilis neįkeltas į NS.</string>
|
||||
<string name="low_mark_comment">Mažiausia tikslinės srities vertė (tik rodymui)</string>
|
||||
<string name="high_mark_comment">Didžiausia tikslinės srities vertė (tik rodymui)</string>
|
||||
|
@ -754,6 +772,7 @@
|
|||
<string name="randombg_short">KG</string>
|
||||
<string name="tools">Įrankiai</string>
|
||||
<string name="show_calculation">Rodyti skaičiavimą</string>
|
||||
<string name="show_removed">Parodyti pašalintus</string>
|
||||
<string name="clearqueueconfirm">Išvalyti eilę? Visi eilės duomenys bus prarasti!</string>
|
||||
<string name="ebstopsloop">Ištęsto boluso funkcija sustabdys uždaro ciklo režimą ištęsto boluso veikimo metu. Ar tikrai norite patvirtinti savo pasirinkimą?</string>
|
||||
<string name="closed_loop_disabled_with_eb">Uždara ciklas išjungtas dėl ištęsto boluso veikimo</string>
|
||||
|
@ -811,9 +830,10 @@
|
|||
<string name="dpvdefaultprofile">Numatytasis profilis</string>
|
||||
<string name="setupwizard_pump_riley_link_status">RileyLink statusas:</string>
|
||||
<string name="filter">Filtruoti</string>
|
||||
<string name="copytolocalprofile_invalid">Nepavyksta sukurti vietinio profilio. Profilis neteisingas.</string>
|
||||
<string name="copytolocalprofile_invalid">Nepavyksta sukurti profilio. Profilis neteisingas.</string>
|
||||
<string name="cta_dont_kill_my_app_info">Don\'t kill my app?</string>
|
||||
<string name="smscommunicator_report_pump_ureachable_summary">Siųsti SMS, jei aptinkamas įrašas apie nepasiekiamą pompą</string>
|
||||
<string name="smscommunicator_pump_ureachable">Pranešti apie nepasiekiamą pompą</string>
|
||||
<string name="advisoralarm">Pranešti apie laiką valgyti</string>
|
||||
<string name="alarminxmin">Pranešti po %1$d min</string>
|
||||
<string name="bolusadvisor">Boluso patarėjas</string>
|
||||
|
@ -822,4 +842,18 @@
|
|||
<string name="enablebolusadvisor_summary">Galimybė priminti jums valgyti vėliau (pvz., esant aukštai glikemijai) boliuso vedlyje („po susileidimo palaukti ir valgyti vėliau“)</string>
|
||||
<string name="time_to_eat">Laikas valgyti!\nĮjunkite Boluso patarėją ir atlikite skaičiavimą dar kartą.</string>
|
||||
<string name="timetoeat">Laikas valgyti</string>
|
||||
<string name="fabric_upload_disabled">Sutrikimų žurnalo įrašų įkėlimas išjungtas!</string>
|
||||
<string name="clear_filter">Valyti filtrą</string>
|
||||
<string name="trend_arrow">Tendencijos kryptis</string>
|
||||
<string name="cannula">Kaniulė</string>
|
||||
<string name="userentry">Naudotojo įrašas</string>
|
||||
<string name="email_address">El. pašto adresas</string>
|
||||
<string name="privacy_settings">Privatumo nuostatos</string>
|
||||
<string name="privacy_summary">Nurodykite el. pašto adresą (neprivaloma), jei norite gauti informaciją apie programos strigimus. Tai nėra automatizuota paslauga. Kūrėjai susisieks esant pavojingoms situacijoms.</string>
|
||||
<string name="full_sync">Pilna sinchronizacija</string>
|
||||
<string name="prime">Užpildyti sistemą</string>
|
||||
<string name="ns_sync_options">Sinchronizacija</string>
|
||||
<string name="ns_upload_summary">Profiliai, bolusai, angliavandeniai, laikinos bazės įkeltos į NS</string>
|
||||
<string name="ns_upload">Įkelti duomenis į NS</string>
|
||||
<string name="ns_receive_profile_store">Priimti profilių saugyklą</string>
|
||||
</resources>
|
||||
|
|
|
@ -78,7 +78,6 @@
|
|||
<string name="overview">Overzicht</string>
|
||||
<string name="treatments">Behandelingen</string>
|
||||
<string name="virtualpump">Virtuele Pomp</string>
|
||||
<string name="careportal">Careportal</string>
|
||||
<string name="configbuilder_pump">Pomp</string>
|
||||
<string name="configbuilder_pump_description">Welke pomp wil je gaan gebruiken met AndroidAPS?</string>
|
||||
<string name="configbuilder_profile">Profiel</string>
|
||||
|
@ -257,7 +256,6 @@
|
|||
<string name="ongoingnotificaction">Permanent bericht</string>
|
||||
<string name="old_data">Oude gegevens</string>
|
||||
<string name="sms_minago">%1$dmin geleden</string>
|
||||
<string name="localprofile">Lokaal profiel</string>
|
||||
<string name="openapsama">OpenAPS AMA</string>
|
||||
<string name="array_of_elements">Array van %1$d elementen. \nActuele waarde:</string>
|
||||
<string name="openapsma_autosensdata_label">Autosens gegevens</string>
|
||||
|
@ -750,7 +748,6 @@
|
|||
<string name="clone_label">Dupliceren</string>
|
||||
<string name="saveorresetchangesfirst">Huidige wijzigingen eerst opslaan of ongedaan maken</string>
|
||||
<string name="deletecurrentprofile">Huidige profiel verwijderen?</string>
|
||||
<string name="copytolocalprofile">Nieuw lokaal profiel aanmaken van dit profiel?</string>
|
||||
<string name="profilenamecontainsdot">Profielnaam bevat punten.\nDit wordt niet ondersteund door NS.\nProfiel is niet geüpload naar NS.</string>
|
||||
<string name="low_mark_comment">Laagste waarde in bereik (alleen weergave)</string>
|
||||
<string name="high_mark_comment">Hoogste waarde in bereik (alleen weergave)</string>
|
||||
|
@ -804,10 +801,10 @@
|
|||
<string name="smscommunicator_otp_step3_test_header">3. Test eenmalig wachtwoord (One Time Password)</string>
|
||||
<string name="smscommunicator_otp_reset_header">Reset Authentificatie</string>
|
||||
<string name="smscommunicator_otp_install_info">Installeer de Authenticator-app op elke volger telefoon die RFC 6238 TOTP tokens ondersteunt. Populaire gratis apps zijn:\n • Authy\n • Google Authenticator\n • LastPass Authenticator\n • FreeOTP Authenticator</string>
|
||||
<string name="smscommunicator_otp_reset_warning">Door de Athentificator te resetten, maak je alle Authentificatie-instellingen van reeds verbonden telefoons ongeldig! Je zult ze opnieuw moeten instellen!</string>
|
||||
<string name="smscommunicator_otp_reset_warning">Door de Authentificator te resetten, maak je alle Authentificatie-instellingen van reeds verbonden telefoons ongeldig! Je zult ze opnieuw moeten instellen!</string>
|
||||
<string name="overview_show_predictions">Voorspellingen</string>
|
||||
<string name="overview_show_deviationslope">Richtingscoëfficiënt afwijking</string>
|
||||
<string name="authorizationfailed">Authorisatie mislukt</string>
|
||||
<string name="authorizationfailed">Autorisatie mislukt</string>
|
||||
<string name="overview_show_absinsulin">Absolute insuline</string>
|
||||
<string name="master_password_summary">Het masterwachtwoord wordt gebruikt voor het versleutelen van backups en om de app-beveiligingen te kunnen overschrijven. Onthoud het goed of bewaar het op een veilige plaats.</string>
|
||||
<string name="current_master_password">Huidig masterwachtwoord</string>
|
||||
|
@ -832,7 +829,6 @@
|
|||
<string name="dpvdefaultprofile">DPV Basis profiel</string>
|
||||
<string name="setupwizard_pump_riley_link_status">RileyLink Status:</string>
|
||||
<string name="filter">Filter</string>
|
||||
<string name="copytolocalprofile_invalid">Lokaal profiel kan niet worden gemaakt. Profiel is ongeldig.</string>
|
||||
<string name="cta_dont_kill_my_app_info">Don\'t kill my app?</string>
|
||||
<string name="smscommunicator_report_pump_ureachable_summary">Stuur SMS wanneer de pomp onbereikbaar is</string>
|
||||
<string name="smscommunicator_pump_ureachable">Melding pomp onbereikbaar</string>
|
||||
|
|
|
@ -78,7 +78,6 @@
|
|||
<string name="overview">Oversikt</string>
|
||||
<string name="treatments">Behandlinger</string>
|
||||
<string name="virtualpump">Virtuell pumpe</string>
|
||||
<string name="careportal">Careportal</string>
|
||||
<string name="configbuilder_pump">Pumpe</string>
|
||||
<string name="configbuilder_pump_description">Hvilken pumpe ønsker du å bruke sammen med AndroidAPS?</string>
|
||||
<string name="configbuilder_profile">Profil</string>
|
||||
|
@ -257,7 +256,6 @@
|
|||
<string name="ongoingnotificaction">Pågående varslinger</string>
|
||||
<string name="old_data">GAMLE DATA</string>
|
||||
<string name="sms_minago">%1$d min siden</string>
|
||||
<string name="localprofile">Lokal profil</string>
|
||||
<string name="openapsama">OpenAPS AMA</string>
|
||||
<string name="array_of_elements">Liste med %1$d elementer.\nFaktisk verdi:</string>
|
||||
<string name="openapsma_autosensdata_label">Autosens data</string>
|
||||
|
@ -751,7 +749,6 @@
|
|||
<string name="clone_label">Klon</string>
|
||||
<string name="saveorresetchangesfirst">Lagre eller nullstill gjeldende endringer først</string>
|
||||
<string name="deletecurrentprofile">Slette gjeldende profil?</string>
|
||||
<string name="copytolocalprofile">Opprette ny lokal profil fra denne profilen?</string>
|
||||
<string name="profilenamecontainsdot">Profilnavnet inneholder prikker.\nDette støttes ikke av NS.\nProfilen er ikke lastet opp til NS.</string>
|
||||
<string name="low_mark_comment">Nedre verdi for målområdet (kun visning)</string>
|
||||
<string name="high_mark_comment">Øvre verdi for målområdet (kun visning)</string>
|
||||
|
@ -833,7 +830,6 @@
|
|||
<string name="dpvdefaultprofile">DPV standardprofil</string>
|
||||
<string name="setupwizard_pump_riley_link_status">RileyLink status:</string>
|
||||
<string name="filter">Filter</string>
|
||||
<string name="copytolocalprofile_invalid">Klarte ikke å opprette lokal profil. Profilen er ikke gyldig.</string>
|
||||
<string name="cta_dont_kill_my_app_info">Avslutte app?</string>
|
||||
<string name="smscommunicator_report_pump_ureachable_summary">Send SMS hvis det ikke oppnås kontakt med pumpa</string>
|
||||
<string name="smscommunicator_pump_ureachable">Rapporter når kontakt med pumpe ikke oppnås</string>
|
||||
|
@ -863,7 +859,6 @@
|
|||
<string name="ns_upload_summary">Profiler, boluser, karbohydrater, midlertidige basaler lastes opp til NS</string>
|
||||
<string name="ns_upload">Last opp data til NS</string>
|
||||
<string name="ns_receive_profile_store">Hent lagrede profiler</string>
|
||||
<string name="ns_receive_profile_store_summary">Synkroniser profiler fra NS til lokal profil</string>
|
||||
<string name="ns_receive_temp_target">Motta midlertidige BS mål</string>
|
||||
<string name="ns_receive_temp_target_summary">Aksepter midlertidige mål angitt med NS eller NSClient</string>
|
||||
<string name="ns_receive_profile_switch">Motta profilbytter</string>
|
||||
|
|
|
@ -78,7 +78,6 @@
|
|||
<string name="overview">Przegląd</string>
|
||||
<string name="treatments">Terapia</string>
|
||||
<string name="virtualpump">Pompa wirtualna</string>
|
||||
<string name="careportal">PortalOpieki</string>
|
||||
<string name="configbuilder_pump">Pompa</string>
|
||||
<string name="configbuilder_pump_description">Którą pompę chcesz wykorzystać do AndroidAPS?</string>
|
||||
<string name="configbuilder_profile">Profil</string>
|
||||
|
@ -256,7 +255,6 @@
|
|||
<string name="ongoingnotificaction">Nadchodzące powiadomienia</string>
|
||||
<string name="old_data">NIEAKTUALNE DANE</string>
|
||||
<string name="sms_minago">%1$dmin temu</string>
|
||||
<string name="localprofile">Lokalny Profil</string>
|
||||
<string name="openapsama">OpenAPS AMA</string>
|
||||
<string name="array_of_elements">Lista %1$d elementów.\n Bieżąca wartość:</string>
|
||||
<string name="openapsma_autosensdata_label">Dane Autosens</string>
|
||||
|
@ -745,7 +743,6 @@
|
|||
<string name="clone_label">Sklonuj</string>
|
||||
<string name="saveorresetchangesfirst">Najpierw zapisz lub wycofaj bieżące zmiany</string>
|
||||
<string name="deletecurrentprofile">Skasować bieżący profil?</string>
|
||||
<string name="copytolocalprofile">Utworzyć nowy profil lokalny z wybranego profilu?</string>
|
||||
<string name="profilenamecontainsdot">Nazwa profilu zawiera kropki.\nTo nie jest obsługiwane przez NS.\nProfil nie zostanie przesyłany do NS.</string>
|
||||
<string name="low_mark_comment">Dolna wartość zakresu docelowego (tylko do wyświetlania)</string>
|
||||
<string name="high_mark_comment">Górna wartość zakresu docelowego (tylko do wyświetlania)</string>
|
||||
|
@ -826,7 +823,6 @@
|
|||
<string name="dpvdefaultprofile">Domyślny profil DPV</string>
|
||||
<string name="setupwizard_pump_riley_link_status">Stan RileyLink:</string>
|
||||
<string name="filter">Filtr</string>
|
||||
<string name="copytolocalprofile_invalid">Nie można utworzyć profilu lokalnego. Profil jest niepoprawny.</string>
|
||||
<string name="cta_dont_kill_my_app_info">Nie zabij mojej aplikacji?</string>
|
||||
<string name="smscommunicator_report_pump_ureachable_summary">Wyślij SMS, jeśli wyzwolone jest zdarzenie pompy nieosiągalnej</string>
|
||||
<string name="smscommunicator_pump_ureachable">Zgłoś nieosiągalną pompę</string>
|
||||
|
|
|
@ -75,7 +75,6 @@
|
|||
<string name="overview">Visão geral</string>
|
||||
<string name="treatments">Tratamentos</string>
|
||||
<string name="virtualpump">Bomba virtual</string>
|
||||
<string name="careportal">Careportal</string>
|
||||
<string name="configbuilder_pump">Bomba</string>
|
||||
<string name="configbuilder_pump_description">Qual a bomba que gostaria de usar com AndroidAPS?</string>
|
||||
<string name="configbuilder_profile">Perfil</string>
|
||||
|
@ -232,7 +231,6 @@
|
|||
<string name="ongoingnotificaction">Notificação em curso</string>
|
||||
<string name="old_data">DADOS ANTIGOS</string>
|
||||
<string name="sms_minago">%1$dmin atrás</string>
|
||||
<string name="localprofile">Perfil local</string>
|
||||
<string name="openapsama">OpenAPS AMA</string>
|
||||
<string name="array_of_elements">Array de %1$d elementos.\nValor atual:</string>
|
||||
<string name="openapsma_autosensdata_label">Dados Autosens</string>
|
||||
|
|
|
@ -78,7 +78,6 @@
|
|||
<string name="overview">Visão Geral</string>
|
||||
<string name="treatments">Tratamentos</string>
|
||||
<string name="virtualpump">Bomba virtual</string>
|
||||
<string name="careportal">Careportal</string>
|
||||
<string name="configbuilder_pump">Bomba</string>
|
||||
<string name="configbuilder_pump_description">Qual a bomba que gostaria de utilizar com AndroidAPS?</string>
|
||||
<string name="configbuilder_profile">Perfil</string>
|
||||
|
@ -257,7 +256,6 @@
|
|||
<string name="ongoingnotificaction">Notificação em curso</string>
|
||||
<string name="old_data">DADOS ANTIGOS</string>
|
||||
<string name="sms_minago">%1$dmin atrás</string>
|
||||
<string name="localprofile">Perfil local</string>
|
||||
<string name="openapsama">OpenAPS AMA</string>
|
||||
<string name="array_of_elements">Array de %1$d elementos.\nValor actual:</string>
|
||||
<string name="openapsma_autosensdata_label">Dados Autosens</string>
|
||||
|
@ -750,7 +748,6 @@
|
|||
<string name="clone_label">Clone</string>
|
||||
<string name="saveorresetchangesfirst">Guardar ou repor as alterações actuais primeiro</string>
|
||||
<string name="deletecurrentprofile">Eliminar perfil actual?</string>
|
||||
<string name="copytolocalprofile">Criar novo perfil local a partir deste perfil?</string>
|
||||
<string name="profilenamecontainsdot">Nome do perfil contém pontos.\nIsso não é suportado pelo NS.\nPerfil não é enviado para o NS.</string>
|
||||
<string name="low_mark_comment">Valor mais baixo da área de intervalo (apenas exibição)</string>
|
||||
<string name="high_mark_comment">Valor mais alto da área de intervalo (apenas exibição)</string>
|
||||
|
@ -831,7 +828,6 @@
|
|||
<string name="dpvdefaultprofile">Perfil Padrão DPV</string>
|
||||
<string name="setupwizard_pump_riley_link_status">Estado RileyLink:</string>
|
||||
<string name="filter">Filtro</string>
|
||||
<string name="copytolocalprofile_invalid">Não é possível criar perfil local. Perfil é inválido.</string>
|
||||
<string name="cta_dont_kill_my_app_info">Não encerre minha app?</string>
|
||||
<string name="smscommunicator_report_pump_ureachable_summary">Enviar SMS se evento de bomba inacessível for acionado</string>
|
||||
<string name="smscommunicator_pump_ureachable">Reportar bomba inacessível</string>
|
||||
|
|
|
@ -78,7 +78,6 @@
|
|||
<string name="overview">Privire de ansamblu</string>
|
||||
<string name="treatments">Tratamente</string>
|
||||
<string name="virtualpump">Pompă virtuală</string>
|
||||
<string name="careportal">Careportal</string>
|
||||
<string name="configbuilder_pump">Pompă</string>
|
||||
<string name="configbuilder_pump_description">Ce pompă doriți să folosiți cu AndroidAPS?</string>
|
||||
<string name="configbuilder_profile">Profil</string>
|
||||
|
@ -256,7 +255,6 @@
|
|||
<string name="ongoingnotificaction">Notificare activă</string>
|
||||
<string name="old_data">DATE VECHI</string>
|
||||
<string name="sms_minago">acum %1$dmin</string>
|
||||
<string name="localprofile">Profil local</string>
|
||||
<string name="openapsama">OpenAPS AMA</string>
|
||||
<string name="array_of_elements">Matrice de %1$d elemente.\nValoarea curentă:</string>
|
||||
<string name="openapsma_autosensdata_label">Date Autosens</string>
|
||||
|
@ -748,7 +746,6 @@
|
|||
<string name="clone_label">Clonează</string>
|
||||
<string name="saveorresetchangesfirst">Salvează sau resetează modificările curente mai întâi</string>
|
||||
<string name="deletecurrentprofile">Ştergeţi profilul curent?</string>
|
||||
<string name="copytolocalprofile">Creați un profil local nou pe baza acestui profil?</string>
|
||||
<string name="profilenamecontainsdot">Numele profilului conține puncte.\nAcest lucru nu este permis de NS.\nProfilul nu a fost înregistrat în NS.</string>
|
||||
<string name="low_mark_comment">Valoarea inferioară a intervalului țintă (doar afișare)</string>
|
||||
<string name="high_mark_comment">Valoarea superioară a intervalului țintă (doar afișare)</string>
|
||||
|
@ -829,7 +826,6 @@
|
|||
<string name="dpvdefaultprofile">Profil implicit DPV</string>
|
||||
<string name="setupwizard_pump_riley_link_status">Stare RileyLink:</string>
|
||||
<string name="filter">Filtru</string>
|
||||
<string name="copytolocalprofile_invalid">Nu se poate crea profilul local. Profilul este invalid.</string>
|
||||
<string name="cta_dont_kill_my_app_info">Nu-mi opri aplicația?</string>
|
||||
<string name="smscommunicator_report_pump_ureachable_summary">Trimite SMS dacă este generata o alarma de eroare conexiune pompa</string>
|
||||
<string name="smscommunicator_pump_ureachable">Raportează pompa inaccesibilă</string>
|
||||
|
|
|
@ -78,7 +78,6 @@
|
|||
<string name="overview">Начало</string>
|
||||
<string name="treatments">Терапия</string>
|
||||
<string name="virtualpump">Виртуальная помпа</string>
|
||||
<string name="careportal">Портал лечения / назначений</string>
|
||||
<string name="configbuilder_pump">помпа</string>
|
||||
<string name="configbuilder_pump_description">Какой помпой вы хотели бы пользоваться с AndroidAPS?</string>
|
||||
<string name="configbuilder_profile">профиль</string>
|
||||
|
@ -257,7 +256,7 @@
|
|||
<string name="ongoingnotificaction">текущие уведомления</string>
|
||||
<string name="old_data">старые данные</string>
|
||||
<string name="sms_minago">%1$d мин. назад</string>
|
||||
<string name="localprofile">локальный профиль</string>
|
||||
<string name="localprofile">Профиль</string>
|
||||
<string name="openapsama">Помощник болюса OpenAPS AMA</string>
|
||||
<string name="array_of_elements">Массив %1$d элементов. \nActual актуальная величина:</string>
|
||||
<string name="openapsma_autosensdata_label">данные autosens</string>
|
||||
|
@ -494,6 +493,7 @@
|
|||
<string name="dexcomg5_xdripupload_title">Отправить данные СК на xDrip+</string>
|
||||
<string name="dexcomg5_xdripupload_summary">В xDrip + выберите источник данных 640g/Eversense</string>
|
||||
<string name="nsclientbg">СК с клиента Nightscout</string>
|
||||
<string name="nsclientbgshort">ГК с NS </string>
|
||||
<string name="overview_editquickwizard_usebg">Вычисление СК</string>
|
||||
<string name="overview_editquickwizard_usebolusiob">Расчет болюсного активного инсулина IOB</string>
|
||||
<string name="overview_editquickwizard_usebasaliob">Расчет базального активного инсулина IOB</string>
|
||||
|
|
|
@ -78,7 +78,6 @@
|
|||
<string name="overview">Prehľad</string>
|
||||
<string name="treatments">Ošetrenia</string>
|
||||
<string name="virtualpump">Virtuálna pumpa</string>
|
||||
<string name="careportal">Starostlivosť</string>
|
||||
<string name="configbuilder_pump">Pumpa</string>
|
||||
<string name="configbuilder_pump_description">Akú pumpu chcete používať s AndroidAPS?</string>
|
||||
<string name="configbuilder_profile">Profil</string>
|
||||
|
@ -257,7 +256,7 @@
|
|||
<string name="ongoingnotificaction">Priebežné notifikácie</string>
|
||||
<string name="old_data">ZASTARALÉ DÁTA</string>
|
||||
<string name="sms_minago">pred %1$d min</string>
|
||||
<string name="localprofile">Lokálny profil</string>
|
||||
<string name="localprofile">Profil</string>
|
||||
<string name="openapsama">OpenAPS AMA</string>
|
||||
<string name="array_of_elements">Pole %1$d prvkov.\nAktuálna hodnota:</string>
|
||||
<string name="openapsma_autosensdata_label">Dáta detekcie citlivosti</string>
|
||||
|
@ -863,7 +862,7 @@
|
|||
<string name="ns_upload_summary">Profily, bolusy, sacharidy, dočasné bazály sú nahrávané do NS</string>
|
||||
<string name="ns_upload">Nahrávať dáta do NS</string>
|
||||
<string name="ns_receive_profile_store">Prijímať úložisko profilov</string>
|
||||
<string name="ns_receive_profile_store_summary">Synchronizovať profily z NS do miestneho profilu</string>
|
||||
<string name="ns_receive_profile_store_summary">Synchronizovať profily z NS editora profilov</string>
|
||||
<string name="ns_receive_temp_target">Prijímať dočasné ciele</string>
|
||||
<string name="ns_receive_temp_target_summary">Prijať dočasné ciele zadané prostredníctvom NS, alebo NSClienta</string>
|
||||
<string name="ns_receive_profile_switch">Prijímať prepnutia profilov</string>
|
||||
|
|
|
@ -79,7 +79,6 @@ Eversense-appen.</string>
|
|||
<string name="overview">Översikt</string>
|
||||
<string name="treatments">Behandlingar</string>
|
||||
<string name="virtualpump">Virtuell pump</string>
|
||||
<string name="careportal">Careportal</string>
|
||||
<string name="configbuilder_pump">Pump</string>
|
||||
<string name="configbuilder_pump_description">Vilken pump vill du använda med AndroidAPS?</string>
|
||||
<string name="configbuilder_profile">Profil</string>
|
||||
|
@ -258,7 +257,6 @@ Eversense-appen.</string>
|
|||
<string name="ongoingnotificaction">Konstant avisering i telefonen</string>
|
||||
<string name="old_data">Aktuellt BG saknas!</string>
|
||||
<string name="sms_minago">%1$d min sedan</string>
|
||||
<string name="localprofile">Lokal profil</string>
|
||||
<string name="openapsama">OpenAPS AMA</string>
|
||||
<string name="array_of_elements">En serie med %1$d tal.\nVärde:</string>
|
||||
<string name="openapsma_autosensdata_label">Autosensdata</string>
|
||||
|
@ -752,7 +750,6 @@ Eversense-appen.</string>
|
|||
<string name="clone_label">Kopiera</string>
|
||||
<string name="saveorresetchangesfirst">Spara eller återställa aktuella ändringar först</string>
|
||||
<string name="deletecurrentprofile">Ta bort aktuell profil?</string>
|
||||
<string name="copytolocalprofile">Skapa ny lokal profil av denna?</string>
|
||||
<string name="profilenamecontainsdot">Profilnamnet innehåller punkter.\nDetta stöds inte av NS.\nProfil överförs inte till NS.</string>
|
||||
<string name="low_mark_comment">Nedre värdet för målområde (endast visning)</string>
|
||||
<string name="high_mark_comment">Övre värdet för målområde (endast visning)</string>
|
||||
|
@ -834,7 +831,6 @@ Eversense-appen.</string>
|
|||
<string name="dpvdefaultprofile">DPV-standardprofil</string>
|
||||
<string name="setupwizard_pump_riley_link_status">Riley Link-status:</string>
|
||||
<string name="filter">Filter</string>
|
||||
<string name="copytolocalprofile_invalid">Kan inte att skapa den lokala profilen. Profilen är ogiltig.</string>
|
||||
<string name="cta_dont_kill_my_app_info">Döda inte min app?</string>
|
||||
<string name="smscommunicator_report_pump_ureachable_summary">Skicka SMS om pumpen inte kan nås</string>
|
||||
<string name="smscommunicator_pump_ureachable">Rapportera om pump inte kan nås</string>
|
||||
|
@ -864,7 +860,6 @@ Eversense-appen.</string>
|
|||
<string name="ns_upload_summary">Profiler, bolus, kolhydrater och temp basaler laddas upp till NS</string>
|
||||
<string name="ns_upload">Ladda upp data till NS</string>
|
||||
<string name="ns_receive_profile_store">Ladda ner profiler</string>
|
||||
<string name="ns_receive_profile_store_summary">Skapa/synka lokala profiler från NS</string>
|
||||
<string name="ns_receive_temp_target">Ladda ner temporära mål</string>
|
||||
<string name="ns_receive_temp_target_summary">Godkänn temp mål som anges genom NS eller NSClient</string>
|
||||
<string name="ns_receive_profile_switch">Ladda ner profilbyten</string>
|
||||
|
|
|
@ -70,7 +70,6 @@
|
|||
<string name="overview">Genel Bakış</string>
|
||||
<string name="treatments">Tedaviler</string>
|
||||
<string name="virtualpump">Sanal pompa</string>
|
||||
<string name="careportal">Careportal</string>
|
||||
<string name="configbuilder_pump">Pompa</string>
|
||||
<string name="configbuilder_pump_description">Hangi pompa ile AndroidAPS kullanmak istersiniz?</string>
|
||||
<string name="configbuilder_profile">Profil</string>
|
||||
|
@ -183,7 +182,6 @@
|
|||
<string name="ongoingnotificaction">Sürekli Bildirim</string>
|
||||
<string name="old_data">ESKİ VERİ</string>
|
||||
<string name="sms_minago">%1$ddak önce</string>
|
||||
<string name="localprofile">Yerel profil</string>
|
||||
<string name="openapsama">OpenAPS AMA</string>
|
||||
<string name="array_of_elements">%1$d öğelerin dizisi.\nGerçek değer:</string>
|
||||
<string name="openapsma_autosensdata_label">Autosens verileri</string>
|
||||
|
|
|
@ -71,7 +71,6 @@
|
|||
<string name="overview">首页概览</string>
|
||||
<string name="treatments">治疗</string>
|
||||
<string name="virtualpump">虚拟泵</string>
|
||||
<string name="careportal">护理记录</string>
|
||||
<string name="configbuilder_pump">胰岛素泵</string>
|
||||
<string name="configbuilder_pump_description">你想用 AndroidAPS连接哪个胰岛素泵?</string>
|
||||
<string name="configbuilder_profile">配置文件</string>
|
||||
|
@ -195,7 +194,6 @@
|
|||
<string name="ongoingnotificaction">持续的的通知</string>
|
||||
<string name="old_data">旧数据</string>
|
||||
<string name="sms_minago">%1$d分钟前</string>
|
||||
<string name="localprofile">本地配置文件</string>
|
||||
<string name="openapsama">OpenAPS AMA</string>
|
||||
<string name="array_of_elements">%1$d 元素的数组. \n 实际值:</string>
|
||||
<string name="openapsma_autosensdata_label">Autosens 数据</string>
|
||||
|
|
|
@ -38,6 +38,9 @@
|
|||
<string name="glucoseisnotavailable">ГК недоступна</string>
|
||||
<string name="glucosecomparedmgdl">Гк %1$s %2$.0f %3$s</string>
|
||||
<string name="glucosecomparedmmol">Гк %1$s %2$.1f %3$s</string>
|
||||
<string name="notemptarget">Временная цель не существует</string>
|
||||
<string name="temptargetcomparedmgdl">Временная цель %1$s %2$.0f %3$s</string>
|
||||
<string name="temptargetcomparedmmol">Временная цель %1$s %2$.1f %3$s</string>
|
||||
<string name="percentagecompared">Профиль %1$s%2$d</string>
|
||||
<string name="iobcompared">Акт инс IOB %1$s %2$.1f</string>
|
||||
<string name="and">И</string>
|
||||
|
@ -86,6 +89,7 @@
|
|||
<string name="latitude_short">Широта:</string>
|
||||
<string name="longitude_short">Долгота:</string>
|
||||
<string name="glucose_u">Гк %1$s]:</string>
|
||||
<string name="target_u">Цель %1$d м</string>
|
||||
<string name="lastboluslabel">Предыдущий болюс</string>
|
||||
<string name="lastboluscompared">Время болюса %1$s %2$s мин назад</string>
|
||||
<string name="triggercoblabel">Активн углеводы</string>
|
||||
|
|
|
@ -30,7 +30,7 @@ buildscript {
|
|||
dexmakerVersion = "1.2"
|
||||
retrofit2Version = '2.9.0'
|
||||
okhttp3Version = '4.9.0'
|
||||
byteBuddyVersion = '1.11.19'
|
||||
byteBuddyVersion = '1.11.20'
|
||||
|
||||
androidx_junit = '1.1.2'
|
||||
androidx_rules = '1.4.0-alpha04'
|
||||
|
@ -41,7 +41,7 @@ buildscript {
|
|||
maven { url "https://plugins.gradle.org/m2/" } // jacoco 0.2
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:7.0.2'
|
||||
classpath 'com.android.tools.build:gradle:7.0.3'
|
||||
classpath 'com.google.gms:google-services:4.3.10'
|
||||
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.7.1'
|
||||
|
||||
|
|
|
@ -43,6 +43,7 @@ dependencies {
|
|||
api "io.reactivex.rxjava2:rxandroid:$rxandroid_version"
|
||||
api "org.apache.commons:commons-lang3:$commonslang3_version"
|
||||
api "commons-codec:commons-codec:$commonscodec_version"
|
||||
api "com.uber.rxdogtag:rxdogtag:1.0.1"
|
||||
|
||||
//CryptoUtil
|
||||
api 'com.madgag.spongycastle:core:1.58.0.0'
|
||||
|
@ -106,4 +107,4 @@ dependencies {
|
|||
// Phone checker
|
||||
// updating to 0.0.9 prevents AAPS from build
|
||||
api 'com.scottyab:rootbeer-lib:0.0.8'
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
package info.nightscout.androidaps.events
|
||||
|
||||
import info.nightscout.androidaps.database.entities.EffectiveProfileSwitch
|
||||
|
||||
class EventEffectiveProfileSwitchChanged(effectiveProfileSwitch: EffectiveProfileSwitch?) : Event() {
|
||||
var startDate: Long = 0
|
||||
|
||||
init {
|
||||
effectiveProfileSwitch?.let { startDate = it.timestamp}
|
||||
}
|
||||
constructor(startDate: Long) : this(null) {
|
||||
this.startDate = startDate
|
||||
}
|
||||
}
|
|
@ -20,6 +20,8 @@ interface DataSyncSelector {
|
|||
data class PairOfflineEvent(val value: OfflineEvent, val updateRecordId: Long)
|
||||
data class PairProfileStore(val value: JSONObject, val timestampSync: Long)
|
||||
|
||||
fun queueSize(): Long
|
||||
|
||||
fun doUpload()
|
||||
|
||||
fun resetToNextFullSync()
|
||||
|
|
|
@ -370,22 +370,12 @@ public class PointsWithLabelGraphSeries<E extends DataPointWithLabelInterface> e
|
|||
* @param paint paint object
|
||||
*/
|
||||
private void drawArrows(Point[] point, Canvas canvas, Paint paint) {
|
||||
float[] points = new float[8];
|
||||
points[0] = point[0].x;
|
||||
points[1] = point[0].y;
|
||||
points[2] = point[1].x;
|
||||
points[3] = point[1].y;
|
||||
points[4] = point[2].x;
|
||||
points[5] = point[2].y;
|
||||
points[6] = point[0].x;
|
||||
points[7] = point[0].y;
|
||||
|
||||
canvas.save();
|
||||
canvas.drawVertices(Canvas.VertexMode.TRIANGLES, 8, points, 0, null, 0, null, 0, null, 0, 0, paint);
|
||||
Path path = new Path();
|
||||
path.moveTo(point[0].x, point[0].y);
|
||||
path.lineTo(point[1].x, point[1].y);
|
||||
path.lineTo(point[2].x, point[2].y);
|
||||
path.close();
|
||||
canvas.drawPath(path, paint);
|
||||
canvas.restore();
|
||||
}
|
||||
|
|
|
@ -174,12 +174,17 @@
|
|||
<string name="tddwithcarbsformat"><![CDATA[<b>%1$s:</b> ∑: <b>%2$.2f U</b> Bol: <b>%3$.2f U</b> Baz: <b>%4$.2f U(%5$.0f%%)</b> Sach.: <b>%6$.0f g</b>]]></string>
|
||||
<string name="activitymonitorformat"><![CDATA[<b><span style=\"color:yellow\">%1$s:</span></b> <b>%2$s</b> ve <b>%3$d</b> dnech<br>]]></string>
|
||||
<!-- Translator-->
|
||||
<string name="careportal">Péče</string>
|
||||
<string name="careportal_bgcheck">Kontrola glykémie</string>
|
||||
<string name="careportal_mbg">Ruční glykémie nebo kalibrace</string>
|
||||
<string name="careportal_announcement">Oznámení</string>
|
||||
<string name="careportal_note">Poznámka</string>
|
||||
<string name="careportal_question">Otázka</string>
|
||||
<string name="careportal_exercise">Cvičení</string>
|
||||
<string name="careportal_announcement_message">Oznámení: %1$s</string>
|
||||
<string name="careportal_note_message">Poznámka : %1$s</string>
|
||||
<string name="careportal_question_message">Otázka: %1$s</string>
|
||||
<string name="careportal_exercise_message">Cvičení : %1$s</string>
|
||||
<string name="careportal_pumpsitechange">Výměna setu</string>
|
||||
<string name="careportal_cgmsensorinsert">Výměna senzoru</string>
|
||||
<string name="careportal_cgmsensorstart">Znovu spuštění senzoru</string>
|
||||
|
@ -403,6 +408,7 @@
|
|||
<string name="valueoutofrange">»%1$s« je mimo pevně nastavené limity</string>
|
||||
<string name="value_out_of_hard_limits">»%1$s« %2$.2f je mimo pevně nastavené limity</string>
|
||||
<string name="basal_value">Hodnota bazálu</string>
|
||||
<string name="nsclient_version_does_not_match">Verze NSClient se neshoduje s AndroidAPS. Aktualizujte prosím.</string>
|
||||
<plurals name="days">
|
||||
<item quantity="one">%1$d den</item>
|
||||
<item quantity="few">%1$d dnů</item>
|
||||
|
|
|
@ -174,12 +174,17 @@
|
|||
<string name="tddwithcarbsformat"><![CDATA[<b>%1$s:</b> ∑: <b>%2$.2f IE</b> Bol: <b>%3$.2f U</b> Bas: <b>%4$.2f IE(%5$.0f%%)</b> KH: <b>%6$.0f g</b>]]></string>
|
||||
<string name="activitymonitorformat"><![CDATA[<b><span style=\"color:yellow\">%1$s:</span></b> <b>%2$s</b> in <b>%3$d</b> Tagen<br>]]></string>
|
||||
<!-- Translator-->
|
||||
<string name="careportal">Careportal</string>
|
||||
<string name="careportal_bgcheck">BZ-Test</string>
|
||||
<string name="careportal_mbg">Manueller BZ oder Kalibrierung</string>
|
||||
<string name="careportal_announcement">Ankündigung</string>
|
||||
<string name="careportal_note">Notiz</string>
|
||||
<string name="careportal_question">Frage</string>
|
||||
<string name="careportal_exercise">Bewegung</string>
|
||||
<string name="careportal_announcement_message">Ankündigung : %1$s</string>
|
||||
<string name="careportal_note_message">Hinweis : %1$s</string>
|
||||
<string name="careportal_question_message">Frage : %1$s</string>
|
||||
<string name="careportal_exercise_message">Bewegung : %1$s</string>
|
||||
<string name="careportal_pumpsitechange">Pumpenkatheter-Wechsel</string>
|
||||
<string name="careportal_cgmsensorinsert">CGM-Sensor gesetzt</string>
|
||||
<string name="careportal_cgmsensorstart">CGM-Sensor Start</string>
|
||||
|
@ -403,6 +408,7 @@
|
|||
<string name="valueoutofrange">»%1$s« ist außerhalb der fest programmierten Grenzen</string>
|
||||
<string name="value_out_of_hard_limits">»%1$s« %2$.2f ist außerhalb der fest programmierten Grenzen</string>
|
||||
<string name="basal_value">Basal-Wert</string>
|
||||
<string name="nsclient_version_does_not_match">Die Versionen von NSClient und AndroidAPS passen nicht zueinander. Führe bitte ein Update durch.</string>
|
||||
<plurals name="days">
|
||||
<item quantity="one">%1$d Tag</item>
|
||||
<item quantity="other">%1$d Tage</item>
|
||||
|
|
|
@ -174,12 +174,17 @@
|
|||
<string name="tddwithcarbsformat"><![CDATA[<b>%1$s:</b> ∑: <b>%2$.2fU</b> Bol: <b>%3$.2fU</b> Bas: <b>%4$.2fU (%5$.0f%%)</b> Gluc: <b>%6$.0fg</b>]]></string>
|
||||
<string name="activitymonitorformat"><![CDATA[<b><span style=\"color:yellow\">%1$s:</span></b> <b>%2$s</b> en <b>%3$d</b> jours<br>]]></string>
|
||||
<!-- Translator-->
|
||||
<string name="careportal">Careportal</string>
|
||||
<string name="careportal_bgcheck">Contrôle Glycémie</string>
|
||||
<string name="careportal_mbg">Gly manuelle/Calib.</string>
|
||||
<string name="careportal_announcement">Notification</string>
|
||||
<string name="careportal_note">Remarque</string>
|
||||
<string name="careportal_question">Question</string>
|
||||
<string name="careportal_exercise">Activité Physique</string>
|
||||
<string name="careportal_announcement_message">Annonce : %1$s</string>
|
||||
<string name="careportal_note_message">Note : %1$s</string>
|
||||
<string name="careportal_question_message">Question : %1$s</string>
|
||||
<string name="careportal_exercise_message">Exercice : %1$s</string>
|
||||
<string name="careportal_pumpsitechange">Changement de site</string>
|
||||
<string name="careportal_cgmsensorinsert">Insertion Capteur MGC</string>
|
||||
<string name="careportal_cgmsensorstart">Démarrage Capteur MGC</string>
|
||||
|
@ -403,6 +408,7 @@
|
|||
<string name="valueoutofrange">\"%1$s\" est en dehors des limites</string>
|
||||
<string name="value_out_of_hard_limits">\"%1$s\" %2$.2f est en dehors des limites</string>
|
||||
<string name="basal_value">Valeur de Basal</string>
|
||||
<string name="nsclient_version_does_not_match">La version NSClient ne correspond pas à AndroidAPS. Faites une mise à jour.</string>
|
||||
<plurals name="days">
|
||||
<item quantity="one">%1$d jour</item>
|
||||
<item quantity="other">%1$d jours</item>
|
||||
|
|
|
@ -174,12 +174,17 @@
|
|||
<string name="tddwithcarbsformat"><![CDATA[<b>%1$s:</b> ∑: <b>%2$.2f יחידות</b> בולוס: <b>%3$.2f יחידות</b> בזאלי: <b>%4$.2f יחידות(%5$.0f%%)</b> פחמ: <b>%6$.0f גרם</b>]]></string>
|
||||
<string name="activitymonitorformat"><![CDATA[<b><span style=\"color:yellow\">%1$s:</span></b> <b>%2$s</b> ב- <b>%3$d</b> ימים<br>]]></string>
|
||||
<!-- Translator-->
|
||||
<string name="careportal">פורטל טיפולים</string>
|
||||
<string name="careportal_bgcheck">בדיקת רמת סוכר בדם</string>
|
||||
<string name="careportal_mbg">רמת סוכר ידנית או כיול</string>
|
||||
<string name="careportal_announcement">הודעה</string>
|
||||
<string name="careportal_announcement">הכרזה</string>
|
||||
<string name="careportal_note">הערה</string>
|
||||
<string name="careportal_question">שאלה</string>
|
||||
<string name="careportal_exercise">פעילות גופנית</string>
|
||||
<string name="careportal_announcement_message">הכרזה: %1$s</string>
|
||||
<string name="careportal_note_message">הערה: %1$s</string>
|
||||
<string name="careportal_question_message">שאלה: %1$s</string>
|
||||
<string name="careportal_exercise_message">פעילות גופנית: %1$s</string>
|
||||
<string name="careportal_pumpsitechange">החלפת פרפרית</string>
|
||||
<string name="careportal_cgmsensorinsert">חיבור סנסור</string>
|
||||
<string name="careportal_cgmsensorstart">התחלת סנסור חדש</string>
|
||||
|
@ -403,6 +408,7 @@
|
|||
<string name="valueoutofrange">»הערך %1$s« מחוץ לתחום הקשיח</string>
|
||||
<string name="value_out_of_hard_limits">»הערך %1$s« %2$.2f מחוץ לתחום הקשיח</string>
|
||||
<string name="basal_value">ערך בזאלי</string>
|
||||
<string name="nsclient_version_does_not_match">גרסת NSClient לא תואמת את גרסת AndroidAPS. נא לעדכן.</string>
|
||||
<plurals name="days">
|
||||
<item quantity="one">%1$d יום</item>
|
||||
<item quantity="two">%1$d ימים</item>
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
<string name="connected">Prisijungta</string>
|
||||
<string name="disconnected">Atsijungta</string>
|
||||
<string name="disconnecting">Atsijungiama</string>
|
||||
<string name="waiting_for_disconnection">Laukiama atsijungimo</string>
|
||||
<string name="androidaps_start">AndroidAPS paleista</string>
|
||||
<string name="formatinsulinunits1">%1$.1f vv</string>
|
||||
<string name="formatinsulinunits">%1$.2f vv</string>
|
||||
|
@ -62,6 +63,8 @@
|
|||
<string name="eventtype">Įvykio tipas</string>
|
||||
<string name="mgdl">mg/dl</string>
|
||||
<string name="mmol">mmol/l</string>
|
||||
<string name="shortgram">g</string>
|
||||
<string name="shortpercent">%</string>
|
||||
<string name="advancedsettings_title">Papildomi nustatymai</string>
|
||||
<string name="bluetooth">Bluetooth</string>
|
||||
<string name="btwatchdog_title">BT Watchdog</string>
|
||||
|
@ -71,23 +74,36 @@
|
|||
<string name="no">Ne</string>
|
||||
<string name="loopdisabled">CIKLAS NEAKTYVUS DĖL APRIBOJIMŲ</string>
|
||||
<string name="bolusdelivered">%1$.2f vv bolusas sėkmingai suleistas</string>
|
||||
<string name="virtualpump_resultok">Gerai</string>
|
||||
<string name="novalidbasalrate">Jokio tinkamo bazės kiekio nenuskaityta iš pompos</string>
|
||||
<string name="limitingmaxiob">Ribojamas maks AIO iki %1$.1f vv dėl %2$s</string>
|
||||
<string name="unsafeusage">Nesaugus naudojimas</string>
|
||||
<string name="pump_unreachable">Pompa nepasiekiama</string>
|
||||
<string name="extended_bolus">Ištęstas bolusas</string>
|
||||
<string name="pump_time_updated">Pompos laikas pakeistas</string>
|
||||
<string name="exit">Išeiti</string>
|
||||
<string name="removerecord">Ištrinti įrašą</string>
|
||||
<string name="loopisdisabled">Ciklas išjungtas</string>
|
||||
<string name="alarm">Aliarmas</string>
|
||||
<string name="disableloop">Išjungti Ciklą</string>
|
||||
<string name="enableloop">Įjungti Ciklą</string>
|
||||
<string name="resumeloop">Atnaujinti ciklą</string>
|
||||
<string name="suspendloop">Sustabdyti ciklą</string>
|
||||
<string name="duration_min_label">Trukmė [min]</string>
|
||||
<string name="notification">Pranešimas</string>
|
||||
<string name="noprofile">Dar negautas joks profilis iš NS</string>
|
||||
<string name="exists">egzistuoja</string>
|
||||
<string name="notexists">neegzistuoja</string>
|
||||
<string name="glucose">Gliukozė</string>
|
||||
<string name="iob">AIO</string>
|
||||
<string name="cob">AAO</string>
|
||||
<string name="name_short">Vardas:</string>
|
||||
<string name="time">Laikas</string>
|
||||
<string name="ns_wifi_ssids">WiFi pavadinimas</string>
|
||||
<string name="loading">Kraunama …</string>
|
||||
<string name="event_time_label">Įvykio laikas</string>
|
||||
<string name="notes_label">Pastabos</string>
|
||||
<string name="remove_button">Pašalinti</string>
|
||||
<string name="addnew">Pridėti naują</string>
|
||||
<!-- Constraints-->
|
||||
<string name="limitingbasalratio">Ribojamas maksimalus bazės dydis%1$.2f vv/val dėl %2$s</string>
|
||||
|
@ -104,6 +120,7 @@
|
|||
<string name="dismiss">ATMESTI</string>
|
||||
<!-- BlePreCheck-->
|
||||
<string name="ble_not_supported">Bluetooth Low Energy nepalaikoma.</string>
|
||||
<string name="ble_not_supported_or_not_paired">Nepalaikomas Bluetooth Low Energy arba įrenginys nesuporuotas.</string>
|
||||
<string name="ble_not_enabled">Bluetooth neįjungta.</string>
|
||||
<string name="location_not_found_title">Vietovės nustatymas neįjungtas</string>
|
||||
<string name="location_not_found_message">Vietos nustatymo paslauga turi būti įjungta, kad Bluetooth aptikimas veiktų naujesniuose įrenginiuose. AAPS neseka Jūsų lokacijos, o vietos nustatymo paslauga gali būti išjungta po sėkmingo įrenginių suporavimo.</string>
|
||||
|
@ -155,15 +172,21 @@
|
|||
<string name="tddformat"><![CDATA[<b>%1$s:</b> ∑: <b>%2$.2f vv</b> Boluso: <b>%3$.2f vv</b> Bazės: <b>%4$.2f vv(%5$.0f%%)</b>]]></string>
|
||||
<string name="tddwithcarbsformat"><![CDATA[<b>%1$s:</b> ∑: <b>%2$.2f vv</b> Boluso: <b>%3$.2f vv</b> Bazės: <b>%4$.2f vv(%5$.0f%%)</b> AV: <b>%6$.0f g</b>]]></string>
|
||||
<!-- Translator-->
|
||||
<string name="careportal">Priežiūra</string>
|
||||
<string name="careportal_bgcheck">KG testas</string>
|
||||
<string name="careportal_mbg">KG iš kraujo arba kalibracija</string>
|
||||
<string name="careportal_announcement">Pranešimas</string>
|
||||
<string name="careportal_note">Pastaba</string>
|
||||
<string name="careportal_question">Klausimas</string>
|
||||
<string name="careportal_exercise">Aktyvumas</string>
|
||||
<string name="careportal_announcement_message">Pranešimas: %1$s</string>
|
||||
<string name="careportal_note_message">Pastaba: %1$s</string>
|
||||
<string name="careportal_question_message">Klausimas: %1$s</string>
|
||||
<string name="careportal_pumpsitechange">Kateterio keitimas</string>
|
||||
<string name="careportal_cgmsensorinsert">NGJ įvedimas</string>
|
||||
<string name="careportal_cgmsensorstart">NGJ paleidimas</string>
|
||||
<string name="careportal_cgm_sensor_stop">NGJ stabdymas</string>
|
||||
<string name="careportal_dad_alert">D.A.D. įspėjimas</string>
|
||||
<string name="careportal_insulincartridgechange">Rezervuaro keitimas</string>
|
||||
<string name="careportal_profileswitch">Profilio keitimas</string>
|
||||
<string name="careportal_snackbolus">Bolusas užkandžiui</string>
|
||||
|
@ -176,6 +199,7 @@
|
|||
<string name="careportal_openapsoffline">OpenAPS neprisijungus</string>
|
||||
<string name="careportal_pumpbatterychange">Baterijos keitimas</string>
|
||||
<string name="careportal_temporarytarget">Laikinas tikslas</string>
|
||||
<string name="careportal_temporarytargetvalue">Laikino tikslo reikšmė</string>
|
||||
<string name="careportal_temporarytargetcancel">Laikino tikslo atšaukimas</string>
|
||||
<string name="boluswizard">Boluso patarėjas</string>
|
||||
<string name="glucosetype_finger">Iš piršto</string>
|
||||
|
@ -184,9 +208,16 @@
|
|||
<string name="unknown">nežinoma</string>
|
||||
<string name="eatingsoon">Netrukus valgysiu</string>
|
||||
<string name="hypo">Hipo</string>
|
||||
<string name="activity">Aktyvumas</string>
|
||||
<string name="wear">Išmanieji laikrodžiai</string>
|
||||
<string name="automation">Automatiškai</string>
|
||||
<string name="custom">Pasirinktinis</string>
|
||||
<string name="pump">Pompa</string>
|
||||
<string name="loop">Ciklas</string>
|
||||
<string name="ns">NS</string>
|
||||
<string name="record">Įrašas</string>
|
||||
<string name="reading_pump_history">Skaitoma pompos istorija</string>
|
||||
<string name="pump_icon">Pompos ikonėlė</string>
|
||||
<!-- Command-->
|
||||
<string name="connectiontimedout">Prijungimo laikas baigėsi</string>
|
||||
<!-- PumpEnactResult-->
|
||||
|
@ -220,6 +251,7 @@
|
|||
<string name="format_hour_minute">%1$dh %2$dm</string>
|
||||
<string name="mute5min">Nutildyti 5 minutėms</string>
|
||||
<!-- Maintenance -->
|
||||
<string name="metadata_label_format">Failo formatas</string>
|
||||
<string name="metadata_label_created_at">Sukurta</string>
|
||||
<string name="metadata_label_aaps_version">AAPS versija</string>
|
||||
<string name="metadata_label_aaps_flavour">Versijos variantas</string>
|
||||
|
@ -267,6 +299,51 @@
|
|||
<string name="saturday_short">Š</string>
|
||||
<string name="sunday_short">S</string>
|
||||
<!-- User Entry -->
|
||||
<string name="uel_bolus">BOLUSAS</string>
|
||||
<string name="uel_bolus_advisor">BOLUSO SKAIČIUOTUVAS</string>
|
||||
<string name="uel_extended_bolus">IŠTĘSTAS BOLUSAS</string>
|
||||
<string name="uel_carbs">AV</string>
|
||||
<string name="uel_extended_carbs">IŠTĘSTI AV</string>
|
||||
<string name="uel_temp_basal">LAIKINA BAZĖ</string>
|
||||
<string name="uel_tt">LAIKINAS TIKSLAS</string>
|
||||
<string name="uel_new_profile">NAUJAS PROFILIS</string>
|
||||
<string name="uel_clone_profile">KLONUOTI PROFILĮ</string>
|
||||
<string name="uel_store_profile">IŠSAUGOTI PROFILĮ</string>
|
||||
<string name="uel_profile_switch">PROFILIO KEITIMAS</string>
|
||||
<string name="uel_profile_switch_cloned">KLONUOTO PROFILIO KEITIMAS</string>
|
||||
<string name="uel_closed_loop_mode">UŽDARO CIKLO REŽIMAS</string>
|
||||
<string name="uel_open_loop_mode">ATVIRO CIKLO REŽIMAS</string>
|
||||
<string name="uel_loop_disabled">CIKLAS IŠJUNGTAS</string>
|
||||
<string name="uel_loop_enabled">CIKLAS ĮJUNGTAS</string>
|
||||
<string name="uel_reconnect">VĖL PRISIJUNGTI</string>
|
||||
<string name="uel_disconnect">ATSIJUNGTI</string>
|
||||
<string name="uel_resume">ATNAUJINTI</string>
|
||||
<string name="uel_suspend">SUSTABDYTI</string>
|
||||
<string name="uel_clear_pairing_keys">IŠVALYTI PORAVIMO KODUS</string>
|
||||
<string name="uel_accepts_temp_basal">PRIIMTI LAIKINĄ BAZĘ</string>
|
||||
<string name="uel_cancel_temp_basal">ATŠAUKTI LAIKINĄ BAZĘ</string>
|
||||
<string name="uel_cancel_bolus">ATŠAUKTI BOLUSĄ</string>
|
||||
<string name="uel_cancel_extended_bolus">ATŠAUKTI IŠTĘSTĄ BOLUSĄ</string>
|
||||
<string name="uel_cancel_tt">ATŠAUKTI LAIKINĄ TIKSLĄ</string>
|
||||
<string name="uel_careportal">TERAPIJOS PORTALAS</string>
|
||||
<string name="uel_reservoir_change">REZERVUARO KEITIMAS</string>
|
||||
<string name="uel_calibration">KALIBRACIJA</string>
|
||||
<string name="uel_prime_bolus">PIRMINIS UŽPILDYMAS</string>
|
||||
<string name="uel_treatment">TERAPIJA</string>
|
||||
<string name="uel_ns_paused">NS PRISTABDYTA</string>
|
||||
<string name="uel_ns_resume">NS ATNAUJINTA</string>
|
||||
<string name="uel_ns_queue_cleared">NS EILĖ IŠVALYTA</string>
|
||||
<string name="uel_ns_settings_copied">NS NUSTATYMAI KOPIJUOTI</string>
|
||||
<string name="uel_objective_started">TIKSLAS PRADĖTAS</string>
|
||||
<string name="uel_objective_unstarted">TIKSLAS NEPRADĖTAS</string>
|
||||
<string name="uel_objectives_skipped">TIKSLAS PRALEISTAS</string>
|
||||
<string name="uel_stat_reset">IŠVALYTI STATISTIKĄ</string>
|
||||
<string name="uel_delete_logs">IŠTRINTI ĮRAŠUS</string>
|
||||
<string name="uel_export_settings">EKSPORTUOTI NUSTATYMUS</string>
|
||||
<string name="uel_import_settings">IMPORTUOTI NUSTATYMUS</string>
|
||||
<string name="uel_reset_databases">IŠVALYTI DUOMENŲ BAZES</string>
|
||||
<string name="uel_export_databases">EKSPORTUOTI DUOMENŲ BAZES</string>
|
||||
<string name="uel_export_csv">EKSPORTUOTI VARTOTOJO ĮRAŠUS</string>
|
||||
<!-- HardLimits -->
|
||||
<plurals name="days">
|
||||
<item quantity="one">%1$d d.</item>
|
||||
|
|
|
@ -2,6 +2,23 @@
|
|||
<resources>
|
||||
<string name="error_only_numeric_digits_allowed">Galimi tik skaičiai.</string>
|
||||
<string name="error_only_numeric_digits_range_allowed">Galimi tik skaičiai intervale %1$s - %2$s.</string>
|
||||
<string name="error_this_field_cannot_contain_special_character">Šiame laukelyje negali būti specialių simbolių</string>
|
||||
<string name="error_only_standard_letters_are_allowed">Galimos tik standartinės raidės</string>
|
||||
<string name="error_field_must_not_be_empty">Laukas negali būti tuščias</string>
|
||||
<string name="error_email_address_not_valid">El. pašto adresas netinkamas</string>
|
||||
<string name="error_creditcard_number_not_valid">Kredito kortelės Nr. netinkamas</string>
|
||||
<string name="error_phone_not_valid">Telefono numeris negalioja</string>
|
||||
<string name="error_domain_not_valid">Netinkamas domeno vardas</string>
|
||||
<string name="error_ip_not_valid">Netinkamas IP adresas</string>
|
||||
<string name="error_url_not_valid">Netinkamas interneto adresas</string>
|
||||
<string name="error_notvalid_personname">Netinkamas vardas ar pavardė.</string>
|
||||
<string name="error_notvalid_personfullname">Netinkamas pilnas vardas.</string>
|
||||
<string name="error_date_not_valid">Netinkamas formatas</string>
|
||||
<string name="error_mustbe4digitnumber">Turi būti 4 skaitmenys</string>
|
||||
<string name="error_mustbe6digitnumber">Turi būti 6 skaitmenys</string>
|
||||
<string name="error_mustbe12hexadidits">Turi būti 12 simbolių iš ABCDEF0123456789</string>
|
||||
<string name="error_mustbe8hexadidits">Turi būti 8 simboliai iš ABCDEF0123456789</string>
|
||||
<string name="error_mustbe4hexadidits">Turi būti 4 simboliai iš ABCDEF0123456789</string>
|
||||
<string name="error_not_a_minimum_length">Neatitinka minimalaus ilgio</string>
|
||||
<string name="error_pin_not_valid">Pin turi būti 3-6 skaitmenų, ne tokių pačių ir ne iš eilės</string>
|
||||
</resources>
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
<string name="connected">соединение установлено</string>
|
||||
<string name="disconnected">Разъединено</string>
|
||||
<string name="disconnecting">разъединение</string>
|
||||
<string name="waiting_for_disconnection">Ожидание разъединения</string>
|
||||
<string name="androidaps_start">AndroidAPS запущен</string>
|
||||
<string name="formatinsulinunits1">%1$.1f ед</string>
|
||||
<string name="formatinsulinunits">%1$.2f ед</string>
|
||||
|
@ -173,12 +174,17 @@
|
|||
<string name="tddwithcarbsformat"><![CDATA[<b>%1$s</b>∑: <b>%2$.2fед</b> Бол: <b>%3$.2fед</b> Баз: <b>%4$.2fед(%5$.0f%%)</b> Угл: <b>%6$.0fг</b>]]></string>
|
||||
<string name="activitymonitorformat"><![CDATA[<b><span style=\"color:yellow\">%1$s</span></b> <b>%2$s</b>через<b>%3$d</b> дней<br>]]></string>
|
||||
<!-- Translator-->
|
||||
<string name="careportal">Портал терапии</string>
|
||||
<string name="careportal_bgcheck">Проверка ГК</string>
|
||||
<string name="careportal_mbg">Ввести значение ГК или калибровку</string>
|
||||
<string name="careportal_announcement">Оповещение</string>
|
||||
<string name="careportal_note">Примечание</string>
|
||||
<string name="careportal_question">Вопрос</string>
|
||||
<string name="careportal_exercise">Нгрузка</string>
|
||||
<string name="careportal_announcement_message">Оповещение: %1$s</string>
|
||||
<string name="careportal_note_message">Примечание: %1$s</string>
|
||||
<string name="careportal_question_message">Вопрос: %1$s</string>
|
||||
<string name="careportal_exercise_message">Нагрузка: %1$s</string>
|
||||
<string name="careportal_pumpsitechange">Смена места катетера помпы</string>
|
||||
<string name="careportal_cgmsensorinsert">Установка сенсора мониторинга глюкозы</string>
|
||||
<string name="careportal_cgmsensorstart">Сарт сенсора</string>
|
||||
|
@ -196,6 +202,7 @@
|
|||
<string name="careportal_openapsoffline">OpenAPS в автономном режиме</string>
|
||||
<string name="careportal_pumpbatterychange">Замена батареи помпы</string>
|
||||
<string name="careportal_temporarytarget">Временная цель</string>
|
||||
<string name="careportal_temporarytargetvalue">Временное целевое значение</string>
|
||||
<string name="careportal_temporarytargetcancel">Отмена временной цели</string>
|
||||
<string name="boluswizard">Мастер Болюса</string>
|
||||
<string name="glucosetype_finger">Палец</string>
|
||||
|
@ -212,6 +219,8 @@
|
|||
<string name="loop">Замкнутый цикл</string>
|
||||
<string name="ns">NS</string>
|
||||
<string name="record">Запись</string>
|
||||
<string name="reading_pump_history">Чтение истории помпы</string>
|
||||
<string name="pump_icon">Пиктограмма помпы</string>
|
||||
<!-- Command-->
|
||||
<string name="connectiontimedout">Истекло время ожидания соединения</string>
|
||||
<!-- PumpEnactResult-->
|
||||
|
@ -399,6 +408,7 @@
|
|||
<string name="valueoutofrange">»%1$s« за пределами жестких ограничений</string>
|
||||
<string name="value_out_of_hard_limits">»%1$s« %2$.2f за пределами жестких ограничений</string>
|
||||
<string name="basal_value">Величина базала</string>
|
||||
<string name="nsclient_version_does_not_match">Версия NSClient не совпадает с версией AndroidAPS. Пожалуйста, обновите.</string>
|
||||
<plurals name="days">
|
||||
<item quantity="one">%1$d день</item>
|
||||
<item quantity="few">%1$d дня</item>
|
||||
|
|
|
@ -174,12 +174,17 @@
|
|||
<string name="tddwithcarbsformat"><![CDATA[<b>%1$s:</b> ∑: <b>%2$.2f JI</b> Bol: <b>%3$.2f JI</b> Baz: <b>%4$.2f JI(%5$.0f%%)</b> Sach.: <b>%6$.0f g</b>]]></string>
|
||||
<string name="activitymonitorformat"><![CDATA[<b><span style=\"color:yellow\">%1$s:</span></b> <b>%2$s</b> v <b>%3$d</b> dňoch<br>]]></string>
|
||||
<!-- Translator-->
|
||||
<string name="careportal">Starostlivosť</string>
|
||||
<string name="careportal_bgcheck">Kontrola glykémie</string>
|
||||
<string name="careportal_mbg">Ručné meranie, alebo kalibrácia</string>
|
||||
<string name="careportal_announcement">Oznámenie</string>
|
||||
<string name="careportal_note">Poznámka</string>
|
||||
<string name="careportal_question">Otázka</string>
|
||||
<string name="careportal_exercise">Pohyb</string>
|
||||
<string name="careportal_announcement_message">Oznámenie: %1$s</string>
|
||||
<string name="careportal_note_message">Poznámka : %1$s</string>
|
||||
<string name="careportal_question_message">Otázka: %1$s</string>
|
||||
<string name="careportal_exercise_message">Cvičenie : %1$s</string>
|
||||
<string name="careportal_pumpsitechange">Výmena setu</string>
|
||||
<string name="careportal_cgmsensorinsert">Výmena senzora</string>
|
||||
<string name="careportal_cgmsensorstart">Spustenie senzora</string>
|
||||
|
@ -403,6 +408,7 @@
|
|||
<string name="valueoutofrange">»%1$s« je mimo pevne nastavené limity</string>
|
||||
<string name="value_out_of_hard_limits">»%1$s« %2$.2f je mimo pevne nastavených limitov</string>
|
||||
<string name="basal_value">Hodnota bazálu</string>
|
||||
<string name="nsclient_version_does_not_match">Verzia NSClienta nesúhlasí z verziou AndroidAPS. Prosím aktualizujte si ju.</string>
|
||||
<plurals name="days">
|
||||
<item quantity="one">%1$d deň</item>
|
||||
<item quantity="few">%1$d dní</item>
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
<string name="danars_pairingok">Sujungta</string>
|
||||
<string name="danars_pairingtimedout">Sujungimui skirtas laikas baigėsi</string>
|
||||
<string name="danars_waitingforpairing">Laukiama ryšio su pompa</string>
|
||||
<string name="danarspump">Dana-i/RS</string>
|
||||
<string name="danarspump_shortname">Dana</string>
|
||||
<string name="maxbolusviolation">Pažeistas maks boluso limitas</string>
|
||||
<string name="commanderror">Komandos klaida</string>
|
||||
|
@ -113,4 +114,5 @@
|
|||
<string name="press_ok_on_the_pump">Paspauskite pompos mygtuką OK\n ir įveskite 2 rodomus skaičius\nĮjunkite pompos ekraną spausdami minuso mygtuką, kol baigsite įvesti kodą.</string>
|
||||
<string name="num1pin">1: (12 skaitmenų)</string>
|
||||
<string name="num2pin">2: (8 skaitmenys)</string>
|
||||
<string name="basal_bolus_step">Bazės / boluso žingsnis</string>
|
||||
</resources>
|
||||
|
|
|
@ -115,4 +115,5 @@
|
|||
<string name="press_ok_on_the_pump">Нажмите OK на помпе\nи введите 2 отображаемых номера\nДержите экран помпы включенным нажимая кнопку минус, пока не закончите ввод кода.</string>
|
||||
<string name="num1pin">1: (12 цифр)</string>
|
||||
<string name="num2pin">2: (8 цифр)</string>
|
||||
<string name="basal_bolus_step">Шаг Базала/болюса</string>
|
||||
</resources>
|
||||
|
|
|
@ -95,15 +95,15 @@ import kotlin.math.roundToInt
|
|||
*
|
||||
* It is a Maybe as there might be no next element.
|
||||
* */
|
||||
fun getNextSyncElementGlucoseValue(id: Long): Maybe<Pair<GlucoseValue, Long>> =
|
||||
fun getNextSyncElementGlucoseValue(id: Long): Maybe<Pair<GlucoseValue, GlucoseValue>> =
|
||||
database.glucoseValueDao.getNextModifiedOrNewAfter(id)
|
||||
.flatMap { nextIdElement ->
|
||||
val nextIdElemReferenceId = nextIdElement.referenceId
|
||||
if (nextIdElemReferenceId == null) {
|
||||
Maybe.just(nextIdElement to nextIdElement.id)
|
||||
Maybe.just(nextIdElement to nextIdElement)
|
||||
} else {
|
||||
database.glucoseValueDao.getCurrentFromHistoric(nextIdElemReferenceId)
|
||||
.map { it to nextIdElement.id }
|
||||
.map { it to nextIdElement }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -123,15 +123,15 @@ import kotlin.math.roundToInt
|
|||
*
|
||||
* It is a Maybe as there might be no next element.
|
||||
* */
|
||||
fun getNextSyncElementTemporaryTarget(id: Long): Maybe<Pair<TemporaryTarget, Long>> =
|
||||
fun getNextSyncElementTemporaryTarget(id: Long): Maybe<Pair<TemporaryTarget, TemporaryTarget>> =
|
||||
database.temporaryTargetDao.getNextModifiedOrNewAfter(id)
|
||||
.flatMap { nextIdElement ->
|
||||
val nextIdElemReferenceId = nextIdElement.referenceId
|
||||
if (nextIdElemReferenceId == null) {
|
||||
Maybe.just(nextIdElement to nextIdElement.id)
|
||||
Maybe.just(nextIdElement to nextIdElement)
|
||||
} else {
|
||||
database.temporaryTargetDao.getCurrentFromHistoric(nextIdElemReferenceId)
|
||||
.map { it to nextIdElement.id }
|
||||
.map { it to nextIdElement }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -185,15 +185,15 @@ import kotlin.math.roundToInt
|
|||
|
||||
// PROFILE SWITCH
|
||||
|
||||
fun getNextSyncElementProfileSwitch(id: Long): Maybe<Pair<ProfileSwitch, Long>> =
|
||||
fun getNextSyncElementProfileSwitch(id: Long): Maybe<Pair<ProfileSwitch, ProfileSwitch>> =
|
||||
database.profileSwitchDao.getNextModifiedOrNewAfter(id)
|
||||
.flatMap { nextIdElement ->
|
||||
val nextIdElemReferenceId = nextIdElement.referenceId
|
||||
if (nextIdElemReferenceId == null) {
|
||||
Maybe.just(nextIdElement to nextIdElement.id)
|
||||
Maybe.just(nextIdElement to nextIdElement)
|
||||
} else {
|
||||
database.profileSwitchDao.getCurrentFromHistoric(nextIdElemReferenceId)
|
||||
.map { it to nextIdElement.id }
|
||||
.map { it to nextIdElement }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -250,15 +250,15 @@ import kotlin.math.roundToInt
|
|||
*
|
||||
* It is a Maybe as there might be no next element.
|
||||
* */
|
||||
fun getNextSyncElementEffectiveProfileSwitch(id: Long): Maybe<Pair<EffectiveProfileSwitch, Long>> =
|
||||
fun getNextSyncElementEffectiveProfileSwitch(id: Long): Maybe<Pair<EffectiveProfileSwitch, EffectiveProfileSwitch>> =
|
||||
database.effectiveProfileSwitchDao.getNextModifiedOrNewAfter(id)
|
||||
.flatMap { nextIdElement ->
|
||||
val nextIdElemReferenceId = nextIdElement.referenceId
|
||||
if (nextIdElemReferenceId == null) {
|
||||
Maybe.just(nextIdElement to nextIdElement.id)
|
||||
Maybe.just(nextIdElement to nextIdElement)
|
||||
} else {
|
||||
database.effectiveProfileSwitchDao.getCurrentFromHistoric(nextIdElemReferenceId)
|
||||
.map { it to nextIdElement.id }
|
||||
.map { it to nextIdElement }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -309,15 +309,15 @@ import kotlin.math.roundToInt
|
|||
*
|
||||
* It is a Maybe as there might be no next element.
|
||||
* */
|
||||
fun getNextSyncElementTherapyEvent(id: Long): Maybe<Pair<TherapyEvent, Long>> =
|
||||
fun getNextSyncElementTherapyEvent(id: Long): Maybe<Pair<TherapyEvent, TherapyEvent>> =
|
||||
database.therapyEventDao.getNextModifiedOrNewAfter(id)
|
||||
.flatMap { nextIdElement ->
|
||||
val nextIdElemReferenceId = nextIdElement.referenceId
|
||||
if (nextIdElemReferenceId == null) {
|
||||
Maybe.just(nextIdElement to nextIdElement.id)
|
||||
Maybe.just(nextIdElement to nextIdElement)
|
||||
} else {
|
||||
database.therapyEventDao.getCurrentFromHistoric(nextIdElemReferenceId)
|
||||
.map { it to nextIdElement.id }
|
||||
.map { it to nextIdElement }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -376,15 +376,15 @@ import kotlin.math.roundToInt
|
|||
*
|
||||
* It is a Maybe as there might be no next element.
|
||||
* */
|
||||
fun getNextSyncElementFood(id: Long): Maybe<Pair<Food, Long>> =
|
||||
fun getNextSyncElementFood(id: Long): Maybe<Pair<Food, Food>> =
|
||||
database.foodDao.getNextModifiedOrNewAfter(id)
|
||||
.flatMap { nextIdElement ->
|
||||
val nextIdElemReferenceId = nextIdElement.referenceId
|
||||
if (nextIdElemReferenceId == null) {
|
||||
Maybe.just(nextIdElement to nextIdElement.id)
|
||||
Maybe.just(nextIdElement to nextIdElement)
|
||||
} else {
|
||||
database.foodDao.getCurrentFromHistoric(nextIdElemReferenceId)
|
||||
.map { it to nextIdElement.id }
|
||||
.map { it to nextIdElement }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -412,15 +412,15 @@ import kotlin.math.roundToInt
|
|||
*
|
||||
* It is a Maybe as there might be no next element.
|
||||
* */
|
||||
fun getNextSyncElementBolus(id: Long): Maybe<Pair<Bolus, Long>> =
|
||||
fun getNextSyncElementBolus(id: Long): Maybe<Pair<Bolus, Bolus>> =
|
||||
database.bolusDao.getNextModifiedOrNewAfterExclude(id, Bolus.Type.PRIMING)
|
||||
.flatMap { nextIdElement ->
|
||||
val nextIdElemReferenceId = nextIdElement.referenceId
|
||||
if (nextIdElemReferenceId == null) {
|
||||
Maybe.just(nextIdElement to nextIdElement.id)
|
||||
Maybe.just(nextIdElement to nextIdElement)
|
||||
} else {
|
||||
database.bolusDao.getCurrentFromHistoric(nextIdElemReferenceId)
|
||||
.map { it to nextIdElement.id }
|
||||
.map { it to nextIdElement }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -499,15 +499,15 @@ import kotlin.math.roundToInt
|
|||
*
|
||||
* It is a Maybe as there might be no next element.
|
||||
* */
|
||||
fun getNextSyncElementCarbs(id: Long): Maybe<Pair<Carbs, Long>> =
|
||||
fun getNextSyncElementCarbs(id: Long): Maybe<Pair<Carbs, Carbs>> =
|
||||
database.carbsDao.getNextModifiedOrNewAfter(id)
|
||||
.flatMap { nextIdElement ->
|
||||
val nextIdElemReferenceId = nextIdElement.referenceId
|
||||
if (nextIdElemReferenceId == null) {
|
||||
Maybe.just(nextIdElement to nextIdElement.id)
|
||||
Maybe.just(nextIdElement to nextIdElement)
|
||||
} else {
|
||||
database.carbsDao.getCurrentFromHistoric(nextIdElemReferenceId)
|
||||
.map { it to nextIdElement.id }
|
||||
.map { it to nextIdElement }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -590,15 +590,15 @@ import kotlin.math.roundToInt
|
|||
*
|
||||
* It is a Maybe as there might be no next element.
|
||||
* */
|
||||
fun getNextSyncElementBolusCalculatorResult(id: Long): Maybe<Pair<BolusCalculatorResult, Long>> =
|
||||
fun getNextSyncElementBolusCalculatorResult(id: Long): Maybe<Pair<BolusCalculatorResult, BolusCalculatorResult>> =
|
||||
database.bolusCalculatorResultDao.getNextModifiedOrNewAfter(id)
|
||||
.flatMap { nextIdElement ->
|
||||
val nextIdElemReferenceId = nextIdElement.referenceId
|
||||
if (nextIdElemReferenceId == null) {
|
||||
Maybe.just(nextIdElement to nextIdElement.id)
|
||||
Maybe.just(nextIdElement to nextIdElement)
|
||||
} else {
|
||||
database.bolusCalculatorResultDao.getCurrentFromHistoric(nextIdElemReferenceId)
|
||||
.map { it to nextIdElement.id }
|
||||
.map { it to nextIdElement }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -658,15 +658,15 @@ import kotlin.math.roundToInt
|
|||
* It is a Maybe as there might be no next element.
|
||||
* */
|
||||
|
||||
fun getNextSyncElementTemporaryBasal(id: Long): Maybe<Pair<TemporaryBasal, Long>> =
|
||||
fun getNextSyncElementTemporaryBasal(id: Long): Maybe<Pair<TemporaryBasal, TemporaryBasal>> =
|
||||
database.temporaryBasalDao.getNextModifiedOrNewAfter(id)
|
||||
.flatMap { nextIdElement ->
|
||||
val nextIdElemReferenceId = nextIdElement.referenceId
|
||||
if (nextIdElemReferenceId == null) {
|
||||
Maybe.just(nextIdElement to nextIdElement.id)
|
||||
Maybe.just(nextIdElement to nextIdElement)
|
||||
} else {
|
||||
database.temporaryBasalDao.getCurrentFromHistoric(nextIdElemReferenceId)
|
||||
.map { it to nextIdElement.id }
|
||||
.map { it to nextIdElement }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -720,15 +720,15 @@ import kotlin.math.roundToInt
|
|||
* It is a Maybe as there might be no next element.
|
||||
* */
|
||||
|
||||
fun getNextSyncElementExtendedBolus(id: Long): Maybe<Pair<ExtendedBolus, Long>> =
|
||||
fun getNextSyncElementExtendedBolus(id: Long): Maybe<Pair<ExtendedBolus, ExtendedBolus>> =
|
||||
database.extendedBolusDao.getNextModifiedOrNewAfter(id)
|
||||
.flatMap { nextIdElement ->
|
||||
val nextIdElemReferenceId = nextIdElement.referenceId
|
||||
if (nextIdElemReferenceId == null) {
|
||||
Maybe.just(nextIdElement to nextIdElement.id)
|
||||
Maybe.just(nextIdElement to nextIdElement)
|
||||
} else {
|
||||
database.extendedBolusDao.getCurrentFromHistoric(nextIdElemReferenceId)
|
||||
.map { it to nextIdElement.id }
|
||||
.map { it to nextIdElement }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -788,15 +788,15 @@ import kotlin.math.roundToInt
|
|||
*
|
||||
* It is a Maybe as there might be no next element.
|
||||
* */
|
||||
fun getNextSyncElementOfflineEvent(id: Long): Maybe<Pair<OfflineEvent, Long>> =
|
||||
fun getNextSyncElementOfflineEvent(id: Long): Maybe<Pair<OfflineEvent, OfflineEvent>> =
|
||||
database.offlineEventDao.getNextModifiedOrNewAfter(id)
|
||||
.flatMap { nextIdElement ->
|
||||
val nextIdElemReferenceId = nextIdElement.referenceId
|
||||
if (nextIdElemReferenceId == null) {
|
||||
Maybe.just(nextIdElement to nextIdElement.id)
|
||||
Maybe.just(nextIdElement to nextIdElement)
|
||||
} else {
|
||||
database.offlineEventDao.getCurrentFromHistoric(nextIdElemReferenceId)
|
||||
.map { it to nextIdElement.id }
|
||||
.map { it to nextIdElement }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -12,12 +12,14 @@ import info.nightscout.androidaps.database.interfaces.DBEntryWithTime
|
|||
import info.nightscout.androidaps.database.interfaces.TraceableDBEntry
|
||||
import java.util.*
|
||||
|
||||
@Entity(tableName = TABLE_BOLUSES,
|
||||
@Entity(
|
||||
tableName = TABLE_BOLUSES,
|
||||
foreignKeys = [
|
||||
ForeignKey(
|
||||
entity = Bolus::class,
|
||||
parentColumns = ["id"],
|
||||
childColumns = ["referenceId"])],
|
||||
childColumns = ["referenceId"]
|
||||
)],
|
||||
indices = [
|
||||
Index("id"),
|
||||
Index("isValid"),
|
||||
|
@ -27,7 +29,8 @@ import java.util.*
|
|||
Index("pumpType"),
|
||||
Index("referenceId"),
|
||||
Index("timestamp")
|
||||
])
|
||||
]
|
||||
)
|
||||
data class Bolus(
|
||||
@PrimaryKey(autoGenerate = true)
|
||||
override var id: Long = 0,
|
||||
|
@ -46,6 +49,20 @@ data class Bolus(
|
|||
var insulinConfiguration: InsulinConfiguration? = null
|
||||
) : TraceableDBEntry, DBEntryWithTime {
|
||||
|
||||
private fun contentEqualsTo(other: Bolus): Boolean =
|
||||
isValid == other.isValid &&
|
||||
timestamp == other.timestamp &&
|
||||
utcOffset == other.utcOffset &&
|
||||
amount == other.amount &&
|
||||
type == other.type &&
|
||||
isBasalInsulin == other.isBasalInsulin
|
||||
|
||||
fun onlyNsIdAdded(previous: Bolus): Boolean =
|
||||
previous.id != id &&
|
||||
contentEqualsTo(previous) &&
|
||||
previous.interfaceIDs.nightscoutId == null &&
|
||||
interfaceIDs.nightscoutId != null
|
||||
|
||||
enum class Type {
|
||||
NORMAL,
|
||||
SMB,
|
||||
|
|
|
@ -1,23 +1,30 @@
|
|||
package info.nightscout.androidaps.database.entities
|
||||
|
||||
import androidx.room.*
|
||||
import androidx.room.Embedded
|
||||
import androidx.room.Entity
|
||||
import androidx.room.ForeignKey
|
||||
import androidx.room.Index
|
||||
import androidx.room.PrimaryKey
|
||||
import info.nightscout.androidaps.database.TABLE_BOLUS_CALCULATOR_RESULTS
|
||||
import info.nightscout.androidaps.database.embedments.InterfaceIDs
|
||||
import info.nightscout.androidaps.database.interfaces.DBEntryWithTime
|
||||
import info.nightscout.androidaps.database.interfaces.TraceableDBEntry
|
||||
import java.util.TimeZone
|
||||
import java.util.*
|
||||
|
||||
@Entity(tableName = TABLE_BOLUS_CALCULATOR_RESULTS,
|
||||
@Entity(
|
||||
tableName = TABLE_BOLUS_CALCULATOR_RESULTS,
|
||||
foreignKeys = [ForeignKey(
|
||||
entity = BolusCalculatorResult::class,
|
||||
parentColumns = ["id"],
|
||||
childColumns = ["referenceId"])],
|
||||
childColumns = ["referenceId"]
|
||||
)],
|
||||
indices = [
|
||||
Index("referenceId"),
|
||||
Index("timestamp"),
|
||||
Index("id"),
|
||||
Index("isValid")
|
||||
])
|
||||
]
|
||||
)
|
||||
data class BolusCalculatorResult(
|
||||
@PrimaryKey(autoGenerate = true)
|
||||
override var id: Long = 0,
|
||||
|
@ -58,4 +65,45 @@ data class BolusCalculatorResult(
|
|||
var percentageCorrection: Int,
|
||||
var profileName: String,
|
||||
var note: String
|
||||
) : TraceableDBEntry, DBEntryWithTime
|
||||
) : TraceableDBEntry, DBEntryWithTime {
|
||||
|
||||
private fun contentEqualsTo(other: BolusCalculatorResult): Boolean =
|
||||
isValid == other.isValid &&
|
||||
timestamp == other.timestamp &&
|
||||
utcOffset == other.utcOffset &&
|
||||
targetBGLow == other.targetBGLow &&
|
||||
targetBGHigh == other.targetBGHigh &&
|
||||
isf == other.isf &&
|
||||
ic == other.ic &&
|
||||
bolusIOB == other.bolusIOB &&
|
||||
wasBolusIOBUsed == other.wasBolusIOBUsed &&
|
||||
basalIOB == other.basalIOB &&
|
||||
wasBasalIOBUsed == other.wasBasalIOBUsed &&
|
||||
glucoseValue == other.glucoseValue &&
|
||||
wasGlucoseUsed == other.wasGlucoseUsed &&
|
||||
glucoseDifference == other.glucoseDifference &&
|
||||
glucoseInsulin == other.glucoseInsulin &&
|
||||
glucoseTrend == other.glucoseTrend &&
|
||||
wasTrendUsed == other.wasTrendUsed &&
|
||||
trendInsulin == other.trendInsulin &&
|
||||
cob == other.cob &&
|
||||
wasCOBUsed == other.wasCOBUsed &&
|
||||
cobInsulin == other.cobInsulin &&
|
||||
carbs == other.carbs &&
|
||||
wereCarbsUsed == other.wereCarbsUsed &&
|
||||
carbsInsulin == other.carbsInsulin &&
|
||||
otherCorrection == other.otherCorrection &&
|
||||
wasSuperbolusUsed == other.wasSuperbolusUsed &&
|
||||
superbolusInsulin == other.superbolusInsulin &&
|
||||
wasTempTargetUsed == other.wasTempTargetUsed &&
|
||||
totalInsulin == other.totalInsulin &&
|
||||
percentageCorrection == other.percentageCorrection &&
|
||||
profileName == other.profileName &&
|
||||
note == other.note
|
||||
|
||||
fun onlyNsIdAdded(previous: BolusCalculatorResult): Boolean =
|
||||
previous.id != id &&
|
||||
contentEqualsTo(previous) &&
|
||||
previous.interfaceIDs.nightscoutId == null &&
|
||||
interfaceIDs.nightscoutId != null
|
||||
}
|
|
@ -36,4 +36,18 @@ data class Carbs(
|
|||
override var utcOffset: Long = TimeZone.getDefault().getOffset(timestamp).toLong(),
|
||||
override var duration: Long, // in milliseconds
|
||||
var amount: Double
|
||||
) : TraceableDBEntry, DBEntryWithTimeAndDuration
|
||||
) : TraceableDBEntry, DBEntryWithTimeAndDuration {
|
||||
|
||||
private fun contentEqualsTo(other: Carbs): Boolean =
|
||||
isValid == other.isValid &&
|
||||
timestamp == other.timestamp &&
|
||||
utcOffset == other.utcOffset &&
|
||||
amount == other.amount &&
|
||||
duration == other.duration
|
||||
|
||||
fun onlyNsIdAdded(previous: Carbs): Boolean =
|
||||
previous.id != id &&
|
||||
contentEqualsTo(previous) &&
|
||||
previous.interfaceIDs.nightscoutId == null &&
|
||||
interfaceIDs.nightscoutId != null
|
||||
}
|
|
@ -14,17 +14,20 @@ import info.nightscout.androidaps.database.interfaces.DBEntryWithTime
|
|||
import info.nightscout.androidaps.database.interfaces.TraceableDBEntry
|
||||
import java.util.*
|
||||
|
||||
@Entity(tableName = TABLE_EFFECTIVE_PROFILE_SWITCHES,
|
||||
@Entity(
|
||||
tableName = TABLE_EFFECTIVE_PROFILE_SWITCHES,
|
||||
foreignKeys = [ForeignKey(
|
||||
entity = EffectiveProfileSwitch::class,
|
||||
parentColumns = ["id"],
|
||||
childColumns = ["referenceId"])],
|
||||
childColumns = ["referenceId"]
|
||||
)],
|
||||
indices = [
|
||||
Index("id"),
|
||||
Index("referenceId"),
|
||||
Index("timestamp"),
|
||||
Index("isValid")
|
||||
])
|
||||
]
|
||||
)
|
||||
data class EffectiveProfileSwitch(
|
||||
@PrimaryKey(autoGenerate = true)
|
||||
override var id: Long = 0,
|
||||
|
@ -52,6 +55,28 @@ data class EffectiveProfileSwitch(
|
|||
var insulinConfiguration: InsulinConfiguration
|
||||
) : TraceableDBEntry, DBEntryWithTime {
|
||||
|
||||
private fun contentEqualsTo(other: EffectiveProfileSwitch): Boolean =
|
||||
isValid == other.isValid &&
|
||||
timestamp == other.timestamp &&
|
||||
utcOffset == other.utcOffset &&
|
||||
basalBlocks == other.basalBlocks &&
|
||||
isfBlocks == other.isfBlocks &&
|
||||
icBlocks == other.icBlocks &&
|
||||
targetBlocks == other.targetBlocks &&
|
||||
glucoseUnit == other.glucoseUnit &&
|
||||
originalProfileName == other.originalProfileName &&
|
||||
originalCustomizedName == other.originalCustomizedName &&
|
||||
originalTimeshift == other.originalTimeshift &&
|
||||
originalPercentage == other.originalPercentage &&
|
||||
originalDuration == other.originalDuration &&
|
||||
originalEnd == other.originalEnd
|
||||
|
||||
fun onlyNsIdAdded(previous: EffectiveProfileSwitch): Boolean =
|
||||
previous.id != id &&
|
||||
contentEqualsTo(previous) &&
|
||||
previous.interfaceIDs.nightscoutId == null &&
|
||||
interfaceIDs.nightscoutId != null
|
||||
|
||||
enum class GlucoseUnit {
|
||||
MGDL,
|
||||
MMOL;
|
||||
|
|
|
@ -11,11 +11,13 @@ import info.nightscout.androidaps.database.interfaces.DBEntryWithTimeAndDuration
|
|||
import info.nightscout.androidaps.database.interfaces.TraceableDBEntry
|
||||
import java.util.*
|
||||
|
||||
@Entity(tableName = TABLE_EXTENDED_BOLUSES,
|
||||
@Entity(
|
||||
tableName = TABLE_EXTENDED_BOLUSES,
|
||||
foreignKeys = [ForeignKey(
|
||||
entity = ExtendedBolus::class,
|
||||
parentColumns = ["id"],
|
||||
childColumns = ["referenceId"])],
|
||||
childColumns = ["referenceId"]
|
||||
)],
|
||||
indices = [
|
||||
Index("id"),
|
||||
Index("isValid"),
|
||||
|
@ -25,7 +27,8 @@ import java.util.*
|
|||
Index("pumpType"),
|
||||
Index("referenceId"),
|
||||
Index("timestamp")
|
||||
])
|
||||
]
|
||||
)
|
||||
data class ExtendedBolus(
|
||||
@PrimaryKey(autoGenerate = true)
|
||||
override var id: Long = 0,
|
||||
|
@ -46,6 +49,20 @@ data class ExtendedBolus(
|
|||
require(duration > 0)
|
||||
}
|
||||
|
||||
private fun contentEqualsTo(other: ExtendedBolus): Boolean =
|
||||
isValid == other.isValid &&
|
||||
timestamp == other.timestamp &&
|
||||
utcOffset == other.utcOffset &&
|
||||
isEmulatingTempBasal == other.isEmulatingTempBasal &&
|
||||
duration == other.duration &&
|
||||
rate == other.rate
|
||||
|
||||
fun onlyNsIdAdded(previous: ExtendedBolus): Boolean =
|
||||
previous.id != id &&
|
||||
contentEqualsTo(previous) &&
|
||||
previous.interfaceIDs.nightscoutId == null &&
|
||||
interfaceIDs.nightscoutId != null
|
||||
|
||||
val rate: Double // in U/h
|
||||
get() = amount * (60 * 60 * 1000.0) / duration
|
||||
}
|
|
@ -9,17 +9,20 @@ import info.nightscout.androidaps.database.TABLE_FOODS
|
|||
import info.nightscout.androidaps.database.embedments.InterfaceIDs
|
||||
import info.nightscout.androidaps.database.interfaces.TraceableDBEntry
|
||||
|
||||
@Entity(tableName = TABLE_FOODS,
|
||||
@Entity(
|
||||
tableName = TABLE_FOODS,
|
||||
foreignKeys = [ForeignKey(
|
||||
entity = Food::class,
|
||||
parentColumns = ["id"],
|
||||
childColumns = ["referenceId"])],
|
||||
childColumns = ["referenceId"]
|
||||
)],
|
||||
indices = [
|
||||
Index("id"),
|
||||
Index("nightscoutId"),
|
||||
Index("referenceId"),
|
||||
Index("isValid")
|
||||
])
|
||||
]
|
||||
)
|
||||
data class Food(
|
||||
@PrimaryKey(autoGenerate = true)
|
||||
override var id: Long = 0,
|
||||
|
@ -46,7 +49,7 @@ data class Food(
|
|||
|
||||
) : TraceableDBEntry {
|
||||
|
||||
fun isEqual(other: Food): Boolean {
|
||||
fun contentEqualsTo(other: Food): Boolean {
|
||||
if (isValid != other.isValid) return false
|
||||
if (portion != other.portion) return false
|
||||
if (carbs != other.carbs) return false
|
||||
|
@ -60,6 +63,12 @@ data class Food(
|
|||
return unit == other.unit
|
||||
}
|
||||
|
||||
fun onlyNsIdAdded(previous: Food): Boolean =
|
||||
previous.id != id &&
|
||||
contentEqualsTo(previous) &&
|
||||
previous.interfaceIDs.nightscoutId == null &&
|
||||
interfaceIDs.nightscoutId != null
|
||||
|
||||
fun copyFrom(other: Food) {
|
||||
isValid = other.isValid
|
||||
name = other.name
|
||||
|
|
|
@ -45,14 +45,20 @@ data class GlucoseValue(
|
|||
) : TraceableDBEntry, DBEntryWithTime {
|
||||
|
||||
fun contentEqualsTo(other: GlucoseValue): Boolean =
|
||||
timestamp == other.timestamp &&
|
||||
isValid == other.isValid &&
|
||||
timestamp == other.timestamp &&
|
||||
utcOffset == other.utcOffset &&
|
||||
raw == other.raw &&
|
||||
value == other.value &&
|
||||
trendArrow == other.trendArrow &&
|
||||
noise == other.noise &&
|
||||
sourceSensor == other.sourceSensor &&
|
||||
isValid == other.isValid
|
||||
sourceSensor == other.sourceSensor
|
||||
|
||||
fun onlyNsIdAdded(previous: GlucoseValue): Boolean =
|
||||
previous.id != id &&
|
||||
contentEqualsTo(previous) &&
|
||||
previous.interfaceIDs.nightscoutId == null &&
|
||||
interfaceIDs.nightscoutId != null
|
||||
|
||||
fun isRecordDeleted(other: GlucoseValue): Boolean =
|
||||
isValid && !other.isValid
|
||||
|
|
|
@ -11,18 +11,21 @@ import info.nightscout.androidaps.database.interfaces.DBEntryWithTimeAndDuration
|
|||
import info.nightscout.androidaps.database.interfaces.TraceableDBEntry
|
||||
import java.util.*
|
||||
|
||||
@Entity(tableName = TABLE_OFFLINE_EVENTS,
|
||||
@Entity(
|
||||
tableName = TABLE_OFFLINE_EVENTS,
|
||||
foreignKeys = [ForeignKey(
|
||||
entity = OfflineEvent::class,
|
||||
parentColumns = ["id"],
|
||||
childColumns = ["referenceId"])],
|
||||
childColumns = ["referenceId"]
|
||||
)],
|
||||
indices = [
|
||||
Index("id"),
|
||||
Index("isValid"),
|
||||
Index("nightscoutId"),
|
||||
Index("referenceId"),
|
||||
Index("timestamp")
|
||||
])
|
||||
]
|
||||
)
|
||||
data class OfflineEvent(
|
||||
@PrimaryKey(autoGenerate = true)
|
||||
override var id: Long = 0,
|
||||
|
@ -45,6 +48,12 @@ data class OfflineEvent(
|
|||
duration == other.duration &&
|
||||
isValid == other.isValid
|
||||
|
||||
fun onlyNsIdAdded(previous: OfflineEvent): Boolean =
|
||||
previous.id != id &&
|
||||
contentEqualsTo(previous) &&
|
||||
previous.interfaceIDs.nightscoutId == null &&
|
||||
interfaceIDs.nightscoutId != null
|
||||
|
||||
fun isRecordDeleted(other: OfflineEvent): Boolean =
|
||||
isValid && !other.isValid
|
||||
|
||||
|
|
|
@ -14,18 +14,21 @@ import info.nightscout.androidaps.database.interfaces.DBEntryWithTimeAndDuration
|
|||
import info.nightscout.androidaps.database.interfaces.TraceableDBEntry
|
||||
import java.util.*
|
||||
|
||||
@Entity(tableName = TABLE_PROFILE_SWITCHES,
|
||||
@Entity(
|
||||
tableName = TABLE_PROFILE_SWITCHES,
|
||||
foreignKeys = [ForeignKey(
|
||||
entity = ProfileSwitch::class,
|
||||
parentColumns = ["id"],
|
||||
childColumns = ["referenceId"])],
|
||||
childColumns = ["referenceId"]
|
||||
)],
|
||||
indices = [
|
||||
Index("referenceId"),
|
||||
Index("timestamp"),
|
||||
Index("isValid"),
|
||||
Index("id"),
|
||||
Index("nightscoutId")
|
||||
])
|
||||
]
|
||||
)
|
||||
data class ProfileSwitch(
|
||||
@PrimaryKey(autoGenerate = true)
|
||||
override var id: Long = 0,
|
||||
|
@ -50,6 +53,26 @@ data class ProfileSwitch(
|
|||
var insulinConfiguration: InsulinConfiguration
|
||||
) : TraceableDBEntry, DBEntryWithTimeAndDuration {
|
||||
|
||||
private fun contentEqualsTo(other: ProfileSwitch): Boolean =
|
||||
isValid == other.isValid &&
|
||||
timestamp == other.timestamp &&
|
||||
utcOffset == other.utcOffset &&
|
||||
basalBlocks == other.basalBlocks &&
|
||||
isfBlocks == other.isfBlocks &&
|
||||
icBlocks == other.icBlocks &&
|
||||
targetBlocks == other.targetBlocks &&
|
||||
glucoseUnit == other.glucoseUnit &&
|
||||
profileName == other.profileName &&
|
||||
timeshift == other.timeshift &&
|
||||
percentage == other.percentage &&
|
||||
duration == other.duration
|
||||
|
||||
fun onlyNsIdAdded(previous: ProfileSwitch): Boolean =
|
||||
previous.id != id &&
|
||||
contentEqualsTo(previous) &&
|
||||
previous.interfaceIDs.nightscoutId == null &&
|
||||
interfaceIDs.nightscoutId != null
|
||||
|
||||
enum class GlucoseUnit {
|
||||
MGDL,
|
||||
MMOL;
|
||||
|
|
|
@ -48,6 +48,21 @@ data class TemporaryBasal(
|
|||
require(duration > 0)
|
||||
}
|
||||
|
||||
private fun contentEqualsTo(other: TemporaryBasal): Boolean =
|
||||
isValid == other.isValid &&
|
||||
timestamp == other.timestamp &&
|
||||
utcOffset == other.utcOffset &&
|
||||
isAbsolute == other.isAbsolute &&
|
||||
type == other.type &&
|
||||
duration == other.duration &&
|
||||
rate == other.rate
|
||||
|
||||
fun onlyNsIdAdded(previous: TemporaryBasal): Boolean =
|
||||
previous.id != id &&
|
||||
contentEqualsTo(previous) &&
|
||||
previous.interfaceIDs.nightscoutId == null &&
|
||||
interfaceIDs.nightscoutId != null
|
||||
|
||||
enum class Type {
|
||||
NORMAL,
|
||||
EMULATED_PUMP_SUSPEND,
|
||||
|
|
|
@ -5,25 +5,27 @@ import androidx.room.Entity
|
|||
import androidx.room.ForeignKey
|
||||
import androidx.room.Index
|
||||
import androidx.room.PrimaryKey
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import info.nightscout.androidaps.database.TABLE_TEMPORARY_TARGETS
|
||||
import info.nightscout.androidaps.database.embedments.InterfaceIDs
|
||||
import info.nightscout.androidaps.database.interfaces.DBEntryWithTimeAndDuration
|
||||
import info.nightscout.androidaps.database.interfaces.TraceableDBEntry
|
||||
import java.util.*
|
||||
|
||||
@Entity(tableName = TABLE_TEMPORARY_TARGETS,
|
||||
@Entity(
|
||||
tableName = TABLE_TEMPORARY_TARGETS,
|
||||
foreignKeys = [ForeignKey(
|
||||
entity = TemporaryTarget::class,
|
||||
parentColumns = ["id"],
|
||||
childColumns = ["referenceId"])],
|
||||
childColumns = ["referenceId"]
|
||||
)],
|
||||
indices = [
|
||||
Index("id"),
|
||||
Index("isValid"),
|
||||
Index("nightscoutId"),
|
||||
Index("referenceId"),
|
||||
Index("timestamp")
|
||||
])
|
||||
]
|
||||
)
|
||||
data class TemporaryTarget(
|
||||
@PrimaryKey(autoGenerate = true)
|
||||
override var id: Long = 0,
|
||||
|
@ -53,22 +55,23 @@ data class TemporaryTarget(
|
|||
fun isRecordDeleted(other: TemporaryTarget): Boolean =
|
||||
isValid && !other.isValid
|
||||
|
||||
fun onlyNsIdAdded(previous: TemporaryTarget): Boolean =
|
||||
previous.id != id &&
|
||||
contentEqualsTo(previous) &&
|
||||
previous.interfaceIDs.nightscoutId == null &&
|
||||
interfaceIDs.nightscoutId != null
|
||||
|
||||
enum class Reason(val text: String) {
|
||||
@SerializedName("Custom")
|
||||
CUSTOM("Custom"),
|
||||
@SerializedName("Hypo")
|
||||
HYPOGLYCEMIA("Hypo"),
|
||||
@SerializedName("Activity")
|
||||
ACTIVITY("Activity"),
|
||||
@SerializedName("Eating Soon")
|
||||
EATING_SOON("Eating Soon"),
|
||||
@SerializedName("Automation")
|
||||
AUTOMATION("Automation"),
|
||||
@SerializedName("Wear")
|
||||
WEAR("Wear")
|
||||
;
|
||||
|
||||
companion object {
|
||||
|
||||
fun fromString(reason: String?) = values().firstOrNull { it.text == reason }
|
||||
?: CUSTOM
|
||||
}
|
||||
|
|
|
@ -5,18 +5,19 @@ import androidx.room.Entity
|
|||
import androidx.room.ForeignKey
|
||||
import androidx.room.Index
|
||||
import androidx.room.PrimaryKey
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import info.nightscout.androidaps.database.TABLE_THERAPY_EVENTS
|
||||
import info.nightscout.androidaps.database.embedments.InterfaceIDs
|
||||
import info.nightscout.androidaps.database.interfaces.DBEntryWithTimeAndDuration
|
||||
import info.nightscout.androidaps.database.interfaces.TraceableDBEntry
|
||||
import java.util.*
|
||||
|
||||
@Entity(tableName = TABLE_THERAPY_EVENTS,
|
||||
@Entity(
|
||||
tableName = TABLE_THERAPY_EVENTS,
|
||||
foreignKeys = [ForeignKey(
|
||||
entity = TherapyEvent::class,
|
||||
parentColumns = ["id"],
|
||||
childColumns = ["referenceId"])],
|
||||
childColumns = ["referenceId"]
|
||||
)],
|
||||
indices = [
|
||||
Index("id"),
|
||||
Index("type"),
|
||||
|
@ -24,7 +25,8 @@ import java.util.*
|
|||
Index("isValid"),
|
||||
Index("referenceId"),
|
||||
Index("timestamp")
|
||||
])
|
||||
]
|
||||
)
|
||||
data class TherapyEvent(
|
||||
@PrimaryKey(autoGenerate = true)
|
||||
override var id: Long = 0,
|
||||
|
@ -45,18 +47,34 @@ data class TherapyEvent(
|
|||
var glucoseUnit: GlucoseUnit,
|
||||
) : TraceableDBEntry, DBEntryWithTimeAndDuration {
|
||||
|
||||
private fun contentEqualsTo(other: TherapyEvent): Boolean =
|
||||
isValid == other.isValid &&
|
||||
timestamp == other.timestamp &&
|
||||
utcOffset == other.utcOffset &&
|
||||
duration == other.duration &&
|
||||
type == other.type &&
|
||||
note == other.note &&
|
||||
enteredBy == other.enteredBy &&
|
||||
glucose == other.glucose &&
|
||||
glucoseType == other.glucoseType &&
|
||||
glucoseUnit == other.glucoseUnit
|
||||
|
||||
fun onlyNsIdAdded(previous: TherapyEvent): Boolean =
|
||||
previous.id != id &&
|
||||
contentEqualsTo(previous) &&
|
||||
previous.interfaceIDs.nightscoutId == null &&
|
||||
interfaceIDs.nightscoutId != null
|
||||
|
||||
enum class GlucoseUnit {
|
||||
MGDL,
|
||||
MMOL;
|
||||
|
||||
companion object
|
||||
}
|
||||
|
||||
enum class MeterType(val text: String) {
|
||||
@SerializedName("Finger")
|
||||
FINGER("Finger"),
|
||||
@SerializedName("Sensor")
|
||||
SENSOR("Sensor"),
|
||||
@SerializedName("Manual")
|
||||
MANUAL("Manual")
|
||||
;
|
||||
|
||||
|
@ -69,99 +87,55 @@ data class TherapyEvent(
|
|||
@Suppress("unused")
|
||||
enum class Type(val text: String, val nsNative: Boolean = false) {
|
||||
|
||||
@SerializedName("Site Change")
|
||||
CANNULA_CHANGE("Site Change", nsNative = true),
|
||||
@SerializedName("Insulin Change")
|
||||
INSULIN_CHANGE("Insulin Change", nsNative = true),
|
||||
@SerializedName("Pump Battery Change")
|
||||
PUMP_BATTERY_CHANGE("Pump Battery Change", nsNative = true),
|
||||
@SerializedName("Sensor Change")
|
||||
SENSOR_CHANGE("Sensor Change", nsNative = true),
|
||||
@SerializedName("Sensor Start")
|
||||
SENSOR_STARTED("Sensor Start", nsNative = true),
|
||||
@SerializedName("Sensor Stop")
|
||||
SENSOR_STOPPED("Sensor Stop", nsNative = true),
|
||||
@SerializedName("BG Check")
|
||||
FINGER_STICK_BG_VALUE("BG Check", nsNative = true),
|
||||
@SerializedName("Exercise")
|
||||
EXERCISE("Exercise", nsNative = true),
|
||||
@SerializedName("Announcement")
|
||||
ANNOUNCEMENT("Announcement", nsNative = true),
|
||||
@SerializedName("Question")
|
||||
QUESTION("Question", nsNative = true),
|
||||
@SerializedName("Note")
|
||||
NOTE("Note", nsNative = true),
|
||||
@SerializedName("OpenAPS Offline")
|
||||
APS_OFFLINE("OpenAPS Offline", nsNative = true),
|
||||
@SerializedName("D.A.D. Alert")
|
||||
DAD_ALERT("D.A.D. Alert", nsNative = true),
|
||||
@SerializedName("Mbg")
|
||||
NS_MBG("Mbg", nsNative = true),
|
||||
|
||||
// Used but not as a Therapy Event (use constants only)
|
||||
@SerializedName("Carb Correction")
|
||||
CARBS_CORRECTION("Carb Correction", nsNative = true),
|
||||
@SerializedName("Bolus Wizard")
|
||||
BOLUS_WIZARD("Bolus Wizard", nsNative = true),
|
||||
@SerializedName("Correction Bolus")
|
||||
CORRECTION_BOLUS("Correction Bolus", nsNative = true),
|
||||
@SerializedName("Meal Bolus")
|
||||
MEAL_BOLUS("Meal Bolus", nsNative = true),
|
||||
@SerializedName("Combo Bolus")
|
||||
COMBO_BOLUS("Combo Bolus", nsNative = true),
|
||||
@SerializedName("Temporary Target")
|
||||
TEMPORARY_TARGET("Temporary Target", nsNative = true),
|
||||
@SerializedName("Temporary Target Cancel")
|
||||
TEMPORARY_TARGET_CANCEL("Temporary Target Cancel", nsNative = true),
|
||||
@SerializedName("Profile Switch")
|
||||
PROFILE_SWITCH("Profile Switch", nsNative = true),
|
||||
@SerializedName("Snack Bolus")
|
||||
SNACK_BOLUS("Snack Bolus", nsNative = true),
|
||||
@SerializedName("Temp Basal")
|
||||
TEMPORARY_BASAL("Temp Basal", nsNative = true),
|
||||
@SerializedName("Temp Basal Start")
|
||||
TEMPORARY_BASAL_START("Temp Basal Start", nsNative = true),
|
||||
@SerializedName("Temp Basal End")
|
||||
TEMPORARY_BASAL_END("Temp Basal End", nsNative = true),
|
||||
|
||||
// Not supported by NS
|
||||
@SerializedName("Tube Change")
|
||||
TUBE_CHANGE("Tube Change"),
|
||||
@SerializedName("Falling Asleep")
|
||||
FALLING_ASLEEP("Falling Asleep"),
|
||||
@SerializedName("Battery Empty")
|
||||
BATTERY_EMPTY("Battery Empty"),
|
||||
@SerializedName("Reservoir Empty")
|
||||
RESERVOIR_EMPTY("Reservoir Empty"),
|
||||
@SerializedName("Occlusion")
|
||||
OCCLUSION("Occlusion"),
|
||||
@SerializedName("Pump Stopped")
|
||||
PUMP_STOPPED("Pump Stopped"),
|
||||
@SerializedName("Pump Started")
|
||||
PUMP_STARTED("Pump Started"),
|
||||
@SerializedName("Pump Paused")
|
||||
PUMP_PAUSED("Pump Paused"),
|
||||
@SerializedName("Waking Up")
|
||||
WAKING_UP("Waking Up"),
|
||||
@SerializedName("Sickness")
|
||||
SICKNESS("Sickness"),
|
||||
@SerializedName("Stress")
|
||||
STRESS("Stress"),
|
||||
@SerializedName("Pre Period")
|
||||
PRE_PERIOD("Pre Period"),
|
||||
@SerializedName("Alcohol")
|
||||
ALCOHOL("Alcohol"),
|
||||
@SerializedName("Cortisone")
|
||||
CORTISONE("Cortisone"),
|
||||
@SerializedName("Feeling Low")
|
||||
FEELING_LOW("Feeling Low"),
|
||||
@SerializedName("Feeling High")
|
||||
FEELING_HIGH("Feeling High"),
|
||||
@SerializedName("Leaking Infusion Set")
|
||||
LEAKING_INFUSION_SET("Leaking Infusion Set"),
|
||||
|
||||
// Default
|
||||
@SerializedName("<none>")
|
||||
NONE("<none>")
|
||||
;
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ class SyncNsFoodTransaction(private val food: Food) : Transaction<SyncNsFoodTran
|
|||
|
||||
if (current != null) {
|
||||
// nsId exists, update if different
|
||||
if (!current.isEqual(food)) {
|
||||
if (!current.contentEqualsTo(food)) {
|
||||
current.copyFrom(food)
|
||||
database.foodDao.updateExistingEntry(current)
|
||||
if (food.isValid && current.isValid) result.updated.add(current)
|
||||
|
|
|
@ -1,2 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources></resources>
|
||||
<resources>
|
||||
<string name="largetimediff">Didelis laiko skirtumas:\nLaikas pompoje skiriasi daugiau nei 1,5 val.\nNustatykite laiką pompoje rankiniu būdu ir įsitikinkite, kad įrašai iš pompos istorijos nesukels netikėtų sistemos veiksmų.\nJei įmanoma, ištrinkite istoriją pompoje prieš keisdami laiką arba atjunkite uždarąjį ciklą vienai IVT po paskutinio neteisingo istorijos įrašo ar mažiausiai vienai IVT nuo dabar.</string>
|
||||
</resources>
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
<string name="tbr_formatter">%1$d%% - %2$d / %3$d min</string>
|
||||
<string name="multiwave_bolus">Daugiabangis bolusas</string>
|
||||
<string name="eb_formatter">%1$.2f / %2$.2f vv per %3$d min</string>
|
||||
<string name="insight_last_bolus">Paskutinis bolusas</string>
|
||||
<string name="searching_for_devices">Ieškoma įrenginių…</string>
|
||||
<string name="pairing_completed">Sujungimas sėkmingas</string>
|
||||
<string name="code_compare">Ar kodas, kurį matote įrenginyje, sutampa su pompos kodu?</string>
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
<string name="tbr_formatter">%1$d%% за %2$d / %3$d мин</string>
|
||||
<string name="multiwave_bolus">Мульти-болюс</string>
|
||||
<string name="eb_formatter">%1$.2f / %2$.2f U за %3$d мин</string>
|
||||
<string name="insight_last_bolus">Предыдущий болюс</string>
|
||||
<string name="searching_for_devices">Поиск устройств…</string>
|
||||
<string name="pairing_completed">Сопряжение выполнено</string>
|
||||
<string name="code_compare">Коды на этом устройстве и на вашей помпе совпадают?</string>
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
<string name="tbr_formatter">%1$d%% pre %2$d / %3$d min</string>
|
||||
<string name="multiwave_bolus">Duálny bolus</string>
|
||||
<string name="eb_formatter">%1$.2f / %2$.2f JI pre %3$d min</string>
|
||||
<string name="insight_last_bolus">Posledný bolus</string>
|
||||
<string name="searching_for_devices">Vyhľadávam zariadenia...</string>
|
||||
<string name="pairing_completed">Párovanie dokončené</string>
|
||||
<string name="code_compare">Zhodujú sa kódy zobrazené na tomto zariadení a na pumpe?</string>
|
||||
|
|
|
@ -98,7 +98,11 @@
|
|||
android:title="RileyLink Configuration">
|
||||
<intent android:action="info.nightscout.androidaps.plugins.PumpCommon.dialog.RileyLinkBLEConfigActivity" />
|
||||
</Preference>
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="@string/key_orange_use_scanning"
|
||||
android:summary="@string/orange_use_scanning_level_summary"
|
||||
android:title="@string/orange_use_scanning_level" />
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="@string/key_riley_link_show_battery_level"
|
||||
|
|
|
@ -56,12 +56,12 @@
|
|||
<string name="omnipod_common_overview_pod_expiry_date">תפוגת הפוד</string>
|
||||
<string name="omnipod_common_overview_last_connection">חיבור אחרון</string>
|
||||
<string name="omnipod_common_overview_last_bolus">בולוס אחרון</string>
|
||||
<string name="omnipod_common_overview_temp_basal_rate">ערך בזאלי זמני</string>
|
||||
<string name="omnipod_common_overview_temp_basal_rate">מינון בזאלי זמני</string>
|
||||
<string name="omnipod_common_overview_base_basal_rate">ערך בזאלי בסיסי</string>
|
||||
<string name="omnipod_common_overview_reservoir">מכל</string>
|
||||
<string name="omnipod_common_overview_pod_active_alerts">התראות פוד פעילות</string>
|
||||
<string name="omnipod_common_overview_firmware_version">גרסת קושחה</string>
|
||||
<string name="omnipod_common_overview_time_on_pod">זמן פעילות הפוד</string>
|
||||
<string name="omnipod_common_overview_time_on_pod">השעה בפוד</string>
|
||||
<string name="omnipod_common_overview_temp_basal_value">%1$.2f יח\'\\ש\' @ %2$s (%3$d\%4$d דק\')</string>
|
||||
<string name="omnipod_common_overview_reservoir_value">נותרו %1$.2f יח\' </string>
|
||||
<string name="omnipod_common_overview_reservoir_value_over50">נותרו יותר מ-50 יח\'</string>
|
||||
|
|
|
@ -111,6 +111,10 @@
|
|||
<string name="omnipod_common_preferences_category_other">Kiti</string>
|
||||
<string name="omnipod_common_preferences_category_alerts">Perspėjimai</string>
|
||||
<string name="omnipod_common_preferences_category_confirmation_beeps">Patvirtinimo signalai</string>
|
||||
<string name="omnipod_common_preferences_category_notifications">Pranešimai</string>
|
||||
<string name="omnipod_common_preferences_notification_uncertain_tbr_sound_enabled">Įjungtas garsas neaiškiems laikinos bazės perspėjimams</string>
|
||||
<string name="omnipod_common_preferences_notification_uncertain_smb_sound_enabled">Įjungtas garsas neaiškiems SMB perspėjimams</string>
|
||||
<string name="omnipod_common_preferences_notification_uncertain_bolus_sound_enabled">Įjungtas garsas neaiškiems bolusų perspėjimams</string>
|
||||
<!-- Omnipod - Pod Status -->
|
||||
<string name="omnipod_common_pod_status_no_active_pod">Nėra aktyvaus Pod</string>
|
||||
<string name="omnipod_common_pod_status_waiting_for_activation">Vykdomas nustatymas (laukiama Pod aktyvavimo)</string>
|
||||
|
|
|
@ -111,6 +111,10 @@
|
|||
<string name="omnipod_common_preferences_category_other">Другое</string>
|
||||
<string name="omnipod_common_preferences_category_alerts">Оповещения</string>
|
||||
<string name="omnipod_common_preferences_category_confirmation_beeps">Звуковые сигналы подтверждения</string>
|
||||
<string name="omnipod_common_preferences_category_notifications">Уведомления</string>
|
||||
<string name="omnipod_common_preferences_notification_uncertain_tbr_sound_enabled">Звук для неопределенных уведомлений TBR включен</string>
|
||||
<string name="omnipod_common_preferences_notification_uncertain_smb_sound_enabled">Звук для неопределенных SMB уведомлений включен</string>
|
||||
<string name="omnipod_common_preferences_notification_uncertain_bolus_sound_enabled">Звук для неопределенных уведомлений болюса включен</string>
|
||||
<!-- Omnipod - Pod Status -->
|
||||
<string name="omnipod_common_pod_status_no_active_pod">Нет активных Pod</string>
|
||||
<string name="omnipod_common_pod_status_waiting_for_activation">Выполняется настройка (ожидание активации Pod)</string>
|
||||
|
|
|
@ -3,6 +3,7 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash
|
|||
import android.content.Context
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.text.format.DateFormat
|
||||
import dagger.android.HasAndroidInjector
|
||||
import info.nightscout.androidaps.activities.ErrorHelperActivity.Companion.runAlarm
|
||||
import info.nightscout.androidaps.data.DetailedBolusInfo
|
||||
|
@ -11,6 +12,9 @@ import info.nightscout.androidaps.events.EventPreferenceChange
|
|||
import info.nightscout.androidaps.events.EventProfileSwitchChanged
|
||||
import info.nightscout.androidaps.events.EventRefreshOverview
|
||||
import info.nightscout.androidaps.events.EventTempBasalChange
|
||||
import info.nightscout.androidaps.extensions.convertedToAbsolute
|
||||
import info.nightscout.androidaps.extensions.plannedRemainingMinutes
|
||||
import info.nightscout.androidaps.extensions.toStringFull
|
||||
import info.nightscout.androidaps.interfaces.*
|
||||
import info.nightscout.androidaps.logging.AAPSLogger
|
||||
import info.nightscout.androidaps.logging.LTag
|
||||
|
@ -36,9 +40,12 @@ import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.data.BolusRe
|
|||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.data.BolusType
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.data.TempBasalRecord
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.ui.OmnipodDashOverviewFragment
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.util.Constants
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.util.mapProfileToBasalProgram
|
||||
import info.nightscout.androidaps.queue.commands.Command
|
||||
import info.nightscout.androidaps.queue.commands.CustomCommand
|
||||
import info.nightscout.androidaps.utils.DateUtil
|
||||
import info.nightscout.androidaps.utils.DecimalFormatter.to2Decimal
|
||||
import info.nightscout.androidaps.utils.FabricPrivacy
|
||||
import info.nightscout.androidaps.utils.T
|
||||
import info.nightscout.androidaps.utils.TimeChangeType
|
||||
|
@ -49,8 +56,8 @@ import io.reactivex.Completable
|
|||
import io.reactivex.Single
|
||||
import io.reactivex.disposables.CompositeDisposable
|
||||
import io.reactivex.rxkotlin.plusAssign
|
||||
import io.reactivex.rxkotlin.subscribeBy
|
||||
import org.json.JSONObject
|
||||
import java.lang.Exception
|
||||
import java.time.Duration
|
||||
import java.time.ZonedDateTime
|
||||
import java.util.*
|
||||
|
@ -73,6 +80,7 @@ class OmnipodDashPumpPlugin @Inject constructor(
|
|||
private val context: Context,
|
||||
private val aapsSchedulers: AapsSchedulers,
|
||||
private val fabricPrivacy: FabricPrivacy,
|
||||
private val dateUtil: DateUtil,
|
||||
|
||||
injector: HasAndroidInjector,
|
||||
aapsLogger: AAPSLogger,
|
||||
|
@ -84,7 +92,7 @@ class OmnipodDashPumpPlugin @Inject constructor(
|
|||
|
||||
private val handler: Handler = Handler(Looper.getMainLooper())
|
||||
private lateinit var statusChecker: Runnable
|
||||
var nextPodWarningCheck: Long = 0
|
||||
private var nextPodWarningCheck: Long = 0
|
||||
@Volatile var stopConnecting: CountDownLatch? = null
|
||||
private var disposables: CompositeDisposable = CompositeDisposable()
|
||||
|
||||
|
@ -127,8 +135,6 @@ class OmnipodDashPumpPlugin @Inject constructor(
|
|||
val tbr = expectedState.temporaryBasal
|
||||
if (tbr == null || tbr.rate != 0.0) {
|
||||
aapsLogger.info(LTag.PUMP, "createFakeTBRWhenNoActivePod")
|
||||
// calling connectNewPump() here because pumpSerial could have changed(from 4241 to "n/a")
|
||||
pumpSync.connectNewPump()
|
||||
pumpSync.syncTemporaryBasalWithPumpId(
|
||||
timestamp = System.currentTimeMillis(),
|
||||
rate = 0.0,
|
||||
|
@ -137,7 +143,9 @@ class OmnipodDashPumpPlugin @Inject constructor(
|
|||
type = PumpSync.TemporaryBasalType.PUMP_SUSPEND,
|
||||
pumpId = Random.Default.nextLong(), // we don't use this, just make sure it's unique
|
||||
pumpType = PumpType.OMNIPOD_DASH,
|
||||
pumpSerial = serialNumber()
|
||||
pumpSerial = Constants.PUMP_SERIAL_FOR_FAKE_TBR // switching the serialNumber here would need a
|
||||
// call to connectNewPump. If we do that, then we will have a TBR started by the "n/a" pump and
|
||||
// cancelled by "4241". This did not work ok.
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -510,7 +518,7 @@ class OmnipodDashPumpPlugin @Inject constructor(
|
|||
|
||||
// Omnipod only reports reservoir level when there's < 1023 pulses left
|
||||
return podStateManager.pulsesRemaining?.let {
|
||||
it * 0.05
|
||||
it * PodConstants.POD_PULSE_BOLUS_UNITS
|
||||
} ?: 75.0
|
||||
}
|
||||
|
||||
|
@ -574,7 +582,7 @@ class OmnipodDashPumpPlugin @Inject constructor(
|
|||
).filter { podEvent -> podEvent.isCommandSent() }
|
||||
.map { pumpSyncBolusStart(requestedBolusAmount, detailedBolusInfo.bolusType) }
|
||||
.ignoreElements(),
|
||||
post = waitForBolusDeliveryToComplete(BOLUS_RETRIES, requestedBolusAmount, detailedBolusInfo.bolusType)
|
||||
post = waitForBolusDeliveryToComplete(requestedBolusAmount, detailedBolusInfo.bolusType)
|
||||
.map {
|
||||
deliveredBolusAmount = it
|
||||
aapsLogger.info(LTag.PUMP, "deliverTreatment: deliveredBolusAmount=$deliveredBolusAmount")
|
||||
|
@ -638,14 +646,13 @@ class OmnipodDashPumpPlugin @Inject constructor(
|
|||
}
|
||||
|
||||
private fun waitForBolusDeliveryToComplete(
|
||||
maxTries: Int,
|
||||
requestedBolusAmount: Double,
|
||||
bolusType: DetailedBolusInfo.BolusType
|
||||
): Single<Double> = Single.defer {
|
||||
|
||||
if (bolusCanceled && podStateManager.activeCommand != null) {
|
||||
var errorGettingStatus: Throwable? = null
|
||||
for (tries in 1..maxTries) {
|
||||
for (tries in 1..BOLUS_RETRIES) {
|
||||
errorGettingStatus = getPodStatus().blockingGet()
|
||||
if (errorGettingStatus != null) {
|
||||
aapsLogger.debug(LTag.PUMP, "waitForBolusDeliveryToComplete errorGettingStatus=$errorGettingStatus")
|
||||
|
@ -676,7 +683,7 @@ class OmnipodDashPumpPlugin @Inject constructor(
|
|||
)
|
||||
}
|
||||
|
||||
for (tryNumber in 1..maxTries) {
|
||||
for (tryNumber in 1..BOLUS_RETRIES) {
|
||||
updateBolusProgressDialog("Checking delivery status", 100)
|
||||
|
||||
val cmd = if (bolusCanceled)
|
||||
|
@ -724,13 +731,15 @@ class OmnipodDashPumpPlugin @Inject constructor(
|
|||
}
|
||||
|
||||
private fun estimateBolusDeliverySeconds(requestedBolusAmount: Double): Long {
|
||||
return ceil(requestedBolusAmount / 0.05).toLong() * 2 + 3
|
||||
return ceil(requestedBolusAmount / PodConstants.POD_PULSE_BOLUS_UNITS).toLong() * 2 + 3
|
||||
}
|
||||
|
||||
private fun pumpSyncBolusStart(
|
||||
requestedBolusAmount: Double,
|
||||
bolusType: DetailedBolusInfo.BolusType
|
||||
): Boolean {
|
||||
require(requestedBolusAmount > 0) { "requestedBolusAmount has to be positive" }
|
||||
|
||||
val activeCommand = podStateManager.activeCommand
|
||||
if (activeCommand == null) {
|
||||
throw IllegalArgumentException(
|
||||
|
@ -776,7 +785,7 @@ class OmnipodDashPumpPlugin @Inject constructor(
|
|||
)
|
||||
|
||||
val ret = executeProgrammingCommand(
|
||||
pre = observeNoActiveTempBasal(true),
|
||||
pre = observeNoActiveTempBasal(),
|
||||
historyEntry = history.createRecord(
|
||||
commandType = OmnipodCommandType.SET_TEMPORARY_BASAL,
|
||||
tempBasalRecord = TempBasalRecord(duration = durationInMinutes, rate = absoluteRate)
|
||||
|
@ -846,38 +855,28 @@ class OmnipodDashPumpPlugin @Inject constructor(
|
|||
return ret
|
||||
}
|
||||
|
||||
private fun observeNoActiveTempBasal(enforceNew: Boolean): Completable {
|
||||
private fun observeNoActiveTempBasal(): Completable {
|
||||
return Completable.defer {
|
||||
when {
|
||||
podStateManager.deliveryStatus !in
|
||||
arrayOf(DeliveryStatus.TEMP_BASAL_ACTIVE, DeliveryStatus.BOLUS_AND_TEMP_BASAL_ACTIVE) -> {
|
||||
// TODO: what happens if we try to cancel nonexistent temp basal?
|
||||
aapsLogger.info(LTag.PUMP, "No temporary basal to cancel")
|
||||
Completable.complete()
|
||||
}
|
||||
|
||||
!enforceNew ->
|
||||
Completable.error(
|
||||
IllegalStateException(
|
||||
"Temporary basal already active and enforceNew is not set."
|
||||
)
|
||||
if (podStateManager.deliveryStatus !in
|
||||
arrayOf(DeliveryStatus.TEMP_BASAL_ACTIVE, DeliveryStatus.BOLUS_AND_TEMP_BASAL_ACTIVE)
|
||||
) {
|
||||
// TODO: what happens if we try to cancel nonexistent temp basal?
|
||||
aapsLogger.info(LTag.PUMP, "No temporary basal to cancel")
|
||||
Completable.complete()
|
||||
} else {
|
||||
// enforceNew == true
|
||||
aapsLogger.info(LTag.PUMP, "Canceling existing temp basal")
|
||||
executeProgrammingCommand(
|
||||
historyEntry = history.createRecord(OmnipodCommandType.CANCEL_TEMPORARY_BASAL),
|
||||
command = omnipodManager.stopTempBasal(hasTempBasalBeepEnabled()).ignoreElements()
|
||||
).doOnComplete {
|
||||
notifyOnUnconfirmed(
|
||||
Notification.OMNIPOD_TBR_ALERTS,
|
||||
"Cancelling temp basal might have failed." +
|
||||
"If a temp basal was previously running, it might have been cancelled." +
|
||||
"Please manually refresh the Pod status from the Omnipod tab.", // TODO: i8n
|
||||
R.raw.boluserror,
|
||||
)
|
||||
|
||||
else -> {
|
||||
// enforceNew == true
|
||||
aapsLogger.info(LTag.PUMP, "Canceling existing temp basal")
|
||||
executeProgrammingCommand(
|
||||
historyEntry = history.createRecord(OmnipodCommandType.CANCEL_TEMPORARY_BASAL),
|
||||
command = omnipodManager.stopTempBasal(hasTempBasalBeepEnabled()).ignoreElements()
|
||||
).doOnComplete {
|
||||
notifyOnUnconfirmed(
|
||||
Notification.OMNIPOD_TBR_ALERTS,
|
||||
"Cancelling temp basal might have failed." +
|
||||
"If a temp basal was previously running, it might have been cancelled." +
|
||||
"Please manually refresh the Pod status from the Omnipod tab.", // TODO: i8n
|
||||
R.raw.boluserror,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -952,8 +951,53 @@ class OmnipodDashPumpPlugin @Inject constructor(
|
|||
}
|
||||
|
||||
override fun getJSONStatus(profile: Profile, profileName: String, version: String): JSONObject {
|
||||
// TODO
|
||||
return JSONObject()
|
||||
val now = System.currentTimeMillis()
|
||||
if (podStateManager.lastUpdatedSystem + 60 * 60 * 1000L < now) {
|
||||
return JSONObject()
|
||||
}
|
||||
val pumpJson = JSONObject()
|
||||
val status = JSONObject()
|
||||
val extended = JSONObject()
|
||||
try {
|
||||
val podStatus = when {
|
||||
podStateManager.isPodRunning && podStateManager.isSuspended ->
|
||||
"suspended"
|
||||
podStateManager.isPodRunning ->
|
||||
"normal"
|
||||
else ->
|
||||
"no active Pod"
|
||||
}
|
||||
status.put("status", podStatus)
|
||||
status.put("timestamp", dateUtil.toISOString(podStateManager.lastUpdatedSystem))
|
||||
|
||||
extended.put("Version", version)
|
||||
try {
|
||||
extended.put("ActiveProfile", profileName)
|
||||
} catch (ignored: Exception) {
|
||||
}
|
||||
val tb = pumpSync.expectedPumpState().temporaryBasal
|
||||
tb?.run {
|
||||
extended.put("TempBasalAbsoluteRate", this.convertedToAbsolute(now, profile))
|
||||
extended.put("TempBasalStart", dateUtil.dateAndTimeString(this.timestamp))
|
||||
extended.put("TempBasalRemaining", this.plannedRemainingMinutes)
|
||||
}
|
||||
podStateManager.lastBolus?.run {
|
||||
extended.put("LastBolus", dateUtil.dateAndTimeString(this.startTime))
|
||||
extended.put("LastBolusAmount", this.deliveredUnits() ?: this.requestedUnits)
|
||||
}
|
||||
extended.put("BaseBasalRate", baseBasalRate)
|
||||
|
||||
pumpJson.put("status", status)
|
||||
pumpJson.put("extended", extended)
|
||||
if (podStateManager.pulsesRemaining == null) {
|
||||
pumpJson.put("reservoir_display_override", "50+")
|
||||
}
|
||||
pumpJson.put("reservoir", reservoirLevel.toInt())
|
||||
pumpJson.put("clock", dateUtil.toISOString(now))
|
||||
} catch (e: Exception) {
|
||||
aapsLogger.error(LTag.PUMP, "Unhandled exception: $e")
|
||||
}
|
||||
return pumpJson
|
||||
}
|
||||
|
||||
override val pumpDescription: PumpDescription = Companion.pumpDescription
|
||||
|
@ -972,8 +1016,33 @@ class OmnipodDashPumpPlugin @Inject constructor(
|
|||
}
|
||||
|
||||
override fun shortStatus(veryShort: Boolean): String {
|
||||
// TODO
|
||||
return "TODO"
|
||||
if (!podStateManager.isActivationCompleted) {
|
||||
return resourceHelper.gs(R.string.omnipod_common_short_status_no_active_pod)
|
||||
}
|
||||
var ret = ""
|
||||
if (podStateManager.lastUpdatedSystem != 0L) {
|
||||
val agoMsec: Long = System.currentTimeMillis() - podStateManager.lastUpdatedSystem
|
||||
val agoMin = (agoMsec / 60.0 / 1000.0).toInt()
|
||||
ret += resourceHelper.gs(R.string.omnipod_common_short_status_last_connection, agoMin) + "\n"
|
||||
}
|
||||
podStateManager.lastBolus?.run {
|
||||
ret += resourceHelper.gs(
|
||||
R.string.omnipod_common_short_status_last_bolus, to2Decimal(this.deliveredUnits() ?: this.requestedUnits),
|
||||
DateFormat.format("HH:mm", Date(this.startTime))
|
||||
) + "\n"
|
||||
}
|
||||
val (temporaryBasal, extendedBolus, _, profile) = pumpSync.expectedPumpState()
|
||||
temporaryBasal?.run {
|
||||
ret += resourceHelper.gs(
|
||||
R.string.omnipod_common_short_status_temp_basal,
|
||||
this.toStringFull(dateUtil)
|
||||
) + "\n"
|
||||
}
|
||||
ret += resourceHelper.gs(
|
||||
R.string.omnipod_common_short_status_reservoir,
|
||||
podStateManager.pulsesRemaining?.let { reservoirLevel.toString() } ?: "50+"
|
||||
)
|
||||
return ret.trim()
|
||||
}
|
||||
|
||||
override val isFakingTempsByExtendedBoluses: Boolean
|
||||
|
@ -1346,7 +1415,7 @@ class OmnipodDashPumpPlugin @Inject constructor(
|
|||
pumpId = historyEntry.pumpId(),
|
||||
pumpType = PumpType.OMNIPOD_DASH,
|
||||
pumpSerial = serialNumber(),
|
||||
type = null // TODO: set the correct bolus type here!!!
|
||||
type = null
|
||||
)
|
||||
}
|
||||
rxBus.send(EventDismissNotification(Notification.OMNIPOD_UNCERTAIN_SMB))
|
||||
|
@ -1356,6 +1425,10 @@ class OmnipodDashPumpPlugin @Inject constructor(
|
|||
if (confirmation.success) {
|
||||
podStateManager.lastBolus?.run {
|
||||
val deliveredUnits = markComplete()
|
||||
if (deliveredUnits < 0) {
|
||||
aapsLogger.error(LTag.PUMP, "Negative delivered units!!! $deliveredUnits")
|
||||
return
|
||||
}
|
||||
val bolusHistoryEntry = history.getById(historyId)
|
||||
val sync = pumpSync.syncBolusWithPumpId(
|
||||
timestamp = bolusHistoryEntry.createdAt,
|
||||
|
|
|
@ -9,6 +9,9 @@ import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.command.*
|
|||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.command.GetVersionCommand.Companion.DEFAULT_UNIQUE_ID
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.*
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.PodConstants.Companion.MAX_POD_LIFETIME
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.PodConstants.Companion.POD_EXPIRATION_ALERT_HOURS
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.PodConstants.Companion.POD_EXPIRATION_ALERT_HOURS_DURATION
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.PodConstants.Companion.POD_EXPIRATION_IMMINENT_ALERT_HOURS
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.response.*
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.state.OmnipodDashPodStateManager
|
||||
import info.nightscout.androidaps.utils.rx.AapsSchedulers
|
||||
|
@ -278,7 +281,7 @@ class OmnipodDashManagerImpl @Inject constructor(
|
|||
.setUniqueId(podStateManager.uniqueId!!.toInt())
|
||||
.setSequenceNumber(podStateManager.messageSequenceNumber)
|
||||
.setNonce(NONCE)
|
||||
.setNumberOfUnits(podStateManager.firstPrimeBolusVolume!! * 0.05)
|
||||
.setNumberOfUnits(podStateManager.firstPrimeBolusVolume!! * PodConstants.POD_PULSE_BOLUS_UNITS)
|
||||
.setDelayBetweenPulsesInEighthSeconds(podStateManager.primePulseRate!!.toByte())
|
||||
.setProgramReminder(ProgramReminder(atStart = false, atEnd = false, atInterval = 0))
|
||||
.build(),
|
||||
|
@ -380,7 +383,7 @@ class OmnipodDashManagerImpl @Inject constructor(
|
|||
)
|
||||
observables.add(
|
||||
observeSendProgramBolusCommand(
|
||||
podStateManager.secondPrimeBolusVolume!! * 0.05,
|
||||
podStateManager.secondPrimeBolusVolume!! * PodConstants.POD_PULSE_BOLUS_UNITS,
|
||||
podStateManager.primePulseRate!!.toByte(),
|
||||
confirmationBeeps = false,
|
||||
completionBeeps = false
|
||||
|
@ -394,10 +397,10 @@ class OmnipodDashManagerImpl @Inject constructor(
|
|||
AlertConfiguration(
|
||||
AlertType.EXPIRATION,
|
||||
enabled = true,
|
||||
durationInMinutes = TimeUnit.HOURS.toMinutes(7).toShort(),
|
||||
durationInMinutes = TimeUnit.HOURS.toMinutes(POD_EXPIRATION_ALERT_HOURS_DURATION).toShort(),
|
||||
autoOff = false,
|
||||
AlertTrigger.TimerTrigger(
|
||||
TimeUnit.HOURS.toMinutes(72).toShort()
|
||||
TimeUnit.HOURS.toMinutes(POD_EXPIRATION_ALERT_HOURS).toShort()
|
||||
), // FIXME use activation time
|
||||
BeepType.FOUR_TIMES_BIP_BEEP,
|
||||
BeepRepetitionType.XXX3
|
||||
|
@ -408,7 +411,7 @@ class OmnipodDashManagerImpl @Inject constructor(
|
|||
durationInMinutes = 0,
|
||||
autoOff = false,
|
||||
AlertTrigger.TimerTrigger(
|
||||
TimeUnit.HOURS.toMinutes(79).toShort()
|
||||
TimeUnit.HOURS.toMinutes(POD_EXPIRATION_IMMINENT_ALERT_HOURS).toShort()
|
||||
), // FIXME use activation time
|
||||
BeepType.FOUR_TIMES_BIP_BEEP,
|
||||
BeepRepetitionType.XXX4
|
||||
|
|
|
@ -4,5 +4,5 @@ import info.nightscout.androidaps.extensions.toHex
|
|||
|
||||
class IncorrectPacketException(
|
||||
val payload: ByteArray,
|
||||
val expectedIndex: Byte? = null
|
||||
private val expectedIndex: Byte? = null
|
||||
) : Exception("Invalid payload: ${payload.toHex()}. Expected index: $expectedIndex")
|
||||
|
|
|
@ -29,7 +29,7 @@ class MessageIO(
|
|||
private val dataBleIO: DataBleIO,
|
||||
) {
|
||||
|
||||
val receivedOutOfOrder = LinkedHashMap<Byte, ByteArray>()
|
||||
private val receivedOutOfOrder = LinkedHashMap<Byte, ByteArray>()
|
||||
var maxMessageReadTries = 3
|
||||
var messageReadTries = 0
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.message
|
|||
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.Id
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.exceptions.CouldNotParseMessageException
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.util.Flag
|
||||
import java.nio.ByteBuffer
|
||||
|
||||
/***
|
||||
|
@ -80,13 +81,13 @@ data class MessagePacket(
|
|||
if (payload.copyOfRange(0, 2).decodeToString() != MAGIC_PATTERN) {
|
||||
throw CouldNotParseMessageException(payload)
|
||||
}
|
||||
val f1 = Flag(payload[2].toInt())
|
||||
val f1 = Flag(payload[2].toInt() and 0xff)
|
||||
val sas = f1.get(3) != 0
|
||||
val tfs = f1.get(4) != 0
|
||||
val version = ((f1.get(0) shl 2) or (f1.get(1) shl 1) or (f1.get(2) shl 0)).toShort()
|
||||
val eqos = (f1.get(7) or (f1.get(6) shl 1) or (f1.get(5) shl 2)).toShort()
|
||||
|
||||
val f2 = Flag(payload[3].toInt())
|
||||
val f2 = Flag(payload[3].toInt() and 0xff)
|
||||
val ack = f2.get(0) != 0
|
||||
val priority = f2.get(1) != 0
|
||||
val lastMessage = f2.get(2) != 0
|
||||
|
@ -125,24 +126,6 @@ data class MessagePacket(
|
|||
}
|
||||
}
|
||||
|
||||
private class Flag(var value: Int = 0) {
|
||||
|
||||
fun set(idx: Byte, set: Boolean) {
|
||||
val mask = 1 shl (7 - idx)
|
||||
if (!set)
|
||||
return
|
||||
value = value or mask
|
||||
}
|
||||
|
||||
fun get(idx: Byte): Int {
|
||||
val mask = 1 shl (7 - idx)
|
||||
if (value and mask == 0) {
|
||||
return 0
|
||||
}
|
||||
return 1
|
||||
}
|
||||
}
|
||||
|
||||
internal fun Byte.toUnsignedInt() = this.toInt() and 0xff
|
||||
|
||||
private fun ByteArray.assertSizeAtLeast(size: Int) {
|
||||
|
|
|
@ -4,6 +4,19 @@ import java.time.Duration
|
|||
|
||||
class PodConstants {
|
||||
companion object {
|
||||
val MAX_POD_LIFETIME = Duration.ofHours(80)
|
||||
val MAX_POD_LIFETIME: Duration = Duration.ofHours(80)
|
||||
|
||||
// Expiration alert time in minutes since activation and duration in minutes
|
||||
const val POD_EXPIRATION_ALERT_HOURS = 72L
|
||||
const val POD_EXPIRATION_ALERT_HOURS_DURATION = 7L
|
||||
|
||||
// Expiration eminent alert time in minutes since activation
|
||||
const val POD_EXPIRATION_IMMINENT_ALERT_HOURS = 79L
|
||||
|
||||
// Bolus & Priming units
|
||||
const val POD_PULSE_BOLUS_UNITS = 0.05
|
||||
|
||||
// Reservoir units alert threshold
|
||||
const val DEFAULT_MAX_RESERVOIR_ALERT_THRESHOLD: Short = 20
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definitio
|
|||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.PodStatus
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.util.AlertUtil
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.util.byValue
|
||||
import java.nio.ByteBuffer
|
||||
import java.util.*
|
||||
import kotlin.experimental.and
|
||||
|
||||
|
@ -13,18 +14,21 @@ class DefaultStatusResponse(
|
|||
) : ResponseBase(ResponseType.DEFAULT_STATUS_RESPONSE, encoded) {
|
||||
|
||||
val messageType: Byte = encoded[0]
|
||||
val deliveryStatus: DeliveryStatus = byValue((encoded[1].toInt() shr 4 and 0x0f).toByte(), DeliveryStatus.UNKNOWN)
|
||||
val podStatus: PodStatus = byValue((encoded[1] and 0x0f), PodStatus.UNKNOWN)
|
||||
val totalPulsesDelivered: Short =
|
||||
(encoded[2] and 0x0f shl 9 or (encoded[3].toInt() and 0xff shl 1) or (encoded[4].toInt() and 0xff ushr 7)).toShort()
|
||||
|
||||
val sequenceNumberOfLastProgrammingCommand: Short = (encoded[4] ushr 3 and 0x0f).toShort()
|
||||
val bolusPulsesRemaining: Short = ((encoded[4] and 0x07 shl 10 or (encoded[5].toInt() and 0xff) and 2047).toShort())
|
||||
private var first4bytes = ByteBuffer.wrap(byteArrayOf(encoded[2], encoded[3], encoded[4], encoded[5])).int
|
||||
private var last4bytes = ByteBuffer.wrap(byteArrayOf(encoded[6], encoded[7], encoded[8], encoded[9])).int
|
||||
|
||||
val podStatus: PodStatus = byValue((encoded[1] and 0x0f), PodStatus.UNKNOWN)
|
||||
val deliveryStatus: DeliveryStatus = byValue(((encoded[1].toInt() and 0xff) shr 4 and 0x0f).toByte(), DeliveryStatus.UNKNOWN)
|
||||
|
||||
val totalPulsesDelivered: Short = (first4bytes ushr 11 ushr 4 and 0x1FFF).toShort()
|
||||
val sequenceNumberOfLastProgrammingCommand: Short = (first4bytes ushr 11 and 0X0F).toShort()
|
||||
val bolusPulsesRemaining: Short = (first4bytes and 0X7FF).toShort()
|
||||
|
||||
val activeAlerts: EnumSet<AlertType> =
|
||||
AlertUtil.decodeAlertSet((encoded[6].toInt() and 0xff shl 1 or (encoded[7] ushr 7)).toByte())
|
||||
val minutesSinceActivation: Short =
|
||||
(encoded[7] and 0x7f shl 6 or (encoded[8].toInt() and 0xff ushr 2 and 0x3f)).toShort()
|
||||
val reservoirPulsesRemaining: Short = (encoded[8] shl 8 or encoded[9].toInt() and 0x3ff).toShort()
|
||||
AlertUtil.decodeAlertSet((last4bytes ushr 10 ushr 13 and 0xFF).toByte())
|
||||
val minutesSinceActivation: Short = ((last4bytes ushr 10 and 0x1FFF)).toShort()
|
||||
val reservoirPulsesRemaining: Short = (last4bytes and 0X3FF).toShort()
|
||||
|
||||
override fun toString(): String {
|
||||
return "DefaultStatusResponse(" +
|
||||
|
|
|
@ -311,7 +311,7 @@ class OmnipodDashPodStateManagerImpl @Inject constructor(
|
|||
|
||||
private fun updateLastBolusFromResponse(bolusPulsesRemaining: Short) {
|
||||
podState.lastBolus?.run {
|
||||
val remainingUnits = bolusPulsesRemaining.toDouble() * 0.05
|
||||
val remainingUnits = bolusPulsesRemaining.toDouble() * PodConstants.POD_PULSE_BOLUS_UNITS
|
||||
this.bolusUnitsRemaining = remainingUnits
|
||||
if (remainingUnits == 0.0) {
|
||||
this.deliveryComplete = true
|
||||
|
@ -627,11 +627,13 @@ class OmnipodDashPodStateManagerImpl @Inject constructor(
|
|||
}
|
||||
|
||||
override fun connectionSuccessRatio(): Float {
|
||||
val attempts = connectionAttempts
|
||||
if (attempts == 0) {
|
||||
if (connectionAttempts == 0) {
|
||||
return 0.0F
|
||||
} else if (connectionAttempts <= successfulConnections) {
|
||||
// Prevent bogus quality > 1 during initialisation
|
||||
return 1.0F
|
||||
}
|
||||
return successfulConnections.toFloat() / attempts.toFloat()
|
||||
return successfulConnections.toFloat() / connectionAttempts.toFloat()
|
||||
}
|
||||
|
||||
override fun reset() {
|
||||
|
|
|
@ -32,6 +32,7 @@ import info.nightscout.androidaps.plugins.pump.omnipod.dash.databinding.OmnipodD
|
|||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.databinding.OmnipodDashOverviewBluetoothStatusBinding
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.ActivationProgress
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.AlertType
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.PodConstants
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.state.OmnipodDashPodStateManager
|
||||
import info.nightscout.androidaps.queue.Callback
|
||||
import info.nightscout.androidaps.queue.events.EventQueueChanged
|
||||
|
@ -68,7 +69,6 @@ class OmnipodDashOverviewFragment : DaggerFragment() {
|
|||
@Inject lateinit var buildHelper: BuildHelper
|
||||
|
||||
companion object {
|
||||
|
||||
private const val REFRESH_INTERVAL_MILLIS = 15 * 1000L // 15 seconds
|
||||
private const val PLACEHOLDER = "-"
|
||||
private const val MAX_TIME_DEVIATION_MINUTES = 10L
|
||||
|
@ -372,7 +372,7 @@ class OmnipodDashOverviewFragment : DaggerFragment() {
|
|||
if (podStateManager.isActivationCompleted && podStateManager.pulsesDelivered != null) {
|
||||
resourceHelper.gs(
|
||||
R.string.omnipod_common_overview_total_delivered_value,
|
||||
podStateManager.pulsesDelivered!! * 0.05
|
||||
(podStateManager.pulsesDelivered!! * PodConstants.POD_PULSE_BOLUS_UNITS)
|
||||
)
|
||||
} else {
|
||||
PLACEHOLDER
|
||||
|
@ -387,11 +387,11 @@ class OmnipodDashOverviewFragment : DaggerFragment() {
|
|||
// TODO
|
||||
// val lowReservoirThreshold = (omnipodAlertUtil.lowReservoirAlertUnits
|
||||
// ?: OmnipodConstants.DEFAULT_MAX_RESERVOIR_ALERT_THRESHOLD).toDouble()
|
||||
val lowReservoirThreshold: Short = 20
|
||||
val lowReservoirThreshold: Short = PodConstants.DEFAULT_MAX_RESERVOIR_ALERT_THRESHOLD
|
||||
|
||||
podInfoBinding.reservoir.text = resourceHelper.gs(
|
||||
R.string.omnipod_common_overview_reservoir_value,
|
||||
(podStateManager.pulsesRemaining!! * 0.05)
|
||||
(podStateManager.pulsesRemaining!! * PodConstants.POD_PULSE_BOLUS_UNITS)
|
||||
)
|
||||
podInfoBinding.reservoir.setTextColor(
|
||||
if (podStateManager.pulsesRemaining!! < lowReservoirThreshold) {
|
||||
|
|
|
@ -14,8 +14,6 @@ import info.nightscout.androidaps.plugins.pump.omnipod.dash.util.I8n
|
|||
import info.nightscout.androidaps.utils.resources.ResourceHelper
|
||||
import info.nightscout.androidaps.utils.sharedPreferences.SP
|
||||
import io.reactivex.Single
|
||||
import io.reactivex.disposables.CompositeDisposable
|
||||
import io.reactivex.rxkotlin.addTo
|
||||
import io.reactivex.rxkotlin.plusAssign
|
||||
import io.reactivex.rxkotlin.subscribeBy
|
||||
import javax.inject.Inject
|
||||
|
|
|
@ -16,13 +16,12 @@ import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.activati
|
|||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.R
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.OmnipodDashManager
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.state.OmnipodDashPodStateManager
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.util.Constants
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.util.I8n
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.util.mapProfileToBasalProgram
|
||||
import info.nightscout.androidaps.utils.resources.ResourceHelper
|
||||
import info.nightscout.androidaps.utils.sharedPreferences.SP
|
||||
import io.reactivex.Single
|
||||
import io.reactivex.disposables.CompositeDisposable
|
||||
import io.reactivex.rxkotlin.addTo
|
||||
import io.reactivex.rxkotlin.plusAssign
|
||||
import io.reactivex.rxkotlin.subscribeBy
|
||||
import javax.inject.Inject
|
||||
|
@ -67,43 +66,48 @@ class DashInsertCannulaViewModel @Inject constructor(
|
|||
|
||||
super.disposable += omnipodManager.activatePodPart2(basalProgram, expirationHoursBeforeShutdown)
|
||||
.subscribeBy(
|
||||
onNext = { podEvent ->
|
||||
logger.debug(
|
||||
LTag.PUMP,
|
||||
"Received PodEvent in Pod activation part 2: $podEvent"
|
||||
)
|
||||
},
|
||||
onError = { throwable ->
|
||||
logger.error(LTag.PUMP, "Error in Pod activation part 2", throwable)
|
||||
source.onSuccess(PumpEnactResult(injector).success(false).comment(I8n.textFromException(throwable, resourceHelper)))
|
||||
},
|
||||
onComplete = {
|
||||
logger.debug("Pod activation part 2 completed")
|
||||
podStateManager.basalProgram = basalProgram
|
||||
pumpSync.connectNewPump()
|
||||
pumpSync.insertTherapyEventIfNewWithTimestamp(
|
||||
timestamp = System.currentTimeMillis(),
|
||||
type = DetailedBolusInfo.EventType.CANNULA_CHANGE,
|
||||
pumpType = PumpType.OMNIPOD_DASH,
|
||||
pumpSerial = podStateManager.uniqueId?.toString() ?: "n/a"
|
||||
)
|
||||
pumpSync.insertTherapyEventIfNewWithTimestamp(
|
||||
timestamp = System.currentTimeMillis(),
|
||||
type = DetailedBolusInfo.EventType.INSULIN_CHANGE,
|
||||
pumpType = PumpType.OMNIPOD_DASH,
|
||||
pumpSerial = podStateManager.uniqueId?.toString() ?: "n/a"
|
||||
)
|
||||
pumpSync.syncStopTemporaryBasalWithPumpId(
|
||||
timestamp = System.currentTimeMillis(),
|
||||
endPumpId = System.currentTimeMillis(),
|
||||
pumpType = PumpType.OMNIPOD_DASH,
|
||||
pumpSerial = podStateManager.uniqueId?.toString() ?: "n/a"
|
||||
)
|
||||
podStateManager.updateExpirationAlertSettings(expirationReminderEnabled, expirationHours)
|
||||
rxBus.send(EventDismissNotification(Notification.OMNIPOD_POD_NOT_ATTACHED))
|
||||
source.onSuccess(PumpEnactResult(injector).success(true))
|
||||
}
|
||||
)
|
||||
onNext = { podEvent ->
|
||||
logger.debug(
|
||||
LTag.PUMP,
|
||||
"Received PodEvent in Pod activation part 2: $podEvent"
|
||||
)
|
||||
},
|
||||
onError = { throwable ->
|
||||
logger.error(LTag.PUMP, "Error in Pod activation part 2", throwable)
|
||||
source.onSuccess(PumpEnactResult(injector).success(false).comment(I8n.textFromException(throwable, resourceHelper)))
|
||||
},
|
||||
onComplete = {
|
||||
logger.debug("Pod activation part 2 completed")
|
||||
podStateManager.basalProgram = basalProgram
|
||||
|
||||
pumpSync.syncStopTemporaryBasalWithPumpId(
|
||||
timestamp = System.currentTimeMillis(),
|
||||
endPumpId = System.currentTimeMillis(),
|
||||
pumpType = PumpType.OMNIPOD_DASH,
|
||||
pumpSerial = Constants.PUMP_SERIAL_FOR_FAKE_TBR // cancel the fake TBR with the same pump
|
||||
// serial that it was created with
|
||||
)
|
||||
|
||||
pumpSync.connectNewPump()
|
||||
|
||||
pumpSync.insertTherapyEventIfNewWithTimestamp(
|
||||
timestamp = System.currentTimeMillis(),
|
||||
type = DetailedBolusInfo.EventType.CANNULA_CHANGE,
|
||||
pumpType = PumpType.OMNIPOD_DASH,
|
||||
pumpSerial = podStateManager.uniqueId?.toString() ?: "n/a"
|
||||
)
|
||||
pumpSync.insertTherapyEventIfNewWithTimestamp(
|
||||
timestamp = System.currentTimeMillis(),
|
||||
type = DetailedBolusInfo.EventType.INSULIN_CHANGE,
|
||||
pumpType = PumpType.OMNIPOD_DASH,
|
||||
pumpSerial = podStateManager.uniqueId?.toString() ?: "n/a"
|
||||
)
|
||||
|
||||
podStateManager.updateExpirationAlertSettings(expirationReminderEnabled, expirationHours)
|
||||
rxBus.send(EventDismissNotification(Notification.OMNIPOD_POD_NOT_ATTACHED))
|
||||
source.onSuccess(PumpEnactResult(injector).success(true))
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.dash.util
|
||||
|
||||
class Constants {
|
||||
companion object {
|
||||
const val PUMP_SERIAL_FOR_FAKE_TBR = "4241"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.dash.util
|
||||
|
||||
class Flag(var value: Int = 0) {
|
||||
|
||||
fun set(idx: Byte, set: Boolean) {
|
||||
val mask = 1 shl (7 - idx)
|
||||
if (!set)
|
||||
return
|
||||
value = value or mask
|
||||
}
|
||||
|
||||
fun get(idx: Byte): Int {
|
||||
val mask = 1 shl (7 - idx)
|
||||
if (value and mask == 0) {
|
||||
return 0
|
||||
}
|
||||
return 1
|
||||
}
|
||||
}
|
|
@ -4,6 +4,18 @@
|
|||
<string name="omnipod_dash_pump_description">Pompos integracija Omnipod Dash (naujas, Bluetooth palaikantis modelis su mėlynu adatos dangteliu).</string>
|
||||
<!-- Omnipod Dash - Keys -->
|
||||
<!-- Omnipod Dash - Overview -->
|
||||
<string name="omnipod_dash_overview_bluetooth_status">Bluetooth būklė</string>
|
||||
<string name="omnipod_dash_overview_bluetooth_address">Bluetooth adresas</string>
|
||||
<string name="omnipod_dash_overview_firmware_version_value">Programinė įranga %1$s / Bluetooth %2$s</string>
|
||||
<string name="omnipod_dash_overview_bluetooth_connection_quality">Ryšio kokybė</string>
|
||||
<string name="omnipod_dash_overview_delivery_status">Leidimo būklė</string>
|
||||
<!-- Omnipod Dash - Pod Activation Wizard -->
|
||||
<string name="omnipod_dash_pod_activation_wizard_start_pod_activation_text">Užpildykite naują Pod insulinu, kurio pakaktų 3 dienas.\n\nTaip pat atkreipkite dėmesį į du pyptelėjimus iš Pod, kai pildote. Tai rodo, kad rezervuaras buvo užpildytas mažiausiai 80vv. Visiškai ištuštinkite švirkštą, net jei girdėjote du pyptelėjimus.\n\nUžpildę Pod, spustelėkite <b>Kitas</b>.\n\n<b>Pastaba:</b> vykdant šiuos veiksmus, nenuimkite Pod adatos apsauginio dangtelio.</string>
|
||||
<string name="omnipod_dash_pod_activation_wizard_initialize_pod_text">Pabandykite suporuoti naują Pod ir jį užpildyti.\n\nSėkmingai užbaigę inicijavimo procesą, galite spustelėti <b>Kitas</b>.</string>
|
||||
<string name="omnipod_common_preferences_notification_delivery_suspended_sound_enabled">Įjungtas pranešimų apie pristabdytą leidimą garsas</string>
|
||||
<!-- Exceptions -->
|
||||
<string name="omnipod_dash_failed_to_connect">Nepavyko prisijungti prie Pod</string>
|
||||
<string name="omnipod_dash_found_too_many_pods">Nustatyta, kad suaktyvinama per daug Pod įrenginių</string>
|
||||
<string name="omnipod_dash_scan_failed">Nepavyksta rasti aktyvinamo Pod</string>
|
||||
<string name="omnipod_dash_generic_error">Bendroji klaida: %1$s</string>
|
||||
</resources>
|
||||
|
|
|
@ -4,6 +4,18 @@
|
|||
<string name="omnipod_dash_pump_description">Интеграция с помпой Omnipod Dash (новая модель с поддержкой Bluetooth, с синим колпачком на игле).</string>
|
||||
<!-- Omnipod Dash - Keys -->
|
||||
<!-- Omnipod Dash - Overview -->
|
||||
<string name="omnipod_dash_overview_bluetooth_status">Состояние Bluetooth</string>
|
||||
<string name="omnipod_dash_overview_bluetooth_address">Адрес Bluetooth</string>
|
||||
<string name="omnipod_dash_overview_firmware_version_value">Прошивка %1$s / Bluetooth %2$s</string>
|
||||
<string name="omnipod_dash_overview_bluetooth_connection_quality">Качество соединения</string>
|
||||
<string name="omnipod_dash_overview_delivery_status">Статус подачи</string>
|
||||
<!-- Omnipod Dash - Pod Activation Wizard -->
|
||||
<string name="omnipod_dash_pod_activation_wizard_start_pod_activation_text">Заполните новый Pod запасом инсулина на 3 дня.\n\nПоступят два звуковых сигнала от помпы во время заправки. Это означает, что минимальное количество 80 ед. заправлено. Не забудьте опустошить заправочный шприц даже после того, как услышите два звуковых сигнала.\n\nПосле заполнения Pod нажмите <b>Next</b>.\n\n<b>Примечание:</b> Пока что не снимайте с помпы колпачок с иглой.</string>
|
||||
<string name="omnipod_dash_pod_activation_wizard_initialize_pod_text">Попытка соединиться с новым подом и активировать его.\n\nКогда процесс инициализации успешно завершен, нажмите <b>Next/b>.</string>
|
||||
<string name="omnipod_common_preferences_notification_delivery_suspended_sound_enabled">Звук на приостановку подачи включен</string>
|
||||
<!-- Exceptions -->
|
||||
<string name="omnipod_dash_failed_to_connect">Не удалось присоединиться к pod </string>
|
||||
<string name="omnipod_dash_found_too_many_pods">Cлишком много pod\'ов для активации</string>
|
||||
<string name="omnipod_dash_scan_failed"> Pod для активации не найден</string>
|
||||
<string name="omnipod_dash_generic_error">Общая ошибка: %1$s</string>
|
||||
</resources>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.response
|
||||
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.AlertType
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.DeliveryStatus
|
||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.PodStatus
|
||||
import org.apache.commons.codec.DecoderException
|
||||
|
@ -27,7 +28,7 @@ class DefaultStatusResponseTest {
|
|||
}
|
||||
|
||||
/**
|
||||
* response (hex) 08202EAA0C0A1D1905281000004387D3039A
|
||||
* response (hex) 1D1905281000004387D3039A
|
||||
Status response: 29
|
||||
Pod status: RUNNING_BELOW_MIN_VOLUME
|
||||
Basal active: true
|
||||
|
@ -66,7 +67,7 @@ class DefaultStatusResponseTest {
|
|||
}
|
||||
|
||||
/**
|
||||
* response (hex) 08202EAA080A1D180519C00E0039A7FF8085
|
||||
* response (hex) 1D180519C00E0039A7FF8085
|
||||
Status response: 29
|
||||
Pod status: RUNNING_ABOVE_MIN_VOLUME
|
||||
Basal active: true
|
||||
|
@ -103,4 +104,116 @@ class DefaultStatusResponseTest {
|
|||
Assert.assertEquals(1023.toShort(), response.reservoirPulsesRemaining)
|
||||
Assert.assertEquals(2611.toShort(), response.totalPulsesDelivered)
|
||||
}
|
||||
|
||||
/** response (hex) 1D990714201F0042ED8801DE
|
||||
Status response: 29
|
||||
Pod status: RUNNING_BELOW_MIN_VOLUME
|
||||
Basal active: true
|
||||
Temp Basal active: false
|
||||
Immediate bolus active: false
|
||||
Extended bolus active: true
|
||||
Bolus pulses remaining: 31
|
||||
sequence number of last programing command: 4
|
||||
Total full pulses delivered: 3624
|
||||
Full reservoir pulses remaining: 392
|
||||
Time since activation: 4283
|
||||
*/
|
||||
@Test @Throws(DecoderException::class) fun testValidResponseReservoirPulsesRemaining() {
|
||||
val encoded = Hex.decodeHex("1D990714201F0042ED8801DE")
|
||||
val response = DefaultStatusResponse(encoded)
|
||||
Assert.assertArrayEquals(encoded, response.encoded)
|
||||
Assert.assertNotSame(encoded, response.encoded)
|
||||
Assert.assertEquals(ResponseType.DEFAULT_STATUS_RESPONSE, response.responseType)
|
||||
Assert.assertEquals(ResponseType.DEFAULT_STATUS_RESPONSE.value, response.messageType)
|
||||
Assert.assertEquals(DeliveryStatus.UNKNOWN, response.deliveryStatus) // Extended bolus active
|
||||
Assert.assertEquals(PodStatus.RUNNING_BELOW_MIN_VOLUME, response.podStatus)
|
||||
Assert.assertEquals(4.toShort(), response.sequenceNumberOfLastProgrammingCommand)
|
||||
Assert.assertEquals(31.toShort(), response.bolusPulsesRemaining)
|
||||
Assert.assertEquals(0, response.activeAlerts.size)
|
||||
Assert.assertEquals(4283.toShort(), response.minutesSinceActivation)
|
||||
Assert.assertEquals(392.toShort(), response.reservoirPulsesRemaining)
|
||||
Assert.assertEquals(3624.toShort(), response.totalPulsesDelivered)
|
||||
}
|
||||
|
||||
/** response (hex) 1d68002601f400002bff0368
|
||||
Status response: 29
|
||||
Pod status: RUNNING_BELOW_MIN_VOLUME
|
||||
Basal active: true
|
||||
Temp Basal active: false
|
||||
Immediate bolus active: false
|
||||
Extended bolus active: true
|
||||
Bolus pulses remaining: 31
|
||||
sequence number of last programing command: 4
|
||||
Total full pulses delivered: 3624
|
||||
Full reservoir pulses remaining: 392
|
||||
Time since activation: 4283
|
||||
*/
|
||||
@Test @Throws(DecoderException::class) fun testValidResponseBolusPulsesRemaining3() {
|
||||
val encoded = Hex.decodeHex("1d68002601f400002bff0368")
|
||||
val response = DefaultStatusResponse(encoded)
|
||||
Assert.assertArrayEquals(encoded, response.encoded)
|
||||
Assert.assertNotSame(encoded, response.encoded)
|
||||
Assert.assertEquals(500.toShort(), response.bolusPulsesRemaining)
|
||||
Assert.assertEquals(0, response.activeAlerts.size)
|
||||
}
|
||||
/** response (hex) 1d28002e91e400002fff8256
|
||||
Status response: 29
|
||||
Pod status: RUNNING_BELOW_MIN_VOLUME
|
||||
Basal active: true
|
||||
Temp Basal active: false
|
||||
Immediate bolus active: false
|
||||
Extended bolus active: true
|
||||
Bolus pulses remaining: 31
|
||||
sequence number of last programing command: 4
|
||||
Total full pulses delivered: 3624
|
||||
Full reservoir pulses remaining: 392
|
||||
Time since activation: 4283
|
||||
*/
|
||||
@Test @Throws(DecoderException::class) fun testValidResponseBolusPulsesRemaining4() {
|
||||
val encoded = Hex.decodeHex("1d28002e91e400002fff8256")
|
||||
val response = DefaultStatusResponse(encoded)
|
||||
Assert.assertArrayEquals(encoded, response.encoded)
|
||||
Assert.assertNotSame(encoded, response.encoded)
|
||||
Assert.assertEquals(484.toShort(), response.bolusPulsesRemaining)
|
||||
Assert.assertEquals(0, response.activeAlerts.size)
|
||||
}
|
||||
|
||||
/*
|
||||
1D980559C820404393FF83AA
|
||||
Pod status: RUNNING_ABOVE_MIN_VOLUME
|
||||
Basal active: true
|
||||
Temp Basal active: false
|
||||
Immediate bolus active: false
|
||||
Extended bolus active: true
|
||||
Bolus pulses remaining: 32
|
||||
sequence number of last programing command: 9
|
||||
Total full pulses delivered: 2739
|
||||
Full reservoir pulses remaining: 1023
|
||||
Time since activation: 4324
|
||||
Alert 1 is InActive
|
||||
Alert 2 is InActive
|
||||
Alert 3 is InActive
|
||||
Alert 4 is InActive
|
||||
Alert 5 is InActive
|
||||
Alert 6 is InActive
|
||||
Alert 7 is Active
|
||||
Occlusion alert active false
|
||||
*/
|
||||
@Test @Throws(DecoderException::class) fun testValidResponseActiveAlert1() {
|
||||
val encoded = Hex.decodeHex("1D980559C820404393FF83AA")
|
||||
val response = DefaultStatusResponse(encoded)
|
||||
Assert.assertArrayEquals(encoded, response.encoded)
|
||||
Assert.assertNotSame(encoded, response.encoded)
|
||||
Assert.assertEquals(ResponseType.DEFAULT_STATUS_RESPONSE, response.responseType)
|
||||
Assert.assertEquals(ResponseType.DEFAULT_STATUS_RESPONSE.value, response.messageType)
|
||||
Assert.assertEquals(DeliveryStatus.UNKNOWN, response.deliveryStatus)
|
||||
Assert.assertEquals(PodStatus.RUNNING_ABOVE_MIN_VOLUME, response.podStatus)
|
||||
Assert.assertEquals(9.toShort(), response.sequenceNumberOfLastProgrammingCommand)
|
||||
Assert.assertEquals(32.toShort(), response.bolusPulsesRemaining)
|
||||
Assert.assertEquals(1, response.activeAlerts.size)
|
||||
Assert.assertEquals(4324.toShort(), response.minutesSinceActivation)
|
||||
Assert.assertEquals(1023.toShort(), response.reservoirPulsesRemaining)
|
||||
Assert.assertEquals(2739.toShort(), response.totalPulsesDelivered)
|
||||
Assert.assertEquals(true, response.activeAlerts.contains(AlertType.EXPIRATION))
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,9 @@ import androidx.annotation.NonNull;
|
|||
import androidx.annotation.Nullable;
|
||||
|
||||
import org.joda.time.DateTime;
|
||||
import org.joda.time.Days;
|
||||
import org.joda.time.Duration;
|
||||
import org.joda.time.Instant;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
|
@ -148,6 +150,7 @@ public class OmnipodErosPumpPlugin extends PumpPluginBase implements Pump, Riley
|
|||
// variables for handling statuses and history
|
||||
private boolean firstRun = true;
|
||||
private boolean hasTimeDateOrTimeZoneChanged = false;
|
||||
private Instant lastTimeDateOrTimeZoneUpdate = Instant.ofEpochSecond(0L);
|
||||
private final boolean displayConnectionMessages = false;
|
||||
private RileyLinkOmnipodService rileyLinkOmnipodService;
|
||||
private boolean busy = false;
|
||||
|
@ -958,15 +961,18 @@ public class OmnipodErosPumpPlugin extends PumpPluginBase implements Pump, Riley
|
|||
public void timezoneOrDSTChanged(TimeChangeType timeChangeType) {
|
||||
aapsLogger.info(LTag.PUMP, "Time, Date and/or TimeZone changed. [changeType=" + timeChangeType.name() + ", eventHandlingEnabled=" + aapsOmnipodErosManager.isTimeChangeEventEnabled() + "]");
|
||||
|
||||
if (timeChangeType == TimeChangeType.TimeChanged) {
|
||||
aapsLogger.info(LTag.PUMP, "Ignoring time change because it is not a DST or TZ change");
|
||||
Instant now = Instant.now();
|
||||
if (timeChangeType == TimeChangeType.TimeChanged && now.isBefore(lastTimeDateOrTimeZoneUpdate.plus(Duration.standardDays(1L)))){
|
||||
aapsLogger.info(LTag.PUMP, "Ignoring time change because not a TZ or DST time change and the last one happened less than 24 hours ago.");
|
||||
return;
|
||||
} else if (!podStateManager.isPodRunning()) {
|
||||
}
|
||||
if (!podStateManager.isPodRunning()) {
|
||||
aapsLogger.info(LTag.PUMP, "Ignoring time change because no Pod is active");
|
||||
return;
|
||||
}
|
||||
|
||||
aapsLogger.info(LTag.PUMP, "DST and/or TimeZone changed event will be consumed by driver");
|
||||
lastTimeDateOrTimeZoneUpdate = now;
|
||||
hasTimeDateOrTimeZoneChanged = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
<string name="omnipod_eros_pod_management_pulse_log_value">Pulse log (gekopieerd naar klembord)</string>
|
||||
<!-- Omnipod Eros - Pod Activation Wizard -->
|
||||
<string name="omnipod_eros_pod_activation_wizard_start_pod_activation_text">Vul een nieuw Pod in met voldoende insuline voor 3 dagen.\n\nLuister naar twee piepjes van de Pod tijdens het vulproces. Deze geven aan dat de minimale hoeveelheid van 80E is bereikt. Ga door met vullen (ook na het horen van de twee piepjes) totdat het vulspuitje volledig leeg is.\n\nNa het vullen van de Pod kun je op <b>Volgende</b>drukken.\n\n<b>Opmerking:</b> verwijder op dit moment de naaldbeschermer van de Pod.\n<b>Opmerking:</b> Zet de RileyLink rechtop en plaats de Pod ongeveer vijf centimeter ervandaan.</string>
|
||||
<string name="omnipod_eros_pod_activation_wizard_initialize_pod_text">Er wordt nu geprobeerd om de Pod te koppelen en de canule te vullen.\n\nWanneer deze stap successvol is afgerond, kan er op <b>Volgende</b> worden gedrukt.\n\n<b>Opmerking:</b> zet de RileyLink rechtop en leg de Pod er ongeveer 5 centimeter vandaan.</string>
|
||||
<string name="omnipod_eros_pod_activation_wizard_initialize_pod_text">Er wordt nu geprobeerd om de Pod te koppelen en de canule te vullen.\n\nWanneer deze stap succesvol is afgerond, kan er op <b>Volgende</b> worden gedrukt.\n\n<b>Opmerking:</b> zet de RileyLink rechtop en leg de Pod er ongeveer 5 centimeter vandaan.</string>
|
||||
<!-- Omnipod Eros - Other -->
|
||||
<string name="omnipod_eros_uncertain">onzeker</string>
|
||||
</resources>
|
||||
|
|
|
@ -15,6 +15,11 @@
|
|||
<intent android:action="info.nightscout.androidaps.plugins.PumpCommon.dialog.RileyLinkBLEConfigActivity" />
|
||||
</Preference>
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="@string/key_orange_use_scanning"
|
||||
android:summary="@string/orange_use_scanning_level_summary"
|
||||
android:title="@string/orange_use_scanning_level" />
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="@string/key_riley_link_show_battery_level"
|
||||
|
|
|
@ -2,9 +2,18 @@
|
|||
<resources>
|
||||
<string name="open_humans">Open Humans</string>
|
||||
<string name="open_humans_short">OH</string>
|
||||
<string name="open_humans_description">Open Humans leidžia įkelti diabeto valdymo duomenis ir skirti juos moksliniams projektams.</string>
|
||||
<string name="logout">Atsijungti</string>
|
||||
<string name="setup">Sąranka</string>
|
||||
<string name="setup_completed_info">Open Humans buvo nustatytas. Jei norite sustabdyti įkėlimą, spustelėkite „Atsijungti“.</string>
|
||||
<string name="not_setup_info">Open Humans neaktyvus. Norėdami pradėti duomenų įkėlimą, spustelėkite „Sąranka\".</string>
|
||||
<string name="project_member_id">Projekto nario ID: %1$s</string>
|
||||
<string name="only_upload_if_connected_to_wifi">Tik įkelti, jei prijungta prie WiFi</string>
|
||||
<string name="only_upload_if_charging">Įkelti tik akumuliatoriaus įkrovimo metu</string>
|
||||
<string name="open_humans_uploading">Įkeliama į Open Humans…</string>
|
||||
<string name="open_humans_notifications">Open Humans Pranešimai</string>
|
||||
<string name="uploading_to_open_humans">AndroidAPS įkelia duomenis į Open Humans. Tai gali šiek tiek užtrukti.</string>
|
||||
<string name="you_have_been_signed_out_of_open_humans">Jūs buvote atjungtas iš Open Humans</string>
|
||||
<string name="click_here_to_sign_in_again_if_this_wasnt_on_purpose">Spustelėkite čia, kad prisijungtumėte dar kartą, jei tai atsitiko netyčia.</string>
|
||||
<string name="upload_now">Įkelti dabar</string>
|
||||
</resources>
|
||||
|
|
|
@ -32,6 +32,7 @@ public class RileyLinkConst {
|
|||
//public static final String RileyLinkAddress = PrefPrefix + "mac_address"; // pref_rileylink_mac_address
|
||||
public static final int RileyLinkAddress = R.string.key_rileylink_mac_address;
|
||||
public static final int RileyLinkName = R.string.key_rileylink_name;
|
||||
public static final int OrangeUseScanning = R.string.key_orange_use_scanning;
|
||||
public static final String LastGoodDeviceCommunicationTime = Prefix + "lastGoodDeviceCommunicationTime";
|
||||
public static final String LastGoodDeviceFrequency = Prefix + "LastGoodDeviceFrequency";
|
||||
public static final int Encoding = R.string.key_medtronic_encoding;
|
||||
|
|
|
@ -8,11 +8,19 @@ import android.bluetooth.BluetoothGattCharacteristic;
|
|||
import android.bluetooth.BluetoothGattDescriptor;
|
||||
import android.bluetooth.BluetoothGattService;
|
||||
import android.bluetooth.BluetoothProfile;
|
||||
import android.bluetooth.le.BluetoothLeScanner;
|
||||
import android.bluetooth.le.ScanCallback;
|
||||
import android.bluetooth.le.ScanFilter;
|
||||
import android.bluetooth.le.ScanResult;
|
||||
import android.bluetooth.le.ScanSettings;
|
||||
import android.content.Context;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.os.SystemClock;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.UUID;
|
||||
|
@ -84,6 +92,17 @@ public class RileyLinkBLE {
|
|||
if (radioResponseCountNotified != null) {
|
||||
radioResponseCountNotified.run();
|
||||
}
|
||||
|
||||
if (characteristic.getUuid().toString().equals(GattAttributes.UUID_NOTIF_CHARACTER.toString())) {
|
||||
final byte[] data = characteristic.getValue();
|
||||
int first = 0xff & data[0];
|
||||
aapsLogger.info(LTag.PUMPBTCOMM,
|
||||
"onCharacteristicChanged " + ByteUtil.shortHexString(characteristic.getValue()) + "=====" + first);
|
||||
String fv = data[3] + "." + data[4];
|
||||
String hv = data[5] + "." + data[6];
|
||||
rileyLinkServiceData.versionOrangeFV = fv;
|
||||
rileyLinkServiceData.versionOrangeHV = hv;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -234,6 +253,9 @@ public class RileyLinkBLE {
|
|||
if (gattDebugEnabled) {
|
||||
debugService(service, 0);
|
||||
}
|
||||
if (GattAttributes.isOrange(uuidService)) {
|
||||
rileyLinkServiceData.isOrange = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (gattDebugEnabled) {
|
||||
|
@ -361,21 +383,47 @@ public class RileyLinkBLE {
|
|||
aapsLogger.error(LTag.PUMPBTCOMM, "Error setting response count notification");
|
||||
return false;
|
||||
}
|
||||
if(rileyLinkServiceData.isOrange){
|
||||
enableNotificationsOrange();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean enableNotificationsOrange() {
|
||||
aapsLogger.error(LTag.PUMPBTCOMM, "enableNotificationsORG");
|
||||
BLECommOperationResult result = setNotification_blocking(GattAttributes.UUID_NOTIF_SERVICE, //
|
||||
GattAttributes.UUID_NOTIF_CHARACTER);
|
||||
if (result.resultCode != BLECommOperationResult.RESULT_SUCCESS) {
|
||||
aapsLogger.error(LTag.PUMPBTCOMM, "Error setting response count notification");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
String macAddress;
|
||||
|
||||
public void findRileyLink(String RileyLinkAddress) {
|
||||
aapsLogger.debug(LTag.PUMPBTCOMM, "RileyLink address: " + RileyLinkAddress);
|
||||
// Must verify that this is a valid MAC, or crash.
|
||||
|
||||
rileyLinkDevice = bluetoothAdapter.getRemoteDevice(RileyLinkAddress);
|
||||
// if this succeeds, we get a connection state change callback?
|
||||
|
||||
if (rileyLinkDevice != null) {
|
||||
connectGatt();
|
||||
macAddress = RileyLinkAddress;
|
||||
boolean useScanning = sp.getBoolean(RileyLinkConst.Prefs.OrangeUseScanning, false);
|
||||
if (useScanning) {
|
||||
startScan();
|
||||
} else {
|
||||
aapsLogger.error(LTag.PUMPBTCOMM, "RileyLink device not found with address: " + RileyLinkAddress);
|
||||
rileyLinkDevice = bluetoothAdapter.getRemoteDevice(RileyLinkAddress);
|
||||
// if this succeeds, we get a connection state change callback?
|
||||
if (rileyLinkDevice != null) {
|
||||
connectGatt();
|
||||
} else {
|
||||
aapsLogger.error(LTag.PUMPBTCOMM, "RileyLink device not found with address: " + RileyLinkAddress);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void connectGattCheckOrange() {
|
||||
boolean useScanning = sp.getBoolean(RileyLinkConst.Prefs.OrangeUseScanning, false);
|
||||
if (useScanning) {
|
||||
startScan();
|
||||
} else {
|
||||
connectGatt();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -594,4 +642,117 @@ public class RileyLinkBLE {
|
|||
|
||||
return statusMessage;
|
||||
}
|
||||
|
||||
private List<ScanFilter> buildScanFilters() {
|
||||
ArrayList scanFilterList = new ArrayList<>();
|
||||
ScanFilter.Builder scanFilterBuilder = new ScanFilter.Builder();
|
||||
scanFilterBuilder.setDeviceAddress(macAddress);
|
||||
scanFilterList.add(scanFilterBuilder.build());
|
||||
return scanFilterList;
|
||||
}
|
||||
|
||||
private ScanSettings buildScanSettings() {
|
||||
ScanSettings.Builder scanSettingBuilder = new ScanSettings.Builder();
|
||||
scanSettingBuilder.setScanMode(ScanSettings.SCAN_MODE_LOW_LATENCY);
|
||||
scanSettingBuilder.setMatchMode(ScanSettings.MATCH_MODE_AGGRESSIVE);
|
||||
scanSettingBuilder.setCallbackType(ScanSettings.CALLBACK_TYPE_ALL_MATCHES);
|
||||
return scanSettingBuilder.build();
|
||||
}
|
||||
|
||||
public void startScan() {
|
||||
try {
|
||||
stopScan();
|
||||
aapsLogger.debug(LTag.PUMPBTCOMM, "startScan");
|
||||
handler.sendEmptyMessageDelayed(TIME_OUT_WHAT, TIME_OUT);
|
||||
BluetoothLeScanner bluetoothLeScanner = bluetoothAdapter.getBluetoothLeScanner();
|
||||
if (bluetoothLeScanner == null) {
|
||||
bluetoothAdapter.startLeScan(mLeScanCallback);
|
||||
return;
|
||||
}
|
||||
bluetoothLeScanner.startScan(buildScanFilters(), buildScanSettings(), scanCallback);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
aapsLogger.error(LTag.PUMPBTCOMM, e.getMessage());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
ScanCallback scanCallback = new ScanCallback() {
|
||||
@Override
|
||||
public void onScanResult(int callbackType, ScanResult result) {
|
||||
super.onScanResult(callbackType, result);
|
||||
String name = result.getDevice().getName();
|
||||
String address = result.getDevice().getAddress();
|
||||
if (macAddress.equals(address)) {
|
||||
stopScan();
|
||||
rileyLinkDevice = result.getDevice();
|
||||
connectGatt();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBatchScanResults(List<ScanResult> results) {
|
||||
super.onBatchScanResults(results);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onScanFailed(int errorCode) {
|
||||
super.onScanFailed(errorCode);
|
||||
stopScan();
|
||||
}
|
||||
};
|
||||
private BluetoothAdapter.LeScanCallback mLeScanCallback = new BluetoothAdapter.LeScanCallback() {
|
||||
public void onLeScan(final BluetoothDevice device, final int rssi,
|
||||
final byte[] scanRecord) {
|
||||
if (macAddress.equals(device.getAddress())) {
|
||||
stopScan();
|
||||
rileyLinkDevice = device;
|
||||
connectGatt();
|
||||
}
|
||||
}
|
||||
};
|
||||
public static final int TIME_OUT = 90 * 1000;
|
||||
public static final int TIME_OUT_WHAT = 0x12;
|
||||
Handler handler = new Handler() {
|
||||
@Override
|
||||
public void handleMessage(Message msg) {
|
||||
super.handleMessage(msg);
|
||||
switch (msg.what) {
|
||||
case TIME_OUT_WHAT:
|
||||
stopScan();
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
public void stopScan() {
|
||||
handler.removeMessages(TIME_OUT_WHAT);
|
||||
if (bluetoothAdapter == null) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
BluetoothLeScanner bluetoothLeScanner = bluetoothAdapter.getBluetoothLeScanner();
|
||||
if (bluetoothLeScanner == null) {
|
||||
if (isBluetoothAvailable()) {
|
||||
bluetoothAdapter.stopLeScan(mLeScanCallback);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (isBluetoothAvailable()) {
|
||||
bluetoothLeScanner.stopScan(scanCallback);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
aapsLogger.error(LTag.PUMPBTCOMM, e.getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public boolean isBluetoothAvailable() {
|
||||
return (bluetoothAdapter != null &&
|
||||
bluetoothAdapter.isEnabled() &&
|
||||
bluetoothAdapter.getState() == BluetoothAdapter.STATE_ON);
|
||||
}
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue