This commit is contained in:
Milos Kozak 2023-11-08 18:32:25 +01:00
commit 291c85f69c
32 changed files with 135 additions and 93 deletions

View file

@ -190,7 +190,7 @@ class UiInteractionImpl @Inject constructor(
rxBus.send(EventNewNotification(Notification(id, System.currentTimeMillis(), text, level, validTo))) rxBus.send(EventNewNotification(Notification(id, System.currentTimeMillis(), text, level, validTo)))
} }
override fun addNotificationWithAction(injector: HasAndroidInjector, nsAlarm: NSAlarm) { override fun addNotificationWithAction(nsAlarm: NSAlarm) {
rxBus.send(EventNewNotification(NotificationWithAction(injector, nsAlarm))) rxBus.send(EventNewNotification(NotificationWithAction(injector, nsAlarm)))
} }

View file

@ -8,7 +8,7 @@ buildscript {
mavenCentral() mavenCentral()
} }
dependencies { dependencies {
classpath("com.android.tools.build:gradle:8.1.2") classpath("com.android.tools.build:gradle:8.1.3")
classpath("com.google.gms:google-services:4.4.0") classpath("com.google.gms:google-services:4.4.0")
classpath("com.google.firebase:firebase-crashlytics-gradle:2.9.9") classpath("com.google.firebase:firebase-crashlytics-gradle:2.9.9")

View file

@ -1,6 +1,6 @@
object KtsBuildVersions { object KtsBuildVersions {
const val gradle = "8.1.2" const val gradle = "8.1.3"
const val kotlin = "1.9.0" const val kotlin = "1.9.0"
} }

View file

@ -2,7 +2,7 @@ import org.gradle.api.JavaVersion
object Versions { object Versions {
const val appVersion = "3.2.0.1-dev" const val appVersion = "3.2.0.1-dev-a"
const val versionCode = 1500 const val versionCode = 1500
const val ndkVersion = "21.1.6352462" const val ndkVersion = "21.1.6352462"

View file

@ -140,6 +140,7 @@ open class Notification {
const val BLUETOOTH_NOT_SUPPORTED = 86 const val BLUETOOTH_NOT_SUPPORTED = 86
const val PUMP_WARNING = 87 const val PUMP_WARNING = 87
const val PUMP_SYNC_ERROR = 88 const val PUMP_SYNC_ERROR = 88
const val SMB_FALLBACK = 89
const val USER_MESSAGE = 1000 const val USER_MESSAGE = 1000

View file

@ -5,7 +5,6 @@ import androidx.annotation.RawRes
import androidx.annotation.StringRes import androidx.annotation.StringRes
import androidx.fragment.app.FragmentManager import androidx.fragment.app.FragmentManager
import app.aaps.core.interfaces.nsclient.NSAlarm import app.aaps.core.interfaces.nsclient.NSAlarm
import dagger.android.HasAndroidInjector
/** /**
* Interface to use activities located in different modules * Interface to use activities located in different modules
@ -73,7 +72,7 @@ interface UiInteraction {
fun addNotificationValidFor(id: Int, text: String, level: Int, validMinutes: Int) fun addNotificationValidFor(id: Int, text: String, level: Int, validMinutes: Int)
fun addNotificationWithSound(id: Int, text: String, level: Int, @RawRes soundId: Int?) fun addNotificationWithSound(id: Int, text: String, level: Int, @RawRes soundId: Int?)
fun addNotificationValidTo(id: Int, date: Long, text: String, level: Int, validTo: Long) fun addNotificationValidTo(id: Int, date: Long, text: String, level: Int, validTo: Long)
fun addNotificationWithAction(injector: HasAndroidInjector, nsAlarm: NSAlarm) fun addNotificationWithAction(nsAlarm: NSAlarm)
fun addNotificationWithAction(id: Int, text: String, level: Int, buttonText: Int, action: Runnable, @RawRes soundId: Int? = null, date: Long = System.currentTimeMillis()) fun addNotificationWithAction(id: Int, text: String, level: Int, buttonText: Int, action: Runnable, @RawRes soundId: Int? = null, date: Long = System.currentTimeMillis())
fun showToastAndNotification(ctx: Context?, string: String?, @RawRes soundID: Int) fun showToastAndNotification(ctx: Context?, string: String?, @RawRes soundID: Int)

View file

@ -59,8 +59,8 @@
<string name="pref_show_ago">Vis tid siden</string> <string name="pref_show_ago">Vis tid siden</string>
<string name="pref_show_week_number">Vis ukenummer</string> <string name="pref_show_week_number">Vis ukenummer</string>
<string name="pref_show_date">Vis dato</string> <string name="pref_show_date">Vis dato</string>
<string name="default_custom_watchface_comment">Standard klokkebakgrunn, du kan klikke på EKSPORTER KLOKKEBAKGRUNN for å lage en mal</string> <string name="default_custom_watchface_comment">Standard urskive, du kan klikke på EKSPORTER MAL for å lage en mal</string>
<string name="wear_default_watchface">Standard klokkebakgrunn</string> <string name="wear_default_watchface">Standard urskive</string>
<string name="cwf_comment_background">Bakgrunnsbilde</string> <string name="cwf_comment_background">Bakgrunnsbilde</string>
<string name="cwf_comment_chart">Grafer (BS, basal, prediksjonslinjer...)</string> <string name="cwf_comment_chart">Grafer (BS, basal, prediksjonslinjer...)</string>
<string name="cwf_comment_cover_chart">Bilde foran grafer og bak tekstfelter</string> <string name="cwf_comment_cover_chart">Bilde foran grafer og bak tekstfelter</string>

View file

@ -462,6 +462,7 @@
<string name="bolus_recorded_only">Bolusas bus tik įrašytas (nebus suleistas)</string> <string name="bolus_recorded_only">Bolusas bus tik įrašytas (nebus suleistas)</string>
<string name="advisoralarm">Pranešti apie laiką valgyti</string> <string name="advisoralarm">Pranešti apie laiką valgyti</string>
<string name="no_action_selected">Veiksmas nepasirinktas, nieko neįvyks</string> <string name="no_action_selected">Veiksmas nepasirinktas, nieko neįvyks</string>
<string name="wizard_no_insulin_required">Insulino nereikia!</string>
<string name="wizard_no_actual_bg">Nėra naujausių cukraus duomenų, kuriais būtų galima pagrįsti skaičiavimus!</string> <string name="wizard_no_actual_bg">Nėra naujausių cukraus duomenų, kuriais būtų galima pagrįsti skaičiavimus!</string>
<string name="wizard_no_active_profile">Neparinktas aktyvus profilis!</string> <string name="wizard_no_active_profile">Neparinktas aktyvus profilis!</string>
<string name="wizard_no_cob">Nežinomi AAO! Nėra glikemijos duomenų arba programa paleista iš naujo?</string> <string name="wizard_no_cob">Nežinomi AAO! Nėra glikemijos duomenų arba programa paleista iš naujo?</string>

View file

@ -225,7 +225,7 @@
<string name="pump_battery_change">Bytte pumpebatteri</string> <string name="pump_battery_change">Bytte pumpebatteri</string>
<string name="temporary_target">Midlertidig mål</string> <string name="temporary_target">Midlertidig mål</string>
<string name="careportal_temporarytargetvalue">Midlertidig målverdi</string> <string name="careportal_temporarytargetvalue">Midlertidig målverdi</string>
<string name="careportal_temporarytargetcancel">Avbryt midl. mål</string> <string name="careportal_temporarytargetcancel">Avbryt midlertidig mål</string>
<string name="boluswizard">Boluskalkulator</string> <string name="boluswizard">Boluskalkulator</string>
<string name="glucosetype_finger">Finger</string> <string name="glucosetype_finger">Finger</string>
<string name="glucosetype_sensor">Sensor</string> <string name="glucosetype_sensor">Sensor</string>
@ -275,7 +275,7 @@
<string name="uel_carbs">KARBO</string> <string name="uel_carbs">KARBO</string>
<string name="uel_extended_carbs">FORLENGET KARBO</string> <string name="uel_extended_carbs">FORLENGET KARBO</string>
<string name="uel_temp_basal">MIDL. BASAL</string> <string name="uel_temp_basal">MIDL. BASAL</string>
<string name="uel_tt">MIDL. MÅL</string> <string name="uel_tt">MIDLERTIDIG MÅL</string>
<string name="uel_new_profile">NY PROFIL</string> <string name="uel_new_profile">NY PROFIL</string>
<string name="uel_clone_profile">KOPIER PROFIL</string> <string name="uel_clone_profile">KOPIER PROFIL</string>
<string name="uel_store_profile">LAGRE PROFIL</string> <string name="uel_store_profile">LAGRE PROFIL</string>
@ -296,7 +296,7 @@
<string name="uel_cancel_temp_basal">AVBRYT MIDL. BASAL</string> <string name="uel_cancel_temp_basal">AVBRYT MIDL. BASAL</string>
<string name="uel_cancel_bolus">AVBRYT BOLUS</string> <string name="uel_cancel_bolus">AVBRYT BOLUS</string>
<string name="uel_cancel_extended_bolus">AVBRYT FORLENGET BOLUS</string> <string name="uel_cancel_extended_bolus">AVBRYT FORLENGET BOLUS</string>
<string name="uel_cancel_tt">AVBRYT MIDL. MÅL</string> <string name="uel_cancel_tt">AVBRYT MIDLERTIDIG MÅL</string>
<string name="uel_careportal">HELSEPORTAL</string> <string name="uel_careportal">HELSEPORTAL</string>
<string name="uel_site_change">BYTTE SLANGESETT</string> <string name="uel_site_change">BYTTE SLANGESETT</string>
<string name="uel_reservoir_change">BYTTE RESERVOAR</string> <string name="uel_reservoir_change">BYTTE RESERVOAR</string>
@ -306,13 +306,13 @@
<string name="uel_careportal_ns_refresh">HELSEPORTAL NS-OPPDATERING</string> <string name="uel_careportal_ns_refresh">HELSEPORTAL NS-OPPDATERING</string>
<string name="uel_profile_switch_ns_refresh">PROFILBYTTE NS OPPDATERING</string> <string name="uel_profile_switch_ns_refresh">PROFILBYTTE NS OPPDATERING</string>
<string name="uel_treatments_ns_refresh">BEHANDLINGER NS OPPDATERING</string> <string name="uel_treatments_ns_refresh">BEHANDLINGER NS OPPDATERING</string>
<string name="uel_tt_ns_refresh">OPPDATER MIDL. MÅL NS</string> <string name="uel_tt_ns_refresh">OPPDATER MIDLERTIDIG MÅL NS</string>
<string name="uel_automation_removed">AUTOMASJON FJERNET</string> <string name="uel_automation_removed">AUTOMASJON FJERNET</string>
<string name="uel_bg_removed">BS FJERNET</string> <string name="uel_bg_removed">BS FJERNET</string>
<string name="uel_careportal_removed">HELSEPORTAL FJERNET</string> <string name="uel_careportal_removed">HELSEPORTAL FJERNET</string>
<string name="uel_bolus_removed">BOLUS FJERNET</string> <string name="uel_bolus_removed">BOLUS FJERNET</string>
<string name="uel_carbs_removed">KARBO FJERNET</string> <string name="uel_carbs_removed">KARBO FJERNET</string>
<string name="uel_temp_basal_removed">MIDL. MÅL FJERNET</string> <string name="uel_temp_basal_removed">MIDLERTIDIG MÅL FJERNET</string>
<string name="uel_extended_bolus_removed">FORLENGET BOLUS FJERNET</string> <string name="uel_extended_bolus_removed">FORLENGET BOLUS FJERNET</string>
<string name="uel_food">MAT</string> <string name="uel_food">MAT</string>
<string name="uel_food_removed">MÅLTID FJERNET</string> <string name="uel_food_removed">MÅLTID FJERNET</string>
@ -320,7 +320,7 @@
<string name="uel_profile_switch_removed">PROFILBYTTE FJERNET</string> <string name="uel_profile_switch_removed">PROFILBYTTE FJERNET</string>
<string name="uel_restart_events_removed">RESTART HENDELSER FJERNET</string> <string name="uel_restart_events_removed">RESTART HENDELSER FJERNET</string>
<string name="uel_treatment_removed">BEHANDLING FJERNET</string> <string name="uel_treatment_removed">BEHANDLING FJERNET</string>
<string name="uel_tt_removed">MIDL. MÅL FJERNET</string> <string name="uel_tt_removed">MIDLERTIDIG MÅL FJERNET</string>
<string name="uel_ns_paused">NS PAUSET</string> <string name="uel_ns_paused">NS PAUSET</string>
<string name="uel_ns_resume">GJENOPPTA NS</string> <string name="uel_ns_resume">GJENOPPTA NS</string>
<string name="uel_ns_queue_cleared">NS KØ SLETTET</string> <string name="uel_ns_queue_cleared">NS KØ SLETTET</string>
@ -362,9 +362,9 @@
<!-- HardLimits --> <!-- HardLimits -->
<string name="profile_low_target">Profil lavt mål</string> <string name="profile_low_target">Profil lavt mål</string>
<string name="profile_high_target">Profil høyt mål</string> <string name="profile_high_target">Profil høyt mål</string>
<string name="temp_target_low_target">Nedre grense for midl. mål</string> <string name="temp_target_low_target">Nedre grense for midlertidig mål</string>
<string name="temp_target_high_target">Øvre grense for midl. mål</string> <string name="temp_target_high_target">Øvre grense for midlertidig mål</string>
<string name="temp_target_value">Midl. målverdi</string> <string name="temp_target_value">Midlertidig målverdi</string>
<string name="profile_dia">Profil DIA verdi</string> <string name="profile_dia">Profil DIA verdi</string>
<string name="profile_sensitivity_value">Profilens insulinfølsomhet</string> <string name="profile_sensitivity_value">Profilens insulinfølsomhet</string>
<string name="profile_max_daily_basal_value">Maksimal profil basalverdi</string> <string name="profile_max_daily_basal_value">Maksimal profil basalverdi</string>
@ -480,7 +480,7 @@
<string name="wizard_explain_trend">15\' trend: %1$.2fE</string> <string name="wizard_explain_trend">15\' trend: %1$.2fE</string>
<string name="wizard_explain_percent">Prosent: %1$.2fE x %2$d%% ≈ %3$.2fE</string> <string name="wizard_explain_percent">Prosent: %1$.2fE x %2$d%% ≈ %3$.2fE</string>
<string name="wizard_constraint_bolus_size">Insulinbegrensning nådd!\nKan ikke levere %1$.2fE</string> <string name="wizard_constraint_bolus_size">Insulinbegrensning nådd!\nKan ikke levere %1$.2fE</string>
<string name="wizard_explain_tt">TempT: %1$s</string> <string name="wizard_explain_tt">Midl. mål: %1$s</string>
<string name="wizard_explain_tt_to">%1$s til %2$s</string> <string name="wizard_explain_tt_to">%1$s til %2$s</string>
<string name="wizard_pump_not_available">Ingen pumpe tilgjengelig!</string> <string name="wizard_pump_not_available">Ingen pumpe tilgjengelig!</string>
<string name="quickwizard">Hurtigknapp</string> <string name="quickwizard">Hurtigknapp</string>

View file

@ -58,7 +58,7 @@ open class OpenAPSSMBPlugin @Inject constructor(
private val hardLimits: HardLimits, private val hardLimits: HardLimits,
private val profiler: Profiler, private val profiler: Profiler,
private val sp: SP, private val sp: SP,
private val dateUtil: DateUtil, protected val dateUtil: DateUtil,
private val repository: AppRepository, private val repository: AppRepository,
private val glucoseStatusProvider: GlucoseStatusProvider, private val glucoseStatusProvider: GlucoseStatusProvider,
private val bgQualityCheck: BgQualityCheck, private val bgQualityCheck: BgQualityCheck,

View file

@ -6,9 +6,11 @@ import app.aaps.core.interfaces.aps.DetermineBasalAdapter
import app.aaps.core.interfaces.bgQualityCheck.BgQualityCheck import app.aaps.core.interfaces.bgQualityCheck.BgQualityCheck
import app.aaps.core.interfaces.constraints.Constraint import app.aaps.core.interfaces.constraints.Constraint
import app.aaps.core.interfaces.constraints.ConstraintsChecker import app.aaps.core.interfaces.constraints.ConstraintsChecker
import app.aaps.core.interfaces.constraints.Objectives
import app.aaps.core.interfaces.iob.GlucoseStatusProvider import app.aaps.core.interfaces.iob.GlucoseStatusProvider
import app.aaps.core.interfaces.iob.IobCobCalculator import app.aaps.core.interfaces.iob.IobCobCalculator
import app.aaps.core.interfaces.logging.AAPSLogger import app.aaps.core.interfaces.logging.AAPSLogger
import app.aaps.core.interfaces.notifications.Notification
import app.aaps.core.interfaces.plugin.ActivePlugin import app.aaps.core.interfaces.plugin.ActivePlugin
import app.aaps.core.interfaces.profile.ProfileFunction import app.aaps.core.interfaces.profile.ProfileFunction
import app.aaps.core.interfaces.profiling.Profiler import app.aaps.core.interfaces.profiling.Profiler
@ -16,8 +18,10 @@ import app.aaps.core.interfaces.resources.ResourceHelper
import app.aaps.core.interfaces.rx.bus.RxBus import app.aaps.core.interfaces.rx.bus.RxBus
import app.aaps.core.interfaces.sharedPreferences.SP import app.aaps.core.interfaces.sharedPreferences.SP
import app.aaps.core.interfaces.stats.TddCalculator import app.aaps.core.interfaces.stats.TddCalculator
import app.aaps.core.interfaces.ui.UiInteraction
import app.aaps.core.interfaces.utils.DateUtil import app.aaps.core.interfaces.utils.DateUtil
import app.aaps.core.interfaces.utils.HardLimits import app.aaps.core.interfaces.utils.HardLimits
import app.aaps.core.interfaces.utils.T
import app.aaps.database.impl.AppRepository import app.aaps.database.impl.AppRepository
import app.aaps.plugins.aps.R import app.aaps.plugins.aps.R
import app.aaps.plugins.aps.openAPSSMB.DetermineBasalAdapterSMBJS import app.aaps.plugins.aps.openAPSSMB.DetermineBasalAdapterSMBJS
@ -46,7 +50,9 @@ class OpenAPSSMBDynamicISFPlugin @Inject constructor(
repository: AppRepository, repository: AppRepository,
glucoseStatusProvider: GlucoseStatusProvider, glucoseStatusProvider: GlucoseStatusProvider,
bgQualityCheck: BgQualityCheck, bgQualityCheck: BgQualityCheck,
tddCalculator: TddCalculator tddCalculator: TddCalculator,
private val uiInteraction: UiInteraction,
private val objectives: Objectives
) : OpenAPSSMBPlugin( ) : OpenAPSSMBPlugin(
injector, injector,
aapsLogger, aapsLogger,
@ -76,11 +82,21 @@ class OpenAPSSMBDynamicISFPlugin @Inject constructor(
.setDefault(false) .setDefault(false)
} }
override fun specialEnableCondition(): Boolean =
objectives.isStarted(Objectives.DYN_ISF_OBJECTIVE)
// If there is no TDD data fallback to SMB as ISF calculation may be really off // If there is no TDD data fallback to SMB as ISF calculation may be really off
override fun provideDetermineBasalAdapter(): DetermineBasalAdapter = override fun provideDetermineBasalAdapter(): DetermineBasalAdapter =
if (tdd1D == null || tdd7D == null || tddLast4H == null || tddLast8to4H == null || tddLast24H == null || !dynIsfEnabled.value()) if (tdd1D == null || tdd7D == null || tddLast4H == null || tddLast8to4H == null || tddLast24H == null || !dynIsfEnabled.value()) {
uiInteraction.addNotificationValidTo(
Notification.SMB_FALLBACK, dateUtil.now(),
rh.gs(R.string.fallback_smb_no_tdd), Notification.INFO, dateUtil.now() + T.mins(1).msecs()
)
DetermineBasalAdapterSMBJS(ScriptReader(context), injector) DetermineBasalAdapterSMBJS(ScriptReader(context), injector)
else DetermineBasalAdapterSMBDynamicISFJS(ScriptReader(context), injector) } else {
uiInteraction.dismissNotification(Notification.SMB_FALLBACK)
DetermineBasalAdapterSMBDynamicISFJS(ScriptReader(context), injector)
}
override fun isAutosensModeEnabled(value: Constraint<Boolean>): Constraint<Boolean> { override fun isAutosensModeEnabled(value: Constraint<Boolean>): Constraint<Boolean> {
value.set(false, rh.gs(R.string.autosens_disabled_in_dyn_isf), this) value.set(false, rh.gs(R.string.autosens_disabled_in_dyn_isf), this)

View file

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<string name="dynisf_adjust_sensitivity">Juster sensitivitet og basal</string> <string name="dynisf_adjust_sensitivity">Juster sensitivitet ved hjelp av TDD</string>
<string name="dynisf_adjust_sensitivity_summary">Hvis aktivert bruker DynISF de siste 24t TDD/7D TDD som grunnlag for justering av kalkulert ISF og også for økning og reduksjon av basaldose, på samme måte som standard Autosens gjør</string> <string name="dynisf_adjust_sensitivity_summary">Benytter de siste 24t TDD/7D TDD til å beregne sensitivitet som grunnlag til å øke eller redusere basaldose og i tillegg justere blodsukkermål hvis valgene for dette er aktivert, på samme måte som Autosens gjør. Anbefalt å starte med dette valget slått av</string>
<string name="DynISFAdjust_title" formatted="false">Dynamisk ISF justeringsfaktor %</string> <string name="DynISFAdjust_title" formatted="false">Dynamisk ISF justeringsfaktor %</string>
<string name="DynISFAdjust_summary" formatted="false">Justeringsfaktor for dynamisk ISF. Verdier over 100% vil gi mer aggressive korreksjonsdoser, mens verdier under 100% vil gi mildere korreksjonsdoser.</string> <string name="DynISFAdjust_summary" formatted="false">Justeringsfaktor for dynamisk ISF. Verdier over 100% vil gi mer aggressive korreksjonsdoser, mens verdier under 100% vil gi mildere korreksjonsdoser.</string>
<string name="high_temptarget_raises_sensitivity_title">Høyt midl. mål øker sensitiviteten</string> <string name="high_temptarget_raises_sensitivity_title">Høyt midlertidig mål øker sensitiviteten</string>
<string name="high_temptarget_raises_sensitivity_summary"><![CDATA[Øk sensitiviteten for midl. mål >= 100]]></string> <string name="high_temptarget_raises_sensitivity_summary"><![CDATA[Øk sensitiviteten for midlertidig mål >= 5,6]]></string>
<string name="low_temptarget_lowers_sensitivity_title">Lavt midl. mål reduserer sensitiviteten</string> <string name="low_temptarget_lowers_sensitivity_title">Lavt midlertidig mål reduserer sensitiviteten</string>
<string name="low_temptarget_lowers_sensitivity_summary"><![CDATA[Reduser sensitiviteten for midl. mål < 100]]></string> <string name="low_temptarget_lowers_sensitivity_summary"><![CDATA[Reduser sensitiviteten for midlertidig mål < 5,6]]></string>
<string name="openapssmb">OpenAPS SMB</string> <string name="openapssmb">OpenAPS SMB</string>
<string name="openaps_smb_dynamic_isf">Dynamisk ISF</string> <string name="openaps_smb_dynamic_isf">Dynamisk ISF</string>
<string name="smb_interval_summary">Minste antall minutter mellom hver SMB</string> <string name="smb_interval_summary">Minste antall minutter mellom hver SMB</string>
@ -64,16 +64,16 @@
<string name="enable_smb_always">Aktiver SMB alltid</string> <string name="enable_smb_always">Aktiver SMB alltid</string>
<string name="enable_smb_always_summary">Aktiver SMB alltid uavhengig av boluser. Bare mulig med en bra filtrert BS kilde som f.eks. Dexcom G5/G6</string> <string name="enable_smb_always_summary">Aktiver SMB alltid uavhengig av boluser. Bare mulig med en bra filtrert BS kilde som f.eks. Dexcom G5/G6</string>
<string name="enable_smb_after_carbs">Aktiver SMB etter karbohydrater</string> <string name="enable_smb_after_carbs">Aktiver SMB etter karbohydrater</string>
<string name="enable_smb_after_carbs_summary">Aktiver SMB i 6t etter karbohydratinntak, selv med 0 COB. Bare mulig med en bra filtrert BS kilde som f. eks. Dexcom G5/G6</string> <string name="enable_smb_after_carbs_summary">Aktiver SMB i 6 timer etter inntak av karbohydrater, selv med 0 COB (Karbo ombord). Bare mulig med en bra filtrert BS-kilde som f. eks. Dexcom G5/G6</string>
<string name="enable_smb_with_cob">Aktiver SMB med COB</string> <string name="enable_smb_with_cob">Aktiver SMB med COB</string>
<string name="enable_smb_with_cob_summary">Aktiver SMB når COB (karbohydrater ombord) er aktiv.</string> <string name="enable_smb_with_cob_summary">Aktiver SMB når COB (karbohydrater ombord) er aktiv.</string>
<string name="enable_smb_with_temp_target">Aktiver SMB med midlertidig målverdi</string> <string name="enable_smb_with_temp_target">Aktiver SMB med midlertidig målverdi</string>
<string name="enable_smb_with_temp_target_summary">Aktiver SMB når midlertidig målverdi er aktivert (spise snart, aktivitet)</string> <string name="enable_smb_with_temp_target_summary">Aktiver SMB når midlertidig målverdi er aktivert (spise snart, aktivitet)</string>
<string name="enable_smb_with_high_temp_target">Aktiver SMB ved høy midl. målverdi</string> <string name="enable_smb_with_high_temp_target">Aktiver SMB ved høy midlertidig målverdi</string>
<string name="enable_smb_with_high_temp_target_summary">Aktiver SMB når det er en høy aktiv midlertidig målverdi (trening, over 100 mg/dl eller 5,5 mmol/l)</string> <string name="enable_smb_with_high_temp_target_summary">Aktiver SMB når det er en høy aktiv midlertidig målverdi (trening, over 100 mg/dl eller 5,5 mmol/l)</string>
<string name="smb_max_minutes_summary">Maks antall minutter med basal som kan bli SMB</string> <string name="smb_max_minutes_summary">Maks antall minutter med basal som kan bli SMB</string>
<string name="uam_smb_max_minutes">UAM SMB maks minutter</string> <string name="uam_smb_max_minutes">UAM SMB maks minutter</string>
<string name="uam_smb_max_minutes_summary">Maks antall minutter basal som kan bli SMB ved UAM</string> <string name="uam_smb_max_minutes_summary">Maks antall minutter med basal som kan bli SMB ved UAM</string>
<string name="carbs_req_threshold">Minimumsgrense for KH-forslag</string> <string name="carbs_req_threshold">Minimumsgrense for KH-forslag</string>
<string name="carbs_req_threshold_summary">Minste KH-mengde i gram som kreves for å vise varsel. Karbohydrater under denne mengden vil ikke utløse et varsel.</string> <string name="carbs_req_threshold_summary">Minste KH-mengde i gram som kreves for å vise varsel. Karbohydrater under denne mengden vil ikke utløse et varsel.</string>
<string name="lgs_threshold_summary">Terskelverdi for BS hvor all insulintilførsel stoppes. Bruker kan definere verdier mellom 3.3mmol/l (60mg/dl) og 5.5mmol/l (100mg/dl). Verdier under 3.6/65 bruker standardmodell</string> <string name="lgs_threshold_summary">Terskelverdi for BS hvor all insulintilførsel stoppes. Bruker kan definere verdier mellom 3.3mmol/l (60mg/dl) og 5.5mmol/l (100mg/dl). Verdier under 3.6/65 bruker standardmodell</string>

View file

@ -23,8 +23,8 @@
<string name="key_DynISFAdjust" translatable="false">DynISFAdjust</string> <string name="key_DynISFAdjust" translatable="false">DynISFAdjust</string>
<string name="key_adjust_sensitivity" translatable="false">dynisf_adjust_sensitivity</string> <string name="key_adjust_sensitivity" translatable="false">dynisf_adjust_sensitivity</string>
<string name="dynisf_adjust_sensitivity">Adjust sensitivity and basal</string> <string name="dynisf_adjust_sensitivity">Enable TDD based sensitivity ratio for basal and glucose target modification</string>
<string name="dynisf_adjust_sensitivity_summary">If activated DynISF uses the last 24h TDD/7D TDD as the basis for adjusting calculated ISF and also for increasing and decreasing basal rate, in the same way that standard Autosens does</string> <string name="dynisf_adjust_sensitivity_summary">Uses the last 24h TDD/7D TDD to calculate sensitivity ratio used for increasing or decreasing basal rate, and also adjust glucose target if these options are enabled, in the same way Autosens does. It is recommended to start with this option turned off</string>
<string name="DynISFAdjust_title" formatted="false">DynamicISF Adjustment Factor %</string> <string name="DynISFAdjust_title" formatted="false">DynamicISF Adjustment Factor %</string>
<string name="DynISFAdjust_summary" formatted="false">Adjustment factor for DynamicISF. Set more than 100% for more aggressive correction doses, and less than 100% for less aggressive corrections.</string> <string name="DynISFAdjust_summary" formatted="false">Adjustment factor for DynamicISF. Set more than 100% for more aggressive correction doses, and less than 100% for less aggressive corrections.</string>
<string name="high_temptarget_raises_sensitivity_title">High temptarget raises sensitivity</string> <string name="high_temptarget_raises_sensitivity_title">High temptarget raises sensitivity</string>

View file

@ -55,6 +55,20 @@
android:summary="@string/dynisf_adjust_sensitivity_summary" android:summary="@string/dynisf_adjust_sensitivity_summary"
android:title="@string/dynisf_adjust_sensitivity" /> android:title="@string/dynisf_adjust_sensitivity" />
<SwitchPreference
android:defaultValue="true"
android:dependency="@string/key_adjust_sensitivity"
android:key="@string/key_sensitivity_raises_target"
android:summary="@string/sensitivity_raises_target_summary"
android:title="@string/sensitivity_raises_target_title" />
<SwitchPreference
android:defaultValue="false"
android:dependency="@string/key_adjust_sensitivity"
android:key="@string/key_resistance_lowers_target"
android:summary="@string/resistance_lowers_target_summary"
android:title="@string/resistance_lowers_target_title" />
<SwitchPreference <SwitchPreference
android:defaultValue="false" android:defaultValue="false"
android:key="@string/key_use_smb" android:key="@string/key_use_smb"
@ -141,16 +155,6 @@
android:summary="@string/enable_uam_summary" android:summary="@string/enable_uam_summary"
android:title="@string/enable_uam" /> android:title="@string/enable_uam" />
<SwitchPreference
android:defaultValue="true"
android:key="@string/key_sensitivity_raises_target"
android:summary="@string/sensitivity_raises_target_summary"
android:title="@string/sensitivity_raises_target_title" />
<SwitchPreference
android:defaultValue="false"
android:key="@string/key_resistance_lowers_target"
android:summary="@string/resistance_lowers_target_summary"
android:title="@string/resistance_lowers_target_title" />
<!-- TODO AS-FIX --> <!-- TODO AS-FIX -->
<!--<SwitchPreference <!--<SwitchPreference
android:defaultValue="false" android:defaultValue="false"

View file

@ -38,8 +38,8 @@
<string name="glucosecomparedmgdl">BS %1$s %2$.0f %3$s</string> <string name="glucosecomparedmgdl">BS %1$s %2$.0f %3$s</string>
<string name="glucosecomparedmmol">BS %1$s %2$.1f %3$s</string> <string name="glucosecomparedmmol">BS %1$s %2$.1f %3$s</string>
<string name="notemptarget">Midlertidig mål finnes ikke</string> <string name="notemptarget">Midlertidig mål finnes ikke</string>
<string name="temptargetcomparedmgdl">Midl. mål %1$s %2$.0f %3$s</string> <string name="temptargetcomparedmgdl">Midlertidig mål %1$s %2$.0f %3$s</string>
<string name="temptargetcomparedmmol">Midl. mål %1$s %2$.1f %3$s</string> <string name="temptargetcomparedmmol">Midlertidig mål %1$s %2$.1f %3$s</string>
<string name="percentagecompared">Profilprosent %1$s %2$d</string> <string name="percentagecompared">Profilprosent %1$s %2$d</string>
<string name="iobcompared">IOB %1$s %2$.1f</string> <string name="iobcompared">IOB %1$s %2$.1f</string>
<string name="or">Eller</string> <string name="or">Eller</string>
@ -66,7 +66,7 @@
<string name="delete_short">SLETT</string> <string name="delete_short">SLETT</string>
<string name="add_short">LEGG TIL</string> <string name="add_short">LEGG TIL</string>
<string name="copy_short">KOPIER</string> <string name="copy_short">KOPIER</string>
<string name="temptargetcompared">Midl. mål %1$s</string> <string name="temptargetcompared">Midlertidig mål %1$s</string>
<string name="btdevicecompared">Bluetoothtilkobling til enheten %1$s %2$s</string> <string name="btdevicecompared">Bluetoothtilkobling til enheten %1$s %2$s</string>
<string name="btdevice">Tilkobling til Bluetoothenhet </string> <string name="btdevice">Tilkobling til Bluetoothenhet </string>
<string name="wifissidcompared">WiFi SSID %1$s %2$s</string> <string name="wifissidcompared">WiFi SSID %1$s %2$s</string>

View file

@ -2,11 +2,13 @@ package app.aaps.plugins.constraints.di
import app.aaps.core.interfaces.bgQualityCheck.BgQualityCheck import app.aaps.core.interfaces.bgQualityCheck.BgQualityCheck
import app.aaps.core.interfaces.constraints.ConstraintsChecker import app.aaps.core.interfaces.constraints.ConstraintsChecker
import app.aaps.core.interfaces.constraints.Objectives
import app.aaps.core.interfaces.versionChecker.VersionCheckerUtils import app.aaps.core.interfaces.versionChecker.VersionCheckerUtils
import dagger.Binds import dagger.Binds
import dagger.Module import dagger.Module
import app.aaps.plugins.constraints.ConstraintsCheckerImpl import app.aaps.plugins.constraints.ConstraintsCheckerImpl
import app.aaps.plugins.constraints.bgQualityCheck.BgQualityCheckPlugin import app.aaps.plugins.constraints.bgQualityCheck.BgQualityCheckPlugin
import app.aaps.plugins.constraints.objectives.ObjectivesPlugin
import app.aaps.plugins.constraints.versionChecker.VersionCheckerUtilsImpl import app.aaps.plugins.constraints.versionChecker.VersionCheckerUtilsImpl
@Module( @Module(
@ -25,5 +27,6 @@ abstract class PluginsConstraintsModule {
@Binds fun bindVersionCheckerUtils(versionCheckerUtils: VersionCheckerUtilsImpl): VersionCheckerUtils @Binds fun bindVersionCheckerUtils(versionCheckerUtils: VersionCheckerUtilsImpl): VersionCheckerUtils
@Binds fun bindBgQualityCheck(bgQualityCheck: BgQualityCheckPlugin): BgQualityCheck @Binds fun bindBgQualityCheck(bgQualityCheck: BgQualityCheckPlugin): BgQualityCheck
@Binds fun bindsConstraintChecker(constraintsCheckerImpl: ConstraintsCheckerImpl): ConstraintsChecker @Binds fun bindsConstraintChecker(constraintsCheckerImpl: ConstraintsCheckerImpl): ConstraintsChecker
@Binds fun bindsObjectives(objectivesPlugin: ObjectivesPlugin): Objectives
} }
} }

View file

@ -58,11 +58,9 @@ class ObjectivesPlugin @Inject constructor(
var objectives: MutableList<Objective> = ArrayList() var objectives: MutableList<Objective> = ArrayList()
public override fun onStart() { init {
super.onStart()
setupObjectives() setupObjectives()
} }
override fun specialEnableCondition(): Boolean = override fun specialEnableCondition(): Boolean =
activePlugin.activePump.pumpDescription.isTempBasalCapable activePlugin.activePump.pumpDescription.isTempBasalCapable

View file

@ -52,7 +52,7 @@
<string name="exerciseprofile_leaveat100">La profilen være på 100%.</string> <string name="exerciseprofile_leaveat100">La profilen være på 100%.</string>
<string name="exerciseprofile_suspendloop">Pause loop.</string> <string name="exerciseprofile_suspendloop">Pause loop.</string>
<string name="exerciseprofile_hint1">https://wiki.aaps.app/en/latest/Usage/temptarget.html#activity-temp-target</string> <string name="exerciseprofile_hint1">https://wiki.aaps.app/en/latest/Usage/temptarget.html#activity-temp-target</string>
<string name="exercise_label">Trening og midlertidige målverdier (temp targets)</string> <string name="exercise_label">Trening og midlertidige målverdier</string>
<string name="exercise_whattodo">Hvordan kan du bruke midlertidige målverdier til å hjelpe systemet å håndtere aerobic trening?</string> <string name="exercise_whattodo">Hvordan kan du bruke midlertidige målverdier til å hjelpe systemet å håndtere aerobic trening?</string>
<string name="exercise_settt">Sett et midlertidig mål for blodsukkeret som starter en passende tid før treningen begynner.</string> <string name="exercise_settt">Sett et midlertidig mål for blodsukkeret som starter en passende tid før treningen begynner.</string>
<string name="exercise_setfinished">Angi et midlertidig mål for Aktivitet etter at du har avsluttet treningen.</string> <string name="exercise_setfinished">Angi et midlertidig mål for Aktivitet etter at du har avsluttet treningen.</string>

View file

@ -38,7 +38,7 @@
<string name="accomplished">Utført: %1$s</string> <string name="accomplished">Utført: %1$s</string>
<string name="objectives_usage_objective">Lær hvordan du kontrollerer AAPS</string> <string name="objectives_usage_objective">Lær hvordan du kontrollerer AAPS</string>
<string name="objectives_usage_gate">Utfør forskjellige handlinger i AAPS</string> <string name="objectives_usage_gate">Utfør forskjellige handlinger i AAPS</string>
<string name="objectives_usage_learned">Du har lært hvordan du skal håndtere grunnleggende AAPS. Hovedkontrollene er på oversiktsskjermen som er tilgjengelig ved klikk eller lang-klikk, og flere kontroller er på Aksjon skjermen. Du bør vite hvordan du legger inn en skjermen til en plugin på menylinjen i toppen eller lar den vises i liste over aktiverte programtillegg øverst til venstre.</string> <string name="objectives_usage_learned">Du har lært hvordan du skal håndtere det grunnleggende ved AAPS. Hovedkontrollene er på oversikt-skjermen som er tilgjengelig ved klikk eller lang-klikk, og flere kontroller er på handlinger-skjermen. Du bør vite hvordan du legger inn skjermen til en plugin på menylinjen i toppen eller lar den vises i liste over aktiverte plugins øverst til venstre ved å trykke på hamburgermeny.</string>
<string name="objectives_useprofileswitch">Angi profil 90% for 10 min (langt-trykk på profilnavn i Oversikt)</string> <string name="objectives_useprofileswitch">Angi profil 90% for 10 min (langt-trykk på profilnavn i Oversikt)</string>
<string name="objectives_usedisconnectpump">Simuler dusjing. Frakoble pumpen i 1t (langt trykk på Åpen Loop)</string> <string name="objectives_usedisconnectpump">Simuler dusjing. Frakoble pumpen i 1t (langt trykk på Åpen Loop)</string>
<string name="objectives_usereconnectpump">... og koble til igjen på samme måte</string> <string name="objectives_usereconnectpump">... og koble til igjen på samme måte</string>

View file

@ -138,6 +138,7 @@ class ConstraintsCheckerImplTest : TestBaseWithProfile() {
insightDbHelper = InsightDbHelper(insightDatabaseDao) insightDbHelper = InsightDbHelper(insightDatabaseDao)
danaPump = DanaPump(aapsLogger, sp, dateUtil, instantiator, decimalFormatter) danaPump = DanaPump(aapsLogger, sp, dateUtil, instantiator, decimalFormatter)
objectivesPlugin = ObjectivesPlugin(injector, aapsLogger, rh, activePlugin, sp, config) objectivesPlugin = ObjectivesPlugin(injector, aapsLogger, rh, activePlugin, sp, config)
objectivesPlugin.onStart()
comboPlugin = ComboPlugin(injector, aapsLogger, rxBus, rh, profileFunction, sp, commandQueue, pumpSync, dateUtil, ruffyScripter, uiInteraction) comboPlugin = ComboPlugin(injector, aapsLogger, rxBus, rh, profileFunction, sp, commandQueue, pumpSync, dateUtil, ruffyScripter, uiInteraction)
danaRPlugin = DanaRPlugin( danaRPlugin = DanaRPlugin(
injector, aapsLogger, aapsSchedulers, rxBus, context, rh, constraintChecker, activePlugin, sp, commandQueue, danaPump, dateUtil, fabricPrivacy, pumpSync, injector, aapsLogger, aapsSchedulers, rxBus, context, rh, constraintChecker, activePlugin, sp, commandQueue, danaPump, dateUtil, fabricPrivacy, pumpSync,
@ -188,7 +189,9 @@ class ConstraintsCheckerImplTest : TestBaseWithProfile() {
repository, repository,
glucoseStatusProvider, glucoseStatusProvider,
bgQualityCheck, bgQualityCheck,
tddCalculator tddCalculator,
uiInteraction,
objectivesPlugin
) )
openAPSAMAPlugin = openAPSAMAPlugin =
OpenAPSAMAPlugin( OpenAPSAMAPlugin(

View file

@ -282,7 +282,7 @@
<string name="buttonson_description">Mygtukai visada rodomi ekrano apačioje</string> <string name="buttonson_description">Mygtukai visada rodomi ekrano apačioje</string>
<string name="largedisplay_description">Didelis ekranas</string> <string name="largedisplay_description">Didelis ekranas</string>
<string name="skin">Išvaizda</string> <string name="skin">Išvaizda</string>
<string name="cannula_usage">naudojimas:</string> <string name="cannula_usage">naud:</string>
<!-- Iob--> <!-- Iob-->
<string name="send_logfiles">Siųsti šios dienos žurnalo įrašus kūrėjams dabar. Netikėta situacija.</string> <string name="send_logfiles">Siųsti šios dienos žurnalo įrašus kūrėjams dabar. Netikėta situacija.</string>
<!-- PersistentNotification--> <!-- PersistentNotification-->

View file

@ -34,8 +34,8 @@
<string name="smscommunicator_allowednumbers_summary">+XXXXXXXXXX;+YYYYYYYYYY</string> <string name="smscommunicator_allowednumbers_summary">+XXXXXXXXXX;+YYYYYYYYYY</string>
<string name="smscommunicator_bolus_reply_with_code">For å levere bolus på %1$.2fE, svar med kode %2$s</string> <string name="smscommunicator_bolus_reply_with_code">For å levere bolus på %1$.2fE, svar med kode %2$s</string>
<string name="smscommunicator_meal_bolus_reply_with_code">For å levere måltidsbolus på %1$.2fE, svar med kode %2$s</string> <string name="smscommunicator_meal_bolus_reply_with_code">For å levere måltidsbolus på %1$.2fE, svar med kode %2$s</string>
<string name="smscommunicator_temptarget_with_code">For å sette midl. mål på %1$s, svar med kode %2$s</string> <string name="smscommunicator_temptarget_with_code">For å sette midlertidig mål på %1$s, svar med kode %2$s</string>
<string name="smscommunicator_temptarget_cancel">For å avbryte midl. mål, svar med kode %1$s</string> <string name="smscommunicator_temptarget_cancel">For å avbryte midlertidig mål, svar med kode %1$s</string>
<string name="smscommunicator_stops_ns_with_code">For å deaktivere fjernstyring via SMS-meldinger, svar med kode %1$s.\n\nHusk at du vil kunne reaktivere den igjen kun fra AAPS hovedtelefon.</string> <string name="smscommunicator_stops_ns_with_code">For å deaktivere fjernstyring via SMS-meldinger, svar med kode %1$s.\n\nHusk at du vil kunne reaktivere den igjen kun fra AAPS hovedtelefon.</string>
<string name="smscommunicator_stopped_sms">Fjernstyring via SMS-meldinger er stanset. For å reaktivere, bruk AAPS på hovedtelefonen.</string> <string name="smscommunicator_stopped_sms">Fjernstyring via SMS-meldinger er stanset. For å reaktivere, bruk AAPS på hovedtelefonen.</string>
<string name="smscommunicator_calibration_reply_with_code">For å sende kalibrering %1$.2f, svar med kode %2$s</string> <string name="smscommunicator_calibration_reply_with_code">For å sende kalibrering %1$.2f, svar med kode %2$s</string>
@ -46,8 +46,8 @@
<string name="smscommunicator_bolus_delivered">Bolus %1$.2f E ble levert</string> <string name="smscommunicator_bolus_delivered">Bolus %1$.2f E ble levert</string>
<string name="smscommunicator_meal_bolus_delivered">Måltidsbolus på %1$.2f E er levert</string> <string name="smscommunicator_meal_bolus_delivered">Måltidsbolus på %1$.2f E er levert</string>
<string name="smscommunicator_meal_bolus_delivered_tt">Mål %1$s i %2$d minutter</string> <string name="smscommunicator_meal_bolus_delivered_tt">Mål %1$s i %2$d minutter</string>
<string name="smscommunicator_tt_set">Midl. mål på %1$s i %2$d minutter ble lagret</string> <string name="smscommunicator_tt_set">Midlertidig mål på %1$s i %2$d minutter ble lagret</string>
<string name="smscommunicator_tt_canceled">Midl. mål ble fjernet</string> <string name="smscommunicator_tt_canceled">Midlertidig mål ble fjernet</string>
<string name="smscommunicator_remote_commands_allowed">Tillat fjernstyring via SMS-meldinger</string> <string name="smscommunicator_remote_commands_allowed">Tillat fjernstyring via SMS-meldinger</string>
<string name="smscommunicator_loop_has_been_disabled">Loop har blitt deaktivert</string> <string name="smscommunicator_loop_has_been_disabled">Loop har blitt deaktivert</string>
<string name="smscommunicator_loop_has_been_enabled">Loop har blitt aktivert</string> <string name="smscommunicator_loop_has_been_enabled">Loop har blitt aktivert</string>
@ -241,7 +241,7 @@
<string name="low_mark">Lav verdi</string> <string name="low_mark">Lav verdi</string>
<string name="high_mark">Høy verdi</string> <string name="high_mark">Høy verdi</string>
<string name="short_tabtitles">Korte navn i menyfaner</string> <string name="short_tabtitles">Korte navn i menyfaner</string>
<string name="overview_show_notes_field_in_dialogs_title">Vis merknadsfelt i dialogvindu for boluskalkulator</string> <string name="overview_show_notes_field_in_dialogs_title">Vis merknadsfelt i dialogvindu for behandlinger, sensorbytte, profilbytte og BS-kontroll</string>
<string name="deliverpartofboluswizard">Boluskalkulator utfører beregninger, men bare denne del av beregnet insulin leveres. Nyttig ved bruk av SMB-algoritmen.</string> <string name="deliverpartofboluswizard">Boluskalkulator utfører beregninger, men bare denne del av beregnet insulin leveres. Nyttig ved bruk av SMB-algoritmen.</string>
<string name="deliver_part_of_boluswizard_reset_time">Gi full bolus (100 %) dersom blodsukker er eldre enn</string> <string name="deliver_part_of_boluswizard_reset_time">Gi full bolus (100 %) dersom blodsukker er eldre enn</string>
<string name="enable_bolus_advisor">Aktiver bolusveileder</string> <string name="enable_bolus_advisor">Aktiver bolusveileder</string>
@ -268,11 +268,11 @@
<string name="basal_shortname">BAS</string> <string name="basal_shortname">BAS</string>
<string name="deviation_shortname">AVVIK</string> <string name="deviation_shortname">AVVIK</string>
<string name="activity_shortname">AKT</string> <string name="activity_shortname">AKT</string>
<string name="bgi_shortname">-BGI</string> <string name="bgi_shortname">BGI</string>
<string name="abs_insulin_shortname">ABS</string> <string name="abs_insulin_shortname">ABS</string>
<string name="devslope_shortname">DEVSLOPE</string> <string name="devslope_shortname">DEVSLOPE</string>
<string name="treatments_shortname">BEH</string> <string name="treatments_shortname">BEH</string>
<string name="heartRate_shortname">HR</string> <string name="heartRate_shortname">PULS</string>
<string name="sensitivity_shortname">SENS</string> <string name="sensitivity_shortname">SENS</string>
<string name="graph_scale">Graf-skala</string> <string name="graph_scale">Graf-skala</string>
<string name="graph_menu_divider_header">Graf</string> <string name="graph_menu_divider_header">Graf</string>

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<!-- Source --> <!-- Source -->
<string name="ns_client_bg">NSClient Glucosa</string> <string name="ns_client_bg">NSClient BG</string>
<string name="ns_client_bg_short">NS BG</string> <string name="ns_client_bg_short">NS BG</string>
<string name="description_source_ns_client">Recibir los datos de glucosa de Nightscout</string> <string name="description_source_ns_client">Recibir los datos de glucosa de Nightscout</string>
<string name="source_xdrip">xDrip+ BG</string> <string name="source_xdrip">xDrip+ BG</string>

View file

@ -642,7 +642,7 @@ class NSClientService : DaggerService() {
val defaultVal = config.NSCLIENT val defaultVal = config.NSCLIENT
if (sp.getBoolean(app.aaps.core.utils.R.string.key_ns_announcements, defaultVal)) { if (sp.getBoolean(app.aaps.core.utils.R.string.key_ns_announcements, defaultVal)) {
val nsAlarm = NSAlarmObject(announcement) val nsAlarm = NSAlarmObject(announcement)
uiInteraction.addNotificationWithAction(injector, nsAlarm) uiInteraction.addNotificationWithAction(nsAlarm)
rxBus.send(EventNSClientNewLog("◄ ANNOUNCEMENT", safeGetString(announcement, "message", "received"))) rxBus.send(EventNSClientNewLog("◄ ANNOUNCEMENT", safeGetString(announcement, "message", "received")))
aapsLogger.debug(LTag.NSCLIENT, announcement.toString()) aapsLogger.debug(LTag.NSCLIENT, announcement.toString())
} }
@ -654,7 +654,7 @@ class NSClientService : DaggerService() {
val snoozedTo = sp.getLong(rh.gs(app.aaps.core.utils.R.string.key_snoozed_to) + alarm.optString("level"), 0L) val snoozedTo = sp.getLong(rh.gs(app.aaps.core.utils.R.string.key_snoozed_to) + alarm.optString("level"), 0L)
if (snoozedTo == 0L || System.currentTimeMillis() > snoozedTo) { if (snoozedTo == 0L || System.currentTimeMillis() > snoozedTo) {
val nsAlarm = NSAlarmObject(alarm) val nsAlarm = NSAlarmObject(alarm)
uiInteraction.addNotificationWithAction(injector, nsAlarm) uiInteraction.addNotificationWithAction(nsAlarm)
} }
rxBus.send(EventNSClientNewLog("◄ ALARM", safeGetString(alarm, "message", "received"))) rxBus.send(EventNSClientNewLog("◄ ALARM", safeGetString(alarm, "message", "received")))
aapsLogger.debug(LTag.NSCLIENT, alarm.toString()) aapsLogger.debug(LTag.NSCLIENT, alarm.toString())
@ -667,7 +667,7 @@ class NSClientService : DaggerService() {
val snoozedTo = sp.getLong(rh.gs(app.aaps.core.utils.R.string.key_snoozed_to) + alarm.optString("level"), 0L) val snoozedTo = sp.getLong(rh.gs(app.aaps.core.utils.R.string.key_snoozed_to) + alarm.optString("level"), 0L)
if (snoozedTo == 0L || System.currentTimeMillis() > snoozedTo) { if (snoozedTo == 0L || System.currentTimeMillis() > snoozedTo) {
val nsAlarm = NSAlarmObject(alarm) val nsAlarm = NSAlarmObject(alarm)
uiInteraction.addNotificationWithAction(injector, nsAlarm) uiInteraction.addNotificationWithAction(nsAlarm)
} }
rxBus.send(EventNSClientNewLog("◄ URGENTALARM", safeGetString(alarm, "message", "received"))) rxBus.send(EventNSClientNewLog("◄ URGENTALARM", safeGetString(alarm, "message", "received")))
aapsLogger.debug(LTag.NSCLIENT, alarm.toString()) aapsLogger.debug(LTag.NSCLIENT, alarm.toString())

View file

@ -4,8 +4,6 @@ import android.annotation.SuppressLint
import android.content.Context import android.content.Context
import android.content.Intent import android.content.Intent
import android.os.Binder import android.os.Binder
import android.os.Handler
import android.os.HandlerThread
import android.os.IBinder import android.os.IBinder
import android.os.PowerManager import android.os.PowerManager
import app.aaps.core.interfaces.configuration.Config import app.aaps.core.interfaces.configuration.Config
@ -63,7 +61,6 @@ class NSClientV3Service : DaggerService() {
private var wakeLock: PowerManager.WakeLock? = null private var wakeLock: PowerManager.WakeLock? = null
private val binder: IBinder = LocalBinder() private val binder: IBinder = LocalBinder()
private val handler = Handler(HandlerThread(this::class.simpleName + "Handler").also { it.start() }.looper)
@SuppressLint("WakelockTimeout") @SuppressLint("WakelockTimeout")
override fun onCreate() { override fun onCreate() {
@ -94,7 +91,7 @@ class NSClientV3Service : DaggerService() {
private var alarmSocket: Socket? = null private var alarmSocket: Socket? = null
internal var wsConnected = false internal var wsConnected = false
internal fun shutdownWebsockets() { private fun shutdownWebsockets() {
storageSocket?.on(Socket.EVENT_CONNECT, onConnectStorage) storageSocket?.on(Socket.EVENT_CONNECT, onConnectStorage)
storageSocket?.on(Socket.EVENT_DISCONNECT, onDisconnectStorage) storageSocket?.on(Socket.EVENT_DISCONNECT, onDisconnectStorage)
storageSocket?.on("create", onDataCreateUpdate) storageSocket?.on("create", onDataCreateUpdate)
@ -113,7 +110,8 @@ class NSClientV3Service : DaggerService() {
alarmSocket = null alarmSocket = null
} }
internal fun initializeWebSockets(reason: String) { @Suppress("SameParameterValue")
private fun initializeWebSockets(reason: String) {
if (sp.getString(app.aaps.core.utils.R.string.key_nsclientinternal_url, "").isEmpty()) return if (sp.getString(app.aaps.core.utils.R.string.key_nsclientinternal_url, "").isEmpty()) return
val urlStorage = sp.getString(app.aaps.core.utils.R.string.key_nsclientinternal_url, "").lowercase().replace(Regex("/$"), "") + "/storage" val urlStorage = sp.getString(app.aaps.core.utils.R.string.key_nsclientinternal_url, "").lowercase().replace(Regex("/$"), "") + "/storage"
val urlAlarm = sp.getString(app.aaps.core.utils.R.string.key_nsclientinternal_url, "").lowercase().replace(Regex("/$"), "") + "/alarm" val urlAlarm = sp.getString(app.aaps.core.utils.R.string.key_nsclientinternal_url, "").lowercase().replace(Regex("/$"), "") + "/alarm"
@ -277,7 +275,7 @@ class NSClientV3Service : DaggerService() {
rxBus.send(EventNSClientNewLog("◄ ANNOUNCEMENT", data.optString("message"))) rxBus.send(EventNSClientNewLog("◄ ANNOUNCEMENT", data.optString("message")))
aapsLogger.debug(LTag.NSCLIENT, data.toString()) aapsLogger.debug(LTag.NSCLIENT, data.toString())
if (sp.getBoolean(app.aaps.core.utils.R.string.key_ns_announcements, config.NSCLIENT)) if (sp.getBoolean(app.aaps.core.utils.R.string.key_ns_announcements, config.NSCLIENT))
uiInteraction.addNotificationWithAction(injector, NSAlarmObject(data)) uiInteraction.addNotificationWithAction(NSAlarmObject(data))
} }
private val onAlarm = Emitter.Listener { args -> private val onAlarm = Emitter.Listener { args ->
@ -300,7 +298,7 @@ class NSClientV3Service : DaggerService() {
if (sp.getBoolean(app.aaps.core.utils.R.string.key_ns_alarms, config.NSCLIENT)) { if (sp.getBoolean(app.aaps.core.utils.R.string.key_ns_alarms, config.NSCLIENT)) {
val snoozedTo = sp.getLong(rh.gs(app.aaps.core.utils.R.string.key_snoozed_to) + data.optString("level"), 0L) val snoozedTo = sp.getLong(rh.gs(app.aaps.core.utils.R.string.key_snoozed_to) + data.optString("level"), 0L)
if (snoozedTo == 0L || System.currentTimeMillis() > snoozedTo) if (snoozedTo == 0L || System.currentTimeMillis() > snoozedTo)
uiInteraction.addNotificationWithAction(injector, NSAlarmObject(data)) uiInteraction.addNotificationWithAction(NSAlarmObject(data))
} }
} }
@ -311,7 +309,7 @@ class NSClientV3Service : DaggerService() {
if (sp.getBoolean(app.aaps.core.utils.R.string.key_ns_alarms, config.NSCLIENT)) { if (sp.getBoolean(app.aaps.core.utils.R.string.key_ns_alarms, config.NSCLIENT)) {
val snoozedTo = sp.getLong(rh.gs(app.aaps.core.utils.R.string.key_snoozed_to) + data.optString("level"), 0L) val snoozedTo = sp.getLong(rh.gs(app.aaps.core.utils.R.string.key_snoozed_to) + data.optString("level"), 0L)
if (snoozedTo == 0L || System.currentTimeMillis() > snoozedTo) if (snoozedTo == 0L || System.currentTimeMillis() > snoozedTo)
uiInteraction.addNotificationWithAction(injector, NSAlarmObject(data)) uiInteraction.addNotificationWithAction(NSAlarmObject(data))
} }
} }

View file

@ -17,6 +17,7 @@
<string name="description_ns_client_v3">Sinchronizuoja duomenis su Nightscout naudojant V3 API</string> <string name="description_ns_client_v3">Sinchronizuoja duomenis su Nightscout naudojant V3 API</string>
<string name="blocked_by_charging">Užblokuota dėl įkrovimo parinkčių</string> <string name="blocked_by_charging">Užblokuota dėl įkrovimo parinkčių</string>
<string name="blocked_by_connectivity">Užblokuota dėl ryšio parinkčių</string> <string name="blocked_by_connectivity">Užblokuota dėl ryšio parinkčių</string>
<string name="no_connectivity">Nėra ryšio</string>
<string name="unsupported_ns_version">Nepalaikoma Nightscout versija</string> <string name="unsupported_ns_version">Nepalaikoma Nightscout versija</string>
<string name="openaps_short">OAPS</string> <string name="openaps_short">OAPS</string>
<string name="uploader_short">Siunt</string> <string name="uploader_short">Siunt</string>
@ -118,6 +119,9 @@
<!-- DataBroadcast--> <!-- DataBroadcast-->
<string name="data_broadcaster">Data Broadcaster</string> <string name="data_broadcaster">Data Broadcaster</string>
<!-- GarminPlugin --> <!-- GarminPlugin -->
<string name="garmin">Garmin</string>
<string name="garmin_description">Susiejimas su Garmin (Fenix, Edge, …)</string>
<string name="key_garmin_settings">Garmin nustatymai</string>
<!-- Wear--> <!-- Wear-->
<string name="description_wear">Stebėti ir kontroliuoti AndroidAPS naudojant WearOS laikrodį.</string> <string name="description_wear">Stebėti ir kontroliuoti AndroidAPS naudojant WearOS laikrodį.</string>
<string name="no_watch_connected">(nėra prijungto laikrodžio)</string> <string name="no_watch_connected">(nėra prijungto laikrodžio)</string>

View file

@ -27,7 +27,7 @@
<string name="ns_client_v3">NSClientV3</string> <string name="ns_client_v3">NSClientV3</string>
<string name="ns_client_v3_short_name">NSV3</string> <string name="ns_client_v3_short_name">NSV3</string>
<string name="ns_client">NSClient</string> <string name="ns_client">NSClient</string>
<string name="ns_client_short_name">NSCI</string> <string name="ns_client_short_name">NSV1</string>
<string name="ns_client_url">URL:</string> <string name="ns_client_url">URL:</string>
<string name="restart">Omstart</string> <string name="restart">Omstart</string>
<string name="ns_client_internal_title">NSClient</string> <string name="ns_client_internal_title">NSClient</string>
@ -92,7 +92,7 @@
<string name="tidepool_upload_cgm">Last opp CGM data</string> <string name="tidepool_upload_cgm">Last opp CGM data</string>
<string name="tidepool_upload_bolus">Last opp behandlinger (insulin, karbohydrater)</string> <string name="tidepool_upload_bolus">Last opp behandlinger (insulin, karbohydrater)</string>
<string name="tidepool_upload_tbr">Last opp midl. basaler</string> <string name="tidepool_upload_tbr">Last opp midl. basaler</string>
<string name="tidepool_upload_profile">Last opp profilbytter, midl. mål</string> <string name="tidepool_upload_profile">Last opp profilbytter, midlertidig mål</string>
<string name="tidepool_upload_bg">Last opp BS tester</string> <string name="tidepool_upload_bg">Last opp BS tester</string>
<string name="remove_all">Fjern alt</string> <string name="remove_all">Fjern alt</string>
<string name="reset_start">Tilbakestill start</string> <string name="reset_start">Tilbakestill start</string>
@ -106,7 +106,7 @@
<string name="xdrip_shortname">XD</string> <string name="xdrip_shortname">XD</string>
<string name="description_xdrip">Send data til xDrip+</string> <string name="description_xdrip">Send data til xDrip+</string>
<string name="xdrip_status_detailed_iob_title">Vis detaljert IOB</string> <string name="xdrip_status_detailed_iob_title">Vis detaljert IOB</string>
<string name="xdrip_status_detailed_iob_summary">Splitt IOB i bolus- og basal-IOB på klokken</string> <string name="xdrip_status_detailed_iob_summary">Splitt IOB i bolus- og basal-IOB på urskiven</string>
<string name="xdrip_status_show_bgi_title">Vis BGI</string> <string name="xdrip_status_show_bgi_title">Vis BGI</string>
<string name="xdrip_status_show_bgi_summary">Legg til BGI i statuslinje</string> <string name="xdrip_status_show_bgi_summary">Legg til BGI i statuslinje</string>
<string name="xdrip_status_settings">xDrip+ avansert statuslinje</string> <string name="xdrip_status_settings">xDrip+ avansert statuslinje</string>
@ -132,35 +132,35 @@
<string name="wizard_result">Boluskalkulator:\nBolus: %1$.2fE\nKarbo: %2$dg</string> <string name="wizard_result">Boluskalkulator:\nBolus: %1$.2fE\nKarbo: %2$dg</string>
<string name="quick_wizard_not_available">Den valgte hurtigknappen er ikke lenger tilgjengelig, oppdater klokkeflis</string> <string name="quick_wizard_not_available">Den valgte hurtigknappen er ikke lenger tilgjengelig, oppdater klokkeflis</string>
<string name="quick_wizard_message">Hurtigknapp: %1$s\nBolus: %2$.2fE\nKarbo: %3$dg</string> <string name="quick_wizard_message">Hurtigknapp: %1$s\nBolus: %2$.2fE\nKarbo: %3$dg</string>
<string name="wear_action_tempt_preset_error">Ukjent forhåndsinnstilling midl. mål: %1$s</string> <string name="wear_action_tempt_preset_error">Ukjent forhåndsinnstilling midlertidig mål: %1$s</string>
<string name="wear_action_tempt_cancel_message">Avbryt gjeldende midl. mål?</string> <string name="wear_action_tempt_cancel_message">Avbryt gjeldende midlertidig mål?</string>
<string name="wear_action_tempt_unit_error">Forskjellige enheter brukt på klokke og telefon!</string> <string name="wear_action_tempt_unit_error">Forskjellige enheter brukt på klokke og telefon!</string>
<string name="wear_action_tempt_zero_message">Null-midl.mål - skal gjeldende midl. mål avbrytes?</string> <string name="wear_action_tempt_zero_message">Null-midl.mål - skal gjeldende midlertidig mål avbrytes?</string>
<string name="wear_action_tempt_min_bg_error">Min-BS utenfor område!</string> <string name="wear_action_tempt_min_bg_error">Min-BS utenfor område!</string>
<string name="wear_action_tempt_max_bg_error">Maks-BS utenfor område!</string> <string name="wear_action_tempt_max_bg_error">Maks-BS utenfor område!</string>
<string name="wear_action_tempt_manual_range_message">Midl. mål:\nMin: %1$s\nMaks: %2$s\nVarighet: %3$s</string> <string name="wear_action_tempt_manual_range_message">Midlertidig mål:\nMin: %1$s\nMaks: %2$s\nVarighet: %3$s</string>
<string name="wear_action_tempt_manual_message">Midl. mål:\nMål: %1$s\nVarighet: %2$s</string> <string name="wear_action_tempt_manual_message">Midlertidig mål:\nMål: %1$s\nVarighet: %2$s</string>
<string name="wear_action_tempt_preset_message">Midl. mål:\nÅrsak: %1$s\nMål: %2$s\nVarighet: %3$s</string> <string name="wear_action_tempt_preset_message">Midlertidig mål:\nÅrsak: %1$s\nMål: %2$s\nVarighet: %3$s</string>
<string name="no_success">feilet - sjekk telefonen</string> <string name="no_success">feilet - sjekk telefonen</string>
<string name="wear_settings">Klokkeinnstillinger</string> <string name="wear_settings">Klokkeinnstillinger</string>
<string name="wearcontrol_title">Kontroller fra klokke</string> <string name="wearcontrol_title">Kontroller fra klokke</string>
<string name="wearcontrol_summary">Sett midl. mål og angi behandlinger fra klokken.</string> <string name="wearcontrol_summary">Sett midlertidig mål og angi behandlinger fra klokken.</string>
<string name="wear_wizard_settings_summary">Beregninger inkludert i resultatet fra kalkulator:</string> <string name="wear_wizard_settings_summary">Beregninger inkludert i resultatet fra kalkulator:</string>
<string name="wear_general_settings">Generelle innstillinger</string> <string name="wear_general_settings">Generelle innstillinger</string>
<string name="wear_notifysmb_title">Varsle ved SMB</string> <string name="wear_notifysmb_title">Varsle ved SMB</string>
<string name="wear_notifysmb_summary">Vis SMB på klokken som en standard bolus.</string> <string name="wear_notifysmb_summary">Vis SMB på klokken som en standard bolus.</string>
<string name="wear_custom_watchface_settings">Innstillinger for tilpasset klokkebakgrunn</string> <string name="wear_custom_watchface_settings">Innstillinger for tilpasset urskive</string>
<string name="wear_custom_watchface_authorization_title">Godkjenning for tilpasset klokkebakgrunn</string> <string name="wear_custom_watchface_authorization_title">Godkjenning for tilpasset urskive</string>
<string name="wear_custom_watchface_authorization_summary">Godkjenne at tilpasset klokkebakgrunn endrer AAPS- og klokkeinnstillinger i henhold til klokkebakgrunnens design</string> <string name="wear_custom_watchface_authorization_summary">Godkjenn at innlastet tilpasset urskive endrer og låser noen visningsinnstillinger i henhold til urskivens design</string>
<string name="wear_custom_watchface">Tilpasset klokkebakgrunn: %1$s</string> <string name="wear_custom_watchface">Tilpasset urskive: %1$s</string>
<string name="wear_load_watchface">Last inn klokkebakgrunn</string> <string name="wear_load_watchface">Last inn urskive</string>
<string name="wear_infos_watchface">Info urskive</string> <string name="wear_infos_watchface">Info urskive</string>
<string name="wear_export_watchface">Eksporter mal</string> <string name="wear_export_watchface">Eksporter mal</string>
<string name="wear_new_custom_watchface_exported">Tilpasset klokkebakgrunn eksportert</string> <string name="wear_new_custom_watchface_exported">Tilpasset urskive-mal eksportert</string>
<string name="resend_all_data">Send alle data på nytt</string> <string name="resend_all_data">Send alle data på nytt</string>
<string name="open_settings_on_wear">Åpne Innstillinger på klokken</string> <string name="open_settings_on_wear">Åpne Innstillinger på klokken</string>
<string name="cwf_infos_pref_locked">Liste over forhåndsvalg låst av urskive</string> <string name="cwf_infos_pref_locked">Liste over forhåndsvalg låst av urskive</string>
<string name="cwf_infos_pref_required">Liste over innstillinger som kreves av klokkebakgrunnen</string> <string name="cwf_infos_pref_required">Liste over innstillinger som kreves av urskiven</string>
<string name="cwf_infos_view_title">Liste over felt som er inkludert i urskive</string> <string name="cwf_infos_view_title">Liste over felt som er inkludert i urskive</string>
<string name="pump_fetching_data">prøver å lese data fra pumpen.</string> <string name="pump_fetching_data">prøver å lese data fra pumpen.</string>
<string name="pump_old_data">TDD: Fortsatt gamle data! Kan ikke lese fra pumpe.</string> <string name="pump_old_data">TDD: Fortsatt gamle data! Kan ikke lese fra pumpe.</string>
@ -171,7 +171,7 @@
<string name="profile_message">Profil:\n\nTidsforskyving: %1$d\nProsent: %2$d%%</string> <string name="profile_message">Profil:\n\nTidsforskyving: %1$d\nProsent: %2$d%%</string>
<string name="target_only_aps_mode">Mål gjelder bare i APS-modus!</string> <string name="target_only_aps_mode">Mål gjelder bare i APS-modus!</string>
<string name="no_history">Ingen historikkdata!</string> <string name="no_history">Ingen historikkdata!</string>
<string name="temp_target">Midl. mål</string> <string name="temp_target">Midlertidig mål</string>
<string name="until">inntil</string> <string name="until">inntil</string>
<string name="default_range">STANDARD OMRÅDE</string> <string name="default_range">STANDARD OMRÅDE</string>
<string name="target">målverdi</string> <string name="target">målverdi</string>

View file

@ -6,6 +6,7 @@
<string name="medtrum_pump_description">Medtrum Nano ir Medtrum 300U integracija</string> <string name="medtrum_pump_description">Medtrum Nano ir Medtrum 300U integracija</string>
<string name="medtrum_pump_setting">Medtrum pompos nustatymai</string> <string name="medtrum_pump_setting">Medtrum pompos nustatymai</string>
<string name="pump_error">Pompos klaida: %1$s !! </string> <string name="pump_error">Pompos klaida: %1$s !! </string>
<string name="pump_warning">Pompos įspėjimas: %1$s </string>
<string name="pump_is_suspended">Pompa sustabdyta</string> <string name="pump_is_suspended">Pompa sustabdyta</string>
<string name="pump_is_suspended_hour_max">Pompa sustabdyta dėl viršyto valandos insulino limito</string> <string name="pump_is_suspended_hour_max">Pompa sustabdyta dėl viršyto valandos insulino limito</string>
<string name="pump_is_suspended_day_max">Pompa sustabdyta dėl viršyto paros insulino limito</string> <string name="pump_is_suspended_day_max">Pompa sustabdyta dėl viršyto paros insulino limito</string>
@ -52,6 +53,7 @@
<string name="alarm_battery_out">Tuščia baterija</string> <string name="alarm_battery_out">Tuščia baterija</string>
<string name="alarm_no_calibration">Nėra kalibracijos</string> <string name="alarm_no_calibration">Nėra kalibracijos</string>
<string name="pump_time_update_failed">Laiko juosta pompoje neatnaujinta, nutildykite ir atnaujinkite rankiniu būdu.</string> <string name="pump_time_update_failed">Laiko juosta pompoje neatnaujinta, nutildykite ir atnaujinkite rankiniu būdu.</string>
<string name="bolus_error">Boluso klaida</string>
<!-- wizard--> <!-- wizard-->
<string name="retry">Kartoti</string> <string name="retry">Kartoti</string>
<string name="next">Kitas</string> <string name="next">Kitas</string>

View file

@ -18,6 +18,7 @@ import app.aaps.core.interfaces.extensions.toVisibility
import app.aaps.core.interfaces.logging.AAPSLogger import app.aaps.core.interfaces.logging.AAPSLogger
import app.aaps.core.interfaces.logging.LTag import app.aaps.core.interfaces.logging.LTag
import app.aaps.core.interfaces.logging.UserEntryLogger import app.aaps.core.interfaces.logging.UserEntryLogger
import app.aaps.core.interfaces.profile.ProfileUtil
import app.aaps.core.interfaces.resources.ResourceHelper import app.aaps.core.interfaces.resources.ResourceHelper
import app.aaps.core.interfaces.rx.AapsSchedulers import app.aaps.core.interfaces.rx.AapsSchedulers
import app.aaps.core.interfaces.rx.bus.RxBus import app.aaps.core.interfaces.rx.bus.RxBus
@ -60,6 +61,7 @@ class TreatmentsCareportalFragment : DaggerFragment(), MenuProvider {
@Inject lateinit var aapsSchedulers: AapsSchedulers @Inject lateinit var aapsSchedulers: AapsSchedulers
@Inject lateinit var repository: AppRepository @Inject lateinit var repository: AppRepository
@Inject lateinit var uel: UserEntryLogger @Inject lateinit var uel: UserEntryLogger
@Inject lateinit var profileUtil: ProfileUtil
private var _binding: TreatmentsCareportalFragmentBinding? = null private var _binding: TreatmentsCareportalFragmentBinding? = null
@ -157,6 +159,8 @@ class TreatmentsCareportalFragment : DaggerFragment(), MenuProvider {
holder.binding.time.text = dateUtil.timeString(therapyEvent.timestamp) holder.binding.time.text = dateUtil.timeString(therapyEvent.timestamp)
holder.binding.duration.text = if (therapyEvent.duration == 0L) "" else dateUtil.niceTimeScalar(therapyEvent.duration, rh) holder.binding.duration.text = if (therapyEvent.duration == 0L) "" else dateUtil.niceTimeScalar(therapyEvent.duration, rh)
holder.binding.note.text = therapyEvent.note holder.binding.note.text = therapyEvent.note
if (therapyEvent.type == TherapyEvent.Type.FINGER_STICK_BG_VALUE)
therapyEvent.glucose?.let { holder.binding.bg.text = profileUtil.stringInCurrentUnitsDetect(it) }
holder.binding.type.text = translator.translate(therapyEvent.type) holder.binding.type.text = translator.translate(therapyEvent.type)
holder.binding.cbRemove.visibility = (therapyEvent.isValid && actionHelper.isRemoving).toVisibility() holder.binding.cbRemove.visibility = (therapyEvent.isValid && actionHelper.isRemoving).toVisibility()
holder.binding.cbRemove.setOnCheckedChangeListener { _, value -> holder.binding.cbRemove.setOnCheckedChangeListener { _, value ->

View file

@ -109,13 +109,22 @@
<TextView <TextView
android:id="@+id/note" android:id="@+id/note"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:paddingEnd="10dp"
tools:ignore="RtlSymmetry"
tools:text="Activity" />
<TextView
android:id="@+id/bg"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_weight="1" android:layout_weight="1"
android:paddingEnd="10dp" android:paddingEnd="10dp"
tools:ignore="RtlSymmetry" tools:ignore="RtlSymmetry"
tools:text="Activity" /> tools:text="" />
<CheckBox <CheckBox
android:id="@+id/cb_remove" android:id="@+id/cb_remove"

View file

@ -92,7 +92,7 @@
<string name="meal_bolus">Måltid</string> <string name="meal_bolus">Måltid</string>
<string name="prime">Prime</string> <string name="prime">Prime</string>
<string name="profile_changes">Profilendringer</string> <string name="profile_changes">Profilendringer</string>
<string name="tempt_targets">Midl. Mål</string> <string name="tempt_targets">Midlertidig mål</string>
<string name="carbs_and_bolus">Karbo og bolus</string> <string name="carbs_and_bolus">Karbo og bolus</string>
<string name="show_invalidated_records">Vis ugyldige / slettede registreringer</string> <string name="show_invalidated_records">Vis ugyldige / slettede registreringer</string>
<string name="hide_invalidated_records">Skjul ugyldige / slettede registreringer</string> <string name="hide_invalidated_records">Skjul ugyldige / slettede registreringer</string>

View file

@ -92,7 +92,7 @@
<string name="menu_menu">Meny</string> <string name="menu_menu">Meny</string>
<string name="quick_wizard_short">XL</string> <string name="quick_wizard_short">XL</string>
<string name="action_duration">Varighet</string> <string name="action_duration">Varighet</string>
<string name="action_tempt_confirmation">Midl. mål forespurt</string> <string name="action_tempt_confirmation">Midlertidig mål forespurt</string>
<string name="action_quick_wizard_confirmation">Hurtigknapp forespurt</string> <string name="action_quick_wizard_confirmation">Hurtigknapp forespurt</string>
<string name="action_treatment_confirmation">Behandling forespurt</string> <string name="action_treatment_confirmation">Behandling forespurt</string>
<string name="action_bolus_confirmation">Bolus forespurt</string> <string name="action_bolus_confirmation">Bolus forespurt</string>