Merge remote-tracking branch 'Nightscout/dev' into Fix/CrashMissingTrigger
This commit is contained in:
commit
aebc7433e0
405 changed files with 15871 additions and 4215 deletions
5
.editorconfig
Normal file
5
.editorconfig
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
root = true
|
||||||
|
|
||||||
|
|
||||||
|
[*{kt,kts}]
|
||||||
|
disabled_rules=no-wildcard-imports
|
|
@ -1,6 +1,7 @@
|
||||||
<component name="ProjectCodeStyleConfiguration">
|
<component name="ProjectCodeStyleConfiguration">
|
||||||
<code_scheme name="Project" version="173">
|
<code_scheme name="Project" version="173">
|
||||||
<option name="AUTODETECT_INDENTS" value="false" />
|
<option name="AUTODETECT_INDENTS" value="false" />
|
||||||
|
<option name="WRAP_WHEN_TYPING_REACHES_RIGHT_MARGIN" value="true" />
|
||||||
<JetCodeStyleSettings>
|
<JetCodeStyleSettings>
|
||||||
<option name="ALIGN_IN_COLUMNS_CASE_BRANCH" value="true" />
|
<option name="ALIGN_IN_COLUMNS_CASE_BRANCH" value="true" />
|
||||||
<option name="NAME_COUNT_TO_USE_STAR_IMPORT" value="6" />
|
<option name="NAME_COUNT_TO_USE_STAR_IMPORT" value="6" />
|
||||||
|
@ -126,14 +127,21 @@
|
||||||
</codeStyleSettings>
|
</codeStyleSettings>
|
||||||
<codeStyleSettings language="kotlin">
|
<codeStyleSettings language="kotlin">
|
||||||
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
|
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
|
||||||
|
<option name="RIGHT_MARGIN" value="120" />
|
||||||
<option name="LINE_COMMENT_AT_FIRST_COLUMN" value="false" />
|
<option name="LINE_COMMENT_AT_FIRST_COLUMN" value="false" />
|
||||||
<option name="LINE_COMMENT_ADD_SPACE" value="true" />
|
<option name="LINE_COMMENT_ADD_SPACE" value="true" />
|
||||||
<option name="KEEP_BLANK_LINES_IN_DECLARATIONS" value="1" />
|
<option name="KEEP_BLANK_LINES_IN_DECLARATIONS" value="1" />
|
||||||
<option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
|
<option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
|
||||||
<option name="KEEP_BLANK_LINES_BEFORE_RBRACE" value="1" />
|
<option name="KEEP_BLANK_LINES_BEFORE_RBRACE" value="1" />
|
||||||
<option name="BLANK_LINES_AFTER_CLASS_HEADER" value="1" />
|
<option name="BLANK_LINES_AFTER_CLASS_HEADER" value="1" />
|
||||||
|
<option name="ALIGN_MULTILINE_PARAMETERS_IN_CALLS" value="true" />
|
||||||
|
<option name="ASSIGNMENT_WRAP" value="5" />
|
||||||
<option name="METHOD_ANNOTATION_WRAP" value="5" />
|
<option name="METHOD_ANNOTATION_WRAP" value="5" />
|
||||||
<option name="FIELD_ANNOTATION_WRAP" value="0" />
|
<option name="CLASS_ANNOTATION_WRAP" value="1" />
|
||||||
|
<option name="FIELD_ANNOTATION_WRAP" value="1" />
|
||||||
|
<option name="PARAMETER_ANNOTATION_WRAP" value="1" />
|
||||||
|
<option name="VARIABLE_ANNOTATION_WRAP" value="1" />
|
||||||
|
<option name="ENUM_CONSTANTS_WRAP" value="5" />
|
||||||
<indentOptions>
|
<indentOptions>
|
||||||
<option name="CONTINUATION_INDENT_SIZE" value="4" />
|
<option name="CONTINUATION_INDENT_SIZE" value="4" />
|
||||||
</indentOptions>
|
</indentOptions>
|
||||||
|
|
|
@ -165,7 +165,7 @@ class MainActivity : NoSplashAppCompatActivity() {
|
||||||
actionBarDrawerToggle.syncState()
|
actionBarDrawerToggle.syncState()
|
||||||
}
|
}
|
||||||
|
|
||||||
public override fun onDestroy() {
|
override fun onDestroy() {
|
||||||
super.onDestroy()
|
super.onDestroy()
|
||||||
disposable.clear()
|
disposable.clear()
|
||||||
}
|
}
|
||||||
|
|
|
@ -171,7 +171,7 @@ class HistoryBrowseActivity : NoSplashAppCompatActivity() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override fun onPause() {
|
override fun onPause() {
|
||||||
super.onPause()
|
super.onPause()
|
||||||
disposable.clear()
|
disposable.clear()
|
||||||
iobCobCalculator.stopCalculation("onPause")
|
iobCobCalculator.stopCalculation("onPause")
|
||||||
|
@ -183,7 +183,7 @@ class HistoryBrowseActivity : NoSplashAppCompatActivity() {
|
||||||
super.onDestroy()
|
super.onDestroy()
|
||||||
}
|
}
|
||||||
|
|
||||||
public override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
disposable.add(rxBus
|
disposable.add(rxBus
|
||||||
.toObservable(EventAutosensCalculationFinished::class.java)
|
.toObservable(EventAutosensCalculationFinished::class.java)
|
||||||
|
|
|
@ -19,7 +19,7 @@ class SingleFragmentActivity : DaggerAppCompatActivityWithResult() {
|
||||||
|
|
||||||
private var plugin: PluginBase? = null
|
private var plugin: PluginBase? = null
|
||||||
|
|
||||||
public override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContentView(R.layout.activity_single_fragment)
|
setContentView(R.layout.activity_single_fragment)
|
||||||
plugin = pluginStore.plugins[intent.getIntExtra("plugin", -1)]
|
plugin = pluginStore.plugins[intent.getIntExtra("plugin", -1)]
|
||||||
|
@ -52,7 +52,7 @@ class SingleFragmentActivity : DaggerAppCompatActivityWithResult() {
|
||||||
return super.onCreateOptionsMenu(menu)
|
return super.onCreateOptionsMenu(menu)
|
||||||
}
|
}
|
||||||
|
|
||||||
public override fun attachBaseContext(newBase: Context) {
|
override fun attachBaseContext(newBase: Context) {
|
||||||
super.attachBaseContext(LocaleHelper.wrap(newBase))
|
super.attachBaseContext(LocaleHelper.wrap(newBase))
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -20,6 +20,7 @@ import info.nightscout.androidaps.plugin.general.openhumans.dagger.OpenHumansMod
|
||||||
import info.nightscout.androidaps.plugins.pump.common.di.PumpCommonModule
|
import info.nightscout.androidaps.plugins.pump.common.di.PumpCommonModule
|
||||||
import info.nightscout.androidaps.plugins.pump.common.di.RileyLinkModule
|
import info.nightscout.androidaps.plugins.pump.common.di.RileyLinkModule
|
||||||
import info.nightscout.androidaps.plugins.pump.medtronic.di.MedtronicModule
|
import info.nightscout.androidaps.plugins.pump.medtronic.di.MedtronicModule
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.dagger.OmnipodDashModule
|
||||||
import info.nightscout.androidaps.plugins.pump.omnipod.eros.dagger.OmnipodErosModule
|
import info.nightscout.androidaps.plugins.pump.omnipod.eros.dagger.OmnipodErosModule
|
||||||
import javax.inject.Singleton
|
import javax.inject.Singleton
|
||||||
|
|
||||||
|
@ -42,6 +43,7 @@ import javax.inject.Singleton
|
||||||
PumpCommonModule::class,
|
PumpCommonModule::class,
|
||||||
RileyLinkModule::class,
|
RileyLinkModule::class,
|
||||||
MedtronicModule::class,
|
MedtronicModule::class,
|
||||||
|
OmnipodDashModule::class,
|
||||||
OmnipodErosModule::class,
|
OmnipodErosModule::class,
|
||||||
APSModule::class,
|
APSModule::class,
|
||||||
PreferencesModule::class,
|
PreferencesModule::class,
|
||||||
|
|
|
@ -15,6 +15,7 @@ import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin
|
||||||
import info.nightscout.androidaps.plugins.configBuilder.PluginStore
|
import info.nightscout.androidaps.plugins.configBuilder.PluginStore
|
||||||
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctionImplementation
|
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctionImplementation
|
||||||
import info.nightscout.androidaps.plugins.general.maintenance.ImportExportPrefsImpl
|
import info.nightscout.androidaps.plugins.general.maintenance.ImportExportPrefsImpl
|
||||||
|
import info.nightscout.androidaps.plugins.general.maintenance.PrefFileListProvider
|
||||||
import info.nightscout.androidaps.plugins.general.nsclient.DataSyncSelectorImplementation
|
import info.nightscout.androidaps.plugins.general.nsclient.DataSyncSelectorImplementation
|
||||||
import info.nightscout.androidaps.plugins.general.smsCommunicator.SmsCommunicatorPlugin
|
import info.nightscout.androidaps.plugins.general.smsCommunicator.SmsCommunicatorPlugin
|
||||||
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.IobCobCalculatorPlugin
|
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.IobCobCalculatorPlugin
|
||||||
|
@ -22,6 +23,8 @@ import info.nightscout.androidaps.plugins.pump.PumpSyncImplementation
|
||||||
import info.nightscout.androidaps.queue.CommandQueue
|
import info.nightscout.androidaps.queue.CommandQueue
|
||||||
import info.nightscout.androidaps.utils.DateUtil
|
import info.nightscout.androidaps.utils.DateUtil
|
||||||
import info.nightscout.androidaps.utils.androidNotification.NotificationHolderImpl
|
import info.nightscout.androidaps.utils.androidNotification.NotificationHolderImpl
|
||||||
|
import info.nightscout.androidaps.utils.buildHelper.BuildHelper
|
||||||
|
import info.nightscout.androidaps.utils.buildHelper.BuildHelperImpl
|
||||||
import info.nightscout.androidaps.utils.buildHelper.ConfigImpl
|
import info.nightscout.androidaps.utils.buildHelper.ConfigImpl
|
||||||
import info.nightscout.androidaps.utils.resources.IconsProviderImplementation
|
import info.nightscout.androidaps.utils.resources.IconsProviderImplementation
|
||||||
import info.nightscout.androidaps.utils.resources.ResourceHelper
|
import info.nightscout.androidaps.utils.resources.ResourceHelper
|
||||||
|
@ -56,6 +59,10 @@ open class AppModule {
|
||||||
@Singleton
|
@Singleton
|
||||||
fun provideStorage(): Storage = FileStorage()
|
fun provideStorage(): Storage = FileStorage()
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
@Singleton
|
||||||
|
fun provideBuildHelper(config: Config, fileListProvider: PrefFileListProvider): BuildHelper = BuildHelperImpl(config, fileListProvider)
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@Singleton
|
@Singleton
|
||||||
internal fun provideSchedulers(): AapsSchedulers = DefaultAapsSchedulers()
|
internal fun provideSchedulers(): AapsSchedulers = DefaultAapsSchedulers()
|
||||||
|
|
|
@ -50,7 +50,7 @@ class StorageConstraintPlugin @Inject constructor(
|
||||||
return value
|
return value
|
||||||
}
|
}
|
||||||
|
|
||||||
open fun availableInternalMemorySize(): Long {
|
fun availableInternalMemorySize(): Long {
|
||||||
val path = Environment.getDataDirectory()
|
val path = Environment.getDataDirectory()
|
||||||
val stat = StatFs(path.path)
|
val stat = StatFs(path.path)
|
||||||
val blockSize = stat.blockSizeLong
|
val blockSize = stat.blockSizeLong
|
||||||
|
|
|
@ -34,6 +34,7 @@ class DataSyncSelectorImplementation @Inject constructor(
|
||||||
processChangedTemporaryBasalsCompat()
|
processChangedTemporaryBasalsCompat()
|
||||||
processChangedExtendedBolusesCompat()
|
processChangedExtendedBolusesCompat()
|
||||||
processChangedProfileSwitchesCompat()
|
processChangedProfileSwitchesCompat()
|
||||||
|
processChangedEffectiveProfileSwitchesCompat()
|
||||||
processChangedGlucoseValuesCompat()
|
processChangedGlucoseValuesCompat()
|
||||||
processChangedTempTargetsCompat()
|
processChangedTempTargetsCompat()
|
||||||
processChangedFoodsCompat()
|
processChangedFoodsCompat()
|
||||||
|
@ -56,6 +57,7 @@ class DataSyncSelectorImplementation @Inject constructor(
|
||||||
sp.remove(R.string.key_ns_extended_bolus_last_synced_id)
|
sp.remove(R.string.key_ns_extended_bolus_last_synced_id)
|
||||||
sp.remove(R.string.key_ns_therapy_event_last_synced_id)
|
sp.remove(R.string.key_ns_therapy_event_last_synced_id)
|
||||||
sp.remove(R.string.key_ns_profile_switch_last_synced_id)
|
sp.remove(R.string.key_ns_profile_switch_last_synced_id)
|
||||||
|
sp.remove(R.string.key_ns_effective_profile_switch_last_synced_id)
|
||||||
sp.remove(R.string.key_ns_offline_event_last_synced_id)
|
sp.remove(R.string.key_ns_offline_event_last_synced_id)
|
||||||
sp.remove(R.string.key_ns_profile_store_last_synced_timestamp)
|
sp.remove(R.string.key_ns_profile_store_last_synced_timestamp)
|
||||||
}
|
}
|
||||||
|
@ -555,6 +557,48 @@ class DataSyncSelectorImplementation @Inject constructor(
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun confirmLastEffectiveProfileSwitchIdIfGreater(lastSynced: Long) {
|
||||||
|
if (lastSynced > sp.getLong(R.string.key_ns_effective_profile_switch_last_synced_id, 0)) {
|
||||||
|
aapsLogger.debug(LTag.NSCLIENT, "Setting EffectiveProfileSwitch data sync from $lastSynced")
|
||||||
|
sp.putLong(R.string.key_ns_effective_profile_switch_last_synced_id, lastSynced)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun changedEffectiveProfileSwitch(): List<EffectiveProfileSwitch> {
|
||||||
|
val startId = sp.getLong(R.string.key_ns_effective_profile_switch_last_synced_id, 0)
|
||||||
|
return appRepository.getModifiedEffectiveProfileSwitchDataFromId(startId).blockingGet().also {
|
||||||
|
aapsLogger.debug(LTag.NSCLIENT, "Loading EffectiveProfileSwitch data for sync from $startId. Records ${it.size}")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Volatile private var lastEpsId = -1L
|
||||||
|
@Volatile private var lastEpsTime = -1L
|
||||||
|
override fun processChangedEffectiveProfileSwitchesCompat(): Boolean {
|
||||||
|
val lastDbIdWrapped = appRepository.getLastEffectiveProfileSwitchIdWrapped().blockingGet()
|
||||||
|
val lastDbId = if (lastDbIdWrapped is ValueWrapper.Existing) lastDbIdWrapped.value else 0L
|
||||||
|
var startId = sp.getLong(R.string.key_ns_effective_profile_switch_last_synced_id, 0)
|
||||||
|
if (startId > lastDbId) {
|
||||||
|
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()
|
||||||
|
appRepository.getNextSyncElementEffectiveProfileSwitch(startId).blockingGet()?.let { ps ->
|
||||||
|
aapsLogger.info(LTag.DATABASE, "Loading EffectiveProfileSwitch data Start: $startId ID: ${ps.first.id} HistoryID: ${ps.second} ")
|
||||||
|
when {
|
||||||
|
// 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")
|
||||||
|
// 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")
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
override fun confirmLastOfflineEventIdIfGreater(lastSynced: Long) {
|
override fun confirmLastOfflineEventIdIfGreater(lastSynced: Long) {
|
||||||
if (lastSynced > sp.getLong(R.string.key_ns_offline_event_last_synced_id, 0)) {
|
if (lastSynced > sp.getLong(R.string.key_ns_offline_event_last_synced_id, 0)) {
|
||||||
aapsLogger.debug(LTag.NSCLIENT, "Setting OfflineEvent data sync from $lastSynced")
|
aapsLogger.debug(LTag.NSCLIENT, "Setting OfflineEvent data sync from $lastSynced")
|
||||||
|
|
|
@ -228,6 +228,25 @@ class NSClientAddAckWorker(
|
||||||
dataSyncSelector.processChangedProfileSwitchesCompat()
|
dataSyncSelector.processChangedProfileSwitchesCompat()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
is PairEffectiveProfileSwitch -> {
|
||||||
|
val pair = ack.originalObject
|
||||||
|
pair.value.interfaceIDs.nightscoutId = ack.id
|
||||||
|
repository.runTransactionForResult(UpdateNsIdEffectiveProfileSwitchTransaction(pair.value))
|
||||||
|
.doOnError { error ->
|
||||||
|
aapsLogger.error(LTag.DATABASE, "Updated ns id of EffectiveProfileSwitch failed", error)
|
||||||
|
ret = Result.failure((workDataOf("Error" to error.toString())))
|
||||||
|
}
|
||||||
|
.doOnSuccess {
|
||||||
|
ret = Result.success(workDataOf("ProcessedData" to pair.toString()))
|
||||||
|
aapsLogger.debug(LTag.DATABASE, "Updated ns id of EffectiveProfileSwitch " + pair.value)
|
||||||
|
dataSyncSelector.confirmLastEffectiveProfileSwitchIdIfGreater(pair.updateRecordId)
|
||||||
|
}
|
||||||
|
.blockingGet()
|
||||||
|
rxBus.send(EventNSClientNewLog("DBADD", "Acked EffectiveProfileSwitch " + pair.value.interfaceIDs.nightscoutId))
|
||||||
|
// Send new if waiting
|
||||||
|
dataSyncSelector.processChangedEffectiveProfileSwitchesCompat()
|
||||||
|
}
|
||||||
|
|
||||||
is DeviceStatus -> {
|
is DeviceStatus -> {
|
||||||
val deviceStatus = ack.originalObject
|
val deviceStatus = ack.originalObject
|
||||||
deviceStatus.interfaceIDs.nightscoutId = ack.id
|
deviceStatus.interfaceIDs.nightscoutId = ack.id
|
||||||
|
|
|
@ -185,6 +185,32 @@ class NSClientAddUpdateWorker(
|
||||||
}
|
}
|
||||||
} ?: aapsLogger.error("Error parsing TT json $json")
|
} ?: aapsLogger.error("Error parsing TT json $json")
|
||||||
}
|
}
|
||||||
|
eventType == TherapyEvent.Type.NOTE.text && json.isEffectiveProfileSwitch() -> // replace this by new Type when available in NS
|
||||||
|
if (sp.getBoolean(R.string.key_ns_receive_profile_switch, false) && buildHelper.isEngineeringMode() || config.NSCLIENT) {
|
||||||
|
effectiveProfileSwitchFromJson(json, dateUtil, activePlugin)?.let { effectiveProfileSwitch ->
|
||||||
|
repository.runTransactionForResult(SyncNsEffectiveProfileSwitchTransaction(effectiveProfileSwitch, invalidateByNsOnly = false))
|
||||||
|
.doOnError {
|
||||||
|
aapsLogger.error(LTag.DATABASE, "Error while saving EffectiveProfileSwitch", it)
|
||||||
|
ret = Result.failure(workDataOf("Error" to it.toString()))
|
||||||
|
}
|
||||||
|
.blockingGet()
|
||||||
|
.also { result ->
|
||||||
|
result.inserted.forEach {
|
||||||
|
uel.log(Action.PROFILE_SWITCH, Sources.NSClient,
|
||||||
|
ValueWithUnit.Timestamp(it.timestamp))
|
||||||
|
aapsLogger.debug(LTag.DATABASE, "Inserted EffectiveProfileSwitch $it")
|
||||||
|
}
|
||||||
|
result.invalidated.forEach {
|
||||||
|
uel.log(Action.PROFILE_SWITCH_REMOVED, Sources.NSClient,
|
||||||
|
ValueWithUnit.Timestamp(it.timestamp))
|
||||||
|
aapsLogger.debug(LTag.DATABASE, "Invalidated EffectiveProfileSwitch $it")
|
||||||
|
}
|
||||||
|
result.updatedNsId.forEach {
|
||||||
|
aapsLogger.debug(LTag.DATABASE, "Updated nsId EffectiveProfileSwitch $it")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} ?: aapsLogger.error("Error parsing EffectiveProfileSwitch json $json")
|
||||||
|
}
|
||||||
eventType == TherapyEvent.Type.CANNULA_CHANGE.text ||
|
eventType == TherapyEvent.Type.CANNULA_CHANGE.text ||
|
||||||
eventType == TherapyEvent.Type.INSULIN_CHANGE.text ||
|
eventType == TherapyEvent.Type.INSULIN_CHANGE.text ||
|
||||||
eventType == TherapyEvent.Type.SENSOR_CHANGE.text ||
|
eventType == TherapyEvent.Type.SENSOR_CHANGE.text ||
|
||||||
|
|
|
@ -126,6 +126,15 @@ class NSClientUpdateRemoveAckWorker(
|
||||||
ret = Result.success(workDataOf("ProcessedData" to pair.toString()))
|
ret = Result.success(workDataOf("ProcessedData" to pair.toString()))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
is PairEffectiveProfileSwitch -> {
|
||||||
|
val pair = ack.originalObject
|
||||||
|
dataSyncSelector.confirmLastEffectiveProfileSwitchIdIfGreater(pair.updateRecordId)
|
||||||
|
rxBus.send(EventNSClientNewLog("DBUPDATE", "Acked EffectiveProfileSwitch " + ack._id))
|
||||||
|
// Send new if waiting
|
||||||
|
dataSyncSelector.processChangedEffectiveProfileSwitchesCompat()
|
||||||
|
ret = Result.success(workDataOf("ProcessedData" to pair.toString()))
|
||||||
|
}
|
||||||
|
|
||||||
is PairOfflineEvent -> {
|
is PairOfflineEvent -> {
|
||||||
val pair = ack.originalObject
|
val pair = ack.originalObject
|
||||||
dataSyncSelector.confirmLastOfflineEventIdIfGreater(pair.updateRecordId)
|
dataSyncSelector.confirmLastOfflineEventIdIfGreater(pair.updateRecordId)
|
||||||
|
|
|
@ -148,8 +148,9 @@ class LocalProfilePlugin @Inject constructor(
|
||||||
fun storeSettings(activity: FragmentActivity? = null) {
|
fun storeSettings(activity: FragmentActivity? = null) {
|
||||||
for (i in 0 until numOfProfiles) {
|
for (i in 0 until numOfProfiles) {
|
||||||
profiles[i].run {
|
profiles[i].run {
|
||||||
|
name?.let { name ->
|
||||||
val localProfileNumbered = Constants.LOCAL_PROFILE + "_" + i + "_"
|
val localProfileNumbered = Constants.LOCAL_PROFILE + "_" + i + "_"
|
||||||
sp.putString(localProfileNumbered + "name", name!!)
|
sp.putString(localProfileNumbered + "name", name)
|
||||||
sp.putBoolean(localProfileNumbered + "mgdl", mgdl)
|
sp.putBoolean(localProfileNumbered + "mgdl", mgdl)
|
||||||
sp.putDouble(localProfileNumbered + "dia", dia)
|
sp.putDouble(localProfileNumbered + "dia", dia)
|
||||||
sp.putString(localProfileNumbered + "ic", ic.toString())
|
sp.putString(localProfileNumbered + "ic", ic.toString())
|
||||||
|
@ -159,6 +160,7 @@ class LocalProfilePlugin @Inject constructor(
|
||||||
sp.putString(localProfileNumbered + "targethigh", targetHigh.toString())
|
sp.putString(localProfileNumbered + "targethigh", targetHigh.toString())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
sp.putInt(Constants.LOCAL_PROFILE + "_profiles", numOfProfiles)
|
sp.putInt(Constants.LOCAL_PROFILE + "_profiles", numOfProfiles)
|
||||||
|
|
||||||
sp.putLong(R.string.key_local_profile_last_change, dateUtil.now())
|
sp.putLong(R.string.key_local_profile_last_change, dateUtil.now())
|
||||||
|
|
|
@ -64,7 +64,8 @@ class CommandQueue @Inject constructor(
|
||||||
private val buildHelper: BuildHelper,
|
private val buildHelper: BuildHelper,
|
||||||
private val dateUtil: DateUtil,
|
private val dateUtil: DateUtil,
|
||||||
private val repository: AppRepository,
|
private val repository: AppRepository,
|
||||||
private val fabricPrivacy: FabricPrivacy
|
private val fabricPrivacy: FabricPrivacy,
|
||||||
|
private val config: Config
|
||||||
) : CommandQueueProvider {
|
) : CommandQueueProvider {
|
||||||
|
|
||||||
private val disposable = CompositeDisposable()
|
private val disposable = CompositeDisposable()
|
||||||
|
@ -79,6 +80,10 @@ class CommandQueue @Inject constructor(
|
||||||
.toObservable(EventProfileSwitchChanged::class.java)
|
.toObservable(EventProfileSwitchChanged::class.java)
|
||||||
.observeOn(aapsSchedulers.io)
|
.observeOn(aapsSchedulers.io)
|
||||||
.subscribe({
|
.subscribe({
|
||||||
|
if (config.NSCLIENT) { // Effective profileswitch should be synced over NS
|
||||||
|
rxBus.send(EventNewBasalProfile())
|
||||||
|
return@subscribe
|
||||||
|
}
|
||||||
aapsLogger.debug(LTag.PROFILE, "onProfileSwitch")
|
aapsLogger.debug(LTag.PROFILE, "onProfileSwitch")
|
||||||
profileFunction.getRequestedProfile()?.let {
|
profileFunction.getRequestedProfile()?.let {
|
||||||
val nonCustomized = ProfileSealed.PS(it).convertToNonCustomizedProfile(dateUtil)
|
val nonCustomized = ProfileSealed.PS(it).convertToNonCustomizedProfile(dateUtil)
|
||||||
|
@ -172,8 +177,7 @@ class CommandQueue @Inject constructor(
|
||||||
|
|
||||||
// After new command added to the queue
|
// After new command added to the queue
|
||||||
// start thread again if not already running
|
// start thread again if not already running
|
||||||
@Synchronized
|
@Synchronized fun notifyAboutNewCommand() {
|
||||||
open fun notifyAboutNewCommand() {
|
|
||||||
waitForFinishedThread()
|
waitForFinishedThread()
|
||||||
if (thread == null || thread!!.state == Thread.State.TERMINATED) {
|
if (thread == null || thread!!.state == Thread.State.TERMINATED) {
|
||||||
thread = QueueThread(this, context, aapsLogger, rxBus, activePlugin, resourceHelper, sp)
|
thread = QueueThread(this, context, aapsLogger, rxBus, activePlugin, resourceHelper, sp)
|
||||||
|
@ -195,7 +199,9 @@ class CommandQueue @Inject constructor(
|
||||||
|
|
||||||
override fun independentConnect(reason: String, callback: Callback?) {
|
override fun independentConnect(reason: String, callback: Callback?) {
|
||||||
aapsLogger.debug(LTag.PUMPQUEUE, "Starting new queue")
|
aapsLogger.debug(LTag.PUMPQUEUE, "Starting new queue")
|
||||||
val tempCommandQueue = CommandQueue(injector, aapsLogger, rxBus, aapsSchedulers, resourceHelper, constraintChecker, profileFunction, activePlugin, context, sp, buildHelper, dateUtil, repository, fabricPrivacy)
|
val tempCommandQueue = CommandQueue(injector, aapsLogger, rxBus, aapsSchedulers, resourceHelper,
|
||||||
|
constraintChecker, profileFunction, activePlugin, context, sp,
|
||||||
|
buildHelper, dateUtil, repository, fabricPrivacy, config)
|
||||||
tempCommandQueue.readStatus(reason, callback)
|
tempCommandQueue.readStatus(reason, callback)
|
||||||
tempCommandQueue.disposable.clear()
|
tempCommandQueue.disposable.clear()
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,7 +70,7 @@ class SetupWizardActivity : NoSplashAppCompatActivity() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override fun onPause() {
|
override fun onPause() {
|
||||||
super.onPause()
|
super.onPause()
|
||||||
disposable.clear()
|
disposable.clear()
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,15 +5,11 @@ import info.nightscout.androidaps.annotations.OpenForTesting
|
||||||
import info.nightscout.androidaps.interfaces.Config
|
import info.nightscout.androidaps.interfaces.Config
|
||||||
import info.nightscout.androidaps.plugins.general.maintenance.PrefFileListProvider
|
import info.nightscout.androidaps.plugins.general.maintenance.PrefFileListProvider
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import javax.inject.Inject
|
|
||||||
import javax.inject.Singleton
|
|
||||||
|
|
||||||
@OpenForTesting
|
class BuildHelperImpl constructor(
|
||||||
@Singleton
|
|
||||||
class BuildHelper @Inject constructor(
|
|
||||||
private val config: Config,
|
private val config: Config,
|
||||||
fileListProvider: PrefFileListProvider
|
fileListProvider: PrefFileListProvider
|
||||||
) {
|
) : BuildHelper {
|
||||||
|
|
||||||
private var devBranch = false
|
private var devBranch = false
|
||||||
private var engineeringMode = false
|
private var engineeringMode = false
|
||||||
|
@ -25,11 +21,10 @@ class BuildHelper @Inject constructor(
|
||||||
devBranch = BuildConfig.VERSION.contains("-") || BuildConfig.VERSION.matches(Regex(".*[a-zA-Z]+.*"))
|
devBranch = BuildConfig.VERSION.contains("-") || BuildConfig.VERSION.matches(Regex(".*[a-zA-Z]+.*"))
|
||||||
}
|
}
|
||||||
|
|
||||||
fun isEngineeringModeOrRelease(): Boolean =
|
override fun isEngineeringModeOrRelease(): Boolean =
|
||||||
if (!config.APS) true else engineeringMode || !devBranch
|
if (!config.APS) true else engineeringMode || !devBranch
|
||||||
|
|
||||||
fun isEngineeringMode(): Boolean =
|
override fun isEngineeringMode(): Boolean = engineeringMode
|
||||||
engineeringMode
|
|
||||||
|
|
||||||
fun isDev(): Boolean = devBranch
|
override fun isDev(): Boolean = devBranch
|
||||||
}
|
}
|
|
@ -868,6 +868,8 @@ Unerwartetes Verhalten.</string>
|
||||||
<string name="ns_receive_temp_target_summary">Temp. Ziele akzeptieren, die in NS oder NSClient eingegeben wurden</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>
|
<string name="ns_receive_profile_switch">Profilwechsel abrufen</string>
|
||||||
<string name="ns_receive_profile_switch_summary">Profilwechsel akzeptieren, die in NS oder NSClient eingegeben wurden</string>
|
<string name="ns_receive_profile_switch_summary">Profilwechsel akzeptieren, die in NS oder NSClient eingegeben wurden</string>
|
||||||
|
<string name="ns_receive_offline_event">APS Offline-Ereignisse empfangen</string>
|
||||||
|
<string name="ns_receive_offline_event_summary">APS Offline-Ereignisse akzeptieren, die über NS oder NSClient eingegeben wurden</string>
|
||||||
<string name="ns_receive_insulin">Insulin abrufen</string>
|
<string name="ns_receive_insulin">Insulin abrufen</string>
|
||||||
<string name="ns_receive_insulin_summary">Insulin akzeptieren, das in NS oder NSClient eingegeben wurden</string>
|
<string name="ns_receive_insulin_summary">Insulin akzeptieren, das in NS oder NSClient eingegeben wurden</string>
|
||||||
<string name="ns_receive_carbs">Kohlenhydrate abrufen</string>
|
<string name="ns_receive_carbs">Kohlenhydrate abrufen</string>
|
||||||
|
@ -878,4 +880,5 @@ Unerwartetes Verhalten.</string>
|
||||||
<string name="ns_receive_cgm_summary">CGM Daten von NS akzeptieren</string>
|
<string name="ns_receive_cgm_summary">CGM Daten von NS akzeptieren</string>
|
||||||
<string name="sms_timeout_while_wating">Zeitüberschreitung beim Warten auf das Ende der vorherigen Kommunikation mit der Pumpe</string>
|
<string name="sms_timeout_while_wating">Zeitüberschreitung beim Warten auf das Ende der vorherigen Kommunikation mit der Pumpe</string>
|
||||||
<string name="smscommunicator_another_bolus_in_queue">In der Warteschlange befindet sich ein weiterer Bolus. Bitte später erneut versuchen.</string>
|
<string name="smscommunicator_another_bolus_in_queue">In der Warteschlange befindet sich ein weiterer Bolus. Bitte später erneut versuchen.</string>
|
||||||
|
<string name="calculation_in_progress">Kalkulation wird gerade durchgeführt</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
<string name="exercise_setunchanged">השאירו את ערך מטרת הסוכר ללא שינוי.</string>
|
<string name="exercise_setunchanged">השאירו את ערך מטרת הסוכר ללא שינוי.</string>
|
||||||
<string name="exercise_15g">המתינו עד שהגלוקוז בדם יירד מתחת לערך המטרה של היפו ואז אכלו 15 גרם של פחמימות מהירות.</string>
|
<string name="exercise_15g">המתינו עד שהגלוקוז בדם יירד מתחת לערך המטרה של היפו ואז אכלו 15 גרם של פחמימות מהירות.</string>
|
||||||
<string name="exercise_hint1">https://androidaps.readthedocs.io/en/latest/EN/Usage/temptarget.html#activity-temp-target</string>
|
<string name="exercise_hint1">https://androidaps.readthedocs.io/en/latest/EN/Usage/temptarget.html#activity-temp-target</string>
|
||||||
<string name="suspendloop_label">השבתת / השהיית לולאה</string>
|
<string name="suspendloop_label">השבתת \\ השהיית לולאה</string>
|
||||||
<string name="suspendloop_doigetinsulin">האם אני מקבל\\ת אינסולין כאשר הלולאה מושבתת\\מושהית?</string>
|
<string name="suspendloop_doigetinsulin">האם אני מקבל\\ת אינסולין כאשר הלולאה מושבתת\\מושהית?</string>
|
||||||
<string name="suspendloop_yes">כן, אינסולין בזאלי ממשיך להינתן.</string>
|
<string name="suspendloop_yes">כן, אינסולין בזאלי ממשיך להינתן.</string>
|
||||||
<string name="suspendloop_no">לא, אספקת האינסולין נפסקת.</string>
|
<string name="suspendloop_no">לא, אספקת האינסולין נפסקת.</string>
|
||||||
|
@ -163,8 +163,8 @@
|
||||||
<string name="nsclient_hint1">https://androidaps.readthedocs.io/en/latest/EN/Children/Children.html</string>
|
<string name="nsclient_hint1">https://androidaps.readthedocs.io/en/latest/EN/Children/Children.html</string>
|
||||||
<string name="isf_label_exam">יחס התיקון (ISF)</string>
|
<string name="isf_label_exam">יחס התיקון (ISF)</string>
|
||||||
<string name="isf_increasingvalue">עלייה בערך יחס התיקון תביא למתן יותר אינסולין לכיסוי כמות נתונה של פחמימות.</string>
|
<string name="isf_increasingvalue">עלייה בערך יחס התיקון תביא למתן יותר אינסולין לכיסוי כמות נתונה של פחמימות.</string>
|
||||||
<string name="isf_decreasingvalue">הפחתת ערך יחס התיקון (ISF) מובילים למתן יותר אינסולין כדי לתקן רמת סוכר שמעל ערך המטרה.</string>
|
<string name="isf_decreasingvalue">הפחתת ערך יחס התיקון (ISF) מובילה למתן יותר אינסולין כדי לתקן רמת סוכר שמעל ערך המטרה.</string>
|
||||||
<string name="isf_noeffect">העלאת או הורדת יחס התיקון (ISF) אינו משפיע על מינון האינסולין כאשר רמות הגלוקוז בדם הן מתחת לערך המטרה.</string>
|
<string name="isf_noeffect">העלאת או הורדת יחס התיקון (ISF) אינה משפיעה על מינון האינסולין כאשר רמות הגלוקוז בדם הן מתחת לערך המטרה.</string>
|
||||||
<string name="isf_preferences">יש להזין את יחס התיקון בהעדפות ב-AndroidAPS.</string>
|
<string name="isf_preferences">יש להזין את יחס התיקון בהעדפות ב-AndroidAPS.</string>
|
||||||
<string name="isf_profile">שינוי ערך ISF בפרופיל שלכם מספיק כדי להחיל את השינוי.</string>
|
<string name="isf_profile">שינוי ערך ISF בפרופיל שלכם מספיק כדי להחיל את השינוי.</string>
|
||||||
<string name="isf_hint1">https://androidaps.readthedocs.io/en/latest/EN/Getting-Started/FAQ.html#insulin-sensitivity-factor-isf-mmol-l-u-or-mg-dl-u</string>
|
<string name="isf_hint1">https://androidaps.readthedocs.io/en/latest/EN/Getting-Started/FAQ.html#insulin-sensitivity-factor-isf-mmol-l-u-or-mg-dl-u</string>
|
||||||
|
@ -179,7 +179,7 @@
|
||||||
<string name="ic_meaning">יחס הפחמימות (IC) הוא: כמה יחידות לחם מכוסות ע\"י יחידת אינסולין אחת.</string>
|
<string name="ic_meaning">יחס הפחמימות (IC) הוא: כמה יחידות לחם מכוסות ע\"י יחידת אינסולין אחת.</string>
|
||||||
<string name="ic_hint1">https://androidaps.readthedocs.io/en/latest/EN/Getting-Started/FAQ.html#carbohydrate-to-insulin-ratio-cr-g-u</string>
|
<string name="ic_hint1">https://androidaps.readthedocs.io/en/latest/EN/Getting-Started/FAQ.html#carbohydrate-to-insulin-ratio-cr-g-u</string>
|
||||||
<string name="profileswitch_label">החלפת פרופילים</string>
|
<string name="profileswitch_label">החלפת פרופילים</string>
|
||||||
<string name="profileswitch_pctwillchange"> בעת החלפה לפרופיל 90%, מהם ההיגדים הנכונים?</string>
|
<string name="profileswitch_pctwillchange"> בעת החלפה לפרופיל 90%, מהם כל ההיגדים הנכונים?</string>
|
||||||
<string name="profileswitch_basallower">המינון הבזאלי יהיה נמוך ב-10%.</string>
|
<string name="profileswitch_basallower">המינון הבזאלי יהיה נמוך ב-10%.</string>
|
||||||
<string name="profileswitch_isfhigher">ערך פקטור התיקון (ISF) יהיה גבוה ב-10%.</string>
|
<string name="profileswitch_isfhigher">ערך פקטור התיקון (ISF) יהיה גבוה ב-10%.</string>
|
||||||
<string name="profileswitch_iclower">ערך יחס הפחמימות יהיה נמוך ב-10%.</string>
|
<string name="profileswitch_iclower">ערך יחס הפחמימות יהיה נמוך ב-10%.</string>
|
||||||
|
|
|
@ -113,7 +113,7 @@
|
||||||
<string name="apsmode_title">מצב APS</string>
|
<string name="apsmode_title">מצב APS</string>
|
||||||
<string name="closedloop">לולאה סגורה</string>
|
<string name="closedloop">לולאה סגורה</string>
|
||||||
<string name="openloop">לולאה פתוחה</string>
|
<string name="openloop">לולאה פתוחה</string>
|
||||||
<string name="lowglucosesuspend">השהיה בגלל ערך סוכר נמוך</string>
|
<string name="lowglucosesuspend">השהיה עקב ערך סוכר נמוך</string>
|
||||||
<string name="disabledloop">לולאה כבויה</string>
|
<string name="disabledloop">לולאה כבויה</string>
|
||||||
<string name="openloop_newsuggestion">הצעה חדשה זמינה</string>
|
<string name="openloop_newsuggestion">הצעה חדשה זמינה</string>
|
||||||
<string name="carbssuggestion">המלצת פחמימות</string>
|
<string name="carbssuggestion">המלצת פחמימות</string>
|
||||||
|
@ -241,7 +241,7 @@
|
||||||
<string name="units_colon">יחידות:</string>
|
<string name="units_colon">יחידות:</string>
|
||||||
<string name="units">יחידות</string>
|
<string name="units">יחידות</string>
|
||||||
<string name="dia">משך פעילות אינסולין</string>
|
<string name="dia">משך פעילות אינסולין</string>
|
||||||
<string name="prefs_range_title">טווח להדמיה</string>
|
<string name="prefs_range_title">טווח הצגה</string>
|
||||||
<string name="prefs_range_summary">סימוני גבוה ונמוך בתרשים סקירה כללית ובשעון חכם</string>
|
<string name="prefs_range_summary">סימוני גבוה ונמוך בתרשים סקירה כללית ובשעון חכם</string>
|
||||||
<string name="low_mark">סימון נמוך</string>
|
<string name="low_mark">סימון נמוך</string>
|
||||||
<string name="high_mark">סימון גבוה</string>
|
<string name="high_mark">סימון גבוה</string>
|
||||||
|
@ -329,7 +329,7 @@
|
||||||
<string name="resistantadult">מבוגר\\ת עם תנגודת אינסולין גבוהה</string>
|
<string name="resistantadult">מבוגר\\ת עם תנגודת אינסולין גבוהה</string>
|
||||||
<string name="pregnant">הריון</string>
|
<string name="pregnant">הריון</string>
|
||||||
<string name="patientage_summary">נא לבחור את גיל המטופל\\ת להתאמת מגבלות בטיחות</string>
|
<string name="patientage_summary">נא לבחור את גיל המטופל\\ת להתאמת מגבלות בטיחות</string>
|
||||||
<string name="patient_name">שם מטופל\\ת</string>
|
<string name="patient_name">שם המטופל\\ת</string>
|
||||||
<string name="patient_name_summary">נא לציין את שם המטופל\\ת או כינוי, להבחנה בין מספר הגדרות</string>
|
<string name="patient_name_summary">נא לציין את שם המטופל\\ת או כינוי, להבחנה בין מספר הגדרות</string>
|
||||||
<string name="patient_name_default" comment="This is default patient display name, when user does not provide real one">משתמש</string>
|
<string name="patient_name_default" comment="This is default patient display name, when user does not provide real one">משתמש</string>
|
||||||
<string name="Glimp">Glimp</string>
|
<string name="Glimp">Glimp</string>
|
||||||
|
@ -751,7 +751,7 @@
|
||||||
<string name="saveorresetchangesfirst">יש לשמור או לאפס תחילה את השינויים הנוכחיים</string>
|
<string name="saveorresetchangesfirst">יש לשמור או לאפס תחילה את השינויים הנוכחיים</string>
|
||||||
<string name="deletecurrentprofile">למחוק את הפרופיל הנוכחי?</string>
|
<string name="deletecurrentprofile">למחוק את הפרופיל הנוכחי?</string>
|
||||||
<string name="copytolocalprofile">ליצור פרופיל מקומי חדש מפרופיל זה?</string>
|
<string name="copytolocalprofile">ליצור פרופיל מקומי חדש מפרופיל זה?</string>
|
||||||
<string name="profilenamecontainsdot">שם הפרפיל מכיל נקודות.\nשם כזה אינו נתמך ע\"י Nightscout \n הפרופיל לא הועלה ל-Nightscout.</string>
|
<string name="profilenamecontainsdot">שם הפרופיל מכיל נקודות.\nשם כזה אינו נתמך ע\"י Nightscout \n הפרופיל לא הועלה ל-Nightscout.</string>
|
||||||
<string name="low_mark_comment">ערך נמוך יותר באזור הטווח (הצגה בלבד)</string>
|
<string name="low_mark_comment">ערך נמוך יותר באזור הטווח (הצגה בלבד)</string>
|
||||||
<string name="high_mark_comment">ערך גבוה יותר באזור הטווח (הצגה בלבד)</string>
|
<string name="high_mark_comment">ערך גבוה יותר באזור הטווח (הצגה בלבד)</string>
|
||||||
<string name="age">גיל:</string>
|
<string name="age">גיל:</string>
|
||||||
|
|
|
@ -132,6 +132,7 @@
|
||||||
<string name="wronginsulin_label">인슐린 주입/입력 오류</string>
|
<string name="wronginsulin_label">인슐린 주입/입력 오류</string>
|
||||||
<string name="wronginsulin_whattodo">만약 펌프 기록에서 보여지는 것보다 인슐린이 적게 주입되었을 때 어떻게 해야 할까요? (예를 들어, 주입 막힘, 캐뉼라 문제, 샤워 후 펌프 재부착을 잊어버렸을 때)</string>
|
<string name="wronginsulin_whattodo">만약 펌프 기록에서 보여지는 것보다 인슐린이 적게 주입되었을 때 어떻게 해야 할까요? (예를 들어, 주입 막힘, 캐뉼라 문제, 샤워 후 펌프 재부착을 잊어버렸을 때)</string>
|
||||||
<string name="wronginsulin_careportal">Nightscout 케어포탈에서 인슐린 데이터를 삭제하여 펌프 기록에서 이를 제거합니다.</string>
|
<string name="wronginsulin_careportal">Nightscout 케어포탈에서 인슐린 데이터를 삭제하여 펌프 기록에서 이를 제거합니다.</string>
|
||||||
|
<string name="wronginsulin_compare">AndroidAPS와 펌프 기록을 비교합니다.</string>
|
||||||
<string name="wronginsulin_prime">\"주입되지 않은\" 인슐린양을 계산하여 시린지/펜 또는 prime 기능을 사용하여 인슐린을 주입합니다.</string>
|
<string name="wronginsulin_prime">\"주입되지 않은\" 인슐린양을 계산하여 시린지/펜 또는 prime 기능을 사용하여 인슐린을 주입합니다.</string>
|
||||||
<string name="wronginsulin_donothing">특별한 조치를 취하지 않고, AndroidAPS가 결과적으로 높은 혈당 정도를 조정할 수 있도록 합니다.</string>
|
<string name="wronginsulin_donothing">특별한 조치를 취하지 않고, AndroidAPS가 결과적으로 높은 혈당 정도를 조정할 수 있도록 합니다.</string>
|
||||||
<string name="iob_label">활성 인슐린 (IOB)</string>
|
<string name="iob_label">활성 인슐린 (IOB)</string>
|
||||||
|
|
|
@ -140,6 +140,7 @@
|
||||||
<string name="filenotfound">파일을 찾을 수 없습니다</string>
|
<string name="filenotfound">파일을 찾을 수 없습니다</string>
|
||||||
<string name="nav_export">설정 저장하기</string>
|
<string name="nav_export">설정 저장하기</string>
|
||||||
<string name="nav_import">설정 불러오기</string>
|
<string name="nav_import">설정 불러오기</string>
|
||||||
|
<string name="openapsma_maxbasal_title">임시 Basal 최대량 [U/h]</string>
|
||||||
<string name="openapsma_maxbasal_summary">이 값은 OpenAPS에서 Max Basal(최대 Basal)로 설정되는 값입니다</string>
|
<string name="openapsma_maxbasal_summary">이 값은 OpenAPS에서 Max Basal(최대 Basal)로 설정되는 값입니다</string>
|
||||||
<string name="openapsma_maxiob_title">OpenAPS가 주입할수 있는 최대 Basal IOB [U]</string>
|
<string name="openapsma_maxiob_title">OpenAPS가 주입할수 있는 최대 Basal IOB [U]</string>
|
||||||
<string name="openapsma_maxiob_summary">이 값은 OpenAPS에서 Max IOB라고 부르는 값입니다\n기본값은 0으로 설정되어 있습니다. 몇일 혹은 몇주 정도 사용 후 적절한 값으로 변경할 수 있습니다.</string>
|
<string name="openapsma_maxiob_summary">이 값은 OpenAPS에서 Max IOB라고 부르는 값입니다\n기본값은 0으로 설정되어 있습니다. 몇일 혹은 몇주 정도 사용 후 적절한 값으로 변경할 수 있습니다.</string>
|
||||||
|
@ -147,6 +148,11 @@
|
||||||
<string name="password_preferences_decrypt_prompt">내보낸 preferences를 가져오기 위해서는 마스터 비밀번호가 필요합니다.</string>
|
<string name="password_preferences_decrypt_prompt">내보낸 preferences를 가져오기 위해서는 마스터 비밀번호가 필요합니다.</string>
|
||||||
<string name="preferences_export_canceled">내보내기 취소됩니다! 환경 설정을 내보내지 않았습니다!</string>
|
<string name="preferences_export_canceled">내보내기 취소됩니다! 환경 설정을 내보내지 않았습니다!</string>
|
||||||
<string name="preferences_import_canceled">가져오고 취소됩니다! 환경설정을 가져오지 않았습니다.</string>
|
<string name="preferences_import_canceled">가져오고 취소됩니다! 환경설정을 가져오지 않았습니다.</string>
|
||||||
|
<string name="preferences_import_impossible">기본 설정을 가져올 수 없습니다.</string>
|
||||||
|
<string name="goto_main_try_again">기본 화면으로 돌아가서 다시 시도하십시오.</string>
|
||||||
|
<string name="old_master_password">이전 마스터 비밀번호</string>
|
||||||
|
<string name="different_password_used">이 파일을 내보내고 다른 마스터 암호로 암호화했습니다. 파일의 암호를 해독하려면 이전 마스터 암호를 제공하십시오.</string>
|
||||||
|
<string name="master_password_will_be_replaced">가져오기에 성공하면 현재 마스터 암호가 이전 마스터 암호로 대체됩니다.</string>
|
||||||
<string name="check_preferences_before_import">가져오기 전에 환경설정을 확인하세요.</string>
|
<string name="check_preferences_before_import">가져오기 전에 환경설정을 확인하세요.</string>
|
||||||
<string name="check_preferences_cannot_import">환경 설정을 가져올 수가 없습니다.</string>
|
<string name="check_preferences_cannot_import">환경 설정을 가져올 수가 없습니다.</string>
|
||||||
<string name="check_preferences_dangerous_import">환경 설정을 가져오면 안됩니다.</string>
|
<string name="check_preferences_dangerous_import">환경 설정을 가져오면 안됩니다.</string>
|
||||||
|
@ -173,6 +179,9 @@
|
||||||
<string name="smscommunicator_remotebolusmindistance_summary">원격 Bolus를 주입한 후 얼마간의 시간이 흐른 후에야 다음 원격 Bolus주입이 가능합니다</string>
|
<string name="smscommunicator_remotebolusmindistance_summary">원격 Bolus를 주입한 후 얼마간의 시간이 흐른 후에야 다음 원격 Bolus주입이 가능합니다</string>
|
||||||
<string name="smscommunicator_remotebolusmindistance">원격 Bolus를 주입한 후 몇분이 지나야 다음 원격 Bolus 주입이 가능하게 합니까</string>
|
<string name="smscommunicator_remotebolusmindistance">원격 Bolus를 주입한 후 몇분이 지나야 다음 원격 Bolus 주입이 가능하게 합니까</string>
|
||||||
<string name="smscommunicator_remotebolusmindistance_caveat">안전을 위하여 이 설정을 수정하기 위해 최소 2개의 폰 번호를 추가해야합니다.</string>
|
<string name="smscommunicator_remotebolusmindistance_caveat">안전을 위하여 이 설정을 수정하기 위해 최소 2개의 폰 번호를 추가해야합니다.</string>
|
||||||
|
<string name="bolusrequested"> %1$.2f U이 주입됩니다.</string>
|
||||||
|
<string name="smscommunicator_bolusdelivered">Bolus %1$.2f U이 성공적으로 주입되었습니다.</string>
|
||||||
|
<string name="smscommunicator_mealbolusdelivered">식사 Bolus %1$.2f U 이 성공적으로 주입되었습니다. </string>
|
||||||
<string name="smscommunicator_mealbolusdelivered_tt">%2$d 분 동안 목표 %1$s</string>
|
<string name="smscommunicator_mealbolusdelivered_tt">%2$d 분 동안 목표 %1$s</string>
|
||||||
<string name="smscommunicator_tt_set">%2$d 분 동안 목표 %1$s 설정이 완료되었습니다</string>
|
<string name="smscommunicator_tt_set">%2$d 분 동안 목표 %1$s 설정이 완료되었습니다</string>
|
||||||
<string name="smscommunicator_tt_canceled">임시 목표 취소가 완료되었습니다</string>
|
<string name="smscommunicator_tt_canceled">임시 목표 취소가 완료되었습니다</string>
|
||||||
|
@ -180,14 +189,25 @@
|
||||||
<string name="smscommunicator_loophasbeendisabled">Loop가 중지되었습니다.</string>
|
<string name="smscommunicator_loophasbeendisabled">Loop가 중지되었습니다.</string>
|
||||||
<string name="smscommunicator_loophasbeenenabled">Loop가 실행되었습니다.</string>
|
<string name="smscommunicator_loophasbeenenabled">Loop가 실행되었습니다.</string>
|
||||||
<string name="smscommunicator_loopisenabled">Loop가 실행중입니다.</string>
|
<string name="smscommunicator_loopisenabled">Loop가 실행중입니다.</string>
|
||||||
|
<string name="smscommunicator_pumpconnectwithcode">코드 %1$s을(를) 사용하여 펌프에 연결하기</string>
|
||||||
|
<string name="smscommunicator_pumpconnectfail">펌프에 연결하지 못했습니다.</string>
|
||||||
|
<string name="smscommunicator_pumpdisconnectwithcode">%1$d분 동안 펌프 연결을 끊으려면 코드 %2$s를 입력하세요.</string>
|
||||||
|
<string name="smscommunicator_pumpdisconnected">펌프가 연결되지 않았습니다.</string>
|
||||||
|
<string name="smscommunicator_reconnect">펌프가 다시 연결되었습니다.</string>
|
||||||
<string name="smscommunicator_remotecommandnotallowed">원격 명령이 허가되지 않았습니다</string>
|
<string name="smscommunicator_remotecommandnotallowed">원격 명령이 허가되지 않았습니다</string>
|
||||||
<string name="smscommunicator_remotebolusnotallowed">원격 주입이 불가능합니다. 나중에 다시 시도해주세요.</string>
|
<string name="smscommunicator_remotebolusnotallowed">원격 주입이 불가능합니다. 나중에 다시 시도해주세요.</string>
|
||||||
|
<string name="smscommunicator_basalreplywithcode">%2$d분동안 basal %1$.2fU/h 주입하려면 %3$s을(를) 입력하세요.</string>
|
||||||
<string name="smscommunicator_profilereplywithcode">프로파일 %1$s %2$d%%로 변경하려면 %3$s 를 입력하고 답장하세요</string>
|
<string name="smscommunicator_profilereplywithcode">프로파일 %1$s %2$d%%로 변경하려면 %3$s 를 입력하고 답장하세요</string>
|
||||||
|
<string name="smscommunicator_extendedreplywithcode">%2$d분동안 확장bolus %1$.2fU 주입하려면 %3$s을(를) 입력하세요.</string>
|
||||||
<string name="smscommunicator_carbsreplywithcode">%2$s에 %1$dg을 입력하려면 %3$s를 입력하고 답장하세요</string>
|
<string name="smscommunicator_carbsreplywithcode">%2$s에 %1$dg을 입력하려면 %3$s를 입력하고 답장하세요</string>
|
||||||
<string name="smscommunicator_basalpctreplywithcode">%2$d 분 동안 Basal %1$d%% 주입하려면 %3$s을 입력하고 답장하세요</string>
|
<string name="smscommunicator_basalpctreplywithcode">%2$d 분 동안 Basal %1$d%% 주입하려면 %3$s을 입력하고 답장하세요</string>
|
||||||
<string name="smscommunicator_suspendreplywithcode">%1$d분동안 Loop 일시중지하려면 %2$s 를 입력하고 답장하세요</string>
|
<string name="smscommunicator_suspendreplywithcode">%1$d분동안 Loop 일시중지하려면 %2$s 를 입력하고 답장하세요</string>
|
||||||
|
<string name="smscommunicator_loopresumereplywithcode">코드 %1$s을(를) 사용하여 loop의 작동 다시 시작하기</string>
|
||||||
|
<string name="smscommunicator_loopenablereplywithcode">코드 %1$s을(를) 사용하여 loop의 작동 활성화하기</string>
|
||||||
|
<string name="smscommunicator_loopdisablereplywithcode">코드 %1$s을(를) 사용하여 loop의 작동 비활성화하기</string>
|
||||||
<string name="smscommunicator_tempbasalset">Temp Basal %1$.2fU/h for %2$d min started successfully</string>
|
<string name="smscommunicator_tempbasalset">Temp Basal %1$.2fU/h for %2$d min started successfully</string>
|
||||||
<string name="smscommunicator_extendedset">Extended bolus %1$.2fU for %2$d min started successfully</string>
|
<string name="smscommunicator_extendedset">Extended bolus %1$.2fU for %2$d min started successfully</string>
|
||||||
|
<string name="smscommunicator_carbsset">탄수화물 %1$dg 입력이 완료되었습니다.</string>
|
||||||
<string name="smscommunicator_carbsfailed">탄수화물 %1$dg 입력이 실패하였습니다</string>
|
<string name="smscommunicator_carbsfailed">탄수화물 %1$dg 입력이 실패하였습니다</string>
|
||||||
<string name="smscommunicator_tempbasalset_percent">Temp basal %1$d%% for %2$d min started successfully</string>
|
<string name="smscommunicator_tempbasalset_percent">Temp basal %1$d%% for %2$d min started successfully</string>
|
||||||
<string name="smscommunicator_tempbasalfailed">Temp Basal start failed</string>
|
<string name="smscommunicator_tempbasalfailed">Temp Basal start failed</string>
|
||||||
|
@ -209,9 +229,12 @@
|
||||||
<string name="mealbolus">Meal</string>
|
<string name="mealbolus">Meal</string>
|
||||||
<string name="correctionbous">교정주입</string>
|
<string name="correctionbous">교정주입</string>
|
||||||
<string name="actions">실행</string>
|
<string name="actions">실행</string>
|
||||||
|
<string name="ns_upload_only">(비활성화 시 위험함) NS에 업로드만 하기</string>
|
||||||
|
<string name="ns_upload_only_summary">NS에 업로드만 하기 (sync를 비활성화 함). xDrip+와 같은 로컬 출처를 선택한 경우 외에는 SGV에 영향을 주지 않음. NS 프로파일을 사용하는 동안 프로파일에 영향을 주지 않음.\n!!! 경고!!! 이 기능을 비활성화하면 일부 구성요소 (AAPS, NS, xDrip+) 가 잘못 설정되어 있을 때 잘못 작동하거나 인슐린의 과다주입을 야기할 수 있음. AAPS에서 보여지는 정보와 펌프 상태가 일치하는지 유의해서 관찰해야 함!</string>
|
||||||
<string name="pumpNotInitialized">펌프가 초기화 되지 않았습니다!</string>
|
<string name="pumpNotInitialized">펌프가 초기화 되지 않았습니다!</string>
|
||||||
<string name="primefill">교체/채움</string>
|
<string name="primefill">교체/채움</string>
|
||||||
<string name="fillwarning">양이 인퓨전세트의 사양과 일치하는지 확인하세요!</string>
|
<string name="fillwarning">양이 인퓨전세트의 사양과 일치하는지 확인하세요!</string>
|
||||||
|
<string name="fillbolus_title">교체/채움 기본 인슐린 양</string>
|
||||||
<string name="button1">버튼1</string>
|
<string name="button1">버튼1</string>
|
||||||
<string name="button2">버튼2</string>
|
<string name="button2">버튼2</string>
|
||||||
<string name="button3">버튼3</string>
|
<string name="button3">버튼3</string>
|
||||||
|
@ -240,6 +263,7 @@
|
||||||
<string name="openapsma_autosensdata_label">Autosens 정보</string>
|
<string name="openapsma_autosensdata_label">Autosens 정보</string>
|
||||||
<string name="openapsma_scriptdebugdata_label">스크립트 디버그</string>
|
<string name="openapsma_scriptdebugdata_label">스크립트 디버그</string>
|
||||||
<string name="openapsama_useautosens">Autosens 기능 사용</string>
|
<string name="openapsama_useautosens">Autosens 기능 사용</string>
|
||||||
|
<string name="refresheventsfromnightscout">NS로부터 최신 정보로 업데이트 함.</string>
|
||||||
<string name="deletefuturetreatments">미래시점의 관리 삭제</string>
|
<string name="deletefuturetreatments">미래시점의 관리 삭제</string>
|
||||||
<string name="actions_shortname">ACT</string>
|
<string name="actions_shortname">ACT</string>
|
||||||
<string name="configbuilder_shortname">CONF</string>
|
<string name="configbuilder_shortname">CONF</string>
|
||||||
|
@ -254,11 +278,13 @@
|
||||||
<string name="smscommunicator_shortname">SMS</string>
|
<string name="smscommunicator_shortname">SMS</string>
|
||||||
<string name="short_tabtitles">탭 이름 단축</string>
|
<string name="short_tabtitles">탭 이름 단축</string>
|
||||||
<string name="always_use_shortavg">단순증분값 대신 단기평균증분값을 항상 사용합니다.</string>
|
<string name="always_use_shortavg">단순증분값 대신 단기평균증분값을 항상 사용합니다.</string>
|
||||||
|
<string name="always_use_shortavg_summary">xDrip+처럼 필터링되지 않은 혈당 출처에서 받은 데이터의 노이즈가 심할 경우 유용함.</string>
|
||||||
<string name="profile">프로파일</string>
|
<string name="profile">프로파일</string>
|
||||||
<string name="openapsama_max_daily_safety_multiplier_summary">기본값: 3\n이 값은 중요한 OpenAPS 안전장치입니다. 이 값의 역할은 펌프에 설정되어 있는 최대Basal보다 3배를 초과할 수 없게 제한하는 것입니다. 이 값을 변경할 필요는 없을 것이지만, 안전을 위해 \"3x max daily; 4x current\"이 의미하는 바를 알고 있어야 합니다.</string>
|
<string name="openapsama_max_daily_safety_multiplier_summary">기본값: 3\n이 값은 중요한 OpenAPS 안전장치입니다. 이 값의 역할은 펌프에 설정되어 있는 최대Basal보다 3배를 초과할 수 없게 제한하는 것입니다. 이 값을 변경할 필요는 없을 것이지만, 안전을 위해 \"3x max daily; 4x current\"이 의미하는 바를 알고 있어야 합니다.</string>
|
||||||
<string name="openapsama_current_basal_safety_multiplier_summary">기본값: 4\n이 값은 \"3x max daily; 4x current\"의 나머지 절반에 해당하는 또 다른 중요한 OpenAPS 안전장치입니다. 이것은, 펌프에 설정된 최대 Basal과는 관계없이, Basal이 설정된 현재시간의 Basal에 이 값을 곱한 양을 초과할 수 없다는 것을 의미합니다. 이는 알고리즘의 작동 방식을 이해하기 전에 과도하게 높은 최대 기본을 설정하여 위험한 상황에 빠지지 않도록 보호하기 위한 것입니다. 다시한번, 기본 값은 4배인 것을 알아두세요; 일반적으로 이것을 조정할 필요는 전혀 없으며, 대신 이 안전장치를 변경해야할것처럼 생각이 된다면, 다른 설정을 변경해야 할 가능성이 더 큽니다.</string>
|
<string name="openapsama_current_basal_safety_multiplier_summary">기본값: 4\n이 값은 \"3x max daily; 4x current\"의 나머지 절반에 해당하는 또 다른 중요한 OpenAPS 안전장치입니다. 이것은, 펌프에 설정된 최대 Basal과는 관계없이, Basal이 설정된 현재시간의 Basal에 이 값을 곱한 양을 초과할 수 없다는 것을 의미합니다. 이는 알고리즘의 작동 방식을 이해하기 전에 과도하게 높은 최대 기본을 설정하여 위험한 상황에 빠지지 않도록 보호하기 위한 것입니다. 다시한번, 기본 값은 4배인 것을 알아두세요; 일반적으로 이것을 조정할 필요는 전혀 없으며, 대신 이 안전장치를 변경해야할것처럼 생각이 된다면, 다른 설정을 변경해야 할 가능성이 더 큽니다.</string>
|
||||||
<string name="openapsama_autosens_max_summary">기본값: 1.2\n이 옵션은 autosens의 최대 한계 값을 20%%로 제한하기 위해 autosens(곧 autotune)이 이용하는 승수값입니다. 이 값이 autosens에 대한 Basal의 최대 값, 인슐린 민감도(ISF)의 최소값 및 혈당 목표의 최소값을 결정케 합니다.</string>
|
<string name="openapsama_autosens_max_summary">기본값: 1.2\n이 옵션은 autosens의 최대 한계 값을 20%%로 제한하기 위해 autosens(곧 autotune)이 이용하는 승수값입니다. 이 값이 autosens에 대한 Basal의 최대 값, 인슐린 민감도(ISF)의 최소값 및 혈당 목표의 최소값을 결정케 합니다.</string>
|
||||||
<string name="openapsama_autosens_min_summary">기본값: 0.7\nautosens 안전 제한의 나머지 부분입니다. 이는 Basal을 얼마나 낮게 조절할 수 있는지, ISF와 혈당 목표범위를 얼마나 높게 설정할 수 있는지를 결정합니다.</string>
|
<string name="openapsama_autosens_min_summary">기본값: 0.7\nautosens 안전 제한의 나머지 부분입니다. 이는 Basal을 얼마나 낮게 조절할 수 있는지, ISF와 혈당 목표범위를 얼마나 높게 설정할 수 있는지를 결정합니다.</string>
|
||||||
|
<string name="openapsama_autosens_adjusttargets">Autosens가 목표값도 조절합니다.</string>
|
||||||
<string name="openapsama_autosens_adjusttargets_summary">기본값: 활성\n이것은 autosens가 ISF와 Basal뿐만 아니라, 혈당 목표범위를 조절할 수 있게 합니다.</string>
|
<string name="openapsama_autosens_adjusttargets_summary">기본값: 활성\n이것은 autosens가 ISF와 Basal뿐만 아니라, 혈당 목표범위를 조절할 수 있게 합니다.</string>
|
||||||
<string name="openapsama_bolussnooze_dia_divisor_summary">기본값: 2\n식사주입 후 Bolus snooze가 수행되게 되고, 따라서 식사주입 직후엔 loop가 low temp에 대응하지 않게 됩니다. 기본값이 2일때 예제는 다음과 같습니다; DIA가 3시간일 경우 bolus snooz는 점차적으로 1.5시간에 걸쳐 단계적으로 사라지게 됩니다.(3DIA/2).</string>
|
<string name="openapsama_bolussnooze_dia_divisor_summary">기본값: 2\n식사주입 후 Bolus snooze가 수행되게 되고, 따라서 식사주입 직후엔 loop가 low temp에 대응하지 않게 됩니다. 기본값이 2일때 예제는 다음과 같습니다; DIA가 3시간일 경우 bolus snooz는 점차적으로 1.5시간에 걸쳐 단계적으로 사라지게 됩니다.(3DIA/2).</string>
|
||||||
<string name="openapsama_min_5m_carbimpact_summary">기본값: 3.0 (AMA) 또는 8.0 (SMB). 5분당 탄수화물이 얼만큼 흡수되었는지에 대한 기본값 설정입니다. 기본값은 3mg/dl / 5분 입니다. 이는 혈당이 예상보다 빨리 떨어지거나 혹은 예상보다 오르지 않을때, COB가 얼마나 빨리 사라지게 되는지에 영향을 주게 되고, 추정된 탄수화물 흡수량이 미래 혈당 예측 계산시에도 영향을 주게 됩니다.</string>
|
<string name="openapsama_min_5m_carbimpact_summary">기본값: 3.0 (AMA) 또는 8.0 (SMB). 5분당 탄수화물이 얼만큼 흡수되었는지에 대한 기본값 설정입니다. 기본값은 3mg/dl / 5분 입니다. 이는 혈당이 예상보다 빨리 떨어지거나 혹은 예상보다 오르지 않을때, COB가 얼마나 빨리 사라지게 되는지에 영향을 주게 되고, 추정된 탄수화물 흡수량이 미래 혈당 예측 계산시에도 영향을 주게 됩니다.</string>
|
||||||
|
@ -268,6 +294,7 @@
|
||||||
<string name="xdripnotinstalled">xDrip+가 설치되지 않았습니다</string>
|
<string name="xdripnotinstalled">xDrip+가 설치되지 않았습니다</string>
|
||||||
<string name="calibrationsent">보정이 xDrip으로 전송되었습니다+</string>
|
<string name="calibrationsent">보정이 xDrip으로 전송되었습니다+</string>
|
||||||
<string name="smscommunicator_calibrationsent">보정 전송됨. xDrip에서 수신이 되도록 설정되어 있어야 합니다+.</string>
|
<string name="smscommunicator_calibrationsent">보정 전송됨. xDrip에서 수신이 되도록 설정되어 있어야 합니다+.</string>
|
||||||
|
<string name="smscommunicator_calibrationfailed">xDrip+에서 보정값을 받지 못합니다.</string>
|
||||||
<string name="pumpsuspended">펌프 일시중지됨</string>
|
<string name="pumpsuspended">펌프 일시중지됨</string>
|
||||||
<string name="executing">실행중</string>
|
<string name="executing">실행중</string>
|
||||||
<string name="virtualpump_settings">가상펌프 설정</string>
|
<string name="virtualpump_settings">가상펌프 설정</string>
|
||||||
|
@ -295,10 +322,16 @@
|
||||||
<string name="wear_detailedIOB_summary">워치페이스에 IOB를 Bolus IOB와 Basal IOB로 나누어서 보여줍니다.</string>
|
<string name="wear_detailedIOB_summary">워치페이스에 IOB를 Bolus IOB와 Basal IOB로 나누어서 보여줍니다.</string>
|
||||||
<string name="nosuccess">성공하지 못했습니다. 폰을 확인하세요</string>
|
<string name="nosuccess">성공하지 못했습니다. 폰을 확인하세요</string>
|
||||||
<string name="notavailable">사용불가</string>
|
<string name="notavailable">사용불가</string>
|
||||||
|
<string name="patientage">환자 유형</string>
|
||||||
<string name="child">어린이</string>
|
<string name="child">어린이</string>
|
||||||
<string name="teenage">청소년</string>
|
<string name="teenage">청소년</string>
|
||||||
<string name="adult">성인</string>
|
<string name="adult">성인</string>
|
||||||
<string name="resistantadult">인슐린 저항성 높은 성인</string>
|
<string name="resistantadult">인슐린 저항성 높은 성인</string>
|
||||||
|
<string name="pregnant">임신 중</string>
|
||||||
|
<string name="patientage_summary">안전 제한 설정을 위해 환자 유형을 선택하십시오.</string>
|
||||||
|
<string name="patient_name">환자 이름</string>
|
||||||
|
<string name="patient_name_summary">다양한 설정들을 구별하기 위하여 환자 이름 또는 별명을 입력합니다.</string>
|
||||||
|
<string name="patient_name_default" comment="This is default patient display name, when user does not provide real one">사용자</string>
|
||||||
<string name="Glimp">Glimp</string>
|
<string name="Glimp">Glimp</string>
|
||||||
<string name="needwhitelisting">최적의 성능을 위해 %1$s에서 배터리 최적화를 해제해야합니다.</string>
|
<string name="needwhitelisting">최적의 성능을 위해 %1$s에서 배터리 최적화를 해제해야합니다.</string>
|
||||||
<string name="loopsuspended">Loop 일시중지</string>
|
<string name="loopsuspended">Loop 일시중지</string>
|
||||||
|
@ -313,6 +346,8 @@
|
||||||
<string name="disconnectpumpfor1h">1시간동안 펌프 일시중지</string>
|
<string name="disconnectpumpfor1h">1시간동안 펌프 일시중지</string>
|
||||||
<string name="disconnectpumpfor2h">2시간동안 펌프 일시중지</string>
|
<string name="disconnectpumpfor2h">2시간동안 펌프 일시중지</string>
|
||||||
<string name="disconnectpumpfor3h">3시간동안 펌프 일시중지</string>
|
<string name="disconnectpumpfor3h">3시간동안 펌프 일시중지</string>
|
||||||
|
<string name="duration15m">15분</string>
|
||||||
|
<string name="duration30m">30분</string>
|
||||||
<string name="duration1h">1시간</string>
|
<string name="duration1h">1시간</string>
|
||||||
<string name="duration2h">2시간</string>
|
<string name="duration2h">2시간</string>
|
||||||
<string name="duration3h">3시간</string>
|
<string name="duration3h">3시간</string>
|
||||||
|
@ -334,13 +369,32 @@
|
||||||
<string name="enablesuperbolus">마법사에서 Superbolus 활성화하기</string>
|
<string name="enablesuperbolus">마법사에서 Superbolus 활성화하기</string>
|
||||||
<string name="enablesuperbolus_summary">마법사에서 Superbolus 기능을 활성화합니다. 어떤 기능인지 확실히 알기전까지 활성화 하지 마세요. 제대로 알지 못하고 사용하면 일슐린이 과다 주입될 수 있습니다!</string>
|
<string name="enablesuperbolus_summary">마법사에서 Superbolus 기능을 활성화합니다. 어떤 기능인지 확실히 알기전까지 활성화 하지 마세요. 제대로 알지 못하고 사용하면 일슐린이 과다 주입될 수 있습니다!</string>
|
||||||
<string name="show_statuslights">홈화면에 상태 표시등 보여주기</string>
|
<string name="show_statuslights">홈화면에 상태 표시등 보여주기</string>
|
||||||
|
<string name="statuslights_cage_warning">캐뉼라 사용 기간 경고 기준 [h]</string>
|
||||||
|
<string name="statuslights_cage_critical">캐뉼라 사용 기간 위험 기준 [h]</string>
|
||||||
|
<string name="statuslights_iage_warning">인슐린 사용 기간 경고 기준 [h]</string>
|
||||||
|
<string name="statuslights_iage_critical">인슐린 사용 기간 위험 기준 [h]</string>
|
||||||
|
<string name="statuslights_sage_warning">센서 사용 기간 경고 기준 [h]</string>
|
||||||
|
<string name="statuslights_sage_critical">센서 사용 기간 위험 기준 [h]</string>
|
||||||
|
<string name="statuslights_sbat_warning">배터리 잔량 경고 기준 [%]</string>
|
||||||
|
<string name="statuslights_sbat_critical">배터리 잔량 위험 기준 [%]</string>
|
||||||
|
<string name="statuslights_bage_warning">펌프 배터리 사용 기간 경고 기준 [h]</string>
|
||||||
|
<string name="statuslights_bage_critical">펌프 배터리 사용 기간 위험 기준 [h]</string>
|
||||||
<string name="statuslights_res_warning">주사기량 경고 기준값[U]</string>
|
<string name="statuslights_res_warning">주사기량 경고 기준값[U]</string>
|
||||||
<string name="statuslights_res_critical">주사기량 위험 기준값[U]</string>
|
<string name="statuslights_res_critical">주사기량 위험 기준값[U]</string>
|
||||||
|
<string name="statuslights_bat_warning">펌프 배터리 잔량 경고 기준 [%]</string>
|
||||||
|
<string name="statuslights_bat_critical">펌프 배터리 잔량 위험 기준 [%]</string>
|
||||||
|
<string name="prediction_shortname">PRED</string>
|
||||||
<string name="basal_shortname">BAS</string>
|
<string name="basal_shortname">BAS</string>
|
||||||
|
<string name="deviation_shortname">DEV</string>
|
||||||
<string name="activity_shortname">ACT</string>
|
<string name="activity_shortname">ACT</string>
|
||||||
|
<string name="bgi_shortname">-BGI</string>
|
||||||
|
<string name="abs_insulin_shortname">ABS</string>
|
||||||
|
<string name="devslope_shortname">DEVSLOPE</string>
|
||||||
<string name="nav_about">버전정보</string>
|
<string name="nav_about">버전정보</string>
|
||||||
<string name="smscommunicator_missingsmspermission">SMS 권한 누락</string>
|
<string name="smscommunicator_missingsmspermission">SMS 권한 누락</string>
|
||||||
<string name="smscommunicator_missingphonestatepermission">전화 상태 권한이 허가되지 않았습니다</string>
|
<string name="smscommunicator_missingphonestatepermission">전화 상태 권한이 허가되지 않았습니다</string>
|
||||||
|
<string name="xdripstatus_settings">xDrip+ 상태 (워치)</string>
|
||||||
|
<string name="xdripstatus">xDrip+ 상태표시라인 (워치)</string>
|
||||||
<string name="xdripstatus_shortname">xds</string>
|
<string name="xdripstatus_shortname">xds</string>
|
||||||
<string name="wear_showbgi_title">BGI 보기</string>
|
<string name="wear_showbgi_title">BGI 보기</string>
|
||||||
<string name="wear_showbgi_summary">BGI를 상태라인에 추가하기</string>
|
<string name="wear_showbgi_summary">BGI를 상태라인에 추가하기</string>
|
||||||
|
@ -348,8 +402,12 @@
|
||||||
<string name="doprofileswitch">프로파일 변경 실행</string>
|
<string name="doprofileswitch">프로파일 변경 실행</string>
|
||||||
<string name="careportal_sensor_label">센서</string>
|
<string name="careportal_sensor_label">센서</string>
|
||||||
<string name="careportal_insulin_label">인슐린</string>
|
<string name="careportal_insulin_label">인슐린</string>
|
||||||
|
<string name="careportal_pb_label">펌프 배터리</string>
|
||||||
<string name="careportal_age_label">나이:</string>
|
<string name="careportal_age_label">나이:</string>
|
||||||
|
<string name="careportal_level_label">레벨:</string>
|
||||||
<string name="ns_alarmoptions">알람 옵션</string>
|
<string name="ns_alarmoptions">알람 옵션</string>
|
||||||
|
<string name="ns_alarms">NS 알람에서 알림 만들기</string>
|
||||||
|
<string name="ns_announcements">NS 안내에서 알림 만들기</string>
|
||||||
<string name="nsalarm_staledatavalue_label">누락 데이터 기준값 [min]</string>
|
<string name="nsalarm_staledatavalue_label">누락 데이터 기준값 [min]</string>
|
||||||
<string name="nsalarm_urgent_staledatavalue_label">위험 누락 데이터 기준값 [min]</string>
|
<string name="nsalarm_urgent_staledatavalue_label">위험 누락 데이터 기준값 [min]</string>
|
||||||
<string name="openapsama_autosens_period">autosens 시간 [h]</string>
|
<string name="openapsama_autosens_period">autosens 시간 [h]</string>
|
||||||
|
@ -375,6 +433,7 @@
|
||||||
<string name="mdtp_cancel">취소</string>
|
<string name="mdtp_cancel">취소</string>
|
||||||
<string name="notloadedplugins">모든 프로파일이 로드되지 않았습니다.</string>
|
<string name="notloadedplugins">모든 프로파일이 로드되지 않았습니다.</string>
|
||||||
<string name="valuesnotstored">값이 저장되지 않았습니다!</string>
|
<string name="valuesnotstored">값이 저장되지 않았습니다!</string>
|
||||||
|
<string name="ns_localbroadcasts">다른 앱 (예: xDrip)으로 데이터 전송을 활성화합니다. AAPS 또는 NSClient를 두 개 이상 설치 한 경우 활성화하지 마세요!</string>
|
||||||
<string name="ns_localbroadcasts_title">Local Broadcasts 활성화하기</string>
|
<string name="ns_localbroadcasts_title">Local Broadcasts 활성화하기</string>
|
||||||
<string name="openapssmb">OpenAPS SMB</string>
|
<string name="openapssmb">OpenAPS SMB</string>
|
||||||
<string name="enableuam">UAM 활성화하기</string>
|
<string name="enableuam">UAM 활성화하기</string>
|
||||||
|
@ -386,6 +445,7 @@
|
||||||
<string name="free_peak_oref">사용자지정-피크 Oref</string>
|
<string name="free_peak_oref">사용자지정-피크 Oref</string>
|
||||||
<string name="rapid_acting_oref">초속효성 Oref</string>
|
<string name="rapid_acting_oref">초속효성 Oref</string>
|
||||||
<string name="ultrarapid_oref">초-초속효성 Oref</string>
|
<string name="ultrarapid_oref">초-초속효성 Oref</string>
|
||||||
|
<string name="lyumjev">Lyumjev</string>
|
||||||
<string name="dia_too_short">DIA %1$f는 너무 짧습니다. 대신 %2$f을 사용하세요!</string>
|
<string name="dia_too_short">DIA %1$f는 너무 짧습니다. 대신 %2$f을 사용하세요!</string>
|
||||||
<string name="activate_profile">프로파일 활성화하기</string>
|
<string name="activate_profile">프로파일 활성화하기</string>
|
||||||
<string name="invalid">유효하지 않음</string>
|
<string name="invalid">유효하지 않음</string>
|
||||||
|
@ -398,6 +458,7 @@
|
||||||
<string name="activity_target">활동 목표</string>
|
<string name="activity_target">활동 목표</string>
|
||||||
<string name="hypo_duration">저혈당 기간</string>
|
<string name="hypo_duration">저혈당 기간</string>
|
||||||
<string name="hypo_target">저혈당 목표</string>
|
<string name="hypo_target">저혈당 목표</string>
|
||||||
|
<string name="reuse_profile_pct_hours">%1$d%%를 %2$dh 동안 재사용하기</string>
|
||||||
<string name="wearcontrol_title">워치로 제어하기</string>
|
<string name="wearcontrol_title">워치로 제어하기</string>
|
||||||
<string name="wearcontrol_summary">임시목표와 관리입력을 워치로 설정합니다.</string>
|
<string name="wearcontrol_summary">임시목표와 관리입력을 워치로 설정합니다.</string>
|
||||||
<string name="food">음식</string>
|
<string name="food">음식</string>
|
||||||
|
@ -411,10 +472,12 @@
|
||||||
<string name="executingrightnow">명령을 지금 실행합니다.</string>
|
<string name="executingrightnow">명령을 지금 실행합니다.</string>
|
||||||
<string name="missed_bg_readings">혈당 읽기가 누락되었습니다.</string>
|
<string name="missed_bg_readings">혈당 읽기가 누락되었습니다.</string>
|
||||||
<string name="raise_notifications_as_android_notifications">경고와 알림시 시스템 알림 사용하기</string>
|
<string name="raise_notifications_as_android_notifications">경고와 알림시 시스템 알림 사용하기</string>
|
||||||
|
<string name="gradually_increase_notification_volume">알람과 알림의 소리를 점차적으로 증가시킴</string>
|
||||||
<string name="localalertsettings_title">자체 경고 기능</string>
|
<string name="localalertsettings_title">자체 경고 기능</string>
|
||||||
<string name="enable_missed_bg_readings_alert">혈당 데이터 누락시 경고하기</string>
|
<string name="enable_missed_bg_readings_alert">혈당 데이터 누락시 경고하기</string>
|
||||||
<string name="enable_pump_unreachable_alert">펌프와 연결불가시 경고하기</string>
|
<string name="enable_pump_unreachable_alert">펌프와 연결불가시 경고하기</string>
|
||||||
<string name="pump_unreachable_threshold">펌프 연결불가 기준시간 [min]</string>
|
<string name="pump_unreachable_threshold">펌프 연결불가 기준시간 [min]</string>
|
||||||
|
<string name="enable_carbs_req_alert">탄수화물이 요구되는 경우 경고함</string>
|
||||||
<string name="urgent_alarm">긴급 알람</string>
|
<string name="urgent_alarm">긴급 알람</string>
|
||||||
<string name="info">정보</string>
|
<string name="info">정보</string>
|
||||||
<string name="eversense">Eversense 앱(패치버전)</string>
|
<string name="eversense">Eversense 앱(패치버전)</string>
|
||||||
|
@ -422,7 +485,12 @@
|
||||||
<string name="bgsource_upload">혈당 업로드 설정</string>
|
<string name="bgsource_upload">혈당 업로드 설정</string>
|
||||||
<string name="wear_detailed_delta_title">델타(혈당증분값) 자세히 보여주기</string>
|
<string name="wear_detailed_delta_title">델타(혈당증분값) 자세히 보여주기</string>
|
||||||
<string name="wear_detailed_delta_summary">소수점 자리 추가된 증분값 보여주기</string>
|
<string name="wear_detailed_delta_summary">소수점 자리 추가된 증분값 보여주기</string>
|
||||||
|
<string name="smbinterval_summary">SMB를 주입하는 빈도 (몇 분마다)</string>
|
||||||
<string name="smbmaxminutes_summary">SMB가 Basal을 제한할 수 있는 최대 시간(분)</string>
|
<string name="smbmaxminutes_summary">SMB가 Basal을 제한할 수 있는 최대 시간(분)</string>
|
||||||
|
<string name="uamsmbmaxminutes">UAM SMB의 최대 기간 (분)</string>
|
||||||
|
<string name="uamsmbmaxminutes_summary">SMB가 UAM에 대해 basal을 제한할 수 있는 최대 시간(분)</string>
|
||||||
|
<string name="carbsReqThreshold">제안을 위한 최소 탄수화물 필요량</string>
|
||||||
|
<string name="carbsReqThreshold_summary">탄수화물 제안 알림을 보여주는 최소 탄수화물 g수. 이 양보다 적은 경우 탄수화물 제안 알림이 작동하지 않습니다.</string>
|
||||||
<string name="dexcomg5_xdripupload_title">혈당 데이터를 xDrip+에 전송하기</string>
|
<string name="dexcomg5_xdripupload_title">혈당 데이터를 xDrip+에 전송하기</string>
|
||||||
<string name="dexcomg5_xdripupload_summary">xDrip+ 데이터 소스에서 640g/Eversense을 선택하세요</string>
|
<string name="dexcomg5_xdripupload_summary">xDrip+ 데이터 소스에서 640g/Eversense을 선택하세요</string>
|
||||||
<string name="nsclientbg">NSClient 혈당</string>
|
<string name="nsclientbg">NSClient 혈당</string>
|
||||||
|
@ -451,6 +519,7 @@
|
||||||
<string name="enablesmbwithtemptarget">임시 목표에서 SMB 사용하기</string>
|
<string name="enablesmbwithtemptarget">임시 목표에서 SMB 사용하기</string>
|
||||||
<string name="enablesmbwithtemptarget_summary">활성화된 임시 목표(식사직전, 운동)가 있으면 SMB를 사용합니다.</string>
|
<string name="enablesmbwithtemptarget_summary">활성화된 임시 목표(식사직전, 운동)가 있으면 SMB를 사용합니다.</string>
|
||||||
<string name="enablesmbwithhightemptarget">높은 임시 목표에서 SMB 사용하기</string>
|
<string name="enablesmbwithhightemptarget">높은 임시 목표에서 SMB 사용하기</string>
|
||||||
|
<string name="enablesmbwithhightemptarget_summary">높은 임시 목표 (운동, 100mg/dl 또는 5.5 mmol/l 초과)가 활성되어 있을 때 SMB 사용하기</string>
|
||||||
<string name="overview_insulin_label">인슐린</string>
|
<string name="overview_insulin_label">인슐린</string>
|
||||||
<string name="overview_buttons_selection">버튼</string>
|
<string name="overview_buttons_selection">버튼</string>
|
||||||
<string name="show_calibration_button_summary">xDrip+에 보정값을 전송하거나 G5 보정창을 엽니다.</string>
|
<string name="show_calibration_button_summary">xDrip+에 보정값을 전송하거나 G5 보정창을 엽니다.</string>
|
||||||
|
@ -459,11 +528,17 @@
|
||||||
<string name="insulin_increment_button_message">버튼을 누를때 추가될 인슐린 양</string>
|
<string name="insulin_increment_button_message">버튼을 누를때 추가될 인슐린 양</string>
|
||||||
<string name="error_starting_cgm">CGM앱을 실행할 수 없습니다. 앱이 설치되어 있는지 확인하세요.</string>
|
<string name="error_starting_cgm">CGM앱을 실행할 수 없습니다. 앱이 설치되어 있는지 확인하세요.</string>
|
||||||
<string name="overview_cgm">CGM</string>
|
<string name="overview_cgm">CGM</string>
|
||||||
|
<string name="ignore5m">5분간 무시하기</string>
|
||||||
|
<string name="ignore15m">5분간 무시하기</string>
|
||||||
|
<string name="ignore30m">30분간 무시하기</string>
|
||||||
|
<string name="required">필요량</string>
|
||||||
<string name="nav_historybrowser">이력 브라우저</string>
|
<string name="nav_historybrowser">이력 브라우저</string>
|
||||||
<string name="wear_notifysmb_title">SMB 알림</string>
|
<string name="wear_notifysmb_title">SMB 알림</string>
|
||||||
<string name="wear_notifysmb_summary">일반 Bolus처럼 워치에 SMB 표시</string>
|
<string name="wear_notifysmb_summary">일반 Bolus처럼 워치에 SMB 표시</string>
|
||||||
<string name="ns_create_announcements_from_errors_title">에러 발생시 알림 생성</string>
|
<string name="ns_create_announcements_from_errors_title">에러 발생시 알림 생성</string>
|
||||||
|
<string name="ns_create_announcements_from_carbs_req_title">\"필요 탄수화물 경고\"에서 알림 만들기</string>
|
||||||
<string name="ns_create_announcements_from_errors_summary">에러 발생에 대한 Nightscout 알림과 자체 경고를 생성합니다. (케어포털 관리에서도 표시됩니다.)</string>
|
<string name="ns_create_announcements_from_errors_summary">에러 발생에 대한 Nightscout 알림과 자체 경고를 생성합니다. (케어포털 관리에서도 표시됩니다.)</string>
|
||||||
|
<string name="ns_create_announcements_from_carbs_req_summary">\"필요한 탄수화물 경고\"를 위해 Nightscout 알림 만들기</string>
|
||||||
<string name="wear_predictions_summary">워치페이스에서 예측치를 보여줍니다.</string>
|
<string name="wear_predictions_summary">워치페이스에서 예측치를 보여줍니다.</string>
|
||||||
<string name="wear_predictions_title">예측</string>
|
<string name="wear_predictions_title">예측</string>
|
||||||
<string name="data_choices">데이터선택</string>
|
<string name="data_choices">데이터선택</string>
|
||||||
|
@ -477,8 +552,10 @@
|
||||||
<string name="do_not_bolus_record_only">실제 Bolus 주입않고, 기록만 하기</string>
|
<string name="do_not_bolus_record_only">실제 Bolus 주입않고, 기록만 하기</string>
|
||||||
<string name="category">분류</string>
|
<string name="category">분류</string>
|
||||||
<string name="subcategory">하위 분류</string>
|
<string name="subcategory">하위 분류</string>
|
||||||
|
<string name="bolusrecordedonly">Bolus 기록만 하기 (펌프에서 주입되지 않음)</string>
|
||||||
<string name="loop_smbsetbypump_label">펌프에 의한 SMB 설정</string>
|
<string name="loop_smbsetbypump_label">펌프에 의한 SMB 설정</string>
|
||||||
<string name="overview_show_activity">활동</string>
|
<string name="overview_show_activity">활동</string>
|
||||||
|
<string name="overview_show_bgi">BG impact</string>
|
||||||
<string name="overview_show_sensitivity">민감도</string>
|
<string name="overview_show_sensitivity">민감도</string>
|
||||||
<string name="overview_show_deviations">편차</string>
|
<string name="overview_show_deviations">편차</string>
|
||||||
<string name="overview_show_cob">체내탄수화물양(COB)</string>
|
<string name="overview_show_cob">체내탄수화물양(COB)</string>
|
||||||
|
@ -556,10 +633,14 @@
|
||||||
<string name="nsclientinfotext">NSClient는 Nightscout와의 연결을 처리합니다. 이 부분을 건너뛸 수 있지만 설정하기 전엔 목적을 수행할 수 없습니다.</string>
|
<string name="nsclientinfotext">NSClient는 Nightscout와의 연결을 처리합니다. 이 부분을 건너뛸 수 있지만 설정하기 전엔 목적을 수행할 수 없습니다.</string>
|
||||||
<string name="diawarning">새로운 인슐린 프로파일은 최소 5시간의 DIA가 요구됩니다. 새로운 프로파일의 DIA 5-6시간은 구식 인슐린 프로파일의 DIA 3시간과 동일합니다.</string>
|
<string name="diawarning">새로운 인슐린 프로파일은 최소 5시간의 DIA가 요구됩니다. 새로운 프로파일의 DIA 5-6시간은 구식 인슐린 프로파일의 DIA 3시간과 동일합니다.</string>
|
||||||
<string name="setupwizard_aps_description">사용 가능한 알고리즘 중 하나를 선택하세요. 과거부터 최신의 순으로 정렬이 되어 있습니다. 일반적으로 새로운 알고리즘은 보다 강력하고 공격적입니다. 따라서 당신이 신규 사용자라면 최신의 알고리즘보단 AMA로 시작하는것이 나을 수 있습니다. 사용 전에 OpenAPS 문서를 읽어보고 설정하는 것을 잊지마세요.</string>
|
<string name="setupwizard_aps_description">사용 가능한 알고리즘 중 하나를 선택하세요. 과거부터 최신의 순으로 정렬이 되어 있습니다. 일반적으로 새로운 알고리즘은 보다 강력하고 공격적입니다. 따라서 당신이 신규 사용자라면 최신의 알고리즘보단 AMA로 시작하는것이 나을 수 있습니다. 사용 전에 OpenAPS 문서를 읽어보고 설정하는 것을 잊지마세요.</string>
|
||||||
|
<string name="setupwizard_pump_waiting_for_riley_link_connection">하단의 RileyLink를 설정하십시오. RileyLink를 선택한 뒤, RileyLink 상태가 \"연결됨\"이 되고 나면 설정을 계속 할 수 있습니다. 이 작업은 금방 진행됩니다.\n</string>
|
||||||
|
<string name="setupwizard_pump_pump_not_initialized"><b>참고:</b> 펌프가 한 번 연동되면 계속 설정할 수 있습니다.\n</string>
|
||||||
<string name="startobjective">첫번째 목표를 시작하세요.</string>
|
<string name="startobjective">첫번째 목표를 시작하세요.</string>
|
||||||
<string name="permission">권한</string>
|
<string name="permission">권한</string>
|
||||||
<string name="askforpermission">권한 요청하기</string>
|
<string name="askforpermission">권한 요청하기</string>
|
||||||
<string name="needsystemwindowpermission">알림에 대한 시스템 창 권한이 필요합니다</string>
|
<string name="needsystemwindowpermission">알림에 대한 시스템 창 권한이 필요합니다</string>
|
||||||
|
<string name="needlocationpermission">어플은 BT scan과 WiFi 식별을 위해 \"위치 허용\"이 요구됩니다.</string>
|
||||||
|
<string name="needstoragepermission">어플은 로그 파일 저장과 설정 내보내기를 위해 \"저장공간 허용\"이 요구됩니다.</string>
|
||||||
<string name="request">요청</string>
|
<string name="request">요청</string>
|
||||||
<string name="open_navigation">메뉴 열기</string>
|
<string name="open_navigation">메뉴 열기</string>
|
||||||
<string name="close_navigation">메뉴 닫기</string>
|
<string name="close_navigation">메뉴 닫기</string>
|
||||||
|
@ -574,12 +655,17 @@
|
||||||
<string name="high_temptarget_raises_sensitivity_summary"><![CDATA[임시목표 100이상을 위해 민감도를 올립니다.]]></string>
|
<string name="high_temptarget_raises_sensitivity_summary"><![CDATA[임시목표 100이상을 위해 민감도를 올립니다.]]></string>
|
||||||
<string name="low_temptarget_lowers_sensitivity_title">낮은 임시목표는 민감도를 내립니다.</string>
|
<string name="low_temptarget_lowers_sensitivity_title">낮은 임시목표는 민감도를 내립니다.</string>
|
||||||
<string name="low_temptarget_lowers_sensitivity_summary"><![CDATA[임시목표 100미만을 위해 민감도를 낮춥니다.]]></string>
|
<string name="low_temptarget_lowers_sensitivity_summary"><![CDATA[임시목표 100미만을 위해 민감도를 낮춥니다.]]></string>
|
||||||
|
<string name="resistance_lowers_target_title">저항성이 목표 낮추기</string>
|
||||||
|
<string name="resistance_lowers_target_summary">저항성이 감지되면, 목표 혈당을 낮춥니다.</string>
|
||||||
|
<string name="sensitivity_raises_target_title">민감성이 목표 올리기</string>
|
||||||
|
<string name="sensitivity_raises_target_summary">민감성이 감지되면, 목표 혈당을 높입니다.</string>
|
||||||
<string name="careportal_removestartedevents">\"AndroidAPS 시작\" 기록 삭제하기</string>
|
<string name="careportal_removestartedevents">\"AndroidAPS 시작\" 기록 삭제하기</string>
|
||||||
<string name="storedsettingsfound">저장된 설정이 있습니다.</string>
|
<string name="storedsettingsfound">저장된 설정이 있습니다.</string>
|
||||||
<string name="allow_hardware_pump_text">주의: 활성화하고 펌프에 연결하게되면, AndroidAPS는 프로파일의 Basal설정을 복사해서 기존에 펌프에 저장되어 있던 Basal설정을 덮어쓰게 될것입니다. AndroidAPS의 Basal설정이 올바른지 반드시 확인하세요. 만약 확실치 않거나 Basal설정을 덮어씌우길 원치않는다면, 취소버튼을 누르고 나중에 다시 연결하세요.</string>
|
<string name="allow_hardware_pump_text">주의: 활성화하고 펌프에 연결하게되면, AndroidAPS는 프로파일의 Basal설정을 복사해서 기존에 펌프에 저장되어 있던 Basal설정을 덮어쓰게 될것입니다. AndroidAPS의 Basal설정이 올바른지 반드시 확인하세요. 만약 확실치 않거나 Basal설정을 덮어씌우길 원치않는다면, 취소버튼을 누르고 나중에 다시 연결하세요.</string>
|
||||||
<string name="error_adding_treatment_title">관리 데이터가 불완전합니다</string>
|
<string name="error_adding_treatment_title">관리 데이터가 불완전합니다</string>
|
||||||
<string name="maintenance_settings">정비 설정</string>
|
<string name="maintenance_settings">정비 설정</string>
|
||||||
<string name="maintenance_email">Email</string>
|
<string name="maintenance_email">Email</string>
|
||||||
|
<string name="maintenance_encrypt_exported_prefs">내보내는 설정을 암호화하기</string>
|
||||||
<string name="maintenance_amount">전송할 로그 수</string>
|
<string name="maintenance_amount">전송할 로그 수</string>
|
||||||
<string name="maintenance">정비</string>
|
<string name="maintenance">정비</string>
|
||||||
<string name="maintenance_shortname">MAINT</string>
|
<string name="maintenance_shortname">MAINT</string>
|
||||||
|
@ -624,6 +710,7 @@
|
||||||
<string name="storage">내부 저장 용량 제한</string>
|
<string name="storage">내부 저장 용량 제한</string>
|
||||||
<string name="diskfull">내부 저장 공간을 최소 %1$d MB 이상 비우세요! Loop가 비활성화되었습니다!</string>
|
<string name="diskfull">내부 저장 공간을 최소 %1$d MB 이상 비우세요! Loop가 비활성화되었습니다!</string>
|
||||||
<string name="wrongformat">잘못된 형식</string>
|
<string name="wrongformat">잘못된 형식</string>
|
||||||
|
<string name="wrongTbrDuration">TBR 기간은 %1$d분의 배수가 되어야 하고 0보다 커야 함.</string>
|
||||||
<string name="sms_wrongcode">잘못된 코드입니다. 명령이 취소됩니다.</string>
|
<string name="sms_wrongcode">잘못된 코드입니다. 명령이 취소됩니다.</string>
|
||||||
<string name="notconfigured">설정되지 않음</string>
|
<string name="notconfigured">설정되지 않음</string>
|
||||||
<string name="profileswitchcreated">프로파일 변경 생성됨</string>
|
<string name="profileswitchcreated">프로파일 변경 생성됨</string>
|
||||||
|
@ -635,6 +722,8 @@
|
||||||
<string name="dexcom_app_patched">Dexcom 앱(패치버전)</string>
|
<string name="dexcom_app_patched">Dexcom 앱(패치버전)</string>
|
||||||
<string name="dexcom_short">DXCM</string>
|
<string name="dexcom_short">DXCM</string>
|
||||||
<string name="description_source_dexcom">패치된 Dexcom 앱에서 혈당값 받기</string>
|
<string name="description_source_dexcom">패치된 Dexcom 앱에서 혈당값 받기</string>
|
||||||
|
<string name="cobvsiob">COB vs IOB</string>
|
||||||
|
<string name="bolusconstraintappliedwarn">Bolus 제한이 적용됨: %1$.2f U에서 %2$.2f U으로</string>
|
||||||
<string name="slowabsorptiondetected"><![CDATA[<font color=\'%1$s\'>!!!!! 느린 탄수화물 흡수 감지: %2$d%% of time. 계산을 다시 확인하십시오. COB를 과대하게 측정하여 더 많은 인슐린이 주입될 수 있습니다 !!!!!</font>]]></string>
|
<string name="slowabsorptiondetected"><![CDATA[<font color=\'%1$s\'>!!!!! 느린 탄수화물 흡수 감지: %2$d%% of time. 계산을 다시 확인하십시오. COB를 과대하게 측정하여 더 많은 인슐린이 주입될 수 있습니다 !!!!!</font>]]></string>
|
||||||
<string name="partialboluswizard">Bolus 마법사 결과의 이 부분 주입[%]</string>
|
<string name="partialboluswizard">Bolus 마법사 결과의 이 부분 주입[%]</string>
|
||||||
<string name="deliverpartofboluswizard">Bolus 마법사는 계산을 수행하지만 계산된 인슐린의 이 부분만 주입됩니다. SMB 알고리즘에 유용합니다.</string>
|
<string name="deliverpartofboluswizard">Bolus 마법사는 계산을 수행하지만 계산된 인슐린의 이 부분만 주입됩니다. SMB 알고리즘에 유용합니다.</string>
|
||||||
|
@ -661,6 +750,7 @@
|
||||||
<string name="clone_label">복사</string>
|
<string name="clone_label">복사</string>
|
||||||
<string name="saveorresetchangesfirst">우선 현재 변경사항을을 저장하거나 재설정하세요</string>
|
<string name="saveorresetchangesfirst">우선 현재 변경사항을을 저장하거나 재설정하세요</string>
|
||||||
<string name="deletecurrentprofile">현재 프로파일을 삭제 하시겠습니까?</string>
|
<string name="deletecurrentprofile">현재 프로파일을 삭제 하시겠습니까?</string>
|
||||||
|
<string name="copytolocalprofile">프로파일에서 새로운 로컬 프로파일을 만드시겠습니까?</string>
|
||||||
<string name="profilenamecontainsdot">프로파일명에 점을 포함하고 있습니다.\n이는 NS에서 지원하지 않습니다.\n프로파일이 NS에 업로드되지 않습니다.</string>
|
<string name="profilenamecontainsdot">프로파일명에 점을 포함하고 있습니다.\n이는 NS에서 지원하지 않습니다.\n프로파일이 NS에 업로드되지 않습니다.</string>
|
||||||
<string name="low_mark_comment">혈당 정상범위의 하한값(표시 전용)</string>
|
<string name="low_mark_comment">혈당 정상범위의 하한값(표시 전용)</string>
|
||||||
<string name="high_mark_comment">혈당 정상범위의 상한값(표시 전용)</string>
|
<string name="high_mark_comment">혈당 정상범위의 상한값(표시 전용)</string>
|
||||||
|
@ -672,6 +762,7 @@
|
||||||
<string name="survey_comment">참고: 이 화면에 보이는 데이터만 익명으로 업로드됩니다. ID는 AndroidAPS 설치에 할당됩니다. 기본 프로파일이 변경되면 데이터를 다시 제출할 수 있지만 어느정도 시간 범위의 결과가 보이도록 최소 1주일 이상 실행하여 주세요. 당신의 도움 감사하겠습니다.</string>
|
<string name="survey_comment">참고: 이 화면에 보이는 데이터만 익명으로 업로드됩니다. ID는 AndroidAPS 설치에 할당됩니다. 기본 프로파일이 변경되면 데이터를 다시 제출할 수 있지만 어느정도 시간 범위의 결과가 보이도록 최소 1주일 이상 실행하여 주세요. 당신의 도움 감사하겠습니다.</string>
|
||||||
<string name="invalidage">유효하지 않은 나이입니다</string>
|
<string name="invalidage">유효하지 않은 나이입니다</string>
|
||||||
<string name="invalidweight">유효하지 않은 몸무게입니다</string>
|
<string name="invalidweight">유효하지 않은 몸무게입니다</string>
|
||||||
|
<string name="invalidpct">유효하지 않은 % 입력</string>
|
||||||
<string name="tirformat"><![CDATA[<b>%1$s:</b> Low: <b>%2$02d%%</b> In: <b>%3$02d%%</b> High: <b>%4$02d%%</b>]]></string>
|
<string name="tirformat"><![CDATA[<b>%1$s:</b> Low: <b>%2$02d%%</b> In: <b>%3$02d%%</b> High: <b>%4$02d%%</b>]]></string>
|
||||||
<string name="average">평균</string>
|
<string name="average">평균</string>
|
||||||
<string name="tir">TIR</string>
|
<string name="tir">TIR</string>
|
||||||
|
@ -683,6 +774,7 @@
|
||||||
<string name="randombg_short">BG</string>
|
<string name="randombg_short">BG</string>
|
||||||
<string name="tools">도구</string>
|
<string name="tools">도구</string>
|
||||||
<string name="show_calculation">계산 표시</string>
|
<string name="show_calculation">계산 표시</string>
|
||||||
|
<string name="show_removed">삭제된 기록 표시</string>
|
||||||
<string name="clearqueueconfirm">대기열을 삭제하시겠습니까? 대기열에 있는 모든 데이터가 삭제됩니다!</string>
|
<string name="clearqueueconfirm">대기열을 삭제하시겠습니까? 대기열에 있는 모든 데이터가 삭제됩니다!</string>
|
||||||
<string name="ebstopsloop">확장 Bolus 기능을 사용하는 동안에는 Closed Loop 모드가 중지됩니다. 정말 원하십니까?</string>
|
<string name="ebstopsloop">확장 Bolus 기능을 사용하는 동안에는 Closed Loop 모드가 중지됩니다. 정말 원하십니까?</string>
|
||||||
<string name="closed_loop_disabled_with_eb">확장 Bolus 사용으로 인해 Closed Loop가 비활성화됨</string>
|
<string name="closed_loop_disabled_with_eb">확장 Bolus 사용으로 인해 Closed Loop가 비활성화됨</string>
|
||||||
|
@ -693,7 +785,99 @@
|
||||||
<string name="loop_tbrrequest_time_label">임시 Basal 요청시간</string>
|
<string name="loop_tbrrequest_time_label">임시 Basal 요청시간</string>
|
||||||
<string name="loop_tbrexecution_time_label">임시 Basal 실행시간</string>
|
<string name="loop_tbrexecution_time_label">임시 Basal 실행시간</string>
|
||||||
<!-- SMS Communicator & OTP Authenticator -->
|
<!-- SMS Communicator & OTP Authenticator -->
|
||||||
|
<string name="smscommunicator_code_from_authenticator_for" comment="This is continuation of sentence: To [ACTION] reply with code">인증 어플에서: %1$s 뒤에 PIN</string>
|
||||||
|
<string name="smscommunicator_otp_pin">암호 끝에 더해지는 자동형성 PIN</string>
|
||||||
|
<string name="smscommunicator_otp_pin_summary">부가적인 숫자를 생성되는 일회성 비밀번호 끝에 더하고 기억해야 함.</string>
|
||||||
|
<string name="smscomunicator_tab_otp_label">인증 설정</string>
|
||||||
|
<string name="smscommunicator_code_verify_label">확인용 code:</string>
|
||||||
|
<string name="smscommunicator_code_verify_hint">OTP + PIN</string>
|
||||||
|
<string name="smscommunicator_code_verify_info">유효한 코드는 인증 어플에서 보여지는 6개의 숫자 (OTP) 뒤에 자동형성 PIN의 3개 또는 그 이상의 숫자가 이어져야 함.</string>
|
||||||
|
<string name="smscommunicator_otp_reset_btn">인증 초기화</string>
|
||||||
|
<string name="smscommunicator_otp_reset_title">인증 암호 초기화</string>
|
||||||
|
<string name="smscommunicator_otp_reset_prompt">인증 암호를 초기화하는 것이 확실합니까? 현재 설정된 인증 암호를 모두 무효화 시키며, 이들을 모두 다시 설정해야 합니다.</string>
|
||||||
|
<string name="smscommunicator_otp_reset_successful">새로운 인증 암호가 생성되었습니다! 준비된 인증 어플에서 업데이트된 QRCode를 사용하십시오.</string>
|
||||||
|
<string name="smscommunicator_otp_export_title">OTP 비밀번호 내보내기</string>
|
||||||
|
<string name="smscommunicator_otp_export_prompt">OTP 비밀번호의 클립보드 복사를 원하는 것이 확실합니까?\n\n 이는 인증 어플이 QRCode를 스캐닝하는데 문제가 있을 때, 비밀번호 수동 입력을 원할 때, 또는 공용 어플 사용 시에 하드웨어 OTP 암호 설정을 원할 때에만 필요합니다.</string>
|
||||||
|
<string name="smscommunicator_otp_export_successful">OTP 비밀번호 (Base32 포맷)가 클립보드에 내보내져서 복사되었습니다. 인증 어플 또는 하드웨어 OTP burner에 붙여넣기 하십시오!</string>
|
||||||
|
<string name="smscommunicator_otp_step1_install_header">1. 인증어플 설치하기</string>
|
||||||
|
<string name="smscommunicator_otp_step2_provisioning_header">2. AndroidAPS OTP 코드 설정을 위해 code를 스캔하기</string>
|
||||||
|
<string name="smscommunicator_otp_step3_test_header">3. 일회성 비밀번호 테스트</string>
|
||||||
|
<string name="smscommunicator_otp_reset_header">인증 초기화</string>
|
||||||
|
<string name="smscommunicator_otp_install_info">각각의 팔로워 폰에 RFC 6238 TOTP 암호를 사용하는 인증 어플을 설치합니다. 대중적인 무료 어플은 다음과 같습니다:\n • Authy\n • Google Authenticator\n • LastPass Authenticator\n • FreeOTP Authenticator.</string>
|
||||||
|
<string name="smscommunicator_otp_reset_warning">인증을 초기화함으로써 준비된 인증을 모두 무효화합니다. 이들을 다시 설정해야 합니다.</string>
|
||||||
<string name="overview_show_predictions">예측</string>
|
<string name="overview_show_predictions">예측</string>
|
||||||
|
<string name="overview_show_deviationslope">편차 기울기</string>
|
||||||
|
<string name="authorizationfailed">인증 실패</string>
|
||||||
|
<string name="overview_show_absinsulin">인슐린 절대값</string>
|
||||||
|
<string name="master_password_summary">마스터 비밀번호는 백업 암호 또는 보안 해제를 위해 사용됩니다. 이를 기억하거나 안전한 곳에 저장해두세요.</string>
|
||||||
|
<string name="current_master_password">현재 마스터 비밀번호</string>
|
||||||
|
<string name="statuslights">상태 등</string>
|
||||||
|
<string name="statuslights_copy_ns">NS에서 설정을 복사해오기</string>
|
||||||
|
<string name="copyexistingvalues">NS 설정(이 존재하는 경우) 복사하기?</string>
|
||||||
|
<string name="classic_description">기본 스킨</string>
|
||||||
|
<string name="lowres_description">저해상도 스킨</string>
|
||||||
|
<string name="buttonson_description">버튼을 화면 아래 고정하여 보여주기</string>
|
||||||
|
<string name="largedisplay_description">큰 화면</string>
|
||||||
|
<string name="skin">스킨</string>
|
||||||
|
<string name="comapareprofile">프로파일 비교하기</string>
|
||||||
|
<string name="nav_profilehelper">프로파일 보조기</string>
|
||||||
|
<string name="motoldefaultprofile">기본 프로파일</string>
|
||||||
|
<string name="currentprofile">현재 프로파일</string>
|
||||||
|
<string name="availableprofile">사용 가능한 프로파일</string>
|
||||||
|
<string name="profiletype">프로파일 종류</string>
|
||||||
|
<string name="formatwithtdd">나이: %1$.0f TDD: %2$.0f U</string>
|
||||||
|
<string name="formatwittddandpct">나이: %1$.0f TDD: %2$.0f U %3$d%%</string>
|
||||||
|
<string name="formatwithweight">나이: %1$.0f 체중: %2$.0f kg</string>
|
||||||
|
<string name="basalpctfromtdd_label">% basal</string>
|
||||||
|
<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>
|
||||||
|
<string name="advisoralarm">식사 시간이 되면 알람을 울리기</string>
|
||||||
|
<string name="alarminxmin">%1$d분 뒤 알람 울림</string>
|
||||||
|
<string name="bolusadvisor">Bolus advisor</string>
|
||||||
|
<string name="bolusadvisormessage">현재 혈당이 높습니다. 지금 식사를 하기 보다 적절한 혈당이 되도록 기다리는 것을 추천합니다. 교정 bolus를 지금 주입하고 식사할 시간이 되면 알려드릴까요? 이 경우 탄수화물은 기록되지 않으며, 알림을 받으면 wizard를 다시 사용해야 합니다.</string>
|
||||||
|
<string name="enablebolusadvisor">Bolus advisor 활성화</string>
|
||||||
|
<string name="enablebolusadvisor_summary">혈당이 높을 때 wizard 결과 대신 reminder를 사용하여 나중에 식사하기 (pre-bolus)</string>
|
||||||
|
<string name="time_to_eat">식사할 시간입니다! \nBolus wizard를 켜고 다시 계산하십시오.</string>
|
||||||
|
<string name="timetoeat">식사할 시간</string>
|
||||||
|
<string name="fabric_upload_disabled">충돌 로그 업로드가 작동하지 않습니다.</string>
|
||||||
|
<string name="graph_menu_divider_header">그래프</string>
|
||||||
<string name="chart_menu">차트 메뉴</string>
|
<string name="chart_menu">차트 메뉴</string>
|
||||||
|
<string name="clear_filter">필터 지우기</string>
|
||||||
|
<string name="trend_arrow">경향 화살표</string>
|
||||||
|
<string name="cannula">캐뉼라</string>
|
||||||
|
<string name="userentry">사용자 항목</string>
|
||||||
|
<string name="common_values">평소 섭취하는 가장 많은 양의 탄수화물 값을 사용하세요.\n</string>
|
||||||
|
<string name="summary_email_for_crash_report">긴급 상황에서 사용자에게 연락을 취하기 위해 이 이메일 주소를 충돌 보고에 첨부합니다. 이는 선택사항입니다.</string>
|
||||||
|
<string name="email_address">이메일 주소</string>
|
||||||
|
<string name="privacy_settings">개인정보 설정</string>
|
||||||
|
<string name="privacy_summary">어플의 충돌에 대해 통지를 받기 원하는 경우 선택적으로 이메일 주소를 제공할 수 있습니다. 이는 자동 지원 서비스는 아닙니다. 위험 상황에서 개발자들에게 연락이 올 것입니다.</string>
|
||||||
|
<string name="full_sync">전체 동기화 됨</string>
|
||||||
<string name="prime">교체</string>
|
<string name="prime">교체</string>
|
||||||
|
<string name="ns_sync_options">동기화</string>
|
||||||
|
<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>
|
||||||
|
<string name="ns_receive_profile_switch_summary">NS 또는 NSClient에서 입력한 프로파일 변경 수락하기</string>
|
||||||
|
<string name="ns_receive_offline_event">APS 오프라인 이벤트 받기</string>
|
||||||
|
<string name="ns_receive_offline_event_summary">NS 또는 NSClient에서 입력한 APS 오프라인 이벤트 수락하기</string>
|
||||||
|
<string name="ns_receive_insulin">인슐린 받기</string>
|
||||||
|
<string name="ns_receive_insulin_summary">NS 또는 NSClient에서 입력한 인슐린 수락하기 (주입되지는 않음, IOB에 계산만 됨)</string>
|
||||||
|
<string name="ns_receive_carbs">탄수화물 받기</string>
|
||||||
|
<string name="ns_receive_carbs_summary">NS 또는 NSClient에서 입력한 탄수화물 수락하기</string>
|
||||||
|
<string name="ns_receive_therapy_events">처치 이벤트 받기</string>
|
||||||
|
<string name="ns_receive_therapy_events_summary">NS 또는 NSClient에서 입력한 처치 이벤트 (캐뉼라, 인슐린, 배터리 교체 등) 수락하기</string>
|
||||||
|
<string name="ns_receive_cgm">CGM 데이터 받기/다시 채우기</string>
|
||||||
|
<string name="ns_receive_cgm_summary">NS로부터 CGM 데이터 수락하기</string>
|
||||||
|
<string name="sms_timeout_while_wating">직전의 펌프 통신 종료를 기다리는 동안 타임 아웃</string>
|
||||||
|
<string name="smscommunicator_another_bolus_in_queue">대기열에 또다른 bolus가 있습니다. 이후에 다시 시도하세요.</string>
|
||||||
|
<string name="calculation_in_progress">계산 진행 중</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -46,6 +46,7 @@
|
||||||
<string name="key_ns_temporary_basal_last_synced_id" translatable="false">ns_temporary_basal_last_synced_id</string>
|
<string name="key_ns_temporary_basal_last_synced_id" translatable="false">ns_temporary_basal_last_synced_id</string>
|
||||||
<string name="key_ns_extended_bolus_last_synced_id" translatable="false">ns_extended_bolus_last_synced_id</string>
|
<string name="key_ns_extended_bolus_last_synced_id" translatable="false">ns_extended_bolus_last_synced_id</string>
|
||||||
<string name="key_ns_profile_switch_last_synced_id" translatable="false">profile_switch_last_synced_id</string>
|
<string name="key_ns_profile_switch_last_synced_id" translatable="false">profile_switch_last_synced_id</string>
|
||||||
|
<string name="key_ns_effective_profile_switch_last_synced_id" translatable="false">ns_effective_profile_switch_last_synced_id</string>
|
||||||
<string name="key_ns_offline_event_last_synced_id" translatable="false">ns_offline_event_last_synced_id</string>
|
<string name="key_ns_offline_event_last_synced_id" translatable="false">ns_offline_event_last_synced_id</string>
|
||||||
<string name="key_ns_profile_store_last_synced_timestamp" translatable="false">ns_profile_store_last_synced_timestamp</string>
|
<string name="key_ns_profile_store_last_synced_timestamp" translatable="false">ns_profile_store_last_synced_timestamp</string>
|
||||||
<string name="key_local_profile_last_change" translatable="false">local_profile_last_change</string>
|
<string name="key_local_profile_last_change" translatable="false">local_profile_last_change</string>
|
||||||
|
|
|
@ -29,7 +29,7 @@ import info.nightscout.androidaps.plugins.sensitivity.SensitivityOref1Plugin
|
||||||
import info.nightscout.androidaps.plugins.source.GlimpPlugin
|
import info.nightscout.androidaps.plugins.source.GlimpPlugin
|
||||||
import info.nightscout.androidaps.utils.HardLimits
|
import info.nightscout.androidaps.utils.HardLimits
|
||||||
import info.nightscout.androidaps.utils.Profiler
|
import info.nightscout.androidaps.utils.Profiler
|
||||||
import info.nightscout.androidaps.utils.buildHelper.BuildHelper
|
import info.nightscout.androidaps.utils.buildHelper.BuildHelperImpl
|
||||||
import info.nightscout.androidaps.utils.buildHelper.ConfigImpl
|
import info.nightscout.androidaps.utils.buildHelper.ConfigImpl
|
||||||
import info.nightscout.androidaps.utils.sharedPreferences.SP
|
import info.nightscout.androidaps.utils.sharedPreferences.SP
|
||||||
import org.junit.Assert
|
import org.junit.Assert
|
||||||
|
@ -138,7 +138,10 @@ class ConstraintsCheckerTest : TestBaseWithProfile() {
|
||||||
insightPlugin = LocalInsightPlugin(injector, aapsLogger, rxBus, resourceHelper, sp, commandQueue, profileFunction, context, ConfigImpl(), dateUtil, insightDbHelper, pumpSync)
|
insightPlugin = LocalInsightPlugin(injector, aapsLogger, rxBus, resourceHelper, sp, commandQueue, profileFunction, context, ConfigImpl(), dateUtil, insightDbHelper, pumpSync)
|
||||||
openAPSSMBPlugin = OpenAPSSMBPlugin(injector, aapsLogger, rxBus, constraintChecker, resourceHelper, profileFunction, context, activePlugin, iobCobCalculator, hardLimits, profiler, sp, dateUtil, repository, glucoseStatusProvider)
|
openAPSSMBPlugin = OpenAPSSMBPlugin(injector, aapsLogger, rxBus, constraintChecker, resourceHelper, profileFunction, context, activePlugin, iobCobCalculator, hardLimits, profiler, sp, dateUtil, repository, glucoseStatusProvider)
|
||||||
openAPSAMAPlugin = OpenAPSAMAPlugin(injector, aapsLogger, rxBus, constraintChecker, resourceHelper, profileFunction, context, activePlugin, iobCobCalculator, hardLimits, profiler, fabricPrivacy, dateUtil, repository, glucoseStatusProvider)
|
openAPSAMAPlugin = OpenAPSAMAPlugin(injector, aapsLogger, rxBus, constraintChecker, resourceHelper, profileFunction, context, activePlugin, iobCobCalculator, hardLimits, profiler, fabricPrivacy, dateUtil, repository, glucoseStatusProvider)
|
||||||
safetyPlugin = SafetyPlugin(injector, aapsLogger, resourceHelper, sp, rxBus, constraintChecker, openAPSAMAPlugin, openAPSSMBPlugin, sensitivityOref1Plugin, activePlugin, hardLimits, BuildHelper(ConfigImpl(), fileListProvider), iobCobCalculator, ConfigImpl(), dateUtil)
|
safetyPlugin = SafetyPlugin(injector, aapsLogger, resourceHelper, sp, rxBus, constraintChecker,
|
||||||
|
openAPSAMAPlugin, openAPSSMBPlugin, sensitivityOref1Plugin, activePlugin,
|
||||||
|
hardLimits, BuildHelperImpl(ConfigImpl(), fileListProvider), iobCobCalculator,
|
||||||
|
ConfigImpl(), dateUtil)
|
||||||
val constraintsPluginsList = ArrayList<PluginBase>()
|
val constraintsPluginsList = ArrayList<PluginBase>()
|
||||||
constraintsPluginsList.add(safetyPlugin)
|
constraintsPluginsList.add(safetyPlugin)
|
||||||
constraintsPluginsList.add(objectivesPlugin)
|
constraintsPluginsList.add(objectivesPlugin)
|
||||||
|
|
|
@ -12,6 +12,7 @@ import info.nightscout.androidaps.database.AppRepository
|
||||||
import info.nightscout.androidaps.database.ValueWrapper
|
import info.nightscout.androidaps.database.ValueWrapper
|
||||||
import info.nightscout.androidaps.database.entities.Bolus
|
import info.nightscout.androidaps.database.entities.Bolus
|
||||||
import info.nightscout.androidaps.interfaces.ActivePlugin
|
import info.nightscout.androidaps.interfaces.ActivePlugin
|
||||||
|
import info.nightscout.androidaps.interfaces.Config
|
||||||
import info.nightscout.androidaps.interfaces.Constraint
|
import info.nightscout.androidaps.interfaces.Constraint
|
||||||
import info.nightscout.androidaps.interfaces.ProfileFunction
|
import info.nightscout.androidaps.interfaces.ProfileFunction
|
||||||
import info.nightscout.androidaps.interfaces.PumpSync
|
import info.nightscout.androidaps.interfaces.PumpSync
|
||||||
|
@ -23,6 +24,7 @@ import info.nightscout.androidaps.queue.commands.*
|
||||||
import info.nightscout.androidaps.utils.DateUtil
|
import info.nightscout.androidaps.utils.DateUtil
|
||||||
import info.nightscout.androidaps.utils.FabricPrivacy
|
import info.nightscout.androidaps.utils.FabricPrivacy
|
||||||
import info.nightscout.androidaps.utils.buildHelper.BuildHelper
|
import info.nightscout.androidaps.utils.buildHelper.BuildHelper
|
||||||
|
import info.nightscout.androidaps.utils.buildHelper.BuildHelperImpl
|
||||||
import info.nightscout.androidaps.utils.buildHelper.ConfigImpl
|
import info.nightscout.androidaps.utils.buildHelper.ConfigImpl
|
||||||
import info.nightscout.androidaps.utils.resources.ResourceHelper
|
import info.nightscout.androidaps.utils.resources.ResourceHelper
|
||||||
import info.nightscout.androidaps.utils.rx.AapsSchedulers
|
import info.nightscout.androidaps.utils.rx.AapsSchedulers
|
||||||
|
@ -59,8 +61,10 @@ class CommandQueueTest : TestBaseWithProfile() {
|
||||||
buildHelper: BuildHelper,
|
buildHelper: BuildHelper,
|
||||||
dateUtil: DateUtil,
|
dateUtil: DateUtil,
|
||||||
repository: AppRepository,
|
repository: AppRepository,
|
||||||
fabricPrivacy: FabricPrivacy
|
fabricPrivacy: FabricPrivacy,
|
||||||
) : CommandQueue(injector, aapsLogger, rxBus, aapsSchedulers, resourceHelper, constraintChecker, profileFunction, activePlugin, context, sp, buildHelper, dateUtil, repository, fabricPrivacy) {
|
config: Config
|
||||||
|
) : CommandQueue(injector, aapsLogger, rxBus, aapsSchedulers, resourceHelper, constraintChecker, profileFunction,
|
||||||
|
activePlugin, context, sp, buildHelper, dateUtil, repository, fabricPrivacy, config) {
|
||||||
|
|
||||||
override fun notifyAboutNewCommand() {}
|
override fun notifyAboutNewCommand() {}
|
||||||
|
|
||||||
|
@ -96,7 +100,10 @@ class CommandQueueTest : TestBaseWithProfile() {
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
fun prepare() {
|
fun prepare() {
|
||||||
commandQueue = CommandQueueMocked(injector, aapsLogger, rxBus, aapsSchedulers, resourceHelper, constraintChecker, profileFunction, activePlugin, context, sp, BuildHelper(ConfigImpl(), fileListProvider), dateUtil, repository, fabricPrivacy)
|
commandQueue = CommandQueueMocked(injector, aapsLogger, rxBus, aapsSchedulers, resourceHelper,
|
||||||
|
constraintChecker, profileFunction, activePlugin, context, sp,
|
||||||
|
BuildHelperImpl(ConfigImpl(), fileListProvider), dateUtil, repository,
|
||||||
|
fabricPrivacy, config)
|
||||||
testPumpPlugin = TestPumpPlugin(injector)
|
testPumpPlugin = TestPumpPlugin(injector)
|
||||||
|
|
||||||
testPumpPlugin.pumpDescription.basalMinimumRate = 0.1
|
testPumpPlugin.pumpDescription.basalMinimumRate = 0.1
|
||||||
|
@ -127,7 +134,10 @@ class CommandQueueTest : TestBaseWithProfile() {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun commandIsPickedUp() {
|
fun commandIsPickedUp() {
|
||||||
val commandQueue = CommandQueue(injector, aapsLogger, rxBus, aapsSchedulers, resourceHelper, constraintChecker, profileFunction, activePlugin, context, sp, BuildHelper(ConfigImpl(), fileListProvider), dateUtil, repository, fabricPrivacy)
|
val commandQueue = CommandQueue(injector, aapsLogger, rxBus, aapsSchedulers, resourceHelper,
|
||||||
|
constraintChecker, profileFunction, activePlugin, context, sp,
|
||||||
|
BuildHelperImpl(ConfigImpl(), fileListProvider), dateUtil, repository,
|
||||||
|
fabricPrivacy, config)
|
||||||
// start with empty queue
|
// start with empty queue
|
||||||
Assert.assertEquals(0, commandQueue.size())
|
Assert.assertEquals(0, commandQueue.size())
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ import info.nightscout.androidaps.plugins.configBuilder.ConstraintChecker
|
||||||
import info.nightscout.androidaps.plugins.general.maintenance.PrefFileListProvider
|
import info.nightscout.androidaps.plugins.general.maintenance.PrefFileListProvider
|
||||||
import info.nightscout.androidaps.queue.commands.Command
|
import info.nightscout.androidaps.queue.commands.Command
|
||||||
import info.nightscout.androidaps.queue.commands.CommandTempBasalAbsolute
|
import info.nightscout.androidaps.queue.commands.CommandTempBasalAbsolute
|
||||||
import info.nightscout.androidaps.utils.buildHelper.BuildHelper
|
import info.nightscout.androidaps.utils.buildHelper.BuildHelperImpl
|
||||||
import info.nightscout.androidaps.utils.buildHelper.ConfigImpl
|
import info.nightscout.androidaps.utils.buildHelper.ConfigImpl
|
||||||
import info.nightscout.androidaps.utils.sharedPreferences.SP
|
import info.nightscout.androidaps.utils.sharedPreferences.SP
|
||||||
import org.junit.Assert
|
import org.junit.Assert
|
||||||
|
@ -52,7 +52,11 @@ class QueueThreadTest : TestBaseWithProfile() {
|
||||||
@Before
|
@Before
|
||||||
fun prepare() {
|
fun prepare() {
|
||||||
pumpPlugin = TestPumpPlugin(injector)
|
pumpPlugin = TestPumpPlugin(injector)
|
||||||
commandQueue = CommandQueue(injector, aapsLogger, rxBus, aapsSchedulers, resourceHelper, constraintChecker, profileFunction, activePlugin, context, sp, BuildHelper(ConfigImpl(), fileListProvider), dateUtil, repository, fabricPrivacy)
|
commandQueue = CommandQueue(
|
||||||
|
injector, aapsLogger, rxBus, aapsSchedulers, resourceHelper, constraintChecker,
|
||||||
|
profileFunction, activePlugin, context, sp,
|
||||||
|
BuildHelperImpl(ConfigImpl(), fileListProvider), dateUtil, repository, fabricPrivacy, config
|
||||||
|
)
|
||||||
|
|
||||||
val pumpDescription = PumpDescription()
|
val pumpDescription = PumpDescription()
|
||||||
pumpDescription.basalMinimumRate = 0.1
|
pumpDescription.basalMinimumRate = 0.1
|
||||||
|
@ -69,7 +73,8 @@ class QueueThreadTest : TestBaseWithProfile() {
|
||||||
val rateConstraint = Constraint(0.0)
|
val rateConstraint = Constraint(0.0)
|
||||||
Mockito.`when`(constraintChecker.applyBasalConstraints(anyObject(), anyObject())).thenReturn(rateConstraint)
|
Mockito.`when`(constraintChecker.applyBasalConstraints(anyObject(), anyObject())).thenReturn(rateConstraint)
|
||||||
val percentageConstraint = Constraint(0)
|
val percentageConstraint = Constraint(0)
|
||||||
Mockito.`when`(constraintChecker.applyBasalPercentConstraints(anyObject(), anyObject())).thenReturn(percentageConstraint)
|
Mockito.`when`(constraintChecker.applyBasalPercentConstraints(anyObject(), anyObject()))
|
||||||
|
.thenReturn(percentageConstraint)
|
||||||
|
|
||||||
sut = QueueThread(commandQueue, context, aapsLogger, rxBus, activePlugin, resourceHelper, sp)
|
sut = QueueThread(commandQueue, context, aapsLogger, rxBus, activePlugin, resourceHelper, sp)
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,6 +74,7 @@
|
||||||
<string name="copy_short">복사</string>
|
<string name="copy_short">복사</string>
|
||||||
<string name="temptargetcompared">임시 목표 %1$s</string>
|
<string name="temptargetcompared">임시 목표 %1$s</string>
|
||||||
<string name="btdevicecompared">장치에 블루투스 연결 %1$s %2$s</string>
|
<string name="btdevicecompared">장치에 블루투스 연결 %1$s %2$s</string>
|
||||||
|
<string name="btdevice">블루투스 장치에 연결</string>
|
||||||
<string name="wifissidcompared">WiFi SSID %1$s %2$s</string>
|
<string name="wifissidcompared">WiFi SSID %1$s %2$s</string>
|
||||||
<string name="autosenscompared">Autosens %1$s %2$s %%</string>
|
<string name="autosenscompared">Autosens %1$s %2$s %%</string>
|
||||||
<string name="autosenslabel">Autosens %</string>
|
<string name="autosenslabel">Autosens %</string>
|
||||||
|
|
19
build.gradle
19
build.gradle
|
@ -9,7 +9,7 @@ buildscript {
|
||||||
rxkotlin_version = '2.4.0'
|
rxkotlin_version = '2.4.0'
|
||||||
room_version = '2.3.0'
|
room_version = '2.3.0'
|
||||||
lifecycle_version = '2.3.1'
|
lifecycle_version = '2.3.1'
|
||||||
dagger_version = '2.38.1'
|
dagger_version = '2.39'
|
||||||
coroutinesVersion = '1.4.1'
|
coroutinesVersion = '1.4.1'
|
||||||
activityVersion = '1.3.1'
|
activityVersion = '1.3.1'
|
||||||
fragmentktx_version = '1.3.6'
|
fragmentktx_version = '1.3.6'
|
||||||
|
@ -21,8 +21,9 @@ buildscript {
|
||||||
preferencektx_version = '1.1.1'
|
preferencektx_version = '1.1.1'
|
||||||
commonslang3_version = '3.11'
|
commonslang3_version = '3.11'
|
||||||
commonscodec_version = '1.15'
|
commonscodec_version = '1.15'
|
||||||
jodatime_version = '2.10.11'
|
jodatime_version = '2.10.12'
|
||||||
work_version = '2.5.0'
|
work_version = '2.5.0'
|
||||||
|
tink_version = '1.5.0'
|
||||||
|
|
||||||
junit_version = '4.13.2'
|
junit_version = '4.13.2'
|
||||||
mockitoVersion = '3.12.4'
|
mockitoVersion = '3.12.4'
|
||||||
|
@ -50,12 +51,12 @@ buildscript {
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||||
classpath "org.jetbrains.kotlin:kotlin-allopen:$kotlin_version"
|
classpath "org.jetbrains.kotlin:kotlin-allopen:$kotlin_version"
|
||||||
classpath 'com.hiya:jacoco-android:0.2'
|
classpath 'com.hiya:jacoco-android:0.2'
|
||||||
modules {
|
|
||||||
module("org.jetbrains.trove4j:trove4j") {
|
|
||||||
replacedBy("org.jetbrains.intellij.deps:trove4j")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id "io.gitlab.arturbosch.detekt" version "1.18.1"
|
||||||
|
id "org.jlleitschuh.gradle.ktlint" version "10.2.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
|
@ -64,12 +65,6 @@ allprojects {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
maven { url "https://maven.google.com" }
|
maven { url "https://maven.google.com" }
|
||||||
maven { url 'https://jitpack.io' }
|
maven { url 'https://jitpack.io' }
|
||||||
ivy {
|
|
||||||
url 'https://github.com/'
|
|
||||||
patternLayout {
|
|
||||||
artifact '/[organisation]/[module]/archive/[revision].[ext]'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
//Support @JvmDefault
|
//Support @JvmDefault
|
||||||
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
|
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
|
||||||
|
|
|
@ -46,6 +46,7 @@ dependencies {
|
||||||
|
|
||||||
//CryptoUtil
|
//CryptoUtil
|
||||||
api 'com.madgag.spongycastle:core:1.58.0.0'
|
api 'com.madgag.spongycastle:core:1.58.0.0'
|
||||||
|
api "com.google.crypto.tink:tink-android:$tink_version"
|
||||||
|
|
||||||
// Graphview cannot be upgraded
|
// Graphview cannot be upgraded
|
||||||
api "com.jjoe64:graphview:4.0.1"
|
api "com.jjoe64:graphview:4.0.1"
|
||||||
|
|
|
@ -5,7 +5,7 @@ import dagger.android.support.DaggerAppCompatActivity
|
||||||
import info.nightscout.androidaps.utils.locale.LocaleHelper
|
import info.nightscout.androidaps.utils.locale.LocaleHelper
|
||||||
|
|
||||||
open class DialogAppCompatActivity : DaggerAppCompatActivity() {
|
open class DialogAppCompatActivity : DaggerAppCompatActivity() {
|
||||||
public override fun attachBaseContext(newBase: Context) {
|
override fun attachBaseContext(newBase: Context) {
|
||||||
super.attachBaseContext(LocaleHelper.wrap(newBase))
|
super.attachBaseContext(LocaleHelper.wrap(newBase))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,12 +7,12 @@ import info.nightscout.androidaps.utils.locale.LocaleHelper
|
||||||
|
|
||||||
open class NoSplashAppCompatActivity : DaggerAppCompatActivityWithResult() {
|
open class NoSplashAppCompatActivity : DaggerAppCompatActivityWithResult() {
|
||||||
|
|
||||||
public override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setTheme(R.style.AppTheme_NoActionBar)
|
setTheme(R.style.AppTheme_NoActionBar)
|
||||||
}
|
}
|
||||||
|
|
||||||
public override fun attachBaseContext(newBase: Context) {
|
override fun attachBaseContext(newBase: Context) {
|
||||||
super.attachBaseContext(LocaleHelper.wrap(newBase))
|
super.attachBaseContext(LocaleHelper.wrap(newBase))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,15 @@
|
||||||
package info.nightscout.androidaps.extensions
|
package info.nightscout.androidaps.extensions
|
||||||
|
|
||||||
|
import info.nightscout.androidaps.data.ProfileSealed
|
||||||
|
import info.nightscout.androidaps.database.embedments.InterfaceIDs
|
||||||
import info.nightscout.androidaps.database.entities.EffectiveProfileSwitch
|
import info.nightscout.androidaps.database.entities.EffectiveProfileSwitch
|
||||||
|
import info.nightscout.androidaps.database.entities.TherapyEvent
|
||||||
|
import info.nightscout.androidaps.interfaces.ActivePlugin
|
||||||
|
import info.nightscout.androidaps.interfaces.GlucoseUnit
|
||||||
|
import info.nightscout.androidaps.utils.DateUtil
|
||||||
|
import info.nightscout.androidaps.utils.JsonHelper
|
||||||
import info.nightscout.androidaps.utils.T.Companion.mins
|
import info.nightscout.androidaps.utils.T.Companion.mins
|
||||||
|
import org.json.JSONObject
|
||||||
|
|
||||||
fun List<EffectiveProfileSwitch>.isEPSEvent5minBack(time: Long): Boolean {
|
fun List<EffectiveProfileSwitch>.isEPSEvent5minBack(time: Long): Boolean {
|
||||||
for (event in this) {
|
for (event in this) {
|
||||||
|
@ -15,3 +22,72 @@ fun List<EffectiveProfileSwitch>.isEPSEvent5minBack(time: Long): Boolean {
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun EffectiveProfileSwitch.toJson(isAdd: Boolean, dateUtil: DateUtil): JSONObject =
|
||||||
|
JSONObject()
|
||||||
|
.put("created_at", dateUtil.toISOString(timestamp))
|
||||||
|
.put("enteredBy", "openaps://" + "AndroidAPS")
|
||||||
|
.put("isValid", isValid)
|
||||||
|
.put("eventType", TherapyEvent.Type.NOTE.text) // move to separate collection when available in NS
|
||||||
|
.put("profileJson", ProfileSealed.EPS(this).toPureNsJson(dateUtil).toString())
|
||||||
|
.put("originalProfileName", originalProfileName)
|
||||||
|
.put("originalCustomizedName", originalCustomizedName)
|
||||||
|
.put("originalTimeshift", originalTimeshift)
|
||||||
|
.put("originalPercentage", originalPercentage)
|
||||||
|
.put("originalDuration", originalDuration)
|
||||||
|
.put("originalEnd", originalEnd)
|
||||||
|
.also {
|
||||||
|
if (interfaceIDs.pumpId != null) it.put("pumpId", interfaceIDs.pumpId)
|
||||||
|
if (interfaceIDs.pumpType != null) it.put("pumpType", interfaceIDs.pumpType!!.name)
|
||||||
|
if (interfaceIDs.pumpSerial != null) it.put("pumpSerial", interfaceIDs.pumpSerial)
|
||||||
|
if (isAdd && interfaceIDs.nightscoutId != null) it.put("_id", interfaceIDs.nightscoutId)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun effectiveProfileSwitchFromJson(jsonObject: JSONObject, dateUtil: DateUtil, activePlugin: ActivePlugin): EffectiveProfileSwitch? {
|
||||||
|
val timestamp = JsonHelper.safeGetLongAllowNull(jsonObject, "mills", null) ?: return null
|
||||||
|
val originalTimeshift = JsonHelper.safeGetLong(jsonObject, "originalTimeshift")
|
||||||
|
val originalDuration = JsonHelper.safeGetLong(jsonObject, "originalDuration")
|
||||||
|
val originalEnd = JsonHelper.safeGetLong(jsonObject, "originalEnd")
|
||||||
|
val originalPercentage = JsonHelper.safeGetInt(jsonObject, "originalPercentage", 100)
|
||||||
|
val isValid = JsonHelper.safeGetBoolean(jsonObject, "isValid", true)
|
||||||
|
val id = JsonHelper.safeGetStringAllowNull(jsonObject, "_id", null)
|
||||||
|
val originalProfileName = JsonHelper.safeGetStringAllowNull(jsonObject, "originalProfileName", null) ?: return null
|
||||||
|
val originalCustomizedName = JsonHelper.safeGetStringAllowNull(jsonObject, "originalCustomizedName", null) ?: return null
|
||||||
|
val profileJson = JsonHelper.safeGetStringAllowNull(jsonObject, "profileJson", null) ?: return null
|
||||||
|
val pumpId = JsonHelper.safeGetLongAllowNull(jsonObject, "pumpId", null)
|
||||||
|
val pumpType = InterfaceIDs.PumpType.fromString(JsonHelper.safeGetStringAllowNull(jsonObject, "pumpType", null))
|
||||||
|
val pumpSerial = JsonHelper.safeGetStringAllowNull(jsonObject, "pumpSerial", null)
|
||||||
|
|
||||||
|
if (timestamp == 0L) return null
|
||||||
|
val pureProfile = pureProfileFromJson(JSONObject(profileJson), dateUtil) ?: return null
|
||||||
|
val profileSealed = ProfileSealed.Pure(pureProfile)
|
||||||
|
|
||||||
|
|
||||||
|
return EffectiveProfileSwitch(
|
||||||
|
timestamp = timestamp,
|
||||||
|
basalBlocks = profileSealed.basalBlocks,
|
||||||
|
isfBlocks = profileSealed.isfBlocks,
|
||||||
|
icBlocks = profileSealed.icBlocks,
|
||||||
|
targetBlocks = profileSealed.targetBlocks,
|
||||||
|
glucoseUnit = EffectiveProfileSwitch.GlucoseUnit.fromConstant(profileSealed.units),
|
||||||
|
originalProfileName = originalProfileName,
|
||||||
|
originalCustomizedName = originalCustomizedName,
|
||||||
|
originalTimeshift = originalTimeshift,
|
||||||
|
originalPercentage = originalPercentage,
|
||||||
|
originalDuration = originalDuration,
|
||||||
|
originalEnd = originalEnd,
|
||||||
|
insulinConfiguration = profileSealed.insulinConfiguration,
|
||||||
|
isValid = isValid
|
||||||
|
).also {
|
||||||
|
it.interfaceIDs.nightscoutId = id
|
||||||
|
it.interfaceIDs.pumpId = pumpId
|
||||||
|
it.interfaceIDs.pumpType = pumpType
|
||||||
|
it.interfaceIDs.pumpSerial = pumpSerial
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun EffectiveProfileSwitch.GlucoseUnit.Companion.fromConstant(units: GlucoseUnit): EffectiveProfileSwitch.GlucoseUnit =
|
||||||
|
if (units == GlucoseUnit.MGDL) EffectiveProfileSwitch.GlucoseUnit.MGDL
|
||||||
|
else EffectiveProfileSwitch.GlucoseUnit.MMOL
|
||||||
|
|
||||||
|
fun JSONObject.isEffectiveProfileSwitch() = has("originalProfileName")
|
|
@ -16,6 +16,7 @@ interface DataSyncSelector {
|
||||||
data class PairTemporaryBasal(val value: TemporaryBasal, val updateRecordId: Long)
|
data class PairTemporaryBasal(val value: TemporaryBasal, val updateRecordId: Long)
|
||||||
data class PairExtendedBolus(val value: ExtendedBolus, val updateRecordId: Long)
|
data class PairExtendedBolus(val value: ExtendedBolus, val updateRecordId: Long)
|
||||||
data class PairProfileSwitch(val value: ProfileSwitch, val updateRecordId: Long)
|
data class PairProfileSwitch(val value: ProfileSwitch, val updateRecordId: Long)
|
||||||
|
data class PairEffectiveProfileSwitch(val value: EffectiveProfileSwitch, val updateRecordId: Long)
|
||||||
data class PairOfflineEvent(val value: OfflineEvent, val updateRecordId: Long)
|
data class PairOfflineEvent(val value: OfflineEvent, val updateRecordId: Long)
|
||||||
data class PairProfileStore(val value: JSONObject, val timestampSync: Long)
|
data class PairProfileStore(val value: JSONObject, val timestampSync: Long)
|
||||||
|
|
||||||
|
@ -78,6 +79,11 @@ interface DataSyncSelector {
|
||||||
// Until NS v3
|
// Until NS v3
|
||||||
fun processChangedProfileSwitchesCompat(): Boolean
|
fun processChangedProfileSwitchesCompat(): Boolean
|
||||||
|
|
||||||
|
fun confirmLastEffectiveProfileSwitchIdIfGreater(lastSynced: Long)
|
||||||
|
fun changedEffectiveProfileSwitch() : List<EffectiveProfileSwitch>
|
||||||
|
// Until NS v3
|
||||||
|
fun processChangedEffectiveProfileSwitchesCompat(): Boolean
|
||||||
|
|
||||||
fun confirmLastOfflineEventIdIfGreater(lastSynced: Long)
|
fun confirmLastOfflineEventIdIfGreater(lastSynced: Long)
|
||||||
fun changedOfflineEvents() : List<OfflineEvent>
|
fun changedOfflineEvents() : List<OfflineEvent>
|
||||||
// Until NS v3
|
// Until NS v3
|
||||||
|
|
|
@ -127,7 +127,7 @@ class PrefImportListActivity : DaggerAppCompatActivity() {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
public override fun attachBaseContext(newBase: Context) {
|
override fun attachBaseContext(newBase: Context) {
|
||||||
super.attachBaseContext(LocaleHelper.wrap(newBase))
|
super.attachBaseContext(LocaleHelper.wrap(newBase))
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
package info.nightscout.androidaps.utils.buildHelper
|
||||||
|
|
||||||
|
interface BuildHelper {
|
||||||
|
|
||||||
|
fun isEngineeringModeOrRelease(): Boolean
|
||||||
|
fun isEngineeringMode(): Boolean
|
||||||
|
fun isDev(): Boolean
|
||||||
|
}
|
|
@ -2,6 +2,7 @@ package info.nightscout.androidaps.utils.rx
|
||||||
|
|
||||||
import io.reactivex.Completable
|
import io.reactivex.Completable
|
||||||
import io.reactivex.Flowable
|
import io.reactivex.Flowable
|
||||||
|
import io.reactivex.Observable
|
||||||
import io.reactivex.Single
|
import io.reactivex.Single
|
||||||
import java.util.concurrent.TimeUnit
|
import java.util.concurrent.TimeUnit
|
||||||
import kotlin.math.pow
|
import kotlin.math.pow
|
||||||
|
@ -41,3 +42,21 @@ fun Completable.retryExponentialBackoff(retries: Int, time: Long, timeUnit: Time
|
||||||
Flowable.timer(time * 2.toDouble().pow(retryCount.toDouble()).toLong(), timeUnit)
|
Flowable.timer(time * 2.toDouble().pow(retryCount.toDouble()).toLong(), timeUnit)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline fun <reified T> Observable<T>.retryWithBackoff(
|
||||||
|
retries: Int,
|
||||||
|
delay: Long,
|
||||||
|
timeUnit: TimeUnit,
|
||||||
|
delayFactor: Double = 1.0
|
||||||
|
): Observable<T> = this.retryWhen {
|
||||||
|
it.zipWith(Observable.range(0, retries + 1), { throwable: Throwable, count: Int ->
|
||||||
|
if (count >= retries) {
|
||||||
|
throw throwable
|
||||||
|
} else {
|
||||||
|
count
|
||||||
|
}
|
||||||
|
}).flatMap { retryCount: Int ->
|
||||||
|
val actualDelay = (timeUnit.toMillis(delay) * delayFactor.pow(retryCount.toDouble())).toLong()
|
||||||
|
Observable.timer(actualDelay, TimeUnit.MILLISECONDS)
|
||||||
|
}
|
||||||
|
}
|
|
@ -316,6 +316,7 @@
|
||||||
<string name="uel_disconnect">VERBINDUNG TRENNEN</string>
|
<string name="uel_disconnect">VERBINDUNG TRENNEN</string>
|
||||||
<string name="uel_resume">FORTFAHREN</string>
|
<string name="uel_resume">FORTFAHREN</string>
|
||||||
<string name="uel_suspend">UNTERBRECHEN</string>
|
<string name="uel_suspend">UNTERBRECHEN</string>
|
||||||
|
<string name="uel_hw_pump_allowed">HW PUMPE ERLAUBT</string>
|
||||||
<string name="uel_clear_pairing_keys">PAIRING SCHLÜSSEL LÖSCHEN</string>
|
<string name="uel_clear_pairing_keys">PAIRING SCHLÜSSEL LÖSCHEN</string>
|
||||||
<string name="uel_accepts_temp_basal">TEMP BASAL AKZEPTIEREN</string>
|
<string name="uel_accepts_temp_basal">TEMP BASAL AKZEPTIEREN</string>
|
||||||
<string name="uel_cancel_temp_basal">TEMP BASAL ABBRECHEN</string>
|
<string name="uel_cancel_temp_basal">TEMP BASAL ABBRECHEN</string>
|
||||||
|
@ -332,22 +333,57 @@
|
||||||
<string name="uel_profile_switch_ns_refresh">PROFILWECHSEL NIGHTSCOUT AKTUALISIEREN</string>
|
<string name="uel_profile_switch_ns_refresh">PROFILWECHSEL NIGHTSCOUT AKTUALISIEREN</string>
|
||||||
<string name="uel_treatments_ns_refresh">BEHANDLUNGEN NIGHTSCOUT AKTUALISIEREN </string>
|
<string name="uel_treatments_ns_refresh">BEHANDLUNGEN NIGHTSCOUT AKTUALISIEREN </string>
|
||||||
<string name="uel_tt_ns_refresh">TEMP. ZIEL NS AKTUALISIEREN</string>
|
<string name="uel_tt_ns_refresh">TEMP. ZIEL NS AKTUALISIEREN</string>
|
||||||
|
<string name="uel_automation_removed">AUTOMATION ENTFERNT</string>
|
||||||
|
<string name="uel_bg_removed">BZ ENTFERNT</string>
|
||||||
|
<string name="uel_careportal_removed">CAREPORTAL ENTFERNT</string>
|
||||||
<string name="uel_bolus_removed">BOLUS ENTFERNT</string>
|
<string name="uel_bolus_removed">BOLUS ENTFERNT</string>
|
||||||
<string name="uel_carbs_removed">KOHLENHYDRATE ENTFERNT</string>
|
<string name="uel_carbs_removed">KOHLENHYDRATE ENTFERNT</string>
|
||||||
<string name="uel_temp_basal_removed">TEMP BASAL ENTFERNT</string>
|
<string name="uel_temp_basal_removed">TEMP BASAL ENTFERNT</string>
|
||||||
|
<string name="uel_extended_bolus_removed">VERZÖGERTER BOLUS ENTFERNT</string>
|
||||||
<string name="uel_food">NAHRUNG</string>
|
<string name="uel_food">NAHRUNG</string>
|
||||||
|
<string name="uel_food_removed">LEBENSMITTEL ENTFERNT</string>
|
||||||
|
<string name="uel_profile_removed">PROFIL ENTFERNT</string>
|
||||||
|
<string name="uel_profile_switch_removed">PROFILWECHSEL ENTFERNT</string>
|
||||||
|
<string name="uel_restart_events_removed">NEUSTARTS ENTFERNT</string>
|
||||||
|
<string name="uel_treatment_removed">BEHANDLUNGEN ENTFERNT</string>
|
||||||
<string name="uel_tt_removed">TEMP ZIEL ENTFERNT</string>
|
<string name="uel_tt_removed">TEMP ZIEL ENTFERNT</string>
|
||||||
|
<string name="uel_ns_paused">NS PAUSIERT</string>
|
||||||
|
<string name="uel_ns_resume">NS NEUSTART</string>
|
||||||
|
<string name="uel_ns_queue_cleared">NS WARTESCHLANGE GELÖSCHT</string>
|
||||||
|
<string name="uel_ns_settings_copied">NS EINSTELLUNGEN KOPIERT</string>
|
||||||
|
<string name="uel_error_dialog_ok">WARNMELDUNG OK</string>
|
||||||
|
<string name="uel_error_dialog_mute">WARNMELDUNGEN STUMM</string>
|
||||||
|
<string name="uel_error_dialog_mute_5min">WARNMELDUNGEN STUMM 5 MIN</string>
|
||||||
|
<string name="uel_objective_started">OBJECTIVE GESTARTET</string>
|
||||||
|
<string name="uel_objective_unstarted">OBJECTIVE NICHT GESTARTET</string>
|
||||||
|
<string name="uel_objectives_skipped">OBJECTIVES ÜBERSPRUNGEN</string>
|
||||||
|
<string name="uel_stat_reset">STATISTIKEN ZURÜCKGESETZT</string>
|
||||||
|
<string name="uel_delete_logs">LOGS LÖSCHEN</string>
|
||||||
|
<string name="uel_delete_future_treatments">BEHANDLUNGEN IN DER ZUKUNFT ENTFERNEN</string>
|
||||||
|
<string name="uel_export_settings">EINSTELLUNGEN EXPORTIEREN</string>
|
||||||
|
<string name="uel_import_settings">EINSTELLUNGEN IMPORTIEREN</string>
|
||||||
|
<string name="uel_reset_databases">DATENBANK ZURÜCKSETZEN</string>
|
||||||
|
<string name="uel_export_databases">DATENBANK EXPORTIEREN</string>
|
||||||
|
<string name="uel_import_databases">DATENBANK IMPORTIEREN</string>
|
||||||
|
<string name="uel_otp_export">OTP EXPORT</string>
|
||||||
|
<string name="uel_otp_reset">OTP ZURÜCKSETZEN</string>
|
||||||
<string name="uel_stop_sms">STOP SMS</string>
|
<string name="uel_stop_sms">STOP SMS</string>
|
||||||
|
<string name="uel_export_csv">BENUTZEREINTRÄGE EXPORTIEREN</string>
|
||||||
<string name="uel_start_aaps">STARTE AAPS</string>
|
<string name="uel_start_aaps">STARTE AAPS</string>
|
||||||
<string name="uel_exit_aaps">AAPS BEENDEN</string>
|
<string name="uel_exit_aaps">AAPS BEENDEN</string>
|
||||||
<string name="uel_plugin_enabled">PLUGIN AKTIVIERT</string>
|
<string name="uel_plugin_enabled">PLUGIN AKTIVIERT</string>
|
||||||
<string name="uel_plugin_disabled">PLUGIN DEAKTIVIERT</string>
|
<string name="uel_plugin_disabled">PLUGIN DEAKTIVIERT</string>
|
||||||
|
<string name="uel_unknown">UNBEKANNT</string>
|
||||||
<string name="ue_string">Zeichenfolge</string>
|
<string name="ue_string">Zeichenfolge</string>
|
||||||
<string name="ue_source">Quelle</string>
|
<string name="ue_source">Quelle</string>
|
||||||
<string name="ue_utc_offset">UTC-Abstand</string>
|
<string name="ue_utc_offset">UTC-Abstand</string>
|
||||||
<string name="ue_action">Aktion</string>
|
<string name="ue_action">Aktion</string>
|
||||||
<string name="ue_timestamp">Zeitstempel</string>
|
<string name="ue_timestamp">Zeitstempel</string>
|
||||||
<string name="ue_none">Keine Einheit</string>
|
<string name="ue_none">Keine Einheit</string>
|
||||||
|
<string name="ue_export_to_csv">Benutzereinträge nach Excel exportieren (csv)</string>
|
||||||
|
<string name="uel_loop_change">LOOP GEÄNDERT</string>
|
||||||
|
<string name="uel_loop_removed">LOOP ENTFERNT</string>
|
||||||
|
<string name="uel_other">ANDERE</string>
|
||||||
<!-- HardLimits -->
|
<!-- HardLimits -->
|
||||||
<string name="profile_low_target">Profil unteres Ziel</string>
|
<string name="profile_low_target">Profil unteres Ziel</string>
|
||||||
<string name="profile_high_target">Profil oberes Ziel</string>
|
<string name="profile_high_target">Profil oberes Ziel</string>
|
||||||
|
@ -361,6 +397,8 @@
|
||||||
<string name="profile_carbs_ratio_value">Profil KH-Faktor</string>
|
<string name="profile_carbs_ratio_value">Profil KH-Faktor</string>
|
||||||
<string name="valuelimitedto">%1$.2f limitiert auf %2$.2f</string>
|
<string name="valuelimitedto">%1$.2f limitiert auf %2$.2f</string>
|
||||||
<string name="valueoutofrange">»%1$s« ist außerhalb der fest programmierten Grenzen</string>
|
<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>
|
||||||
<plurals name="days">
|
<plurals name="days">
|
||||||
<item quantity="one">%1$d Tag</item>
|
<item quantity="one">%1$d Tag</item>
|
||||||
<item quantity="other">%1$d Tage</item>
|
<item quantity="other">%1$d Tage</item>
|
||||||
|
|
|
@ -9,8 +9,10 @@
|
||||||
<string name="profile_set_ok">Basal 프로파일이 펌프에 업데이트 되었습니다</string>
|
<string name="profile_set_ok">Basal 프로파일이 펌프에 업데이트 되었습니다</string>
|
||||||
<string name="invalidinput">사용할수 없는 입력 데이터</string>
|
<string name="invalidinput">사용할수 없는 입력 데이터</string>
|
||||||
<string name="tempbasaldeliveryerror">임시Basal 주입 에러</string>
|
<string name="tempbasaldeliveryerror">임시Basal 주입 에러</string>
|
||||||
|
<string name="goingtodeliver">%1$.2f U을 주입합니다.</string>
|
||||||
<string name="waitingforpump">펌프를 기다리는 중</string>
|
<string name="waitingforpump">펌프를 기다리는 중</string>
|
||||||
<string name="connectingfor">%1$d 초 동안 연결중</string>
|
<string name="connectingfor">%1$d 초 동안 연결중</string>
|
||||||
|
<string name="bolusdelivering">%1$.2f U 주입 중</string>
|
||||||
<string name="handshaking">통신 확인</string>
|
<string name="handshaking">통신 확인</string>
|
||||||
<string name="connecting">연결중</string>
|
<string name="connecting">연결중</string>
|
||||||
<string name="connected">연결됨</string>
|
<string name="connected">연결됨</string>
|
||||||
|
@ -19,6 +21,8 @@
|
||||||
<string name="androidaps_start">AndroidAPS 시작</string>
|
<string name="androidaps_start">AndroidAPS 시작</string>
|
||||||
<string name="formatinsulinunits1">%1$.1f U</string>
|
<string name="formatinsulinunits1">%1$.1f U</string>
|
||||||
<string name="formatinsulinunits">%1$.2f U</string>
|
<string name="formatinsulinunits">%1$.2f U</string>
|
||||||
|
<string name="formatsignedinsulinunits">%1$+.2f U</string>
|
||||||
|
<string name="format_carbs">%1$d g</string>
|
||||||
<string name="reservoirvalue">%1$.0f / %2$d U</string>
|
<string name="reservoirvalue">%1$.0f / %2$d U</string>
|
||||||
<string name="pump_basebasalrate">%1$.2f U/h</string>
|
<string name="pump_basebasalrate">%1$.2f U/h</string>
|
||||||
<string name="format_hours">%1$.2f 시간</string>
|
<string name="format_hours">%1$.2f 시간</string>
|
||||||
|
@ -59,6 +63,7 @@
|
||||||
<string name="mgdl">mg/dl</string>
|
<string name="mgdl">mg/dl</string>
|
||||||
<string name="mmol">mmol/l</string>
|
<string name="mmol">mmol/l</string>
|
||||||
<string name="shortgram">g</string>
|
<string name="shortgram">g</string>
|
||||||
|
<string name="shortpercent">%</string>
|
||||||
<string name="advancedsettings_title">고급 설정</string>
|
<string name="advancedsettings_title">고급 설정</string>
|
||||||
<string name="bluetooth">블루투스</string>
|
<string name="bluetooth">블루투스</string>
|
||||||
<string name="btwatchdog_title">블루투스 감시기능</string>
|
<string name="btwatchdog_title">블루투스 감시기능</string>
|
||||||
|
@ -67,6 +72,7 @@
|
||||||
<string name="yes">네</string>
|
<string name="yes">네</string>
|
||||||
<string name="no">아니오</string>
|
<string name="no">아니오</string>
|
||||||
<string name="loopdisabled">제한으로 인해 LOOP가 사용불가합니다.</string>
|
<string name="loopdisabled">제한으로 인해 LOOP가 사용불가합니다.</string>
|
||||||
|
<string name="bolusdelivered">Bolus %1$.2f U이 성공적으로 주입되었습니다.</string>
|
||||||
<string name="virtualpump_resultok">네</string>
|
<string name="virtualpump_resultok">네</string>
|
||||||
<string name="novalidbasalrate">펌프에서 유효한 Basal양을 읽을 수 없습니다.</string>
|
<string name="novalidbasalrate">펌프에서 유효한 Basal양을 읽을 수 없습니다.</string>
|
||||||
<string name="limitingmaxiob">%2$s로 인해 최대 IOB가 %1$.1f U로 제한됩니다.</string>
|
<string name="limitingmaxiob">%2$s로 인해 최대 IOB가 %1$.1f U로 제한됩니다.</string>
|
||||||
|
@ -93,10 +99,12 @@
|
||||||
<string name="name_short">이름:</string>
|
<string name="name_short">이름:</string>
|
||||||
<string name="time">시간</string>
|
<string name="time">시간</string>
|
||||||
<string name="ns_wifi_ssids">와이파이 SSID</string>
|
<string name="ns_wifi_ssids">와이파이 SSID</string>
|
||||||
|
<string name="loading">로딩 중 …</string>
|
||||||
<string name="event_time_label">이벤트 시간</string>
|
<string name="event_time_label">이벤트 시간</string>
|
||||||
<string name="notes_label">노트</string>
|
<string name="notes_label">노트</string>
|
||||||
<string name="remove_button">삭제</string>
|
<string name="remove_button">삭제</string>
|
||||||
<string name="addnew">새로 추가</string>
|
<string name="addnew">새로 추가</string>
|
||||||
|
<string name="wrong_pump_data">다른 펌프에서 전송된 데이터. 펌프 상태 재설정을 위해 펌프 드라이버를 바꾸세요.</string>
|
||||||
<!-- Constraints-->
|
<!-- Constraints-->
|
||||||
<string name="limitingbasalratio">%2$s로 인해 최대 Basal양이 %1$.2f U/h으로 제한됩니다.</string>
|
<string name="limitingbasalratio">%2$s로 인해 최대 Basal양이 %1$.2f U/h으로 제한됩니다.</string>
|
||||||
<string name="pumplimit">펌프 제한</string>
|
<string name="pumplimit">펌프 제한</string>
|
||||||
|
@ -112,10 +120,13 @@
|
||||||
<string name="dismiss">무시</string>
|
<string name="dismiss">무시</string>
|
||||||
<!-- BlePreCheck-->
|
<!-- BlePreCheck-->
|
||||||
<string name="ble_not_supported">BLE(블루투스 저전력) 지원되지 않음</string>
|
<string name="ble_not_supported">BLE(블루투스 저전력) 지원되지 않음</string>
|
||||||
|
<string name="ble_not_supported_or_not_paired">저전력 블루투스(BLE)가 작동하지 않거나, 기기가 연동되지 않았습니다.</string>
|
||||||
<string name="ble_not_enabled">블루투스가 활성화되지 않았습니다.</string>
|
<string name="ble_not_enabled">블루투스가 활성화되지 않았습니다.</string>
|
||||||
<string name="location_not_found_title">위치가 활성화되지 않았습니다.</string>
|
<string name="location_not_found_title">위치가 활성화되지 않았습니다.</string>
|
||||||
<string name="location_not_found_message">최신 스마트폰에서 블루투스 검색이 작동하려면 위치가 활성화되어 있어야합니다. AAPS는 당신의 위치를 추적하지 않으며 페어링에 성공한 후 비활성화 할 수 있습니다.</string>
|
<string name="location_not_found_message">최신 스마트폰에서 블루투스 검색이 작동하려면 위치가 활성화되어 있어야합니다. AAPS는 당신의 위치를 추적하지 않으며 페어링에 성공한 후 비활성화 할 수 있습니다.</string>
|
||||||
<!-- DateUtil-->
|
<!-- DateUtil-->
|
||||||
|
<string name="minago">%1$d 분 전</string>
|
||||||
|
<string name="hoursago">%1$.1f 시간 전</string>
|
||||||
<string name="shorthour">시간</string>
|
<string name="shorthour">시간</string>
|
||||||
<string name="days">일</string>
|
<string name="days">일</string>
|
||||||
<string name="hours">시간</string>
|
<string name="hours">시간</string>
|
||||||
|
@ -133,6 +144,7 @@
|
||||||
<string name="shortday">일</string>
|
<string name="shortday">일</string>
|
||||||
<!-- Protection-->
|
<!-- Protection-->
|
||||||
<string name="wrongpassword">잘못된 비밀번호</string>
|
<string name="wrongpassword">잘못된 비밀번호</string>
|
||||||
|
<string name="passwords_dont_match">비밀번호가 일치하지 않습니다.</string>
|
||||||
<!-- Profile-->
|
<!-- Profile-->
|
||||||
<string name="basalprofilenotaligned">Basal값이 시간단위로 설정되지 않았습니다: %1$s</string>
|
<string name="basalprofilenotaligned">Basal값이 시간단위로 설정되지 않았습니다: %1$s</string>
|
||||||
<string name="minimalbasalvaluereplaced">지원되는 최소값으로 Basal값이 대체되었습니다:%1$s</string>
|
<string name="minimalbasalvaluereplaced">지원되는 최소값으로 Basal값이 대체되었습니다:%1$s</string>
|
||||||
|
@ -155,9 +167,14 @@
|
||||||
<!-- ProfileSwitch-->
|
<!-- ProfileSwitch-->
|
||||||
<string name="zerovalueinprofile">유효하지 않은 프로파일: %1$s</string>
|
<string name="zerovalueinprofile">유효하지 않은 프로파일: %1$s</string>
|
||||||
<!-- Temptarget-->
|
<!-- Temptarget-->
|
||||||
|
<string name="mins">%1$d 분</string>
|
||||||
<!-- TDD-->
|
<!-- TDD-->
|
||||||
|
<string name="tddformat"><![CDATA[<b>%1$s:</b> ∑: <b>%2$.2f U</b> Bol: <b>%3$.2f U</b> Bas: <b>%4$.2f U(%5$.0f%%)</b>]]></string>
|
||||||
|
<string name="tddwithcarbsformat"><![CDATA[<b>%1$s:</b> ∑: <b>%2$.2f U</b> Bol: <b>%3$.2f U</b> Bas: <b>%4$.2f U(%5$.0f%%)</b> Carbs: <b>%6$.0f g</b>]]></string>
|
||||||
|
<string name="activitymonitorformat"><![CDATA[<b>%3$d</b> 일<br>에 <b><span style=\"color:yellow\">%1$s:</span></b> <b>%2$s</b>]]></string>
|
||||||
<!-- Translator-->
|
<!-- Translator-->
|
||||||
<string name="careportal_bgcheck">혈당 체크</string>
|
<string name="careportal_bgcheck">혈당 체크</string>
|
||||||
|
<string name="careportal_mbg">수동 BG 값 입력 또는 보정</string>
|
||||||
<string name="careportal_announcement">알림</string>
|
<string name="careportal_announcement">알림</string>
|
||||||
<string name="careportal_note">노트</string>
|
<string name="careportal_note">노트</string>
|
||||||
<string name="careportal_question">의문</string>
|
<string name="careportal_question">의문</string>
|
||||||
|
@ -165,6 +182,8 @@
|
||||||
<string name="careportal_pumpsitechange">펌프 위치 변경</string>
|
<string name="careportal_pumpsitechange">펌프 위치 변경</string>
|
||||||
<string name="careportal_cgmsensorinsert">CGM 센서 삽입</string>
|
<string name="careportal_cgmsensorinsert">CGM 센서 삽입</string>
|
||||||
<string name="careportal_cgmsensorstart">CGM 센서 시작</string>
|
<string name="careportal_cgmsensorstart">CGM 센서 시작</string>
|
||||||
|
<string name="careportal_cgm_sensor_stop">CGM 센서 정지</string>
|
||||||
|
<string name="careportal_dad_alert">D.A.D 경고</string>
|
||||||
<string name="careportal_insulincartridgechange">인슐린 카트리지 교체</string>
|
<string name="careportal_insulincartridgechange">인슐린 카트리지 교체</string>
|
||||||
<string name="careportal_profileswitch">프로파일 변경</string>
|
<string name="careportal_profileswitch">프로파일 변경</string>
|
||||||
<string name="careportal_snackbolus">간식Bolus</string>
|
<string name="careportal_snackbolus">간식Bolus</string>
|
||||||
|
@ -191,6 +210,8 @@
|
||||||
<string name="custom">사용자 정의</string>
|
<string name="custom">사용자 정의</string>
|
||||||
<string name="pump">펌프</string>
|
<string name="pump">펌프</string>
|
||||||
<string name="loop">Loop</string>
|
<string name="loop">Loop</string>
|
||||||
|
<string name="ns">NS</string>
|
||||||
|
<string name="record">기록</string>
|
||||||
<!-- Command-->
|
<!-- Command-->
|
||||||
<string name="connectiontimedout">연결시간초과</string>
|
<string name="connectiontimedout">연결시간초과</string>
|
||||||
<!-- PumpEnactResult-->
|
<!-- PumpEnactResult-->
|
||||||
|
@ -204,7 +225,9 @@
|
||||||
<string name="waitingforpumpresult">결과 기다리는 중</string>
|
<string name="waitingforpumpresult">결과 기다리는 중</string>
|
||||||
<string name="smb_shortname">SMB</string>
|
<string name="smb_shortname">SMB</string>
|
||||||
<!-- CarbsReq-->
|
<!-- CarbsReq-->
|
||||||
|
<string name="carbsreq">%2$d 분 안에 %1$d g의 추가적인 탄수화물이 요구됨</string>
|
||||||
<!-- TDDStatsActivity-->
|
<!-- TDDStatsActivity-->
|
||||||
|
<string name="stats">통계</string>
|
||||||
<string name="cumulative_tdd">누적 일총량</string>
|
<string name="cumulative_tdd">누적 일총량</string>
|
||||||
<string name="expweight">지수가중 일총량</string>
|
<string name="expweight">지수가중 일총량</string>
|
||||||
<string name="basalrate">Basal</string>
|
<string name="basalrate">Basal</string>
|
||||||
|
@ -219,13 +242,43 @@
|
||||||
<string name="tbb2">총기초량 * 2</string>
|
<string name="tbb2">총기초량 * 2</string>
|
||||||
<!-- Ntp-->
|
<!-- Ntp-->
|
||||||
<string name="timedetection">시간 감지</string>
|
<string name="timedetection">시간 감지</string>
|
||||||
|
<string name="format_hour_minute">%1$d시 %2$d분</string>
|
||||||
|
<string name="mute5min">5분 동안 음소거</string>
|
||||||
<!-- Maintenance -->
|
<!-- Maintenance -->
|
||||||
|
<string name="metadata_label_format">파일 형식</string>
|
||||||
|
<string name="metadata_label_created_at">생성 일자</string>
|
||||||
|
<string name="metadata_label_aaps_version">AAPS 버전</string>
|
||||||
|
<string name="metadata_label_aaps_flavour">다른 형식 빌드</string>
|
||||||
|
<string name="metadata_label_device_name">장치의 환자 이름 내보내기</string>
|
||||||
|
<string name="metadata_label_device_model">장치 모델 내보내기</string>
|
||||||
|
<string name="metadata_label_encryption">파일 암호화</string>
|
||||||
|
<string name="metadata_format_old">오래된 내보내기 형식</string>
|
||||||
|
<string name="metadata_format_new">암호화된 새로운 형식</string>
|
||||||
|
<string name="metadata_format_debug">오류가 제거된 새로운 형식 (암호화되지 않음)</string>
|
||||||
|
<string name="metadata_format_other">알려지지 않은 내보내기 형식</string>
|
||||||
|
<string name="exported_ago" comment="at placeholder we add pluralized number of hours/minutes">%1$s 전에 내보내기 함</string>
|
||||||
|
<string name="exported_at" comment="at placeholder we add export date">%1$s에 내보내기 함</string>
|
||||||
|
<string name="exported_less_than_hour_ago">내보내기 한지 1시간이 지나지 않았습니다.</string>
|
||||||
|
<string name="in_directory" comment="placeholder is for exported file path">디렉토리: %1$s</string>
|
||||||
<string name="preferences_import_list_title">가져올 파일을 선택하세요.</string>
|
<string name="preferences_import_list_title">가져올 파일을 선택하세요.</string>
|
||||||
<string name="metadata_warning_different_flavour">환경설정은 AAPS (%1$s) 와는 다르게 생성되기 때문에 불러오는 도중 일부 설정이 누락되거나 설정이 되지 않을 수 있습니다. - 가져오기를 수행한 후 설정을 확인하고 업데이트 해주시기 바랍니다.</string>
|
<string name="metadata_warning_different_flavour">환경설정은 AAPS (%1$s) 와는 다르게 생성되기 때문에 불러오는 도중 일부 설정이 누락되거나 설정이 되지 않을 수 있습니다. - 가져오기를 수행한 후 설정을 확인하고 업데이트 해주시기 바랍니다.</string>
|
||||||
<string name="metadata_warning_different_device">환경설정은 다른 기기에서 설정되었습니다. 다른 혹은 전에 쓰던 기기에서 환경설정을 가져오는 건 괜찮지만 가져온 후 환경설정이 올바르게 설정되었는지 확인해주시기 바랍니다.</string>
|
<string name="metadata_warning_different_device">환경설정은 다른 기기에서 설정되었습니다. 다른 혹은 전에 쓰던 기기에서 환경설정을 가져오는 건 괜찮지만 가져온 후 환경설정이 올바르게 설정되었는지 확인해주시기 바랍니다.</string>
|
||||||
<string name="metadata_warning_outdated_format">이전 버전의 AAPS에서 사용하는 구식 legacy 포멧은 안전하지 않습니다. 최근에 내보내기한 설정이 없는 경우에만 최후의 수단으로 JSONㅠ포멧을 사용해주시기 바랍니다.</string>
|
<string name="metadata_warning_outdated_format">이전 버전의 AAPS에서 사용하는 구식 legacy 포멧은 안전하지 않습니다. 최근에 내보내기한 설정이 없는 경우에만 최후의 수단으로 JSONㅠ포멧을 사용해주시기 바랍니다.</string>
|
||||||
<string name="metadata_warning_old_export">가져온 환경설정은 이미 %1$s일이 지났습니다. 최신의 환경설정으로 업데이트된 파일이 있거나 잘못된 파일을 선택하셨을 수도 있습니다. 환경설정을 정기적으로 내보주시기 바랍니다.</string>
|
<string name="metadata_warning_old_export">가져온 환경설정은 이미 %1$s일이 지났습니다. 최신의 환경설정으로 업데이트된 파일이 있거나 잘못된 파일을 선택하셨을 수도 있습니다. 환경설정을 정기적으로 내보주시기 바랍니다.</string>
|
||||||
<string name="metadata_warning_date_format">잘못된 날짜 형식입니다.</string>
|
<string name="metadata_warning_date_format">잘못된 날짜 형식입니다.</string>
|
||||||
|
<string name="metadata_warning_different_version">다른 하위 버전 어플의 설정입니다. 업그레이드 후에 설정을 불러오는 것은 괜찮지만, 설정이 올바른지 확인하십시오!</string>
|
||||||
|
<string name="metadata_urgent_different_version">다른 상위 버전 어플의 설정입니다. 상위 버전은 매우 상이하며, 호환되지 않는 설정일 수 있습니다! 설정을 불러온 후 올바른지 반드시 확인하십시오!</string>
|
||||||
|
<string name="prefdecrypt_settings_tampered">설정 파일 변경됨</string>
|
||||||
|
<string name="prefdecrypt_settings_secure">설정 파일 안전함</string>
|
||||||
|
<string name="prefdecrypt_settings_unencrypted">안전하지 않음, 암호화되지 않은 설정 형식</string>
|
||||||
|
<string name="prefdecrypt_wrong_json">JSON 형식 에러, 필요 영역 손실됨 (형식, 내용, 메타데이터, 또는 보안)</string>
|
||||||
|
<string name="prefdecrypt_wrong_password">암호 해독 에러, 입력한 비빌번호가 파일을 열 수 없습니다.</string>
|
||||||
|
<string name="prefdecrypt_issue_missing_file_hash">파일의 checksum (hash) 손실됨, 설정의 진위를 확인할 수 없습니다.</string>
|
||||||
|
<string name="prefdecrypt_issue_modified">내보내기 후 파일이 변형되었습니다!</string>
|
||||||
|
<string name="prefdecrypt_issue_parsing">해독 에러, 파싱 설정 실패함!</string>
|
||||||
|
<string name="prefdecrypt_issue_wrong_pass">해독 에러, 입력한 비밀번호가 유효하지 않거나 설정 파일이 수정되었습니다. 가져온 파일이 다른 마스터 비밀번호로 내보내기 되었을 가능성이 있습니다.</string>
|
||||||
|
<string name="prefdecrypt_issue_wrong_format">암호화 설정이 누락되었음, 설정 형식이 유효하지 않습니다!</string>
|
||||||
|
<string name="prefdecrypt_issue_wrong_algorithm">지원되지 않는 또는 명시되지 않은 암호화 알고리즘!</string>
|
||||||
<!-- VersionChecker -->
|
<!-- VersionChecker -->
|
||||||
<string name="signature_verifier">서명 확인</string>
|
<string name="signature_verifier">서명 확인</string>
|
||||||
<string name="running_invalid_version">유효하지 않은 버전을 이용 중입니다. Loop가 비활성화 되었습니다!</string>
|
<string name="running_invalid_version">유효하지 않은 버전을 이용 중입니다. Loop가 비활성화 되었습니다!</string>
|
||||||
|
@ -233,9 +286,119 @@
|
||||||
<!-- Permissions -->
|
<!-- Permissions -->
|
||||||
<string name="alert_dialog_storage_permission_text">폰을 재부팅하거나 AndroidAPS를 재시작하세요 \n그렇지 않으면 로그 기록이 되지 않습니다.(알고리즘이 정상적인 작동하는지 확인하기 위해 로그가 필요합니다.)!</string>
|
<string name="alert_dialog_storage_permission_text">폰을 재부팅하거나 AndroidAPS를 재시작하세요 \n그렇지 않으면 로그 기록이 되지 않습니다.(알고리즘이 정상적인 작동하는지 확인하기 위해 로그가 필요합니다.)!</string>
|
||||||
<!-- WeekdayPicker -->
|
<!-- WeekdayPicker -->
|
||||||
|
<string name="monday_short">월</string>
|
||||||
|
<string name="tuesday_short">화</string>
|
||||||
|
<string name="wednesday_short">수</string>
|
||||||
|
<string name="thursday_short">목</string>
|
||||||
|
<string name="friday_short">금</string>
|
||||||
|
<string name="saturday_short">토</string>
|
||||||
|
<string name="sunday_short">일</string>
|
||||||
<!-- User Entry -->
|
<!-- User Entry -->
|
||||||
|
<string name="uel_bolus">Bolus</string>
|
||||||
|
<string name="uel_bolus_advisor">Bolus 어드바이저</string>
|
||||||
|
<string name="uel_extended_bolus">확장 bolus</string>
|
||||||
|
<string name="uel_superbolus_tbr">Superbolus TBR</string>
|
||||||
|
<string name="uel_carbs">탄수화물</string>
|
||||||
|
<string name="uel_extended_carbs">확장 탄수화물</string>
|
||||||
|
<string name="uel_temp_basal">임시 basal</string>
|
||||||
|
<string name="uel_tt">임시 목표</string>
|
||||||
|
<string name="uel_new_profile">새로운 프로파일</string>
|
||||||
|
<string name="uel_clone_profile">프로파일 복사</string>
|
||||||
|
<string name="uel_store_profile">프로파일 저장</string>
|
||||||
|
<string name="uel_profile_switch">프로파일 변경</string>
|
||||||
|
<string name="uel_profile_switch_cloned">프로파일 변경 복사됨</string>
|
||||||
|
<string name="uel_closed_loop_mode">Closed loop 모드</string>
|
||||||
|
<string name="uel_lgs_loop_mode">LGS loop 모드</string>
|
||||||
|
<string name="uel_open_loop_mode">Open loop 모드</string>
|
||||||
|
<string name="uel_loop_disabled">Loop 사용하지 않음</string>
|
||||||
|
<string name="uel_loop_enabled">Loop 사용함</string>
|
||||||
|
<string name="uel_reconnect">재연결</string>
|
||||||
|
<string name="uel_disconnect">연결 끊기</string>
|
||||||
|
<string name="uel_resume">재시작</string>
|
||||||
|
<string name="uel_suspend">일시 정지</string>
|
||||||
|
<string name="uel_hw_pump_allowed">HW 펌프 허가됨</string>
|
||||||
|
<string name="uel_clear_pairing_keys">연동 비밀번호 삭제</string>
|
||||||
|
<string name="uel_accepts_temp_basal">임시 basal 수락</string>
|
||||||
|
<string name="uel_cancel_temp_basal">임시 basal 취소</string>
|
||||||
|
<string name="uel_cancel_bolus">Bolus 취소</string>
|
||||||
|
<string name="uel_cancel_extended_bolus">확장 bolus 취소</string>
|
||||||
|
<string name="uel_cancel_tt">임시 목표 취소</string>
|
||||||
|
<string name="uel_careportal">케어포털</string>
|
||||||
|
<string name="uel_site_change">삽입 위치 변경</string>
|
||||||
|
<string name="uel_reservoir_change">펌프 주사기 변경</string>
|
||||||
|
<string name="uel_calibration">보정</string>
|
||||||
|
<string name="uel_prime_bolus">프라임 bolus</string>
|
||||||
|
<string name="uel_treatment">처치</string>
|
||||||
|
<string name="uel_careportal_ns_refresh">케어포털 NS 새로고침</string>
|
||||||
|
<string name="uel_profile_switch_ns_refresh">프로파일 변경 NS 새로고침</string>
|
||||||
|
<string name="uel_treatments_ns_refresh">처치 NS 새로고침</string>
|
||||||
|
<string name="uel_tt_ns_refresh">임시 목표 NS 새로고침</string>
|
||||||
|
<string name="uel_automation_removed">자동화 제거됨</string>
|
||||||
|
<string name="uel_bg_removed">혈당 제거됨</string>
|
||||||
|
<string name="uel_careportal_removed">케어포털 제거됨</string>
|
||||||
|
<string name="uel_bolus_removed">bolus 제거됨</string>
|
||||||
|
<string name="uel_carbs_removed">탄수화물 제거됨</string>
|
||||||
|
<string name="uel_temp_basal_removed">임시 basal 제거됨</string>
|
||||||
|
<string name="uel_extended_bolus_removed">확장 bolus 제거됨</string>
|
||||||
|
<string name="uel_food">음식</string>
|
||||||
|
<string name="uel_food_removed">음식 제거됨</string>
|
||||||
|
<string name="uel_profile_removed">프로파일 제거됨</string>
|
||||||
|
<string name="uel_profile_switch_removed">프로파일 변경 제거됨</string>
|
||||||
|
<string name="uel_restart_events_removed">재시작 이벤트 제거됨</string>
|
||||||
|
<string name="uel_treatment_removed">처치 제거됨</string>
|
||||||
|
<string name="uel_tt_removed">임시 목표 제거됨</string>
|
||||||
|
<string name="uel_ns_paused">NS 정지</string>
|
||||||
|
<string name="uel_ns_resume">NS 재시작</string>
|
||||||
|
<string name="uel_ns_queue_cleared">NS 대기열 제거함</string>
|
||||||
|
<string name="uel_ns_settings_copied">NS 설정 복사됨</string>
|
||||||
|
<string name="uel_error_dialog_ok">에러 대화상자 확인</string>
|
||||||
|
<string name="uel_error_dialog_mute">에러 대화상자 음소거 </string>
|
||||||
|
<string name="uel_error_dialog_mute_5min">에러 대화상자 5분간 음소거</string>
|
||||||
|
<string name="uel_objective_started">목표 시작됨</string>
|
||||||
|
<string name="uel_objective_unstarted">목표 시작되지 않음</string>
|
||||||
|
<string name="uel_objectives_skipped">목표를 건너뜀</string>
|
||||||
|
<string name="uel_stat_reset">통계 재설정</string>
|
||||||
|
<string name="uel_delete_logs">로그 지우기</string>
|
||||||
|
<string name="uel_delete_future_treatments">이후의 처치 지우기</string>
|
||||||
|
<string name="uel_export_settings">설정 내보내기</string>
|
||||||
|
<string name="uel_import_settings">설정 들여오기</string>
|
||||||
|
<string name="uel_reset_databases">데이터베이스 재설정</string>
|
||||||
|
<string name="uel_export_databases">데이터베이스 내보내기</string>
|
||||||
|
<string name="uel_import_databases">데이터베이스 들여오기</string>
|
||||||
|
<string name="uel_otp_export">OTP 내보내기</string>
|
||||||
|
<string name="uel_otp_reset">OPT 재설정</string>
|
||||||
|
<string name="uel_stop_sms">SMS 중지</string>
|
||||||
|
<string name="uel_export_csv">사용자 항목 내보내기</string>
|
||||||
|
<string name="uel_start_aaps">AAPS 시작하기</string>
|
||||||
|
<string name="uel_exit_aaps">AAPS 나가기</string>
|
||||||
|
<string name="uel_plugin_enabled">플러그인 활성화됨</string>
|
||||||
|
<string name="uel_plugin_disabled">플러그인 비활성화됨</string>
|
||||||
|
<string name="uel_unknown">알 수 없음</string>
|
||||||
|
<string name="ue_string">문자열</string>
|
||||||
|
<string name="ue_source">소스</string>
|
||||||
|
<string name="ue_utc_offset">UTC 오프셋</string>
|
||||||
<string name="ue_action">실행</string>
|
<string name="ue_action">실행</string>
|
||||||
|
<string name="ue_timestamp">시간 기록</string>
|
||||||
|
<string name="ue_none">Unit 없음</string>
|
||||||
|
<string name="ue_export_to_csv">사용자 항목 엑셀 파일로 내보내기 (csv)</string>
|
||||||
|
<string name="uel_loop_change">Loop 변경됨</string>
|
||||||
|
<string name="uel_loop_removed">Loop 제거됨</string>
|
||||||
|
<string name="uel_other">기타</string>
|
||||||
<!-- HardLimits -->
|
<!-- HardLimits -->
|
||||||
|
<string name="profile_low_target">프로파일 저혈당 목표</string>
|
||||||
|
<string name="profile_high_target">프로파일 고혈당 목표</string>
|
||||||
|
<string name="temp_target_low_target">임시 목표 최저값</string>
|
||||||
|
<string name="temp_target_high_target">임시 목표 최고값</string>
|
||||||
|
<string name="temp_target_value">임시 목표 수치</string>
|
||||||
|
<string name="profile_dia">프로파일 DIA 값</string>
|
||||||
|
<string name="profile_sensitivity_value">프로파일 민감도 값</string>
|
||||||
|
<string name="profile_max_daily_basal_value">프로파일의 최대 basal 값</string>
|
||||||
|
<string name="current_basal_value">현재 basal 값</string>
|
||||||
|
<string name="profile_carbs_ratio_value">프로파일의 탄수화물 비율 값</string>
|
||||||
|
<string name="valuelimitedto">%1$.2f은 %2$.2f까지 제한됨</string>
|
||||||
|
<string name="valueoutofrange">»%1$s«이 \'고정된 한계값\'을 벗어났습니다.</string>
|
||||||
|
<string name="value_out_of_hard_limits">»%1$s« %2$.2f이 \'고정된 한계값\'을 벗어났습니다.</string>
|
||||||
|
<string name="basal_value">Basal 값</string>
|
||||||
<plurals name="days">
|
<plurals name="days">
|
||||||
<item quantity="other">%1$d 일</item>
|
<item quantity="other">%1$d 일</item>
|
||||||
</plurals>
|
</plurals>
|
||||||
|
|
|
@ -2,6 +2,23 @@
|
||||||
<resources>
|
<resources>
|
||||||
<string name="error_only_numeric_digits_allowed">숫자만 입력가능합니다.</string>
|
<string name="error_only_numeric_digits_allowed">숫자만 입력가능합니다.</string>
|
||||||
<string name="error_only_numeric_digits_range_allowed">이 범위(%1$s - %2$s)안에 해당하는 숫자만 입력가능합니다.</string>
|
<string name="error_only_numeric_digits_range_allowed">이 범위(%1$s - %2$s)안에 해당하는 숫자만 입력가능합니다.</string>
|
||||||
|
<string name="error_this_field_cannot_contain_special_character">이 영역은 특수 문자를 입력할 수 없습니다</string>
|
||||||
|
<string name="error_only_standard_letters_are_allowed">표준 문자만 입력 가능합니다.</string>
|
||||||
<string name="error_field_must_not_be_empty">필수 입력 항목입니다.</string>
|
<string name="error_field_must_not_be_empty">필수 입력 항목입니다.</string>
|
||||||
|
<string name="error_email_address_not_valid">유효하지 않은 이메일 주소</string>
|
||||||
|
<string name="error_creditcard_number_not_valid">신용 카드 번호가 유효하지 않습니다.</string>
|
||||||
<string name="error_phone_not_valid">폰번호가 유효하지 않습니다</string>
|
<string name="error_phone_not_valid">폰번호가 유효하지 않습니다</string>
|
||||||
|
<string name="error_domain_not_valid">유효하지 않은 도메인 이름</string>
|
||||||
|
<string name="error_ip_not_valid">유효하지 않은 IP 주소</string>
|
||||||
|
<string name="error_url_not_valid">Web URL이 유효하지 않습니다.</string>
|
||||||
|
<string name="error_notvalid_personname">유효하지 않은 성 또는 이름</string>
|
||||||
|
<string name="error_notvalid_personfullname">유효하지 않은 이름</string>
|
||||||
|
<string name="error_date_not_valid">유효하지 않은 형식</string>
|
||||||
|
<string name="error_mustbe4digitnumber">4자리 숫자이어야 함</string>
|
||||||
|
<string name="error_mustbe6digitnumber">6자리 숫자이어야 함</string>
|
||||||
|
<string name="error_mustbe12hexadidits">ABCDEF0123456789로 구성된 12자리 문자이어야 함</string>
|
||||||
|
<string name="error_mustbe8hexadidits">ABCDEF083456789로 구성된 8자리 문자이어야 함</string>
|
||||||
|
<string name="error_mustbe4hexadidits">ABCDEF043456789로 구성된 4자리 문자이어야 함</string>
|
||||||
|
<string name="error_not_a_minimum_length">최소 길이가 안됨</string>
|
||||||
|
<string name="error_pin_not_valid">비밀번호는 똑같은 숫자나 연속된 숫자를 제외한 3~6자리 숫자이어야 함</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -0,0 +1,132 @@
|
||||||
|
package info.nightscout.androidaps.utils.rx
|
||||||
|
|
||||||
|
import io.reactivex.Observable
|
||||||
|
import io.reactivex.observers.TestObserver
|
||||||
|
import io.reactivex.schedulers.TestScheduler
|
||||||
|
import org.junit.Assert.assertEquals
|
||||||
|
import org.junit.Rule
|
||||||
|
import org.junit.Test
|
||||||
|
import java.util.concurrent.TimeUnit
|
||||||
|
import java.util.concurrent.atomic.AtomicInteger
|
||||||
|
|
||||||
|
class RxExtensionsTest {
|
||||||
|
|
||||||
|
private val testScheduler = TestScheduler()
|
||||||
|
|
||||||
|
@get:Rule
|
||||||
|
val schedulerRule = RxSchedulerRule(testScheduler)
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun `fail after 4 retries`() {
|
||||||
|
val atomicInteger = AtomicInteger()
|
||||||
|
val testObservable: TestObserver<Int> = succeedOnObservable(atomicInteger, 5)
|
||||||
|
.retryWithBackoff(4, 1, TimeUnit.SECONDS)
|
||||||
|
.test()
|
||||||
|
assertEquals(1, atomicInteger.get()) // 1st failure
|
||||||
|
testObservable.assertNotComplete()
|
||||||
|
testObservable.assertNotTerminated()
|
||||||
|
testObservable.assertNever(1)
|
||||||
|
|
||||||
|
testScheduler.advanceTimeBy(3, TimeUnit.SECONDS) // 2nd, 3rd, 4th failure
|
||||||
|
assertEquals(4, atomicInteger.get())
|
||||||
|
testObservable.assertNotComplete()
|
||||||
|
testObservable.assertNotTerminated()
|
||||||
|
testObservable.assertNever(1)
|
||||||
|
|
||||||
|
testScheduler.advanceTimeBy(1, TimeUnit.SECONDS) // 5th failure on 4th retry
|
||||||
|
assertEquals(5, atomicInteger.get())
|
||||||
|
testObservable.assertError(RuntimeException::class.java)
|
||||||
|
testObservable.assertNever(1)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun `succeed after 4 retries`() {
|
||||||
|
val atomicInteger = AtomicInteger()
|
||||||
|
val testObservable: TestObserver<Int> = succeedOnObservable(atomicInteger, 4)
|
||||||
|
.retryWithBackoff(4, 1, TimeUnit.SECONDS)
|
||||||
|
.test()
|
||||||
|
assertEquals(1, atomicInteger.get()) // 1st failure
|
||||||
|
testObservable.assertNotComplete()
|
||||||
|
testObservable.assertNotTerminated()
|
||||||
|
testObservable.assertNever(1)
|
||||||
|
|
||||||
|
testScheduler.advanceTimeBy(3, TimeUnit.SECONDS) // 2nd, 3rd, 4th failure
|
||||||
|
assertEquals(4, atomicInteger.get())
|
||||||
|
testObservable.assertNotComplete()
|
||||||
|
testObservable.assertNotTerminated()
|
||||||
|
testObservable.assertNever(1)
|
||||||
|
|
||||||
|
testScheduler.advanceTimeBy(1, TimeUnit.SECONDS) // 5th is a charm
|
||||||
|
assertEquals(5, atomicInteger.get())
|
||||||
|
testObservable.assertValue(1)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun `succeed after 4 retries with delay factor`() {
|
||||||
|
val atomicInteger = AtomicInteger()
|
||||||
|
val testObservable: TestObserver<Int> = succeedOnObservable(atomicInteger, 4)
|
||||||
|
.retryWithBackoff(4, 1, TimeUnit.SECONDS, delayFactor = 1.2)
|
||||||
|
.test()
|
||||||
|
assertEquals(1, atomicInteger.get()) // 1st failure
|
||||||
|
testObservable.assertNotComplete()
|
||||||
|
testObservable.assertNotTerminated()
|
||||||
|
testObservable.assertNever(1)
|
||||||
|
|
||||||
|
testScheduler.advanceTimeBy(999, TimeUnit.MILLISECONDS)
|
||||||
|
assertEquals(1, atomicInteger.get())
|
||||||
|
testObservable.assertNotComplete()
|
||||||
|
testObservable.assertNotTerminated()
|
||||||
|
testObservable.assertNever(1)
|
||||||
|
|
||||||
|
testScheduler.advanceTimeBy(1, TimeUnit.MILLISECONDS) //1st retry after 1 second
|
||||||
|
assertEquals(2, atomicInteger.get())
|
||||||
|
testObservable.assertNotComplete()
|
||||||
|
testObservable.assertNotTerminated()
|
||||||
|
testObservable.assertNever(1)
|
||||||
|
|
||||||
|
testScheduler.advanceTimeBy(1199, TimeUnit.MILLISECONDS)
|
||||||
|
assertEquals(2, atomicInteger.get())
|
||||||
|
testObservable.assertNotComplete()
|
||||||
|
testObservable.assertNotTerminated()
|
||||||
|
testObservable.assertNever(1)
|
||||||
|
|
||||||
|
testScheduler.advanceTimeBy(1, TimeUnit.MILLISECONDS) //2nd retry after 1.2 seconds more
|
||||||
|
assertEquals(3, atomicInteger.get())
|
||||||
|
testObservable.assertNotComplete()
|
||||||
|
testObservable.assertNotTerminated()
|
||||||
|
testObservable.assertNever(1)
|
||||||
|
|
||||||
|
testScheduler.advanceTimeBy(1439, TimeUnit.MILLISECONDS)
|
||||||
|
assertEquals(3, atomicInteger.get())
|
||||||
|
testObservable.assertNotComplete()
|
||||||
|
testObservable.assertNotTerminated()
|
||||||
|
testObservable.assertNever(1)
|
||||||
|
|
||||||
|
testScheduler.advanceTimeBy(1, TimeUnit.MILLISECONDS) //3rd retry after 1.44 seconds more
|
||||||
|
assertEquals(4, atomicInteger.get())
|
||||||
|
testObservable.assertNotComplete()
|
||||||
|
testObservable.assertNotTerminated()
|
||||||
|
testObservable.assertNever(1)
|
||||||
|
|
||||||
|
testScheduler.advanceTimeBy(1726, TimeUnit.MILLISECONDS)
|
||||||
|
assertEquals(4, atomicInteger.get())
|
||||||
|
testObservable.assertNotComplete()
|
||||||
|
testObservable.assertNotTerminated()
|
||||||
|
testObservable.assertNever(1)
|
||||||
|
|
||||||
|
//4th retry = 5th try is a charm after 1.728 seconds more - rounding error by 1 millisecond!!
|
||||||
|
testScheduler.advanceTimeBy(1, TimeUnit.MILLISECONDS)
|
||||||
|
assertEquals(5, atomicInteger.get())
|
||||||
|
testObservable.assertValue(1)
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun succeedOnObservable(atomicInteger: AtomicInteger, initialFailures: Int): Observable<Int> =
|
||||||
|
Observable.defer {
|
||||||
|
if (atomicInteger.incrementAndGet() == initialFailures + 1) {
|
||||||
|
Observable.just(1)
|
||||||
|
} else {
|
||||||
|
Observable.error(RuntimeException())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,31 @@
|
||||||
|
package info.nightscout.androidaps.utils.rx
|
||||||
|
|
||||||
|
import io.reactivex.Scheduler
|
||||||
|
import io.reactivex.android.plugins.RxAndroidPlugins
|
||||||
|
import io.reactivex.plugins.RxJavaPlugins
|
||||||
|
import org.junit.rules.TestRule
|
||||||
|
import org.junit.runner.Description
|
||||||
|
import org.junit.runners.model.Statement
|
||||||
|
|
||||||
|
class RxSchedulerRule(val scheduler: Scheduler) : TestRule {
|
||||||
|
|
||||||
|
override fun apply(base: Statement, description: Description) =
|
||||||
|
object : Statement() {
|
||||||
|
override fun evaluate() {
|
||||||
|
RxAndroidPlugins.reset()
|
||||||
|
RxAndroidPlugins.setInitMainThreadSchedulerHandler { scheduler }
|
||||||
|
RxJavaPlugins.reset()
|
||||||
|
RxJavaPlugins.setIoSchedulerHandler { scheduler }
|
||||||
|
RxJavaPlugins.setNewThreadSchedulerHandler { scheduler }
|
||||||
|
RxJavaPlugins.setComputationSchedulerHandler { scheduler }
|
||||||
|
|
||||||
|
try {
|
||||||
|
base.evaluate()
|
||||||
|
} finally {
|
||||||
|
RxJavaPlugins.reset()
|
||||||
|
RxAndroidPlugins.reset()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -5,7 +5,9 @@
|
||||||
<string name="danars_pairingok">Pairing OK</string>
|
<string name="danars_pairingok">Pairing OK</string>
|
||||||
<string name="danars_pairingtimedout">Zeitüberschreitung beim Pairing</string>
|
<string name="danars_pairingtimedout">Zeitüberschreitung beim Pairing</string>
|
||||||
<string name="danars_waitingforpairing">Auf Verbindung warten</string>
|
<string name="danars_waitingforpairing">Auf Verbindung warten</string>
|
||||||
|
<string name="danarspump">Dana-i/RS</string>
|
||||||
<string name="danarspump_shortname">Dana</string>
|
<string name="danarspump_shortname">Dana</string>
|
||||||
|
<string name="description_pump_dana_rs">Pumpen-Integration für Dana Diabecare RS und Dana-i Pumpen</string>
|
||||||
<string name="maxbolusviolation">Max. Bolus überschritten</string>
|
<string name="maxbolusviolation">Max. Bolus überschritten</string>
|
||||||
<string name="commanderror">Fehler bei Befehl</string>
|
<string name="commanderror">Fehler bei Befehl</string>
|
||||||
<string name="speederror">Geschwindigkeits-Fehler</string>
|
<string name="speederror">Geschwindigkeits-Fehler</string>
|
||||||
|
|
|
@ -439,7 +439,7 @@ class DanaRSPlugin @Inject constructor(
|
||||||
result.enacted = false
|
result.enacted = false
|
||||||
result.success = false
|
result.success = false
|
||||||
result.comment = resourceHelper.gs(R.string.tempbasaldeliveryerror)
|
result.comment = resourceHelper.gs(R.string.tempbasaldeliveryerror)
|
||||||
aapsLogger.error("setTempBasalPercent: Failed to set temp basal")
|
aapsLogger.error("setTempBasalPercent: Failed to set temp basal. connectionOK: $connectionOK isTempBasalInProgress: ${danaPump.isTempBasalInProgress} tempBasalPercent: ${danaPump.tempBasalPercent}")
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -376,6 +376,7 @@ class DanaRSService : DaggerService() {
|
||||||
sendMessage(msgTBR)
|
sendMessage(msgTBR)
|
||||||
loadEvents()
|
loadEvents()
|
||||||
val tbr = pumpSync.expectedPumpState().temporaryBasal
|
val tbr = pumpSync.expectedPumpState().temporaryBasal
|
||||||
|
aapsLogger.debug(LTag.PUMPCOMM, "Expected TBR found: $tbr")
|
||||||
danaPump.fromTemporaryBasal(tbr)
|
danaPump.fromTemporaryBasal(tbr)
|
||||||
rxBus.send(EventPumpStatusChanged(EventPumpStatusChanged.Status.DISCONNECTING))
|
rxBus.send(EventPumpStatusChanged(EventPumpStatusChanged.Status.DISCONNECTING))
|
||||||
return msgTBR.success()
|
return msgTBR.success()
|
||||||
|
|
|
@ -17,8 +17,7 @@ import javax.inject.Singleton
|
||||||
import kotlin.math.roundToInt
|
import kotlin.math.roundToInt
|
||||||
|
|
||||||
@OpenForTesting
|
@OpenForTesting
|
||||||
@Singleton
|
@Singleton class AppRepository @Inject internal constructor(
|
||||||
open class AppRepository @Inject internal constructor(
|
|
||||||
internal val database: AppDatabase
|
internal val database: AppDatabase
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
@ -263,6 +262,10 @@ open class AppRepository @Inject internal constructor(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun getModifiedEffectiveProfileSwitchDataFromId(lastId: Long): Single<List<EffectiveProfileSwitch>> =
|
||||||
|
database.effectiveProfileSwitchDao.getModifiedFrom(lastId)
|
||||||
|
.subscribeOn(Schedulers.io())
|
||||||
|
|
||||||
fun createEffectiveProfileSwitch(profileSwitch: EffectiveProfileSwitch) {
|
fun createEffectiveProfileSwitch(profileSwitch: EffectiveProfileSwitch) {
|
||||||
database.effectiveProfileSwitchDao.insert(profileSwitch)
|
database.effectiveProfileSwitchDao.insert(profileSwitch)
|
||||||
}
|
}
|
||||||
|
@ -485,7 +488,7 @@ open class AppRepository @Inject internal constructor(
|
||||||
private fun Single<List<Carbs>>.expand() = this.map { it.map(::expandCarbs).flatten() }
|
private fun Single<List<Carbs>>.expand() = this.map { it.map(::expandCarbs).flatten() }
|
||||||
private fun Single<List<Carbs>>.filterOutExtended() = this.map { it.filter { c -> c.duration == 0L } }
|
private fun Single<List<Carbs>>.filterOutExtended() = this.map { it.filter { c -> c.duration == 0L } }
|
||||||
private fun Single<List<Carbs>>.fromTo(from: Long, to: Long) = this.map { it.filter { c -> c.timestamp in from..to } }
|
private fun Single<List<Carbs>>.fromTo(from: Long, to: Long) = this.map { it.filter { c -> c.timestamp in from..to } }
|
||||||
private fun Single<List<Carbs>>.until(to: Long) = this.map { it.filter { c -> c.timestamp <= to } }
|
private infix fun Single<List<Carbs>>.until(to: Long) = this.map { it.filter { c -> c.timestamp <= to } }
|
||||||
private fun Single<List<Carbs>>.from(start: Long) = this.map { it.filter { c -> c.timestamp >= start } }
|
private fun Single<List<Carbs>>.from(start: Long) = this.map { it.filter { c -> c.timestamp >= start } }
|
||||||
private fun Single<List<Carbs>>.sort() = this.map { it.sortedBy { c -> c.timestamp } }
|
private fun Single<List<Carbs>>.sort() = this.map { it.sortedBy { c -> c.timestamp } }
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,7 @@ package info.nightscout.androidaps.database.daos
|
||||||
|
|
||||||
import androidx.room.Dao
|
import androidx.room.Dao
|
||||||
import androidx.room.Query
|
import androidx.room.Query
|
||||||
import info.nightscout.androidaps.database.TABLE_CARBS
|
|
||||||
import info.nightscout.androidaps.database.TABLE_EFFECTIVE_PROFILE_SWITCHES
|
import info.nightscout.androidaps.database.TABLE_EFFECTIVE_PROFILE_SWITCHES
|
||||||
import info.nightscout.androidaps.database.entities.Carbs
|
|
||||||
import info.nightscout.androidaps.database.entities.EffectiveProfileSwitch
|
import info.nightscout.androidaps.database.entities.EffectiveProfileSwitch
|
||||||
import io.reactivex.Maybe
|
import io.reactivex.Maybe
|
||||||
import io.reactivex.Single
|
import io.reactivex.Single
|
||||||
|
@ -22,6 +20,12 @@ internal interface EffectiveProfileSwitchDao : TraceableDao<EffectiveProfileSwit
|
||||||
@Query("SELECT id FROM $TABLE_EFFECTIVE_PROFILE_SWITCHES ORDER BY id DESC limit 1")
|
@Query("SELECT id FROM $TABLE_EFFECTIVE_PROFILE_SWITCHES ORDER BY id DESC limit 1")
|
||||||
fun getLastId(): Maybe<Long>
|
fun getLastId(): Maybe<Long>
|
||||||
|
|
||||||
|
@Query("SELECT * FROM $TABLE_EFFECTIVE_PROFILE_SWITCHES WHERE timestamp = :timestamp AND referenceId IS NULL")
|
||||||
|
fun findByTimestamp(timestamp: Long): EffectiveProfileSwitch?
|
||||||
|
|
||||||
|
@Query("SELECT * FROM $TABLE_EFFECTIVE_PROFILE_SWITCHES WHERE nightscoutId = :nsId AND referenceId IS NULL")
|
||||||
|
fun findByNSId(nsId: String): EffectiveProfileSwitch?
|
||||||
|
|
||||||
@Query("SELECT * FROM $TABLE_EFFECTIVE_PROFILE_SWITCHES WHERE isValid = 1 AND referenceId IS NULL ORDER BY id ASC LIMIT 1")
|
@Query("SELECT * FROM $TABLE_EFFECTIVE_PROFILE_SWITCHES WHERE isValid = 1 AND referenceId IS NULL ORDER BY id ASC LIMIT 1")
|
||||||
fun getOldestEffectiveProfileSwitchRecord(): EffectiveProfileSwitch?
|
fun getOldestEffectiveProfileSwitchRecord(): EffectiveProfileSwitch?
|
||||||
|
|
||||||
|
|
|
@ -2,11 +2,9 @@ package info.nightscout.androidaps.database.daos
|
||||||
|
|
||||||
import androidx.room.Dao
|
import androidx.room.Dao
|
||||||
import androidx.room.Query
|
import androidx.room.Query
|
||||||
import info.nightscout.androidaps.database.TABLE_GLUCOSE_VALUES
|
|
||||||
import info.nightscout.androidaps.database.TABLE_PROFILE_SWITCHES
|
import info.nightscout.androidaps.database.TABLE_PROFILE_SWITCHES
|
||||||
import info.nightscout.androidaps.database.daos.workaround.ProfileSwitchDaoWorkaround
|
import info.nightscout.androidaps.database.daos.workaround.ProfileSwitchDaoWorkaround
|
||||||
import info.nightscout.androidaps.database.data.checkSanity
|
import info.nightscout.androidaps.database.data.checkSanity
|
||||||
import info.nightscout.androidaps.database.entities.GlucoseValue
|
|
||||||
import info.nightscout.androidaps.database.entities.ProfileSwitch
|
import info.nightscout.androidaps.database.entities.ProfileSwitch
|
||||||
import io.reactivex.Maybe
|
import io.reactivex.Maybe
|
||||||
import io.reactivex.Single
|
import io.reactivex.Single
|
||||||
|
|
|
@ -54,6 +54,8 @@ data class EffectiveProfileSwitch(
|
||||||
|
|
||||||
enum class GlucoseUnit {
|
enum class GlucoseUnit {
|
||||||
MGDL,
|
MGDL,
|
||||||
MMOL
|
MMOL;
|
||||||
|
|
||||||
|
companion object
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -21,7 +21,7 @@ data class UserEntry(
|
||||||
var action: Action,
|
var action: Action,
|
||||||
var source: Sources,
|
var source: Sources,
|
||||||
var note: String,
|
var note: String,
|
||||||
var values: List<ValueWithUnit?>
|
var values: List<@JvmSuppressWildcards ValueWithUnit?>
|
||||||
) : DBEntry, DBEntryWithTime {
|
) : DBEntry, DBEntryWithTime {
|
||||||
enum class Action (val colorGroup: ColorGroup) {
|
enum class Action (val colorGroup: ColorGroup) {
|
||||||
BOLUS (ColorGroup.InsulinTreatment),
|
BOLUS (ColorGroup.InsulinTreatment),
|
||||||
|
|
|
@ -0,0 +1,51 @@
|
||||||
|
package info.nightscout.androidaps.database.transactions
|
||||||
|
|
||||||
|
import info.nightscout.androidaps.database.entities.EffectiveProfileSwitch
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sync the EffectiveProfileSwitch from NS
|
||||||
|
*/
|
||||||
|
class SyncNsEffectiveProfileSwitchTransaction(private val effectiveProfileSwitch: EffectiveProfileSwitch, private val invalidateByNsOnly: Boolean) : Transaction<SyncNsEffectiveProfileSwitchTransaction.TransactionResult>() {
|
||||||
|
|
||||||
|
override fun run(): TransactionResult {
|
||||||
|
val result = TransactionResult()
|
||||||
|
|
||||||
|
val current: EffectiveProfileSwitch? =
|
||||||
|
effectiveProfileSwitch.interfaceIDs.nightscoutId?.let {
|
||||||
|
database.effectiveProfileSwitchDao.findByNSId(it)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (current != null) {
|
||||||
|
// nsId exists, allow only invalidation
|
||||||
|
if (current.isValid && !effectiveProfileSwitch.isValid) {
|
||||||
|
current.isValid = false
|
||||||
|
database.effectiveProfileSwitchDao.updateExistingEntry(current)
|
||||||
|
result.invalidated.add(current)
|
||||||
|
}
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
|
||||||
|
if (invalidateByNsOnly) return result
|
||||||
|
|
||||||
|
// not known nsId
|
||||||
|
val existing = database.effectiveProfileSwitchDao.findByTimestamp(effectiveProfileSwitch.timestamp)
|
||||||
|
if (existing != null && existing.interfaceIDs.nightscoutId == null) {
|
||||||
|
// the same record, update nsId only
|
||||||
|
existing.interfaceIDs.nightscoutId = effectiveProfileSwitch.interfaceIDs.nightscoutId
|
||||||
|
existing.isValid = effectiveProfileSwitch.isValid
|
||||||
|
database.effectiveProfileSwitchDao.updateExistingEntry(existing)
|
||||||
|
result.updatedNsId.add(existing)
|
||||||
|
} else {
|
||||||
|
database.effectiveProfileSwitchDao.insertNewEntry(effectiveProfileSwitch)
|
||||||
|
result.inserted.add(effectiveProfileSwitch)
|
||||||
|
}
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
|
||||||
|
class TransactionResult {
|
||||||
|
|
||||||
|
val updatedNsId = mutableListOf<EffectiveProfileSwitch>()
|
||||||
|
val inserted = mutableListOf<EffectiveProfileSwitch>()
|
||||||
|
val invalidated = mutableListOf<EffectiveProfileSwitch>()
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
package info.nightscout.androidaps.database.transactions
|
||||||
|
|
||||||
|
import info.nightscout.androidaps.database.entities.EffectiveProfileSwitch
|
||||||
|
|
||||||
|
class UpdateNsIdEffectiveProfileSwitchTransaction(val effectiveProfileSwitch: EffectiveProfileSwitch) : Transaction<Unit>() {
|
||||||
|
|
||||||
|
override fun run() {
|
||||||
|
val current = database.effectiveProfileSwitchDao.findById(effectiveProfileSwitch.id)
|
||||||
|
if (current != null && current.interfaceIDs.nightscoutId != effectiveProfileSwitch.interfaceIDs.nightscoutId) {
|
||||||
|
current.interfaceIDs.nightscoutId = effectiveProfileSwitch.interfaceIDs.nightscoutId
|
||||||
|
database.effectiveProfileSwitchDao.updateExistingEntry(current)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -22,7 +22,7 @@ class AppConfirmSettingPacket(
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun encode(msgSeq:Int): ByteArray {
|
override fun encode(msgSeq:Int): ByteArray {
|
||||||
val buffer = prefixEncode(msgType, msgSeq, MSG_CON_END);
|
val buffer = prefixEncode(msgType, msgSeq, MSG_CON_END)
|
||||||
|
|
||||||
buffer.put(reqMsgType) // 명령코드
|
buffer.put(reqMsgType) // 명령코드
|
||||||
buffer.putInt(otp) // 응답시 전달받은 opt (random 6digit numbner)
|
buffer.putInt(otp) // 응답시 전달받은 opt (random 6digit numbner)
|
||||||
|
|
|
@ -20,7 +20,7 @@ class BasalLimitInquirePacket(
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun encode(msgSeq:Int): ByteArray {
|
override fun encode(msgSeq:Int): ByteArray {
|
||||||
val buffer = prefixEncode(msgType, msgSeq, MSG_CON_END);
|
val buffer = prefixEncode(msgType, msgSeq, MSG_CON_END)
|
||||||
return suffixEncode(buffer)
|
return suffixEncode(buffer)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ class BasalPauseSettingPacket(
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun encode(msgSeq:Int): ByteArray {
|
override fun encode(msgSeq:Int): ByteArray {
|
||||||
val buffer = prefixEncode(msgType, msgSeq, MSG_CON_END);
|
val buffer = prefixEncode(msgType, msgSeq, MSG_CON_END)
|
||||||
buffer.put(status.toByte()) // (1:pause, 2: cancel pause)
|
buffer.put(status.toByte()) // (1:pause, 2: cancel pause)
|
||||||
return suffixEncode(buffer)
|
return suffixEncode(buffer)
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ class DisplayTimeInquirePacket(
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun encode(msgSeq:Int): ByteArray {
|
override fun encode(msgSeq:Int): ByteArray {
|
||||||
val buffer = prefixEncode(msgType, msgSeq, MSG_CON_END);
|
val buffer = prefixEncode(msgType, msgSeq, MSG_CON_END)
|
||||||
return suffixEncode(buffer)
|
return suffixEncode(buffer)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ class InjectionBasalSettingPacket(
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun encode(msgSeq:Int): ByteArray {
|
override fun encode(msgSeq:Int): ByteArray {
|
||||||
val buffer = prefixEncode(msgType, msgSeq, MSG_CON_END);
|
val buffer = prefixEncode(msgType, msgSeq, MSG_CON_END)
|
||||||
buffer.put(pattern.toByte())
|
buffer.put(pattern.toByte())
|
||||||
return suffixEncode(buffer)
|
return suffixEncode(buffer)
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@ class InjectionMealSettingPacket(
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun encode(msgSeq:Int): ByteArray {
|
override fun encode(msgSeq:Int): ByteArray {
|
||||||
val buffer = prefixEncode(msgType, msgSeq, MSG_CON_END);
|
val buffer = prefixEncode(msgType, msgSeq, MSG_CON_END)
|
||||||
buffer.putShort(amount.toShort())
|
buffer.putShort(amount.toShort())
|
||||||
buffer.putLong(bcDttm)
|
buffer.putLong(bcDttm)
|
||||||
return suffixEncode(buffer)
|
return suffixEncode(buffer)
|
||||||
|
|
|
@ -20,7 +20,7 @@ class InjectionSnackSettingPacket(
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun encode(msgSeq:Int): ByteArray {
|
override fun encode(msgSeq:Int): ByteArray {
|
||||||
val buffer = prefixEncode(msgType, msgSeq, MSG_CON_END);
|
val buffer = prefixEncode(msgType, msgSeq, MSG_CON_END)
|
||||||
buffer.putShort(amount.toShort())
|
buffer.putShort(amount.toShort())
|
||||||
return suffixEncode(buffer)
|
return suffixEncode(buffer)
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ class LanguageInquirePacket(
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun encode(msgSeq:Int): ByteArray {
|
override fun encode(msgSeq:Int): ByteArray {
|
||||||
val buffer = prefixEncode(msgType, msgSeq, MSG_CON_END);
|
val buffer = prefixEncode(msgType, msgSeq, MSG_CON_END)
|
||||||
return suffixEncode(buffer)
|
return suffixEncode(buffer)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ class SneckLimitInquirePacket(
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun encode(msgSeq:Int): ByteArray {
|
override fun encode(msgSeq:Int): ByteArray {
|
||||||
val buffer = prefixEncode(msgType, msgSeq, MSG_CON_END);
|
val buffer = prefixEncode(msgType, msgSeq, MSG_CON_END)
|
||||||
return suffixEncode(buffer)
|
return suffixEncode(buffer)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ class SoundInquirePacket(
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun encode(msgSeq:Int): ByteArray {
|
override fun encode(msgSeq:Int): ByteArray {
|
||||||
val buffer = prefixEncode(msgType, msgSeq, MSG_CON_END);
|
val buffer = prefixEncode(msgType, msgSeq, MSG_CON_END)
|
||||||
return suffixEncode(buffer)
|
return suffixEncode(buffer)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ class TimeInquirePacket(
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun encode(msgSeq:Int): ByteArray {
|
override fun encode(msgSeq:Int): ByteArray {
|
||||||
val buffer = prefixEncode(msgType, msgSeq, MSG_CON_END);
|
val buffer = prefixEncode(msgType, msgSeq, MSG_CON_END)
|
||||||
return suffixEncode(buffer)
|
return suffixEncode(buffer)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ class TimeInquireResponsePacket(
|
||||||
val result2 = getByteToInt(bufferData)
|
val result2 = getByteToInt(bufferData)
|
||||||
if(!isSuccInquireResponseResult(result2)) {
|
if(!isSuccInquireResponseResult(result2)) {
|
||||||
failed = true
|
failed = true
|
||||||
return;
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ class TimeSettingPacket(
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun encode(msgSeq:Int): ByteArray {
|
override fun encode(msgSeq:Int): ByteArray {
|
||||||
val buffer = prefixEncode(msgType, msgSeq, MSG_CON_END);
|
val buffer = prefixEncode(msgType, msgSeq, MSG_CON_END)
|
||||||
val date = DateTime(time).withZone(DateTimeZone.UTC)
|
val date = DateTime(time).withZone(DateTimeZone.UTC)
|
||||||
buffer.put((date.year - 2000 and 0xff).toByte())
|
buffer.put((date.year - 2000 and 0xff).toByte())
|
||||||
buffer.put((date.monthOfYear and 0xff).toByte())
|
buffer.put((date.monthOfYear and 0xff).toByte())
|
||||||
|
|
|
@ -52,6 +52,8 @@
|
||||||
<string name="diagonn_g8_useroptions">BENUTZER-OPTIONEN</string>
|
<string name="diagonn_g8_useroptions">BENUTZER-OPTIONEN</string>
|
||||||
<string name="pairfirst">Bitte kopple deine Pumpe mit deinem Telefon!</string>
|
<string name="pairfirst">Bitte kopple deine Pumpe mit deinem Telefon!</string>
|
||||||
<string name="processinghistory">"Ereignis wird verarbeitet "</string>
|
<string name="processinghistory">"Ereignis wird verarbeitet "</string>
|
||||||
|
<string name="apslastLogNum">aps_last_log_num</string>
|
||||||
|
<string name="apsWrappingCount">aps_wrapping_count</string>
|
||||||
<string name="diaconn_g8_history_tempbasal">Temporäre Basalrate</string>
|
<string name="diaconn_g8_history_tempbasal">Temporäre Basalrate</string>
|
||||||
<string name="diaconng8_pump_settings">Diaconn-Pumpen Einstellungen</string>
|
<string name="diaconng8_pump_settings">Diaconn-Pumpen Einstellungen</string>
|
||||||
<string name="diaconn_g8_pumpalarm">Töne</string>
|
<string name="diaconn_g8_pumpalarm">Töne</string>
|
||||||
|
@ -79,6 +81,9 @@
|
||||||
<string name="insulinlackwarning">Warnung Insulinmangel</string>
|
<string name="insulinlackwarning">Warnung Insulinmangel</string>
|
||||||
<string name="needbatteryreplace">Batteriewechsel erforderlich</string>
|
<string name="needbatteryreplace">Batteriewechsel erforderlich</string>
|
||||||
<string name="needinsullinreplace">Neues Insulin erforderlich</string>
|
<string name="needinsullinreplace">Neues Insulin erforderlich</string>
|
||||||
|
<string name="pumpversion">pump_version</string>
|
||||||
|
<string name="apsIncarnationNo">aps_incarnation_no</string>
|
||||||
|
<string name="pumpserialno">pump_serial_no</string>
|
||||||
<string name="diaconn_g8_loginsulinchange_title">Reservoirwechsel aufzeichnen</string>
|
<string name="diaconn_g8_loginsulinchange_title">Reservoirwechsel aufzeichnen</string>
|
||||||
<string name="diaconn_g8_loginsulinchange_summary">Reservoirwechsel im Careportal hinzufügen, falls dies in der Historie gefunden wird.</string>
|
<string name="diaconn_g8_loginsulinchange_summary">Reservoirwechsel im Careportal hinzufügen, falls dies in der Historie gefunden wird.</string>
|
||||||
<string name="diaconn_g8_logcanulachange_title">Kanülenwechsel protokollieren</string>
|
<string name="diaconn_g8_logcanulachange_title">Kanülenwechsel protokollieren</string>
|
||||||
|
@ -112,6 +117,7 @@
|
||||||
<string name="diacon_g8_blockdualbolus">DUAL BOLUS</string>
|
<string name="diacon_g8_blockdualbolus">DUAL BOLUS</string>
|
||||||
<string name="diacon_g8_blockreplacetube">KATHETER WECHSELN</string>
|
<string name="diacon_g8_blockreplacetube">KATHETER WECHSELN</string>
|
||||||
<string name="diacon_g8_blockreplaceneedle">KANÜLE WECHSELN</string>
|
<string name="diacon_g8_blockreplaceneedle">KANÜLE WECHSELN</string>
|
||||||
|
<string name="diacon_g8_blockreplacesyringe">NADEL WECHSELN</string>
|
||||||
<string name="diaconn_g8_logalarmblock">Verstopfung (%s)</string>
|
<string name="diaconn_g8_logalarmblock">Verstopfung (%s)</string>
|
||||||
<string name="diaconn_g8_lgorelease">Basalabgabe (%s)</string>
|
<string name="diaconn_g8_lgorelease">Basalabgabe (%s)</string>
|
||||||
<string name="diaconn_g8_lgosuspend">Basal unterbrechen (%s)</string>
|
<string name="diaconn_g8_lgosuspend">Basal unterbrechen (%s)</string>
|
||||||
|
|
|
@ -6,11 +6,21 @@
|
||||||
<string name="pumperror">펌프 에러</string>
|
<string name="pumperror">펌프 에러</string>
|
||||||
<string name="diaconn_g8_history_alarm">알람</string>
|
<string name="diaconn_g8_history_alarm">알람</string>
|
||||||
<string name="diaconn_g8_history_basalhours">시간당 Basal 주입량</string>
|
<string name="diaconn_g8_history_basalhours">시간당 Basal 주입량</string>
|
||||||
|
<string name="diaconn_g8_history_bolus">Bolus</string>
|
||||||
<string name="diaconn_g8_history_dailyinsulin">하루 주입량</string>
|
<string name="diaconn_g8_history_dailyinsulin">하루 주입량</string>
|
||||||
|
<string name="diaconn_g8_history_errors">에러</string>
|
||||||
|
<string name="diaconn_g8_history_prime">프라임</string>
|
||||||
<string name="diaconn_g8_history_refill">교체</string>
|
<string name="diaconn_g8_history_refill">교체</string>
|
||||||
<string name="diaconn_g8_history_suspend">중지</string>
|
<string name="diaconn_g8_history_suspend">중지</string>
|
||||||
|
<string name="diaconn_g8_pairingok">연동 완료</string>
|
||||||
|
<string name="diaconn_g8_waitingforpairing">연동 대기</string>
|
||||||
|
<string name="diaconn_firmware_version">버전</string>
|
||||||
|
<string name="invalidpairing">잘못된 연동 정보. 새로운 연동 요청함.</string>
|
||||||
<string name="gettingpumpsettings">펌프상태조회</string>
|
<string name="gettingpumpsettings">펌프상태조회</string>
|
||||||
<string name="gettingpumptime">펌프시간정보 조회</string>
|
<string name="gettingpumptime">펌프시간정보 조회</string>
|
||||||
|
<string name="largetimediff">큰 시간 차이:\n펌프의 시간과 1.5시간 이상 차이가 납니다.\n펌프의 시간을 수동으로 변경하고, 예상치 못한 적용이 발생하지 않도록 펌프의 이력을 반드시 확인하십시오.\n가능한 경우, 시간을 변경하기 전에 펌프의 이력을 삭제하거나, 잘못 입력된 마지막 이력으로부터 DIA 시간만큼, 단 지금으로부터 최소한의 DIA 만큼, closed loop을 비활성화 하십시오.</string>
|
||||||
|
<string name="largetimedifftitle">큰 시간 차이</string>
|
||||||
|
<string name="approachingdailylimit">인슐린 하루 허용량 근접</string>
|
||||||
<string name="startingbolus">Bolus 주입 시작</string>
|
<string name="startingbolus">Bolus 주입 시작</string>
|
||||||
<string name="waitingforestimatedbolusend">Bolus 주입이 진행 중 입니다.</string>
|
<string name="waitingforestimatedbolusend">Bolus 주입이 진행 중 입니다.</string>
|
||||||
<string name="gettingbolusstatus">Bolus 상태 조회</string>
|
<string name="gettingbolusstatus">Bolus 상태 조회</string>
|
||||||
|
@ -20,11 +30,30 @@
|
||||||
<string name="stoppingextendedbolus">확장 Bolus 중지</string>
|
<string name="stoppingextendedbolus">확장 Bolus 중지</string>
|
||||||
<string name="updatingbasalrates">Basal 패턴 반영</string>
|
<string name="updatingbasalrates">Basal 패턴 반영</string>
|
||||||
<string name="description_pump_diaconn_g8">G2e에서 만든 Diaconn G8 펌프</string>
|
<string name="description_pump_diaconn_g8">G2e에서 만든 Diaconn G8 펌프</string>
|
||||||
|
<string name="diaconn_g8_pump">디아콘 G8</string>
|
||||||
|
<string name="diaconn_g8_pump_shortname">디아콘 G8</string>
|
||||||
|
<string name="maxbolusviolation">최대 bolus 초과</string>
|
||||||
|
<string name="commanderror">명령 오류</string>
|
||||||
<string name="speederror">속도 에러</string>
|
<string name="speederror">속도 에러</string>
|
||||||
|
<string name="insulinlimitviolation">인슐린 제한 초과</string>
|
||||||
|
<string name="boluserrorcode">요청: %1$.2fU 주입됨: %2$.2fU 에러 코드: %3$s</string>
|
||||||
|
<string name="diaconn_g8_valuenotsetproperly">적절하지 않은 값</string>
|
||||||
|
<string name="diaconn_g8_bt_name_title">디아콘 G8 블루투스 장치</string>
|
||||||
|
<string name="diaconn_g8_password_title">펌프 비밀번호</string>
|
||||||
<string name="bolusspeed">Bolus 주입속도</string>
|
<string name="bolusspeed">Bolus 주입속도</string>
|
||||||
<string name="selectedpump">펌프를 선택하세요.</string>
|
<string name="selectedpump">펌프를 선택하세요.</string>
|
||||||
|
<string name="diaconn_g8_useextended_title">>200%% 주입 위해 확장 bolus 사용</string>
|
||||||
|
<string name="diaconn_g8_visualizeextendedaspercentage_title">확장 bolus를 %%로 표시하기</string>
|
||||||
|
<string name="diaconn_g8_bluetooth_status">블루투스 상태</string>
|
||||||
|
<string name="diagonn_g8_tdd_label">일총량</string>
|
||||||
|
<string name="bolus_step">Bolus 단위</string>
|
||||||
|
<string name="basal_step">Basal 단위</string>
|
||||||
|
<string name="pump_firmware_label">펌웨어</string>
|
||||||
<string name="diagonn_g8_useroptions">사용자설정</string>
|
<string name="diagonn_g8_useroptions">사용자설정</string>
|
||||||
<string name="pairfirst">펌프와 전화기를 페어링해 주세요!</string>
|
<string name="pairfirst">펌프와 전화기를 페어링해 주세요!</string>
|
||||||
|
<string name="processinghistory">"이벤트 처리 중 "</string>
|
||||||
|
<string name="apslastLogNum">aps_last_log_num</string>
|
||||||
|
<string name="apsWrappingCount">apsaps_wrapping_count</string>
|
||||||
<string name="diaconn_g8_history_tempbasal">임시 Basal</string>
|
<string name="diaconn_g8_history_tempbasal">임시 Basal</string>
|
||||||
<string name="diaconng8_pump_settings">디아콘 펌프 설정</string>
|
<string name="diaconng8_pump_settings">디아콘 펌프 설정</string>
|
||||||
<string name="diaconn_g8_pumpalarm">음향 선택</string>
|
<string name="diaconn_g8_pumpalarm">음향 선택</string>
|
||||||
|
@ -36,17 +65,25 @@
|
||||||
<string name="diaconn_g8_pumpalarm_intensity_middle">중</string>
|
<string name="diaconn_g8_pumpalarm_intensity_middle">중</string>
|
||||||
<string name="diaconn_g8_pumpalarm_intensity_high">대</string>
|
<string name="diaconn_g8_pumpalarm_intensity_high">대</string>
|
||||||
<string name="diaconn_g8_screentimeout">조명지속시간[초]</string>
|
<string name="diaconn_g8_screentimeout">조명지속시간[초]</string>
|
||||||
|
<string name="diaconn_g8_saveuseroptions">펌프에 옵션 저장</string>
|
||||||
<string name="diaconn_g8_language">언어설정</string>
|
<string name="diaconn_g8_language">언어설정</string>
|
||||||
<string name="diaconn_g8_bolus_speed">Bolus 주입속도 [U/min]</string>
|
<string name="diaconn_g8_bolus_speed">Bolus 주입속도 [U/min]</string>
|
||||||
<string name="diaconn_g8_pumplang_chiness">중국어</string>
|
<string name="diaconn_g8_pumplang_chiness">중국어</string>
|
||||||
<string name="diaconn_g8_pumplang_korean">한국어</string>
|
<string name="diaconn_g8_pumplang_korean">한국어</string>
|
||||||
<string name="diaconn_g8_pumplang_english">영어</string>
|
<string name="diaconn_g8_pumplang_english">영어</string>
|
||||||
|
<string name="diaconn_g8_screentimeout_10">"10 "</string>
|
||||||
|
<string name="diaconn_g8_pumpscreentimeout_10">10</string>
|
||||||
|
<string name="diaconn_g8_pumpscreentimeout_20">20</string>
|
||||||
|
<string name="diaconn_g8_pumpscreentimeout_30">30</string>
|
||||||
<string name="diaconn_g8_pumpalarm_low">소</string>
|
<string name="diaconn_g8_pumpalarm_low">소</string>
|
||||||
<string name="injectionblocked">Bolus 주입막힘</string>
|
<string name="injectionblocked">Bolus 주입막힘</string>
|
||||||
<string name="batterywarning">베터리 경고</string>
|
<string name="batterywarning">베터리 경고</string>
|
||||||
<string name="insulinlackwarning">인슐린 부족 경고</string>
|
<string name="insulinlackwarning">인슐린 부족 경고</string>
|
||||||
<string name="needbatteryreplace">베터리 교체가 필요합니다.</string>
|
<string name="needbatteryreplace">베터리 교체가 필요합니다.</string>
|
||||||
<string name="needinsullinreplace">인슐린 교체가 필요합니다.</string>
|
<string name="needinsullinreplace">인슐린 교체가 필요합니다.</string>
|
||||||
|
<string name="pumpversion">펌프_버전</string>
|
||||||
|
<string name="apsIncarnationNo">aps_incarnation_no</string>
|
||||||
|
<string name="pumpserialno">펌프_시리얼_넘버</string>
|
||||||
<string name="diaconn_g8_loginsulinchange_title">인슐린 교체</string>
|
<string name="diaconn_g8_loginsulinchange_title">인슐린 교체</string>
|
||||||
<string name="diaconn_g8_loginsulinchange_summary">로그 동기화 시 케어포털 \"인슐린 교체\" 정보 자동 업로드</string>
|
<string name="diaconn_g8_loginsulinchange_summary">로그 동기화 시 케어포털 \"인슐린 교체\" 정보 자동 업로드</string>
|
||||||
<string name="diaconn_g8_logcanulachange_title">바늘 교체</string>
|
<string name="diaconn_g8_logcanulachange_title">바늘 교체</string>
|
||||||
|
@ -92,6 +129,7 @@
|
||||||
<string name="diaconn_g8_logmealfail">식사 실패</string>
|
<string name="diaconn_g8_logmealfail">식사 실패</string>
|
||||||
<string name="diaconn_g8_logsuccess">성공</string>
|
<string name="diaconn_g8_logsuccess">성공</string>
|
||||||
<string name="diaconn_g8_logmealsuccess">식사 성공</string>
|
<string name="diaconn_g8_logmealsuccess">식사 성공</string>
|
||||||
|
<string name="key_diaconn_g8_logtubechange">디아콘_g8_로그튜브변경</string>
|
||||||
<string name="diaconn_g8_errorcode_1">패킷 CRC 오류로 조회 불가합니다.</string>
|
<string name="diaconn_g8_errorcode_1">패킷 CRC 오류로 조회 불가합니다.</string>
|
||||||
<string name="diaconn_g8_errorcode_2">입력 파라미터 오류로 설정 불가합니다.</string>
|
<string name="diaconn_g8_errorcode_2">입력 파라미터 오류로 설정 불가합니다.</string>
|
||||||
<string name="diaconn_g8_errorcode_3">프로토콜 규격 오류로 설정 불가합니다.</string>
|
<string name="diaconn_g8_errorcode_3">프로토콜 규격 오류로 설정 불가합니다.</string>
|
||||||
|
|
|
@ -1433,7 +1433,7 @@ public class LocalInsightPlugin extends PumpPluginBase implements Pump, Constrai
|
||||||
bolusID = insightDbHelper.getInsightBolusID(serial, event.getBolusID(), startTimestamp); // Line added to get id
|
bolusID = insightDbHelper.getInsightBolusID(serial, event.getBolusID(), startTimestamp); // Line added to get id
|
||||||
if (event.getBolusType() == BolusType.STANDARD || event.getBolusType() == BolusType.MULTIWAVE) {
|
if (event.getBolusType() == BolusType.STANDARD || event.getBolusType() == BolusType.MULTIWAVE) {
|
||||||
pumpSync.syncBolusWithPumpId(
|
pumpSync.syncBolusWithPumpId(
|
||||||
startTimestamp,
|
bolusID.getTimestamp(),
|
||||||
event.getImmediateAmount(),
|
event.getImmediateAmount(),
|
||||||
null,
|
null,
|
||||||
bolusID.getId(),
|
bolusID.getId(),
|
||||||
|
@ -1443,7 +1443,7 @@ public class LocalInsightPlugin extends PumpPluginBase implements Pump, Constrai
|
||||||
if (event.getBolusType() == BolusType.EXTENDED || event.getBolusType() == BolusType.MULTIWAVE) {
|
if (event.getBolusType() == BolusType.EXTENDED || event.getBolusType() == BolusType.MULTIWAVE) {
|
||||||
if (event.getDuration() > 0 && profileFunction.getProfile(bolusID.getTimestamp()) != null)
|
if (event.getDuration() > 0 && profileFunction.getProfile(bolusID.getTimestamp()) != null)
|
||||||
pumpSync.syncExtendedBolusWithPumpId(
|
pumpSync.syncExtendedBolusWithPumpId(
|
||||||
startTimestamp,
|
bolusID.getTimestamp(),
|
||||||
event.getExtendedAmount(),
|
event.getExtendedAmount(),
|
||||||
timestamp - startTimestamp,
|
timestamp - startTimestamp,
|
||||||
isFakingTempsByExtendedBoluses(),
|
isFakingTempsByExtendedBoluses(),
|
||||||
|
@ -1557,8 +1557,6 @@ public class LocalInsightPlugin extends PumpPluginBase implements Pump, Constrai
|
||||||
}
|
}
|
||||||
|
|
||||||
private long parseRelativeDate(int year, int month, int day, int hour, int minute, int second, int relativeHour, int relativeMinute, int relativeSecond) {
|
private long parseRelativeDate(int year, int month, int day, int hour, int minute, int second, int relativeHour, int relativeMinute, int relativeSecond) {
|
||||||
if (relativeHour * 60 * 60 + relativeMinute * 60 + relativeSecond >= hour * 60 * 60 * minute * 60 + second)
|
|
||||||
day--;
|
|
||||||
Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
|
Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
|
||||||
calendar.set(Calendar.YEAR, year);
|
calendar.set(Calendar.YEAR, year);
|
||||||
calendar.set(Calendar.MONTH, month - 1);
|
calendar.set(Calendar.MONTH, month - 1);
|
||||||
|
@ -1566,7 +1564,9 @@ public class LocalInsightPlugin extends PumpPluginBase implements Pump, Constrai
|
||||||
calendar.set(Calendar.HOUR_OF_DAY, relativeHour);
|
calendar.set(Calendar.HOUR_OF_DAY, relativeHour);
|
||||||
calendar.set(Calendar.MINUTE, relativeMinute);
|
calendar.set(Calendar.MINUTE, relativeMinute);
|
||||||
calendar.set(Calendar.SECOND, relativeSecond);
|
calendar.set(Calendar.SECOND, relativeSecond);
|
||||||
return calendar.getTimeInMillis();
|
long dayOffset =
|
||||||
|
relativeHour * 60 * 60 + relativeMinute * 60 + relativeSecond >= hour * 60 * 60 + minute * 60 + second ? T.Companion.days(1).msecs() : 0L;
|
||||||
|
return calendar.getTimeInMillis() - dayOffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void uploadCareportalEvent(long date, DetailedBolusInfo.EventType event) {
|
private void uploadCareportalEvent(long date, DetailedBolusInfo.EventType event) {
|
||||||
|
|
|
@ -26,9 +26,15 @@
|
||||||
<string name="code_compare">이 장치에서 보여지는 코드와 펌프에서 보여지는 코드가 동일한가요?</string>
|
<string name="code_compare">이 장치에서 보여지는 코드와 펌프에서 보여지는 코드가 동일한가요?</string>
|
||||||
<string name="insight_pairing">Insight와 동기화</string>
|
<string name="insight_pairing">Insight와 동기화</string>
|
||||||
<string name="insight_local">아큐-첵 Insight</string>
|
<string name="insight_local">아큐-첵 Insight</string>
|
||||||
|
<string name="insight_delivered">%1$.2f U / %2$.2f U 주입됨</string>
|
||||||
<string name="insight_alert_formatter">%1$s: %2$s</string>
|
<string name="insight_alert_formatter">%1$s: %2$s</string>
|
||||||
<string name="tube_changed">튜브 변경</string>
|
<string name="tube_changed">튜브 변경</string>
|
||||||
<string name="insightpump_shortname">Sight</string>
|
<string name="insightpump_shortname">Sight</string>
|
||||||
|
<string name="insight_alert_notification_channel">인사이트 펌프 경고</string>
|
||||||
|
<string name="disable_vibration">수동 bolus 주입 시 진동 비활성화</string>
|
||||||
|
<string name="disable_vibration_summary">Bolus와 확장 bolus의 경우 (인사이트 펌웨어 3.x에서만 가능함)</string>
|
||||||
|
<string name="disable_vibration_auto">자동 bolus 주입 시 진동 비활성화</string>
|
||||||
|
<string name="disable_vibration_auto_summary">SMB와 TBR 기능을 통한 임시 basal의 경우 (인사이트 펌웨어 3.x에서만 가능함)</string>
|
||||||
<string name="timeout_during_handshake">연결 시간 초과 - 블루투스 재설정</string>
|
<string name="timeout_during_handshake">연결 시간 초과 - 블루투스 재설정</string>
|
||||||
<string name="pump_stopped">펌프 중지</string>
|
<string name="pump_stopped">펌프 중지</string>
|
||||||
<string name="pump_started">펌프 시작</string>
|
<string name="pump_started">펌프 시작</string>
|
||||||
|
@ -38,6 +44,7 @@
|
||||||
<string name="short_status_extended">확장: %3$d분 동안 %1$.2f / %2$.2f U</string>
|
<string name="short_status_extended">확장: %3$d분 동안 %1$.2f / %2$.2f U</string>
|
||||||
<string name="short_status_multiwave">Multiwave: %3$d 분 동안 %1$.2f / %2$.2f U</string>
|
<string name="short_status_multiwave">Multiwave: %3$d 분 동안 %1$.2f / %2$.2f U</string>
|
||||||
<string name="short_status_tdd">TDD: %1$.2f</string>
|
<string name="short_status_tdd">TDD: %1$.2f</string>
|
||||||
|
<string name="short_status_reservoir">잔여 인슐린 양 : %1$.2f U</string>
|
||||||
<string name="short_status_battery">Batt.: %1$d%%</string>
|
<string name="short_status_battery">Batt.: %1$d%%</string>
|
||||||
<string name="confirm">확인</string>
|
<string name="confirm">확인</string>
|
||||||
<string name="mute_alert">음소거</string>
|
<string name="mute_alert">음소거</string>
|
||||||
|
|
|
@ -54,9 +54,12 @@ class MedtronicCommunicationManager // This empty constructor must be kept, oth
|
||||||
@Inject lateinit var medtronicUtil: MedtronicUtil
|
@Inject lateinit var medtronicUtil: MedtronicUtil
|
||||||
@Inject lateinit var medtronicPumpHistoryDecoder: MedtronicPumpHistoryDecoder
|
@Inject lateinit var medtronicPumpHistoryDecoder: MedtronicPumpHistoryDecoder
|
||||||
|
|
||||||
private val MAX_COMMAND_TRIES = 3
|
companion object {
|
||||||
private val DEFAULT_TIMEOUT = 2000
|
|
||||||
private val RILEYLINK_TIMEOUT: Long = 15 * 60 * 1000 // 15 min
|
private const val MAX_COMMAND_TRIES = 3
|
||||||
|
private const val DEFAULT_TIMEOUT = 2000
|
||||||
|
private const val RILEYLINK_TIMEOUT: Long = 15 * 60 * 1000L // 15 min
|
||||||
|
}
|
||||||
|
|
||||||
var errorResponse: String? = null
|
var errorResponse: String? = null
|
||||||
private set
|
private set
|
||||||
|
@ -64,7 +67,7 @@ class MedtronicCommunicationManager // This empty constructor must be kept, oth
|
||||||
private var doWakeUpBeforeCommand = true
|
private var doWakeUpBeforeCommand = true
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
fun onInit(): Unit {
|
fun onInit() {
|
||||||
// we can't do this in the constructor, as sp only gets injected after the constructor has returned
|
// we can't do this in the constructor, as sp only gets injected after the constructor has returned
|
||||||
medtronicPumpStatus.previousConnection = sp.getLong(
|
medtronicPumpStatus.previousConnection = sp.getLong(
|
||||||
RileyLinkConst.Prefs.LastGoodDeviceCommunicationTime, 0L)
|
RileyLinkConst.Prefs.LastGoodDeviceCommunicationTime, 0L)
|
||||||
|
@ -92,7 +95,7 @@ class MedtronicCommunicationManager // This empty constructor must be kept, oth
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
fun isDeviceReachable(canPreventTuneUp: Boolean): Boolean {
|
private fun isDeviceReachable(canPreventTuneUp: Boolean): Boolean {
|
||||||
val state = medtronicPumpStatus.pumpDeviceState
|
val state = medtronicPumpStatus.pumpDeviceState
|
||||||
if (state !== PumpDeviceState.PumpUnreachable) medtronicPumpStatus.pumpDeviceState = PumpDeviceState.WakingUp
|
if (state !== PumpDeviceState.PumpUnreachable) medtronicPumpStatus.pumpDeviceState = PumpDeviceState.WakingUp
|
||||||
for (retry in 0..4) {
|
for (retry in 0..4) {
|
||||||
|
@ -189,6 +192,7 @@ class MedtronicCommunicationManager // This empty constructor must be kept, oth
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("SameParameterValue")
|
||||||
@Throws(RileyLinkCommunicationException::class)
|
@Throws(RileyLinkCommunicationException::class)
|
||||||
private fun runCommandWithFrames(commandType: MedtronicCommandType, frames: List<List<Byte>>): PumpMessage? {
|
private fun runCommandWithFrames(commandType: MedtronicCommandType, frames: List<List<Byte>>): PumpMessage? {
|
||||||
aapsLogger.debug(LTag.PUMPCOMM, "Run command with Frames: " + commandType.name)
|
aapsLogger.debug(LTag.PUMPCOMM, "Run command with Frames: " + commandType.name)
|
||||||
|
@ -266,7 +270,7 @@ class MedtronicCommunicationManager // This empty constructor must be kept, oth
|
||||||
while (!done) {
|
while (!done) {
|
||||||
// examine current response for problems.
|
// examine current response for problems.
|
||||||
val frameData = currentResponse.frameData
|
val frameData = currentResponse.frameData
|
||||||
if (frameData.size > 0 && currentResponse.frameNumber == expectedFrameNum) {
|
if (frameData.isNotEmpty() && currentResponse.frameNumber == expectedFrameNum) {
|
||||||
// success! got a frame.
|
// success! got a frame.
|
||||||
if (frameData.size != 64) {
|
if (frameData.size != 64) {
|
||||||
aapsLogger.warn(LTag.PUMPCOMM, "Expected frame of length 64, got frame of length " + frameData.size)
|
aapsLogger.warn(LTag.PUMPCOMM, "Expected frame of length 64, got frame of length " + frameData.size)
|
||||||
|
@ -286,12 +290,12 @@ class MedtronicCommunicationManager // This empty constructor must be kept, oth
|
||||||
done = true // successful completion
|
done = true // successful completion
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (frameData.size == 0) {
|
if (frameData.isEmpty()) {
|
||||||
aapsLogger.error(LTag.PUMPCOMM, "null frame data, retrying")
|
aapsLogger.error(LTag.PUMPCOMM, "null frame data, retrying")
|
||||||
} else if (currentResponse.frameNumber != expectedFrameNum) {
|
} else if (currentResponse.frameNumber != expectedFrameNum) {
|
||||||
aapsLogger.warn(LTag.PUMPCOMM, String.format(Locale.ENGLISH, "Expected frame number %d, received %d (retrying)", expectedFrameNum,
|
aapsLogger.warn(LTag.PUMPCOMM, String.format(Locale.ENGLISH, "Expected frame number %d, received %d (retrying)", expectedFrameNum,
|
||||||
currentResponse.frameNumber))
|
currentResponse.frameNumber))
|
||||||
} else if (frameData.size == 0) {
|
} else if (frameData.isEmpty()) {
|
||||||
aapsLogger.warn(LTag.PUMPCOMM, "Frame has zero length, retrying")
|
aapsLogger.warn(LTag.PUMPCOMM, "Frame has zero length, retrying")
|
||||||
}
|
}
|
||||||
failures++
|
failures++
|
||||||
|
@ -381,8 +385,7 @@ class MedtronicCommunicationManager // This empty constructor must be kept, oth
|
||||||
medtronicPumpStatus.pumpDeviceState = PumpDeviceState.Active
|
medtronicPumpStatus.pumpDeviceState = PumpDeviceState.Active
|
||||||
|
|
||||||
// create message
|
// create message
|
||||||
val msg: PumpMessage
|
val msg: PumpMessage = bodyData?.let { makePumpMessage(commandType, it) } ?: makePumpMessage(commandType)
|
||||||
msg = bodyData?.let { makePumpMessage(commandType, it) } ?: makePumpMessage(commandType)
|
|
||||||
|
|
||||||
// send and wait for response
|
// send and wait for response
|
||||||
val response = sendAndListen(msg, timeoutMs)
|
val response = sendAndListen(msg, timeoutMs)
|
||||||
|
@ -396,8 +399,7 @@ class MedtronicCommunicationManager // This empty constructor must be kept, oth
|
||||||
}
|
}
|
||||||
|
|
||||||
// All pump communications go through this function.
|
// All pump communications go through this function.
|
||||||
@Throws(RileyLinkCommunicationException::class)
|
@Throws(RileyLinkCommunicationException::class) private /*override*/ fun sendAndListen(msg: PumpMessage, timeout_ms: Int): PumpMessage {
|
||||||
protected /*override*/ fun sendAndListen(msg: PumpMessage, timeout_ms: Int): PumpMessage {
|
|
||||||
return super.sendAndListen(msg, timeout_ms)!!
|
return super.sendAndListen(msg, timeout_ms)!!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -451,7 +453,7 @@ class MedtronicCommunicationManager // This empty constructor must be kept, oth
|
||||||
return responseData
|
return responseData
|
||||||
}
|
}
|
||||||
val contents = response.rawContent
|
val contents = response.rawContent
|
||||||
return if (contents.size > 0) {
|
return if (contents.isNotEmpty()) {
|
||||||
if (contents.size >= expectedLength) {
|
if (contents.size >= expectedLength) {
|
||||||
aapsLogger.debug(LTag.PUMPCOMM, String.format(Locale.ENGLISH, "%s: Content: %s", method, ByteUtil.shortHexString(contents)))
|
aapsLogger.debug(LTag.PUMPCOMM, String.format(Locale.ENGLISH, "%s: Content: %s", method, ByteUtil.shortHexString(contents)))
|
||||||
null
|
null
|
||||||
|
@ -493,8 +495,7 @@ class MedtronicCommunicationManager // This empty constructor must be kept, oth
|
||||||
for (retries in 0..MAX_COMMAND_TRIES) {
|
for (retries in 0..MAX_COMMAND_TRIES) {
|
||||||
try {
|
try {
|
||||||
// create message
|
// create message
|
||||||
var msg: PumpMessage
|
val msg: PumpMessage = makePumpMessage(commandType)
|
||||||
msg = makePumpMessage(commandType)
|
|
||||||
|
|
||||||
// send and wait for response
|
// send and wait for response
|
||||||
var response = sendAndListen(msg, DEFAULT_TIMEOUT + DEFAULT_TIMEOUT * retries)
|
var response = sendAndListen(msg, DEFAULT_TIMEOUT + DEFAULT_TIMEOUT * retries)
|
||||||
|
@ -527,7 +528,7 @@ class MedtronicCommunicationManager // This empty constructor must be kept, oth
|
||||||
|
|
||||||
aapsLogger.debug(LTag.PUMPCOMM, "End Response: {}", ByteUtil.getHex(data))
|
aapsLogger.debug(LTag.PUMPCOMM, "End Response: {}", ByteUtil.getHex(data))
|
||||||
|
|
||||||
var basalProfile: BasalProfile? = medtronicConverter.decodeBasalProfile(medtronicPumpPlugin.pumpDescription.pumpType, data)
|
val basalProfile: BasalProfile? = medtronicConverter.decodeBasalProfile(medtronicPumpPlugin.pumpDescription.pumpType, data)
|
||||||
// checkResponseRawContent(data, commandType) {
|
// checkResponseRawContent(data, commandType) {
|
||||||
// basalProfile = medtronicConverter.decodeBasalProfile(medtronicPumpPlugin.pumpDescription.pumpType, data)
|
// basalProfile = medtronicConverter.decodeBasalProfile(medtronicPumpPlugin.pumpDescription.pumpType, data)
|
||||||
// }
|
// }
|
||||||
|
|
|
@ -22,8 +22,10 @@
|
||||||
<string name="medtronic_pump_battery_alkaline">알카라인(확장뷰)</string>
|
<string name="medtronic_pump_battery_alkaline">알카라인(확장뷰)</string>
|
||||||
<string name="medtronic_pump_battery_lithium">리튬(확장뷰)</string>
|
<string name="medtronic_pump_battery_lithium">리튬(확장뷰)</string>
|
||||||
<string name="medtronic_pump_battery_nizn">NiZn (확장 뷰)</string>
|
<string name="medtronic_pump_battery_nizn">NiZn (확장 뷰)</string>
|
||||||
|
<string name="medtronic_pump_battery_nimh">니켈수소전지 (연장 뷰)</string>
|
||||||
<string name="medtronic_bolus_debugging">Bolus/관리 디버깅</string>
|
<string name="medtronic_bolus_debugging">Bolus/관리 디버깅</string>
|
||||||
<!-- MDT Fragment -->
|
<!-- MDT Fragment -->
|
||||||
|
<string name="rl_battery_label">RileyLink 배터리</string>
|
||||||
<!-- MDT Errors -->
|
<!-- MDT Errors -->
|
||||||
<string name="medtronic_errors">에러</string>
|
<string name="medtronic_errors">에러</string>
|
||||||
<string name="medtronic_error_serial_not_set">일련번호 # 설정되지 않음</string>
|
<string name="medtronic_error_serial_not_set">일련번호 # 설정되지 않음</string>
|
||||||
|
@ -63,13 +65,17 @@
|
||||||
<string name="medtronic_cmd_desc_get_history">이력 받기 - 페이지 %1$d (%2$d/16)</string>
|
<string name="medtronic_cmd_desc_get_history">이력 받기 - 페이지 %1$d (%2$d/16)</string>
|
||||||
<string name="medtronic_cmd_desc_get_history_request">이력 받기 - 페이지 %1$d</string>
|
<string name="medtronic_cmd_desc_get_history_request">이력 받기 - 페이지 %1$d</string>
|
||||||
<string name="medtronic_cmd_desc_get_time">펌프 시간 받기</string>
|
<string name="medtronic_cmd_desc_get_time">펌프 시간 받기</string>
|
||||||
|
<string name="medtronic_cmd_desc_set_time">펌프 시간 설정</string>
|
||||||
|
<string name="medtronic_cmd_desc_get_battery_status">배터리 상태 확인</string>
|
||||||
<string name="medtronic_cmd_desc_get_settings">설정 받기</string>
|
<string name="medtronic_cmd_desc_get_settings">설정 받기</string>
|
||||||
<string name="medtronic_cmd_desc_get_model">펌프 모델 받기</string>
|
<string name="medtronic_cmd_desc_get_model">펌프 모델 받기</string>
|
||||||
<string name="medtronic_cmd_desc_get_basal_profile">Basal 프로파일 받기</string>
|
<string name="medtronic_cmd_desc_get_basal_profile">Basal 프로파일 받기</string>
|
||||||
<string name="medtronic_cmd_desc_set_basal_profile">Basal 프로파일 설정</string>
|
<string name="medtronic_cmd_desc_set_basal_profile">Basal 프로파일 설정</string>
|
||||||
<string name="medtronic_cmd_desc_get_tbr">임시 Basal 받기</string>
|
<string name="medtronic_cmd_desc_get_tbr">임시 Basal 받기</string>
|
||||||
<string name="medtronic_cmd_desc_set_tbr">임시 Basal 설정</string>
|
<string name="medtronic_cmd_desc_set_tbr">임시 Basal 설정</string>
|
||||||
|
<string name="medtronic_cmd_desc_cancel_tbr">임시 basal 취소</string>
|
||||||
<string name="medtronic_cmd_desc_set_bolus">Bolus 설정</string>
|
<string name="medtronic_cmd_desc_set_bolus">Bolus 설정</string>
|
||||||
|
<string name="medtronic_cmd_desc_get_remaining_insulin">잔여 인슐린 확인</string>
|
||||||
<string name="medtronic_pump_status_pump_unreachable">펌프에 연결할 수 없습니다</string>
|
<string name="medtronic_pump_status_pump_unreachable">펌프에 연결할 수 없습니다</string>
|
||||||
<string name="medtronic_warning">경고</string>
|
<string name="medtronic_warning">경고</string>
|
||||||
<!-- medtronic_warning -->
|
<!-- medtronic_warning -->
|
||||||
|
@ -81,4 +87,7 @@
|
||||||
<string name="common_on">켜짐</string>
|
<string name="common_on">켜짐</string>
|
||||||
<string name="common_off">끄기</string>
|
<string name="common_off">끄기</string>
|
||||||
<string name="pump_time_updated">펌프 시간 업데이트</string>
|
<string name="pump_time_updated">펌프 시간 업데이트</string>
|
||||||
|
<string name="set_neutral_temps_title">기본 임시 basal 설정</string>
|
||||||
|
<string name="set_neutral_temps_summary">활성화되면, 매 한 시간 전에 임시 basal을 취소할 것입니다. 이 기능은 일부 펌프에서 한 시간마다 울리는 소리/진동 경고를 멈추게 합니다.</string>
|
||||||
|
<string name="mdt_tbr_remaining">%1$.1f U/h (%2$d 분 남음)</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -23,7 +23,10 @@ abstract class OmnipodWizardModule {
|
||||||
|
|
||||||
@Provides
|
@Provides
|
||||||
@OmnipodPluginQualifier
|
@OmnipodPluginQualifier
|
||||||
fun providesViewModelFactory(@OmnipodPluginQualifier viewModels: MutableMap<Class<out ViewModel>, @JvmSuppressWildcards Provider<ViewModel>>): ViewModelProvider.Factory {
|
fun providesViewModelFactory(
|
||||||
|
@OmnipodPluginQualifier
|
||||||
|
viewModels: MutableMap<Class<out ViewModel>, @JvmSuppressWildcards Provider<ViewModel>>
|
||||||
|
): ViewModelProvider.Factory {
|
||||||
return ViewModelFactory(viewModels)
|
return ViewModelFactory(viewModels)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@ import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import info.nightscout.androidaps.queue.commands.CustomCommand;
|
import info.nightscout.androidaps.queue.commands.CustomCommand;
|
||||||
|
|
||||||
public final class CommandAcknowledgeAlerts implements CustomCommand {
|
public final class CommandSilenceAlerts implements CustomCommand {
|
||||||
@NotNull @Override public String getStatusDescription() {
|
@NotNull @Override public String getStatusDescription() {
|
||||||
return "ACKNOWLEDGE ALERTS";
|
return "ACKNOWLEDGE ALERTS";
|
||||||
}
|
}
|
|
@ -41,7 +41,11 @@ class AttachPodFragment : InfoFragmentBase() {
|
||||||
.setIcon(android.R.drawable.ic_dialog_alert)
|
.setIcon(android.R.drawable.ic_dialog_alert)
|
||||||
.setTitle(getString(getTitleId()))
|
.setTitle(getString(getTitleId()))
|
||||||
.setMessage(getString(R.string.omnipod_common_pod_activation_wizard_attach_pod_confirm_insert_cannula_text))
|
.setMessage(getString(R.string.omnipod_common_pod_activation_wizard_attach_pod_confirm_insert_cannula_text))
|
||||||
.setPositiveButton(getString(R.string.omnipod_common_ok)) { _, _ -> findNavController().navigate(getNextPageActionId()) }
|
.setPositiveButton(getString(R.string.omnipod_common_ok)) { _, _ ->
|
||||||
|
findNavController().navigate(
|
||||||
|
getNextPageActionId()
|
||||||
|
)
|
||||||
|
}
|
||||||
.setNegativeButton(getString(R.string.omnipod_common_cancel), null)
|
.setNegativeButton(getString(R.string.omnipod_common_cancel), null)
|
||||||
.show()
|
.show()
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
package info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.activation.viewmodel.action
|
package info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.activation.viewmodel.action
|
||||||
|
|
||||||
abstract class InitializePodViewModel : PodActivationActionViewModelBase()
|
import dagger.android.HasAndroidInjector
|
||||||
|
import info.nightscout.androidaps.logging.AAPSLogger
|
||||||
|
|
||||||
|
abstract class InitializePodViewModel(
|
||||||
|
injector: HasAndroidInjector,
|
||||||
|
logger: AAPSLogger
|
||||||
|
) : PodActivationActionViewModelBase(injector, logger)
|
|
@ -1,3 +1,9 @@
|
||||||
package info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.activation.viewmodel.action
|
package info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.activation.viewmodel.action
|
||||||
|
|
||||||
abstract class InsertCannulaViewModel : PodActivationActionViewModelBase()
|
import dagger.android.HasAndroidInjector
|
||||||
|
import info.nightscout.androidaps.logging.AAPSLogger
|
||||||
|
|
||||||
|
abstract class InsertCannulaViewModel(
|
||||||
|
injector: HasAndroidInjector,
|
||||||
|
logger: AAPSLogger
|
||||||
|
) : PodActivationActionViewModelBase(injector, logger)
|
|
@ -1,8 +1,13 @@
|
||||||
package info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.activation.viewmodel.action
|
package info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.activation.viewmodel.action
|
||||||
|
|
||||||
|
import dagger.android.HasAndroidInjector
|
||||||
|
import info.nightscout.androidaps.logging.AAPSLogger
|
||||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.common.viewmodel.ActionViewModelBase
|
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.common.viewmodel.ActionViewModelBase
|
||||||
|
|
||||||
abstract class PodActivationActionViewModelBase : ActionViewModelBase() {
|
abstract class PodActivationActionViewModelBase(
|
||||||
|
injector: HasAndroidInjector,
|
||||||
|
logger: AAPSLogger
|
||||||
|
) : ActionViewModelBase(injector, logger) {
|
||||||
|
|
||||||
abstract fun isPodInAlarm(): Boolean
|
abstract fun isPodInAlarm(): Boolean
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,8 @@ abstract class ActionFragmentBase : WizardFragmentBase() {
|
||||||
binding.navButtonsLayout.buttonNext.isEnabled = false
|
binding.navButtonsLayout.buttonNext.isEnabled = false
|
||||||
view.findViewById<TextView>(R.id.omnipod_wizard_action_page_text).setText(getTextId())
|
view.findViewById<TextView>(R.id.omnipod_wizard_action_page_text).setText(getTextId())
|
||||||
|
|
||||||
view.findViewById<Button>(R.id.omnipod_wizard_button_retry).setOnClickListener { actionViewModel.executeAction() }
|
view.findViewById<Button>(R.id.omnipod_wizard_button_retry)
|
||||||
|
.setOnClickListener { actionViewModel.executeAction() }
|
||||||
|
|
||||||
actionViewModel.isActionExecutingLiveData.observe(viewLifecycleOwner, { isExecuting ->
|
actionViewModel.isActionExecutingLiveData.observe(viewLifecycleOwner, { isExecuting ->
|
||||||
if (isExecuting) {
|
if (isExecuting) {
|
||||||
|
@ -33,7 +34,8 @@ abstract class ActionFragmentBase : WizardFragmentBase() {
|
||||||
view.findViewById<Button>(R.id.omnipod_wizard_button_discard_pod).visibility = View.GONE
|
view.findViewById<Button>(R.id.omnipod_wizard_button_discard_pod).visibility = View.GONE
|
||||||
view.findViewById<Button>(R.id.omnipod_wizard_button_retry).visibility = View.GONE
|
view.findViewById<Button>(R.id.omnipod_wizard_button_retry).visibility = View.GONE
|
||||||
}
|
}
|
||||||
view.findViewById<ProgressBar>(R.id.omnipod_wizard_action_progress_indication).visibility = isExecuting.toVisibility()
|
view.findViewById<ProgressBar>(R.id.omnipod_wizard_action_progress_indication).visibility =
|
||||||
|
isExecuting.toVisibility()
|
||||||
view.findViewById<Button>(R.id.button_cancel).isEnabled = !isExecuting
|
view.findViewById<Button>(R.id.button_cancel).isEnabled = !isExecuting
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -42,9 +44,12 @@ abstract class ActionFragmentBase : WizardFragmentBase() {
|
||||||
val isExecuting = isActionExecuting()
|
val isExecuting = isActionExecuting()
|
||||||
|
|
||||||
view.findViewById<Button>(R.id.button_next).isEnabled = result.success
|
view.findViewById<Button>(R.id.button_next).isEnabled = result.success
|
||||||
view.findViewById<ImageView>(R.id.omnipod_wizard_action_success).visibility = result.success.toVisibility()
|
view.findViewById<ImageView>(R.id.omnipod_wizard_action_success).visibility =
|
||||||
view.findViewById<TextView>(R.id.omnipod_wizard_action_error).visibility = (!isExecuting && !result.success).toVisibility()
|
result.success.toVisibility()
|
||||||
view.findViewById<Button>(R.id.omnipod_wizard_button_retry).visibility = (!isExecuting && !result.success).toVisibility()
|
view.findViewById<TextView>(R.id.omnipod_wizard_action_error).visibility =
|
||||||
|
(!isExecuting && !result.success).toVisibility()
|
||||||
|
view.findViewById<Button>(R.id.omnipod_wizard_button_retry).visibility =
|
||||||
|
(!isExecuting && !result.success).toVisibility()
|
||||||
|
|
||||||
if (!result.success) {
|
if (!result.success) {
|
||||||
view.findViewById<TextView>(R.id.omnipod_wizard_action_error).text = result.comment
|
view.findViewById<TextView>(R.id.omnipod_wizard_action_error).text = result.comment
|
||||||
|
|
|
@ -47,7 +47,8 @@ abstract class WizardFragmentBase : DaggerFragment() {
|
||||||
|
|
||||||
if (nextPage == null) {
|
if (nextPage == null) {
|
||||||
binding.navButtonsLayout.buttonNext.text = getString(R.string.omnipod_common_wizard_button_finish)
|
binding.navButtonsLayout.buttonNext.text = getString(R.string.omnipod_common_wizard_button_finish)
|
||||||
binding.navButtonsLayout.buttonNext.backgroundTintList = ColorStateList.valueOf(resources.getColor(R.color.omnipod_wizard_finish_button, context?.theme))
|
binding.navButtonsLayout.buttonNext.backgroundTintList =
|
||||||
|
ColorStateList.valueOf(resources.getColor(R.color.omnipod_wizard_finish_button, context?.theme))
|
||||||
}
|
}
|
||||||
|
|
||||||
updateProgressIndication()
|
updateProgressIndication()
|
||||||
|
|
|
@ -2,11 +2,17 @@ package info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.common.
|
||||||
|
|
||||||
import androidx.lifecycle.LiveData
|
import androidx.lifecycle.LiveData
|
||||||
import androidx.lifecycle.MutableLiveData
|
import androidx.lifecycle.MutableLiveData
|
||||||
|
import dagger.android.HasAndroidInjector
|
||||||
import info.nightscout.androidaps.data.PumpEnactResult
|
import info.nightscout.androidaps.data.PumpEnactResult
|
||||||
import io.reactivex.schedulers.Schedulers
|
import info.nightscout.androidaps.logging.AAPSLogger
|
||||||
import io.reactivex.subjects.SingleSubject
|
import info.nightscout.androidaps.logging.LTag
|
||||||
|
import io.reactivex.Single
|
||||||
|
import io.reactivex.rxkotlin.subscribeBy
|
||||||
|
|
||||||
abstract class ActionViewModelBase : ViewModelBase() {
|
abstract class ActionViewModelBase(
|
||||||
|
protected val injector: HasAndroidInjector,
|
||||||
|
protected val logger: AAPSLogger
|
||||||
|
) : ViewModelBase() {
|
||||||
|
|
||||||
private val _isActionExecutingLiveData = MutableLiveData(false)
|
private val _isActionExecutingLiveData = MutableLiveData(false)
|
||||||
val isActionExecutingLiveData: LiveData<Boolean> = _isActionExecutingLiveData
|
val isActionExecutingLiveData: LiveData<Boolean> = _isActionExecutingLiveData
|
||||||
|
@ -16,14 +22,18 @@ abstract class ActionViewModelBase : ViewModelBase() {
|
||||||
|
|
||||||
fun executeAction() {
|
fun executeAction() {
|
||||||
_isActionExecutingLiveData.postValue(true)
|
_isActionExecutingLiveData.postValue(true)
|
||||||
SingleSubject.fromCallable(this::doExecuteAction)
|
val disposable = doExecuteAction().subscribeBy(
|
||||||
.subscribeOn(Schedulers.io())
|
onSuccess = { result ->
|
||||||
.doOnSuccess { result ->
|
|
||||||
_isActionExecutingLiveData.postValue(false)
|
_isActionExecutingLiveData.postValue(false)
|
||||||
_actionResultLiveData.postValue(result)
|
_actionResultLiveData.postValue(result)
|
||||||
}
|
},
|
||||||
.subscribe()
|
onError = { throwable ->
|
||||||
|
logger.error(LTag.PUMP, "Caught exception in while executing action in ActionViewModelBase", throwable)
|
||||||
|
_isActionExecutingLiveData.postValue(false)
|
||||||
|
_actionResultLiveData.postValue(PumpEnactResult(injector).success(false).comment(
|
||||||
|
throwable.message ?: "Caught exception in while executing action in ActionViewModelBase"))
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract fun doExecuteAction(): PumpEnactResult
|
protected abstract fun doExecuteAction(): Single<PumpEnactResult>
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,8 @@ class DeactivatePodFragment : ActionFragmentBase() {
|
||||||
|
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
view.findViewById<Button>(R.id.omnipod_wizard_button_discard_pod)?.setOnClickListener {
|
buttonDiscardPod = view.findViewById(R.id.omnipod_wizard_button_discard_pod)
|
||||||
|
buttonDiscardPod.setOnClickListener {
|
||||||
context?.let {
|
context?.let {
|
||||||
AlertDialog.Builder(it)
|
AlertDialog.Builder(it)
|
||||||
.setIcon(android.R.drawable.ic_dialog_alert)
|
.setIcon(android.R.drawable.ic_dialog_alert)
|
||||||
|
|
|
@ -1,8 +1,13 @@
|
||||||
package info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.deactivation.viewmodel.action
|
package info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.deactivation.viewmodel.action
|
||||||
|
|
||||||
|
import dagger.android.HasAndroidInjector
|
||||||
|
import info.nightscout.androidaps.logging.AAPSLogger
|
||||||
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.common.viewmodel.ActionViewModelBase
|
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.common.viewmodel.ActionViewModelBase
|
||||||
|
|
||||||
abstract class DeactivatePodViewModel : ActionViewModelBase() {
|
abstract class DeactivatePodViewModel(
|
||||||
|
injector: HasAndroidInjector,
|
||||||
|
logger: AAPSLogger
|
||||||
|
) : ActionViewModelBase(injector, logger) {
|
||||||
|
|
||||||
abstract fun discardPod()
|
abstract fun discardPod()
|
||||||
}
|
}
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
<!-- Unique ID -->
|
<!-- Unique ID -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/omnipod_common_overview_pod_unique_id_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
@ -32,7 +33,7 @@
|
||||||
tools:ignore="HardcodedText" />
|
tools:ignore="HardcodedText" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/pod_address"
|
android:id="@+id/unique_id"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
|
@ -45,6 +46,7 @@
|
||||||
|
|
||||||
<!-- Pod Lot -->
|
<!-- Pod Lot -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/omnipod_common_overview_lot_number_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
@ -110,7 +112,7 @@
|
||||||
tools:ignore="HardcodedText" />
|
tools:ignore="HardcodedText" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/pod_tid"
|
android:id="@+id/pod_sequence_number"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
|
|
|
@ -2,17 +2,194 @@
|
||||||
<resources>
|
<resources>
|
||||||
<!-- Omnipod - Keys -->
|
<!-- Omnipod - Keys -->
|
||||||
<!-- Omnipod - Pod Management -->
|
<!-- Omnipod - Pod Management -->
|
||||||
|
<string name="omnipod_common_pod_management_title">Pod Management</string>
|
||||||
|
<string name="omnipod_common_pod_management_heading_actions">Aktionen</string>
|
||||||
|
<string name="omnipod_common_pod_management_heading_tools">Tools</string>
|
||||||
|
<string name="omnipod_common_pod_management_button_activate_pod">Pod aktivieren</string>
|
||||||
|
<string name="omnipod_common_pod_management_button_deactivate_pod">Pod deaktivieren</string>
|
||||||
|
<string name="omnipod_common_pod_management_button_discard_pod">Pod verwerfen</string>
|
||||||
|
<string name="omnipod_common_pod_management_discard_pod_confirmation">Wenn Du den Pod verwirfst, kannst Du nicht mehr mit ihm kommunizieren. Mache das nur, wenn jede Kommunikation mit dem Pod dauerhaft fehlschlägt. Falls Du noch mit dem Pod kommunizieren kannst, verwende bitte die Option <b>Pod deaktivieren</b>.\n\nWenn Du fortfahren willst, entferne jetzt den Pod von Deinem Körper!</string>
|
||||||
|
<string name="omnipod_common_pod_management_button_play_test_beep">Testton abspielen</string>
|
||||||
|
<string name="omnipod_common_pod_management_button_playing_test_beep">Spiele Testton ab....</string>
|
||||||
|
<string name="omnipod_common_pod_management_button_pod_history">Pod Historie</string>
|
||||||
<!-- Omnipod - Error -->
|
<!-- Omnipod - Error -->
|
||||||
|
<string name="omnipod_common_error_pod_not_attached">Kein aktiver Pod</string>
|
||||||
|
<string name="omnipod_common_error_set_basal_failed">Setzen des Basal-Profils fehlgeschlagen.</string>
|
||||||
|
<string name="omnipod_common_error_bolus_did_not_succeed">Bolus nicht abgegeben</string>
|
||||||
|
<string name="omnipod_common_error_failed_to_set_profile_empty_profile">Fehler beim Festlegen des Basalprofils: Ein leeres Profil wurde empfangen. Akiviere Dein Basalprofil.</string>
|
||||||
|
<string name="omnipod_common_error_set_initial_basal_schedule_no_profile">Kein Basalprofil aktiv. Aktiviere Dein Profil.</string>
|
||||||
|
<string name="omnipod_common_error_unsupported_custom_command">Nicht unterstützter benutzerdefinierter Befehl: %1$s</string>
|
||||||
|
<string name="omnipod_common_error_failed_to_refresh_status">Status konnte nicht aktualisiert werden.</string>
|
||||||
|
<string name="omnipod_common_error_failed_to_refresh_status_on_startup">Status konnte beim Start nicht aktualisiert werden</string>
|
||||||
|
<string name="omnipod_common_error_failed_to_silence_alerts">Alarme können nicht stumm geschaltet werden</string>
|
||||||
|
<string name="omnipod_common_error_failed_to_suspend_delivery">Insulinabgabe konnte nicht unterbrochen werden.</string>
|
||||||
|
<string name="omnipod_common_error_failed_to_set_time">Zeiteinstellung fehlgeschlagen</string>
|
||||||
|
<string name="omnipod_common_error_failed_to_resume_delivery">Insulinabgabe konnte nicht gestartet werden.</string>
|
||||||
|
<string name="omnipod_common_error_failed_to_initialize_pod">Pod konnte nicht initalisiert werden.</string>
|
||||||
|
<string name="omnipod_common_error_failed_to_insert_cannula">Kanüle konnte nicht eingeführt werden.</string>
|
||||||
|
<string name="omnipod_common_error_pod_fault_activation_time_exceeded">Die Aktivierungszeit des Pods wurde überschritten. Dieser Pod kann nicht mehr aktiviert werden.</string>
|
||||||
|
<string name="omnipod_common_error_failed_to_verify_activation_progress">Überprüfen des Aktivierungsfortschritts gescheitert. Bitte erneut versuchen.</string>
|
||||||
|
<string name="omnipod_common_error_pod_suspended">Pod unterbrochen</string>
|
||||||
|
<string name="omnipod_common_error_failed_to_play_test_beep">Test-Piepton konnte nicht abgespielt werden</string>
|
||||||
|
<string name="omnipod_common_error_time_out_of_sync">Zeit auf dem Pod ist nicht synchron. Aktualisiere die Zeit auf der Registerkarte \"Omnipod\".</string>
|
||||||
|
<string name="omnipod_common_error_unexpected_exception">Es ist ein unerwarteter Fehler aufgetreten. Bitte melden! (%1$s: %2$s)</string>
|
||||||
<!-- Omnipod - Confirmation -->
|
<!-- Omnipod - Confirmation -->
|
||||||
|
<string name="omnipod_common_confirmation">Bestätigung</string>
|
||||||
|
<string name="omnipod_common_confirmation_time_or_timezone_change">Zeit und/oder Zeitzone auf dem Pod geändert.</string>
|
||||||
|
<string name="omnipod_common_confirmation_expiration_alerts_updated">Alarm-Einstellungen auf dem Pod geändert.</string>
|
||||||
|
<string name="omnipod_common_confirmation_time_on_pod_updated">Zeit auf dem Pod geändert.</string>
|
||||||
|
<string name="omnipod_common_confirmation_suspended_delivery">Insulinabgabe komplett ausgesetzt.</string>
|
||||||
|
<string name="omnipod_common_confirmation_silenced_alerts">Aktive Alarme stummgeschaltet.</string>
|
||||||
|
<string name="omnipod_common_confirmation_delivery_resumed">Insulinabgabe wieder aufgenommen.</string>
|
||||||
<!-- Omnipod - Overview -->
|
<!-- Omnipod - Overview -->
|
||||||
|
<string name="omnipod_common_overview_button_set_time">Zeit einstellen</string>
|
||||||
|
<string name="omnipod_common_overview_button_suspend_delivery">Unterbrechungen</string>
|
||||||
|
<string name="omnipod_common_overview_button_resume_delivery">Abgabe fortsetzen</string>
|
||||||
|
<string name="omnipod_common_overview_button_pod_management">Pod Mgmt</string>
|
||||||
|
<string name="omnipod_common_overview_button_silence_alerts">Alarme stummschalten</string>
|
||||||
|
<string name="omnipod_common_overview_pod_status">Pod Status</string>
|
||||||
|
<string name="omnipod_common_overview_total_delivered">Insgesamt abgegeben</string>
|
||||||
|
<string name="omnipod_common_overview_total_delivered_value">%1$.2f IE</string>
|
||||||
|
<string name="omnipod_common_overview_pod_unique_id">Eindeutige ID</string>
|
||||||
|
<string name="omnipod_common_overview_lot_number">LOT Nummer</string>
|
||||||
|
<string name="omnipod_common_overview_pod_sequence_number">Laufende Nummer</string>
|
||||||
|
<string name="omnipod_common_overview_pod_expiry_date">Pod läuft ab</string>
|
||||||
|
<string name="omnipod_common_overview_last_connection">Letzte Verbindung</string>
|
||||||
|
<string name="omnipod_common_overview_last_bolus">Letzter Bolus</string>
|
||||||
|
<string name="omnipod_common_overview_temp_basal_rate">Temporäre Basalrate</string>
|
||||||
|
<string name="omnipod_common_overview_base_basal_rate">Basis-Basalrate</string>
|
||||||
|
<string name="omnipod_common_overview_reservoir">Reservoir</string>
|
||||||
|
<string name="omnipod_common_overview_pod_active_alerts">Aktive Pod-Warnungen</string>
|
||||||
|
<string name="omnipod_common_overview_firmware_version">Firmware-Version</string>
|
||||||
|
<string name="omnipod_common_overview_time_on_pod">Zeit auf dem Pod</string>
|
||||||
|
<string name="omnipod_common_overview_temp_basal_value">%1$.2fIE/h @%2$s (%3$d/%4$d min.)</string>
|
||||||
|
<string name="omnipod_common_overview_reservoir_value">%1$.2f IE übrig</string>
|
||||||
|
<string name="omnipod_common_overview_reservoir_value_over50">Mehr als 50 IE verbleibend</string>
|
||||||
|
<string name="omnipod_common_overview_errors">Fehler</string>
|
||||||
<!-- Omnipod - Wizard Base -->
|
<!-- Omnipod - Wizard Base -->
|
||||||
|
<string name="omnipod_common_wizard_button_cancel">Abbrechen</string>
|
||||||
|
<string name="omnipod_common_wizard_button_finish">Beenden</string>
|
||||||
|
<string name="omnipod_common_wizard_button_next">Weiter</string>
|
||||||
|
<string name="omnipod_common_wizard_button_retry">Erneut versuchen</string>
|
||||||
|
<string name="omnipod_common_wizard_button_deactivate_pod">Pod deaktivieren</string>
|
||||||
|
<string name="omnipod_common_wizard_button_discard_pod">Pod verwerfen</string>
|
||||||
|
<string name="omnipod_common_wizard_exit_confirmation_text">Du hast noch nicht alle Schritte abgeschlossen. Willst Du wirklich beenden?</string>
|
||||||
|
<string name="omnipod_common_wizard_exit_confirmation_title">Schließen</string>
|
||||||
<!-- Omnipod - Pod Activation Wizard -->
|
<!-- Omnipod - Pod Activation Wizard -->
|
||||||
|
<string name="omnipod_common_pod_activation_wizard_start_pod_activation_title">Pod füllen</string>
|
||||||
|
<string name="omnipod_common_pod_activation_wizard_initialize_pod_title">Pod initialisieren</string>
|
||||||
|
<string name="omnipod_common_pod_activation_wizard_attach_pod_title">Pod anlegen</string>
|
||||||
|
<string name="omnipod_common_pod_activation_wizard_attach_pod_text">Bereite die Infusionsstelle vor. Entferne den Nadelschutz des Pods und die Schutzfolie über dem Kleber. Klebe dann den Pod an die gewünschte Körperstelle.\n\nFalls die Kanüle herausragt, klicke <b>Abbrechen</b> und verwirf den Pod.\n\nKlicke <b>Weiter</b>; um die Kanüle zu setzen und die Insulinabgabe zu beginnen.</string>
|
||||||
|
<string name="omnipod_common_pod_activation_wizard_attach_pod_confirm_insert_cannula_text">Nachdem Du <b>OK</b> gedrückt hast, wird die Kanüle eingeführt. Klebe den Pod vorher auf die gewünschte Infusionsstelle.</string>
|
||||||
|
<string name="omnipod_common_pod_activation_wizard_insert_cannula_title">Kanüle setzen</string>
|
||||||
|
<string name="omnipod_common_pod_activation_wizard_insert_cannula_text">Basalrate wird übertragen und Kanüle gesetzt.\n\nKlicke auf <b>Weiter</b> nachdem die Kanüle erfolgreich gesetzt wurde.</string>
|
||||||
|
<string name="omnipod_common_pod_activation_wizard_pod_activated_title">Pod aktiviert</string>
|
||||||
|
<string name="omnipod_common_pod_activation_wizard_pod_activated_text">\nDer neue Pod ist jetzt aktiv.\n\nDeine Basalrate ist programmiert und die Kanüle wurde gesetzt.\n\nBitte überprüfe, ob die Kanüle korrekt gesetzt wurde und ersetze den Pod, wenn Du das Gefühl hast, dass dies nicht erfolgreich war.</string>
|
||||||
<!-- Omnipod - Pod Deactivation Wizard -->
|
<!-- Omnipod - Pod Deactivation Wizard -->
|
||||||
|
<string name="omnipod_common_pod_deactivation_wizard_start_pod_deactivation_title">Pod deaktivieren</string>
|
||||||
|
<string name="omnipod_common_pod_deactivation_wizard_start_pod_deactivation_text">Drücke <b>Weiter</b> um den Pod zu deaktivieren.\n\n<b>Hinweis:</b> Dies unterbricht die gesamte Insulinabgabe und deaktiviert den Pod.</string>
|
||||||
|
<string name="omnipod_common_pod_deactivation_wizard_deactivating_pod_title">Deaktiviere den Pod...</string>
|
||||||
|
<string name="omnipod_common_pod_deactivation_wizard_deactivating_pod_text">Deaktiviere den Pod.\n\nNachdem die Deaktivierung komplett abgeschlossen wurde, kannst Du <b>Weiter</b> drücken.</string>
|
||||||
|
<string name="omnipod_common_pod_deactivation_wizard_pod_deactivated_title">Pod deaktiviert</string>
|
||||||
|
<string name="omnipod_common_pod_deactivation_wizard_pod_deactivated_text">Pod wurde deaktiviert.\n\nBitte entferne den Pod von Deinem Körper und recycle ihn.</string>
|
||||||
|
<string name="omnipod_common_pod_deactivation_wizard_pod_discarded_title">Pod verworfen</string>
|
||||||
|
<string name="omnipod_common_pod_deactivation_wizard_pod_discarded_text">Der Pod-Status wurde verworfen. Die Insulinabgabe wurde nicht unterbrochen, weil der Pod nicht korrekt deaktiviert wurde!\n\nBitte entferne den Pod von Deinem Körper und recycele ihn.</string>
|
||||||
|
<string name="omnipod_common_pod_deactivation_wizard_discard_pod_confirmation">Wenn Du den Pod verwirfst, kannst Du nicht mehr mit ihm kommunizieren. Mache das nur, wenn jede Kommunikation mit dem Pod dauerhaft fehlschlägt. Willst Du den Pod wirklich verwerfen?</string>
|
||||||
|
<string name="omnipod_common_pod_deactivation_wizard_discard_pod">Pod verwerfen</string>
|
||||||
<!-- Omnipod - Preferences -->
|
<!-- Omnipod - Preferences -->
|
||||||
|
<string name="omnipod_common_preferences_bolus_beeps_enabled">Bolus-Piep aktiviert</string>
|
||||||
|
<string name="omnipod_common_preferences_basal_beeps_enabled">Basal-Piep aktiviert</string>
|
||||||
|
<string name="omnipod_common_preferences_smb_beeps_enabled">SMB-Piep aktiviert</string>
|
||||||
|
<string name="omnipod_common_preferences_tbr_beeps_enabled">TBR-Piep aktiviert</string>
|
||||||
|
<string name="omnipod_common_preferences_suspend_delivery_button_enabled">Button \'Insulinabgabe unterbrechen\' im Omnipod Tab anzeigen</string>
|
||||||
|
<string name="omnipod_common_preferences_time_change_enabled">Sommerzeit/Zeitzonen-Erkennung aktiviert</string>
|
||||||
|
<string name="omnipod_common_preferences_expiration_reminder_enabled">Ablauferinnerung aktiviert</string>
|
||||||
|
<string name="omnipod_common_preferences_expiration_reminder_hours_before_shutdown">Stunden bis zum Podende</string>
|
||||||
|
<string name="omnipod_common_preferences_low_reservoir_alert_enabled">Warnung niedriger Reservoirstand aktiviert</string>
|
||||||
|
<string name="omnipod_common_preferences_low_reservoir_alert_units">Anzahl der Einheiten</string>
|
||||||
|
<string name="omnipod_common_preferences_automatically_silence_alerts">Pod-Alarme automatisch stummschalten</string>
|
||||||
|
<string name="omnipod_common_preferences_category_other">Andere</string>
|
||||||
|
<string name="omnipod_common_preferences_category_alerts">Alarme</string>
|
||||||
|
<string name="omnipod_common_preferences_category_confirmation_beeps">Bestätigungstöne</string>
|
||||||
|
<string name="omnipod_common_preferences_category_notifications">Benachrichtigungen</string>
|
||||||
|
<string name="omnipod_common_preferences_notification_uncertain_tbr_sound_enabled">Ton für unsichere TBR-Benachrichtigungen aktiviert</string>
|
||||||
|
<string name="omnipod_common_preferences_notification_uncertain_smb_sound_enabled">Ton für unsichere SMB-Benachrichtigungen aktiviert</string>
|
||||||
|
<string name="omnipod_common_preferences_notification_uncertain_bolus_sound_enabled">Ton für unsichere Bolus-Benachrichtigungen aktiviert</string>
|
||||||
<!-- Omnipod - Pod Status -->
|
<!-- Omnipod - Pod Status -->
|
||||||
|
<string name="omnipod_common_pod_status_no_active_pod">Kein aktiver Pod</string>
|
||||||
|
<string name="omnipod_common_pod_status_waiting_for_activation">Einrichtung im Gange (Warten auf Pod-Aktivierung)</string>
|
||||||
|
<string name="omnipod_common_pod_status_waiting_for_cannula_insertion">Einrichtung im Gang (Warten auf Setzen der Kanüle)</string>
|
||||||
|
<string name="omnipod_common_pod_status_running">In Betrieb</string>
|
||||||
|
<string name="omnipod_common_pod_status_suspended">Angehalten</string>
|
||||||
|
<string name="omnipod_common_pod_status_pod_fault">Pod-Fehler</string>
|
||||||
|
<string name="omnipod_common_pod_status_activation_time_exceeded">Aktivierungszeit überschritten</string>
|
||||||
|
<string name="omnipod_common_pod_status_inactive">Inaktiv</string>
|
||||||
|
<string name="omnipod_common_pod_status_pod_fault_description">Pod-Fehler: %1$03d %2$s</string>
|
||||||
<!-- Omnipod - Commands -->
|
<!-- Omnipod - Commands -->
|
||||||
|
<string name="omnipod_common_cmd_deactivate_pod">Pod deaktivieren</string>
|
||||||
|
<string name="omnipod_common_cmd_discard_pod">Pod verwerfen</string>
|
||||||
|
<string name="omnipod_common_cmd_set_bolus">Mahlzeiten Bolus abgeben</string>
|
||||||
|
<string name="omnipod_common_cmd_cancel_bolus">Bolus abbrechen</string>
|
||||||
|
<string name="omnipod_common_cmd_set_tbr">Setze Temporäre Basalrate</string>
|
||||||
|
<string name="omnipod_common_cmd_cancel_tbr_by_driver">Temporäre Basalrate abbrechen (intern über den Treiber)</string>
|
||||||
|
<string name="omnipod_common_cmd_cancel_tbr">Temp. Basalrate abbrechen</string>
|
||||||
|
<string name="omnipod_common_cmd_set_basal_schedule">Basalrate festlegen</string>
|
||||||
|
<string name="omnipod_common_cmd_get_pod_status">Pod-Status abrufen</string>
|
||||||
|
<string name="omnipod_common_cmd_get_pod_info">Pod-Info abrufen</string>
|
||||||
|
<string name="omnipod_common_cmd_set_time">Zeit einstellen</string>
|
||||||
|
<string name="omnipod_common_cmd_configure_alerts">Warnungen konfigurieren</string>
|
||||||
|
<string name="omnipod_common_cmd_silence_alerts">Alarme stummschalten</string>
|
||||||
|
<string name="omnipod_common_cmd_suspend_delivery">Abgabe unterbrechen</string>
|
||||||
|
<string name="omnipod_common_cmd_resume_delivery">Abgabe fortsetzen</string>
|
||||||
|
<string name="omnipod_common_cmd_unknown_entry">Unbekannte Eingabe</string>
|
||||||
|
<string name="omnipod_common_cmd_initialize_pod">Pod initialisieren</string>
|
||||||
|
<string name="omnipod_common_cmd_insert_cannula">Kanüle setzen</string>
|
||||||
|
<string name="omnipod_common_cmd_read_pulse_log">Pulse-Log lesen</string>
|
||||||
|
<string name="omnipod_common_cmd_set_fake_suspended_tbr">Fake TBR gesetzt, da der Pod pausiert ist.</string>
|
||||||
|
<string name="omnipod_common_cmd_cancel_fake_suspended_tbr">Abbruch der Fake TBR. Diese wurde eingestellt, da der Pod pausiert war.</string>
|
||||||
|
<string name="omnipod_common_cmd_split_tbr">Temp. Basalrate wegen unbekanntem Fehler bei TBR-Abbruch aufgeteilt</string>
|
||||||
|
<string name="omnipod_common_cmd_beep_config">Piep-Ton Konfiguration</string>
|
||||||
|
<string name="omnipod_common_cmd_play_test_beep">Testton abspielen</string>
|
||||||
<!-- Omnipod - Alerts -->
|
<!-- Omnipod - Alerts -->
|
||||||
|
<string name="omnipod_common_alert_finish_pairing_reminder">Erinnerung Kopplung beendet</string>
|
||||||
|
<string name="omnipod_common_alert_finish_setup_reminder_reminder">Erinnerung Setup beendet</string>
|
||||||
|
<string name="omnipod_common_alert_expiration">Pod läuft in Kürze ab</string>
|
||||||
|
<string name="omnipod_common_alert_expiration_advisory">Pod läuft in Kürze ab</string>
|
||||||
|
<string name="omnipod_common_alert_shutdown_imminent">Herunterfahren steht unmittelbar bevor</string>
|
||||||
|
<string name="omnipod_common_alert_low_reservoir">Niedriger Reservoirstand</string>
|
||||||
|
<string name="omnipod_common_alert_unknown_alert">Unbekannter Alarm</string>
|
||||||
<!-- Omnipod - Short status -->
|
<!-- Omnipod - Short status -->
|
||||||
|
<string name="omnipod_common_short_status_no_active_pod">Kein aktiver Pod</string>
|
||||||
|
<string name="omnipod_common_short_status_last_connection">Letzte Verb.: vor %1$d min</string>
|
||||||
|
<string name="omnipod_common_short_status_last_bolus">Letzter Bolus: %1$s @ %2$s</string>
|
||||||
|
<string name="omnipod_common_short_status_temp_basal">Temp: %1$s</string>
|
||||||
|
<string name="omnipod_common_short_status_extended_bolus">Verlängert: %1$s</string>
|
||||||
|
<string name="omnipod_common_short_status_reservoir">Reserv: %1$sU</string>
|
||||||
<!-- Omnipod - Other -->
|
<!-- Omnipod - Other -->
|
||||||
|
<string name="omnipod_common_yes">Ja</string>
|
||||||
|
<string name="omnipod_common_no">Nein</string>
|
||||||
|
<string name="omnipod_common_ok">OK</string>
|
||||||
|
<string name="omnipod_common_cancel">Abbrechen</string>
|
||||||
|
<string name="omnipod_common_warning">Warnung</string>
|
||||||
<!-- Omnipod - Times -->
|
<!-- Omnipod - Times -->
|
||||||
|
<string name="omnipod_common_moments_ago">gerade eben</string>
|
||||||
|
<string name="omnipod_common_less_than_a_minute_ago">vor weniger als einer Minute</string>
|
||||||
|
<string name="omnipod_common_composite_time">%1$s und %2$s</string>
|
||||||
|
<string name="omnipod_common_time_ago">vor %1$s</string>
|
||||||
|
<plurals name="omnipod_common_minutes">
|
||||||
|
<item quantity="one">%1$d Minute</item>
|
||||||
|
<item quantity="other">%1$d Minuten</item>
|
||||||
|
</plurals>
|
||||||
|
<plurals name="omnipod_common_hours">
|
||||||
|
<item quantity="one">%1$d Stunde</item>
|
||||||
|
<item quantity="other">%1$d Stunden</item>
|
||||||
|
</plurals>
|
||||||
|
<plurals name="omnipod_common_days">
|
||||||
|
<item quantity="one">%1$d Tag</item>
|
||||||
|
<item quantity="other">%1$d Tage</item>
|
||||||
|
</plurals>
|
||||||
|
<plurals name="omnipod_common_pod_alerts">
|
||||||
|
<item quantity="one">Pod-Alarm: %1$s</item>
|
||||||
|
<item quantity="other">Pod-Alarm: %1$s</item>
|
||||||
|
</plurals>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -111,6 +111,10 @@
|
||||||
<string name="omnipod_common_preferences_category_other">אחר</string>
|
<string name="omnipod_common_preferences_category_other">אחר</string>
|
||||||
<string name="omnipod_common_preferences_category_alerts">התראות</string>
|
<string name="omnipod_common_preferences_category_alerts">התראות</string>
|
||||||
<string name="omnipod_common_preferences_category_confirmation_beeps">צפצופי אימות</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">צליל של התראת בזאלי זמני לא ברור מאופשר</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 -->
|
<!-- Omnipod - Pod Status -->
|
||||||
<string name="omnipod_common_pod_status_no_active_pod">אין פוד פעיל</string>
|
<string name="omnipod_common_pod_status_no_active_pod">אין פוד פעיל</string>
|
||||||
<string name="omnipod_common_pod_status_waiting_for_activation">התקנה בביצוע (ממתין להפעלת הפוד)</string>
|
<string name="omnipod_common_pod_status_waiting_for_activation">התקנה בביצוע (ממתין להפעלת הפוד)</string>
|
||||||
|
|
|
@ -2,17 +2,186 @@
|
||||||
<resources>
|
<resources>
|
||||||
<!-- Omnipod - Keys -->
|
<!-- Omnipod - Keys -->
|
||||||
<!-- Omnipod - Pod Management -->
|
<!-- Omnipod - Pod Management -->
|
||||||
|
<string name="omnipod_common_pod_management_title">Pod 관리</string>
|
||||||
|
<string name="omnipod_common_pod_management_heading_actions">실행</string>
|
||||||
|
<string name="omnipod_common_pod_management_heading_tools">도구</string>
|
||||||
|
<string name="omnipod_common_pod_management_button_activate_pod">Pod 활성화</string>
|
||||||
|
<string name="omnipod_common_pod_management_button_deactivate_pod">Pod 비활성화</string>
|
||||||
|
<string name="omnipod_common_pod_management_button_discard_pod">Pod 폐기</string>
|
||||||
|
<string name="omnipod_common_pod_management_discard_pod_confirmation">Pod를 폐기하면, 더이상 해당 pod와 연결할 수 없습니다. Pod와의 모든 연결이 계속해서 실패할 경우에만 이를 수행하십시오. 만약 Pod와 연결이 아직 가능하다면 <b>Pod 비활성화</b>을 사용하십시오.\n\n계속해서 진행하고 싶은 경우, 반드시 Pod를 몸에서 제거하십시오!</string>
|
||||||
|
<string name="omnipod_common_pod_management_button_play_test_beep">테스트 신호음 작동</string>
|
||||||
|
<string name="omnipod_common_pod_management_button_playing_test_beep">테스트 신호음 작동 중...</string>
|
||||||
|
<string name="omnipod_common_pod_management_button_pod_history">Pod 이력</string>
|
||||||
<!-- Omnipod - Error -->
|
<!-- Omnipod - Error -->
|
||||||
|
<string name="omnipod_common_error_pod_not_attached">활성화된 Pod 없음</string>
|
||||||
|
<string name="omnipod_common_error_set_basal_failed">Basal 프로파일 설정 실패함</string>
|
||||||
|
<string name="omnipod_common_error_bolus_did_not_succeed">Bolus가 성공적으로 주입되지 않음</string>
|
||||||
|
<string name="omnipod_common_error_failed_to_set_profile_empty_profile">Basal 프로파일 설정 실패함: 내용이 없는 프로파일 수신됨. Basal 프로파일을 활성화하십시오.</string>
|
||||||
|
<string name="omnipod_common_error_set_initial_basal_schedule_no_profile">활성화된 프로파일 없음. Basal 프로파일을 활성화하십시오.</string>
|
||||||
|
<string name="omnipod_common_error_unsupported_custom_command">지원되지 않는 사용자 지정 명령: %1$s</string>
|
||||||
|
<string name="omnipod_common_error_failed_to_refresh_status">상태 새로고침 실패함</string>
|
||||||
|
<string name="omnipod_common_error_failed_to_refresh_status_on_startup">장치 시작에서 상태 새로고침 실패함</string>
|
||||||
|
<string name="omnipod_common_error_failed_to_silence_alerts">경고 음소거 실패함</string>
|
||||||
|
<string name="omnipod_common_error_failed_to_suspend_delivery">주입 중지 실패함</string>
|
||||||
|
<string name="omnipod_common_error_failed_to_set_time">시간 설정 실패함</string>
|
||||||
|
<string name="omnipod_common_error_failed_to_resume_delivery">주입 재시작 실패함</string>
|
||||||
|
<string name="omnipod_common_error_failed_to_initialize_pod">Pod 초기화 실패함</string>
|
||||||
|
<string name="omnipod_common_error_failed_to_insert_cannula">캐뉼라 삽입 실패함</string>
|
||||||
|
<string name="omnipod_common_error_pod_fault_activation_time_exceeded">Pod의 활성화 시간이 초과되었습니다. 이 Pod는 더 이상 사용할 수 없습니다.</string>
|
||||||
|
<string name="omnipod_common_error_failed_to_verify_activation_progress">활성화 과정 확인 실패함. 재시도하십시오.</string>
|
||||||
|
<string name="omnipod_common_error_pod_suspended">Pod 중지됨</string>
|
||||||
|
<string name="omnipod_common_error_failed_to_play_test_beep">테스트 신호음 작동 실패함</string>
|
||||||
|
<string name="omnipod_common_error_time_out_of_sync">Pod의 시간이 맞지 않습니다. Omnipod 탭에서 시간을 업데이트 하십시오.</string>
|
||||||
|
<string name="omnipod_common_error_unexpected_exception">예상치 못한 오류가 발생하였습니다. 보고 부탁드립니다! (%1$s: %2$s)</string>
|
||||||
<!-- Omnipod - Confirmation -->
|
<!-- Omnipod - Confirmation -->
|
||||||
|
<string name="omnipod_common_confirmation">확인</string>
|
||||||
|
<string name="omnipod_common_confirmation_time_or_timezone_change">Pod에서 시간과/또는 시간대 변경됨</string>
|
||||||
|
<string name="omnipod_common_confirmation_expiration_alerts_updated">Pod에서 경고 설정 업데이트 됨</string>
|
||||||
|
<string name="omnipod_common_confirmation_time_on_pod_updated">Pod에서 시간 업데이트 됨</string>
|
||||||
|
<string name="omnipod_common_confirmation_suspended_delivery">인슐린 주입이 중지됨</string>
|
||||||
|
<string name="omnipod_common_confirmation_silenced_alerts">활성화된 경고가 음소거 됨</string>
|
||||||
|
<string name="omnipod_common_confirmation_delivery_resumed">인슐린 주입이 재시작됨</string>
|
||||||
<!-- Omnipod - Overview -->
|
<!-- Omnipod - Overview -->
|
||||||
|
<string name="omnipod_common_overview_button_set_time">시간 설정</string>
|
||||||
|
<string name="omnipod_common_overview_button_suspend_delivery">중지</string>
|
||||||
|
<string name="omnipod_common_overview_button_resume_delivery">주입 재시작</string>
|
||||||
|
<string name="omnipod_common_overview_button_pod_management">Pod 관리</string>
|
||||||
|
<string name="omnipod_common_overview_button_silence_alerts">경고 음소거</string>
|
||||||
|
<string name="omnipod_common_overview_pod_status">Pod 상태</string>
|
||||||
|
<string name="omnipod_common_overview_total_delivered">모두 주입됨</string>
|
||||||
|
<string name="omnipod_common_overview_total_delivered_value">%1$.2f U</string>
|
||||||
|
<string name="omnipod_common_overview_pod_unique_id">고유 ID</string>
|
||||||
|
<string name="omnipod_common_overview_lot_number">LOT 번호</string>
|
||||||
|
<string name="omnipod_common_overview_pod_sequence_number">일련번호</string>
|
||||||
|
<string name="omnipod_common_overview_pod_expiry_date">Pod 만료됨</string>
|
||||||
|
<string name="omnipod_common_overview_last_connection">마지막 연결</string>
|
||||||
|
<string name="omnipod_common_overview_last_bolus">마지막 Bolus</string>
|
||||||
|
<string name="omnipod_common_overview_temp_basal_rate">임시 basal 양</string>
|
||||||
|
<string name="omnipod_common_overview_base_basal_rate">기본 basal 양</string>
|
||||||
|
<string name="omnipod_common_overview_reservoir">인슐린 잔량</string>
|
||||||
|
<string name="omnipod_common_overview_pod_active_alerts">Pod 경고 활성화</string>
|
||||||
|
<string name="omnipod_common_overview_firmware_version">펌웨어 버전</string>
|
||||||
|
<string name="omnipod_common_overview_time_on_pod">Pod 시간</string>
|
||||||
|
<string name="omnipod_common_overview_temp_basal_value">%1$.2fU/h @%2$s (%3$d/%4$d 분)</string>
|
||||||
|
<string name="omnipod_common_overview_reservoir_value">%1$.2f U 남음</string>
|
||||||
|
<string name="omnipod_common_overview_reservoir_value_over50">50 U 이상 남음</string>
|
||||||
|
<string name="omnipod_common_overview_errors">에러</string>
|
||||||
<!-- Omnipod - Wizard Base -->
|
<!-- Omnipod - Wizard Base -->
|
||||||
|
<string name="omnipod_common_wizard_button_cancel">취소</string>
|
||||||
|
<string name="omnipod_common_wizard_button_finish">종료</string>
|
||||||
|
<string name="omnipod_common_wizard_button_next">다음</string>
|
||||||
|
<string name="omnipod_common_wizard_button_retry">재시도</string>
|
||||||
|
<string name="omnipod_common_wizard_button_deactivate_pod">Pod 비활성화</string>
|
||||||
|
<string name="omnipod_common_wizard_button_discard_pod">Pod 폐기</string>
|
||||||
|
<string name="omnipod_common_wizard_exit_confirmation_text">모든 단계를 아직 완료하지 않았습니다. 정말 나가기를 원하십니까?</string>
|
||||||
|
<string name="omnipod_common_wizard_exit_confirmation_title">종료</string>
|
||||||
<!-- Omnipod - Pod Activation Wizard -->
|
<!-- Omnipod - Pod Activation Wizard -->
|
||||||
|
<string name="omnipod_common_pod_activation_wizard_start_pod_activation_title">Pod 채우기</string>
|
||||||
|
<string name="omnipod_common_pod_activation_wizard_initialize_pod_title">Pod 초기화</string>
|
||||||
|
<string name="omnipod_common_pod_activation_wizard_attach_pod_title">Pod 부착</string>
|
||||||
|
<string name="omnipod_common_pod_activation_wizard_attach_pod_text">삽입 위치를 준비하십시오. Pod의 바늘 캡과 접착 보호필름을 제거하고 Pod를 삽입 위치에 부착하십시오.\n\n만약, 캐뉼라가 튀어 나오면, <b>취소</b>를 누르고 Pod를 폐기하십시오.\n\n <b>다음</b>을 눌러 캐뉼라를 삽입하고 basal 주입을 시작하십시오.</string>
|
||||||
|
<string name="omnipod_common_pod_activation_wizard_attach_pod_confirm_insert_cannula_text"><b>확인</b>을 누르면, 캐뉼라가 삽입될 것입니다. Pod가 삽입 부위에 부착되었는지 확인하십시오.</string>
|
||||||
|
<string name="omnipod_common_pod_activation_wizard_insert_cannula_title">캐뉼라 삽입</string>
|
||||||
|
<string name="omnipod_common_pod_activation_wizard_insert_cannula_text">초기 basal을 설정하고 캐뉼라를 삽입합니다. \n\n캐뉼라가 성공적으로 삽입되면, <b>다음</b>을 누릅니다.</string>
|
||||||
|
<string name="omnipod_common_pod_activation_wizard_pod_activated_title">Pod 활성화됨</string>
|
||||||
|
<string name="omnipod_common_pod_activation_wizard_pod_activated_text">새로운 Pod가 활성화되었습니다. \n\nBasal이 프로그램되었으며, 캐뉼라가 삽입되었습니다. \n\n캐뉼라가 제대로 삽입되었는지 확인하고, 만약 그렇지 않다면 Pod를 바꾸십시오.</string>
|
||||||
<!-- Omnipod - Pod Deactivation Wizard -->
|
<!-- Omnipod - Pod Deactivation Wizard -->
|
||||||
|
<string name="omnipod_common_pod_deactivation_wizard_start_pod_deactivation_title">Pod 비활성화</string>
|
||||||
|
<string name="omnipod_common_pod_deactivation_wizard_start_pod_deactivation_text"><b>다음</b>을 눌러 Pod를 비활성화합니다. \n\n<b>참고:</b>이는 모든 인슐린 주입을 중지하고 Pod를 비활성화할 것입니다.</string>
|
||||||
|
<string name="omnipod_common_pod_deactivation_wizard_deactivating_pod_title">Pod 비활성화 중</string>
|
||||||
|
<string name="omnipod_common_pod_deactivation_wizard_deactivating_pod_text">Pod 비활성화 중. \n\n비활성화가 성공적으로 완료되면, <b>다음</b>을 누르십시오.</string>
|
||||||
|
<string name="omnipod_common_pod_deactivation_wizard_pod_deactivated_title">Pod 비활성화됨</string>
|
||||||
|
<string name="omnipod_common_pod_deactivation_wizard_pod_deactivated_text">Pod는 비활성화되었습니다. \n\nPod를 몸에서 제거하고 재활용 쓰레기로 분리 배출하십시오.</string>
|
||||||
|
<string name="omnipod_common_pod_deactivation_wizard_pod_discarded_title">Pod 폐기됨</string>
|
||||||
|
<string name="omnipod_common_pod_deactivation_wizard_pod_discarded_text">Pod는 폐기된 상태입니다. Pod가 적절하게 비활성화되지 않아 인슐린 주입은 중지되지 않았습니다! \n\nPod를 몸에서 제거하고 재활용 쓰레기로 분리 배출하십시오.</string>
|
||||||
|
<string name="omnipod_common_pod_deactivation_wizard_discard_pod_confirmation">Pod를 폐기하면, Pod와 더이상 연결되지 않습니다. Pod와의 모든 연결이 계속해서 실패하는 경우에만 시행하십시오. 정말로 Pod를 폐기하기 원하십니까?</string>
|
||||||
|
<string name="omnipod_common_pod_deactivation_wizard_discard_pod">Pod 폐기</string>
|
||||||
<!-- Omnipod - Preferences -->
|
<!-- Omnipod - Preferences -->
|
||||||
|
<string name="omnipod_common_preferences_bolus_beeps_enabled">Bolus 신호음 활성화됨</string>
|
||||||
|
<string name="omnipod_common_preferences_basal_beeps_enabled">Basal 신호음 활성화됨</string>
|
||||||
|
<string name="omnipod_common_preferences_smb_beeps_enabled">SMB 신호음 활성화됨</string>
|
||||||
|
<string name="omnipod_common_preferences_tbr_beeps_enabled">TBR 신호음 활성화됨</string>
|
||||||
|
<string name="omnipod_common_preferences_suspend_delivery_button_enabled">Omnipod 탭에서 주입 중지 버튼을 나타내기</string>
|
||||||
|
<string name="omnipod_common_preferences_time_change_enabled">섬머타임제/시간대 감지 활성화됨</string>
|
||||||
|
<string name="omnipod_common_preferences_expiration_reminder_enabled">만료일 알림 활성화됨</string>
|
||||||
|
<string name="omnipod_common_preferences_expiration_reminder_hours_before_shutdown">종료 한 시간 전</string>
|
||||||
|
<string name="omnipod_common_preferences_low_reservoir_alert_enabled">인슐린 부족 알람 활성화됨</string>
|
||||||
|
<string name="omnipod_common_preferences_low_reservoir_alert_units">몇 단위</string>
|
||||||
|
<string name="omnipod_common_preferences_automatically_silence_alerts">자동으로 Pod 경고 음소거</string>
|
||||||
|
<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>
|
||||||
<!-- Omnipod - Pod Status -->
|
<!-- 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>
|
||||||
|
<string name="omnipod_common_pod_status_waiting_for_cannula_insertion">설정 진행 중 (캐뉼라 삽입을 기다리는 중)</string>
|
||||||
|
<string name="omnipod_common_pod_status_running">실행 중</string>
|
||||||
|
<string name="omnipod_common_pod_status_suspended">중지됨</string>
|
||||||
|
<string name="omnipod_common_pod_status_pod_fault">Pod 결함</string>
|
||||||
|
<string name="omnipod_common_pod_status_activation_time_exceeded">활성화 시간 초과됨</string>
|
||||||
|
<string name="omnipod_common_pod_status_inactive">비활성화됨</string>
|
||||||
|
<string name="omnipod_common_pod_status_pod_fault_description">Pod 결함: %1$03d %2$s</string>
|
||||||
<!-- Omnipod - Commands -->
|
<!-- Omnipod - Commands -->
|
||||||
|
<string name="omnipod_common_cmd_deactivate_pod">Pod 비활성화</string>
|
||||||
|
<string name="omnipod_common_cmd_discard_pod">Pod 폐기</string>
|
||||||
|
<string name="omnipod_common_cmd_set_bolus">Bolus설정</string>
|
||||||
|
<string name="omnipod_common_cmd_cancel_bolus">Bolus 취소</string>
|
||||||
|
<string name="omnipod_common_cmd_set_tbr">임시 Basal 설정</string>
|
||||||
|
<string name="omnipod_common_cmd_cancel_tbr_by_driver">(드라이버에서 내부적으로) 임시 basal 취소</string>
|
||||||
|
<string name="omnipod_common_cmd_cancel_tbr">임시 basal 취소</string>
|
||||||
|
<string name="omnipod_common_cmd_set_basal_schedule">Basal 스케쥴 설정</string>
|
||||||
|
<string name="omnipod_common_cmd_get_pod_status">Pod 상태 가져오기</string>
|
||||||
|
<string name="omnipod_common_cmd_get_pod_info">Pod 정보 가져오기</string>
|
||||||
|
<string name="omnipod_common_cmd_set_time">시간 설정</string>
|
||||||
|
<string name="omnipod_common_cmd_configure_alerts">경고 설정</string>
|
||||||
|
<string name="omnipod_common_cmd_silence_alerts">경고 음소거</string>
|
||||||
|
<string name="omnipod_common_cmd_suspend_delivery">주입 중지</string>
|
||||||
|
<string name="omnipod_common_cmd_resume_delivery">주입 재시작</string>
|
||||||
|
<string name="omnipod_common_cmd_unknown_entry">알려지지 않은 항목</string>
|
||||||
|
<string name="omnipod_common_cmd_initialize_pod">Pod 초기화</string>
|
||||||
|
<string name="omnipod_common_cmd_insert_cannula">캐뉼라 삽입</string>
|
||||||
|
<string name="omnipod_common_cmd_read_pulse_log">Pulse 로그 확인</string>
|
||||||
|
<string name="omnipod_common_cmd_set_fake_suspended_tbr">Pod가 중지되어 속임수 임시 basal 설정하기</string>
|
||||||
|
<string name="omnipod_common_cmd_cancel_fake_suspended_tbr">Pod가 중지되어 만들었던 속임수 임시 basal 취소하기</string>
|
||||||
|
<string name="omnipod_common_cmd_split_tbr">취소 중 명확하지 않은 실패로 인하여 임시 basal 나누기</string>
|
||||||
|
<string name="omnipod_common_cmd_beep_config">신호음 설정</string>
|
||||||
|
<string name="omnipod_common_cmd_play_test_beep">테스트 신호음 작동</string>
|
||||||
<!-- Omnipod - Alerts -->
|
<!-- Omnipod - Alerts -->
|
||||||
|
<string name="omnipod_common_alert_finish_pairing_reminder">연동 알림 종료</string>
|
||||||
|
<string name="omnipod_common_alert_finish_setup_reminder_reminder">설정 알림 종료</string>
|
||||||
|
<string name="omnipod_common_alert_expiration">Pod가 곧 만료됩니다.</string>
|
||||||
|
<string name="omnipod_common_alert_expiration_advisory">Pod가 곧 만료됩니다.</string>
|
||||||
|
<string name="omnipod_common_alert_shutdown_imminent">종료가 임박했습니다.</string>
|
||||||
|
<string name="omnipod_common_alert_low_reservoir">인슐린 부족</string>
|
||||||
|
<string name="omnipod_common_alert_unknown_alert">알 수 없는 경고</string>
|
||||||
<!-- Omnipod - Short status -->
|
<!-- Omnipod - Short status -->
|
||||||
|
<string name="omnipod_common_short_status_no_active_pod">활성화된 Pod 없음</string>
|
||||||
|
<string name="omnipod_common_short_status_last_connection">마지막 연결: %1$d 분 전</string>
|
||||||
|
<string name="omnipod_common_short_status_last_bolus">마지막 bolus: %1$s @ %2$s</string>
|
||||||
|
<string name="omnipod_common_short_status_temp_basal">임시: %1$s</string>
|
||||||
|
<string name="omnipod_common_short_status_extended_bolus">확장: %1$s</string>
|
||||||
|
<string name="omnipod_common_short_status_reservoir">잔여 인슐린 양: %1$s U</string>
|
||||||
<!-- Omnipod - Other -->
|
<!-- Omnipod - Other -->
|
||||||
|
<string name="omnipod_common_yes">네</string>
|
||||||
|
<string name="omnipod_common_no">아니오</string>
|
||||||
|
<string name="omnipod_common_ok">네</string>
|
||||||
|
<string name="omnipod_common_cancel">취소</string>
|
||||||
|
<string name="omnipod_common_warning">경고</string>
|
||||||
<!-- Omnipod - Times -->
|
<!-- Omnipod - Times -->
|
||||||
|
<string name="omnipod_common_moments_ago">방금 전</string>
|
||||||
|
<string name="omnipod_common_less_than_a_minute_ago">1분 이내</string>
|
||||||
|
<string name="omnipod_common_composite_time">%1$s과 %2$s</string>
|
||||||
|
<string name="omnipod_common_time_ago">%1$s 전</string>
|
||||||
|
<plurals name="omnipod_common_minutes">
|
||||||
|
<item quantity="other">%1$d 분</item>
|
||||||
|
</plurals>
|
||||||
|
<plurals name="omnipod_common_hours">
|
||||||
|
<item quantity="other">%1$d 시간</item>
|
||||||
|
</plurals>
|
||||||
|
<plurals name="omnipod_common_days">
|
||||||
|
<item quantity="other">%1$d 일</item>
|
||||||
|
</plurals>
|
||||||
|
<plurals name="omnipod_common_pod_alerts">
|
||||||
|
<item quantity="other">Pod 경고: %1$s</item>
|
||||||
|
</plurals>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -13,7 +13,11 @@
|
||||||
<string name="key_omnipod_common_low_reservoir_alert_units" translatable="false">AAPS.Omnipod.low_reservoir_alert_units</string>
|
<string name="key_omnipod_common_low_reservoir_alert_units" translatable="false">AAPS.Omnipod.low_reservoir_alert_units</string>
|
||||||
<string name="key_omnipod_common_automatically_silence_alerts_enabled" translatable="false">AAPS.Omnipod.automatically_acknowledge_alerts_enabled</string>
|
<string name="key_omnipod_common_automatically_silence_alerts_enabled" translatable="false">AAPS.Omnipod.automatically_acknowledge_alerts_enabled</string>
|
||||||
<string name="key_common_preferences_category_alerts_settings" translatable="false">common_preferences_category_alerts</string>
|
<string name="key_common_preferences_category_alerts_settings" translatable="false">common_preferences_category_alerts</string>
|
||||||
|
<string name="key_omnipod_common_preferences_category_notifications_settings"
|
||||||
|
translatable="false">common_preferences_category_notifications_settings</string>
|
||||||
|
<string name="key_omnipod_common_notification_uncertain_tbr_sound_enabled" translatable="false">AAPS.Omnipod.notification_uncertain_tbr_sound_enabled</string>
|
||||||
|
<string name="key_omnipod_common_notification_uncertain_smb_sound_enabled" translatable="false">AAPS.Omnipod.notification_uncertain_smb_sound_enabled</string>
|
||||||
|
<string name="key_omnipod_common_notification_uncertain_bolus_sound_enabled" translatable="false">AAPS.Omnipod.notification_uncertain_bolus_sound_enabled</string>
|
||||||
<!-- Omnipod - Pod Management -->
|
<!-- Omnipod - Pod Management -->
|
||||||
<string name="omnipod_common_pod_management_title">Pod Management</string>
|
<string name="omnipod_common_pod_management_title">Pod Management</string>
|
||||||
<string name="omnipod_common_pod_management_heading_actions">Actions</string>
|
<string name="omnipod_common_pod_management_heading_actions">Actions</string>
|
||||||
|
@ -132,6 +136,11 @@
|
||||||
<string name="omnipod_common_preferences_category_other">Other</string>
|
<string name="omnipod_common_preferences_category_other">Other</string>
|
||||||
<string name="omnipod_common_preferences_category_alerts">Alerts</string>
|
<string name="omnipod_common_preferences_category_alerts">Alerts</string>
|
||||||
<string name="omnipod_common_preferences_category_confirmation_beeps">Confirmation Beeps</string>
|
<string name="omnipod_common_preferences_category_confirmation_beeps">Confirmation Beeps</string>
|
||||||
|
<string name="omnipod_common_preferences_category_notifications">Notifications</string>
|
||||||
|
<string name="omnipod_common_preferences_notification_uncertain_tbr_sound_enabled">Sound for uncertain TBR notifications enabled</string>
|
||||||
|
<string name="omnipod_common_preferences_notification_uncertain_smb_sound_enabled">Sound for
|
||||||
|
uncertain SMB notifications enabled</string>
|
||||||
|
<string name="omnipod_common_preferences_notification_uncertain_bolus_sound_enabled">Sound for uncertain bolus notifications enabled</string>
|
||||||
|
|
||||||
<!-- Omnipod - Pod Status -->
|
<!-- Omnipod - Pod Status -->
|
||||||
<string name="omnipod_common_pod_status_no_active_pod">No Active Pod</string>
|
<string name="omnipod_common_pod_status_no_active_pod">No Active Pod</string>
|
||||||
|
|
|
@ -3,13 +3,29 @@ apply plugin: 'kotlin-android'
|
||||||
apply plugin: 'kotlin-kapt'
|
apply plugin: 'kotlin-kapt'
|
||||||
apply plugin: 'kotlin-allopen'
|
apply plugin: 'kotlin-allopen'
|
||||||
apply plugin: 'com.hiya.jacoco-android'
|
apply plugin: 'com.hiya.jacoco-android'
|
||||||
|
apply plugin: "io.gitlab.arturbosch.detekt" // TODO move to `subprojects` section in global build.gradle
|
||||||
|
apply plugin: "org.jlleitschuh.gradle.ktlint" // TODO move to `subprojects` section in global build.gradle
|
||||||
|
|
||||||
apply from: "${project.rootDir}/gradle/android_dependencies.gradle"
|
apply from: "${project.rootDir}/gradle/android_dependencies.gradle"
|
||||||
apply from: "${project.rootDir}/gradle/android_module_dependencies.gradle"
|
apply from: "${project.rootDir}/gradle/android_module_dependencies.gradle"
|
||||||
apply from: "${project.rootDir}/gradle/test_dependencies.gradle"
|
apply from: "${project.rootDir}/gradle/test_dependencies.gradle"
|
||||||
apply from: "${project.rootDir}/gradle/jacoco_global.gradle"
|
apply from: "${project.rootDir}/gradle/jacoco_global.gradle"
|
||||||
|
|
||||||
|
allOpen {
|
||||||
|
annotation 'info.nightscout.androidaps.plugins.pump.omnipod.dash.annotations.OpenClass'
|
||||||
|
}
|
||||||
|
|
||||||
|
detekt { // TODO move to `subprojects` section in global build.gradle
|
||||||
|
toolVersion = "1.15.0-RC2"
|
||||||
|
config = files("./detekt-config.yml") // TODO move to global space and use "../detekt-config.yml"
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation project(':core')
|
implementation project(':core')
|
||||||
implementation project(':omnipod-common')
|
implementation project(':omnipod-common')
|
||||||
|
|
||||||
|
implementation "androidx.room:room-runtime:$room_version"
|
||||||
|
implementation "androidx.room:room-rxjava2:$room_version"
|
||||||
|
kapt "androidx.room:room-compiler:$room_version"
|
||||||
|
implementation 'com.github.guepardoapps:kulid:2.0.0.0'
|
||||||
}
|
}
|
690
omnipod-dash/detekt-config.yml
Normal file
690
omnipod-dash/detekt-config.yml
Normal file
|
@ -0,0 +1,690 @@
|
||||||
|
build:
|
||||||
|
maxIssues: -1
|
||||||
|
excludeCorrectable: false
|
||||||
|
weights:
|
||||||
|
# complexity: 2
|
||||||
|
# LongParameterList: 1
|
||||||
|
# style: 1
|
||||||
|
# comments: 1
|
||||||
|
|
||||||
|
config:
|
||||||
|
validation: true
|
||||||
|
warningsAsErrors: false
|
||||||
|
# when writing own rules with new properties, exclude the property path e.g.: 'my_rule_set,.*>.*>[my_property]'
|
||||||
|
excludes: ''
|
||||||
|
|
||||||
|
processors:
|
||||||
|
active: true
|
||||||
|
exclude:
|
||||||
|
- 'DetektProgressListener'
|
||||||
|
# - 'FunctionCountProcessor'
|
||||||
|
# - 'PropertyCountProcessor'
|
||||||
|
# - 'ClassCountProcessor'
|
||||||
|
# - 'PackageCountProcessor'
|
||||||
|
# - 'KtFileCountProcessor'
|
||||||
|
|
||||||
|
console-reports:
|
||||||
|
active: true
|
||||||
|
exclude:
|
||||||
|
- 'ProjectStatisticsReport'
|
||||||
|
- 'ComplexityReport'
|
||||||
|
- 'NotificationReport'
|
||||||
|
# - 'FindingsReport'
|
||||||
|
- 'FileBasedFindingsReport'
|
||||||
|
|
||||||
|
output-reports:
|
||||||
|
active: true
|
||||||
|
exclude:
|
||||||
|
# - 'TxtOutputReport'
|
||||||
|
# - 'XmlOutputReport'
|
||||||
|
# - 'HtmlOutputReport'
|
||||||
|
|
||||||
|
comments:
|
||||||
|
active: true
|
||||||
|
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
||||||
|
AbsentOrWrongFileLicense:
|
||||||
|
active: false
|
||||||
|
licenseTemplateFile: 'license.template'
|
||||||
|
CommentOverPrivateFunction:
|
||||||
|
active: false
|
||||||
|
CommentOverPrivateProperty:
|
||||||
|
active: false
|
||||||
|
EndOfSentenceFormat:
|
||||||
|
active: false
|
||||||
|
endOfSentenceFormat: '([.?!][ \t\n\r\f<])|([.?!:]$)'
|
||||||
|
UndocumentedPublicClass:
|
||||||
|
active: false
|
||||||
|
searchInNestedClass: true
|
||||||
|
searchInInnerClass: true
|
||||||
|
searchInInnerObject: true
|
||||||
|
searchInInnerInterface: true
|
||||||
|
UndocumentedPublicFunction:
|
||||||
|
active: false
|
||||||
|
UndocumentedPublicProperty:
|
||||||
|
active: false
|
||||||
|
|
||||||
|
complexity:
|
||||||
|
active: true
|
||||||
|
ComplexCondition:
|
||||||
|
active: true
|
||||||
|
threshold: 4
|
||||||
|
ComplexInterface:
|
||||||
|
active: false
|
||||||
|
threshold: 10
|
||||||
|
includeStaticDeclarations: false
|
||||||
|
includePrivateDeclarations: false
|
||||||
|
ComplexMethod:
|
||||||
|
active: true
|
||||||
|
threshold: 15
|
||||||
|
ignoreSingleWhenExpression: false
|
||||||
|
ignoreSimpleWhenEntries: false
|
||||||
|
ignoreNestingFunctions: false
|
||||||
|
nestingFunctions: [run, let, apply, with, also, use, forEach, isNotNull, ifNull]
|
||||||
|
LabeledExpression:
|
||||||
|
active: false
|
||||||
|
ignoredLabels: []
|
||||||
|
LargeClass:
|
||||||
|
active: true
|
||||||
|
threshold: 600
|
||||||
|
LongMethod:
|
||||||
|
active: true
|
||||||
|
threshold: 60
|
||||||
|
LongParameterList:
|
||||||
|
active: true
|
||||||
|
functionThreshold: 6
|
||||||
|
constructorThreshold: 7
|
||||||
|
ignoreDefaultParameters: false
|
||||||
|
ignoreDataClasses: true
|
||||||
|
ignoreAnnotated: []
|
||||||
|
MethodOverloading:
|
||||||
|
active: false
|
||||||
|
threshold: 6
|
||||||
|
NamedArguments:
|
||||||
|
active: false
|
||||||
|
threshold: 3
|
||||||
|
NestedBlockDepth:
|
||||||
|
active: true
|
||||||
|
threshold: 4
|
||||||
|
ReplaceSafeCallChainWithRun:
|
||||||
|
active: false
|
||||||
|
StringLiteralDuplication:
|
||||||
|
active: false
|
||||||
|
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
||||||
|
threshold: 3
|
||||||
|
ignoreAnnotation: true
|
||||||
|
excludeStringsWithLessThan5Characters: true
|
||||||
|
ignoreStringsRegex: '$^'
|
||||||
|
TooManyFunctions:
|
||||||
|
active: true
|
||||||
|
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
||||||
|
thresholdInFiles: 11
|
||||||
|
thresholdInClasses: 11
|
||||||
|
thresholdInInterfaces: 11
|
||||||
|
thresholdInObjects: 11
|
||||||
|
thresholdInEnums: 11
|
||||||
|
ignoreDeprecated: false
|
||||||
|
ignorePrivate: false
|
||||||
|
ignoreOverridden: false
|
||||||
|
|
||||||
|
coroutines:
|
||||||
|
active: true
|
||||||
|
GlobalCoroutineUsage:
|
||||||
|
active: false
|
||||||
|
RedundantSuspendModifier:
|
||||||
|
active: false
|
||||||
|
SuspendFunWithFlowReturnType:
|
||||||
|
active: false
|
||||||
|
|
||||||
|
empty-blocks:
|
||||||
|
active: true
|
||||||
|
EmptyCatchBlock:
|
||||||
|
active: true
|
||||||
|
allowedExceptionNameRegex: '_|(ignore|expected).*'
|
||||||
|
EmptyClassBlock:
|
||||||
|
active: true
|
||||||
|
EmptyDefaultConstructor:
|
||||||
|
active: true
|
||||||
|
EmptyDoWhileBlock:
|
||||||
|
active: true
|
||||||
|
EmptyElseBlock:
|
||||||
|
active: true
|
||||||
|
EmptyFinallyBlock:
|
||||||
|
active: true
|
||||||
|
EmptyForBlock:
|
||||||
|
active: true
|
||||||
|
EmptyFunctionBlock:
|
||||||
|
active: true
|
||||||
|
ignoreOverridden: false
|
||||||
|
EmptyIfBlock:
|
||||||
|
active: true
|
||||||
|
EmptyInitBlock:
|
||||||
|
active: true
|
||||||
|
EmptyKtFile:
|
||||||
|
active: true
|
||||||
|
EmptySecondaryConstructor:
|
||||||
|
active: true
|
||||||
|
EmptyTryBlock:
|
||||||
|
active: true
|
||||||
|
EmptyWhenBlock:
|
||||||
|
active: true
|
||||||
|
EmptyWhileBlock:
|
||||||
|
active: true
|
||||||
|
|
||||||
|
exceptions:
|
||||||
|
active: true
|
||||||
|
ExceptionRaisedInUnexpectedLocation:
|
||||||
|
active: false
|
||||||
|
methodNames: [toString, hashCode, equals, finalize]
|
||||||
|
InstanceOfCheckForException:
|
||||||
|
active: false
|
||||||
|
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
||||||
|
NotImplementedDeclaration:
|
||||||
|
active: false
|
||||||
|
PrintStackTrace:
|
||||||
|
active: false
|
||||||
|
RethrowCaughtException:
|
||||||
|
active: false
|
||||||
|
ReturnFromFinally:
|
||||||
|
active: false
|
||||||
|
ignoreLabeled: false
|
||||||
|
SwallowedException:
|
||||||
|
active: false
|
||||||
|
ignoredExceptionTypes:
|
||||||
|
- InterruptedException
|
||||||
|
- NumberFormatException
|
||||||
|
- ParseException
|
||||||
|
- MalformedURLException
|
||||||
|
allowedExceptionNameRegex: '_|(ignore|expected).*'
|
||||||
|
ThrowingExceptionFromFinally:
|
||||||
|
active: false
|
||||||
|
ThrowingExceptionInMain:
|
||||||
|
active: false
|
||||||
|
ThrowingExceptionsWithoutMessageOrCause:
|
||||||
|
active: false
|
||||||
|
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
||||||
|
exceptions:
|
||||||
|
- IllegalArgumentException
|
||||||
|
- IllegalStateException
|
||||||
|
- IOException
|
||||||
|
ThrowingNewInstanceOfSameException:
|
||||||
|
active: false
|
||||||
|
TooGenericExceptionCaught:
|
||||||
|
active: true
|
||||||
|
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
||||||
|
exceptionNames:
|
||||||
|
- ArrayIndexOutOfBoundsException
|
||||||
|
- Error
|
||||||
|
- Exception
|
||||||
|
- IllegalMonitorStateException
|
||||||
|
- NullPointerException
|
||||||
|
- IndexOutOfBoundsException
|
||||||
|
- RuntimeException
|
||||||
|
- Throwable
|
||||||
|
allowedExceptionNameRegex: '_|(ignore|expected).*'
|
||||||
|
TooGenericExceptionThrown:
|
||||||
|
active: true
|
||||||
|
exceptionNames:
|
||||||
|
- Error
|
||||||
|
- Exception
|
||||||
|
- Throwable
|
||||||
|
- RuntimeException
|
||||||
|
|
||||||
|
formatting:
|
||||||
|
active: true
|
||||||
|
android: false
|
||||||
|
autoCorrect: true
|
||||||
|
AnnotationOnSeparateLine:
|
||||||
|
active: false
|
||||||
|
autoCorrect: true
|
||||||
|
AnnotationSpacing:
|
||||||
|
active: false
|
||||||
|
autoCorrect: true
|
||||||
|
ArgumentListWrapping:
|
||||||
|
active: false
|
||||||
|
autoCorrect: true
|
||||||
|
ChainWrapping:
|
||||||
|
active: true
|
||||||
|
autoCorrect: true
|
||||||
|
CommentSpacing:
|
||||||
|
active: true
|
||||||
|
autoCorrect: true
|
||||||
|
EnumEntryNameCase:
|
||||||
|
active: false
|
||||||
|
autoCorrect: true
|
||||||
|
Filename:
|
||||||
|
active: true
|
||||||
|
FinalNewline:
|
||||||
|
active: true
|
||||||
|
autoCorrect: true
|
||||||
|
insertFinalNewLine: true
|
||||||
|
ImportOrdering:
|
||||||
|
active: false
|
||||||
|
autoCorrect: true
|
||||||
|
layout: 'idea'
|
||||||
|
Indentation:
|
||||||
|
active: false
|
||||||
|
autoCorrect: true
|
||||||
|
indentSize: 4
|
||||||
|
continuationIndentSize: 4
|
||||||
|
MaximumLineLength:
|
||||||
|
active: true
|
||||||
|
maxLineLength: 150
|
||||||
|
ModifierOrdering:
|
||||||
|
active: true
|
||||||
|
autoCorrect: true
|
||||||
|
MultiLineIfElse:
|
||||||
|
active: true
|
||||||
|
autoCorrect: true
|
||||||
|
NoBlankLineBeforeRbrace:
|
||||||
|
active: true
|
||||||
|
autoCorrect: true
|
||||||
|
NoConsecutiveBlankLines:
|
||||||
|
active: true
|
||||||
|
autoCorrect: true
|
||||||
|
NoEmptyClassBody:
|
||||||
|
active: true
|
||||||
|
autoCorrect: true
|
||||||
|
NoEmptyFirstLineInMethodBlock:
|
||||||
|
active: false
|
||||||
|
autoCorrect: true
|
||||||
|
NoLineBreakAfterElse:
|
||||||
|
active: true
|
||||||
|
autoCorrect: true
|
||||||
|
NoLineBreakBeforeAssignment:
|
||||||
|
active: true
|
||||||
|
autoCorrect: true
|
||||||
|
NoMultipleSpaces:
|
||||||
|
active: true
|
||||||
|
autoCorrect: true
|
||||||
|
NoSemicolons:
|
||||||
|
active: true
|
||||||
|
autoCorrect: true
|
||||||
|
NoTrailingSpaces:
|
||||||
|
active: true
|
||||||
|
autoCorrect: true
|
||||||
|
NoUnitReturn:
|
||||||
|
active: true
|
||||||
|
autoCorrect: true
|
||||||
|
NoUnusedImports:
|
||||||
|
active: true
|
||||||
|
autoCorrect: true
|
||||||
|
NoWildcardImports:
|
||||||
|
active: true
|
||||||
|
PackageName:
|
||||||
|
active: true
|
||||||
|
autoCorrect: true
|
||||||
|
ParameterListWrapping:
|
||||||
|
active: true
|
||||||
|
autoCorrect: true
|
||||||
|
indentSize: 4
|
||||||
|
SpacingAroundColon:
|
||||||
|
active: true
|
||||||
|
autoCorrect: true
|
||||||
|
SpacingAroundComma:
|
||||||
|
active: true
|
||||||
|
autoCorrect: true
|
||||||
|
SpacingAroundCurly:
|
||||||
|
active: true
|
||||||
|
autoCorrect: true
|
||||||
|
SpacingAroundDot:
|
||||||
|
active: true
|
||||||
|
autoCorrect: true
|
||||||
|
SpacingAroundDoubleColon:
|
||||||
|
active: false
|
||||||
|
autoCorrect: true
|
||||||
|
SpacingAroundKeyword:
|
||||||
|
active: true
|
||||||
|
autoCorrect: true
|
||||||
|
SpacingAroundOperators:
|
||||||
|
active: true
|
||||||
|
autoCorrect: true
|
||||||
|
SpacingAroundParens:
|
||||||
|
active: true
|
||||||
|
autoCorrect: true
|
||||||
|
SpacingAroundRangeOperator:
|
||||||
|
active: true
|
||||||
|
autoCorrect: true
|
||||||
|
SpacingBetweenDeclarationsWithAnnotations:
|
||||||
|
active: false
|
||||||
|
autoCorrect: true
|
||||||
|
SpacingBetweenDeclarationsWithComments:
|
||||||
|
active: false
|
||||||
|
autoCorrect: true
|
||||||
|
StringTemplate:
|
||||||
|
active: true
|
||||||
|
autoCorrect: true
|
||||||
|
|
||||||
|
naming:
|
||||||
|
active: true
|
||||||
|
ClassNaming:
|
||||||
|
active: true
|
||||||
|
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
||||||
|
classPattern: '[A-Z][a-zA-Z0-9]*'
|
||||||
|
ConstructorParameterNaming:
|
||||||
|
active: true
|
||||||
|
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
||||||
|
parameterPattern: '[a-z][A-Za-z0-9]*'
|
||||||
|
privateParameterPattern: '[a-z][A-Za-z0-9]*'
|
||||||
|
excludeClassPattern: '$^'
|
||||||
|
ignoreOverridden: true
|
||||||
|
EnumNaming:
|
||||||
|
active: true
|
||||||
|
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
||||||
|
enumEntryPattern: '[A-Z][_a-zA-Z0-9]*'
|
||||||
|
ForbiddenClassName:
|
||||||
|
active: false
|
||||||
|
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
||||||
|
forbiddenName: []
|
||||||
|
FunctionMaxLength:
|
||||||
|
active: false
|
||||||
|
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
||||||
|
maximumFunctionNameLength: 30
|
||||||
|
FunctionMinLength:
|
||||||
|
active: false
|
||||||
|
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
||||||
|
minimumFunctionNameLength: 3
|
||||||
|
FunctionNaming:
|
||||||
|
active: true
|
||||||
|
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
||||||
|
functionPattern: '([a-z][a-zA-Z0-9]*)|(`.*`)'
|
||||||
|
excludeClassPattern: '$^'
|
||||||
|
ignoreOverridden: true
|
||||||
|
ignoreAnnotated: ['Composable']
|
||||||
|
FunctionParameterNaming:
|
||||||
|
active: true
|
||||||
|
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
||||||
|
parameterPattern: '[a-z][A-Za-z0-9]*'
|
||||||
|
excludeClassPattern: '$^'
|
||||||
|
ignoreOverridden: true
|
||||||
|
InvalidPackageDeclaration:
|
||||||
|
active: false
|
||||||
|
rootPackage: ''
|
||||||
|
MatchingDeclarationName:
|
||||||
|
active: true
|
||||||
|
mustBeFirst: true
|
||||||
|
MemberNameEqualsClassName:
|
||||||
|
active: true
|
||||||
|
ignoreOverridden: true
|
||||||
|
NonBooleanPropertyPrefixedWithIs:
|
||||||
|
active: false
|
||||||
|
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
||||||
|
ObjectPropertyNaming:
|
||||||
|
active: true
|
||||||
|
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
||||||
|
constantPattern: '[A-Za-z][_A-Za-z0-9]*'
|
||||||
|
propertyPattern: '[A-Za-z][_A-Za-z0-9]*'
|
||||||
|
privatePropertyPattern: '(_)?[A-Za-z][_A-Za-z0-9]*'
|
||||||
|
PackageNaming:
|
||||||
|
active: true
|
||||||
|
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
||||||
|
packagePattern: '[a-z]+(\.[a-z][A-Za-z0-9]*)*'
|
||||||
|
TopLevelPropertyNaming:
|
||||||
|
active: true
|
||||||
|
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
||||||
|
constantPattern: '[A-Z][_A-Z0-9]*'
|
||||||
|
propertyPattern: '[A-Za-z][_A-Za-z0-9]*'
|
||||||
|
privatePropertyPattern: '_?[A-Za-z][_A-Za-z0-9]*'
|
||||||
|
VariableMaxLength:
|
||||||
|
active: false
|
||||||
|
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
||||||
|
maximumVariableNameLength: 64
|
||||||
|
VariableMinLength:
|
||||||
|
active: false
|
||||||
|
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
||||||
|
minimumVariableNameLength: 1
|
||||||
|
VariableNaming:
|
||||||
|
active: true
|
||||||
|
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
||||||
|
variablePattern: '[a-z][A-Za-z0-9]*'
|
||||||
|
privateVariablePattern: '(_)?[a-z][A-Za-z0-9]*'
|
||||||
|
excludeClassPattern: '$^'
|
||||||
|
ignoreOverridden: true
|
||||||
|
|
||||||
|
performance:
|
||||||
|
active: true
|
||||||
|
ArrayPrimitive:
|
||||||
|
active: true
|
||||||
|
ForEachOnRange:
|
||||||
|
active: true
|
||||||
|
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
||||||
|
SpreadOperator:
|
||||||
|
active: true
|
||||||
|
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
||||||
|
UnnecessaryTemporaryInstantiation:
|
||||||
|
active: true
|
||||||
|
|
||||||
|
potential-bugs:
|
||||||
|
active: true
|
||||||
|
Deprecation:
|
||||||
|
active: false
|
||||||
|
DuplicateCaseInWhenExpression:
|
||||||
|
active: true
|
||||||
|
EqualsAlwaysReturnsTrueOrFalse:
|
||||||
|
active: true
|
||||||
|
EqualsWithHashCodeExist:
|
||||||
|
active: true
|
||||||
|
ExplicitGarbageCollectionCall:
|
||||||
|
active: true
|
||||||
|
HasPlatformType:
|
||||||
|
active: false
|
||||||
|
IgnoredReturnValue:
|
||||||
|
active: false
|
||||||
|
restrictToAnnotatedMethods: true
|
||||||
|
returnValueAnnotations: ['*.CheckReturnValue', '*.CheckResult']
|
||||||
|
ImplicitDefaultLocale:
|
||||||
|
active: false
|
||||||
|
ImplicitUnitReturnType:
|
||||||
|
active: false
|
||||||
|
allowExplicitReturnType: true
|
||||||
|
InvalidRange:
|
||||||
|
active: true
|
||||||
|
IteratorHasNextCallsNextMethod:
|
||||||
|
active: true
|
||||||
|
IteratorNotThrowingNoSuchElementException:
|
||||||
|
active: true
|
||||||
|
LateinitUsage:
|
||||||
|
active: false
|
||||||
|
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
||||||
|
excludeAnnotatedProperties: []
|
||||||
|
ignoreOnClassesPattern: ''
|
||||||
|
MapGetWithNotNullAssertionOperator:
|
||||||
|
active: false
|
||||||
|
MissingWhenCase:
|
||||||
|
active: true
|
||||||
|
allowElseExpression: true
|
||||||
|
NullableToStringCall:
|
||||||
|
active: false
|
||||||
|
RedundantElseInWhen:
|
||||||
|
active: true
|
||||||
|
UnconditionalJumpStatementInLoop:
|
||||||
|
active: false
|
||||||
|
UnnecessaryNotNullOperator:
|
||||||
|
active: false
|
||||||
|
UnnecessarySafeCall:
|
||||||
|
active: false
|
||||||
|
UnreachableCode:
|
||||||
|
active: true
|
||||||
|
UnsafeCallOnNullableType:
|
||||||
|
active: true
|
||||||
|
UnsafeCast:
|
||||||
|
active: false
|
||||||
|
UselessPostfixExpression:
|
||||||
|
active: false
|
||||||
|
WrongEqualsTypeParameter:
|
||||||
|
active: true
|
||||||
|
|
||||||
|
style:
|
||||||
|
active: true
|
||||||
|
ClassOrdering:
|
||||||
|
active: false
|
||||||
|
CollapsibleIfStatements:
|
||||||
|
active: false
|
||||||
|
DataClassContainsFunctions:
|
||||||
|
active: false
|
||||||
|
conversionFunctionPrefix: 'to'
|
||||||
|
DataClassShouldBeImmutable:
|
||||||
|
active: false
|
||||||
|
EqualsNullCall:
|
||||||
|
active: true
|
||||||
|
EqualsOnSignatureLine:
|
||||||
|
active: false
|
||||||
|
ExplicitCollectionElementAccessMethod:
|
||||||
|
active: false
|
||||||
|
ExplicitItLambdaParameter:
|
||||||
|
active: false
|
||||||
|
ExpressionBodySyntax:
|
||||||
|
active: false
|
||||||
|
includeLineWrapping: false
|
||||||
|
ForbiddenComment:
|
||||||
|
active: true
|
||||||
|
values: ['TODO:', 'FIXME:', 'STOPSHIP:']
|
||||||
|
allowedPatterns: ''
|
||||||
|
ForbiddenImport:
|
||||||
|
active: false
|
||||||
|
imports: []
|
||||||
|
forbiddenPatterns: ''
|
||||||
|
ForbiddenMethodCall:
|
||||||
|
active: false
|
||||||
|
methods: ['kotlin.io.println', 'kotlin.io.print']
|
||||||
|
ForbiddenPublicDataClass:
|
||||||
|
active: false
|
||||||
|
ignorePackages: ['*.internal', '*.internal.*']
|
||||||
|
ForbiddenVoid:
|
||||||
|
active: false
|
||||||
|
ignoreOverridden: false
|
||||||
|
ignoreUsageInGenerics: false
|
||||||
|
FunctionOnlyReturningConstant:
|
||||||
|
active: true
|
||||||
|
ignoreOverridableFunction: true
|
||||||
|
excludedFunctions: 'describeContents'
|
||||||
|
excludeAnnotatedFunction: ['dagger.Provides']
|
||||||
|
LibraryCodeMustSpecifyReturnType:
|
||||||
|
active: true
|
||||||
|
LibraryEntitiesShouldNotBePublic:
|
||||||
|
active: false
|
||||||
|
LoopWithTooManyJumpStatements:
|
||||||
|
active: true
|
||||||
|
maxJumpCount: 1
|
||||||
|
MagicNumber:
|
||||||
|
active: true
|
||||||
|
# TODO: re-enable omnipod-dash
|
||||||
|
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**', '**/omnipod-dash/**']
|
||||||
|
ignoreNumbers: ['-1', '0', '1', '2']
|
||||||
|
ignoreHashCodeFunction: true
|
||||||
|
ignorePropertyDeclaration: false
|
||||||
|
ignoreLocalVariableDeclaration: false
|
||||||
|
ignoreConstantDeclaration: true
|
||||||
|
ignoreCompanionObjectPropertyDeclaration: true
|
||||||
|
ignoreAnnotation: false
|
||||||
|
ignoreNamedArgument: true
|
||||||
|
ignoreEnums: false
|
||||||
|
ignoreRanges: false
|
||||||
|
MandatoryBracesIfStatements:
|
||||||
|
active: false
|
||||||
|
MandatoryBracesLoops:
|
||||||
|
active: false
|
||||||
|
MaxLineLength:
|
||||||
|
active: true
|
||||||
|
maxLineLength: 120
|
||||||
|
excludePackageStatements: true
|
||||||
|
excludeImportStatements: true
|
||||||
|
excludeCommentStatements: false
|
||||||
|
MayBeConst:
|
||||||
|
active: true
|
||||||
|
ModifierOrder:
|
||||||
|
active: true
|
||||||
|
NestedClassesVisibility:
|
||||||
|
active: false
|
||||||
|
NewLineAtEndOfFile:
|
||||||
|
active: false
|
||||||
|
NoTabs:
|
||||||
|
active: false
|
||||||
|
OptionalAbstractKeyword:
|
||||||
|
active: true
|
||||||
|
OptionalUnit:
|
||||||
|
active: false
|
||||||
|
OptionalWhenBraces:
|
||||||
|
active: false
|
||||||
|
PreferToOverPairSyntax:
|
||||||
|
active: false
|
||||||
|
ProtectedMemberInFinalClass:
|
||||||
|
active: true
|
||||||
|
RedundantExplicitType:
|
||||||
|
active: false
|
||||||
|
RedundantHigherOrderMapUsage:
|
||||||
|
active: false
|
||||||
|
RedundantVisibilityModifierRule:
|
||||||
|
active: false
|
||||||
|
ReturnCount:
|
||||||
|
active: true
|
||||||
|
max: 2
|
||||||
|
excludedFunctions: 'equals'
|
||||||
|
excludeLabeled: false
|
||||||
|
excludeReturnFromLambda: true
|
||||||
|
excludeGuardClauses: false
|
||||||
|
SafeCast:
|
||||||
|
active: true
|
||||||
|
SerialVersionUIDInSerializableClass:
|
||||||
|
active: false
|
||||||
|
SpacingBetweenPackageAndImports:
|
||||||
|
active: false
|
||||||
|
ThrowsCount:
|
||||||
|
active: true
|
||||||
|
max: 2
|
||||||
|
TrailingWhitespace:
|
||||||
|
active: false
|
||||||
|
UnderscoresInNumericLiterals:
|
||||||
|
active: false
|
||||||
|
acceptableDecimalLength: 5
|
||||||
|
UnnecessaryAbstractClass:
|
||||||
|
active: true
|
||||||
|
excludeAnnotatedClasses: ['dagger.Module']
|
||||||
|
UnnecessaryAnnotationUseSiteTarget:
|
||||||
|
active: false
|
||||||
|
UnnecessaryApply:
|
||||||
|
active: false
|
||||||
|
UnnecessaryInheritance:
|
||||||
|
active: true
|
||||||
|
UnnecessaryLet:
|
||||||
|
active: false
|
||||||
|
UnnecessaryParentheses:
|
||||||
|
active: false
|
||||||
|
UntilInsteadOfRangeTo:
|
||||||
|
active: false
|
||||||
|
UnusedImports:
|
||||||
|
active: false
|
||||||
|
UnusedPrivateClass:
|
||||||
|
active: true
|
||||||
|
UnusedPrivateMember:
|
||||||
|
active: false
|
||||||
|
allowedNames: '(_|ignored|expected|serialVersionUID)'
|
||||||
|
UseArrayLiteralsInAnnotations:
|
||||||
|
active: false
|
||||||
|
UseCheckNotNull:
|
||||||
|
active: false
|
||||||
|
UseCheckOrError:
|
||||||
|
active: false
|
||||||
|
UseDataClass:
|
||||||
|
active: false
|
||||||
|
excludeAnnotatedClasses: []
|
||||||
|
allowVars: false
|
||||||
|
UseEmptyCounterpart:
|
||||||
|
active: false
|
||||||
|
UseIfEmptyOrIfBlank:
|
||||||
|
active: false
|
||||||
|
UseIfInsteadOfWhen:
|
||||||
|
active: false
|
||||||
|
UseRequire:
|
||||||
|
active: false
|
||||||
|
UseRequireNotNull:
|
||||||
|
active: false
|
||||||
|
UselessCallOnNotNull:
|
||||||
|
active: true
|
||||||
|
UtilityClassWithPublicConstructor:
|
||||||
|
active: true
|
||||||
|
VarCouldBeVal:
|
||||||
|
active: false
|
||||||
|
WildcardImport:
|
||||||
|
active: true
|
||||||
|
excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
|
||||||
|
excludeImports: ['java.util.*', 'kotlinx.android.synthetic.*']
|
|
@ -0,0 +1,74 @@
|
||||||
|
package info.nightscout.androidaps.plugins.pump.omnipod.dash.history
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import androidx.room.Room
|
||||||
|
import androidx.test.core.app.ApplicationProvider
|
||||||
|
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||||
|
import com.github.guepardoapps.kulid.ULID
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.common.definition.OmnipodCommandType
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.database.DashHistoryDatabase
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.database.HistoryRecordDao
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.mapper.HistoryMapper
|
||||||
|
import io.reactivex.schedulers.Schedulers
|
||||||
|
import org.junit.After
|
||||||
|
import org.junit.Before
|
||||||
|
import org.junit.Rule
|
||||||
|
import org.junit.Test
|
||||||
|
import org.junit.runner.RunWith
|
||||||
|
|
||||||
|
@RunWith(AndroidJUnit4::class)
|
||||||
|
class DashHistoryTest {
|
||||||
|
|
||||||
|
private lateinit var dao: HistoryRecordDao
|
||||||
|
private lateinit var database: DashHistoryDatabase
|
||||||
|
private lateinit var dashHistory: DashHistory
|
||||||
|
|
||||||
|
@get:Rule
|
||||||
|
val schedulerRule = RxSchedulerRule(Schedulers.trampoline())
|
||||||
|
|
||||||
|
@Before
|
||||||
|
fun setUp() {
|
||||||
|
val context = ApplicationProvider.getApplicationContext<Context>()
|
||||||
|
database = Room.inMemoryDatabaseBuilder(
|
||||||
|
context,
|
||||||
|
DashHistoryDatabase::class.java
|
||||||
|
).build()
|
||||||
|
dao = database.historyRecordDao()
|
||||||
|
dashHistory = DashHistory(dao, HistoryMapper())
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun testInsertionAndConverters() {
|
||||||
|
dashHistory.getRecords().test().apply {
|
||||||
|
assertValue { it.isEmpty() }
|
||||||
|
}
|
||||||
|
|
||||||
|
dashHistory.createRecord(commandType = OmnipodCommandType.CANCEL_BOLUS, 0L).test().apply {
|
||||||
|
assertValue { ULID.isValid(it) }
|
||||||
|
}
|
||||||
|
|
||||||
|
dashHistory.getRecords().test().apply {
|
||||||
|
assertValue { it.size == 1 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun testExceptionOnBolusWithoutRecord() {
|
||||||
|
dashHistory.getRecords().test().apply {
|
||||||
|
assertValue { it.isEmpty() }
|
||||||
|
}
|
||||||
|
|
||||||
|
dashHistory.createRecord(commandType = OmnipodCommandType.SET_BOLUS, 0L).test().apply {
|
||||||
|
assertError(IllegalArgumentException::class.java)
|
||||||
|
}
|
||||||
|
|
||||||
|
dashHistory.getRecords().test().apply {
|
||||||
|
assertValue { it.isEmpty() }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@After
|
||||||
|
fun tearDown() {
|
||||||
|
database.close()
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,31 @@
|
||||||
|
package info.nightscout.androidaps.plugins.pump.omnipod.dash.history
|
||||||
|
|
||||||
|
import io.reactivex.Scheduler
|
||||||
|
import io.reactivex.android.plugins.RxAndroidPlugins
|
||||||
|
import io.reactivex.plugins.RxJavaPlugins
|
||||||
|
import org.junit.rules.TestRule
|
||||||
|
import org.junit.runner.Description
|
||||||
|
import org.junit.runners.model.Statement
|
||||||
|
|
||||||
|
// TODO: move to core before the big merge
|
||||||
|
class RxSchedulerRule(val scheduler: Scheduler) : TestRule {
|
||||||
|
|
||||||
|
override fun apply(base: Statement, description: Description) =
|
||||||
|
object : Statement() {
|
||||||
|
override fun evaluate() {
|
||||||
|
RxAndroidPlugins.reset()
|
||||||
|
RxAndroidPlugins.setInitMainThreadSchedulerHandler { scheduler }
|
||||||
|
RxJavaPlugins.reset()
|
||||||
|
RxJavaPlugins.setIoSchedulerHandler { scheduler }
|
||||||
|
RxJavaPlugins.setNewThreadSchedulerHandler { scheduler }
|
||||||
|
RxJavaPlugins.setComputationSchedulerHandler { scheduler }
|
||||||
|
|
||||||
|
try {
|
||||||
|
base.evaluate()
|
||||||
|
} finally {
|
||||||
|
RxJavaPlugins.reset()
|
||||||
|
RxAndroidPlugins.reset()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
package info.nightscout.androidaps.plugins.pump.omnipod.dash.annotations
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is the actual annotation that makes the class open. Don't use it directly, only through [OpenForTesting]
|
||||||
|
* which has a NOOP replacement in production.
|
||||||
|
*/
|
||||||
|
@Target(AnnotationTarget.ANNOTATION_CLASS)
|
||||||
|
annotation class OpenClass
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Annotate a class with [OpenForTesting] if it should be extendable for testing.
|
||||||
|
*/
|
||||||
|
@OpenClass
|
||||||
|
@Target(AnnotationTarget.CLASS)
|
||||||
|
annotation class OpenForTesting
|
|
@ -6,4 +6,10 @@
|
||||||
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
|
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
|
||||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||||
|
|
||||||
|
<application>
|
||||||
|
<activity android:name=".ui.wizard.activation.DashPodActivationWizardActivity" />
|
||||||
|
<activity android:name=".ui.wizard.deactivation.DashPodDeactivationWizardActivity" />
|
||||||
|
<activity android:name=".ui.DashPodManagementActivity" />
|
||||||
|
</application>
|
||||||
</manifest>
|
</manifest>
|
|
@ -0,0 +1,5 @@
|
||||||
|
package info.nightscout.androidaps.plugins.pump.omnipod.dash
|
||||||
|
|
||||||
|
import info.nightscout.androidaps.events.Event
|
||||||
|
|
||||||
|
class EventOmnipodDashPumpValuesChanged : Event()
|
|
@ -1,209 +0,0 @@
|
||||||
package info.nightscout.androidaps.plugins.pump.omnipod.dash;
|
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.annotation.Nullable;
|
|
||||||
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
import org.json.JSONObject;
|
|
||||||
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import javax.inject.Inject;
|
|
||||||
import javax.inject.Singleton;
|
|
||||||
|
|
||||||
import dagger.android.HasAndroidInjector;
|
|
||||||
import info.nightscout.androidaps.data.DetailedBolusInfo;
|
|
||||||
import info.nightscout.androidaps.interfaces.Profile;
|
|
||||||
import info.nightscout.androidaps.data.PumpEnactResult;
|
|
||||||
import info.nightscout.androidaps.interfaces.CommandQueueProvider;
|
|
||||||
import info.nightscout.androidaps.interfaces.PluginDescription;
|
|
||||||
import info.nightscout.androidaps.interfaces.PluginType;
|
|
||||||
import info.nightscout.androidaps.interfaces.PumpDescription;
|
|
||||||
import info.nightscout.androidaps.interfaces.Pump;
|
|
||||||
import info.nightscout.androidaps.interfaces.PumpPluginBase;
|
|
||||||
import info.nightscout.androidaps.interfaces.PumpSync;
|
|
||||||
import info.nightscout.androidaps.logging.AAPSLogger;
|
|
||||||
import info.nightscout.androidaps.logging.LTag;
|
|
||||||
import info.nightscout.androidaps.plugins.common.ManufacturerType;
|
|
||||||
import info.nightscout.androidaps.plugins.general.actions.defs.CustomAction;
|
|
||||||
import info.nightscout.androidaps.plugins.general.actions.defs.CustomActionType;
|
|
||||||
import info.nightscout.androidaps.plugins.pump.common.defs.PumpType;
|
|
||||||
import info.nightscout.androidaps.plugins.pump.omnipod.dash.ui.OmnipodDashOverviewFragment;
|
|
||||||
import info.nightscout.androidaps.queue.commands.CustomCommand;
|
|
||||||
import info.nightscout.androidaps.utils.TimeChangeType;
|
|
||||||
import info.nightscout.androidaps.utils.resources.ResourceHelper;
|
|
||||||
|
|
||||||
@Singleton
|
|
||||||
public class OmnipodDashPumpPlugin extends PumpPluginBase implements Pump {
|
|
||||||
private static final PumpDescription PUMP_DESCRIPTION = new PumpDescription(PumpType.OMNIPOD_DASH);
|
|
||||||
|
|
||||||
private final AAPSLogger aapsLogger;
|
|
||||||
private final ResourceHelper resourceHelper;
|
|
||||||
private final CommandQueueProvider commandQueue;
|
|
||||||
|
|
||||||
@Inject
|
|
||||||
public OmnipodDashPumpPlugin(HasAndroidInjector injector, AAPSLogger aapsLogger, ResourceHelper resourceHelper, CommandQueueProvider commandQueue) {
|
|
||||||
super(new PluginDescription() //
|
|
||||||
.mainType(PluginType.PUMP) //
|
|
||||||
.fragmentClass(OmnipodDashOverviewFragment.class.getName()) //
|
|
||||||
.pluginIcon(R.drawable.ic_pod_128)
|
|
||||||
.pluginName(R.string.omnipod_dash_name) //
|
|
||||||
.shortName(R.string.omnipod_dash_name_short) //
|
|
||||||
.preferencesId(R.xml.omnipod_dash_preferences) //
|
|
||||||
.description(R.string.omnipod_dash_pump_description), injector, aapsLogger, resourceHelper, commandQueue);
|
|
||||||
this.aapsLogger = aapsLogger;
|
|
||||||
this.resourceHelper = resourceHelper;
|
|
||||||
this.commandQueue = commandQueue;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override public boolean isInitialized() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override public boolean isSuspended() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override public boolean isBusy() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override public boolean isConnected() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override public boolean isConnecting() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override public boolean isHandshakeInProgress() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override public void finishHandshaking() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override public void connect(@NotNull String reason) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override public void disconnect(@NotNull String reason) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override public void stopConnecting() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override public void getPumpStatus(@NotNull String reason) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull @Override public PumpEnactResult setNewBasalProfile(@NotNull Profile profile) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override public boolean isThisProfileSet(@NotNull Profile profile) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override public long lastDataTime() {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override public double getBaseBasalRate() {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override public double getReservoirLevel() {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override public int getBatteryLevel() {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull @Override public PumpEnactResult deliverTreatment(@NotNull DetailedBolusInfo detailedBolusInfo) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override public void stopBolusDelivering() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull @Override public PumpEnactResult setTempBasalAbsolute(double absoluteRate, int durationInMinutes, @NotNull Profile profile, boolean enforceNew, @NonNull PumpSync.TemporaryBasalType tbrType) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull @Override public PumpEnactResult setTempBasalPercent(int percent, int durationInMinutes, @NotNull Profile profile, boolean enforceNew, @NonNull PumpSync.TemporaryBasalType tbrType) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull @Override public PumpEnactResult setExtendedBolus(double insulin, int durationInMinutes) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull @Override public PumpEnactResult cancelTempBasal(boolean enforceNew) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull @Override public PumpEnactResult cancelExtendedBolus() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull @Override public JSONObject getJSONStatus(@NotNull Profile profile, @NotNull String profileName, @NotNull String version) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull @Override public ManufacturerType manufacturer() {
|
|
||||||
return getPumpDescription().getPumpType().getManufacturer();
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull @Override public PumpType model() {
|
|
||||||
return getPumpDescription().getPumpType();
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull @Override public String serialNumber() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull @Override public PumpDescription getPumpDescription() {
|
|
||||||
return PUMP_DESCRIPTION;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull @Override public String shortStatus(boolean veryShort) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override public boolean isFakingTempsByExtendedBoluses() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull @Override public PumpEnactResult loadTDDs() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override public boolean canHandleDST() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<CustomAction> getCustomActions() {
|
|
||||||
return Collections.emptyList();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void executeCustomAction(@NotNull CustomActionType customActionType) {
|
|
||||||
aapsLogger.warn(LTag.PUMP, "Unsupported custom action: " + customActionType);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Nullable @Override public PumpEnactResult executeCustomCommand(@NotNull CustomCommand customCommand) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override public void timezoneOrDSTChanged(@NotNull TimeChangeType timeChangeType) {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,34 @@
|
||||||
|
package info.nightscout.androidaps.plugins.pump.omnipod.dash.dagger
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import dagger.Module
|
||||||
|
import dagger.Provides
|
||||||
|
import dagger.Reusable
|
||||||
|
import info.nightscout.androidaps.logging.AAPSLogger
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.DashHistory
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.database.DashHistoryDatabase
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.database.HistoryRecordDao
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.history.mapper.HistoryMapper
|
||||||
|
import javax.inject.Singleton
|
||||||
|
|
||||||
|
@Module
|
||||||
|
class OmnipodDashHistoryModule {
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
@Singleton
|
||||||
|
internal fun provideDatabase(context: Context): DashHistoryDatabase = DashHistoryDatabase.build(context)
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
@Singleton
|
||||||
|
internal fun provideHistoryRecordDao(dashHistoryDatabase: DashHistoryDatabase): HistoryRecordDao =
|
||||||
|
dashHistoryDatabase.historyRecordDao()
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
@Reusable // no state, let system decide when to reuse or create new.
|
||||||
|
internal fun provideHistoryMapper() = HistoryMapper()
|
||||||
|
|
||||||
|
@Provides
|
||||||
|
@Singleton
|
||||||
|
internal fun provideDashHistory(dao: HistoryRecordDao, historyMapper: HistoryMapper, logger: AAPSLogger) =
|
||||||
|
DashHistory(dao, historyMapper, logger)
|
||||||
|
}
|
|
@ -1,7 +1,50 @@
|
||||||
package info.nightscout.androidaps.plugins.pump.omnipod.dash.dagger
|
package info.nightscout.androidaps.plugins.pump.omnipod.dash.dagger
|
||||||
|
|
||||||
|
import dagger.Binds
|
||||||
import dagger.Module
|
import dagger.Module
|
||||||
|
import dagger.android.ContributesAndroidInjector
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.common.dagger.ActivityScope
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.common.dagger.OmnipodWizardModule
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.OmnipodDashManager
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.OmnipodDashManagerImpl
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.OmnipodDashBleManager
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.OmnipodDashBleManagerImpl
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.state.OmnipodDashPodStateManager
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.state.OmnipodDashPodStateManagerImpl
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.ui.DashPodManagementActivity
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.ui.OmnipodDashOverviewFragment
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.ui.wizard.activation.DashPodActivationWizardActivity
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.ui.wizard.deactivation.DashPodDeactivationWizardActivity
|
||||||
|
|
||||||
@Module
|
@Module(includes = [OmnipodDashHistoryModule::class])
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
abstract class OmnipodDashModule
|
abstract class OmnipodDashModule {
|
||||||
|
// ACTIVITIES
|
||||||
|
|
||||||
|
@ContributesAndroidInjector
|
||||||
|
abstract fun contributesDashPodManagementActivity(): DashPodManagementActivity
|
||||||
|
|
||||||
|
@ActivityScope
|
||||||
|
@ContributesAndroidInjector(modules = [OmnipodWizardModule::class, OmnipodDashWizardViewModelsModule::class])
|
||||||
|
abstract fun contributesDashActivationWizardActivity(): DashPodActivationWizardActivity
|
||||||
|
|
||||||
|
@ActivityScope
|
||||||
|
@ContributesAndroidInjector(modules = [OmnipodWizardModule::class, OmnipodDashWizardViewModelsModule::class])
|
||||||
|
abstract fun contributesDashDeactivationWizardActivity(): DashPodDeactivationWizardActivity
|
||||||
|
|
||||||
|
// FRAGMENTS
|
||||||
|
|
||||||
|
@ContributesAndroidInjector
|
||||||
|
abstract fun contributesOmnipodDashOverviewFragment(): OmnipodDashOverviewFragment
|
||||||
|
|
||||||
|
// MANAGERS
|
||||||
|
|
||||||
|
@Binds
|
||||||
|
abstract fun bindsOmnipodDashBleManagerImpl(bleManager: OmnipodDashBleManagerImpl): OmnipodDashBleManager
|
||||||
|
|
||||||
|
@Binds
|
||||||
|
abstract fun bindsOmnipodDashPodStateManagerImpl(podStateManager: OmnipodDashPodStateManagerImpl): OmnipodDashPodStateManager
|
||||||
|
|
||||||
|
@Binds
|
||||||
|
abstract fun bindsOmnipodDashManagerImpl(omnipodManager: OmnipodDashManagerImpl): OmnipodDashManager
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,89 @@
|
||||||
|
package info.nightscout.androidaps.plugins.pump.omnipod.dash.dagger
|
||||||
|
|
||||||
|
import androidx.lifecycle.ViewModel
|
||||||
|
import dagger.Binds
|
||||||
|
import dagger.Module
|
||||||
|
import dagger.multibindings.IntoMap
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.common.dagger.OmnipodPluginQualifier
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.common.dagger.ViewModelKey
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.activation.viewmodel.action.InitializePodViewModel
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.activation.viewmodel.action.InsertCannulaViewModel
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.activation.viewmodel.info.AttachPodViewModel
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.activation.viewmodel.info.PodActivatedViewModel
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.activation.viewmodel.info.StartPodActivationViewModel
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.deactivation.viewmodel.action.DeactivatePodViewModel
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.deactivation.viewmodel.info.PodDeactivatedViewModel
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.deactivation.viewmodel.info.PodDiscardedViewModel
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.common.ui.wizard.deactivation.viewmodel.info.StartPodDeactivationViewModel
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.ui.wizard.activation.viewmodel.action.DashInitializePodViewModel
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.ui.wizard.activation.viewmodel.action.DashInsertCannulaViewModel
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.ui.wizard.activation.viewmodel.info.DashAttachPodViewModel
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.ui.wizard.activation.viewmodel.info.DashPodActivatedViewModel
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.ui.wizard.activation.viewmodel.info.DashStartPodActivationViewModel
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.ui.wizard.deactivation.viewmodel.action.DashDeactivatePodViewModel
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.ui.wizard.deactivation.viewmodel.info.DashPodDeactivatedViewModel
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.ui.wizard.deactivation.viewmodel.info.DashPodDiscardedViewModel
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.ui.wizard.deactivation.viewmodel.info.DashStartPodDeactivationViewModel
|
||||||
|
|
||||||
|
@Module
|
||||||
|
@Suppress("unused")
|
||||||
|
abstract class OmnipodDashWizardViewModelsModule {
|
||||||
|
// #### VIEW MODELS ############################################################################
|
||||||
|
|
||||||
|
// POD ACTIVATION
|
||||||
|
|
||||||
|
@Binds
|
||||||
|
@IntoMap
|
||||||
|
@OmnipodPluginQualifier
|
||||||
|
@ViewModelKey(StartPodActivationViewModel::class)
|
||||||
|
internal abstract fun startPodActivationViewModel(viewModel: DashStartPodActivationViewModel): ViewModel
|
||||||
|
|
||||||
|
@Binds
|
||||||
|
@IntoMap
|
||||||
|
@OmnipodPluginQualifier
|
||||||
|
@ViewModelKey(InitializePodViewModel::class)
|
||||||
|
internal abstract fun initializePodViewModel(viewModel: DashInitializePodViewModel): ViewModel
|
||||||
|
|
||||||
|
@Binds
|
||||||
|
@IntoMap
|
||||||
|
@OmnipodPluginQualifier
|
||||||
|
@ViewModelKey(AttachPodViewModel::class)
|
||||||
|
internal abstract fun attachPodViewModel(viewModel: DashAttachPodViewModel): ViewModel
|
||||||
|
|
||||||
|
@Binds
|
||||||
|
@IntoMap
|
||||||
|
@OmnipodPluginQualifier
|
||||||
|
@ViewModelKey(InsertCannulaViewModel::class)
|
||||||
|
internal abstract fun insertCannulaViewModel(viewModel: DashInsertCannulaViewModel): ViewModel
|
||||||
|
|
||||||
|
@Binds
|
||||||
|
@IntoMap
|
||||||
|
@OmnipodPluginQualifier
|
||||||
|
@ViewModelKey(PodActivatedViewModel::class)
|
||||||
|
internal abstract fun podActivatedViewModel(viewModel: DashPodActivatedViewModel): ViewModel
|
||||||
|
|
||||||
|
// POD DEACTIVATION
|
||||||
|
@Binds
|
||||||
|
@IntoMap
|
||||||
|
@OmnipodPluginQualifier
|
||||||
|
@ViewModelKey(StartPodDeactivationViewModel::class)
|
||||||
|
internal abstract fun startPodDeactivationViewModel(viewModel: DashStartPodDeactivationViewModel): ViewModel
|
||||||
|
|
||||||
|
@Binds
|
||||||
|
@IntoMap
|
||||||
|
@OmnipodPluginQualifier
|
||||||
|
@ViewModelKey(DeactivatePodViewModel::class)
|
||||||
|
internal abstract fun deactivatePodViewModel(viewModel: DashDeactivatePodViewModel): ViewModel
|
||||||
|
|
||||||
|
@Binds
|
||||||
|
@IntoMap
|
||||||
|
@OmnipodPluginQualifier
|
||||||
|
@ViewModelKey(PodDeactivatedViewModel::class)
|
||||||
|
internal abstract fun podDeactivatedViewModel(viewModel: DashPodDeactivatedViewModel): ViewModel
|
||||||
|
|
||||||
|
@Binds
|
||||||
|
@IntoMap
|
||||||
|
@OmnipodPluginQualifier
|
||||||
|
@ViewModelKey(PodDiscardedViewModel::class)
|
||||||
|
internal abstract fun podDiscardedViewModel(viewModel: DashPodDiscardedViewModel): ViewModel
|
||||||
|
}
|
|
@ -0,0 +1,47 @@
|
||||||
|
package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver
|
||||||
|
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.event.PodEvent
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.AlertConfiguration
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.AlertTrigger
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.AlertType
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.BasalProgram
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.definition.BeepType
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.response.ResponseType
|
||||||
|
import io.reactivex.Observable
|
||||||
|
import java.util.*
|
||||||
|
import java.util.concurrent.CountDownLatch
|
||||||
|
|
||||||
|
interface OmnipodDashManager {
|
||||||
|
|
||||||
|
fun activatePodPart1(lowReservoirAlertTrigger: AlertTrigger.ReservoirVolumeTrigger?): Observable<PodEvent>
|
||||||
|
|
||||||
|
fun activatePodPart2(basalProgram: BasalProgram, userConfiguredExpirationHours: Long?): Observable<PodEvent>
|
||||||
|
|
||||||
|
fun getStatus(type: ResponseType.StatusResponseType): Observable<PodEvent>
|
||||||
|
|
||||||
|
fun setBasalProgram(basalProgram: BasalProgram, hasBasalBeepEnabled: Boolean): Observable<PodEvent>
|
||||||
|
|
||||||
|
fun suspendDelivery(hasBasalBeepEnabled: Boolean): Observable<PodEvent>
|
||||||
|
|
||||||
|
fun setTime(): Observable<PodEvent>
|
||||||
|
|
||||||
|
fun setTempBasal(rate: Double, durationInMinutes: Short, tempBasalBeeps: Boolean): Observable<PodEvent>
|
||||||
|
|
||||||
|
fun stopTempBasal(hasTempBasalBeepEnabled: Boolean): Observable<PodEvent>
|
||||||
|
|
||||||
|
fun bolus(units: Double, confirmationBeeps: Boolean, completionBeeps: Boolean): Observable<PodEvent>
|
||||||
|
|
||||||
|
fun stopBolus(beep: Boolean): Observable<PodEvent>
|
||||||
|
|
||||||
|
fun playBeep(beepType: BeepType): Observable<PodEvent>
|
||||||
|
|
||||||
|
fun programAlerts(alertConfigurations: List<AlertConfiguration>): Observable<PodEvent>
|
||||||
|
|
||||||
|
fun silenceAlerts(alertTypes: EnumSet<AlertType>): Observable<PodEvent>
|
||||||
|
|
||||||
|
fun deactivatePod(): Observable<PodEvent>
|
||||||
|
|
||||||
|
fun disconnect(closeGatt: Boolean = false)
|
||||||
|
|
||||||
|
fun connect(stop: CountDownLatch): Observable<PodEvent>
|
||||||
|
}
|
|
@ -0,0 +1,735 @@
|
||||||
|
package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver
|
||||||
|
|
||||||
|
import android.os.SystemClock
|
||||||
|
import info.nightscout.androidaps.logging.AAPSLogger
|
||||||
|
import info.nightscout.androidaps.logging.LTag
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm.OmnipodDashBleManager
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.event.PodEvent
|
||||||
|
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.response.*
|
||||||
|
import info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.pod.state.OmnipodDashPodStateManager
|
||||||
|
import info.nightscout.androidaps.utils.rx.AapsSchedulers
|
||||||
|
import io.reactivex.Observable
|
||||||
|
import io.reactivex.functions.Action
|
||||||
|
import io.reactivex.functions.Consumer
|
||||||
|
import java.time.Duration
|
||||||
|
import java.time.ZonedDateTime
|
||||||
|
import java.util.*
|
||||||
|
import java.util.concurrent.CountDownLatch
|
||||||
|
import java.util.concurrent.TimeUnit
|
||||||
|
import javax.inject.Inject
|
||||||
|
import javax.inject.Singleton
|
||||||
|
|
||||||
|
@Singleton
|
||||||
|
class OmnipodDashManagerImpl @Inject constructor(
|
||||||
|
private val logger: AAPSLogger,
|
||||||
|
private val podStateManager: OmnipodDashPodStateManager,
|
||||||
|
private val bleManager: OmnipodDashBleManager,
|
||||||
|
private val aapsSchedulers: AapsSchedulers
|
||||||
|
) : OmnipodDashManager {
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
|
||||||
|
const val NONCE = 1229869870 // The Omnipod Dash seems to use a fixed nonce
|
||||||
|
}
|
||||||
|
|
||||||
|
private val observePodReadyForActivationPart1: Observable<PodEvent>
|
||||||
|
get() = Observable.defer {
|
||||||
|
if (podStateManager.activationProgress.isBefore(ActivationProgress.PHASE_1_COMPLETED)) {
|
||||||
|
Observable.empty()
|
||||||
|
} else {
|
||||||
|
// TODO introduce specialized Exception
|
||||||
|
Observable.error(IllegalStateException("Pod is in an incorrect state"))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private val observePodReadyForActivationPart2: Observable<PodEvent>
|
||||||
|
get() = Observable.defer {
|
||||||
|
if (podStateManager.activationProgress.isAtLeast(ActivationProgress.PHASE_1_COMPLETED) &&
|
||||||
|
podStateManager.activationProgress.isBefore(ActivationProgress.COMPLETED)
|
||||||
|
) {
|
||||||
|
Observable.empty()
|
||||||
|
} else {
|
||||||
|
// TODO introduce specialized Exception
|
||||||
|
Observable.error(IllegalStateException("Pod is in an incorrect state"))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private val observeUniqueIdSet: Observable<PodEvent>
|
||||||
|
get() = Observable.defer {
|
||||||
|
if (podStateManager.activationProgress.isAtLeast(ActivationProgress.SET_UNIQUE_ID)) {
|
||||||
|
Observable.empty()
|
||||||
|
} else {
|
||||||
|
// TODO introduce specialized Exception
|
||||||
|
Observable.error(IllegalStateException("Pod is in an incorrect state"))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private val observePodRunning: Observable<PodEvent>
|
||||||
|
get() = Observable.defer {
|
||||||
|
if (podStateManager.activationProgress == ActivationProgress.COMPLETED && podStateManager.podStatus!!.isRunning()) {
|
||||||
|
Observable.empty()
|
||||||
|
} else {
|
||||||
|
// TODO introduce specialized Exception
|
||||||
|
Observable.error(IllegalStateException("Pod is in an incorrect state"))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun disconnect(closeGatt: Boolean) {
|
||||||
|
bleManager.disconnect(closeGatt)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun connect(stop: CountDownLatch): Observable<PodEvent> {
|
||||||
|
return observeConnectToPodWithStop(stop)
|
||||||
|
.interceptPodEvents()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun observeConnectToPodWithStop(stop: CountDownLatch): Observable<PodEvent> {
|
||||||
|
return Observable.defer {
|
||||||
|
bleManager.connect(stop)
|
||||||
|
.doOnError { throwable -> logger.warn(LTag.PUMPBTCOMM, "observeConnectToPodWithStop error=$throwable") }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private val observeConnectToPod: Observable<PodEvent>
|
||||||
|
get() = Observable.defer {
|
||||||
|
bleManager.connect()
|
||||||
|
.doOnError { throwable -> logger.warn(LTag.PUMPBTCOMM, "observeConnectToPod error=$throwable") }
|
||||||
|
}
|
||||||
|
|
||||||
|
private val observePairNewPod: Observable<PodEvent>
|
||||||
|
get() = Observable.defer {
|
||||||
|
bleManager.pairNewPod()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun observeSendProgramBolusCommand(
|
||||||
|
units: Double,
|
||||||
|
rateInEighthPulsesPerSeconds: Byte,
|
||||||
|
confirmationBeeps: Boolean,
|
||||||
|
completionBeeps: Boolean
|
||||||
|
): Observable<PodEvent> {
|
||||||
|
return Observable.defer {
|
||||||
|
bleManager.sendCommand(
|
||||||
|
ProgramBolusCommand.Builder()
|
||||||
|
.setUniqueId(podStateManager.uniqueId!!.toInt())
|
||||||
|
.setSequenceNumber(podStateManager.messageSequenceNumber)
|
||||||
|
.setNonce(NONCE)
|
||||||
|
.setNumberOfUnits(units)
|
||||||
|
.setDelayBetweenPulsesInEighthSeconds(rateInEighthPulsesPerSeconds)
|
||||||
|
.setProgramReminder(ProgramReminder(confirmationBeeps, completionBeeps, 0))
|
||||||
|
.build(),
|
||||||
|
DefaultStatusResponse::class
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun observeSendGetPodStatusCommand(type: ResponseType.StatusResponseType = ResponseType.StatusResponseType.DEFAULT_STATUS_RESPONSE): Observable<PodEvent> {
|
||||||
|
// TODO move somewhere else
|
||||||
|
val expectedResponseType = when (type) {
|
||||||
|
ResponseType.StatusResponseType.DEFAULT_STATUS_RESPONSE -> DefaultStatusResponse::class
|
||||||
|
ResponseType.StatusResponseType.ALARM_STATUS -> AlarmStatusResponse::class
|
||||||
|
|
||||||
|
else -> return Observable.error(UnsupportedOperationException("No response type to class mapping for ${type.name}"))
|
||||||
|
}
|
||||||
|
|
||||||
|
return Observable.defer {
|
||||||
|
bleManager.sendCommand(
|
||||||
|
GetStatusCommand.Builder()
|
||||||
|
.setUniqueId(podStateManager.uniqueId!!.toInt())
|
||||||
|
.setSequenceNumber(podStateManager.messageSequenceNumber)
|
||||||
|
.setStatusResponseType(type)
|
||||||
|
.build(),
|
||||||
|
expectedResponseType
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private val observeVerifyCannulaInsertion: Observable<PodEvent>
|
||||||
|
get() = Observable.concat(
|
||||||
|
observeSendGetPodStatusCommand(),
|
||||||
|
Observable.defer {
|
||||||
|
if (podStateManager.podStatus == PodStatus.RUNNING_ABOVE_MIN_VOLUME) {
|
||||||
|
Observable.empty()
|
||||||
|
} else {
|
||||||
|
Observable.error(IllegalStateException("Unexpected Pod status"))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
private fun observeSendProgramAlertsCommand(
|
||||||
|
alertConfigurations: List<AlertConfiguration>,
|
||||||
|
multiCommandFlag: Boolean = false
|
||||||
|
): Observable<PodEvent> {
|
||||||
|
return Observable.defer {
|
||||||
|
bleManager.sendCommand(
|
||||||
|
ProgramAlertsCommand.Builder()
|
||||||
|
.setUniqueId(podStateManager.uniqueId!!.toInt())
|
||||||
|
.setSequenceNumber(podStateManager.messageSequenceNumber)
|
||||||
|
.setNonce(NONCE)
|
||||||
|
.setAlertConfigurations(alertConfigurations)
|
||||||
|
.setMultiCommandFlag(multiCommandFlag)
|
||||||
|
.build(),
|
||||||
|
DefaultStatusResponse::class
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun observeSendProgramBasalCommand(basalProgram: BasalProgram, hasBasalBeepEnabled: Boolean): Observable<PodEvent> {
|
||||||
|
return Observable.defer {
|
||||||
|
val currentTime = Date()
|
||||||
|
logger.debug(LTag.PUMPCOMM, "Programming basal. currentTime={}, basalProgram={}", currentTime, basalProgram)
|
||||||
|
bleManager.sendCommand(
|
||||||
|
ProgramBasalCommand.Builder()
|
||||||
|
.setUniqueId(podStateManager.uniqueId!!.toInt())
|
||||||
|
.setSequenceNumber(podStateManager.messageSequenceNumber)
|
||||||
|
.setNonce(NONCE)
|
||||||
|
.setProgramReminder(ProgramReminder(atStart = hasBasalBeepEnabled, atEnd = false, atInterval = 0))
|
||||||
|
.setBasalProgram(basalProgram)
|
||||||
|
.setCurrentTime(currentTime)
|
||||||
|
.build(),
|
||||||
|
DefaultStatusResponse::class
|
||||||
|
)
|
||||||
|
}.doOnComplete {
|
||||||
|
podStateManager.timeZone = TimeZone.getDefault()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private val observeVerifyPrime: Observable<PodEvent>
|
||||||
|
get() = Observable.concat(
|
||||||
|
observeSendGetPodStatusCommand(ResponseType.StatusResponseType.DEFAULT_STATUS_RESPONSE),
|
||||||
|
Observable.defer {
|
||||||
|
if (podStateManager.podStatus == PodStatus.CLUTCH_DRIVE_ENGAGED) {
|
||||||
|
Observable.empty()
|
||||||
|
} else {
|
||||||
|
Observable.error(IllegalStateException("Unexpected Pod status: got ${podStateManager.podStatus}, expected CLUTCH_DRIVE_ENGAGED"))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
private val observeSendSetUniqueIdCommand: Observable<PodEvent>
|
||||||
|
get() = Observable.defer {
|
||||||
|
bleManager.sendCommand(
|
||||||
|
SetUniqueIdCommand.Builder()
|
||||||
|
.setSequenceNumber(podStateManager.messageSequenceNumber)
|
||||||
|
.setUniqueId(podStateManager.uniqueId!!.toInt())
|
||||||
|
.setLotNumber(podStateManager.lotNumber!!.toInt())
|
||||||
|
.setPodSequenceNumber(podStateManager.podSequenceNumber!!.toInt())
|
||||||
|
.setInitializationTime(Date())
|
||||||
|
.build(),
|
||||||
|
SetUniqueIdResponse::class
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
private val observeSendGetVersionCommand: Observable<PodEvent>
|
||||||
|
get() = Observable.defer {
|
||||||
|
bleManager.sendCommand(
|
||||||
|
GetVersionCommand.Builder()
|
||||||
|
.setSequenceNumber(podStateManager.messageSequenceNumber)
|
||||||
|
.setUniqueId(DEFAULT_UNIQUE_ID)
|
||||||
|
.build(),
|
||||||
|
VersionResponse::class
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun activatePodPart1(lowReservoirAlertTrigger: AlertTrigger.ReservoirVolumeTrigger?): Observable<PodEvent> {
|
||||||
|
return Observable.concat(
|
||||||
|
observePodReadyForActivationPart1,
|
||||||
|
observePairNewPod,
|
||||||
|
observeConnectToPod,
|
||||||
|
observeActivationPart1Commands(lowReservoirAlertTrigger)
|
||||||
|
).doOnComplete(ActivationProgressUpdater(ActivationProgress.PHASE_1_COMPLETED))
|
||||||
|
.interceptPodEvents()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun observeActivationPart1Commands(lowReservoirAlertTrigger: AlertTrigger.ReservoirVolumeTrigger?): Observable<PodEvent> {
|
||||||
|
val observables = createActivationPart1Observables(lowReservoirAlertTrigger)
|
||||||
|
|
||||||
|
return if (observables.isEmpty()) {
|
||||||
|
Observable.empty()
|
||||||
|
} else {
|
||||||
|
Observable.concat(observables)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun createActivationPart1Observables(lowReservoirAlertTrigger: AlertTrigger.ReservoirVolumeTrigger?): List<Observable<PodEvent>> {
|
||||||
|
val observables = ArrayList<Observable<PodEvent>>()
|
||||||
|
|
||||||
|
if (podStateManager.activationProgress.isBefore(ActivationProgress.PRIME_COMPLETED)) {
|
||||||
|
observables.add(
|
||||||
|
observeVerifyPrime.doOnComplete(ActivationProgressUpdater(ActivationProgress.PRIME_COMPLETED))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (podStateManager.activationProgress.isBefore(ActivationProgress.PRIMING)) {
|
||||||
|
observables.add(observeConnectToPod) // connection can time out while waiting
|
||||||
|
observables.add(
|
||||||
|
Observable.defer {
|
||||||
|
Observable.timer(podStateManager.firstPrimeBolusVolume!!.toLong(), TimeUnit.SECONDS)
|
||||||
|
.flatMap { Observable.empty() }
|
||||||
|
}
|
||||||
|
)
|
||||||
|
observables.add(
|
||||||
|
Observable.defer {
|
||||||
|
bleManager.sendCommand(
|
||||||
|
ProgramBolusCommand.Builder()
|
||||||
|
.setUniqueId(podStateManager.uniqueId!!.toInt())
|
||||||
|
.setSequenceNumber(podStateManager.messageSequenceNumber)
|
||||||
|
.setNonce(NONCE)
|
||||||
|
.setNumberOfUnits(podStateManager.firstPrimeBolusVolume!! * 0.05)
|
||||||
|
.setDelayBetweenPulsesInEighthSeconds(podStateManager.primePulseRate!!.toByte())
|
||||||
|
.setProgramReminder(ProgramReminder(atStart = false, atEnd = false, atInterval = 0))
|
||||||
|
.build(),
|
||||||
|
DefaultStatusResponse::class
|
||||||
|
)
|
||||||
|
}.doOnComplete(ActivationProgressUpdater(ActivationProgress.PRIMING))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (podStateManager.activationProgress.isBefore(ActivationProgress.REPROGRAMMED_LUMP_OF_COAL_ALERT)) {
|
||||||
|
observables.add(
|
||||||
|
observeSendProgramAlertsCommand(
|
||||||
|
listOf(
|
||||||
|
AlertConfiguration(
|
||||||
|
AlertType.EXPIRATION,
|
||||||
|
enabled = true,
|
||||||
|
durationInMinutes = 55,
|
||||||
|
autoOff = false,
|
||||||
|
AlertTrigger.TimerTrigger(5),
|
||||||
|
BeepType.FOUR_TIMES_BIP_BEEP,
|
||||||
|
BeepRepetitionType.XXX5
|
||||||
|
)
|
||||||
|
)
|
||||||
|
).doOnComplete(ActivationProgressUpdater(ActivationProgress.REPROGRAMMED_LUMP_OF_COAL_ALERT))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
if (lowReservoirAlertTrigger != null && podStateManager.activationProgress.isBefore(ActivationProgress.PROGRAMMED_LOW_RESERVOIR_ALERTS)) {
|
||||||
|
observables.add(
|
||||||
|
observeSendProgramAlertsCommand(
|
||||||
|
listOf(
|
||||||
|
AlertConfiguration(
|
||||||
|
AlertType.LOW_RESERVOIR,
|
||||||
|
enabled = true,
|
||||||
|
durationInMinutes = 0,
|
||||||
|
autoOff = false,
|
||||||
|
lowReservoirAlertTrigger,
|
||||||
|
BeepType.FOUR_TIMES_BIP_BEEP,
|
||||||
|
BeepRepetitionType.XXX
|
||||||
|
)
|
||||||
|
)
|
||||||
|
).doOnComplete(ActivationProgressUpdater(ActivationProgress.PROGRAMMED_LOW_RESERVOIR_ALERTS))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (podStateManager.activationProgress.isBefore(ActivationProgress.SET_UNIQUE_ID)) {
|
||||||
|
observables.add(
|
||||||
|
observeSendSetUniqueIdCommand.doOnComplete(ActivationProgressUpdater(ActivationProgress.SET_UNIQUE_ID))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
if (podStateManager.activationProgress.isBefore(ActivationProgress.GOT_POD_VERSION)) {
|
||||||
|
observables.add(
|
||||||
|
observeSendGetVersionCommand.doOnComplete(ActivationProgressUpdater(ActivationProgress.GOT_POD_VERSION))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
return observables.reversed()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun activatePodPart2(basalProgram: BasalProgram, userConfiguredExpirationHours: Long?):
|
||||||
|
Observable<PodEvent> {
|
||||||
|
return Observable.concat(
|
||||||
|
observePodReadyForActivationPart2,
|
||||||
|
observeConnectToPod,
|
||||||
|
observeActivationPart2Commands(basalProgram, userConfiguredExpirationHours)
|
||||||
|
).doOnComplete(ActivationProgressUpdater(ActivationProgress.COMPLETED))
|
||||||
|
.interceptPodEvents()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun observeActivationPart2Commands(basalProgram: BasalProgram, userConfiguredExpirationHours: Long?):
|
||||||
|
Observable<PodEvent> {
|
||||||
|
val observables = createActivationPart2Observables(basalProgram, userConfiguredExpirationHours)
|
||||||
|
|
||||||
|
return if (observables.isEmpty()) {
|
||||||
|
Observable.empty()
|
||||||
|
} else {
|
||||||
|
Observable.concat(observables)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun createActivationPart2Observables(
|
||||||
|
basalProgram: BasalProgram,
|
||||||
|
userConfiguredExpirationHours: Long?
|
||||||
|
):
|
||||||
|
List<Observable<PodEvent>> {
|
||||||
|
val observables = ArrayList<Observable<PodEvent>>()
|
||||||
|
|
||||||
|
if (podStateManager.activationProgress.isBefore(ActivationProgress.CANNULA_INSERTED)) {
|
||||||
|
observables.add(
|
||||||
|
observeVerifyCannulaInsertion
|
||||||
|
.doOnComplete(ActivationProgressUpdater(ActivationProgress.CANNULA_INSERTED))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
if (podStateManager.activationProgress.isBefore(ActivationProgress.INSERTING_CANNULA)) {
|
||||||
|
observables.add(
|
||||||
|
Observable.defer {
|
||||||
|
Observable.timer(podStateManager.secondPrimeBolusVolume!!.toLong(), TimeUnit.SECONDS)
|
||||||
|
.flatMap { Observable.empty() }
|
||||||
|
}
|
||||||
|
)
|
||||||
|
observables.add(
|
||||||
|
observeSendProgramBolusCommand(
|
||||||
|
podStateManager.secondPrimeBolusVolume!! * 0.05,
|
||||||
|
podStateManager.primePulseRate!!.toByte(),
|
||||||
|
confirmationBeeps = false,
|
||||||
|
completionBeeps = false
|
||||||
|
).doOnComplete(ActivationProgressUpdater(ActivationProgress.INSERTING_CANNULA))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
if (podStateManager.activationProgress.isBefore(ActivationProgress.UPDATED_EXPIRATION_ALERTS)) {
|
||||||
|
val podLifeLeft = Duration.between(ZonedDateTime.now(), podStateManager.expiry)
|
||||||
|
|
||||||
|
val alerts = mutableListOf(
|
||||||
|
AlertConfiguration(
|
||||||
|
AlertType.EXPIRATION,
|
||||||
|
enabled = true,
|
||||||
|
durationInMinutes = TimeUnit.HOURS.toMinutes(7).toShort(),
|
||||||
|
autoOff = false,
|
||||||
|
AlertTrigger.TimerTrigger(
|
||||||
|
TimeUnit.HOURS.toMinutes(72).toShort()
|
||||||
|
), // FIXME use activation time
|
||||||
|
BeepType.FOUR_TIMES_BIP_BEEP,
|
||||||
|
BeepRepetitionType.XXX3
|
||||||
|
),
|
||||||
|
AlertConfiguration(
|
||||||
|
AlertType.EXPIRATION_IMMINENT,
|
||||||
|
enabled = true,
|
||||||
|
durationInMinutes = 0,
|
||||||
|
autoOff = false,
|
||||||
|
AlertTrigger.TimerTrigger(
|
||||||
|
TimeUnit.HOURS.toMinutes(79).toShort()
|
||||||
|
), // FIXME use activation time
|
||||||
|
BeepType.FOUR_TIMES_BIP_BEEP,
|
||||||
|
BeepRepetitionType.XXX4
|
||||||
|
)
|
||||||
|
)
|
||||||
|
val userExpiryAlertDelay = podLifeLeft.minus(
|
||||||
|
Duration.ofHours(userConfiguredExpirationHours ?: MAX_POD_LIFETIME.toHours() + 1)
|
||||||
|
)
|
||||||
|
if (userExpiryAlertDelay.isNegative) {
|
||||||
|
logger.warn(
|
||||||
|
LTag.PUMPBTCOMM,
|
||||||
|
"createActivationPart2Observables negative " +
|
||||||
|
"expiryAlertDuration=$userExpiryAlertDelay"
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
alerts.add(
|
||||||
|
AlertConfiguration(
|
||||||
|
AlertType.USER_SET_EXPIRATION,
|
||||||
|
enabled = true,
|
||||||
|
durationInMinutes = 0,
|
||||||
|
autoOff = false,
|
||||||
|
AlertTrigger.TimerTrigger(
|
||||||
|
userExpiryAlertDelay.toMinutes().toShort()
|
||||||
|
),
|
||||||
|
BeepType.FOUR_TIMES_BIP_BEEP,
|
||||||
|
BeepRepetitionType.XXX2
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
observables.add(
|
||||||
|
observeSendProgramAlertsCommand(
|
||||||
|
alerts,
|
||||||
|
multiCommandFlag = true
|
||||||
|
).doOnComplete(ActivationProgressUpdater(ActivationProgress.UPDATED_EXPIRATION_ALERTS))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
if (podStateManager.activationProgress.isBefore(ActivationProgress.PROGRAMMED_BASAL)) {
|
||||||
|
observables.add(
|
||||||
|
observeSendProgramBasalCommand(basalProgram, false)
|
||||||
|
.doOnComplete(ActivationProgressUpdater(ActivationProgress.PROGRAMMED_BASAL))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
return observables.reversed()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getStatus(type: ResponseType.StatusResponseType): Observable<PodEvent> {
|
||||||
|
return Observable.concat(
|
||||||
|
observeUniqueIdSet,
|
||||||
|
observeConnectToPod,
|
||||||
|
observeSendGetPodStatusCommand(type)
|
||||||
|
).interceptPodEvents()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun setBasalProgram(basalProgram: BasalProgram, hasBasalBeepEnabled: Boolean): Observable<PodEvent> {
|
||||||
|
return Observable.concat(
|
||||||
|
observePodRunning,
|
||||||
|
observeConnectToPod,
|
||||||
|
observeSendProgramBasalCommand(basalProgram, hasBasalBeepEnabled)
|
||||||
|
).interceptPodEvents()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun observeSendStopDeliveryCommand(
|
||||||
|
deliveryType: StopDeliveryCommand.DeliveryType,
|
||||||
|
beepEnabled: Boolean
|
||||||
|
): Observable<PodEvent> {
|
||||||
|
return Observable.defer {
|
||||||
|
val beepType = if (!beepEnabled)
|
||||||
|
BeepType.SILENT
|
||||||
|
else
|
||||||
|
BeepType.LONG_SINGLE_BEEP
|
||||||
|
|
||||||
|
bleManager.sendCommand(
|
||||||
|
StopDeliveryCommand.Builder()
|
||||||
|
.setSequenceNumber(podStateManager.messageSequenceNumber)
|
||||||
|
.setUniqueId(podStateManager.uniqueId!!.toInt())
|
||||||
|
.setNonce(NONCE)
|
||||||
|
.setDeliveryType(deliveryType)
|
||||||
|
.setBeepType(beepType)
|
||||||
|
.build(),
|
||||||
|
DefaultStatusResponse::class
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun suspendDelivery(hasBasalBeepEnabled: Boolean): Observable<PodEvent> {
|
||||||
|
return Observable.concat(
|
||||||
|
observePodRunning,
|
||||||
|
observeConnectToPod,
|
||||||
|
observeSendStopDeliveryCommand(StopDeliveryCommand.DeliveryType.ALL, hasBasalBeepEnabled)
|
||||||
|
).interceptPodEvents()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun setTime(): Observable<PodEvent> {
|
||||||
|
// TODO
|
||||||
|
logger.error(LTag.PUMPCOMM, "NOT IMPLEMENTED: setTime()")
|
||||||
|
return Observable.empty()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun observeSendProgramTempBasalCommand(rate: Double, durationInMinutes: Short, tempBasalBeeps: Boolean): Observable<PodEvent> {
|
||||||
|
return Observable.defer {
|
||||||
|
bleManager.sendCommand(
|
||||||
|
ProgramTempBasalCommand.Builder()
|
||||||
|
.setSequenceNumber(podStateManager.messageSequenceNumber)
|
||||||
|
.setUniqueId(podStateManager.uniqueId!!.toInt())
|
||||||
|
.setNonce(NONCE)
|
||||||
|
.setProgramReminder(ProgramReminder(tempBasalBeeps, tempBasalBeeps, 0))
|
||||||
|
.setRateInUnitsPerHour(rate)
|
||||||
|
.setDurationInMinutes(durationInMinutes)
|
||||||
|
.build(),
|
||||||
|
DefaultStatusResponse::class
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun setTempBasal(rate: Double, durationInMinutes: Short, tempBasalBeeps: Boolean): Observable<PodEvent> {
|
||||||
|
return Observable.concat(
|
||||||
|
observePodRunning,
|
||||||
|
observeConnectToPod,
|
||||||
|
observeSendProgramTempBasalCommand(rate, durationInMinutes, tempBasalBeeps)
|
||||||
|
).interceptPodEvents()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun stopTempBasal(hasTempBasalBeepEnabled: Boolean): Observable<PodEvent> {
|
||||||
|
return Observable.concat(
|
||||||
|
observePodRunning,
|
||||||
|
observeConnectToPod,
|
||||||
|
observeSendStopDeliveryCommand(StopDeliveryCommand.DeliveryType.TEMP_BASAL, hasTempBasalBeepEnabled)
|
||||||
|
).interceptPodEvents()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun bolus(units: Double, confirmationBeeps: Boolean, completionBeeps: Boolean): Observable<PodEvent> {
|
||||||
|
return Observable.concat(
|
||||||
|
observePodRunning,
|
||||||
|
observeConnectToPod,
|
||||||
|
observeSendProgramBolusCommand(
|
||||||
|
units,
|
||||||
|
podStateManager.pulseRate!!.toByte(),
|
||||||
|
confirmationBeeps,
|
||||||
|
completionBeeps
|
||||||
|
)
|
||||||
|
).interceptPodEvents()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun stopBolus(beep: Boolean): Observable<PodEvent> {
|
||||||
|
return Observable.concat(
|
||||||
|
observePodRunning,
|
||||||
|
observeConnectToPod,
|
||||||
|
observeSendStopDeliveryCommand(StopDeliveryCommand.DeliveryType.BOLUS, beep)
|
||||||
|
).interceptPodEvents()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun observeSendConfigureBeepsCommand(
|
||||||
|
basalReminder: ProgramReminder = ProgramReminder(atStart = false, atEnd = false, atInterval = 0),
|
||||||
|
tempBasalReminder: ProgramReminder = ProgramReminder(atStart = false, atEnd = false, atInterval = 0),
|
||||||
|
bolusReminder: ProgramReminder = ProgramReminder(atStart = false, atEnd = false, atInterval = 0),
|
||||||
|
immediateBeepType: BeepType = BeepType.SILENT
|
||||||
|
): Observable<PodEvent> {
|
||||||
|
return Observable.defer {
|
||||||
|
bleManager.sendCommand(
|
||||||
|
ProgramBeepsCommand.Builder()
|
||||||
|
.setSequenceNumber(podStateManager.messageSequenceNumber)
|
||||||
|
.setUniqueId(podStateManager.uniqueId!!.toInt())
|
||||||
|
.setBasalReminder(basalReminder)
|
||||||
|
.setTempBasalReminder(tempBasalReminder)
|
||||||
|
.setBolusReminder(bolusReminder)
|
||||||
|
.setImmediateBeepType(immediateBeepType)
|
||||||
|
.build(),
|
||||||
|
DefaultStatusResponse::class
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun playBeep(beepType: BeepType): Observable<PodEvent> {
|
||||||
|
return Observable.concat(
|
||||||
|
observePodRunning,
|
||||||
|
observeConnectToPod,
|
||||||
|
observeSendConfigureBeepsCommand(immediateBeepType = beepType)
|
||||||
|
).interceptPodEvents()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun programAlerts(alertConfigurations: List<AlertConfiguration>): Observable<PodEvent> {
|
||||||
|
return Observable.concat(
|
||||||
|
observePodRunning,
|
||||||
|
observeConnectToPod,
|
||||||
|
observeSendProgramAlertsCommand(alertConfigurations)
|
||||||
|
).interceptPodEvents()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun observeSendSilenceAlertsCommand(alertTypes: EnumSet<AlertType>): Observable<PodEvent> {
|
||||||
|
return Observable.defer {
|
||||||
|
bleManager.sendCommand(
|
||||||
|
SilenceAlertsCommand.Builder()
|
||||||
|
.setSequenceNumber(podStateManager.messageSequenceNumber)
|
||||||
|
.setUniqueId(podStateManager.uniqueId!!.toInt())
|
||||||
|
.setNonce(NONCE)
|
||||||
|
.setAlertTypes(alertTypes)
|
||||||
|
.build(),
|
||||||
|
DefaultStatusResponse::class
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun silenceAlerts(alertTypes: EnumSet<AlertType>): Observable<PodEvent> {
|
||||||
|
return Observable.concat(
|
||||||
|
observePodRunning,
|
||||||
|
observeConnectToPod,
|
||||||
|
observeSendSilenceAlertsCommand(alertTypes)
|
||||||
|
).interceptPodEvents()
|
||||||
|
}
|
||||||
|
|
||||||
|
private val observeSendDeactivateCommand: Observable<PodEvent>
|
||||||
|
get() = Observable.defer {
|
||||||
|
bleManager.sendCommand(
|
||||||
|
DeactivateCommand.Builder()
|
||||||
|
.setSequenceNumber(podStateManager.messageSequenceNumber)
|
||||||
|
.setUniqueId(podStateManager.uniqueId!!.toInt())
|
||||||
|
.setNonce(NONCE)
|
||||||
|
.build(),
|
||||||
|
DefaultStatusResponse::class
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun deactivatePod(): Observable<PodEvent> {
|
||||||
|
return Observable.concat(
|
||||||
|
observeConnectToPod,
|
||||||
|
observeSendDeactivateCommand
|
||||||
|
).interceptPodEvents()
|
||||||
|
.doOnComplete(podStateManager::reset)
|
||||||
|
}
|
||||||
|
|
||||||
|
inner class PodEventInterceptor : Consumer<PodEvent> {
|
||||||
|
|
||||||
|
override fun accept(event: PodEvent) {
|
||||||
|
logger.debug(LTag.PUMP, "Intercepted PodEvent in OmnipodDashManagerImpl: ${event.javaClass.simpleName}")
|
||||||
|
|
||||||
|
when (event) {
|
||||||
|
is PodEvent.AlreadyConnected -> {
|
||||||
|
podStateManager.bluetoothAddress = event.bluetoothAddress
|
||||||
|
}
|
||||||
|
|
||||||
|
is PodEvent.BluetoothConnected -> {
|
||||||
|
podStateManager.bluetoothAddress = event.bluetoothAddress
|
||||||
|
}
|
||||||
|
|
||||||
|
is PodEvent.Connected -> {
|
||||||
|
}
|
||||||
|
|
||||||
|
is PodEvent.CommandSent -> {
|
||||||
|
logger.debug(LTag.PUMP, "Command sent: ${event.command.commandType}")
|
||||||
|
podStateManager.activeCommand?.let {
|
||||||
|
if (it.sequence == event.command.sequenceNumber) {
|
||||||
|
it.sentRealtime = SystemClock.elapsedRealtime()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
podStateManager.increaseMessageSequenceNumber()
|
||||||
|
}
|
||||||
|
|
||||||
|
is PodEvent.CommandSendNotConfirmed -> {
|
||||||
|
podStateManager.activeCommand?.let {
|
||||||
|
if (it.sequence == event.command.sequenceNumber) {
|
||||||
|
it.sentRealtime = SystemClock.elapsedRealtime()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
podStateManager.increaseMessageSequenceNumber()
|
||||||
|
}
|
||||||
|
|
||||||
|
is PodEvent.ResponseReceived -> {
|
||||||
|
podStateManager.increaseMessageSequenceNumber()
|
||||||
|
handleResponse(event.response)
|
||||||
|
}
|
||||||
|
|
||||||
|
is PodEvent.Paired -> {
|
||||||
|
podStateManager.uniqueId = event.uniqueId.toLong()
|
||||||
|
}
|
||||||
|
|
||||||
|
else -> {
|
||||||
|
// Do nothing
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun handleResponse(response: Response) {
|
||||||
|
when (response) {
|
||||||
|
is VersionResponse -> {
|
||||||
|
podStateManager.updateFromVersionResponse(response)
|
||||||
|
}
|
||||||
|
|
||||||
|
is SetUniqueIdResponse -> {
|
||||||
|
podStateManager.updateFromSetUniqueIdResponse(response)
|
||||||
|
}
|
||||||
|
|
||||||
|
is DefaultStatusResponse -> {
|
||||||
|
podStateManager.updateFromDefaultStatusResponse(response)
|
||||||
|
}
|
||||||
|
|
||||||
|
is AlarmStatusResponse -> {
|
||||||
|
podStateManager.updateFromAlarmStatusResponse(response)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun Observable<PodEvent>.interceptPodEvents(): Observable<PodEvent> {
|
||||||
|
return this.doOnNext(PodEventInterceptor())
|
||||||
|
.doOnError(ErrorInterceptor())
|
||||||
|
.subscribeOn(aapsSchedulers.io)
|
||||||
|
}
|
||||||
|
|
||||||
|
inner class ErrorInterceptor : Consumer<Throwable> {
|
||||||
|
|
||||||
|
override fun accept(throwable: Throwable) {
|
||||||
|
logger.debug(LTag.PUMP, "Intercepted error in OmnipodDashManagerImpl: $throwable")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
inner class ActivationProgressUpdater(private val value: ActivationProgress) : Action {
|
||||||
|
|
||||||
|
override fun run() {
|
||||||
|
podStateManager.activationProgress = value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,59 @@
|
||||||
|
package info.nightscout.androidaps.plugins.pump.omnipod.dash.driver.comm
|
||||||
|
|
||||||
|
import info.nightscout.androidaps.extensions.toHex
|
||||||
|
import java.nio.ByteBuffer
|
||||||
|
|
||||||
|
data class Id(val address: ByteArray) {
|
||||||
|
init {
|
||||||
|
require(address.size == 4)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used to obtain podId from controllerId
|
||||||
|
* The original PDM seems to rotate over 3 Ids:
|
||||||
|
* controllerID+1, controllerID+2 and controllerID+3
|
||||||
|
*/
|
||||||
|
fun increment(): Id {
|
||||||
|
val nodeId = address.copyOf()
|
||||||
|
nodeId[3] = (nodeId[3].toInt() and -4).toByte()
|
||||||
|
nodeId[3] = (nodeId[3].toInt() or PERIPHERAL_NODE_INDEX).toByte()
|
||||||
|
return Id(nodeId)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun toString(): String {
|
||||||
|
val asInt = ByteBuffer.wrap(address).int
|
||||||
|
return "$asInt/${address.toHex()}"
|
||||||
|
}
|
||||||
|
|
||||||
|
fun toLong(): Long {
|
||||||
|
return ByteBuffer.wrap(address).int.toLong() and 0xffffffffL
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun equals(other: Any?): Boolean {
|
||||||
|
if (this === other) return true
|
||||||
|
if (javaClass != other?.javaClass) return false
|
||||||
|
|
||||||
|
other as Id
|
||||||
|
|
||||||
|
if (!address.contentEquals(other.address)) return false
|
||||||
|
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun hashCode(): Int {
|
||||||
|
return address.contentHashCode()
|
||||||
|
}
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
|
||||||
|
private const val PERIPHERAL_NODE_INDEX = 1
|
||||||
|
|
||||||
|
fun fromInt(v: Int): Id {
|
||||||
|
return Id(ByteBuffer.allocate(4).putInt(v).array())
|
||||||
|
}
|
||||||
|
|
||||||
|
fun fromLong(v: Long): Id {
|
||||||
|
return Id(ByteBuffer.allocate(8).putLong(v).array().copyOfRange(4, 8))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue