Merge remote-tracking branch 'origin/dev' into kts

This commit is contained in:
Milos Kozak 2023-10-04 09:32:53 +02:00
commit e3f6c106f9
18 changed files with 58 additions and 61 deletions

View file

@ -103,7 +103,7 @@ android {
defaultConfig {
multiDexEnabled true
versionCode 1500
version "3.2.0-dev-k"
version "3.2.0-dev-m"
buildConfigField "String", "VERSION", '"' + version + '"'
buildConfigField "String", "BUILDVERSION", '"' + generateGitBuild() + '-' + generateDate() + '"'
buildConfigField "String", "REMOTE", '"' + generateGitRemote() + '"'

View file

@ -186,7 +186,9 @@ sealed class EventData : Event() {
val sgv: Double,
val high: Double, // highLine
val low: Double, // lowLine
val color: Int = 0
val color: Int = 0,
val deltaMgdl: Double? = null,
val avgDeltaMgdl: Double? = null
) : EventData(), Comparable<SingleBg> {
override fun equals(other: Any?): Boolean =

View file

@ -83,6 +83,7 @@
<string name="smb_disabled_in_preferences">SMB deaktiveret i præferencer</string>
<string name="uam_disabled_in_preferences">UAM deaktiveret i præferencer</string>
<string name="autosens_disabled_in_preferences">Autosens deaktiveret i præferencer</string>
<string name="autosens_disabled_in_dyn_isf">Autosens deaktiveret i DynISF</string>
<!-- Verify if needed in safety-->
<string name="limiting_iob">Begrænser IOB til %1$.1f IE på grund af %2$s</string>
<string name="maxvalueinpreferences">max værdi i præferencer</string>

View file

@ -83,6 +83,7 @@
<string name="smb_disabled_in_preferences">SMB désactivé dans les préférences</string>
<string name="uam_disabled_in_preferences">Repas Non Signalé (RNS) désactivé dans les préférences</string>
<string name="autosens_disabled_in_preferences">Autosens désactivé dans les préférences</string>
<string name="autosens_disabled_in_dyn_isf">Autosens désactivé dans DynISF</string>
<!-- Verify if needed in safety-->
<string name="limiting_iob">Limiter lIA %1$.1f U en raison de la %2$s</string>
<string name="maxvalueinpreferences">valeur Max dans les préférences</string>

View file

@ -148,6 +148,7 @@
<string name="cob3_longer">Ajustar el perfil al 150% hará que el tiempo de absorción de carbohidratos calculado sea mayor</string>
<string name="cob3_shorter">Si se ajusta el perfil al 150%, el tiempo de absorción de carbohidratos calculado será menor</string>
<string name="cob3_no_effect">Establecer el perfil a 150% no afectará la absorción calculada de carbohidratos</string>
<string name="cob_hint1">https://wiki.aaps.app/en/latest/Usage/COB-calculation.html#how-does-aaps-calculate-the-cob-value</string>
<string name="iob_value">El valor del IOB se ve afectado por las bases temporales ejecutadas.</string>
<string name="iob_hightemp">No se dará alta tasa basal temporal cuando su nivel de azúcar en sangre esté por debajo del objetivo.</string>
<string name="iob_negiob">El IOB negativo durante un período sustancial en ausencia de ejercicio sugiere que tu perfil es demasiado fuerte y que se necesita menos insulina en tus ajustes.</string>

View file

@ -148,6 +148,7 @@
<string name="cob3_longer">Définir le profil à 150% allongera le temps d\'absorption des glucides calculé</string>
<string name="cob3_shorter">Définir le profil à 150% réduira le temps d\'absorption des glucides calculé</string>
<string name="cob3_no_effect">Définir le profil à 150% n\'impactera pas le calcul de l\'absorption des glucides</string>
<string name="cob_hint1">https://wiki.aaps.app/fr/latest/Usage/COB-calculation.html#how-does-aaps-calculate-the-cob-value</string>
<string name="iob_value">La valeur de l\'IA est impactée par les débits de basal temporaires émis.</string>
<string name="iob_hightemp">Une basale temp haute ne sera pas donnée quand votre glycémie est en dessous de la cible.</string>
<string name="iob_negiob">Une IA négative pendant une période significative en l\'absence d\'exercice indique que votre profil est trop fort et qu\'il faut moins d\'insuline dans vos paramètres.</string>

View file

@ -148,6 +148,7 @@
<string name="cob3_longer">Het profiel instellen op 150% zal de berekende koolhydraten absorptie verlengen</string>
<string name="cob3_shorter">Het profiel instellen op 150% zal de berekende koolhydraten absorptie verkorten</string>
<string name="cob3_no_effect">Instellen van profiel op 150% heeft geen invloed op berekende koolhydraten absorptie</string>
<string name="cob_hint1">https://wiki.aaps.app/nl/latest/Usage/COB-calculation.html#how-does-aaps-calculate-the-cob-value</string>
<string name="iob_value">De IOB-waarde wordt beïnvloed door eerdere tijdelijke basaalstanden.</string>
<string name="iob_hightemp">Een hoge tijdelijke basaal zal niet worden ingesteld wanneer je bloedsuiker onder het streefdoel ligt.</string>
<string name="iob_negiob">Negatieve IOB voor een aanzienlijke periode vrij van inspanning, suggereert dat je profiel te hoog is ingesteld, dus dat er minder insuline nodig is.</string>

View file

@ -148,6 +148,7 @@
<string name="cob3_longer">Å sette profilen til 150% vil gjøre den beregnede karbohydrat absorpsjonstiden lengre</string>
<string name="cob3_shorter">Å sette profilen til 150% vil gjøre den beregnede karbohydrat absorpsjonstiden kortere</string>
<string name="cob3_no_effect">Ved å sette profilen til 150% påvirkes ikke beregningen av absorbering av karbohydrater</string>
<string name="cob_hint1">https://wiki.aaps.app/en/latest/Usage/COB-calculation.html#how-does-aaps-calculate-the-cob-value</string>
<string name="iob_value">IOB verdi påvirkes av midlertidige temp basaler.</string>
<string name="iob_hightemp">Høy temp basal vil ikke bli gitt når ditt blodsukker er under målverdi.</string>
<string name="iob_negiob">Negativ IOB i en lengre periode selv om du ikke trener tyder på at profilen din gir for mye insulin og kanskje bør reduseres i innstillingene.</string>

View file

@ -17,7 +17,7 @@
android:exported="false"
android:theme="@style/AppTheme">
<intent-filter>
<action android:name=".general.smsCommunicator.activities.SmsCommunicatorOtpActivity" />
<action android:name="app.aaps.plugins.main.general.smsCommunicator.activities.SmsCommunicatorOtpActivity" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>

View file

@ -986,7 +986,9 @@ class DataHandlerMobile @Inject constructor(
sgv = glucoseValue.recalculated,
high = highLine,
low = lowLine,
color = 0
color = 0,
deltaMgdl = glucoseStatus?.delta,
avgDeltaMgdl = glucoseStatus?.shortAvgDelta
)
}

View file

@ -70,6 +70,7 @@
<string name="step_retry_activation">Activation en cours</string>
<string name="unexpected_state">État inattendu : %1$s</string>
<string name="no_profile_selected">Aucun profil sélectionné. Veuillez sélectionner un profil et réessayez.</string>
<string name="no_sn_in_settings">Aucun numéro de série connu. Veuillez entrer le numéro de série de la base de pompe dans les paramètres et réessayez.</string>
<string name="base_serial">N° de série de la base de la pompe : %1$X</string>
<string name="patch_begin_activation">Aucun Patch actif. Appuyez sur <b>Suivant</b> pour commencer le processus d\'activation.</string>
<string name="patch_not_active_note">La base de la pompe ne doit pas être connectée au Patch avant l\'étape suivante !</string>

View file

@ -70,6 +70,7 @@
<string name="step_retry_activation">Bezig met activatie</string>
<string name="unexpected_state">Onverwachte staat: %1$s</string>
<string name="no_profile_selected">Geen profiel geselecteerd. Selecteer een profiel en probeer het opnieuw.</string>
<string name="no_sn_in_settings">Geen serienummer bekend. Voer bij instellingen het serienummer van de pomp-basis in en probeer het opnieuw.</string>
<string name="base_serial">Pomp basis serie nr.: %1$X</string>
<string name="patch_begin_activation">Geen actieve patch. Druk op <b>Volgende</b> om het activeringsproces te starten.</string>
<string name="patch_not_active_note">Pomp basis mag niet verbonden zijn met de patch tot de volgende stap!</string>

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
android:configure=".widget.WidgetConfigureActivity"
android:configure="app.aaps.ui.widget.WidgetConfigureActivity"
android:description="@string/widget_description"
android:initialKeyguardLayout="@layout/widget_layout"
android:initialLayout="@layout/widget_layout"

View file

@ -27,7 +27,9 @@ class RawDisplayData {
sgv = 0.0,
high = 0.0,
low = 0.0,
color = 0
color = 0,
deltaMgdl = null,
avgDeltaMgdl = null
)
// status bundle

View file

@ -8,7 +8,6 @@ import android.view.animation.LinearInterpolator
import android.view.animation.RotateAnimation
import androidx.core.content.ContextCompat
import androidx.viewbinding.ViewBinding
import app.aaps.core.interfaces.utils.SafeParse.stringToFloat
import app.aaps.wear.R
import app.aaps.wear.databinding.ActivitySteampunkBinding
import app.aaps.wear.watchfaces.utils.BaseWatchFace
@ -51,9 +50,7 @@ class SteampunkWatchface : BaseWatchFace() {
binding.glucoseDial.setImageResource(if (singleBg.glucoseUnits == "mmol") R.drawable.steampunk_dial_mmol else R.drawable.steampunk_dial_mgdl)
// convert the Sgv to degrees of rotation
rotationAngle =
if (singleBg.glucoseUnits == "mmol") stringToFloat(singleBg.sgvString) * 18f //convert to mg/dL, which is equivalent to degrees
else stringToFloat(singleBg.sgvString) // if glucose a value is received, use it to determine the amount of rotation of the dial.
rotationAngle = singleBg.sgv.toFloat()
}
if (rotationAngle > 330) rotationAngle = 330f // if the glucose value is higher than 330 then show "HIGH" on the dial. ("HIGH" is at 330 degrees on the dial)
if (rotationAngle != 0f && rotationAngle < 30) rotationAngle = 30f // if the glucose value is lower than 30 show "LOW" on the dial. ("LOW" is at 30 degrees on the dial)
@ -69,62 +66,41 @@ class SteampunkWatchface : BaseWatchFace() {
lastEndDegrees = rotationAngle //store the final angle as a starting point for the next rotation.
}
// set the delta gauge and rotate the delta pointer
var deltaIsNegative = 1f // by default go clockwise
if (singleBg.avgDelta != "--") { // if a legitimate delta value is
// received,
// then...
if (singleBg.avgDelta[0] == '-') deltaIsNegative = -1f //if the delta is negative, go counter-clockwise
val absAvgDelta = stringToFloat(singleBg.avgDelta.substring(1)) //get rid of the sign so it can be converted to float.
singleBg.avgDeltaMgdl?.let {// if a legitimate delta value is
val absAvgDelta = it.toFloat()
var autoGranularity = "0" //auto-granularity off
// ensure the delta gauge is the right units and granularity
if (singleBg.glucoseUnits != "-") {
if (singleBg.glucoseUnits == "mmol") {
if (sp.getString("delta_granularity", "2") == "4") { //Auto granularity
autoGranularity =
when {
absAvgDelta < 0.3 -> "3" // high if below 0.3 mmol/l
absAvgDelta < 0.5 -> "2" // medium if below 0.5 mmol/l
else -> "1" // low (init)
}
if (sp.getString("delta_granularity", "2") == "4") { //Auto granularity
autoGranularity =
when {
absAvgDelta < 5 -> "3" // high if below 5 mg/dl
absAvgDelta < 10 -> "2" // medium if below 10 mg/dl
else -> "1" // low (init)
}
if (sp.getString("delta_granularity", "2") == "1" || autoGranularity == "1") { //low
binding.secondaryLayout.setBackgroundResource(R.drawable.steampunk_gauge_mmol_10)
deltaRotationAngle = absAvgDelta * 30f
}
if (sp.getString("delta_granularity", "2") == "2" || autoGranularity == "2") { //medium
binding.secondaryLayout.setBackgroundResource(R.drawable.steampunk_gauge_mmol_05)
deltaRotationAngle = absAvgDelta * 60f
}
if (sp.getString("delta_granularity", "2") == "3" || autoGranularity == "3") { //high
binding.secondaryLayout.setBackgroundResource(R.drawable.steampunk_gauge_mmol_03)
deltaRotationAngle = absAvgDelta * 100f
}
} else {
if (sp.getString("delta_granularity", "2") == "4") { //Auto granularity
autoGranularity =
when {
absAvgDelta < 5 -> "3" // high if below 5 mg/dl
absAvgDelta < 10 -> "2" // medium if below 10 mg/dl
else -> "1" // low (init)
}
}
if (sp.getString("delta_granularity", "2") == "1" || autoGranularity == "1") { //low
binding.secondaryLayout.setBackgroundResource(R.drawable.steampunk_gauge_mgdl_20)
deltaRotationAngle = absAvgDelta * 1.5f
}
if (sp.getString("delta_granularity", "2") == "2" || autoGranularity == "2") { //medium
binding.secondaryLayout.setBackgroundResource(R.drawable.steampunk_gauge_mgdl_10)
deltaRotationAngle = absAvgDelta * 3f
}
if (sp.getString("delta_granularity", "2") == "3" || autoGranularity == "3") { //high
binding.secondaryLayout.setBackgroundResource(R.drawable.steampunk_gauge_mgdl_5)
deltaRotationAngle = absAvgDelta * 6f
}
}
}
if (sp.getString("delta_granularity", "2") == "1" || autoGranularity == "1") { //low
if (singleBg.glucoseUnits == "mmol")
binding.secondaryLayout.setBackgroundResource(R.drawable.steampunk_gauge_mmol_10)
else
binding.secondaryLayout.setBackgroundResource(R.drawable.steampunk_gauge_mgdl_20)
deltaRotationAngle = absAvgDelta * 1.5f
}
if (sp.getString("delta_granularity", "2") == "2" || autoGranularity == "2") { //medium
if (singleBg.glucoseUnits == "mmol")
binding.secondaryLayout.setBackgroundResource(R.drawable.steampunk_gauge_mmol_05)
else
binding.secondaryLayout.setBackgroundResource(R.drawable.steampunk_gauge_mgdl_10)
deltaRotationAngle = absAvgDelta * 3f
}
if (sp.getString("delta_granularity", "2") == "3" || autoGranularity == "3") { //high
if (singleBg.glucoseUnits == "mmol")
binding.secondaryLayout.setBackgroundResource(R.drawable.steampunk_gauge_mmol_03)
else
binding.secondaryLayout.setBackgroundResource(R.drawable.steampunk_gauge_mgdl_5)
deltaRotationAngle = absAvgDelta * 6f
}
if (deltaRotationAngle > 40) deltaRotationAngle = 40f
binding.deltaPointer.rotation = deltaRotationAngle * deltaIsNegative
binding.deltaPointer.rotation = deltaRotationAngle
}
// rotate the minute hand.

View file

@ -44,6 +44,7 @@
<string name="pref_show_bgi">Vis BSI</string>
<string name="pref_show_direction_arrow">Vis Retningspil</string>
<string name="pref_show_ago">Vis Siden</string>
<string name="pref_show_grid">Vis Gitter</string>
<string name="pref_dark" comment="Enables dark visual theme">Mørk</string>
<string name="pref_highlight_basals">Fremhæv Basaler</string>
<string name="pref_prediction_lines">Vis forudsigelser</string>

View file

@ -44,6 +44,9 @@
<string name="pref_show_bgi">Afficher IGly</string>
<string name="pref_show_direction_arrow">Afficher Flèche</string>
<string name="pref_show_ago">Afficher Min Passées</string>
<string name="pref_show_temp_basal">Afficher DBT</string>
<string name="pref_show_bolus">Afficher Bolus &amp; SMB</string>
<string name="pref_show_grid">Afficher grille</string>
<string name="pref_dark" comment="Enables dark visual theme">Sombre</string>
<string name="pref_highlight_basals">Surbrillance Basale</string>
<string name="pref_prediction_lines">Afficher prévisions</string>

View file

@ -44,6 +44,9 @@
<string name="pref_show_bgi">Toon BGI</string>
<string name="pref_show_direction_arrow">Toon richtingspijl</string>
<string name="pref_show_ago">Toon tijd geleden</string>
<string name="pref_show_temp_basal">Toon TBR</string>
<string name="pref_show_bolus">Toon Bolus &amp; SMB</string>
<string name="pref_show_grid">Raster weergeven</string>
<string name="pref_dark" comment="Enables dark visual theme">Donker</string>
<string name="pref_highlight_basals">Markeer basaalstanden</string>
<string name="pref_prediction_lines">Voorspellingen tonen</string>