This commit is contained in:
Milos Kozak 2022-06-01 17:49:02 +02:00
commit 69e376f223
101 changed files with 4110 additions and 3664 deletions

View file

@ -99,7 +99,8 @@ class HistoryBrowseActivity : NoSplashAppCompatActivity() {
activePlugin,
defaultValueHelper,
profileFunction,
repository
repository,
fabricPrivacy
)
iobCobCalculator =
IobCobCalculatorPlugin(

View file

@ -25,6 +25,7 @@ import org.slf4j.LoggerFactory
import java.util.*
import javax.inject.Inject
import javax.inject.Singleton
import kotlin.math.ceil
import kotlin.math.roundToInt
@Singleton
@ -181,7 +182,7 @@ class AutotuneIob @Inject constructor(
// even if profile rate is not the same
private fun toSplittedTimestampTB(tb: TemporaryBasal, tunedProfile: ATProfile) {
var splittedTimestamp = tb.timestamp
val cutInMilliSec = T.mins(30).msecs() //30 min to compare with oref0
val cutInMilliSec = T.mins(60).msecs() //30 min to compare with oref0, 60 min to improve accuracy
var splittedDuration = tb.duration
if (tb.isValid && tb.durationInMinutes > 0) {
val endTimestamp = splittedTimestamp + splittedDuration
@ -248,12 +249,12 @@ class AutotuneIob @Inject constructor(
fun convertToBoluses(eb: ExtendedBolus): MutableList<Bolus> {
val result: MutableList<Bolus> = ArrayList()
val tempBolusSize = 0.05
val tempBolusCount : Int = (eb.amount / tempBolusSize).roundToInt()
if(tempBolusCount > 0) {
val tempBolusSpacing = eb.duration / tempBolusCount
for (j in 0L until tempBolusCount) {
val calcDate = eb.timestamp + j * tempBolusSpacing
val aboutFiveMinIntervals = ceil(eb.duration / 5.0).toInt()
val spacing = eb.duration / aboutFiveMinIntervals.toDouble()
for (j in 0L until aboutFiveMinIntervals) {
// find middle of the interval
val calcDate = (eb.timestamp + j * spacing * 60 * 1000 + 0.5 * spacing * 60 * 1000).toLong()
val tempBolusSize: Double = eb.amount / aboutFiveMinIntervals
val bolusInterfaceIDs = InterfaceIDs().also { it.nightscoutId = eb.interfaceIDs.nightscoutId + "_eb_$j" }
val tempBolusPart = Bolus(
interfaceIDs_backing = bolusInterfaceIDs,
@ -263,7 +264,6 @@ class AutotuneIob @Inject constructor(
)
result.add(tempBolusPart)
}
}
return result
}
@ -277,13 +277,12 @@ class AutotuneIob @Inject constructor(
} else {
tbr.rate / 100.0 * basalRate - tunedRate
}, 0.001)
val tempBolusSize = if (netBasalRate < 0 ) -0.05 else 0.05
val netBasalAmount: Double = Round.roundTo(netBasalRate * realDuration / 60.0, 0.01)
val tempBolusCount : Int = (netBasalAmount / tempBolusSize).roundToInt()
if(tempBolusCount > 0) {
val tempBolusSpacing = realDuration * 60 * 1000 / tempBolusCount
for (j in 0L until tempBolusCount) {
val calcDate = tbr.timestamp + j * tempBolusSpacing
val aboutFiveMinIntervals = ceil(realDuration / 5.0).toInt()
val tempBolusSpacing = realDuration / aboutFiveMinIntervals.toDouble()
for (j in 0L until aboutFiveMinIntervals) {
// find middle of the interval
val calcDate = (tbr.timestamp + j * tempBolusSpacing * 60 * 1000 + 0.5 * tempBolusSpacing * 60 * 1000).toLong()
val tempBolusSize = netBasalRate * tempBolusSpacing / 60.0
val bolusInterfaceIDs = InterfaceIDs().also { it.nightscoutId = tbr.interfaceIDs.nightscoutId + "_tbr_$j" }
val tempBolusPart = Bolus(
interfaceIDs_backing = bolusInterfaceIDs,
@ -293,7 +292,6 @@ class AutotuneIob @Inject constructor(
)
result.add(tempBolusPart)
}
}
return result
}

View file

@ -29,6 +29,7 @@ import info.nightscout.androidaps.utils.DateUtil
import info.nightscout.androidaps.utils.DefaultValueHelper
import info.nightscout.androidaps.utils.T
import info.nightscout.androidaps.interfaces.ResourceHelper
import info.nightscout.androidaps.utils.FabricPrivacy
import info.nightscout.shared.logging.AAPSLogger
import info.nightscout.shared.sharedPreferences.SP
import java.util.*
@ -44,7 +45,8 @@ class OverviewData @Inject constructor(
private val activePlugin: ActivePlugin,
private val defaultValueHelper: DefaultValueHelper,
private val profileFunction: ProfileFunction,
private val repository: AppRepository
private val repository: AppRepository,
private val fabricPrivacy: FabricPrivacy
) {
var rangeToDisplay = 6 // for graph
@ -205,8 +207,8 @@ class OverviewData @Inject constructor(
* IOB, COB
*/
fun bolusIob(iobCobCalculator: IobCobCalculator): IobTotal = iobCobCalculator.calculateIobFromBolus().round()
fun basalIob(iobCobCalculator: IobCobCalculator): IobTotal = iobCobCalculator.calculateIobFromTempBasalsIncludingConvertedExtended().round()
fun bolusIob(iobCobCalculator: IobCobCalculator): IobTotal = iobCobCalculator.calculateIobFromBolus().round(fabricPrivacy)
fun basalIob(iobCobCalculator: IobCobCalculator): IobTotal = iobCobCalculator.calculateIobFromTempBasalsIncludingConvertedExtended().round(fabricPrivacy)
fun cobInfo(iobCobCalculator: IobCobCalculator): CobInfo = iobCobCalculator.getCobInfo(true, "Overview COB")
val lastCarbsTime: Long

View file

@ -123,8 +123,8 @@ class StatusLinePlugin @Inject constructor(
status += activeTemp.toStringShort() + " "
}
//IOB
val bolusIob = iobCobCalculator.calculateIobFromBolus().round()
val basalIob = iobCobCalculator.calculateIobFromTempBasalsIncludingConvertedExtended().round()
val bolusIob = iobCobCalculator.calculateIobFromBolus().round(fabricPrivacy)
val basalIob = iobCobCalculator.calculateIobFromTempBasalsIncludingConvertedExtended().round(fabricPrivacy)
status += DecimalFormatter.to2Decimal(bolusIob.iob + basalIob.basaliob) + "U"
if (sp.getBoolean(R.string.key_xdripstatus_detailediob, true)) {
status += ("("

View file

@ -182,7 +182,7 @@ public class TimeListEdit {
numberPickers1[position].setTextWatcher(new TextWatcher() {
@Override
public void afterTextChanged(Editable s) {
Double value1 = SafeParse.stringToDouble(numberPickers1[position].getText());
Double value1 = SafeParse.INSTANCE.stringToDouble(numberPickers1[position].getText());
Double value2 = value2(position);
if (data2 != null && value1 > value2) {
value2 = value1;
@ -209,7 +209,7 @@ public class TimeListEdit {
@Override
public void afterTextChanged(Editable s) {
Double value1 = value1(position);
Double value2 = SafeParse.stringToDouble(numberPickers2[position].getText());
Double value2 = SafeParse.INSTANCE.stringToDouble(numberPickers2[position].getText());
if (data2 != null && value2 < value1) {
value1 = value2;
numberPickers1[position].setValue(value1);

View file

@ -457,9 +457,7 @@
<string name="secondcarbsincrement">Tweede koolhidrate inkrement</string>
<string name="thirdcarbsincrement">Derde koolhidrate inkrement</string>
<string name="cgm">CGM</string>
<string name="ns_wifionly">Gebruik slegs WiFi verbinding</string>
<string name="ns_wifi_ssids">WiFi SSID</string>
<string name="ns_chargingonly">Slegs wanneer laai</string>
<string name="connectionsettings_title">Verbindinginstellings</string>
<string name="ns_wifi_allowedssids">Toegelate SSID\'s (kommapunt geskei)</string>
<string name="ns_allowroaming">Laat verbindings toe terwyl swerf</string>

View file

@ -591,9 +591,7 @@
<string name="secondcarbsincrement">Стойност на втория бърз бутон [гр]</string>
<string name="thirdcarbsincrement">Стойност на третия бърз бутон [гр]</string>
<string name="cgm">CGM</string>
<string name="ns_wifionly">Използвай само WiFi</string>
<string name="ns_wifi_ssids">WiFi име</string>
<string name="ns_chargingonly">Само при зареждане на телефона</string>
<string name="connectionsettings_title">Настройки за свързване</string>
<string name="ns_wifi_allowedssids">Разрешени WiFi мрежи(разделени с запетая)</string>
<string name="ns_allowroaming">Позволи връзка в роуминг</string>

View file

@ -123,6 +123,7 @@
<string name="sensitivity_cannula">Výměna kanyly nebo změna profilu automaticky nastaví Autosense zpět na 100%.</string>
<string name="sensitivity_time">Některé pluginy mají konfigurovatelné časové rozmezí, které může nastavit uživatel.</string>
<string name="sensitivity_hint1">https://androidaps.readthedocs.io/en/latest/CROWDIN/cs/Configuration/Config-Builder.html#detekce-citlivosti</string>
<string name="sensitivity_hint2">https://androidaps.readthedocs.io/cs/latest/Usage/Open-APS-features.html#autosens</string>
<string name="wrongcarbs_label">Chyby při zadávání sacharidů</string>
<string name="wrongcarbs_whattodo">Co byste měli udělat, pokud jste zadali chybně sacharidy?</string>
<string name="wrongcarbs_treatmentstab">Odstraňte nesprávný záznam v Ošetření a zadejte správnou novou hodnotu sacharidů.</string>

View file

@ -604,9 +604,11 @@
<string name="secondcarbsincrement">Druhý přídavek sacharidů</string>
<string name="thirdcarbsincrement">Třetí přídavek sacharidů</string>
<string name="cgm">CGM</string>
<string name="ns_wifionly">Používat pouze WiFi</string>
<string name="ns_cellular">Použít mobilní připojení</string>
<string name="ns_wifi">Použít WiFi připojení</string>
<string name="ns_wifi_ssids">WiFi SSID</string>
<string name="ns_chargingonly">Pouze při nabíjení</string>
<string name="ns_charging">Při nabíjení</string>
<string name="ns_battery">Na baterii</string>
<string name="connectionsettings_title">Nastavení připojení</string>
<string name="ns_wifi_allowedssids">Povolené SSID (oddělené středníkem)</string>
<string name="ns_allowroaming">Povolit připojení pro roamingu</string>
@ -1037,4 +1039,6 @@
<string name="aidex">GlucoRx Aidex</string>
<string name="aidex_short">Aidex</string>
<string name="description_source_aidex">Přijímat hodnoty glykémie ze senzoru GlucoRx Aidex.</string>
<string name="blocked_by_charging">Zablokováno možností nabíjení</string>
<string name="blocked_by_connectivity">Zablokováno možností připojení</string>
</resources>

View file

@ -603,9 +603,7 @@
<string name="secondcarbsincrement">Anden kulhydratstigning</string>
<string name="thirdcarbsincrement">Tredje kulhydratstigning</string>
<string name="cgm">CGM</string>
<string name="ns_wifionly">Brug kun WiFi forbindelse</string>
<string name="ns_wifi_ssids">WiFi SSID</string>
<string name="ns_chargingonly">Kun under opladning</string>
<string name="connectionsettings_title">Indstillinger for forbindelse</string>
<string name="ns_wifi_allowedssids">Tilladte SSID\'er (semikolon separeret)</string>
<string name="ns_allowroaming">Tillad forbindelse i roaming</string>

View file

@ -597,9 +597,7 @@
<string name="secondcarbsincrement">Zweite KH-Erhöhung</string>
<string name="thirdcarbsincrement">Dritte KH-Erhöhung</string>
<string name="cgm">CGM</string>
<string name="ns_wifionly">Benutze nur WLAN Verbindung</string>
<string name="ns_wifi_ssids">WLAN SSID</string>
<string name="ns_chargingonly">Nur während des Ladens</string>
<string name="connectionsettings_title">Verbindungs-Einstellungen</string>
<string name="ns_wifi_allowedssids">Erlaubte SSIDs (durch Semikolon getrennt)</string>
<string name="ns_allowroaming">Erlaube Verbindung bei Roaming</string>

View file

@ -459,9 +459,7 @@
<string name="secondcarbsincrement">Δεύτερη αύξηση υδατανθράκων</string>
<string name="thirdcarbsincrement">Τρίτη αύξηση υδατανθράκων</string>
<string name="cgm">CGM</string>
<string name="ns_wifionly">Χρησιμοποιήστε μόνο σύνδεση Wi-Fi</string>
<string name="ns_wifi_ssids">WiFi SSID</string>
<string name="ns_chargingonly">Μόνο κατά τη φόρτιση</string>
<string name="connectionsettings_title">Ρυθμίσεις σύνδεσης</string>
<string name="ns_wifi_allowedssids">Επιτρέπονται SSID (διαχωρίζονται με ελληνικό ερωτηματικό)</string>
<string name="ns_allowroaming">Επιτρέψτε τη σύνδεση περιαγωγής</string>

View file

@ -604,9 +604,11 @@
<string name="secondcarbsincrement">Segundo incremento de carbohidratos</string>
<string name="thirdcarbsincrement">Tercer incremento de carbohidratos</string>
<string name="cgm">MCG</string>
<string name="ns_wifionly">Usar sólo con WiFi</string>
<string name="ns_cellular">Usar conexión móvil</string>
<string name="ns_wifi">Usar conexión WiFi</string>
<string name="ns_wifi_ssids">WiFi SSID</string>
<string name="ns_chargingonly">Sólo si está cargando</string>
<string name="ns_charging">Durante la carga</string>
<string name="ns_battery">Con batería</string>
<string name="connectionsettings_title">Ajustes de conexión</string>
<string name="ns_wifi_allowedssids">SSID\'s permitidos (separados por punto y coma)</string>
<string name="ns_allowroaming">Permitir conexión en roaming</string>
@ -1037,4 +1039,6 @@
<string name="aidex">GlucoRx Aidex</string>
<string name="aidex_short">Aidex</string>
<string name="description_source_aidex">Recibir los valores de glucosa de GlucoRx Aidex CGMS</string>
<string name="blocked_by_charging">Bloqueado por opciones de carga</string>
<string name="blocked_by_connectivity">Bloqueado por opciones de conectividad</string>
</resources>

View file

@ -123,6 +123,7 @@
<string name="sensitivity_cannula">Le changement de canule réinitialisera le ratio Autosens à 100%.</string>
<string name="sensitivity_time">Certaines des options du plugin ont des plages de temps configurables qui peuvent être définies par l\'utilisateur.</string>
<string name="sensitivity_hint1">https://androidaps.readthedocs.io/en/latest/EN/Configuration/Sensitivity-detection-and-COB.html</string>
<string name="sensitivity_hint2">https://androidaps.readthedocs.io/fr/latest/Usage/Open-APS-features.html?highlight=Autosens#autosens</string>
<string name="wrongcarbs_label">Entrées de glucides erronées</string>
<string name="wrongcarbs_whattodo">Que devez-vous faire si vous avez renseigné une valeur erronée de glucides ?</string>
<string name="wrongcarbs_treatmentstab">Supprimez l\'entrée incorrecte dans les Traitements et entrez la nouvelle valeur correcte de glucides.</string>

View file

@ -605,9 +605,7 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
<string name="secondcarbsincrement">Deuxième incrément de glucides</string>
<string name="thirdcarbsincrement">Troisième incrément de glucides</string>
<string name="cgm">MGC</string>
<string name="ns_wifionly">Utilisez uniquement connexion Wi-fi</string>
<string name="ns_wifi_ssids">Wi-fi SSID</string>
<string name="ns_chargingonly">Uniquement si en charge</string>
<string name="connectionsettings_title">Paramètres de connexion</string>
<string name="ns_wifi_allowedssids">SSIDs autorisés (séparés par point-virgule)</string>
<string name="ns_allowroaming">Autoriser connexion données itinérance</string>
@ -682,6 +680,8 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
<string name="error_adding_treatment_message">Le traitement (insuline : %1$.2f, glucides : %2$d, à : %3$s) n\'a pas pu être ajouté aux traitements. Vérifiez et ajoutez SVP manuellement ce traitement.</string>
<string name="generated_ecarbs_note">eCarbs : %1$d g (%2$d h), retard : %3$d m</string>
<string name="openaps_noasdata">Pas de données d\'Autosens disponibles</string>
<string name="log_files">Fichiers log</string>
<string name="miscellaneous">Divers</string>
<string name="nav_logsettings">Paramètres journal</string>
<string name="resettodefaults">Réinitialiser les valeurs par défaut</string>
<string name="nsmalfunction">Dysfonctionnement NSClient. Faites une réinitialisation de NS et de NSClient.</string>
@ -774,6 +774,11 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
<string name="invalidpct">% saisi invalide</string>
<string name="average">Moyenne</string>
<string name="tir">Cible Gly</string>
<string name="day_tir">TIR Jour</string>
<string name="night_tir">TIR Nuit</string>
<string name="detailed_14_days">Détail de 14 jours</string>
<string name="std_deviation">SD: %1$s</string>
<string name="hba1c">HbA1c : </string>
<string name="activitymonitor">Moniteur d\'activité</string>
<string name="doyouwantresetstats">Voulez-vous réinitialiser les stats d\'activité ?</string>
<string name="statistics">Statistiques</string>
@ -999,6 +1004,10 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
<string name="count_selected">%1$d sélectionnée(s)</string>
<string name="sort_label">Trier</string>
<string name="dialog_canceled">Boîte de dialogue annulée</string>
<string name="veryLow" comment="below 3.1">Très bas</string>
<string name="low" comment="3.1-3.9">Bas</string>
<string name="high" comment="10.0-13.9">Haut</string>
<string name="veryHigh" comment="above 13.9">Très haut</string>
<string name="below" comment="below &quot;in range&quot;">En-dessous</string>
<string name="in_range">Dans la cible</string>
<string name="above" comment="above &quot;in range&quot;">Au-dessus</string>
@ -1008,6 +1017,11 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
<string name="configure">Configurer lopacité</string>
<string name="loop_status">État de la boucle</string>
<string name="graph_scale">Échelle du graph.</string>
<string name="profile1">Profil 1</string>
<string name="profile2">Profil2</string>
<string name="login">Connexion</string>
<string name="remove_all">Supprimer tout</string>
<string name="reset_start">Réinitialiser le démarrage</string>
<string name="a11y_otp_qr_code">Code QR pour configurer un mot de passe à usage unique</string>
<string name="a11y_open_settings">ouvrir les paramètres</string>
<string name="a11y_set_carb_timer">définir l\'alarme du minuteur de glucides</string>

View file

@ -159,7 +159,6 @@
<string name="next_button">Ar Aghaidh</string>
<string name="previous_button">Roimhe seo</string>
<string name="cgm">CGM</string>
<string name="ns_wifionly">Úsáid WiFi nasc amháin</string>
<string name="ns_wifi_ssids">WiFi SSID</string>
<string name="wear_general_settings">Socruithe Ginearálta</string>
<string name="poctech">Poctech</string>

View file

@ -603,9 +603,7 @@
<string name="secondcarbsincrement">Secondo incremento di CHO</string>
<string name="thirdcarbsincrement">Terzo incremento di CHO</string>
<string name="cgm">CGM</string>
<string name="ns_wifionly">Usa solo connessione WiFi</string>
<string name="ns_wifi_ssids">WiFi SSID</string>
<string name="ns_chargingonly">Solo se in carica</string>
<string name="connectionsettings_title">Impostazioni connessione</string>
<string name="ns_wifi_allowedssids">SSID ammessi (separati da punto e virgola)</string>
<string name="ns_allowroaming">Consenti connessione in roaming</string>

View file

@ -603,9 +603,7 @@
<string name="secondcarbsincrement">תוספת פחמימות שניה</string>
<string name="thirdcarbsincrement">תוספת פחמימות שלישית</string>
<string name="cgm">סנסור</string>
<string name="ns_wifionly">השתמש בחיבור WiFi בלבד</string>
<string name="ns_wifi_ssids">WiFi SSID</string>
<string name="ns_chargingonly">במצב טעינה בלבד</string>
<string name="connectionsettings_title">הגדרות חיבור</string>
<string name="ns_wifi_allowedssids">SSID מורשים (מופרדים בנקודה-פסיק)</string>
<string name="ns_allowroaming">אפשר חיבור בנדידה</string>
@ -678,6 +676,8 @@
<string name="error_adding_treatment_message">לא ניתן להוסיף טיפול (אינסולין: %1$.2f, פחמ\': %2$d, בשעה: %3$s) לטיפולים. נא לבדוק ולהוסיף רשומה באופן ידני כנדרש.</string>
<string name="generated_ecarbs_note">פחמימות ממושכות: %1$d גר\' (%2$d ש\'), עיכוב %3$d דק\'</string>
<string name="openaps_noasdata">אין נתוני Autosens זמינים</string>
<string name="log_files">קבצי יומן</string>
<string name="miscellaneous">שונות</string>
<string name="nav_logsettings">הגדרות יומן רישום</string>
<string name="resettodefaults">אפס לברירת המחדל</string>
<string name="nsmalfunction">תקלה ב-NSClient. שקלו להפעיל את Nightscout ו-NSClient מחדש.</string>

View file

@ -586,9 +586,7 @@
<string name="secondcarbsincrement">2차 탄수화물 증분</string>
<string name="thirdcarbsincrement">3차 탄수화물 증분</string>
<string name="cgm">CGM</string>
<string name="ns_wifionly">와이파이 연결만 사용하기</string>
<string name="ns_wifi_ssids">와이파이 SSID</string>
<string name="ns_chargingonly">충전중일때만</string>
<string name="connectionsettings_title">연결 설정</string>
<string name="ns_wifi_allowedssids">허가된 SSIDs(세미콜론으로 구분)</string>
<string name="ns_allowroaming">로밍에서 연결 허용</string>

View file

@ -595,9 +595,7 @@
<string name="secondcarbsincrement">Antras angliavandenių kiekio žingsnis</string>
<string name="thirdcarbsincrement">Trečias angliavandenių kiekio žingsnis</string>
<string name="cgm">NGJ</string>
<string name="ns_wifionly">Naudoti tik WiFi</string>
<string name="ns_wifi_ssids">WiFi pavadinimas</string>
<string name="ns_chargingonly">Tik įkraunant</string>
<string name="connectionsettings_title">Ryšio nustatymai</string>
<string name="ns_wifi_allowedssids">Leidžiami tinklai (atskirti kabliataškiais)</string>
<string name="ns_allowroaming">Leisti sujungimą tarptinkliniu ryšiu</string>

View file

@ -604,9 +604,7 @@
<string name="secondcarbsincrement">Tweede koolhydraten increment</string>
<string name="thirdcarbsincrement">Derde koolhydraten increment</string>
<string name="cgm">CGM</string>
<string name="ns_wifionly">Gebuik enkel de WiFi verbinding</string>
<string name="ns_wifi_ssids">WiFi SSID</string>
<string name="ns_chargingonly">Enkel tijdens opladen</string>
<string name="connectionsettings_title">Verbindings instellingen</string>
<string name="ns_wifi_allowedssids">Toegelaten SSIDs (gescheiden door puntkomma)</string>
<string name="ns_allowroaming">Sta verbinding tijdens roaming toe</string>

View file

@ -123,6 +123,7 @@
<string name="sensitivity_cannula">Hvis du logger bytte av kanyle vil Autosens verdien tilbakestilles til 100%.</string>
<string name="sensitivity_time">Noen plugins har konfigurerbare tidsintervall som kan settes av brukeren.</string>
<string name="sensitivity_hint1">https://androidaps.readthedocs.io/en/latest/EN/Configuration/Sensitivity-detection-and-COB.html</string>
<string name="sensitivity_hint2">https://androidaps.readthedocs.io/en/latest/Usage/Open-APS-features.html?highlight=Autosens#autosens</string>
<string name="wrongcarbs_label">Feil i KH angivelse</string>
<string name="wrongcarbs_whattodo">Hva skal du gjøre hvis du har gjort en feilaktig registrering av karbohydrater?</string>
<string name="wrongcarbs_treatmentstab">Fjern den feilaktige registreringen i Behandlinger og legg inn riktig verdi for karbohydrater.</string>

View file

@ -604,9 +604,11 @@
<string name="secondcarbsincrement">Andre økning hurtigknapp for karbohydrater</string>
<string name="thirdcarbsincrement">Tredje økning hurtigknapp for karbohydrater</string>
<string name="cgm">CGM</string>
<string name="ns_wifionly">Bare kun WiFi tilkoblinger</string>
<string name="ns_cellular">Bruk mobildata</string>
<string name="ns_wifi">Bruk Wi-Fi-tilkobling</string>
<string name="ns_wifi_ssids">WiFi nettverksnavn</string>
<string name="ns_chargingonly">Bare under lading</string>
<string name="ns_charging">Under lading</string>
<string name="ns_battery">På batteri</string>
<string name="connectionsettings_title">Tilkoblingsinnstillinger</string>
<string name="ns_wifi_allowedssids">Tillatte nettverksnavn SSID (separert med semikolon)</string>
<string name="ns_allowroaming">Tillat tilkobling i roaming</string>
@ -681,6 +683,8 @@
<string name="error_adding_treatment_message">En behandling (insulin: %1$.2f, karbohydrater: %2$d, tid: %3$s) kunne ikke legges til Behandlinger. Vennligst kontroller og manuelt legg til en registrering der det er aktuelt.</string>
<string name="generated_ecarbs_note">eKarbo: %1$d g (%2$d t), forsinkelse: %3$d m</string>
<string name="openaps_noasdata">Ingen data tilgjengelig for autosens</string>
<string name="log_files">Loggfiler</string>
<string name="miscellaneous">Annet</string>
<string name="nav_logsettings">Logginnstillinger</string>
<string name="resettodefaults">Gjenopprett standardinnstillinger</string>
<string name="nsmalfunction">NSClient feil. Vurder omstart av NS og NSClient.</string>
@ -773,6 +777,11 @@
<string name="invalidpct">Ugyldig % oppføring</string>
<string name="average">Gjennomsnitt</string>
<string name="tir">TIR</string>
<string name="day_tir">Dag TIR</string>
<string name="night_tir">Natt TIR</string>
<string name="detailed_14_days">Detaljert 14 dager</string>
<string name="std_deviation">SD: %1$s</string>
<string name="hba1c">HbA1c: </string>
<string name="activitymonitor">Overvåking av aktivitet</string>
<string name="doyouwantresetstats">Vil du tilbakestille aktivitets statistikk?</string>
<string name="statistics">Statistikk</string>
@ -999,6 +1008,10 @@
<string name="count_selected">%1$d valgt</string>
<string name="sort_label">Sorter</string>
<string name="dialog_canceled">Dialog avbrutt</string>
<string name="veryLow" comment="below 3.1">Veldig lavt</string>
<string name="low" comment="3.1-3.9">Lavt</string>
<string name="high" comment="10.0-13.9">Høyt</string>
<string name="veryHigh" comment="above 13.9">Veldig høyt</string>
<string name="below" comment="below &quot;in range&quot;">Under</string>
<string name="in_range">I målområdet</string>
<string name="above" comment="above &quot;in range&quot;">Over</string>
@ -1026,4 +1039,6 @@
<string name="aidex">GlucoRx Aidex</string>
<string name="aidex_short">Aidex</string>
<string name="description_source_aidex">Motta BS verdier fra GlucoRx Aidex CGM.</string>
<string name="blocked_by_charging">Blokkert på grunn av ladealternativer</string>
<string name="blocked_by_connectivity">Blokkert på grunn av tilkoblingsalternativer</string>
</resources>

View file

@ -595,9 +595,7 @@
<string name="secondcarbsincrement">Drugi stopień przyrostu węglow.</string>
<string name="thirdcarbsincrement">Trzeci stopień przyrostu węglow.</string>
<string name="cgm">CGM</string>
<string name="ns_wifionly">Używaj tylko połączenia WiFi</string>
<string name="ns_wifi_ssids">WiFi SSID</string>
<string name="ns_chargingonly">Tylko gdy się ładuje</string>
<string name="connectionsettings_title">Ustawienia połączenia</string>
<string name="ns_wifi_allowedssids">Dozwolone SSID (rozdzielone średnikiem)</string>
<string name="ns_allowroaming">Zezwalaj na połączenia w roamingu</string>

View file

@ -570,9 +570,7 @@
<string name="secondcarbsincrement">Segundo incremento hidratos</string>
<string name="thirdcarbsincrement">Terceiro incremento hidratos</string>
<string name="cgm">CGM</string>
<string name="ns_wifionly">Utilize apenas uma conexão WiFi</string>
<string name="ns_wifi_ssids">WiFi SSID</string>
<string name="ns_chargingonly">Apenas quando estiver a carregar</string>
<string name="connectionsettings_title">Definições de ligação</string>
<string name="ns_wifi_allowedssids">SSIDs permitidos (separada por ponto e vírgula)</string>
<string name="ns_allowroaming">Permitir ligação em roaming</string>

View file

@ -595,9 +595,7 @@
<string name="secondcarbsincrement">Segundo incremento hidratos</string>
<string name="thirdcarbsincrement">Terceiro incremento hidratos</string>
<string name="cgm">CGM</string>
<string name="ns_wifionly">Utilize apenas uma conexão WiFi</string>
<string name="ns_wifi_ssids">WiFi SSID</string>
<string name="ns_chargingonly">Apenas quando estiver a carregar</string>
<string name="connectionsettings_title">Definições de ligação</string>
<string name="ns_wifi_allowedssids">SSIDs permitidos (separada por ponto e vírgula)</string>
<string name="ns_allowroaming">Permitir ligação em roaming</string>

View file

@ -595,9 +595,7 @@
<string name="secondcarbsincrement">Al doilea increment de carbohidrați</string>
<string name="thirdcarbsincrement">Al treilea increment de carbohidrați</string>
<string name="cgm">CGM</string>
<string name="ns_wifionly">Folosește doar conexiune WiFi</string>
<string name="ns_wifi_ssids">SSID WiFi</string>
<string name="ns_chargingonly">Doar când se încarcă</string>
<string name="connectionsettings_title">Setări conexiune</string>
<string name="ns_wifi_allowedssids">SSIDuri permise (separare prin punct și virgulă)</string>
<string name="ns_allowroaming">Permite conexiuni în roaming</string>

View file

@ -123,6 +123,7 @@
<string name="sensitivity_cannula">Внесение записи о замене катетера вернет коэффициент Autosens к 100%.</string>
<string name="sensitivity_time">У некоторых опций модуля есть настраиваемые диапазоны времени, которые может задать пользователь.</string>
<string name="sensitivity_hint1">https://androidaps.readthedocs.io/en/latest/EN/Configuration/Sensitivity-detection-and-COB.html</string>
<string name="sensitivity_hint2">https://androidaps.readthedocs.io/en/latest/Usage/Open-APS-features.html?highlight=Autosens#autosens</string>
<string name="wrongcarbs_label">Ошибки записи углеводов</string>
<string name="wrongcarbs_whattodo">Что нужно делать, если сделан неправильный ввод углеводов?</string>
<string name="wrongcarbs_treatmentstab">Удалить неверную запись в Журнале терапии и заново ввести правильное значение углеводов.</string>

View file

@ -440,6 +440,7 @@
<string name="enableuam_summary">Поиск незапланированного приема пищи</string>
<string name="insulin_oref_peak">Время пика действующего инс IOB</string>
<string name="insulin_peak_time">время пика (в мин.)</string>
<string name="insulin_peak">Пик</string>
<string name="free_peak_oref">Свободный от пиков Oref</string>
<string name="rapid_acting_oref">Быстро действующий Oref</string>
<string name="ultrarapid_oref">Сверхбыстрый Oref</string>
@ -603,9 +604,11 @@
<string name="secondcarbsincrement">Второй шаг увеличения углеводов</string>
<string name="thirdcarbsincrement">Третий шаг увеличения углеводов</string>
<string name="cgm">Мониторинг ГК</string>
<string name="ns_wifionly">Использовать только WiFi соединение</string>
<string name="ns_cellular">Использовать мобильное подключение</string>
<string name="ns_wifi">Использовать WiFi соединение</string>
<string name="ns_wifi_ssids">WiFi SSID</string>
<string name="ns_chargingonly">Только при зарядке</string>
<string name="ns_charging">Во время зарядки</string>
<string name="ns_battery">От батареи</string>
<string name="connectionsettings_title">Параметры подключения</string>
<string name="ns_wifi_allowedssids">Разрешенные SSID (разделенные точкой с запятой)</string>
<string name="ns_allowroaming">Разрешить подключение в роуминге</string>
@ -680,6 +683,8 @@
<string name="error_adding_treatment_message">Назначение (инсулин: %1$.2f, углеводы: %2$d, в: %3$s) не было добавлено. Пожалуйста, проверьте и при необходимости добавьте запись вручную.</string>
<string name="generated_ecarbs_note">eCarbs: %1$d г. (%2$d h), задержка: %3$d m</string>
<string name="openaps_noasdata">Данные autosens недоступны</string>
<string name="log_files">Файлы журналов</string>
<string name="miscellaneous">Разное</string>
<string name="nav_logsettings">Настройки журнала</string>
<string name="resettodefaults">Восстановить значения по умолчанию</string>
<string name="nsmalfunction">Некорректная работа NSClient. Возможно следует перезапустить NS и NSClient.</string>
@ -772,6 +777,11 @@
<string name="invalidpct">Некорректный ввод %</string>
<string name="average">Средний</string>
<string name="tir">Время в целевом диапазоне TIR</string>
<string name="day_tir">Время в целевом диапазоне днем</string>
<string name="night_tir">Время в целевом диапазоне ночью</string>
<string name="detailed_14_days">Подробно 14 дней</string>
<string name="std_deviation">СтандОткл: %1$s</string>
<string name="hba1c">HbA1c: </string>
<string name="activitymonitor">Монитор активности</string>
<string name="doyouwantresetstats">Хотите сбросить статистику активности?</string>
<string name="statistics">Статистика</string>
@ -966,9 +976,11 @@
<string name="wizard_no_active_profile">Активный профиль не установлен!</string>
<string name="wizard_no_cob">Неизвестный COB! Отсутствуют данные ГК или приложения недавно перезапущено?</string>
<string name="wizard_carbs_constraint">Нарушено ограничение по углеводам!</string>
<string name="wizard_explain_calc">Кальк (IC:%1$.1f ISF: %2$.1f)</string>
<string name="wizard_explain_carbs">Углеводов: %1$.2fгУ</string>
<string name="wizard_explain_cob">Акт Инс COB: %1$.0fг %2$.2fед</string>
<string name="wizard_explain_bg">ГК: %1$.2f</string>
<string name="wizard_explain_iob">IOB: %1$.2fед</string>
<string name="wizard_explain_superbolus">Суперболюсный: %1$.2fед</string>
<string name="wizard_explain_trend">тренд 15\': %1$.2f</string>
<string name="wizard_explain_percent">Процент: %1$.2fU x %2$d%% = %3$.2f</string>
@ -995,6 +1007,10 @@
<string name="count_selected">%1$d выбрано</string>
<string name="sort_label">Сортировать</string>
<string name="dialog_canceled">Диалог отменен</string>
<string name="veryLow" comment="below 3.1">Очень низкий</string>
<string name="low" comment="3.1-3.9">Низкий</string>
<string name="high" comment="10.0-13.9">Высокий</string>
<string name="veryHigh" comment="above 13.9">Очень высокий</string>
<string name="below" comment="below &quot;in range&quot;">Ниже целевых</string>
<string name="in_range">В целевом диапазоне</string>
<string name="above" comment="above &quot;in range&quot;">Выше целевых</string>
@ -1002,5 +1018,26 @@
<string name="show_hide_records">Скрыть записи цикла</string>
<string name="widget_description">Виджет androidAPS</string>
<string name="configure">Настроить прозрачность</string>
<string name="loop_status">Статус цикла</string>
<string name="graph_scale">Масштаб графика</string>
<string name="profile1">Профиль 1</string>
<string name="profile2">Профиль 2</string>
<string name="login">Логин</string>
<string name="remove_all">Удалить всё</string>
<string name="reset_start">Перезапустить старт</string>
<string name="a11y_otp_qr_code">QR код для введения временного пароля</string>
<string name="a11y_open_settings">открыть настройки</string>
<string name="a11y_set_carb_timer">задать оповещение таймера углеводов</string>
<string name="device_all">Все</string>
<string name="device_phone">Телефон</string>
<string name="device_watch">Часы</string>
<string name="a11y_only_on_watch">только на часах</string>
<string name="a11y_only_on_phone">только на телефоне</string>
<string name="a11y_drag_and_drop_handle">якорь перетягивания</string>
<!-- Aidex Cgms -->
<string name="aidex">Aidex GlucoRx</string>
<string name="aidex_short">Aidex </string>
<string name="description_source_aidex">Получить значения ГК от GlucoRx Aidex</string>
<string name="blocked_by_charging">Заблокировано опциями зарядки</string>
<string name="blocked_by_connectivity">Заблокировано настройками подключения</string>
</resources>

View file

@ -604,9 +604,11 @@
<string name="secondcarbsincrement">Druhý prídavok sacharidov</string>
<string name="thirdcarbsincrement">Tretí prídavok sacharidov</string>
<string name="cgm">CGM</string>
<string name="ns_wifionly">Používať iba WiFi</string>
<string name="ns_cellular">Použiť mobilné pripojenie</string>
<string name="ns_wifi">Použiť WiFi pripojenie</string>
<string name="ns_wifi_ssids">WiFi SSID</string>
<string name="ns_chargingonly">Len pri nabíjaní</string>
<string name="ns_charging">Počas nabíjania</string>
<string name="ns_battery">Na batérii</string>
<string name="connectionsettings_title">Nastavenie pripojenia</string>
<string name="ns_wifi_allowedssids">Povolené SSID (oddelené bodkočiarkou)</string>
<string name="ns_allowroaming">Povoliť pripojenie pri roamingu</string>
@ -681,6 +683,8 @@
<string name="error_adding_treatment_message">Ošetrenie (inzulín: %1$.2f, sacharidy: %2$d, čas: %3$s) nie je možné pridať. Skontrolujte a podľa potreby manuálne pridajte záznam.</string>
<string name="generated_ecarbs_note">eCarbs: %1$d g (%2$d h), Oneskorenie: %3$d m</string>
<string name="openaps_noasdata">Nedostupné dáta o glykémiách</string>
<string name="log_files">Log súbory</string>
<string name="miscellaneous">Rôzne</string>
<string name="nav_logsettings">Nastavenie logovania</string>
<string name="resettodefaults">Obnoviť predvolené</string>
<string name="nsmalfunction">Chyba NSClienta. Zvážte reštart NS a NSClienta.</string>
@ -1035,4 +1039,6 @@
<string name="aidex">GlucoRx Aidex</string>
<string name="aidex_short">Aidex</string>
<string name="description_source_aidex">Prijímať hodnoty glykémie zo senzora GlucoRx Aidex.</string>
<string name="blocked_by_charging">Zablokované možnosti nabíjania</string>
<string name="blocked_by_connectivity">Zablokované možnosti pripojenia</string>
</resources>

View file

@ -600,9 +600,7 @@ Eversense-appen.</string>
<string name="secondcarbsincrement">Andra snabbknabben för kolhydrater</string>
<string name="thirdcarbsincrement">Tredje snabbknabben för kolhydrater</string>
<string name="cgm">CGM</string>
<string name="ns_wifionly">Använd endast WiFi</string>
<string name="ns_wifi_ssids">WiFi nätverksnamn</string>
<string name="ns_chargingonly">Endast vid laddning</string>
<string name="connectionsettings_title">Anslutningsinställningar</string>
<string name="ns_wifi_allowedssids">Tillåtna nätverksnamn (separerade med semikolon)</string>
<string name="ns_allowroaming">Tillåt NS-data vid roaming</string>

View file

@ -123,6 +123,7 @@
<string name="sensitivity_cannula">Bir kanül değişikliğinin kaydedilmesi, Otoduyarlılık oranını %100\'e sıfırlayacaktır.</string>
<string name="sensitivity_time">Eklenti seçeneklerinden bazıları, kullanıcı tarafından ayarlanabilen yapılandırılabilir zaman aralıklarına sahiptir.</string>
<string name="sensitivity_hint1">https://androidaps.readthedocs.io/en/latest/EN/Configuration/Sensitivity-detection-and-COB.html</string>
<string name="sensitivity_hint2">https://androidaps.readthedocs.io/tr/latest/Usage/Open-APS-features.html?highlight=Autosens#autosens</string>
<string name="wrongcarbs_label">Karbonhidrat Giriş Hataları</string>
<string name="wrongcarbs_whattodo">Yanlış bir karbonhidrat girişi yaptıysanız ne yapmalısınız?</string>
<string name="wrongcarbs_treatmentstab">Tedavilerdeki yanlış girişi siler ve doğru karbonhidrat değerini girerim.</string>

View file

@ -475,7 +475,6 @@ Aktif Karbonhidratın ne kadar hızlı sindirildiğine ve KŞ\'nin beklenenden d
<string name="localalertsettings_title">Yerel uyarılar</string>
<string name="enable_missed_bg_readings_alert">KŞ bilgisi alınmadığında uyar</string>
<string name="enable_pump_unreachable_alert">Pompa ulaşılamıyorsa uyar</string>
<string name="pump_unreachable_threshold">Pompa ulaşılamaz eşiği [min]</string>
<string name="enable_carbs_req_alert">Karbonhidrat gerekliyse uyar</string>
<string name="urgent_alarm">Acil önemli Alarm</string>
<string name="info">BİLGİ</string>
@ -605,9 +604,11 @@ Aktif Karbonhidratın ne kadar hızlı sindirildiğine ve KŞ\'nin beklenenden d
<string name="secondcarbsincrement">İkinci karbonhidrat artışı</string>
<string name="thirdcarbsincrement">Üçüncü karbonhidrat artışı</string>
<string name="cgm">CGM</string>
<string name="ns_wifionly">Sadece WiFi bağlantı kullanın</string>
<string name="ns_cellular">Mobil veri kullan</string>
<string name="ns_wifi">Wi-Fi bağlantısı kullan</string>
<string name="ns_wifi_ssids">WiFi SSID</string>
<string name="ns_chargingonly">Sadece şarj olurken</string>
<string name="ns_charging">Şarj olurken</string>
<string name="ns_battery">Pilde</string>
<string name="connectionsettings_title">Bağlantı Ayarları</string>
<string name="ns_wifi_allowedssids">İzin verilen SSID (noktalı virgülle ayrılmış)</string>
<string name="ns_allowroaming">Roaming bağlantıya izin ver</string>
@ -682,6 +683,8 @@ Aktif Karbonhidratın ne kadar hızlı sindirildiğine ve KŞ\'nin beklenenden d
<string name="error_adding_treatment_message">Tedavilere (insülin: %1$.2f, karbonhidrat: %2$d, %3$s) şeklinde bir tedavi eklenemedi. Lütfen kontrol edin ve uygun şekilde elle bir kayıt ekleyin.</string>
<string name="generated_ecarbs_note">yKarb: %1$d g (%2$d sa), gecikme: %3$d dk</string>
<string name="openaps_noasdata">Otoduyarlılık verileri mevcut değil</string>
<string name="log_files">Günlük dosyaları</string>
<string name="miscellaneous">Diğer Ayarlar</string>
<string name="nav_logsettings">Günlük ayarları</string>
<string name="resettodefaults">Varsayılanlara sıfırla</string>
<string name="nsmalfunction">NSClient arızası. NS ve NSClient yeniden başlatmayı düşünün.</string>
@ -774,6 +777,11 @@ Aktif Karbonhidratın ne kadar hızlı sindirildiğine ve KŞ\'nin beklenenden d
<string name="invalidpct">Geçersiz % giriş</string>
<string name="average">Ortalama</string>
<string name="tir">TIR</string>
<string name="day_tir">Gündüz TIR</string>
<string name="night_tir">Gece TIR</string>
<string name="detailed_14_days">Ayrıntılı 14 gün</string>
<string name="std_deviation">SD: %1$s</string>
<string name="hba1c">HbA1c: </string>
<string name="activitymonitor">Aktivite monitörü</string>
<string name="doyouwantresetstats">Etkinlik istatistiklerini sıfırlamak istiyor musunuz?</string>
<string name="statistics">İstatistikler</string>
@ -1000,6 +1008,10 @@ Aktif Karbonhidratın ne kadar hızlı sindirildiğine ve KŞ\'nin beklenenden d
<string name="count_selected">%1$d seçildi</string>
<string name="sort_label">Sırala</string>
<string name="dialog_canceled">İletişim kutusu iptal edildi</string>
<string name="veryLow" comment="below 3.1">Çok düşük</string>
<string name="low" comment="3.1-3.9">Düşük</string>
<string name="high" comment="10.0-13.9">Yüksek</string>
<string name="veryHigh" comment="above 13.9">Çok yüksek</string>
<string name="below" comment="below &quot;in range&quot;">Altında</string>
<string name="in_range">Aralık içinde</string>
<string name="above" comment="above &quot;in range&quot;">Üstünde</string>
@ -1027,4 +1039,6 @@ Aktif Karbonhidratın ne kadar hızlı sindirildiğine ve KŞ\'nin beklenenden d
<string name="aidex">GlucoRx Aidex</string>
<string name="aidex_short">Aidex</string>
<string name="description_source_aidex">GlucoRx Aidex CGMS\'den KŞ değerleri alır.</string>
<string name="blocked_by_charging">Şarj seçenekleri tarafından engellendi</string>
<string name="blocked_by_connectivity">Bağlantı seçenekleri tarafından engellendi</string>
</resources>

View file

@ -123,6 +123,7 @@
<string name="sensitivity_cannula">记录输注导管更换会将Autosens比率重置回100%。</string>
<string name="sensitivity_time">一些插件选项具有可配置的时间范围,可由用户设置。</string>
<string name="sensitivity_hint1">https://androidaps.readthedocs.io/en/latest/EN/Configuration/Sensitivity-detection-and-COB.html</string>
<string name="sensitivity_hint2">https://androidaps.readthedocs.io/en/latest/Usage/Open-APS-features.html?highlight=Autosens#autosens</string>
<string name="wrongcarbs_label">碳水化合物输入错误</string>
<string name="wrongcarbs_whattodo">如果您输入了不正确的碳水化合物,该怎么办?</string>
<string name="wrongcarbs_treatmentstab">删除治疗数据中的错误条目,并重新输入正确的碳水值。</string>

View file

@ -603,9 +603,7 @@
<string name="secondcarbsincrement">第二碳水化合物增量</string>
<string name="thirdcarbsincrement">第三碳水化合物增量</string>
<string name="cgm">CGM</string>
<string name="ns_wifionly">仅使用 WiFi 连接</string>
<string name="ns_wifi_ssids">WiFi SSID</string>
<string name="ns_chargingonly">仅在充电时</string>
<string name="connectionsettings_title">连接设置</string>
<string name="ns_wifi_allowedssids">允许的 SSIDs (分号分隔)</string>
<string name="ns_allowroaming">允许在漫游中连接</string>
@ -772,6 +770,7 @@
<string name="invalidpct">输入的百分比无效</string>
<string name="average">平均</string>
<string name="tir">TIR</string>
<string name="hba1c">糖化血红蛋白: </string>
<string name="activitymonitor">活动监视器</string>
<string name="doyouwantresetstats">您想要重置所有的统计信息吗?</string>
<string name="statistics">统计</string>
@ -967,9 +966,11 @@
<string name="wizard_no_active_profile">没有激活的个人配置文件!</string>
<string name="wizard_no_cob">未知的活性碳水!血糖读取缺失或最近重新启动了应用程序?</string>
<string name="wizard_carbs_constraint">碳水违反约束条件!</string>
<string name="wizard_explain_calc">计算 (IC: %1$.1f, ISF: %2$.1f)</string>
<string name="wizard_explain_carbs">碳水: %1$.2fU</string>
<string name="wizard_explain_cob">活性碳水: %1$.0f克 %2$.2fU</string>
<string name="wizard_explain_bg">血糖: %1$.2fU</string>
<string name="wizard_explain_iob">活性胰岛素: %1$.2fU</string>
<string name="wizard_explain_superbolus">超级大剂量:%1$.2fU</string>
<string name="wizard_explain_trend">15分钟趋势%1$.2fU</string>
<string name="wizard_explain_percent">百分比:%1$.2fU x %2$d%% ≈ %3$.2fU</string>
@ -996,6 +997,10 @@
<string name="count_selected">已选中 %1$d</string>
<string name="sort_label">排序</string>
<string name="dialog_canceled">对话框已取消</string>
<string name="veryLow" comment="below 3.1">非常低</string>
<string name="low" comment="3.1-3.9"></string>
<string name="high" comment="10.0-13.9"></string>
<string name="veryHigh" comment="above 13.9">非常高</string>
<string name="below" comment="below &quot;in range&quot;">底部</string>
<string name="in_range">在范围内</string>
<string name="above" comment="above &quot;in range&quot;">上方</string>
@ -1003,6 +1008,12 @@
<string name="show_hide_records">隐藏闭环记录</string>
<string name="widget_description">AndroidAPS小部件</string>
<string name="configure">配置透明度</string>
<string name="loop_status">闭环状态</string>
<string name="graph_scale">图形缩放</string>
<string name="profile1">配置文件 1</string>
<string name="profile2">配置文件 2</string>
<string name="login">登录</string>
<string name="remove_all">删除全部</string>
<string name="a11y_otp_qr_code">用于安装一次性随机验证码的二维码</string>
<string name="a11y_open_settings">打开设置</string>
<string name="a11y_set_carb_timer">设置碳水计时器提醒</string>
@ -1016,4 +1027,6 @@
<string name="aidex">GlucoRx Aidex动泰</string>
<string name="aidex_short">Aidex动泰</string>
<string name="description_source_aidex">从GlucoRx Aidex动泰持续葡萄糖监测系统接收血糖值。</string>
<string name="blocked_by_charging">被充电选项阻止</string>
<string name="blocked_by_connectivity">被连接选项阻止</string>
</resources>

View file

@ -120,4 +120,7 @@
<string name="confirm_remove_multiple_items">你确定要删除 %1$d 吗?</string>
<string name="sort_label">排序</string>
<string name="system_automation">系统自动化</string>
<string name="run_automations">运行自动化</string>
<string name="add_automation">添加规则</string>
<string name="remove_sort">移除/排序</string>
</resources>

View file

@ -4,7 +4,7 @@ buildscript {
ext {
kotlin_version = '1.6.21'
core_version = '1.7.0'
rxjava_version = '3.1.4'
rxjava_version = '3.1.5'
rxandroid_version = '3.0.0'
rxkotlin_version = '3.0.1'
room_version = '2.4.2'

View file

@ -4,6 +4,7 @@ import android.content.Context
import info.nightscout.androidaps.plugins.general.overview.graphExtensions.DataPointWithLabelInterface
import info.nightscout.androidaps.plugins.general.overview.graphExtensions.PointsWithLabelGraphSeries
import info.nightscout.androidaps.utils.DateUtil
import info.nightscout.androidaps.utils.FabricPrivacy
import info.nightscout.androidaps.utils.Round
import org.json.JSONException
import org.json.JSONObject
@ -50,15 +51,15 @@ class IobTotal(val time: Long) : DataPointWithLabelInterface {
return this
}
fun round(): IobTotal {
iob = Round.roundTo(iob, 0.001)
activity = Round.roundTo(activity, 0.0001)
bolussnooze = Round.roundTo(bolussnooze, 0.0001)
basaliob = Round.roundTo(basaliob, 0.001)
netbasalinsulin = Round.roundTo(netbasalinsulin, 0.001)
hightempinsulin = Round.roundTo(hightempinsulin, 0.001)
netInsulin = Round.roundTo(netInsulin, 0.001)
extendedBolusInsulin = Round.roundTo(extendedBolusInsulin, 0.001)
fun round(fabricPrivacy: FabricPrivacy? = null): IobTotal {
iob = Round.roundTo(iob, 0.001, fabricPrivacy)
activity = Round.roundTo(activity, 0.0001, fabricPrivacy)
bolussnooze = Round.roundTo(bolussnooze, 0.0001, fabricPrivacy)
basaliob = Round.roundTo(basaliob, 0.001, fabricPrivacy)
netbasalinsulin = Round.roundTo(netbasalinsulin, 0.001, fabricPrivacy)
hightempinsulin = Round.roundTo(hightempinsulin, 0.001, fabricPrivacy)
netInsulin = Round.roundTo(netInsulin, 0.001, fabricPrivacy)
extendedBolusInsulin = Round.roundTo(extendedBolusInsulin, 0.001, fabricPrivacy)
return this
}

View file

@ -10,6 +10,7 @@ import info.nightscout.androidaps.dialogs.ErrorDialog
import info.nightscout.androidaps.dialogs.NtpProgressDialog
import info.nightscout.androidaps.dialogs.ProfileViewerDialog
import info.nightscout.androidaps.plugins.general.maintenance.activities.PrefImportListActivity
import info.nightscout.androidaps.utils.ui.SingleClickButton
@Module
@Suppress("unused")
@ -25,4 +26,6 @@ abstract class CoreFragmentsModule {
@ContributesAndroidInjector abstract fun contributesNtpProgressDialog(): NtpProgressDialog
@ContributesAndroidInjector abstract fun contributesProfileViewerDialog(): ProfileViewerDialog
@ContributesAndroidInjector abstract fun contributesSingleClickButton(): SingleClickButton
}

View file

@ -273,6 +273,13 @@ public class DateTimeUtil {
}
public static long getATDWithAddedMinutes(Long atd, int minutesDiff) {
GregorianCalendar oldestEntryTime = DateTimeUtil.toGregorianCalendar(atd);
oldestEntryTime.add(Calendar.MINUTE, minutesDiff);
return toATechDate(oldestEntryTime);
}
public static long getATDWithAddedMinutes(GregorianCalendar oldestEntryTime, int minutesDiff) {
oldestEntryTime.add(Calendar.MINUTE, minutesDiff);

View file

@ -1,10 +1,10 @@
package info.nightscout.androidaps.utils
import android.os.Bundle
import java.math.BigDecimal
import kotlin.math.abs
import kotlin.math.ceil
import kotlin.math.floor
import kotlin.math.round
import kotlin.math.roundToLong
/**
@ -12,22 +12,26 @@ import kotlin.math.roundToLong
*/
object Round {
@JvmStatic
fun roundTo(x: Double, step: Double): Double =
fun roundTo(x: Double, step: Double, fabricPrivacy: FabricPrivacy? = null): Double = try {
if (x == 0.0) 0.0
else BigDecimal.valueOf((x / step).roundToLong()).multiply(BigDecimal.valueOf(step)).toDouble()
} catch (e: Exception) {
fabricPrivacy?.logCustom("Error_roundTo", Bundle().apply {
putDouble("x", x)
putDouble("step", step)
putString("stacktrace", e.stackTraceToString())
})
0.0
}
@JvmStatic
fun floorTo(x: Double, step: Double): Double =
if (x != 0.0) floor(x / step) * step
else 0.0
@JvmStatic
fun ceilTo(x: Double, step: Double): Double =
if (x != 0.0) ceil(x / step) * step
else 0.0
@JvmStatic
fun isSame(d1: Double, d2: Double): Boolean =
abs(d1 - d2) <= 0.000001
}

View file

@ -2,25 +2,32 @@ package info.nightscout.androidaps.utils.ui
import android.content.Context
import android.util.AttributeSet
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.core.R
import info.nightscout.shared.logging.StacktraceLoggerWrapper
import org.slf4j.Logger
import info.nightscout.shared.logging.AAPSLogger
import info.nightscout.shared.logging.LTag
import javax.inject.Inject
class SingleClickButton @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = R.style.Widget_MaterialComponents_Button) : com.google.android.material.button.MaterialButton(context, attrs, defStyleAttr) {
class SingleClickButton @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = R.style.Widget_MaterialComponents_Button) :
com.google.android.material.button.MaterialButton(context, attrs, defStyleAttr) {
init {
(context.applicationContext as HasAndroidInjector).androidInjector().inject(this)
}
@Inject lateinit var aapsLogger: AAPSLogger
override fun performClick(): Boolean = guardClick { super.performClick() }
override fun callOnClick(): Boolean = guardClick { super.callOnClick() }
private fun guardClick(block: () -> Boolean): Boolean {
isEnabled = false
postDelayed({ isEnabled = true; log.debug("Button enabled") }, BUTTON_REFRACTION_PERIOD)
postDelayed({ isEnabled = true; aapsLogger.debug(LTag.UI, "Button enabled") }, BUTTON_REFRACTION_PERIOD)
return block()
}
@Suppress("DEPRECATION")
private val log: Logger = StacktraceLoggerWrapper.getLogger(SingleClickButton::class.java)
companion object {
const val BUTTON_REFRACTION_PERIOD = 3000L
}
}

View file

@ -42,6 +42,7 @@
<string name="carbs">Углеводы</string>
<string name="invalidprofile">Неверный профиль !!!</string>
<string name="noprofileset">ПРОФИЛЬ НЕ ЗАДАН</string>
<string name="active"><![CDATA[Активен]]></string>
<string name="date">дата</string>
<string name="units_label">единицы</string>
<string name="dia_label">DIA (время действия инсулина)</string>
@ -438,7 +439,21 @@
<string name="remove_items">Удалить элементы</string>
<string name="sort_items">Сортировать элементы</string>
<string name="remove_selected_items">Удалить выбранные элементы</string>
<string name="a11y_file">файл</string>
<string name="a11y_user">пользователь</string>
<!-- Autotune -->
<string name="autotune">Автонастройка</string>
<string name="autotune_description">Помощь в возможной корректировке профиля (ISF, IC, базал)</string>
<string name="autotune_shortname">АвтТюн</string>
<string name="autotune_settings">Настройки Autotune</string>
<string name="autotune_auto_title">Профили Автонастройки </string>
<string name="autotune_auto_summary">При активации происходит обновление автонастройки и смена профиля на основе правила автоматизации </string>
<string name="autotune_categorize_uam_as_basal_title">Классифицировать UAM как базал</string>
<string name="autotune_categorize_uam_as_basal_summary">Включите, если только вы точно ввели все съеденные углеводы. С этой опцией внезапные подъемы, зафиксированные Autotune, будут использованы для рекомендаций изменения базальной скорости.</string>
<string name="autotune_tune_insulin_curve_title">Настройка кривой инсулина</string>
<string name="autotune_default_tune_days_summary">Количество дней обработки данных Autotune по умолчанию (до 30)</string>
<string name="autotune_error">Ошибка ввода данных, попробуйте запустить снова autotune или уменьшить количество дней</string>
<string name="autotune_profile_invalid">Неверный профиль</string>
<plurals name="days">
<item quantity="one">%1$d день</item>
<item quantity="few">%1$d дня</item>

View file

@ -232,8 +232,8 @@ public class DanaRv2Plugin extends AbstractDanaRPlugin {
int percentRate = Double.valueOf(absoluteRate / getBaseBasalRate() * 100).intValue();
// Any basal less than 0.10u/h will be dumped once per hour, not every 4 minutes. So if it's less than .10u/h, set a zero temp.
if (absoluteRate < 0.10d) percentRate = 0;
if (percentRate < 100) percentRate = (int) Round.ceilTo((double) percentRate, 10d);
else percentRate = (int) Round.floorTo((double) percentRate, 10d);
if (percentRate < 100) percentRate = (int) Round.INSTANCE.ceilTo((double) percentRate, 10d);
else percentRate = (int) Round.INSTANCE.floorTo((double) percentRate, 10d);
if (percentRate > 500) // Special high temp 500/15min
percentRate = 500;
aapsLogger.debug(LTag.PUMP, "setTempBasalAbsolute: Calculated percent rate: " + percentRate);
@ -353,7 +353,8 @@ public class DanaRv2Plugin extends AbstractDanaRPlugin {
insulin = constraintChecker.applyExtendedBolusConstraints(new Constraint<>(insulin)).value();
// needs to be rounded
int durationInHalfHours = Math.max(durationInMinutes / 30, 1);
insulin = Round.roundTo(insulin, getPumpDescription().getExtendedBolusStep());
insulin = Round.INSTANCE.roundTo(insulin, getPumpDescription().getExtendedBolusStep(),
null);
PumpEnactResult result = new PumpEnactResult(getInjector());
if (danaPump.isExtendedInProgress() && Math.abs(danaPump.getExtendedBolusAmount() - insulin) < pumpDescription.getExtendedBolusStep()) {

View file

@ -267,7 +267,8 @@ public abstract class AbstractDanaRPlugin extends PumpPluginBase implements Pump
insulin = constraintChecker.applyExtendedBolusConstraints(new Constraint<>(insulin)).value();
// needs to be rounded
int durationInHalfHours = Math.max(durationInMinutes / 30, 1);
insulin = Round.roundTo(insulin, getPumpDescription().getExtendedBolusStep());
insulin = Round.INSTANCE.roundTo(insulin, getPumpDescription().getExtendedBolusStep(),
null);
PumpEnactResult result = new PumpEnactResult(getInjector());
if (danaPump.isExtendedInProgress() && Math.abs(danaPump.getExtendedBolusAmount() - insulin) < getPumpDescription().getExtendedBolusStep()) {

View file

@ -217,8 +217,8 @@ public class DanaRPlugin extends AbstractDanaRPlugin {
int percentRate = Double.valueOf(absoluteRate / getBaseBasalRate() * 100).intValue();
// Any basal less than 0.10u/h will be dumped once per hour, not every 4 minutes. So if it's less than .10u/h, set a zero temp.
if (absoluteRate < 0.10d) percentRate = 0;
if (percentRate < 100) percentRate = (int) Round.ceilTo((double) percentRate, 10d);
else percentRate = (int) Round.floorTo((double) percentRate, 10d);
if (percentRate < 100) percentRate = (int) Round.INSTANCE.ceilTo((double) percentRate, 10d);
else percentRate = (int) Round.INSTANCE.floorTo((double) percentRate, 10d);
if (percentRate > getPumpDescription().getMaxTempPercent()) {
percentRate = getPumpDescription().getMaxTempPercent();
}
@ -288,7 +288,8 @@ public class DanaRPlugin extends AbstractDanaRPlugin {
double extendedRateToSet = absoluteRate - getBaseBasalRate();
extendedRateToSet = constraintChecker.applyBasalConstraints(new Constraint<>(extendedRateToSet), profile).value();
// needs to be rounded to 0.1
extendedRateToSet = Round.roundTo(extendedRateToSet, pumpDescription.getExtendedBolusStep() * 2); // *2 because of half hours
extendedRateToSet = Round.INSTANCE.roundTo(extendedRateToSet,
pumpDescription.getExtendedBolusStep() * 2, null); // *2 because of half hours
// What is current rate of extended bolusing in u/h?
aapsLogger.debug(LTag.PUMP, "setTempBasalAbsolute: Extended bolus in progress: " + (danaPump.isExtendedInProgress()) + " rate: " + danaPump.getExtendedBolusAbsoluteRate() + "U/h duration remaining: " + danaPump.getExtendedBolusRemainingMinutes() + "min");

View file

@ -8,7 +8,7 @@ import org.slf4j.Logger;
public class HistoryEvent implements Comparable<HistoryEvent> {
@SuppressWarnings("deprecation")
private static final Logger log = StacktraceLoggerWrapper.getLogger(HistoryEvent.class);
private static final Logger log = StacktraceLoggerWrapper.Companion.getLogger(HistoryEvent.class);
private int eventYear;
private int eventMonth;

View file

@ -140,6 +140,8 @@ abstract class MedtronicHistoryEntry : MedtronicHistoryEntryInterface {
val bodyLength: Int
get() = sizes[2]
abstract fun toEntryString(): String
override fun toString(): String {
val sb = StringBuilder()
// if (DT == null) {
@ -156,6 +158,7 @@ abstract class MedtronicHistoryEntry : MedtronicHistoryEntryInterface {
sb.append("(")
sb.append(headLength + dateTimeLength + bodyLength)
sb.append(")")
val hasData = hasData()
if (hasData) {
sb.append(", data=$decodedDataAsString")

View file

@ -60,4 +60,9 @@ class CGMSHistoryEntry : MedtronicHistoryEntry() {
fun setDateTime(timeStamp: LocalDateTime, getIndex: Int) {
atechDateTime = (DateTimeUtil.toATechDate(timeStamp.plusMinutes(getIndex * 5)))
}
override fun toEntryString(): String {
// TODO fixme if needed
return toString()
}
}

View file

@ -84,6 +84,45 @@ class PumpHistoryEntry : MedtronicHistoryEntry() {
return atechDateTime < this.atechDateTime
}
override fun toEntryString(): String {
val sb = StringBuilder()
// if (DT == null) {
// Log.e("", "DT is null. RawData=" + ByteUtil.getHex(rawData))
// }
sb.append("PumpHistoryEntry [type=" + StringUtil.getStringInLength(entryType.name, 20))
sb.append(" " + if (DT == null) "null" else StringUtil.getStringInLength(DT, 19))
val hasData = (decodedData.size > 0)
if (hasData) {
if (hasDecodedDataEntry("Object")) {
val oo = getDecodedDataEntry("Object")
sb.append(", $oo")
} else {
sb.append(", data=$decodedDataAsString")
}
} else {
if (head.isNotEmpty()) {
sb.append(", head=")
sb.append(ByteUtil.shortHexString(head))
}
if (datetime.size != 0) {
sb.append(", datetime=")
sb.append(ByteUtil.shortHexString(datetime))
}
if (body.size != 0) {
sb.append(", body=")
sb.append(ByteUtil.shortHexString(body))
}
sb.append(", rawData=")
sb.append(ByteUtil.shortHexString(rawData))
sb.append("]")
}
// sb.append(" Ext: ");
return sb.toString()
}
class Comparator : java.util.Comparator<PumpHistoryEntry> {
override fun compare(o1: PumpHistoryEntry, o2: PumpHistoryEntry): Int {

View file

@ -357,7 +357,7 @@ class MedtronicHistoryData @Inject constructor(
aapsLogger.debug(LTag.PUMP, String.format(Locale.ENGLISH, "ProcessHistoryData: TBRs Processed [count=%d, items=%s]", tbrs.size, gson.toJson(tbrs)))
if (tbrs.isNotEmpty()) {
try {
processTBREntries(tbrs)
processTBREntries(tbrs, rewindRecords)
} catch (ex: Exception) {
aapsLogger.error(LTag.PUMP, "ProcessHistoryData: Error processing TBR entries: " + ex.message, ex)
throw ex
@ -582,7 +582,7 @@ class MedtronicHistoryData @Inject constructor(
}
}
private fun processTBREntries(entryList: MutableList<PumpHistoryEntry>) {
private fun processTBREntries(entryList: MutableList<PumpHistoryEntry>, rewindList: MutableList<PumpHistoryEntry>) {
entryList.reverse()
val tbr = entryList[0].getDecodedDataEntry("Object") as TempBasalPair
// var readOldItem = false
@ -606,7 +606,7 @@ class MedtronicHistoryData @Inject constructor(
val tbrRecords = pumpSyncStorage.getTBRs()
val processList: MutableList<TempBasalProcessDTO> = createTBRProcessList(entryList)
val processList: MutableList<TempBasalProcessDTO> = createTBRProcessList(entryList, rewindList)
if (processList.isNotEmpty()) {
for (tempBasalProcessDTO in processList) {
@ -729,7 +729,8 @@ class MedtronicHistoryData @Inject constructor(
} // collection
}
fun createTBRProcessList(entryList: MutableList<PumpHistoryEntry>) : MutableList<TempBasalProcessDTO> {
fun createTBRProcessList(entryList: MutableList<PumpHistoryEntry>, rewindList: MutableList<PumpHistoryEntry>) : MutableList<TempBasalProcessDTO> {
aapsLogger.debug(LTag.PUMP, "${ProcessHistoryRecord.TBR.description} List (before filter): ${gson.toJson(entryList)}")
@ -795,6 +796,23 @@ class MedtronicHistoryData @Inject constructor(
}
}
// see if rewind items, need to fix any of current tempBasalProcessDTO items (bug 1724)
if (rewindList.isNotEmpty()) {
for (rewindEntry in rewindList) {
for (tempBasalProcessDTO in processList) {
if (tempBasalProcessDTO.itemTwo==null) {
val endTime: Long = DateTimeUtil.getATDWithAddedMinutes(tempBasalProcessDTO.itemOne.atechDateTime, tempBasalProcessDTO.itemOneTbr!!.durationMinutes)
if ((rewindEntry.atechDateTime > tempBasalProcessDTO.itemOne.atechDateTime) &&
(rewindEntry.atechDateTime < endTime)) {
tempBasalProcessDTO.itemTwo = rewindEntry
continue
}
}
}
}
}
return processList
}
@ -1174,7 +1192,7 @@ class MedtronicHistoryData @Inject constructor(
return getFilteredItems(newHistory, entryTypes)
}
private fun getFilteredItems(entryType: PumpHistoryEntryType): MutableList<PumpHistoryEntry> {
fun getFilteredItems(entryType: PumpHistoryEntryType): MutableList<PumpHistoryEntry> {
return getFilteredItems(newHistory, setOf(entryType))
}
@ -1188,7 +1206,7 @@ class MedtronicHistoryData @Inject constructor(
}
}
private fun getFilteredItems(inList: MutableList<PumpHistoryEntry>?, entryType: PumpHistoryEntryType): MutableList<PumpHistoryEntry> {
fun getFilteredItems(inList: MutableList<PumpHistoryEntry>?, entryType: PumpHistoryEntryType): MutableList<PumpHistoryEntry> {
return getFilteredItems(inList, setOf(entryType))
}

View file

@ -3,6 +3,7 @@ package info.nightscout.androidaps.plugins.pump.medtronic.data.dto
import info.nightscout.shared.logging.AAPSLogger
import info.nightscout.androidaps.plugins.pump.common.utils.DateTimeUtil
import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.PumpHistoryEntry
import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.PumpHistoryEntryType
class TempBasalProcessDTO constructor(var itemOne: PumpHistoryEntry,
var aapsLogger: AAPSLogger,
@ -13,7 +14,11 @@ class TempBasalProcessDTO constructor(var itemOne: PumpHistoryEntry,
field = value
if (objectType == ObjectType.TemporaryBasal) {
if (value!=null) {
if (value.entryType == PumpHistoryEntryType.TempBasalCombined) {
itemTwoTbr = value.getDecodedDataEntry("Object") as TempBasalPair
} else {
itemTwoRewind = value
}
} else {
itemTwoTbr = null
}
@ -22,6 +27,7 @@ class TempBasalProcessDTO constructor(var itemOne: PumpHistoryEntry,
var itemOneTbr: TempBasalPair? = null
var itemTwoTbr: TempBasalPair? = null
var itemTwoRewind: PumpHistoryEntry? = null
val atechDateTime: Long
get() = itemOne.atechDateTime
@ -41,6 +47,9 @@ class TempBasalProcessDTO constructor(var itemOne: PumpHistoryEntry,
//aapsLogger.error("Couldn't find TempBasalPair in entry: $itemOne")
return 0
}
} else if (itemTwoRewind!=null) {
val secondsDiff = DateTimeUtil.getATechDateDiferenceAsSeconds(itemOne.atechDateTime, DateTimeUtil.getATDWithAddedSeconds(itemTwo!!.atechDateTime, -2))
return secondsDiff
} else {
//aapsLogger.debug(LTag.PUMP, "Found 2 items for duration: itemOne=$itemOne, itemTwo=$itemTwo")
val secondsDiff = DateTimeUtil.getATechDateDiferenceAsSeconds(itemOne.atechDateTime, itemTwo!!.atechDateTime)

View file

@ -1,10 +1,26 @@
package info.nightscout.androidaps
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.interfaces.ActivePlugin
import info.nightscout.androidaps.interfaces.PumpSync
import info.nightscout.androidaps.interfaces.ResourceHelper
import info.nightscout.androidaps.plugins.bus.RxBus
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil
import info.nightscout.androidaps.plugins.pump.common.sync.PumpSyncStorage
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil
import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.MedtronicPumpHistoryDecoder
import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.PumpHistoryEntry
import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.PumpHistoryEntryType
import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil
import info.nightscout.shared.logging.AAPSLoggerTest
import info.nightscout.androidaps.utils.rx.AapsSchedulers
import info.nightscout.androidaps.utils.rx.TestAapsSchedulers
import info.nightscout.shared.sharedPreferences.SP
import org.junit.Before
import org.junit.Rule
import org.mockito.Answers
import org.mockito.Mock
import org.mockito.Mockito
import org.mockito.junit.MockitoJUnit
import org.mockito.junit.MockitoRule
@ -14,6 +30,28 @@ open class TestBase {
val aapsLogger = AAPSLoggerTest()
val aapsSchedulers: AapsSchedulers = TestAapsSchedulers()
var rxBus: RxBus = RxBus(TestAapsSchedulers(), aapsLogger)
var byteUtil = ByteUtil()
var rileyLinkUtil = RileyLinkUtil()
@Mock lateinit var pumpSync: PumpSync
@Mock lateinit var pumpSyncStorage: PumpSyncStorage
@Mock(answer = Answers.RETURNS_DEEP_STUBS) lateinit var activePlugin: ActivePlugin
@Mock lateinit var sp: SP
@Mock lateinit var rh: ResourceHelper
lateinit var medtronicUtil : MedtronicUtil
lateinit var decoder : MedtronicPumpHistoryDecoder
val packetInjector = HasAndroidInjector {
AndroidInjector {
}
}
// Add a JUnit rule that will setup the @Mock annotated vars and log.
// Another possibility would be to add `MockitoAnnotations.initMocks(this) to the setup method.
@ -34,6 +72,52 @@ open class TestBase {
return uninitialized()
}
fun preProcessListTBR(inputList: MutableList<PumpHistoryEntry>) {
var tbrs: MutableList<PumpHistoryEntry> = mutableListOf()
for (pumpHistoryEntry in inputList) {
if (pumpHistoryEntry.entryType === PumpHistoryEntryType.TempBasalRate ||
pumpHistoryEntry.entryType === PumpHistoryEntryType.TempBasalDuration) {
tbrs.add(pumpHistoryEntry)
}
}
inputList.removeAll(tbrs)
inputList.addAll(preProcessTBRs(tbrs))
sort(inputList)
//return inputList
}
private fun preProcessTBRs(TBRs_Input: MutableList<PumpHistoryEntry>): MutableList<PumpHistoryEntry> {
val tbrs: MutableList<PumpHistoryEntry> = mutableListOf()
val map: MutableMap<String?, PumpHistoryEntry?> = HashMap()
for (pumpHistoryEntry in TBRs_Input) {
if (map.containsKey(pumpHistoryEntry.DT)) {
decoder.decodeTempBasal(map[pumpHistoryEntry.DT]!!, pumpHistoryEntry)
pumpHistoryEntry.setEntryType(medtronicUtil.medtronicPumpModel, PumpHistoryEntryType.TempBasalCombined)
tbrs.add(pumpHistoryEntry)
map.remove(pumpHistoryEntry.DT)
} else {
map[pumpHistoryEntry.DT] = pumpHistoryEntry
}
}
return tbrs
}
private fun sort(list: MutableList<PumpHistoryEntry>) {
// if (list != null && !list.isEmpty()) {
// Collections.sort(list, PumpHistoryEntry.Comparator())
// }
list.sortWith(PumpHistoryEntry.Comparator())
}
@Suppress("Unchecked_Cast")
fun <T> uninitialized(): T = null as T
}

View file

@ -1,113 +0,0 @@
package info.nightscout.androidaps.plugins.pump.medtronic.comm;
//import uk.org.lidalia.slf4jtest.TestLogger;
//import uk.org.lidalia.slf4jtest.TestLoggerFactory;
/**
* Created by andy on 3/10/19.
*/
public class MedtronicHistoryDataUTest {
/*
//TestLogger LOGGER = TestLoggerFactory.getTestLogger(MedtronicHistoryDataUTest.class);
byte[] historyPageData = ByteUtil
.createByteArrayFromString("16 00 12 EC 14 47 13 33 00 14 F2 14 47 13 00 16 01 14 F2 14 47 13 33 00 1C C9 15 47 13 00 16 00 1C C9 15 47 13 33 4E 31 D3 15 47 13 00 16 01 31 D3 15 47 13 33 00 1A F1 15 47 13 00 16 00 1A F1 15 47 13 33 50 1D F1 15 47 13 00 16 01 1D F1 15 47 13 33 50 11 D8 16 47 13 00 16 01 11 D8 16 47 13 33 50 31 FB 16 47 13 00 16 01 31 FB 16 47 13 33 50 12 E3 17 47 13 00 16 01 12 E3 17 47 13 33 00 1E FB 17 47 13 00 16 00 1E FB 17 47 13 33 D8 21 FB 17 47 13 00 16 01 21 FB 17 47 13 07 00 00 05 CC 27 93 6D 27 93 05 0C 00 E8 00 00 00 00 05 CC 05 CC 64 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0C 00 E8 00 00 00 33 00 36 C4 00 48 13 00 16 00 36 C4 00 48 13 33 D8 29 C9 00 48 13 00 16 01 29 C9 00 48 13 33 00 12 E7 00 48 13 00 16 00 12 E7 00 48 13 33 BC 19 C9 01 48 13 00 16 01 19 C9 01 48 13 33 00 26 CE 01 48 13 00 16 00 26 CE 01 48 13 33 44 29 CE 01 48 13 00 16 01 29 CE 01 48 13 33 00 13 D3 01 48 13 00 16 00 13 D3 01 48 13 33 64 31 F1 01 48 13 00 16 01 31 F1 01 48 13 33 00 0B F7 01 48 13 00 16 00 0B F7 01 48 13 33 00 12 D8 02 48 13 00 16 01 12 D8 02 48 13 33 00 10 F1 02 48 13 00 16 00 10 F1 02 48 13 33 00 30 C4 03 48 13 00 16 01 30 C4 03 48 13 33 00 04 CA 03 48 13 00 16 00 04 CA 03 48 13 33 00 2F D3 03 48 13 00 16 01 2F D3 03 48 13 33 00 30 D8 03 48 13 00 16 00 30 D8 03 48 13 33 00 13 E7 03 48 13 00 16 01 13 E7 03 48 13 33 00 2E FB 03 48 13 00 16 00 2E FB 03 48 13 19 00 00 C1 04 08 13 07 00 00 04 0C 28 93 6D 28 93 05 0C 00 E8 00 00 00 00 04 0C 04 0C 64 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0C 00 E8 00 00 00 06 3E 03 7A 19 DC 48 49 13 0C 3E 0C E6 08 09 13 07 00 00 01 E4 29 93 6D 29 93 05 0C 00 E8 00 00 00 00 01 E4 01 E4 64 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0C 00 E8 00 00 00 1A 00 13 D2 0D 0A 13 1A 01 28 D2 0D 0A 13 21 00 2A D8 0D 0A 13 03 00 00 00 0E 2D D9 2D 0A 13 33 98 26 DE 0D 4A 13 00 16 01 26 DE 0D 4A 13 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 5D 70");
MedtronicPumpHistoryDecoder decoder = new MedtronicPumpHistoryDecoder();
// Logger LOGGER = StacktraceLoggerWrapper.getLogger(MedtronicHistoryDataUTest.class);
//@Before
public void setup() {
System.setProperty("org.slf4j.simpleLogger.defaultLogLevel", "trace");
// final TestAppender appender = new TestAppender();
// final Logger logger = Logger.getRootLogger();
// logger.addAppender(appender);
// try {
// Logger.getLogger(MyTest.class).info("Test");
// } finally {
// logger.removeAppender(appender);
// }
}
@Before
public void prepareMocks() throws Exception {
System.setProperty("org.slf4j.simpleLogger.defaultLogLevel", "trace");
when(SP.getString(R.string.key_danars_address, "")).thenReturn("");
//danaRPlugin = DanaRPlugin.getPlugin();
}
//@Test
public void testTBR() throws Exception {
RawHistoryPage historyPage = new RawHistoryPage();
historyPage.appendData(historyPageData);
List<PumpHistoryEntry> pumpHistoryEntries = decoder.processPageAndCreateRecords(historyPage);
System.out.println("PumpHistoryEntries: " + pumpHistoryEntries.size());
Log.d("Test", "Log.d");
//LOGGER.debug("Logger.debug");
for (PumpHistoryEntry pumpHistoryEntry : pumpHistoryEntries) {
Log.d("MedtronicHistoryDataUTest", pumpHistoryEntry.toString());
}
}
public void testRussel() throws Exception {
byte[] historyPageData = ByteUtil
.createByteArrayFromString("06 15 04 F6 00 40 60 01 05 06 36 04 FE 00 40 60 01 05 06 2F 18 1A 00 40 20 C1 05 06 2F 0C 45 00 40 20 C1 05 06 2F 0C 56 00 40 20 C1 05 06 2F 0C 78 00 40 20 C1 05 06 2F 0C AD 00 40 20 C1 05 06 15 04 BA 00 40 40 A1 05 0C 15 0E 40 00 01 05 64 00 0D 44 00 01 05 17 00 14 44 00 01 05 18 00 00 44 00 01 05 21 00 07 44 00 01 05 21 00 0C 4E 00 01 05 07 00 00 00 00 01 85 6D 01 85 06 08 00 2B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 08 00 2B 00 00 00 03 00 00 00 15 00 67 35 02 05 03 00 03 00 03 1C 67 15 02 05 07 00 00 00 40 02 85 6D 02 85 06 08 00 2B 00 00 00 00 00 40 00 40 64 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 08 00 2B 00 00 00 2C 78 39 5F 17 03 05 07 00 00 02 6C 03 85 6D 03 85 06 08 00 2B 00 00 00 00 02 6C 02 6C 64 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 08 00 2B 00 00 00 26 01 33 44 01 04 05 27 03 74 41 01 B2 07 28 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 29 74");
RawHistoryPage historyPage = new RawHistoryPage();
historyPage.appendData(historyPageData);
List<PumpHistoryEntry> pumpHistoryEntries = decoder.processPageAndCreateRecords(historyPage);
System.out.println("PumpHistoryEntries: " + pumpHistoryEntries.size());
Log.d("Test", "Log.d");
//LOGGER.debug("Logger.debug");
for (PumpHistoryEntry pumpHistoryEntry : pumpHistoryEntries) {
Log.d("MedtronicHistoryDataUTest", pumpHistoryEntry.toString());
}
}
// @Test
public void testJRoth_2111() throws Exception {
byte[] historyPageData = ByteUtil
.createByteArrayFromString("01 03 03 00 8E 85 52 48 13 33 00 AB 89 12 48 13 00 16 00 AB 89 12 48 13 33 34 AD 89 12 48 13 00 16 01 AD 89 12 48 13 01 01 01 00 B8 8A 52 48 13 01 08 08 00 9F 8C 52 48 13 33 00 91 8F 12 48 13 00 16 00 91 8F 12 48 13 33 00 92 8F 12 48 13 00 16 03 92 8F 12 48 13 33 00 BA A7 12 48 13 00 16 04 BA A7 12 48 13 01 19 19 00 AF B0 52 48 13 33 00 8C 8A 13 48 13 00 16 04 8C 8A 13 48 13 33 00 9D A8 13 48 13 00 16 04 9D A8 13 48 13 33 00 AA 85 14 48 13 00 16 04 AA 85 14 48 13 33 00 8D A1 14 48 13 00 16 04 8D A1 14 48 13 33 10 89 BA 14 48 13 00 16 01 89 BA 14 48 13 33 00 AD 88 15 48 13 00 16 00 AD 88 15 48 13 33 00 AF 88 15 48 13 00 16 01 AF 88 15 48 13 01 1D 1D 00 95 8D 55 48 13 33 00 95 92 15 48 13 00 16 04 95 92 15 48 13 33 1E B7 9C 15 48 13 00 16 01 B7 9C 15 48 13 33 00 AA A6 15 48 13 00 16 00 AA A6 15 48 13 33 00 AC A6 15 48 13 00 16 04 AC A6 15 48 13 01 02 02 00 B7 A6 55 48 13 01 01 01 00 A6 AC 55 48 13 33 00 B3 8D 16 48 13 00 16 04 B3 8D 16 48 13 33 00 B7 97 16 48 13 00 16 04 B7 97 16 48 13 33 18 A7 B2 16 48 13 00 16 01 A7 B2 16 48 13 33 00 8B B8 16 48 13 00 16 00 8B B8 16 48 13 33 00 8D B8 16 48 13 00 16 03 8D B8 16 48 13 33 18 AE 85 17 48 13 00 16 01 AE 85 17 48 13 33 00 92 8A 17 48 13 00 16 00 92 8A 17 48 13 33 00 94 8A 17 48 13 00 16 01 94 8A 17 48 13 01 02 02 00 9F 8A 57 48 13 33 06 AC 8F 17 48 13 00 16 01 AC 8F 17 48 13 01 02 02 00 B8 8F 57 48 13 33 00 98 94 17 48 13 00 16 00 98 94 17 48 13 33 0C 9A 94 17 48 13 00 16 01 9A 94 17 48 13 01 02 02 00 A5 94 57 48 13 33 00 9C 99 17 48 13 00 16 00 9C 99 17 48 13 33 00 9E 99 17 48 13 00 16 01 9E 99 17 48 13 01 02 02 00 A9 99 57 48 13 01 02 02 00 84 9F 57 48 13 01 02 02 00 A7 A6 57 48 13 33 00 A4 AB 17 48 13 00 16 00 A4 AB 17 48 13 01 02 02 00 B0 AB 57 48 13 33 00 A7 B0 17 48 13 00 16 02 A7 B0 17 48 13 01 01 01 00 B2 B0 57 48 13 33 00 AD BA 17 48 13 00 16 04 AD BA 17 48 13 07 00 00 05 3A A8 13 6D A8 13 05 0C 00 E8 00 00 00 00 05 3A 00 F6 12 04 44 52 00 00 04 44 52 00 00 00 00 00 00 04 44 64 35 00 00 00 35 0C 00 E8 00 00 00 06 0A 1D 66 80 81 60 09 13 0C 0A 8D 82 00 09 13 1A 00 9A 82 00 09 13 1A 01 AF 82 00 09 13 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 05 28");
RawHistoryPage historyPage = new RawHistoryPage();
historyPage.appendData(historyPageData);
List<PumpHistoryEntry> pumpHistoryEntries = decoder.processPageAndCreateRecords(historyPage);
System.out.println("PumpHistoryEntries: " + pumpHistoryEntries.size());
Log.d("Test", "Log.d");
//LOGGER.debug("Logger.debug");
for (PumpHistoryEntry pumpHistoryEntry : pumpHistoryEntries) {
Log.d("MedtronicHistoryDataUTest", pumpHistoryEntry.toString());
}
}
*/
}

View file

@ -0,0 +1,186 @@
package info.nightscout.androidaps.plugins.pump.medtronic.comm
import android.util.Log
import info.nightscout.androidaps.TestBase
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil
import org.mockito.Mock
import info.nightscout.androidaps.plugins.bus.RxBus
import info.nightscout.androidaps.interfaces.ResourceHelper
import info.nightscout.androidaps.plugins.pump.common.defs.PumpType
import info.nightscout.shared.sharedPreferences.SP
import info.nightscout.shared.logging.AAPSLogger
import info.nightscout.shared.logging.AAPSLoggerTest
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil
import info.nightscout.androidaps.plugins.pump.medtronic.driver.MedtronicPumpStatus
import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil
import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.MedtronicPumpHistoryDecoder
import kotlin.Throws
import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.RawHistoryPage
import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.PumpHistoryEntry
import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.PumpHistoryEntryType
import info.nightscout.androidaps.plugins.pump.medtronic.data.MedtronicHistoryData
import info.nightscout.androidaps.plugins.pump.medtronic.data.dto.TempBasalProcessDTO
import info.nightscout.androidaps.plugins.pump.medtronic.defs.MedtronicDeviceType
import info.nightscout.androidaps.utils.rx.TestAapsSchedulers
import info.nightscout.androidaps.utils.serialisation.SealedClassHelper.gson
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.ArgumentMatchers
import org.mockito.Mockito
import org.mockito.MockitoAnnotations
import java.lang.Exception
//import uk.org.lidalia.slf4jtest.TestLogger;
//import uk.org.lidalia.slf4jtest.TestLoggerFactory;
/**
* Created by andy on 3/10/19.
*/
class MedtronicHistoryDataUTest : TestBase() {
//TestLogger LOGGER = TestLoggerFactory.getTestLogger(MedtronicHistoryDataUTest.class);
// var historyPageData = ByteUtil
// .createByteArrayFromString(
// "16 00 12 EC 14 47 13 33 00 14 F2 14 47 13 00 16 01 14 F2 14 47 13 33 00 1C C9 15 47 13 00 16 00 1C C9 15 47 13 33 4E 31 D3 15 47 13 00 16 01 31 D3 15 47 13 33 00 1A F1 15 47 13 00 16 00 1A F1 15 47 13 33 50 1D F1 15 47 13 00 16 01 1D F1 15 47 13 33 50 11 D8 16 47 13 00 16 01 11 D8 16 47 13 33 50 31 FB 16 47 13 00 16 01 31 FB 16 47 13 33 50 12 E3 17 47 13 00 16 01 12 E3 17 47 13 33 00 1E FB 17 47 13 00 16 00 1E FB 17 47 13 33 D8 21 FB 17 47 13 00 16 01 21 FB 17 47 13 07 00 00 05 CC 27 93 6D 27 93 05 0C 00 E8 00 00 00 00 05 CC 05 CC 64 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0C 00 E8 00 00 00 33 00 36 C4 00 48 13 00 16 00 36 C4 00 48 13 33 D8 29 C9 00 48 13 00 16 01 29 C9 00 48 13 33 00 12 E7 00 48 13 00 16 00 12 E7 00 48 13 33 BC 19 C9 01 48 13 00 16 01 19 C9 01 48 13 33 00 26 CE 01 48 13 00 16 00 26 CE 01 48 13 33 44 29 CE 01 48 13 00 16 01 29 CE 01 48 13 33 00 13 D3 01 48 13 00 16 00 13 D3 01 48 13 33 64 31 F1 01 48 13 00 16 01 31 F1 01 48 13 33 00 0B F7 01 48 13 00 16 00 0B F7 01 48 13 33 00 12 D8 02 48 13 00 16 01 12 D8 02 48 13 33 00 10 F1 02 48 13 00 16 00 10 F1 02 48 13 33 00 30 C4 03 48 13 00 16 01 30 C4 03 48 13 33 00 04 CA 03 48 13 00 16 00 04 CA 03 48 13 33 00 2F D3 03 48 13 00 16 01 2F D3 03 48 13 33 00 30 D8 03 48 13 00 16 00 30 D8 03 48 13 33 00 13 E7 03 48 13 00 16 01 13 E7 03 48 13 33 00 2E FB 03 48 13 00 16 00 2E FB 03 48 13 19 00 00 C1 04 08 13 07 00 00 04 0C 28 93 6D 28 93 05 0C 00 E8 00 00 00 00 04 0C 04 0C 64 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0C 00 E8 00 00 00 06 3E 03 7A 19 DC 48 49 13 0C 3E 0C E6 08 09 13 07 00 00 01 E4 29 93 6D 29 93 05 0C 00 E8 00 00 00 00 01 E4 01 E4 64 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0C 00 E8 00 00 00 1A 00 13 D2 0D 0A 13 1A 01 28 D2 0D 0A 13 21 00 2A D8 0D 0A 13 03 00 00 00 0E 2D D9 2D 0A 13 33 98 26 DE 0D 4A 13 00 16 01 26 DE 0D 4A 13 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 5D 70"
// )
//lateinit var rxBus: RxBus
lateinit var medtronicHistoryData: MedtronicHistoryData
lateinit var medtronicPumpStatus : MedtronicPumpStatus
@Before
fun setup() {
MockitoAnnotations.initMocks(this)
rxBus = RxBus(TestAapsSchedulers(), aapsLogger)
medtronicPumpStatus = MedtronicPumpStatus(
rh, sp, rxBus,
rileyLinkUtil
)
medtronicUtil = MedtronicUtil(
aapsLogger, rxBus, rileyLinkUtil,
medtronicPumpStatus
)
decoder = MedtronicPumpHistoryDecoder(
aapsLogger,
medtronicUtil, byteUtil
)
medtronicHistoryData = MedtronicHistoryData(packetInjector, aapsLogger, sp, rh, rxBus, activePlugin,
medtronicUtil, decoder,
medtronicPumpStatus,
pumpSync,
pumpSyncStorage)
System.setProperty("org.slf4j.simpleLogger.defaultLogLevel", "trace")
}
//@Test
@Throws(Exception::class) fun testTBR() {
var historyPageData = ByteUtil
.createByteArrayFromString(
"16 00 12 EC 14 47 13 33 00 14 F2 14 47 13 00 16 01 14 F2 14 47 13 33 00 1C C9 15 47 13 00 16 00 1C C9 15 47 13 33 4E 31 D3 15 47 13 00 16 01 31 D3 15 47 13 33 00 1A F1 15 47 13 00 16 00 1A F1 15 47 13 33 50 1D F1 15 47 13 00 16 01 1D F1 15 47 13 33 50 11 D8 16 47 13 00 16 01 11 D8 16 47 13 33 50 31 FB 16 47 13 00 16 01 31 FB 16 47 13 33 50 12 E3 17 47 13 00 16 01 12 E3 17 47 13 33 00 1E FB 17 47 13 00 16 00 1E FB 17 47 13 33 D8 21 FB 17 47 13 00 16 01 21 FB 17 47 13 07 00 00 05 CC 27 93 6D 27 93 05 0C 00 E8 00 00 00 00 05 CC 05 CC 64 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0C 00 E8 00 00 00 33 00 36 C4 00 48 13 00 16 00 36 C4 00 48 13 33 D8 29 C9 00 48 13 00 16 01 29 C9 00 48 13 33 00 12 E7 00 48 13 00 16 00 12 E7 00 48 13 33 BC 19 C9 01 48 13 00 16 01 19 C9 01 48 13 33 00 26 CE 01 48 13 00 16 00 26 CE 01 48 13 33 44 29 CE 01 48 13 00 16 01 29 CE 01 48 13 33 00 13 D3 01 48 13 00 16 00 13 D3 01 48 13 33 64 31 F1 01 48 13 00 16 01 31 F1 01 48 13 33 00 0B F7 01 48 13 00 16 00 0B F7 01 48 13 33 00 12 D8 02 48 13 00 16 01 12 D8 02 48 13 33 00 10 F1 02 48 13 00 16 00 10 F1 02 48 13 33 00 30 C4 03 48 13 00 16 01 30 C4 03 48 13 33 00 04 CA 03 48 13 00 16 00 04 CA 03 48 13 33 00 2F D3 03 48 13 00 16 01 2F D3 03 48 13 33 00 30 D8 03 48 13 00 16 00 30 D8 03 48 13 33 00 13 E7 03 48 13 00 16 01 13 E7 03 48 13 33 00 2E FB 03 48 13 00 16 00 2E FB 03 48 13 19 00 00 C1 04 08 13 07 00 00 04 0C 28 93 6D 28 93 05 0C 00 E8 00 00 00 00 04 0C 04 0C 64 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0C 00 E8 00 00 00 06 3E 03 7A 19 DC 48 49 13 0C 3E 0C E6 08 09 13 07 00 00 01 E4 29 93 6D 29 93 05 0C 00 E8 00 00 00 00 01 E4 01 E4 64 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0C 00 E8 00 00 00 1A 00 13 D2 0D 0A 13 1A 01 28 D2 0D 0A 13 21 00 2A D8 0D 0A 13 03 00 00 00 0E 2D D9 2D 0A 13 33 98 26 DE 0D 4A 13 00 16 01 26 DE 0D 4A 13 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 5D 70"
)
val historyPage = RawHistoryPage(aapsLogger)
historyPage.appendData(historyPageData)
val pumpHistoryEntries: List<PumpHistoryEntry> = decoder.processPageAndCreateRecords(historyPage)
println("PumpHistoryEntries: " + pumpHistoryEntries.size)
Log.d("Test", "Log.d")
//LOGGER.debug("Logger.debug");
for (pumpHistoryEntry in pumpHistoryEntries) {
Log.d("MedtronicHistoryDataUTest", pumpHistoryEntry.toString())
}
}
@Throws(Exception::class) fun testRussel() {
val historyPageData = ByteUtil
.createByteArrayFromString(
"06 15 04 F6 00 40 60 01 05 06 36 04 FE 00 40 60 01 05 06 2F 18 1A 00 40 20 C1 05 06 2F 0C 45 00 40 20 C1 05 06 2F 0C 56 00 40 20 C1 05 06 2F 0C 78 00 40 20 C1 05 06 2F 0C AD 00 40 20 C1 05 06 15 04 BA 00 40 40 A1 05 0C 15 0E 40 00 01 05 64 00 0D 44 00 01 05 17 00 14 44 00 01 05 18 00 00 44 00 01 05 21 00 07 44 00 01 05 21 00 0C 4E 00 01 05 07 00 00 00 00 01 85 6D 01 85 06 08 00 2B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 08 00 2B 00 00 00 03 00 00 00 15 00 67 35 02 05 03 00 03 00 03 1C 67 15 02 05 07 00 00 00 40 02 85 6D 02 85 06 08 00 2B 00 00 00 00 00 40 00 40 64 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 08 00 2B 00 00 00 2C 78 39 5F 17 03 05 07 00 00 02 6C 03 85 6D 03 85 06 08 00 2B 00 00 00 00 02 6C 02 6C 64 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 08 00 2B 00 00 00 26 01 33 44 01 04 05 27 03 74 41 01 B2 07 28 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 29 74"
)
val historyPage = RawHistoryPage(aapsLogger)
historyPage.appendData(historyPageData)
val pumpHistoryEntries: List<PumpHistoryEntry> = decoder.processPageAndCreateRecords(historyPage)
println("PumpHistoryEntries: " + pumpHistoryEntries.size)
Log.d("Test", "Log.d")
//LOGGER.debug("Logger.debug");
for (pumpHistoryEntry in pumpHistoryEntries) {
Log.d("MedtronicHistoryDataUTest", pumpHistoryEntry.toString())
}
}
// @Test
@Throws(Exception::class) fun testJRoth_2111() {
val historyPageData = ByteUtil
.createByteArrayFromString(
"01 03 03 00 8E 85 52 48 13 33 00 AB 89 12 48 13 00 16 00 AB 89 12 48 13 33 34 AD 89 12 48 13 00 16 01 AD 89 12 48 13 01 01 01 00 B8 8A 52 48 13 01 08 08 00 9F 8C 52 48 13 33 00 91 8F 12 48 13 00 16 00 91 8F 12 48 13 33 00 92 8F 12 48 13 00 16 03 92 8F 12 48 13 33 00 BA A7 12 48 13 00 16 04 BA A7 12 48 13 01 19 19 00 AF B0 52 48 13 33 00 8C 8A 13 48 13 00 16 04 8C 8A 13 48 13 33 00 9D A8 13 48 13 00 16 04 9D A8 13 48 13 33 00 AA 85 14 48 13 00 16 04 AA 85 14 48 13 33 00 8D A1 14 48 13 00 16 04 8D A1 14 48 13 33 10 89 BA 14 48 13 00 16 01 89 BA 14 48 13 33 00 AD 88 15 48 13 00 16 00 AD 88 15 48 13 33 00 AF 88 15 48 13 00 16 01 AF 88 15 48 13 01 1D 1D 00 95 8D 55 48 13 33 00 95 92 15 48 13 00 16 04 95 92 15 48 13 33 1E B7 9C 15 48 13 00 16 01 B7 9C 15 48 13 33 00 AA A6 15 48 13 00 16 00 AA A6 15 48 13 33 00 AC A6 15 48 13 00 16 04 AC A6 15 48 13 01 02 02 00 B7 A6 55 48 13 01 01 01 00 A6 AC 55 48 13 33 00 B3 8D 16 48 13 00 16 04 B3 8D 16 48 13 33 00 B7 97 16 48 13 00 16 04 B7 97 16 48 13 33 18 A7 B2 16 48 13 00 16 01 A7 B2 16 48 13 33 00 8B B8 16 48 13 00 16 00 8B B8 16 48 13 33 00 8D B8 16 48 13 00 16 03 8D B8 16 48 13 33 18 AE 85 17 48 13 00 16 01 AE 85 17 48 13 33 00 92 8A 17 48 13 00 16 00 92 8A 17 48 13 33 00 94 8A 17 48 13 00 16 01 94 8A 17 48 13 01 02 02 00 9F 8A 57 48 13 33 06 AC 8F 17 48 13 00 16 01 AC 8F 17 48 13 01 02 02 00 B8 8F 57 48 13 33 00 98 94 17 48 13 00 16 00 98 94 17 48 13 33 0C 9A 94 17 48 13 00 16 01 9A 94 17 48 13 01 02 02 00 A5 94 57 48 13 33 00 9C 99 17 48 13 00 16 00 9C 99 17 48 13 33 00 9E 99 17 48 13 00 16 01 9E 99 17 48 13 01 02 02 00 A9 99 57 48 13 01 02 02 00 84 9F 57 48 13 01 02 02 00 A7 A6 57 48 13 33 00 A4 AB 17 48 13 00 16 00 A4 AB 17 48 13 01 02 02 00 B0 AB 57 48 13 33 00 A7 B0 17 48 13 00 16 02 A7 B0 17 48 13 01 01 01 00 B2 B0 57 48 13 33 00 AD BA 17 48 13 00 16 04 AD BA 17 48 13 07 00 00 05 3A A8 13 6D A8 13 05 0C 00 E8 00 00 00 00 05 3A 00 F6 12 04 44 52 00 00 04 44 52 00 00 00 00 00 00 04 44 64 35 00 00 00 35 0C 00 E8 00 00 00 06 0A 1D 66 80 81 60 09 13 0C 0A 8D 82 00 09 13 1A 00 9A 82 00 09 13 1A 01 AF 82 00 09 13 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 05 28"
)
val historyPage = RawHistoryPage(aapsLogger)
historyPage.appendData(historyPageData)
val pumpHistoryEntries: List<PumpHistoryEntry> = decoder.processPageAndCreateRecords(historyPage)
println("PumpHistoryEntries: " + pumpHistoryEntries.size)
Log.d("Test", "Log.d")
//LOGGER.debug("Logger.debug");
for (pumpHistoryEntry in pumpHistoryEntries) {
Log.d("MedtronicHistoryDataUTest", pumpHistoryEntry.toString())
}
}
@Test @Throws(Exception::class) fun test_1724() {
val historyPageData = ByteUtil
.createByteArrayFromString(
"33 20 53 78 15 51 16 00 16 01 53 78 15 51 16 33 00 6F 40 16 51 16 00 16 00 6F 40 16 51 16 7B 16 6F 40 16 11 16 2C 1E 00 33 30 71 40 16 51 16 00 16 01 71 40 16 51 16 33 00 6E 45 16 51 16 00 16 00 6E 45 16 51 16 7B 16 6E 45 16 11 16 2C 1E 00 33 3A 70 45 16 51 16 00 16 01 70 45 16 51 16 33 00 71 5E 16 51 16 00 16 00 71 5E 16 51 16 7B 16 71 5E 16 11 16 2C 1E 00 33 40 73 5E 16 51 16 00 16 01 73 5E 16 51 16 33 00 74 6D 16 51 16 00 16 00 74 6D 16 51 16 7B 16 74 6D 16 11 16 2C 1E 00 33 14 76 6D 16 51 16 00 16 01 76 6D 16 51 16 33 00 77 72 16 51 16 00 16 00 77 72 16 51 16 7B 16 77 72 16 11 16 2C 1E 00 7B 17 40 40 17 11 16 2E 1E 00 33 28 51 41 17 51 16 00 16 01 51 41 17 51 16 33 00 56 46 17 51 16 00 16 00 56 46 17 51 16 7B 17 56 46 17 11 16 2E 1E 00 33 34 59 46 17 51 16 00 16 01 59 46 17 51 16 33 00 70 4A 17 51 16 00 16 00 70 4A 17 51 16 7B 17 70 4A 17 11 16 2E 1E 00 33 58 72 4A 17 51 16 00 16 01 72 4A 17 51 16 33 00 6E 59 17 51 16 00 16 00 6E 59 17 51 16 7B 17 6E 59 17 11 16 2E 1E 00 33 18 70 59 17 51 16 00 16 01 70 59 17 51 16 33 00 70 5E 17 51 16 00 16 00 70 5E 17 51 16 7B 17 70 5E 17 11 16 2E 1E 00 33 0C 72 5E 17 51 16 00 16 01 72 5E 17 51 16 33 00 72 63 17 51 16 00 16 00 72 63 17 51 16 7B 17 72 63 17 11 16 2E 1E 00 33 1C 70 72 17 51 16 00 16 01 70 72 17 51 16 33 00 51 78 17 51 16 00 16 00 51 78 17 51 16 7B 17 52 78 17 11 16 2E 1E 00 33 12 54 78 17 51 16 00 16 01 54 78 17 51 16 07 00 00 04 4E 51 96 00 00 00 6E 51 96 05 00 00 00 00 00 00 00 04 4E 03 A2 54 00 AC 10 00 00 00 00 00 00 00 00 00 AC 00 00 00 24 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 33 00 46 46 00 52 16 00 16 00 46 46 00 52 16 7B 00 47 46 00 12 16 00 1E 00 33 20 47 64 00 52 16 00 16 01 47 64 00 52 16 33 00 6D 77 00 52 16 00 16 00 6D 77 00 52 16 7B 00 6D 77 00 12 16 00 1E 00 33 12 70 77 00 52 16 00 16 01 70 77 00 52 16 33 00 58 78 00 52 16 00 16 00 58 78 00 52 16 7B 00 59 78 00 12 16 00 1E 00 33 00 5C 78 00 52 16 00 16 02 5C 78 00 52 16 21 00 66 79 00 12 16 03 00 00 00 9C 74 42 21 12 16 03 00 03 00 03 6E 4D 01 12 16 33 00 79 4E 01 52 16 00 16 00 79 4E 01 52 16 7B 01 79 4E 01 12 16 02 1E 00 33 2A 6B 4F 01 52 16 00 16 01 6B 4F 01 52 16 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2E D1"
//"33 20 53 78 15 51 16 00 16 01 53 78 15 51 16 33 00 6F 40 16 51 16 00 16 00 6F 40 16 51 16 7B 16 6F 40 16 11 16 2C 1E 00 33 30 71 40 16 51 16 00 16 01 71 40 16 51 16 33 00 6E 45
// 16 51 16 00 16 00 6E 45 16 51 16 7B 16 6E 45 16 11 16 2C 1E 00 33 3A 70 45 16 51 16 00 16 01 70 45 16 51 16 33 00 71 5E 16 51 16 00 16 00 71 5E 16 51 16 7B 16 71 5E 16 11 16 2C 1E 00 33 40 73 5E 16 51 16 00 16 01 73 5E 16 51 16 33 00 74 6D 16 51 16 00 16 00 74 6D 16 51 16 7B 16 74 6D 16 11 16 2C 1E 00 33 14 76 6D 16 51 16 00 16 01 76 6D 16 51 16 33 00 77 72 16 51 16 00 16 00 77 72 16 51 16 7B 16 77 72 16 11 16 2C 1E 00 7B 17 40 40 17 11 16 2E 1E 00 33 28 51 41 17 51 16 00 16 01 51 41 17 51 16 33 00 56 46 17 51 16 00 16 00 56 46 17 51 16 7B 17 56 46 17 11 16 2E 1E 00 33 34 59 46 17 51 16 00 16 01 59 46 17 51 16 33 00 70 4A 17 51 16 00 16 00 70 4A 17 51 16 7B 17 70 4A 17 11 16 2E 1E 00 33 58 72 4A 17 51 16 00 16 01 72 4A 17 51 16 33 00 6E 59 17 51 16 00 16 00 6E 59 17 51 16 7B 17 6E 59 17 11 16 2E 1E 00 33 18 70 59 17 51 16 00 16 01 70 59 17 51 16 33 00 70 5E 17 51 16 00 16 00 70 5E 17 51 16 7B 17 70 5E 17 11 16 2E 1E 00 33 0C 72 5E 17 51 16 00 16 01 72 5E 17 51 16 33 00 72 63 17 51 16 00 16 00 72 63 17 51 16 7B 17 72 63 17 11 16 2E 1E 00 33 1C 70 72 17 51 16 00 16 01 70 72 17 51 16 33 00 51 78 17 51 16 00 16 00 51 78 17 51 16 7B 17 52 78 17 11 16 2E 1E 00 33 12 54 78 17 51 16 00 16 01 54 78 17 51 16 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 4D 6D"
)
medtronicUtil.medtronicPumpModel =MedtronicDeviceType.Medtronic_723_Revel
medtronicUtil.isModelSet = true
val historyPage = RawHistoryPage(aapsLogger)
historyPage.appendData(historyPageData)
val pumpHistoryEntries: MutableList<PumpHistoryEntry> = decoder.processPageAndCreateRecords(historyPage)
println("PumpHistoryEntries: " + pumpHistoryEntries.size)
val rewindRecords: MutableList<PumpHistoryEntry> = medtronicHistoryData.getFilteredItems(pumpHistoryEntries, PumpHistoryEntryType.Rewind)
preProcessListTBR(pumpHistoryEntries)
println("PumpHistoryEntries: after: " + pumpHistoryEntries.size)
Log.d("Test", "Log.d")
//LOGGER.debug("Logger.debug");
for (pumpHistoryEntry in pumpHistoryEntries) {
println(pumpHistoryEntry.toEntryString())
}
println("PumpHistoryEntries: after: " + pumpHistoryEntries.size)
val tbrs: MutableList<PumpHistoryEntry> = medtronicHistoryData.getFilteredItems(pumpHistoryEntries, PumpHistoryEntryType.TempBasalCombined)
tbrs.reverse()
println("PumpHistoryEntries: getFilteredItems: " + tbrs.size)
println("PumpHistoryEntries: getRewindItems: $rewindRecords.size : " + gson.toJson(rewindRecords) )
val processList: MutableList<TempBasalProcessDTO> = medtronicHistoryData.createTBRProcessList(tbrs, rewindRecords)
println("PumpHistoryEntries: processList: " + processList.size)
for (tempBasalProcessDTO in processList) {
println(tempBasalProcessDTO.toTreatmentString())
}
}
}

View file

@ -1,8 +1,7 @@
package info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump
import dagger.android.HasAndroidInjector
//import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.TestBase
import info.nightscout.androidaps.interfaces.ActivePlugin
import info.nightscout.androidaps.plugins.bus.RxBus
import info.nightscout.androidaps.plugins.pump.common.hw.rileylink.RileyLinkUtil
import info.nightscout.androidaps.plugins.pump.common.utils.ByteUtil
@ -10,13 +9,11 @@ import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.RawHistory
import info.nightscout.androidaps.plugins.pump.medtronic.defs.MedtronicDeviceType
import info.nightscout.androidaps.plugins.pump.medtronic.driver.MedtronicPumpStatus
import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil
import info.nightscout.androidaps.interfaces.ResourceHelper
import info.nightscout.androidaps.utils.rx.TestAapsSchedulers
import info.nightscout.shared.sharedPreferences.SP
import org.junit.Assert
import org.junit.Before
import org.junit.Ignore
import org.junit.Test
import org.mockito.Answers
import org.mockito.Mock
/**
@ -25,16 +22,17 @@ import org.mockito.Mock
@Suppress("SpellCheckingInspection")
class MedtronicPumpHistoryDecoderUTest : TestBase() {
@Mock lateinit var injector: HasAndroidInjector
@Mock lateinit var rh: ResourceHelper
@Mock(answer = Answers.RETURNS_DEEP_STUBS) lateinit var activePlugin: ActivePlugin
@Mock lateinit var rileyLinkUtil: RileyLinkUtil
@Mock lateinit var sp: SP
//@Mock lateinit var injector: HasAndroidInjector
//@Mock lateinit var rh: ResourceHelper
// @Mock(answer = Answers.RETURNS_DEEP_STUBS) lateinit var activePlugin: ActivePlugin
//@Mock lateinit var rileyLinkUtil: RileyLinkUtil
//@Mock lateinit var sp: SP
private var medtronicPumpStatus: MedtronicPumpStatus? = null
private var medtronicUtil: MedtronicUtil? = null
private var decoder: MedtronicPumpHistoryDecoder? = null
//private var medtronicUtil: MedtronicUtil? = null
//private var decoder: MedtronicPumpHistoryDecoder? = null
var rxBusWrapper = RxBus(TestAapsSchedulers(), aapsLogger)
@Before fun setup() {
medtronicPumpStatus =
MedtronicPumpStatus(rh, sp, rxBusWrapper, rileyLinkUtil)

View file

@ -1,14 +1,14 @@
package info.nightscout.androidaps.plugins.pump.medtronic.data
import java.lang.reflect.Type
import com.google.gson.reflect.TypeToken
import com.google.gson.Gson
import com.google.gson.internal.LinkedTreeMap
import com.google.gson.reflect.TypeToken
import dagger.android.AndroidInjector
import dagger.android.HasAndroidInjector
// import dagger.android.AndroidInjector
// import dagger.android.HasAndroidInjector
import info.nightscout.androidaps.TestBase
import info.nightscout.androidaps.interfaces.ActivePlugin
import info.nightscout.androidaps.interfaces.PumpSync
import info.nightscout.androidaps.interfaces.ResourceHelper
import info.nightscout.androidaps.plugins.bus.RxBus
import info.nightscout.androidaps.plugins.pump.common.sync.PumpSyncStorage
import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.MedtronicPumpHistoryDecoder
@ -16,39 +16,55 @@ import info.nightscout.androidaps.plugins.pump.medtronic.comm.history.pump.PumpH
import info.nightscout.androidaps.plugins.pump.medtronic.data.dto.TempBasalPair
import info.nightscout.androidaps.plugins.pump.medtronic.driver.MedtronicPumpStatus
import info.nightscout.androidaps.plugins.pump.medtronic.util.MedtronicUtil
import info.nightscout.androidaps.interfaces.ResourceHelper
import info.nightscout.shared.sharedPreferences.SP
import org.junit.Before
import org.junit.Ignore
import org.junit.Test
import org.mockito.Mock
import java.lang.reflect.Type
@Suppress("UNCHECKED_CAST") class MedtronicHistoryDataUTest : TestBase() {
@Suppress("UNCHECKED_CAST")
class MedtronicHistoryDataUTest : TestBase() {
@Mock lateinit var activePlugin: ActivePlugin
@Mock lateinit var medtronicUtil: MedtronicUtil
@Mock lateinit var medtronicPumpHistoryDecoder: MedtronicPumpHistoryDecoder
//@Mock lateinit var activePlugin: ActivePlugin
//@Mock lateinit var medtronicUtil: MedtronicUtil
//@Mock lateinit var medtronicPumpHistoryDecoder: MedtronicPumpHistoryDecoder
@Mock lateinit var medtronicPumpStatus: MedtronicPumpStatus
@Mock lateinit var pumpSync: PumpSync
@Mock lateinit var pumpSyncStorage: PumpSyncStorage
@Mock lateinit var sp: SP
@Mock lateinit var rh: ResourceHelper
@Mock lateinit var rxBus: RxBus
// @Mock lateinit var pumpSync: PumpSync
// @Mock lateinit var pumpSyncStorage: PumpSyncStorage
private val packetInjector = HasAndroidInjector {
AndroidInjector {
//@Mock lateinit var rxBus: RxBus
// val packetInjector = HasAndroidInjector {
// AndroidInjector {
//
// }
// }
@Before
fun setUp() {
medtronicUtil = MedtronicUtil(
aapsLogger, rxBus, rileyLinkUtil,
medtronicPumpStatus
)
decoder = MedtronicPumpHistoryDecoder(
aapsLogger,
medtronicUtil, byteUtil
)
}
}
@Test
fun createTBRProcessList() {
val unitToTest = MedtronicHistoryData(
packetInjector, aapsLogger, sp, rh, rxBus, activePlugin,
medtronicUtil, medtronicPumpHistoryDecoder,
var unitToTest = MedtronicHistoryData(packetInjector, aapsLogger, sp, rh, rxBus, activePlugin,
medtronicUtil, decoder,
medtronicPumpStatus,
pumpSync,
pumpSyncStorage
)
pumpSyncStorage)
val gson = Gson()
@ -58,26 +74,26 @@ import java.lang.reflect.Type
val yourClassList: MutableList<PumpHistoryEntry> = gson.fromJson(fileText, listType)
for (pumpHistoryEntry in yourClassList) {
val stringObject = pumpHistoryEntry.decodedData["Object"] as LinkedTreeMap<String, Any>
val stringObject = pumpHistoryEntry.decodedData["Object"] as LinkedTreeMap<String,Object>
val rate: Double = stringObject["insulinRate"] as Double
val durationMinutes: Double = stringObject["durationMinutes"] as Double
val durationMinutesInt: Int = durationMinutes.toInt()
val rate : Double = stringObject.get("insulinRate") as Double
val durationMinutes: Double = stringObject.get("durationMinutes") as Double
val durationMinutesInt : Int = durationMinutes.toInt()
val tmbPair = TempBasalPair(rate, false, durationMinutesInt)
var tmbPair = TempBasalPair(rate, false, durationMinutesInt)
pumpHistoryEntry.decodedData.remove("Object")
pumpHistoryEntry.addDecodedData("Object", tmbPair)
}
println("TBR Pre-Process List: " + gson.toJson(yourClassList))
System.out.println("TBR Pre-Process List: " + gson.toJson(yourClassList))
val createTBRProcessList = unitToTest.createTBRProcessList(yourClassList)
val createTBRProcessList = unitToTest.createTBRProcessList(yourClassList, mutableListOf())
println("TBR Process List: " + createTBRProcessList.size)
System.out.println("TBR Process List: " + createTBRProcessList.size)
for (tempBasalProcessDTO in createTBRProcessList) {
println(tempBasalProcessDTO.toTreatmentString())
System.out.println(tempBasalProcessDTO.toTreatmentString())
}
}
@ -85,13 +101,11 @@ import java.lang.reflect.Type
@Test
fun createTBRProcessList_SpecialCase() {
val unitToTest = MedtronicHistoryData(
packetInjector, aapsLogger, sp, rh, rxBus, activePlugin,
medtronicUtil, medtronicPumpHistoryDecoder,
var unitToTest = MedtronicHistoryData(packetInjector, aapsLogger, sp, rh, rxBus, activePlugin,
medtronicUtil, decoder,
medtronicPumpStatus,
pumpSync,
pumpSyncStorage
)
pumpSyncStorage)
val gson = Gson()
@ -101,26 +115,26 @@ import java.lang.reflect.Type
val yourClassList: MutableList<PumpHistoryEntry> = gson.fromJson(fileText, listType)
for (pumpHistoryEntry in yourClassList) {
val stringObject = pumpHistoryEntry.decodedData["Object"] as LinkedTreeMap<String, Any>
val stringObject = pumpHistoryEntry.decodedData["Object"] as LinkedTreeMap<String,Object>
val rate: Double = stringObject["insulinRate"] as Double
val durationMinutes: Double = stringObject["durationMinutes"] as Double
val durationMinutesInt: Int = durationMinutes.toInt()
val rate : Double = stringObject.get("insulinRate") as Double
val durationMinutes: Double = stringObject.get("durationMinutes") as Double
val durationMinutesInt : Int = durationMinutes.toInt()
val tmbPair = TempBasalPair(rate, false, durationMinutesInt)
var tmbPair = TempBasalPair(rate, false, durationMinutesInt)
pumpHistoryEntry.decodedData.remove("Object")
pumpHistoryEntry.addDecodedData("Object", tmbPair)
}
println("TBR Pre-Process List (Special): " + gson.toJson(yourClassList))
System.out.println("TBR Pre-Process List (Special): " + gson.toJson(yourClassList))
val createTBRProcessList = unitToTest.createTBRProcessList(yourClassList)
val createTBRProcessList = unitToTest.createTBRProcessList(yourClassList, mutableListOf())
println("TBR Process List (Special): " + createTBRProcessList.size)
System.out.println("TBR Process List (Special): " + createTBRProcessList.size)
for (tempBasalProcessDTO in createTBRProcessList) {
println(tempBasalProcessDTO.toTreatmentString())
System.out.println(tempBasalProcessDTO.toTreatmentString())
}
}

View file

@ -0,0 +1 @@
33 20 53 78 15 51 16 00 16 01 53 78 15 51 16 33 00 6F 40 16 51 16 00 16 00 6F 40 16 51 16 7B 16 6F 40 16 11 16 2C 1E 00 33 30 71 40 16 51 16 00 16 01 71 40 16 51 16 33 00 6E 45 16 51 16 00 16 00 6E 45 16 51 16 7B 16 6E 45 16 11 16 2C 1E 00 33 3A 70 45 16 51 16 00 16 01 70 45 16 51 16 33 00 71 5E 16 51 16 00 16 00 71 5E 16 51 16 7B 16 71 5E 16 11 16 2C 1E 00 33 40 73 5E 16 51 16 00 16 01 73 5E 16 51 16 33 00 74 6D 16 51 16 00 16 00 74 6D 16 51 16 7B 16 74 6D 16 11 16 2C 1E 00 33 14 76 6D 16 51 16 00 16 01 76 6D 16 51 16 33 00 77 72 16 51 16 00 16 00 77 72 16 51 16 7B 16 77 72 16 11 16 2C 1E 00 7B 17 40 40 17 11 16 2E 1E 00 33 28 51 41 17 51 16 00 16 01 51 41 17 51 16 33 00 56 46 17 51 16 00 16 00 56 46 17 51 16 7B 17 56 46 17 11 16 2E 1E 00 33 34 59 46 17 51 16 00 16 01 59 46 17 51 16 33 00 70 4A 17 51 16 00 16 00 70 4A 17 51 16 7B 17 70 4A 17 11 16 2E 1E 00 33 58 72 4A 17 51 16 00 16 01 72 4A 17 51 16 33 00 6E 59 17 51 16 00 16 00 6E 59 17 51 16 7B 17 6E 59 17 11 16 2E 1E 00 33 18 70 59 17 51 16 00 16 01 70 59 17 51 16 33 00 70 5E 17 51 16 00 16 00 70 5E 17 51 16 7B 17 70 5E 17 11 16 2E 1E 00 33 0C 72 5E 17 51 16 00 16 01 72 5E 17 51 16 33 00 72 63 17 51 16 00 16 00 72 63 17 51 16 7B 17 72 63 17 11 16 2E 1E 00 33 1C 70 72 17 51 16 00 16 01 70 72 17 51 16 33 00 51 78 17 51 16 00 16 00 51 78 17 51 16 7B 17 52 78 17 11 16 2E 1E 00 33 12 54 78 17 51 16 00 16 01 54 78 17 51 16 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 4D 6D

View file

@ -705,7 +705,7 @@ public class OmnipodErosPumpPlugin extends PumpPluginBase implements Pump, Riley
}
if (tbrCurrent != null && !enforceNew) {
if (Round.isSame(tbrCurrent.getRate(), absoluteRate)) {
if (Round.INSTANCE.isSame(tbrCurrent.getRate(), absoluteRate)) {
aapsLogger.info(LTag.PUMP, "setTempBasalAbsolute - No enforceNew and same rate. Exiting.");
return new PumpEnactResult(getInjector()).success(true).enacted(false);
}

View file

@ -45,4 +45,13 @@
<string name="free_text_fields">Champs de texte libre</string>
<string name="agree">Je comprends et je suis d\'accord.</string>
<string name="login_open_humans">Téléchargement vers Open Humans</string>
<string name="final_touches">Touche finale</string>
<string name="uploading_proceed">Vous n\'êtes qu\'à une étape du téléchargement de vos données vers Open Humans. Voulez-vous continuer?</string>
<string name="cancel">Annuler</string>
<string name="proceed">Procéder</string>
<string name="finishing">Finalisation...</string>
<string name="this_may_take_a_few_seconds">Cela peut prendre quelques secondes.</string>
<string name="we_re_done">Nous avons terminé !</string>
<string name="silently_upload_date_note">Désormais, votre téléphone téléversera les données en arrière-plan de temps en temps.</string>
<string name="close">Fermer</string>
</resources>

View file

@ -16,4 +16,36 @@
<string name="you_have_been_signed_out_of_open_humans">你已经从开源人类项目中退出</string>
<string name="click_here_to_sign_in_again_if_this_wasnt_on_purpose">如果不是故意的,请单击此处再次登录。</string>
<string name="upload_now">现在上传</string>
<string name="next">下一个</string>
<string name="welcome_to_open_humans">欢迎使用 Open Humans</string>
<string name="setup_data_upload">要设置数据上传,请单击“下一步”</string>
<string name="consent">同意</string>
<string name="terms_of_use">使用条款</string>
<string name="please_read__information">请仔细阅读以下信息并接受使用条款以继续</string>
<string name="data_uploaded">上传数据</string>
<string name="glucose_values">血糖值</string>
<string name="boluses">大剂量</string>
<string name="extended_boluses">扩展大剂量(方波)</string>
<string name="carbohydrates">碳水化合物</string>
<string name="profile_switches">切换配置文件</string>
<string name="total_daily_doses">每日总剂量</string>
<string name="temporary_basal_rates">临时基础率</string>
<string name="temporary_targets">临时目标</string>
<string name="settings">设置</string>
<string name="application_version">应用程序版本</string>
<string name="device_model">设备型号</string>
<string name="screen_dimensions">屏幕尺寸</string>
<string name="algorithm_debug_data">算法调试数据</string>
<string name="data_not_uploaded">数据未上传</string>
<string name="passwords">密码</string>
<string name="nightscout_url">Nightscout URL(NS网址)</string>
<string name="nightscout_api_secret">Nightscout API密钥</string>
<string name="free_text_fields">空闲文本字段</string>
<string name="agree">我理解并同意</string>
<string name="login_open_humans">登陆到Open Humans</string>
<string name="cancel">取消</string>
<string name="proceed">继续</string>
<string name="finishing">正在完成...</string>
<string name="we_re_done">成功完成!</string>
<string name="close">关闭</string>
</resources>

View file

@ -200,7 +200,7 @@ public abstract class RileyLinkCommunicationManager<T extends RLMessage> {
double[] scanFrequencies = rileyLinkServiceData.rileyLinkTargetFrequency.getScanFrequencies();
if (scanFrequencies.length == 1) {
return Round.isSame(scanFrequencies[0], frequency);
return Round.INSTANCE.isSame(scanFrequencies[0], frequency);
} else {
return (scanFrequencies[0] <= frequency && scanFrequencies[scanFrequencies.length - 1] >= frequency);
}

View file

@ -103,7 +103,8 @@ public class InitializePumpManagerTask extends ServiceTask {
}
} else {
if (!Round.isSame(lastGoodFrequency, RileyLinkTargetFrequency.Omnipod.getScanFrequencies()[0])) {
if (!Round.INSTANCE.isSame(lastGoodFrequency,
RileyLinkTargetFrequency.Omnipod.getScanFrequencies()[0])) {
lastGoodFrequency = RileyLinkTargetFrequency.Omnipod.getScanFrequencies()[0];
lastGoodFrequency = Math.round(lastGoodFrequency * 1000d) / 1000d;

View file

@ -1,12 +1,9 @@
package info.nightscout.shared
import java.lang.Exception
object SafeParse {
// TODO return logging with dagger
// private static Logger log = StacktraceLoggerWrapper.getLogger(SafeParse.class);
@JvmStatic fun stringToDouble(inputString: String?): Double {
fun stringToDouble(inputString: String?): Double {
var input = inputString ?: return 0.0
var result = 0.0
input = input.replace(",", ".")
@ -20,7 +17,7 @@ object SafeParse {
return result
}
@JvmStatic fun stringToFloat(inputString: String?): Float {
fun stringToFloat(inputString: String?): Float {
var input = inputString ?: return 0f
var result = 0f
input = input.replace(",", ".")
@ -34,7 +31,7 @@ object SafeParse {
return result
}
@JvmStatic fun stringToInt(inputString: String?): Int {
fun stringToInt(inputString: String?): Int {
var input = inputString ?: return 0
var result = 0
input = input.replace(",", ".")

View file

@ -32,7 +32,7 @@ class StacktraceLoggerWrapper(private val delegate: Logger) : Logger by delegate
// all other methods will be implemented by delegate
companion object {
@JvmStatic
@Deprecated("please inject AAPSLogger")
fun getLogger(clazz: Class<*>) = StacktraceLoggerWrapper(LoggerFactory.getLogger(clazz))
}

View file

@ -13,11 +13,11 @@ import android.os.Vibrator
import android.support.wearable.watchface.WatchFaceStyle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.view.WindowInsets
import android.view.WindowManager
import android.widget.ImageView
import android.widget.LinearLayout
import android.widget.RelativeLayout
import android.widget.TextView
import androidx.annotation.LayoutRes
import androidx.core.content.ContextCompat
@ -100,14 +100,14 @@ abstract class BaseWatchFace : WatchFace() {
var mDay: TextView? = null
var mDayName: TextView? = null
var mMonth: TextView? = null
var isAAPSv2: TextView? = null
var isAAPSv2: View? = null
var mHighLight: TextView? = null
var mLowLight: TextView? = null
var mGlucoseDial: ImageView? = null
var mDeltaGauge: ImageView? = null
var mHourHand: ImageView? = null
var mMinuteHand: ImageView? = null
var mRelativeLayout: RelativeLayout? = null
var mRelativeLayout: ViewGroup? = null
var mLinearLayout: LinearLayout? = null
var mLinearLayout2: LinearLayout? = null
var mDate: LinearLayout? = null

View file

@ -1,58 +1,61 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent" tools:context=".watchfaces.AapsWatchface" tools:deviceIds="wear_square"
android:background="@color/black"
android:id="@+id/main_layout">
<LinearLayout
android:orientation="vertical"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black"
android:gravity="center_horizontal"
android:orientation="vertical"
android:textAlignment="center"
android:gravity="center_horizontal">
tools:context=".watchfaces.AapsWatchface"
tools:deviceIds="wear_square"
tools:ignore="MissingDefaultResource">
<LinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAlignment="center"
android:paddingTop="5dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="-5dp"
android:gravity="center_horizontal">
android:gravity="center_horizontal"
android:orientation="horizontal"
android:paddingTop="5dp"
android:textAlignment="center">
<TextView
android:id="@+id/delta"
android:textSize="30sp"
android:text="---"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#FFFFFF"
android:layout_gravity="bottom"
android:layout_marginEnd="5dp"
android:gravity="center_horizontal|bottom"
android:layout_marginEnd="5dp" />
android:text="---"
android:textColor="@color/white"
android:textSize="30sp"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/sgv"
android:textSize="41sp"
android:text="---"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#FFFFFF"
android:layout_gravity="center_horizontal"
android:gravity="center_horizontal" />
android:gravity="center_horizontal"
android:text="---"
android:textColor="@color/white"
android:textSize="41sp"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/avgdelta"
android:textSize="30sp"
android:text="---"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#FFFFFF"
android:layout_gravity="bottom"
android:layout_marginStart="5dp"
android:gravity="center_horizontal|bottom"
android:layout_marginStart="5dp" />
android:text="---"
android:textColor="@color/white"
android:textSize="30sp"
tools:ignore="HardcodedText" />
</LinearLayout>
@ -66,43 +69,43 @@
<TextView
android:id="@+id/externaltstatus"
android:textSize="18sp"
android:text="E xU/h IOB: x (x+x)"
android:layout_width="wrap_content"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:layout_gravity="center_horizontal"
android:layout_height="wrap_content"/>
<LinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:textAlignment="center"
android:gravity="center_horizontal">
android:textColor="@color/white"
android:textSize="18sp"
tools:text="E xU/h IOB: x (x+x)" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="horizontal"
android:textAlignment="center">
<TextView
android:id="@+id/watch_time"
android:textSize="35sp"
android:text="12:00"
android:textColor="#FFFFFF"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAlignment="center"
android:layout_gravity="center_horizontal"
android:layout_marginEnd="6dp"
android:layout_gravity="center_horizontal" />
android:textAlignment="center"
android:textColor="@color/white"
android:textSize="35sp"
tools:text="12:00" />
<TextView
android:id="@+id/timestamp"
android:textSize="26sp"
android:text="-- '"
android:layout_width="wrap_content"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_height="wrap_content" />
</LinearLayout>
android:textAlignment="center"
android:textColor="@color/white"
android:textSize="26sp"
tools:text="-- '" />
</LinearLayout>
</RelativeLayout>
</LinearLayout>

View file

@ -1,16 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent" tools:context=".watchfaces.AapsWatchface" tools:deviceIds="wear_square"
android:background="@color/black"
android:id="@+id/main_layout">
<LinearLayout
android:orientation="vertical"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black"
android:gravity="center_horizontal"
android:orientation="vertical"
android:textAlignment="center"
android:gravity="center_horizontal">
tools:context=".watchfaces.AapsWatchface"
tools:deviceIds="wear_square"
tools:ignore="MissingDefaultResource">
<LinearLayout
android:layout_width="wrap_content"
@ -30,8 +30,9 @@
android:layout_marginEnd="5dp"
android:gravity="center_horizontal|bottom"
android:text="---"
android:textColor="#FFFFFF"
android:textSize="24sp" />
android:textColor="@color/white"
android:textSize="24sp"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/sgv"
@ -40,8 +41,9 @@
android:layout_gravity="center_horizontal"
android:gravity="center_horizontal"
android:text="---"
android:textColor="#FFFFFF"
android:textSize="34sp" />
android:textColor="@color/white"
android:textSize="34sp"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/avgdelta"
@ -51,8 +53,9 @@
android:layout_marginStart="5dp"
android:gravity="center_horizontal|bottom"
android:text="---"
android:textColor="#FFFFFF"
android:textSize="24sp" />
android:textColor="@color/white"
android:textSize="24sp"
tools:ignore="HardcodedText" />
</LinearLayout>
@ -62,10 +65,10 @@
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="-5sp"
android:text="E xU/h IOB: x (x+x)"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="18sp" />
android:textColor="@color/white"
android:textSize="18sp"
tools:text="E xU/h IOB: x (x+x)" />
<lecho.lib.hellocharts.view.LineChartView
android:id="@+id/chart"
@ -90,10 +93,10 @@
android:layout_gravity="center_horizontal"
android:layout_marginEnd="6dp"
android:paddingTop="-5sp"
android:text="12:00"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="34sp" />
android:textColor="@color/white"
android:textSize="34sp"
tools:text="12:00" />
<TextView
android:id="@+id/timestamp"
@ -102,10 +105,10 @@
android:layout_gravity="center_vertical|center_horizontal|center"
android:text="--'"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="24sp" />
</LinearLayout>
android:textColor="@color/white"
android:textSize="24sp"
tools:ignore="HardcodedText" />
</LinearLayout>
</RelativeLayout>
</LinearLayout>

View file

@ -1,9 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent" tools:context=".watchfaces.CockpitWatchface" tools:deviceIds="wear_square"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main_layout"
android:background="@drawable/airplane_cockpit_outside_clouds">
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/airplane_cockpit_outside_clouds"
tools:context=".watchfaces.CockpitWatchface"
tools:deviceIds="wear_square"
tools:ignore="MissingDefaultResource">
<LinearLayout
android:id="@+id/inside"
@ -13,32 +17,23 @@
android:orientation="vertical"
android:weightSum="1">
<LinearLayout
<View
android:layout_width="fill_parent"
android:layout_height="0px"
android:orientation="vertical"
android:layout_weight="0.095">
</LinearLayout>
android:layout_weight="0.095" />
<LinearLayout
android:id="@+id/windows"
android:layout_width="fill_parent"
android:layout_height="0px"
android:orientation="vertical"
android:layout_weight="0.2575">
android:layout_weight="0.2575"
android:orientation="horizontal">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:weightSum="1">
<TextView
<View
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_gravity="bottom"
android:layout_weight="0.47" />
android:layout_weight="0.47"
tools:ignore="NestedWeights" />
<LinearLayout
android:id="@+id/warnings"
@ -48,10 +43,9 @@
android:baselineAligned="false"
android:orientation="vertical">
<TextView
<View
android:layout_width="fill_parent"
android:layout_height="0px"
android:layout_gravity="bottom"
android:layout_weight="0.2" />
<TextView
@ -62,16 +56,16 @@
android:layout_weight="1"
android:background="@drawable/airplane_led_grey_unlit"
android:gravity="center"
android:text="H"
android:text="@string/first_char_high"
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="8sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:ignore="SmallSp" />
<TextView
<View
android:layout_width="fill_parent"
android:layout_height="0px"
android:layout_gravity="bottom"
android:layout_weight="2" />
<TextView
@ -82,36 +76,33 @@
android:layout_weight="1"
android:background="@drawable/airplane_led_grey_unlit"
android:gravity="center"
android:text="L"
android:text="@string/first_char_low"
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="8sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:ignore="SmallSp" />
<TextView
<View
android:layout_width="fill_parent"
android:layout_height="0px"
android:layout_gravity="bottom"
android:layout_weight="0.2" />
</LinearLayout>
<TextView
<View
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_gravity="bottom"
android:layout_weight="0.47" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/dashboard"
android:layout_width="fill_parent"
android:layout_height="0px"
android:orientation="vertical"
android:layout_weight="0.0775">
android:layout_weight="0.0775"
android:orientation="vertical">
</LinearLayout>
@ -120,41 +111,22 @@
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.57"
android:orientation="vertical">
android:orientation="horizontal">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:weightSum="1">
<LinearLayout
<View
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.08"
android:baselineAligned="false"
android:orientation="horizontal">
</LinearLayout>
tools:ignore="NestedWeights" />
<LinearLayout
android:id="@+id/panel1"
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="0.275"
android:baselineAligned="false"
android:orientation="horizontal"
android:gravity="center"
android:textAlignment="center">
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:weightSum="1">
<TextView
<View
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.07" />
@ -169,12 +141,12 @@
<TextView
android:id="@+id/sgv"
android:layout_width="wrap_content"
android:layout_height="0px"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="1"
android:text="---"
android:textColor="@color/primary_text_dark"
android:textSize="30sp" />
android:textSize="30sp"
tools:ignore="HardcodedText" />
</LinearLayout>
@ -193,7 +165,8 @@
<TextView
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.35" />
android:layout_weight="0.35"
tools:ignore="NestedWeights" />
<TextView
android:id="@+id/timestamp"
@ -201,40 +174,34 @@
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="0.65"
android:text="--'"
android:gravity="center"
android:text="--'"
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="14sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:ignore="HardcodedText" />
</LinearLayout>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.07" />
</LinearLayout>
<LinearLayout
<View
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.0225"
android:baselineAligned="false"
android:orientation="horizontal">
</LinearLayout>
android:layout_weight="0.0225" />
<LinearLayout
android:id="@+id/panel2"
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.245"
android:orientation="horizontal">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:weightSum="1.01">
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
@ -248,11 +215,11 @@
android:layout_gravity="center"
android:layout_weight="0.19"
android:gravity="center"
android:text="12:00"
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="16sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:text="12:00" />
<TextView
android:id="@+id/tmpBasal"
@ -261,7 +228,7 @@
android:layout_gravity="bottom|center_horizontal"
android:layout_weight="0.19"
android:gravity="bottom|center_horizontal"
android:text="-.--U/h"
android:text="@string/no_tmp_basal_u_h"
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="12sp"
@ -274,7 +241,7 @@
android:layout_gravity="bottom|center_horizontal"
android:layout_weight="0.18"
android:gravity="bottom|center_horizontal"
android:text="--U"
android:text="@string/no_iob_u"
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="12sp"
@ -287,9 +254,9 @@
android:layout_gravity="bottom|center_horizontal"
android:layout_weight="0.185"
android:gravity="bottom|center_horizontal"
android:text="--g"
android:text="@string/no_cob_g"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textColor="@color/white"
android:textSize="12sp"
android:textStyle="bold" />
@ -312,7 +279,8 @@
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="12sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/rig_battery"
@ -321,49 +289,37 @@
android:layout_gravity="bottom|center_horizontal"
android:gravity="bottom|center_horizontal"
android:paddingStart="4dp"
android:paddingEnd="0dp"
android:text="--%"
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="12sp"
android:textStyle="bold"
android:visibility="gone" />
android:visibility="gone"
tools:ignore="HardcodedText" />
</LinearLayout>
<TextView
<View
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.06" />
</LinearLayout>
</LinearLayout>
<LinearLayout
<View
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.0225"
android:baselineAligned="false"
android:orientation="horizontal">
</LinearLayout>
android:layout_weight="0.0225" />
<LinearLayout
android:id="@+id/panel3"
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.275"
android:baselineAligned="false"
android:orientation="horizontal"
android:textAlignment="center">
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:weightSum="1">
<TextView
<View
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.07" />
@ -388,14 +344,15 @@
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="28sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:ignore="HardcodedText, NestedWeights" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_gravity="center"
android:layout_weight="0.167"
android:gravity="center"
android:layout_gravity="center"
android:weightSum="2">
<TextView
@ -409,7 +366,8 @@
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="13sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/avgdelta"
@ -418,7 +376,7 @@
android:layout_gravity="center"
android:layout_weight="1"
android:gravity="center"
android:text="avg"
android:text="@string/abbreviation_average"
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="13sp"
@ -431,7 +389,7 @@
<TextView
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.03" />
android:layout_weight="0.06" />
<LinearLayout
android:layout_width="match_parent"
@ -440,10 +398,11 @@
android:orientation="horizontal"
android:weightSum="1">
<TextView
<View
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.1" />
android:layout_weight="0.1"
tools:ignore="NestedWeights" />
<TextView
android:id="@+id/loop"
@ -452,36 +411,34 @@
android:layout_gravity="start"
android:layout_weight="0.5"
android:background="@drawable/loop_grey_25"
android:text="--'"
android:gravity="center"
android:text="--'"
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="14sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:ignore="HardcodedText" />
<TextView
<View
android:id="@+id/AAPSv2"
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.4"
android:visibility="invisible"/>
android:visibility="invisible" />
</LinearLayout>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.16" />
</LinearLayout>
<LinearLayout
<View
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.08"
android:baselineAligned="false"
android:orientation="horizontal">
</LinearLayout>
</LinearLayout>
android:layout_weight="0.08" />
</LinearLayout>

View file

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black"
tools:deviceIds="wear_square">
tools:deviceIds="wear_square"
tools:ignore="MissingDefaultResource">
<!-- background-image with shapes elements-->
<LinearLayout
@ -15,13 +15,15 @@
android:layout_height="match_parent"
android:background="@drawable/digitalstyle_bg_full_rect"
android:contentDescription="rect-shape-elements"
android:orientation="horizontal" />
android:orientation="horizontal"
tools:ignore="HardcodedText" />
<!-- root-element-->
<LinearLayout
android:id="@+id/watchface_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:baselineAligned="false"
android:orientation="horizontal"
android:weightSum="8">
@ -34,10 +36,11 @@
android:orientation="vertical"
android:weightSum="100">
<Space
<View
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="13.95" />
android:layout_weight="13.95"
tools:ignore="NestedWeights" />
<!-- COB -->
<LinearLayout
@ -47,7 +50,7 @@
android:orientation="horizontal"
android:weightSum="13">
<Space
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="4.9" />
@ -69,7 +72,8 @@
android:gravity="bottom|center_horizontal"
android:text="@string/activity_carb"
android:textColor="@color/light_grey"
android:textSize="10sp" />
android:textSize="10sp"
tools:ignore="SmallSp, NestedWeights" />
<TextView
android:id="@+id/cobView"
@ -80,19 +84,20 @@
android:gravity="top|center_horizontal"
android:letterSpacing="-0.075"
android:lines="1"
android:text="000g"
android:text="@string/cob_000g"
android:textColor="@color/white"
android:textSize="14sp" />
</LinearLayout>
<Space
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1.1" />
</LinearLayout>
<Space
<View
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="2.87" />
@ -105,7 +110,7 @@
android:orientation="horizontal"
android:weightSum="13">
<Space
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="3.2" />
@ -120,6 +125,7 @@
<!-- 1st line with direction and timestamp-->
<LinearLayout
android:id="@+id/directionLayout"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_gravity="center_horizontal"
@ -127,9 +133,10 @@
android:baselineAligned="false"
android:gravity="center_vertical|center_horizontal"
android:orientation="horizontal"
android:weightSum="10">
android:weightSum="10"
tools:ignore="NestedWeights">
<Space
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2" />
@ -146,7 +153,8 @@
android:textAlignment="center"
android:textColor="@color/white"
android:textSize="16sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/timestamp"
@ -159,12 +167,14 @@
android:fontFamily="sans-serif-condensed-light"
android:text="--'"
android:textColor="@color/light_grey"
android:textSize="10sp" />
android:textSize="10sp"
tools:ignore="HardcodedText,SmallSp" />
<Space
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2" />
</LinearLayout>
<!-- 2nd line with sgv-->
@ -186,21 +196,23 @@
android:gravity="top|center_horizontal"
android:letterSpacing="-0.05"
android:lines="1"
android:text="00,0"
android:text="@string/svg_00_0"
android:textColor="@color/white"
android:textSize="20sp"
android:textStyle="bold" />
</LinearLayout>
</LinearLayout>
<Space
</LinearLayout>
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1.1" />
</LinearLayout>
<Space
<View
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="2.87" />
@ -213,7 +225,7 @@
android:orientation="horizontal"
android:weightSum="13">
<Space
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="4.9" />
@ -235,7 +247,8 @@
android:gravity="bottom|center_horizontal"
android:text="@string/activity_IOB"
android:textColor="@color/light_grey"
android:textSize="10sp" />
android:textSize="10sp"
tools:ignore="SmallSp, NestedWeights" />
<TextView
android:id="@+id/iobView"
@ -246,22 +259,24 @@
android:gravity="top|center_horizontal"
android:letterSpacing="-0.075"
android:lines="1"
android:text="0,00U"
android:text="@string/iob_0_00u"
android:textColor="@color/white"
android:textSize="14sp" />
</LinearLayout>
<Space
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1.1" />
</LinearLayout>
<Space
<View
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="13.95" />
</LinearLayout>
<!-- right side 5/8 width -->
@ -278,12 +293,14 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginLeft="9dp"
android:layout_marginStart="9dp"
android:layout_marginEnd="0dp"
android:layout_weight="1"
android:orientation="vertical">
android:orientation="vertical"
tools:ignore="NestedWeights">
<!-- right side top - spacer 2/10 -->
<Space
<View
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="2" />
@ -311,11 +328,11 @@
android:layout_height="match_parent"
android:layout_weight="5"
android:fontFamily="@font/roboto_condensed_regular"
android:text="DDD"
android:textAllCaps="true"
android:textColor="@color/white"
android:textFontWeight="400"
android:textSize="18sp" />
android:textSize="18sp"
tools:text="DDD" />
<TextView
android:id="@+id/weeknumber"
@ -324,17 +341,18 @@
android:layout_weight="4"
android:fontFamily="@font/roboto_condensed_light"
android:letterSpacing="-0.1"
android:text="ww"
android:textAllCaps="true"
android:textColor="@color/light_grey"
android:textFontWeight="400"
android:textSize="18sp"
android:visibility="gone" />
android:visibility="gone"
tools:text="ww" />
<Space
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="3" />
</LinearLayout>
<!-- day number + month (short)-->
@ -354,10 +372,12 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/roboto_condensed_regular"
android:paddingStart="0dp"
android:paddingEnd="4dp"
android:text="DD"
android:textColor="@color/light_grey"
android:textSize="18sp" />
android:textSize="18sp"
tools:text="DD" />
</LinearLayout>
<!-- month short-->
<LinearLayout
@ -368,14 +388,17 @@
android:id="@+id/month"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginStart="5dp"
android:fontFamily="@font/roboto_condensed_regular"
android:text="MMM"
android:textAllCaps="true"
android:textColor="@color/light_grey"
android:textSize="18sp" />
android:textSize="18sp"
tools:text="MMM" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<!-- right side top - hour minute 4/10 -->
@ -383,7 +406,8 @@
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="4"
android:gravity="left|center_vertical"
android:baselineAligned="false"
android:gravity="start|center_vertical"
android:orientation="horizontal">
<LinearLayout
@ -396,17 +420,18 @@
android:id="@+id/hour"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_gravity="start"
android:fontFamily="@font/roboto_condensed_bold"
android:text="HH"
android:textAllCaps="true"
android:textColor="@color/white"
android:textSize="40sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:text="HH" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical">
@ -416,29 +441,33 @@
android:id="@+id/minute"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_marginLeft="6sp"
android:layout_gravity="start"
android:layout_marginStart="6sp"
android:layout_marginBottom="-8sp"
android:fontFamily="@font/roboto_condensed_bold"
android:text="MI"
android:textColor="@color/light_grey"
android:textSize="26sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:text="MI" />
<!-- 12h period AM / PM-->
<!-- 12h period AM / PM -->
<TextView
android:id="@+id/timePeriod"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:layout_marginLeft="8sp"
android:layout_marginStart="8sp"
android:fontFamily="@font/roboto_condensed_bold"
android:text="AM"
android:textColor="@color/light_grey"
android:textSize="10sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:ignore="SmallSp"
tools:text="AM" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<!-- right side 1/2 height - bottom halft -->
@ -449,7 +478,7 @@
android:layout_marginRight="7dp"
android:layout_weight="1"
android:baselineAligned="false"
android:gravity="left|top"
android:gravity="start|top"
android:orientation="vertical"
android:weightSum="10">
@ -472,7 +501,8 @@
android:text="+/-"
android:textColor="@color/light_grey"
android:textSize="10sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:ignore="HardcodedText, SmallSp, NestedWeights" />
<TextView
android:id="@+id/avgdelta"
@ -480,10 +510,11 @@
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_horizontal|center_vertical"
android:text="avg"
android:text="@string/abbreviation_average"
android:textColor="@color/light_grey"
android:textSize="10sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:ignore="SmallSp" />
<TextView
android:id="@+id/uploader_battery"
@ -494,7 +525,8 @@
android:text="--%"
android:textColor="@color/light_grey"
android:textSize="10sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:ignore="HardcodedText,SmallSp" />
<TextView
android:id="@+id/rig_battery"
@ -506,7 +538,8 @@
android:textColor="@color/light_grey"
android:textSize="10sp"
android:textStyle="bold"
android:visibility="gone" />
android:visibility="gone"
tools:ignore="HardcodedText,SmallSp" />
<TextView
android:id="@+id/tmpBasal"
@ -514,10 +547,11 @@
android:layout_height="match_parent"
android:layout_weight="1.7"
android:gravity="center_horizontal|center_vertical"
android:text="-.--U/h"
android:text="@string/no_tmp_basal_u_h"
android:textColor="@color/light_grey"
android:textSize="10sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:ignore="SmallSp" />
<TextView
android:id="@+id/bgiView"
@ -525,11 +559,13 @@
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_horizontal|center_vertical"
android:text="bgi"
android:textColor="@color/light_grey"
android:textSize="10sp"
android:textStyle="bold"
android:visibility="gone" />
android:visibility="gone"
tools:ignore="SmallSp"
tools:text="bgi" />
</LinearLayout>
<!-- right side bottom - diagram 6/10 -->
@ -547,26 +583,28 @@
android:layout_height="0dp"
android:layout_gravity="bottom"
android:layout_weight="1"
android:gravity="center_horizontal|top" />
android:gravity="center_horizontal|top"
tools:ignore="NestedWeights" />
</LinearLayout>
<!-- right side bottom - spacer 2/10 -->
<Space
<View
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="2" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<!-- FLAGs -->
<TextView
<View
android:id="@+id/AAPSv2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:text=""
android:visibility="gone" />
</RelativeLayout>

View file

@ -1,148 +1,152 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent" tools:context=".watchfaces.AapsWatchface" tools:deviceIds="wear_square"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black"
android:id="@+id/main_layout">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:textAlignment="center"
android:gravity="center_horizontal"
android:weightSum="1">
android:orientation="vertical"
android:textAlignment="center"
android:weightSum="1"
tools:context=".watchfaces.AapsWatchface"
tools:deviceIds="wear_square"
tools:ignore="MissingDefaultResource">
<LinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAlignment="center"
android:paddingTop="5dp"
android:weightSum="1"
android:layout_gravity="center_horizontal"
android:layout_marginTop="-5dp"
android:gravity="center_horizontal">
android:gravity="center_horizontal"
android:orientation="horizontal"
android:paddingTop="5dp"
android:textAlignment="center"
android:weightSum="1">
<TextView
android:id="@+id/sgv"
android:textSize="41sp"
android:text="---"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#FFFFFF"
android:layout_gravity="bottom"
android:gravity="bottom|right"
android:layout_marginEnd="5dp"
android:layout_marginBottom="-2dp"
android:gravity="bottom"
android:paddingTop="-2dp"
android:layout_marginEnd="5dp" />
android:text="---"
android:textColor="@color/white"
android:textSize="41sp"
tools:ignore="HardcodedText" />
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:weightSum="1"
android:textAlignment="center"
android:baselineAligned="false"
android:layout_gravity="center_horizontal"
android:gravity="center_horizontal">
android:baselineAligned="false"
android:gravity="center_horizontal"
android:orientation="vertical"
android:textAlignment="center"
android:weightSum="1">
<TextView
android:id="@+id/direction"
android:textSize="30sp"
android:textStyle="bold"
android:text="--"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#FFFFFF"
android:textAlignment="center"
android:layout_gravity="center_horizontal|bottom"
android:gravity="center_horizontal|bottom"
android:layout_marginBottom="-5dp"
android:layout_marginTop="-2dp"
android:paddingTop="1dp" />
android:layout_marginBottom="-5dp"
android:gravity="center_horizontal|bottom"
android:paddingTop="1dp"
android:text="--"
android:textAlignment="center"
android:textColor="@color/white"
android:textSize="30sp"
android:textStyle="bold"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/delta"
android:textSize="10sp"
android:text="--- mg/dl"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#FFFFFF"
android:layout_gravity="bottom"
android:gravity="center_horizontal|bottom"
android:textStyle="bold" />
android:text="@string/delta_na"
android:textColor="@color/white"
android:textSize="10sp"
android:textStyle="bold"
tools:ignore="SmallSp" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:id="@+id/secondary_layout"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:background="@color/light_grey"
android:id="@+id/secondary_layout"
android:padding="1dp">
<LinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAlignment="center"
android:layout_gravity="center_horizontal">
android:padding="1dp"
android:textAlignment="center">
<TextView
android:id="@+id/timestamp"
android:textSize="10sp"
android:text="-- Minutes ago"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/time_stamp_na_min_ago"
android:textAlignment="center"
android:textColor="#000000"
android:layout_height="wrap_content" />
android:textColor="@color/black"
android:textSize="10sp"
tools:ignore="SmallSp" />
<TextView
android:id="@+id/uploader_battery"
android:textSize="10sp"
android:text="Uploader: ---%"
android:layout_width="wrap_content"
android:textAlignment="center"
android:textColor="#000000"
android:layout_height="wrap_content"
android:paddingStart="10sp"
android:layout_height="wrap_content" />
android:paddingEnd="0sp"
android:text="@string/uploader_na"
android:textAlignment="center"
android:textColor="@color/black"
android:textSize="10sp"
tools:ignore="SmallSp" />
<TextView
android:id="@+id/raw"
android:textSize="10sp"
android:text=""
android:layout_width="wrap_content"
android:textAlignment="center"
android:textColor="#000000"
android:layout_height="wrap_content"
android:paddingStart="10sp"
android:layout_height="wrap_content" />
android:paddingEnd="0sp"
android:text=""
android:textAlignment="center"
android:textColor="@color/black"
android:textSize="10sp"
tools:ignore="SmallSp" />
<TextView
android:id="@+id/externaltstatus"
android:textSize="10sp"
android:text="S: no status"
android:layout_width="wrap_content"
android:textAlignment="center"
android:textColor="#000000"
android:layout_height="wrap_content"
android:paddingStart="10sp"
android:layout_height="wrap_content" />
</LinearLayout>
android:paddingEnd="0sp"
android:text="@string/no_status"
android:textAlignment="center"
android:textColor="@color/black"
android:textSize="10sp"
tools:ignore="SmallSp" />
</LinearLayout>
<TextView
android:id="@+id/watch_time"
android:textSize="35sp"
android:text="12:00"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:textColor="#FFFFFF"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal|top"
android:textAlignment="center"
android:layout_gravity="center_horizontal|top" />
android:textColor="@color/white"
android:textSize="35sp"
tools:text="12:00" />
<lecho.lib.hellocharts.view.LineChartView
android:id="@+id/chart"
@ -151,6 +155,4 @@
android:layout_gravity="bottom"
android:gravity="center_horizontal|top" />
</LinearLayout>
</RelativeLayout>
</LinearLayout>

View file

@ -1,19 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black"
tools:context=".watchfaces.AapsV2Watchface"
tools:deviceIds="wear_square">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:textAlignment="center"
android:weightSum="1">
android:weightSum="1"
tools:context=".watchfaces.AapsV2Watchface"
tools:deviceIds="wear_square"
tools:ignore="MissingDefaultResource">
<LinearLayout
android:id="@+id/primary_layout"
@ -34,9 +31,10 @@
android:gravity="center"
android:text="--'"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textColor="@color/white"
android:textSize="14sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/sgv"
@ -44,22 +42,20 @@
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal|bottom"
android:layout_marginBottom="-2dp"
android:gravity="bottom|right"
android:gravity="bottom|end"
android:paddingStart="5dp"
android:paddingTop="-2dp"
android:paddingEnd="5dp"
android:text="---"
android:textColor="#FFFFFF"
android:textSize="38sp" />
android:textColor="@color/white"
android:textSize="38sp"
tools:ignore="HardcodedText" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_gravity="center_horizontal"
android:baselineAligned="false"
android:gravity="center_vertical"
android:orientation="vertical"
android:textAlignment="center">
android:orientation="vertical">
<TextView
android:id="@+id/direction"
@ -69,9 +65,10 @@
android:gravity="center_horizontal|bottom"
android:text="--"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textColor="@color/white"
android:textSize="22sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/timestamp"
@ -80,9 +77,10 @@
android:layout_marginBottom="2dp"
android:gravity="center"
android:text="--'"
android:textColor="#FFFFFF"
android:textColor="@color/white"
android:textSize="14sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:ignore="HardcodedText" />
</LinearLayout>
@ -118,9 +116,10 @@
android:gravity="center"
android:text="+/-"
android:textAlignment="center"
android:textColor="#000000"
android:textColor="@color/black"
android:textSize="12sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/avgdelta"
@ -129,9 +128,9 @@
android:layout_gravity="center"
android:layout_weight="1"
android:gravity="center"
android:text="avg"
android:text="@string/abbreviation_average"
android:textAlignment="center"
android:textColor="#000000"
android:textColor="@color/black"
android:textSize="12sp"
android:textStyle="bold" />
@ -144,9 +143,10 @@
android:gravity="center"
android:text="--%"
android:textAlignment="center"
android:textColor="#000000"
android:textColor="@color/black"
android:textSize="12sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/rig_battery"
@ -157,10 +157,11 @@
android:gravity="center"
android:text="--%"
android:textAlignment="center"
android:textColor="#000000"
android:textColor="@color/black"
android:textSize="12sp"
android:textStyle="bold"
android:visibility="gone" />
android:visibility="gone"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/tmpBasal"
@ -169,9 +170,9 @@
android:layout_gravity="center"
android:layout_weight="1.7"
android:gravity="center"
android:text="-.--U/h"
android:text="@string/no_tmp_basal_u_h"
android:textAlignment="center"
android:textColor="#000000"
android:textColor="@color/black"
android:textSize="12sp"
android:textStyle="bold" />
@ -182,19 +183,17 @@
android:layout_gravity="center"
android:layout_weight="1"
android:gravity="center"
android:text="bgi"
android:textAlignment="center"
android:textColor="#000000"
android:textColor="@color/black"
android:textSize="12sp"
android:textStyle="bold"
android:visibility="gone" />
android:visibility="gone"
tools:text="bgi" />
<TextView
<View
android:id="@+id/AAPSv2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:text=""
android:visibility="gone" />
</LinearLayout>
@ -205,27 +204,15 @@
android:id="@+id/tertiary_layout"
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_gravity="center"
android:layout_weight="0.22"
android:background="@color/black"
android:gravity="center"
android:orientation="vertical"
android:padding="1dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:baselineAligned="false"
android:gravity="center"
android:orientation="horizontal"
android:padding="1dp"
android:weightSum="7">
<LinearLayout
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="horizontal" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
@ -242,9 +229,10 @@
android:layout_gravity="center"
android:gravity="center"
android:text="@string/activity_carb"
android:textColor="#FFFFFF"
android:textColor="@color/white"
android:textSize="10sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:ignore="SmallSp" />
<TextView
android:id="@+id/cobView"
@ -252,19 +240,18 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:text="--g"
android:text="@string/no_cob_g"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textColor="@color/white"
android:textSize="14sp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
<View
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="horizontal" />
android:layout_weight="1" />
<TextView
android:id="@+id/watch_time"
@ -272,10 +259,10 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:text="12:00"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="30sp" />
android:textColor="@color/white"
android:textSize="30sp"
tools:text="12:00" />
<LinearLayout
android:id="@+id/date_time"
@ -293,10 +280,11 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:text="day"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="10sp" />
android:textColor="@color/white"
android:textSize="10sp"
tools:ignore="SmallSp"
tools:text="day" />
<TextView
android:id="@+id/month"
@ -304,17 +292,17 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:text="mth"
android:textColor="#FFFFFF"
android:textSize="10sp" />
android:textColor="@color/white"
android:textSize="10sp"
tools:ignore="SmallSp"
tools:text="mth" />
</LinearLayout>
<LinearLayout
<View
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="horizontal" />
android:layout_weight="1" />
<LinearLayout
android:layout_width="wrap_content"
@ -332,9 +320,10 @@
android:gravity="center"
android:text="@string/activity_IOB"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textColor="@color/white"
android:textSize="10sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:ignore="SmallSp" />
<TextView
android:id="@+id/iobView"
@ -342,21 +331,13 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:text="--U"
android:textColor="#FFFFFF"
android:text="@string/no_iob_u"
android:textColor="@color/white"
android:textSize="14sp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="horizontal" />
</LinearLayout>
</LinearLayout>
<lecho.lib.hellocharts.view.LineChartView
@ -367,6 +348,4 @@
android:layout_weight="0.41"
android:gravity="center_horizontal|top" />
</LinearLayout>
</RelativeLayout>
</LinearLayout>

View file

@ -1,138 +1,136 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent" tools:context=".watchfaces.AapsWatchface" tools:deviceIds="wear_square"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black"
android:id="@+id/main_layout">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:textAlignment="center">
android:textAlignment="center"
tools:context=".watchfaces.AapsWatchface"
tools:deviceIds="wear_square"
tools:ignore="MissingDefaultResource">
<LinearLayout
android:orientation="horizontal"
android:layout_width="147dp"
android:layout_height="wrap_content"
android:textAlignment="center"
android:layout_gravity="center_horizontal"
android:orientation="horizontal"
android:paddingTop="15dp"
android:weightSum="1"
android:layout_gravity="center_horizontal">
android:textAlignment="center"
android:weightSum="1">
<TextView
android:id="@+id/sgv"
android:textSize="50sp"
android:text="---"
android:layout_width="wrap_content"
android:layout_height="55dp"
android:textColor="#FFFFFF"
android:layout_gravity="bottom"
android:gravity="bottom|right" />
android:gravity="bottom"
android:text="---"
android:textColor="@color/white"
android:textSize="50sp"
tools:ignore="HardcodedText" />
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:weightSum="1"
android:textAlignment="center"
android:layout_gravity="center_horizontal"
android:baselineAligned="false"
android:layout_gravity="center_horizontal">
android:orientation="vertical"
android:textAlignment="center"
android:weightSum="1">
<TextView
android:id="@+id/direction"
android:textSize="27sp"
android:textStyle="bold"
android:text="--"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="#FFFFFF"
android:textAlignment="center"
android:layout_gravity="center_horizontal|bottom"
android:gravity="center_horizontal|bottom"
android:paddingTop="1dp" />
android:paddingTop="1dp"
android:text="--"
android:textAlignment="center"
android:textColor="@color/white"
android:textSize="27sp"
android:textStyle="bold"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/delta"
android:textSize="10sp"
android:text="--- mg/dl"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textColor="#FFFFFF"
android:layout_gravity="bottom"
android:gravity="center_horizontal" />
android:gravity="center_horizontal"
android:text="@string/delta_na"
android:textColor="@color/white"
android:textSize="10sp"
tools:ignore="SmallSp" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:id="@+id/secondary_layout"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:background="@color/light_grey"
android:id="@+id/secondary_layout"
android:padding="2dp">
<LinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAlignment="center"
android:layout_gravity="center_horizontal">
android:padding="2dp"
android:textAlignment="center">
<TextView
android:id="@+id/timestamp"
android:textSize="12sp"
android:text="-- Minutes ago"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/time_stamp_na_min_ago"
android:textAlignment="center"
android:textColor="#000000"
android:layout_height="wrap_content" />
android:textColor="@color/black"
android:textSize="12sp" />
<TextView
android:id="@+id/uploader_battery"
android:textSize="12sp"
android:text="Uploader: ---%"
android:layout_width="wrap_content"
android:textAlignment="center"
android:textColor="#000000"
android:layout_height="wrap_content"
android:paddingStart="10sp"
android:layout_height="wrap_content" />
android:paddingEnd="0sp"
android:text="@string/uploader_na"
android:textAlignment="center"
android:textColor="@color/black"
android:textSize="12sp" />
<TextView
android:id="@+id/raw"
android:textSize="12sp"
android:text=""
android:layout_width="wrap_content"
android:textAlignment="center"
android:textColor="#000000"
android:layout_height="wrap_content"
android:paddingStart="10sp"
android:layout_height="wrap_content" />
android:paddingEnd="0sp"
android:text=""
android:textAlignment="center"
android:textColor="@color/black"
android:textSize="12sp" />
<TextView
android:id="@+id/externaltstatus"
android:textSize="12sp"
android:text="S: no status"
android:layout_width="wrap_content"
android:textAlignment="center"
android:textColor="#000000"
android:layout_height="wrap_content"
android:paddingStart="10sp"
android:layout_height="wrap_content" />
</LinearLayout>
android:paddingEnd="0sp"
android:text="@string/no_status"
android:textAlignment="center"
android:textColor="@color/black"
android:textSize="12sp" />
</LinearLayout>
<TextView
android:id="@+id/watch_time"
android:textSize="55sp"
android:text="12:00"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:textColor="#FFFFFF"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal|top"
android:textAlignment="center"
android:layout_gravity="center_horizontal|top" />
android:textColor="@color/white"
android:textSize="55sp"
tools:text="12:00" />
</LinearLayout>
</RelativeLayout>
</LinearLayout>

View file

@ -1,100 +1,103 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent" tools:context=".watchfaces.AapsWatchface" tools:deviceIds="wear_square"
android:background="@color/black"
android:id="@+id/main_layout">
<LinearLayout
android:orientation="vertical"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black"
android:gravity="center_horizontal"
android:orientation="vertical"
android:textAlignment="center"
android:gravity="center_horizontal">
tools:context=".watchfaces.AapsWatchface"
tools:deviceIds="wear_square"
tools:ignore="MissingDefaultResource">
<LinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAlignment="center"
android:paddingTop="5dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="-5dp"
android:gravity="center_horizontal">
android:gravity="center_horizontal"
android:orientation="horizontal"
android:paddingTop="5dp"
android:textAlignment="center">
<TextView
android:id="@+id/delta"
android:textSize="40sp"
android:text="---"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#FFFFFF"
android:layout_gravity="bottom"
android:layout_marginEnd="5dp"
android:gravity="center_horizontal|bottom"
android:layout_marginEnd="5dp" />
android:text="---"
android:textColor="@color/white"
android:textSize="40sp"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/sgv"
android:textSize="55sp"
android:text="---"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#FFFFFF"
android:layout_gravity="center_horizontal"
android:gravity="center_horizontal" />
android:gravity="center_horizontal"
android:text="---"
android:textColor="@color/white"
android:textSize="55sp"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/avgdelta"
android:textSize="40sp"
android:text="---"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#FFFFFF"
android:layout_gravity="bottom"
android:layout_marginStart="5dp"
android:gravity="center_horizontal|bottom"
android:layout_marginStart="5dp" />
android:text="---"
android:textColor="@color/white"
android:textSize="40sp"
tools:ignore="HardcodedText" />
</LinearLayout>
<TextView
android:id="@+id/externaltstatus"
android:textSize="24sp"
android:text="E xU/h IOB: x (x+x)"
android:layout_width="wrap_content"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:layout_gravity="center_horizontal"
android:layout_height="wrap_content"/>
<LinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
tools:text="E xU/h IOB: x (x+x)"
android:textAlignment="center"
android:gravity="center_horizontal|bottom">
android:textColor="@color/white"
android:textSize="24sp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal|bottom"
android:orientation="horizontal"
android:textAlignment="center">
<TextView
android:id="@+id/watch_time"
android:textSize="47sp"
android:text="12:00"
android:textColor="#FFFFFF"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAlignment="center"
android:layout_gravity="center_horizontal"
android:layout_marginEnd="6dp"
android:layout_gravity="center_horizontal" />
tools:text="12:00"
android:textAlignment="center"
android:textColor="@color/white"
android:textSize="47sp" />
<TextView
android:id="@+id/timestamp"
android:textSize="35sp"
android:text="-- '"
android:layout_width="wrap_content"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_height="wrap_content" />
</LinearLayout>
android:text="-- '"
android:textAlignment="center"
android:textColor="@color/white"
android:textSize="35sp"
tools:ignore="HardcodedText" />
</LinearLayout>
</RelativeLayout>
</LinearLayout>

View file

@ -1,16 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent" tools:context=".watchfaces.AapsWatchface" tools:deviceIds="wear_square"
android:background="@color/black"
android:id="@+id/main_layout">
<LinearLayout
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black"
android:gravity="center_vertical|center_horizontal"
android:orientation="vertical"
android:textAlignment="center">
android:textAlignment="center"
tools:context=".watchfaces.NoChartWatchface"
tools:deviceIds="wear_square"
tools:ignore="MissingDefaultResource">
<LinearLayout
android:layout_width="wrap_content"
@ -30,8 +30,9 @@
android:layout_marginEnd="5dp"
android:gravity="center_vertical|center_horizontal|center"
android:text="---"
android:textColor="#FFFFFF"
android:textSize="24sp" />
android:textColor="@color/white"
android:textSize="24sp"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/sgv"
@ -40,8 +41,9 @@
android:layout_gravity="center_horizontal"
android:gravity="center_horizontal"
android:text="---"
android:textColor="#FFFFFF"
android:textSize="45sp" />
android:textColor="@color/white"
android:textSize="45sp"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/avgdelta"
@ -51,8 +53,9 @@
android:layout_marginStart="5dp"
android:gravity="center_vertical|center_horizontal|center"
android:text=" ---"
android:textColor="#FFFFFF"
android:textSize="26sp" />
android:textColor="@color/white"
android:textSize="26sp"
tools:ignore="HardcodedText" />
</LinearLayout>
@ -69,19 +72,12 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:text="No Loop Status"
android:paddingBottom="2dp"
android:text="@string/no_loop_status"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textColor="@color/white"
android:textSize="21sp" />
<View
android:id="@+id/dummy2"
android:layout_width="match_parent"
android:layout_height="2dp"
android:layout_gravity="bottom"
android:layout_weight="0"
android:gravity="center_horizontal" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -95,10 +91,10 @@
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginEnd="6dp"
android:text="23:24"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="45sp" />
android:textColor="@color/white"
android:textSize="45sp"
tools:text="23:24" />
<TextView
android:id="@+id/timestamp"
@ -107,10 +103,10 @@
android:layout_gravity="center_vertical|center_horizontal"
android:text="--'"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="24sp" />
</LinearLayout>
android:textColor="@color/white"
android:textSize="24sp"
tools:ignore="HardcodedText" />
</LinearLayout>
</RelativeLayout>
</LinearLayout>

View file

@ -5,7 +5,8 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".watchfaces.SteampunkWatchface"
tools:deviceIds="wear_square">
tools:deviceIds="wear_round"
tools:ignore="MissingDefaultResource">
<LinearLayout
android:layout_width="match_parent"
@ -18,6 +19,7 @@
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:importantForAccessibility="no"
android:src="@drawable/steampunk_dial_mgdl" />
</LinearLayout>
@ -57,13 +59,11 @@
android:orientation="vertical"
android:weightSum="1">
<LinearLayout
<View
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_gravity="center"
android:layout_weight="0.05"
android:gravity="center"
android:orientation="horizontal" />
tools:ignore="NestedWeights" />
<LinearLayout
android:layout_width="match_parent"
@ -86,7 +86,7 @@
<LinearLayout
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.16"
android:layout_weight="0.165"
android:orientation="horizontal">
<TextView
@ -97,10 +97,10 @@
android:gravity="center"
android:paddingTop="7dp"
android:rotation="-28"
android:text="--g"
android:text="@string/no_cob_g"
android:textAlignment="center"
android:textColor="@color/black_86p"
android:textSize="11sp"
android:textSize="13sp"
android:textStyle="bold" />
</LinearLayout>
@ -108,7 +108,7 @@
<LinearLayout
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.24"
android:layout_weight="0.27"
android:orientation="horizontal">
<TextView
@ -117,12 +117,12 @@
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:paddingBottom="12dp"
android:rotation="-1"
android:text="-.--U/h"
android:paddingBottom="14dp"
android:rotation="0"
android:text="@string/no_tmp_basal_u_h"
android:textAlignment="center"
android:textColor="@color/black_86p"
android:textSize="11sp"
android:textSize="13sp"
android:textStyle="bold" />
</LinearLayout>
@ -130,7 +130,7 @@
<LinearLayout
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.2"
android:layout_weight="0.165"
android:orientation="horizontal">
<TextView
@ -141,10 +141,10 @@
android:gravity="center"
android:paddingTop="6dp"
android:rotation="28"
android:text="0.00U"
android:text="@string/no_iob_u"
android:textAlignment="center"
android:textColor="@color/black_86p"
android:textSize="11sp"
android:textSize="13sp"
android:textStyle="bold" />
</LinearLayout>
@ -170,11 +170,11 @@
android:orientation="horizontal"
android:weightSum="1">
<LinearLayout
<View
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.25"
android:orientation="horizontal" />
tools:ignore="NestedWeights" />
<lecho.lib.hellocharts.view.LineChartView
android:id="@+id/chart"
@ -182,7 +182,7 @@
android:layout_height="match_parent"
android:layout_weight="0.5" />
<LinearLayout
<View
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.25"
@ -190,11 +190,10 @@
</LinearLayout>
<LinearLayout
<View
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.03"
android:orientation="vertical" />
android:layout_weight="0.03" />
</LinearLayout>
@ -207,26 +206,26 @@
android:orientation="vertical"
android:weightSum="1">
<LinearLayout
<View
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.15"
android:orientation="horizontal" />
android:layout_weight="0.15" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_gravity="center"
android:layout_weight="0.21"
android:baselineAligned="false"
android:gravity="center"
android:orientation="horizontal"
android:weightSum="1">
<LinearLayout
<View
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.32"
android:orientation="horizontal" />
tools:ignore="NestedWeights" />
<LinearLayout
android:layout_width="0px"
@ -240,14 +239,16 @@
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:paddingEnd="8dp"
android:paddingStart="0dp"
android:paddingTop="8dp"
android:paddingEnd="8dp"
android:rotation="-24"
android:text="-'"
android:textAlignment="center"
android:textColor="@color/black_86p"
android:textSize="10sp"
android:textStyle="bold" />
android:textSize="12sp"
android:textStyle="bold"
tools:ignore="HardcodedText" />
</LinearLayout>
@ -268,9 +269,10 @@
android:text="--%"
android:textAlignment="center"
android:textColor="@color/black_86p"
android:textSize="10sp"
android:textSize="12sp"
android:textStyle="bold"
android:visibility="gone" />
android:visibility="gone"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/uploader_battery"
@ -281,8 +283,9 @@
android:text="--%"
android:textAlignment="center"
android:textColor="@color/black_86p"
android:textSize="10sp"
android:textStyle="bold" />
android:textSize="12sp"
android:textStyle="bold"
tools:ignore="HardcodedText" />
</LinearLayout>
@ -300,28 +303,28 @@
android:gravity="center"
android:paddingStart="10dp"
android:paddingTop="8dp"
android:paddingEnd="0dp"
android:rotation="24"
android:text="-'"
android:textAlignment="center"
android:textColor="@color/black_86p"
android:textSize="10sp"
android:textStyle="bold" />
android:textSize="12sp"
android:textStyle="bold"
tools:ignore="HardcodedText" />
</LinearLayout>
<LinearLayout
<View
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.32"
android:orientation="horizontal" />
android:layout_weight="0.32" />
</LinearLayout>
<LinearLayout
<View
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.64"
android:orientation="horizontal" />
android:layout_weight="0.64" />
</LinearLayout>
@ -330,8 +333,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/steampunk_cover_plate"
android:orientation="vertical">
</LinearLayout>
android:orientation="vertical" />
<LinearLayout
android:layout_width="match_parent"
@ -370,10 +372,10 @@
</LinearLayout>
<TextView
<View
android:id="@+id/AAPSv2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"/>
android:visibility="gone" />
</RelativeLayout>

View file

@ -1,58 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent" tools:context=".watchfaces.AapsWatchface" tools:deviceIds="wear_square"
android:background="@color/black"
android:id="@+id/main_layout">
<LinearLayout
android:orientation="vertical"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black"
android:orientation="vertical"
android:textAlignment="center"
android:gravity="center_horizontal">
tools:context=".watchfaces.AapsWatchface"
tools:deviceIds="wear_square"
tools:ignore="MissingDefaultResource">
<LinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAlignment="center"
android:paddingTop="5dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="-5dp"
android:gravity="center_horizontal">
android:layout_marginTop="-2dp"
android:gravity="center_horizontal"
android:orientation="horizontal"
android:paddingTop="5dp"
android:textAlignment="center">
<TextView
android:id="@+id/delta"
android:textSize="30sp"
android:text="---"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#FFFFFF"
android:layout_gravity="bottom"
android:layout_marginEnd="5dp"
android:gravity="center_horizontal|bottom"
android:layout_marginEnd="5dp" />
android:text="---"
android:textColor="@color/white"
android:textSize="30sp"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/sgv"
android:textSize="41sp"
android:text="---"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#FFFFFF"
android:layout_gravity="center_horizontal"
android:gravity="center_horizontal" />
android:gravity="center_horizontal"
android:text="---"
android:textColor="@color/white"
android:textSize="41sp"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/avgdelta"
android:textSize="30sp"
android:text="---"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#FFFFFF"
android:layout_gravity="bottom"
android:layout_marginStart="5dp"
android:gravity="center_horizontal|bottom"
android:layout_marginStart="5dp" />
android:text="---"
android:textColor="@color/white"
android:textSize="30sp"
tools:ignore="HardcodedText" />
</LinearLayout>
@ -66,43 +68,40 @@
<TextView
android:id="@+id/externaltstatus"
android:textSize="18sp"
android:text="E xU/h IOB: x (x+x)"
android:layout_width="wrap_content"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:layout_gravity="center_horizontal"
android:layout_height="wrap_content"/>
<LinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:textAlignment="center"
android:gravity="center_horizontal">
android:textColor="@color/white"
android:textSize="18sp"
tools:text="E xU/h IOB: x (x+x)" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="horizontal">
<TextView
android:id="@+id/watch_time"
android:textSize="35sp"
android:text="12:00"
android:textColor="#FFFFFF"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAlignment="center"
android:layout_gravity="center_horizontal"
android:layout_marginEnd="6dp"
android:layout_gravity="center_horizontal" />
android:textColor="@color/white"
android:textSize="35sp"
tools:text="12:00" />
<TextView
android:id="@+id/timestamp"
android:textSize="26sp"
android:text="-- '"
android:layout_width="wrap_content"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_height="wrap_content" />
</LinearLayout>
android:text="-- '"
android:textColor="@color/white"
android:textSize="26sp"
tools:ignore="HardcodedText" />
</LinearLayout>
</RelativeLayout>
</LinearLayout>

View file

@ -1,16 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent" tools:context=".watchfaces.AapsWatchface" tools:deviceIds="wear_square"
android:background="@color/black"
android:id="@+id/main_layout">
<LinearLayout
android:orientation="vertical"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black"
android:orientation="vertical"
android:textAlignment="center"
android:gravity="center_horizontal">
tools:context=".watchfaces.AapsWatchface"
tools:deviceIds="wear_square"
tools:ignore="MissingDefaultResource">
<LinearLayout
android:layout_width="wrap_content"
@ -30,8 +29,9 @@
android:layout_marginEnd="5dp"
android:gravity="center_horizontal|bottom"
android:text="---"
android:textColor="#FFFFFF"
android:textSize="24sp" />
android:textColor="@color/white"
android:textSize="24sp"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/sgv"
@ -40,8 +40,9 @@
android:layout_gravity="center_horizontal"
android:gravity="center_horizontal"
android:text="---"
android:textColor="#FFFFFF"
android:textSize="34sp" />
android:textColor="@color/white"
android:textSize="34sp"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/avgdelta"
@ -51,8 +52,9 @@
android:layout_marginStart="5dp"
android:gravity="center_horizontal|bottom"
android:text="---"
android:textColor="#FFFFFF"
android:textSize="24sp" />
android:textColor="@color/white"
android:textSize="24sp"
tools:ignore="HardcodedText" />
</LinearLayout>
@ -62,10 +64,10 @@
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="-5sp"
android:text="E xU/h IOB: x (x+x)"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="18sp" />
android:textColor="@color/white"
android:textSize="18sp"
tools:text="E xU/h IOB: x (x+x)" />
<lecho.lib.hellocharts.view.LineChartView
android:id="@+id/chart"
@ -76,7 +78,7 @@
android:gravity="center_horizontal" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="-5sp"
android:gravity="center_horizontal"
@ -90,10 +92,10 @@
android:layout_gravity="center_horizontal"
android:layout_marginEnd="6dp"
android:paddingTop="-5sp"
android:text="12:00"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="34sp" />
android:textColor="@color/white"
android:textSize="34sp"
tools:text="12:00" />
<TextView
android:id="@+id/timestamp"
@ -102,10 +104,10 @@
android:layout_gravity="center_vertical|center_horizontal|center"
android:text="--'"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="24sp" />
</LinearLayout>
android:textColor="@color/white"
android:textSize="24sp"
tools:ignore="HardcodedText" />
</LinearLayout>
</RelativeLayout>
</LinearLayout>

View file

@ -1,9 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent" tools:context=".watchfaces.CockpitWatchface" tools:deviceIds="wear_round"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main_layout"
android:background="@drawable/airplane_cockpit_outside_clouds">
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/airplane_cockpit_outside_clouds"
tools:context=".watchfaces.CockpitWatchface"
tools:deviceIds="wear_round"
tools:ignore="MissingDefaultResource">
<LinearLayout
android:id="@+id/inside"
@ -13,32 +17,23 @@
android:orientation="vertical"
android:weightSum="1">
<LinearLayout
<View
android:layout_width="fill_parent"
android:layout_height="0px"
android:orientation="vertical"
android:layout_weight="0.095">
</LinearLayout>
android:layout_weight="0.095" />
<LinearLayout
android:id="@+id/windows"
android:layout_width="fill_parent"
android:layout_height="0px"
android:orientation="vertical"
android:layout_weight="0.2575">
android:layout_weight="0.2575"
android:orientation="horizontal">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:weightSum="1">
<TextView
<View
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_gravity="bottom"
android:layout_weight="0.47" />
android:layout_weight="0.47"
tools:ignore="NestedWeights" />
<LinearLayout
android:id="@+id/warnings"
@ -48,10 +43,9 @@
android:baselineAligned="false"
android:orientation="vertical">
<TextView
<View
android:layout_width="fill_parent"
android:layout_height="0px"
android:layout_gravity="bottom"
android:layout_weight="0.2" />
<TextView
@ -62,16 +56,16 @@
android:layout_weight="1"
android:background="@drawable/airplane_led_grey_unlit"
android:gravity="center"
android:text="H"
android:text="@string/first_char_high"
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="8sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:ignore="SmallSp" />
<TextView
<View
android:layout_width="fill_parent"
android:layout_height="0px"
android:layout_gravity="bottom"
android:layout_weight="2" />
<TextView
@ -82,36 +76,33 @@
android:layout_weight="1"
android:background="@drawable/airplane_led_grey_unlit"
android:gravity="center"
android:text="L"
android:text="@string/first_char_low"
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="8sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:ignore="SmallSp" />
<TextView
<View
android:layout_width="fill_parent"
android:layout_height="0px"
android:layout_gravity="bottom"
android:layout_weight="0.2" />
</LinearLayout>
<TextView
<View
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_gravity="bottom"
android:layout_weight="0.47" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/dashboard"
android:layout_width="fill_parent"
android:layout_height="0px"
android:orientation="vertical"
android:layout_weight="0.0775">
android:layout_weight="0.0775"
android:orientation="vertical">
</LinearLayout>
@ -120,41 +111,22 @@
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.57"
android:orientation="vertical">
android:orientation="horizontal">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:weightSum="1">
<LinearLayout
<View
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.08"
android:baselineAligned="false"
android:orientation="horizontal">
</LinearLayout>
tools:ignore="NestedWeights" />
<LinearLayout
android:id="@+id/panel1"
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="0.275"
android:baselineAligned="false"
android:orientation="horizontal"
android:gravity="center"
android:textAlignment="center">
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:weightSum="1">
<TextView
<View
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.07" />
@ -169,12 +141,12 @@
<TextView
android:id="@+id/sgv"
android:layout_width="wrap_content"
android:layout_height="0px"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="1"
android:text="---"
android:textColor="@color/primary_text_dark"
android:textSize="30sp" />
android:textSize="30sp"
tools:ignore="HardcodedText" />
</LinearLayout>
@ -193,7 +165,8 @@
<TextView
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.35" />
android:layout_weight="0.35"
tools:ignore="NestedWeights" />
<TextView
android:id="@+id/timestamp"
@ -201,40 +174,34 @@
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="0.65"
android:text="--'"
android:gravity="center"
android:text="--'"
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="14sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:ignore="HardcodedText" />
</LinearLayout>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.10" />
</LinearLayout>
<LinearLayout
<View
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.0225"
android:baselineAligned="false"
android:orientation="horizontal">
</LinearLayout>
android:layout_weight="0.0225" />
<LinearLayout
android:id="@+id/panel2"
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.245"
android:orientation="horizontal">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:weightSum="1.01">
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
@ -248,11 +215,11 @@
android:layout_gravity="center"
android:layout_weight="0.19"
android:gravity="center"
android:text="12:00"
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="18sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:text="12:00" />
<TextView
android:id="@+id/tmpBasal"
@ -261,7 +228,7 @@
android:layout_gravity="bottom|center_horizontal"
android:layout_weight="0.19"
android:gravity="bottom|center_horizontal"
android:text="-.--U/h"
android:text="@string/no_tmp_basal_u_h"
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="13sp"
@ -274,7 +241,7 @@
android:layout_gravity="bottom|center_horizontal"
android:layout_weight="0.18"
android:gravity="bottom|center_horizontal"
android:text="--U"
android:text="@string/no_iob_u"
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="13sp"
@ -287,9 +254,9 @@
android:layout_gravity="bottom|center_horizontal"
android:layout_weight="0.185"
android:gravity="bottom|center_horizontal"
android:text="--g"
android:text="@string/no_cob_g"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textColor="@color/white"
android:textSize="13sp"
android:textStyle="bold" />
@ -312,7 +279,8 @@
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="13sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/rig_battery"
@ -321,49 +289,37 @@
android:layout_gravity="bottom|center_horizontal"
android:gravity="bottom|center_horizontal"
android:paddingStart="4dp"
android:paddingEnd="0dp"
android:text="--%"
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="13sp"
android:textStyle="bold"
android:visibility="gone" />
android:visibility="gone"
tools:ignore="HardcodedText" />
</LinearLayout>
<TextView
<View
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.06" />
</LinearLayout>
</LinearLayout>
<LinearLayout
<View
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.0225"
android:baselineAligned="false"
android:orientation="horizontal">
</LinearLayout>
android:layout_weight="0.0225" />
<LinearLayout
android:id="@+id/panel3"
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.275"
android:baselineAligned="false"
android:orientation="horizontal"
android:textAlignment="center">
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:weightSum="1">
<TextView
<View
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.07" />
@ -388,14 +344,15 @@
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="28sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:ignore="HardcodedText, NestedWeights" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_gravity="center"
android:layout_weight="0.167"
android:gravity="center"
android:layout_gravity="center"
android:weightSum="2">
<TextView
@ -409,7 +366,8 @@
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="13sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/avgdelta"
@ -418,7 +376,7 @@
android:layout_gravity="center"
android:layout_weight="1"
android:gravity="center"
android:text="avg"
android:text="@string/abbreviation_average"
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="13sp"
@ -431,7 +389,7 @@
<TextView
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.03" />
android:layout_weight="0.06" />
<LinearLayout
android:layout_width="match_parent"
@ -440,10 +398,11 @@
android:orientation="horizontal"
android:weightSum="1">
<TextView
<View
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.1" />
android:layout_weight="0.1"
tools:ignore="NestedWeights" />
<TextView
android:id="@+id/loop"
@ -457,31 +416,28 @@
android:textAlignment="center"
android:textColor="@color/primary_text_dark"
android:textSize="14sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:ignore="HardcodedText" />
<TextView
<View
android:id="@+id/AAPSv2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.16" />
</LinearLayout>
<View
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.4"
android:visibility="invisible"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.08"
android:baselineAligned="false"
android:orientation="horizontal">
</LinearLayout>
</LinearLayout>
android:layout_weight="0.08" />
</LinearLayout>

View file

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black"
tools:deviceIds="wear_round">
tools:deviceIds="wear_round"
tools:ignore="MissingDefaultResource">
<!-- background-image with shapes elements-->
<LinearLayout
@ -15,13 +15,15 @@
android:layout_height="match_parent"
android:background="@drawable/digitalstyle_bg_full_round"
android:contentDescription="round-shape-elements"
android:orientation="horizontal" />
android:orientation="horizontal"
tools:ignore="HardcodedText" />
<!-- root-element-->
<LinearLayout
android:id="@+id/watchface_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:baselineAligned="false"
android:orientation="horizontal"
android:weightSum="8">
@ -34,7 +36,7 @@
android:orientation="vertical"
android:weightSum="100">
<Space
<View
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="13.95" />
@ -47,7 +49,7 @@
android:orientation="horizontal"
android:weightSum="13">
<Space
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="4.9" />
@ -69,7 +71,8 @@
android:gravity="bottom|center_horizontal"
android:text="@string/activity_carb"
android:textColor="@color/light_grey"
android:textSize="10sp" />
android:textSize="10sp"
tools:ignore="SmallSp" />
<TextView
android:id="@+id/cobView"
@ -80,19 +83,20 @@
android:gravity="top|center_horizontal"
android:letterSpacing="-0.075"
android:lines="1"
android:text="000g"
android:text="@string/cob_000g"
android:textColor="@color/white"
android:textSize="14sp" />
</LinearLayout>
<Space
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1.1" />
</LinearLayout>
<Space
<View
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="2.87" />
@ -105,7 +109,7 @@
android:orientation="horizontal"
android:weightSum="13">
<Space
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="3.2" />
@ -130,7 +134,7 @@
android:orientation="horizontal"
android:weightSum="10">
<Space
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2" />
@ -147,7 +151,8 @@
android:textAlignment="center"
android:textColor="@color/white"
android:textSize="16sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/timestamp"
@ -160,12 +165,14 @@
android:fontFamily="sans-serif-condensed-light"
android:text="--'"
android:textColor="@color/light_grey"
android:textSize="10sp" />
android:textSize="10sp"
tools:ignore="HardcodedText,SmallSp" />
<Space
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2" />
</LinearLayout>
<!-- 2nd line with sgv-->
@ -187,21 +194,23 @@
android:gravity="top|center_horizontal"
android:letterSpacing="-0.05"
android:lines="1"
android:text="00,0"
android:text="@string/svg_00_0"
android:textColor="@color/white"
android:textSize="20sp"
android:textStyle="bold" />
</LinearLayout>
</LinearLayout>
<Space
</LinearLayout>
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1.1" />
</LinearLayout>
<Space
<View
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="2.87" />
@ -214,7 +223,7 @@
android:orientation="horizontal"
android:weightSum="13">
<Space
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="4.9" />
@ -236,7 +245,8 @@
android:gravity="bottom|center_horizontal"
android:text="@string/activity_IOB"
android:textColor="@color/light_grey"
android:textSize="10sp" />
android:textSize="10sp"
tools:ignore="SmallSp" />
<TextView
android:id="@+id/iobView"
@ -247,22 +257,24 @@
android:gravity="top|center_horizontal"
android:letterSpacing="-0.075"
android:lines="1"
android:text="0,00U"
android:text="@string/iob_0_00u"
android:textColor="@color/white"
android:textSize="14sp" />
</LinearLayout>
<Space
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1.1" />
</LinearLayout>
<Space
<View
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="13.95" />
</LinearLayout>
<!-- right side 5/8 width -->
@ -279,12 +291,13 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginLeft="9dp"
android:layout_marginStart="9dp"
android:layout_marginEnd="0dp"
android:layout_weight="1"
android:orientation="vertical">
<!-- right side top - spacer 2/10 -->
<Space
<View
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="2" />
@ -312,11 +325,11 @@
android:layout_height="match_parent"
android:layout_weight="5"
android:fontFamily="@font/roboto_condensed_regular"
android:text="DDD"
android:textAllCaps="true"
android:textColor="@color/white"
android:textFontWeight="400"
android:textSize="18sp" />
android:textSize="18sp"
tools:text="DDD" />
<TextView
android:id="@+id/weeknumber"
@ -325,17 +338,18 @@
android:layout_weight="4"
android:fontFamily="@font/roboto_condensed_light"
android:letterSpacing="-0.1"
android:text="ww"
android:textAllCaps="true"
android:textColor="@color/light_grey"
android:textFontWeight="400"
android:textSize="18sp"
android:visibility="gone" />
android:visibility="gone"
tools:text="ww" />
<Space
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="3" />
</LinearLayout>
<!-- day number + month (short)-->
@ -355,10 +369,12 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/roboto_condensed_regular"
android:paddingStart="0dp"
android:paddingEnd="4dp"
android:text="DD"
android:textColor="@color/light_grey"
android:textSize="18sp" />
android:textSize="18sp"
tools:text="DD" />
</LinearLayout>
<!-- month short-->
<LinearLayout
@ -369,14 +385,17 @@
android:id="@+id/month"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginStart="5dp"
android:fontFamily="@font/roboto_condensed_regular"
android:text="MMM"
android:textAllCaps="true"
android:textColor="@color/light_grey"
android:textSize="18sp" />
android:textSize="18sp"
tools:text="MMM" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<!-- right side top - hour minute 4/10 -->
@ -384,29 +403,32 @@
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="4"
android:gravity="left|center_vertical"
android:baselineAligned="false"
android:gravity="start|center_vertical"
android:orientation="horizontal">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginTop="-5dp">
<!-- hour -->
<TextView
android:id="@+id/hour"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_gravity="start"
android:fontFamily="@font/roboto_condensed_bold"
android:text="HH"
android:textAllCaps="true"
android:textColor="@color/white"
android:textSize="40sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:text="HH" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical">
@ -416,29 +438,33 @@
android:id="@+id/minute"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="left"
android:layout_marginLeft="6sp"
android:layout_gravity="start"
android:layout_marginStart="6sp"
android:layout_marginBottom="-8sp"
android:fontFamily="@font/roboto_condensed_bold"
android:text="MI"
android:textColor="@color/light_grey"
android:textSize="26sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:text="MI" />
<!-- 12h period AM / PM -->
<TextView
android:id="@+id/timePeriod"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8sp"
android:layout_marginStart="8sp"
android:fontFamily="@font/roboto_condensed_bold"
android:gravity="top"
android:text="AM"
android:textColor="@color/light_grey"
android:textSize="10sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:ignore="SmallSp"
tools:text="AM" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<!-- right side 1/2 height - bottom halft -->
@ -449,7 +475,7 @@
android:layout_marginRight="7dp"
android:layout_weight="1"
android:baselineAligned="false"
android:gravity="left|top"
android:gravity="start|top"
android:orientation="vertical"
android:weightSum="10">
@ -472,7 +498,8 @@
android:text="+/-"
android:textColor="@color/light_grey"
android:textSize="10sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:ignore="HardcodedText,SmallSp" />
<TextView
android:id="@+id/avgdelta"
@ -480,10 +507,11 @@
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_horizontal|center_vertical"
android:text="avg"
android:text="@string/abbreviation_average"
android:textColor="@color/light_grey"
android:textSize="10sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:ignore="SmallSp" />
<TextView
android:id="@+id/uploader_battery"
@ -494,7 +522,8 @@
android:text="--%"
android:textColor="@color/light_grey"
android:textSize="10sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:ignore="HardcodedText,SmallSp" />
<TextView
android:id="@+id/rig_battery"
@ -506,7 +535,8 @@
android:textColor="@color/light_grey"
android:textSize="10sp"
android:textStyle="bold"
android:visibility="gone" />
android:visibility="gone"
tools:ignore="HardcodedText,SmallSp" />
<TextView
android:id="@+id/tmpBasal"
@ -514,10 +544,11 @@
android:layout_height="match_parent"
android:layout_weight="1.7"
android:gravity="center_horizontal|center_vertical"
android:text="-.--U/h"
android:text="@string/no_tmp_basal_u_h"
android:textColor="@color/light_grey"
android:textSize="10sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:ignore="SmallSp" />
<TextView
android:id="@+id/bgiView"
@ -525,11 +556,13 @@
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center_horizontal|center_vertical"
android:text="bgi"
android:textColor="@color/light_grey"
android:textSize="10sp"
android:textStyle="bold"
android:visibility="gone" />
android:visibility="gone"
tools:ignore="SmallSp"
tools:text="bgi" />
</LinearLayout>
<!-- right side bottom - diagram 6/10 -->
@ -552,22 +585,22 @@
</LinearLayout>
<!-- right side bottom - spacer 2/10 -->
<Space
<View
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="2" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<!-- FLAGs -->
<TextView
<View
android:id="@+id/AAPSv2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:text=""
android:visibility="gone" />
</RelativeLayout>

View file

@ -1,129 +1,142 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent" tools:context=".watchfaces.AapsWatchface" tools:deviceIds="wear_round"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black"
android:id="@+id/main_layout">
android:orientation="vertical"
android:textAlignment="center"
android:weightSum="1"
tools:context=".watchfaces.AapsWatchface"
tools:deviceIds="wear_round"
tools:ignore="MissingDefaultResource">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="-5dp"
android:gravity="center_horizontal"
android:orientation="horizontal"
android:paddingTop="15dp"
android:textAlignment="center"
android:weightSum="1">
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textAlignment="center"
android:paddingTop="15dp"
android:weightSum="1"
android:layout_gravity="center_horizontal"
android:gravity="center_horizontal"
android:layout_marginTop="-5dp">
<TextView
android:id="@+id/sgv"
android:textSize="41sp"
android:text="---"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#FFFFFF"
android:layout_gravity="center_horizontal|bottom"
android:gravity="bottom|right"
android:paddingEnd="5dp"
android:layout_marginBottom="-2dp"
android:paddingTop="-2dp" />
android:gravity="bottom|end"
android:paddingStart="0dp"
android:paddingTop="-2dp"
android:paddingEnd="5dp"
android:text="---"
android:textColor="@color/white"
android:textSize="41sp"
tools:ignore="HardcodedText" />
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:weightSum="1"
android:textAlignment="center"
android:layout_gravity="center_horizontal"
android:baselineAligned="false"
android:layout_gravity="center_horizontal">
android:orientation="vertical"
android:textAlignment="center"
android:weightSum="1">
<TextView
android:id="@+id/direction"
android:textSize="30sp"
android:text="--"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="#FFFFFF"
android:textAlignment="center"
android:layout_gravity="center_horizontal|bottom"
android:gravity="center_horizontal|bottom"
android:layout_marginBottom="-5dp"
android:layout_marginTop="-2dp"
android:textStyle="bold" />
android:layout_marginBottom="-5dp"
android:gravity="center_horizontal|bottom"
android:text="--"
android:textAlignment="center"
android:textColor="@color/white"
android:textSize="30sp"
android:textStyle="bold"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/delta"
android:textSize="10sp"
android:text="--- mg/dl"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textColor="#FFFFFF"
android:layout_gravity="bottom"
android:gravity="center_horizontal|bottom"
android:textStyle="bold" />
android:text="@string/delta_na"
android:textColor="@color/white"
android:textSize="10sp"
android:textStyle="bold"
tools:ignore="SmallSp" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:id="@+id/secondary_layout"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@color/light_grey"
android:id="@+id/secondary_layout"
android:orientation="vertical"
android:padding="1dp">
<LinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAlignment="center"
android:layout_gravity="center_horizontal">
android:layout_gravity="center_horizontal"
android:orientation="horizontal">
<TextView
android:id="@+id/timestamp"
android:textSize="8sp"
android:text="-- Minutes ago"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/time_stamp_na_min_ago"
android:textAlignment="center"
android:textColor="#000000"
android:layout_height="wrap_content" />
android:textColor="@color/black"
android:textSize="8sp"
tools:ignore="SmallSp" />
<TextView
android:id="@+id/uploader_battery"
android:textSize="8sp"
android:text="Uploader: ---%"
android:layout_width="wrap_content"
android:textAlignment="center"
android:textColor="#000000"
android:layout_height="wrap_content"
android:paddingStart="10sp"
android:layout_height="wrap_content" />
android:paddingEnd="0sp"
android:text="@string/uploader_na"
android:textAlignment="center"
android:textColor="@color/black"
android:textSize="8sp"
tools:ignore="SmallSp" />
<TextView
android:id="@+id/raw"
android:textSize="8sp"
android:text=""
android:layout_width="wrap_content"
android:textAlignment="center"
android:textColor="#000000"
android:layout_height="wrap_content"
android:paddingStart="10sp"
android:layout_height="wrap_content" />
android:paddingEnd="0sp"
android:text=""
android:textAlignment="center"
android:textColor="@color/black"
android:textSize="8sp"
tools:ignore="SmallSp" />
<TextView
android:id="@+id/externaltstatus"
android:textSize="8sp"
android:text="S: no status"
android:layout_width="wrap_content"
android:textAlignment="center"
android:textColor="#000000"
android:layout_height="wrap_content"
android:paddingStart="10sp"
android:layout_height="wrap_content" />
android:paddingEnd="0sp"
android:text="@string/no_status"
android:textAlignment="center"
android:textColor="@color/black"
android:textSize="8sp"
tools:ignore="SmallSp" />
</LinearLayout>
@ -131,17 +144,15 @@
<TextView
android:id="@+id/watch_time"
android:textSize="30sp"
android:text="12:00"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:textColor="#FFFFFF"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAlignment="center"
android:layout_gravity="center_horizontal"
android:layout_marginTop="-2dp"
android:layout_marginBottom="-3dp" />
android:layout_marginBottom="-3dp"
android:textAlignment="center"
android:textColor="@color/white"
android:textSize="30sp"
tools:text="12:00" />
<lecho.lib.hellocharts.view.LineChartView
android:id="@+id/chart"
@ -150,6 +161,4 @@
android:layout_gravity="bottom"
android:gravity="center_horizontal|top" />
</LinearLayout>
</RelativeLayout>
</LinearLayout>

View file

@ -1,21 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black"
tools:context=".watchfaces.AapsV2Watchface"
tools:deviceIds="wear_round">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:textAlignment="center"
android:weightSum="1.1">
android:weightSum="1.1"
tools:context=".watchfaces.AapsV2Watchface"
tools:deviceIds="wear_round"
tools:ignore="MissingDefaultResource">
<LinearLayout
<View
android:layout_width="wrap_content"
android:layout_height="0px"
android:layout_weight="0.05"
@ -40,9 +37,10 @@
android:gravity="center"
android:text="--'"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textColor="@color/white"
android:textSize="14sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/sgv"
@ -50,13 +48,14 @@
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal|bottom"
android:layout_marginBottom="-2dp"
android:gravity="bottom|right"
android:gravity="bottom|end"
android:paddingStart="5dp"
android:paddingTop="-2dp"
android:paddingEnd="5dp"
android:text="---"
android:textColor="#FFFFFF"
android:textSize="38sp" />
android:textColor="@color/white"
android:textSize="38sp"
tools:ignore="HardcodedText" />
<LinearLayout
android:layout_width="wrap_content"
@ -65,8 +64,8 @@
android:baselineAligned="false"
android:gravity="center_vertical"
android:orientation="vertical"
android:paddingEnd="4dp"
android:textAlignment="center">
android:paddingStart="0dp"
android:paddingEnd="4dp">
<TextView
android:id="@+id/direction"
@ -76,9 +75,10 @@
android:gravity="center_horizontal|bottom"
android:text="--"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textColor="@color/white"
android:textSize="22sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/timestamp"
@ -87,9 +87,10 @@
android:layout_marginBottom="2dp"
android:gravity="center"
android:text="--'"
android:textColor="#FFFFFF"
android:textColor="@color/white"
android:textSize="14sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:ignore="HardcodedText" />
</LinearLayout>
@ -125,9 +126,10 @@
android:gravity="center"
android:text="+/-"
android:textAlignment="center"
android:textColor="#000000"
android:textColor="@color/black"
android:textSize="13sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/avgdelta"
@ -136,9 +138,9 @@
android:layout_gravity="center"
android:layout_weight="1"
android:gravity="center"
android:text="avg"
android:text="@string/abbreviation_average"
android:textAlignment="center"
android:textColor="#000000"
android:textColor="@color/black"
android:textSize="13sp"
android:textStyle="bold" />
@ -151,9 +153,10 @@
android:gravity="center"
android:text="--%"
android:textAlignment="center"
android:textColor="#000000"
android:textColor="@color/black"
android:textSize="13sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/rig_battery"
@ -164,10 +167,11 @@
android:gravity="center"
android:text="--%"
android:textAlignment="center"
android:textColor="#000000"
android:textColor="@color/black"
android:textSize="13sp"
android:textStyle="bold"
android:visibility="gone" />
android:visibility="gone"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/tmpBasal"
@ -176,9 +180,9 @@
android:layout_gravity="center"
android:layout_weight="1.7"
android:gravity="center"
android:text="-.--U/h"
android:text="@string/no_tmp_basal_u_h"
android:textAlignment="center"
android:textColor="#000000"
android:textColor="@color/black"
android:textSize="13sp"
android:textStyle="bold" />
@ -189,19 +193,17 @@
android:layout_gravity="center"
android:layout_weight="1"
android:gravity="center"
android:text="bgi"
android:textAlignment="center"
android:textColor="#000000"
android:textColor="@color/black"
android:textSize="13sp"
android:textStyle="bold"
android:visibility="gone" />
android:visibility="gone"
tools:text="bgi" />
<TextView
<View
android:id="@+id/AAPSv2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:text=""
android:visibility="gone" />
</LinearLayout>
@ -212,27 +214,15 @@
android:id="@+id/tertiary_layout"
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_gravity="center"
android:layout_weight="0.22"
android:background="@color/black"
android:gravity="center"
android:orientation="vertical"
android:padding="1dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:baselineAligned="false"
android:gravity="center"
android:orientation="horizontal"
android:padding="1dp"
android:weightSum="7">
<LinearLayout
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="horizontal" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
@ -249,9 +239,10 @@
android:layout_gravity="center"
android:gravity="center"
android:text="@string/activity_carb"
android:textColor="#FFFFFF"
android:textColor="@color/white"
android:textSize="10sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:ignore="SmallSp" />
<TextView
android:id="@+id/cobView"
@ -259,19 +250,19 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:text="--g"
android:text="@string/no_cob_g"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textColor="@color/white"
android:textSize="14sp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
<View
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="horizontal" />
tools:ignore="NestedWeights" />
<TextView
android:id="@+id/watch_time"
@ -279,10 +270,10 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:text="12:00"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="30sp" />
android:textColor="@color/white"
android:textSize="30sp"
tools:text="12:00" />
<LinearLayout
android:id="@+id/date_time"
@ -300,10 +291,10 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:text="day"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="12sp" />
android:textColor="@color/white"
android:textSize="12sp"
tools:text="day" />
<TextView
android:id="@+id/month"
@ -311,17 +302,16 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:text="mth"
android:textColor="#FFFFFF"
android:textSize="12sp" />
android:textColor="@color/white"
android:textSize="12sp"
tools:text="mth" />
</LinearLayout>
<LinearLayout
<View
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="horizontal" />
android:layout_weight="1" />
<LinearLayout
android:layout_width="wrap_content"
@ -339,9 +329,10 @@
android:gravity="center"
android:text="@string/activity_IOB"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textColor="@color/white"
android:textSize="10sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:ignore="SmallSp" />
<TextView
android:id="@+id/iobView"
@ -349,20 +340,13 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:text="--U"
android:textColor="#FFFFFF"
android:text="@string/no_iob_u"
android:textColor="@color/white"
android:textSize="14sp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="horizontal" />
</LinearLayout>
</LinearLayout>
@ -374,12 +358,10 @@
android:layout_weight="0.41"
android:gravity="center_horizontal|top" />
<LinearLayout
<View
android:layout_width="wrap_content"
android:layout_height="0px"
android:layout_weight="0.05"
android:orientation="vertical" />
</LinearLayout>
</RelativeLayout>
</LinearLayout>

View file

@ -1,138 +1,138 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent" tools:context=".watchfaces.AapsWatchface" tools:deviceIds="wear_round"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black"
android:id="@+id/main_layout">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:textAlignment="center">
android:textAlignment="center"
tools:context=".watchfaces.AapsWatchface"
tools:deviceIds="wear_round"
tools:ignore="MissingDefaultResource">
<LinearLayout
android:orientation="horizontal"
android:layout_width="147dp"
android:layout_height="wrap_content"
android:textAlignment="center"
android:paddingTop="29dp"
android:weightSum="1"
android:layout_gravity="center_horizontal">
android:layout_gravity="center_horizontal"
android:gravity="center_vertical|center_horizontal"
android:orientation="horizontal"
android:paddingTop="30dp"
android:textAlignment="center">
<TextView
android:id="@+id/sgv"
android:textSize="50sp"
android:text="---"
android:layout_width="wrap_content"
android:layout_height="55dp"
android:textColor="#FFFFFF"
android:layout_gravity="bottom"
android:gravity="bottom|right" />
android:layout_height="wrap_content"
android:paddingStart="0dp"
android:paddingEnd="10dp"
android:paddingBottom="3dp"
android:text="8.8"
android:textColor="@color/white"
android:textSize="50sp"
tools:ignore="HardcodedText" />
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:weightSum="1"
android:textAlignment="center"
android:layout_gravity="center_horizontal"
android:baselineAligned="false"
android:layout_gravity="center_horizontal">
android:orientation="vertical"
android:textAlignment="center"
android:weightSum="1">
<TextView
android:id="@+id/direction"
android:textSize="27sp"
android:textStyle="bold"
android:text="--"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="#FFFFFF"
android:textAlignment="center"
android:layout_gravity="center_horizontal|bottom"
android:gravity="center_horizontal|bottom"
android:paddingTop="1dp" />
android:paddingTop="1dp"
android:text="--"
android:textAlignment="center"
android:textColor="@color/white"
android:textSize="27sp"
android:textStyle="bold"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/delta"
android:textSize="10sp"
android:text="--- mg/dl"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textColor="#FFFFFF"
android:layout_gravity="bottom"
android:gravity="center_horizontal" />
android:gravity="center_horizontal"
android:text="@string/delta_na"
android:textColor="@color/white"
android:textSize="10sp"
tools:ignore="SmallSp" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:orientation="vertical"
android:id="@+id/secondary_layout"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:background="@color/light_grey"
android:id="@+id/secondary_layout"
android:padding="2dp">
<LinearLayout
android:gravity="center_horizontal"
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAlignment="center"
android:layout_gravity="center_horizontal">
android:padding="2dp">
<TextView
android:id="@+id/timestamp"
android:textSize="12sp"
android:text="-- Minutes ago"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="--'"
android:textAlignment="center"
android:textColor="#000000"
android:layout_height="wrap_content" />
android:textColor="@color/black"
android:textSize="14sp"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/uploader_battery"
android:textSize="12sp"
android:text="Uploader: ---%"
android:layout_width="wrap_content"
android:textAlignment="center"
android:textColor="#000000"
android:layout_height="wrap_content"
android:paddingStart="10sp"
android:layout_height="wrap_content" />
android:paddingEnd="0sp"
android:text="@string/uploader_na"
android:textAlignment="center"
android:textColor="@color/black"
android:textSize="14sp" />
<TextView
android:id="@+id/raw"
android:textSize="12sp"
android:text=""
android:layout_width="wrap_content"
android:textAlignment="center"
android:textColor="#000000"
android:layout_height="wrap_content"
android:paddingStart="10sp"
android:layout_height="wrap_content" />
android:paddingEnd="0sp"
android:text=""
android:textAlignment="center"
android:textColor="@color/black"
android:textSize="14sp" />
<TextView
android:id="@+id/externaltstatus"
android:textSize="12sp"
android:text="S: no status"
android:layout_width="wrap_content"
android:textAlignment="center"
android:textColor="#000000"
android:layout_height="wrap_content"
android:paddingStart="10sp"
android:layout_height="wrap_content" />
</LinearLayout>
android:paddingEnd="0sp"
android:text="@string/no_status"
android:textAlignment="center"
android:textColor="@color/black"
android:textSize="14sp" />
</LinearLayout>
<TextView
android:id="@+id/watch_time"
android:textSize="55sp"
android:text="12:00"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:textColor="#FFFFFF"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal|top"
android:textAlignment="center"
android:layout_gravity="center_horizontal|top" />
android:textColor="@color/white"
android:textSize="55sp"
tools:text="12:00" />
</LinearLayout>
</RelativeLayout>
</LinearLayout>

View file

@ -1,100 +1,101 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent" tools:context=".watchfaces.AapsWatchface" tools:deviceIds="wear_square"
android:background="@color/black"
android:id="@+id/main_layout">
<LinearLayout
android:orientation="vertical"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black"
android:gravity="center_vertical|center_horizontal"
android:orientation="vertical"
android:textAlignment="center"
android:gravity="center_horizontal">
tools:context=".watchfaces.NoChartWatchface"
tools:deviceIds="wear_square"
tools:ignore="MissingDefaultResource">
<LinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAlignment="center"
android:paddingTop="5dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="-5dp"
android:gravity="center_horizontal">
android:layout_marginTop="-15dp"
android:gravity="center_horizontal"
android:orientation="horizontal"
android:textAlignment="center">
<TextView
android:id="@+id/delta"
android:textSize="40sp"
android:text="---"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#FFFFFF"
android:layout_gravity="bottom"
android:layout_marginEnd="5dp"
android:gravity="center_horizontal|bottom"
android:layout_marginEnd="5dp" />
android:text="---"
android:textColor="@color/white"
android:textSize="40sp"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/sgv"
android:textSize="55sp"
android:text="---"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#FFFFFF"
android:layout_gravity="center_horizontal"
android:gravity="center_horizontal" />
android:gravity="center_horizontal"
android:text="---"
android:textColor="@color/white"
android:textSize="55sp"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/avgdelta"
android:textSize="40sp"
android:text="---"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#FFFFFF"
android:layout_gravity="bottom"
android:layout_marginStart="5dp"
android:gravity="center_horizontal|bottom"
android:layout_marginStart="5dp" />
android:text="---"
android:textColor="@color/white"
android:textSize="40sp"
tools:ignore="HardcodedText" />
</LinearLayout>
<TextView
android:id="@+id/externaltstatus"
android:textSize="24sp"
android:text="E xU/h IOB: x (x+x)"
android:layout_width="wrap_content"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:layout_gravity="center_horizontal"
android:layout_height="wrap_content"/>
<LinearLayout
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:textAlignment="center"
android:gravity="center_horizontal|bottom">
android:textColor="@color/white"
android:textSize="24sp"
tools:text="E xU/h IOB: x (x+x)" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal|bottom"
android:orientation="horizontal"
android:textAlignment="center">
<TextView
android:id="@+id/watch_time"
android:textSize="47sp"
android:text="12:00"
android:textColor="#FFFFFF"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAlignment="center"
android:layout_gravity="center_horizontal"
android:layout_marginEnd="6dp"
android:layout_gravity="center_horizontal" />
android:textAlignment="center"
android:textColor="@color/white"
android:textSize="47sp"
tools:text="12:00" />
<TextView
android:id="@+id/timestamp"
android:textSize="35sp"
android:text="-- '"
android:layout_width="wrap_content"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_height="wrap_content" />
android:text="-- '"
android:textAlignment="center"
android:textColor="@color/white"
android:textSize="35sp"
tools:ignore="HardcodedText" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>
</LinearLayout>

View file

@ -1,22 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent" tools:context=".watchfaces.AapsWatchface" tools:deviceIds="wear_square"
android:background="@color/black"
android:id="@+id/main_layout">
<LinearLayout
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black"
android:gravity="center_vertical|center_horizontal"
android:orientation="vertical"
android:textAlignment="center">
tools:context=".watchfaces.AapsWatchface"
tools:deviceIds="wear_square"
tools:ignore="MissingDefaultResource">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="-5dp"
android:layout_marginTop="-15dp"
android:layout_marginBottom="5dp"
android:gravity="center_horizontal"
android:orientation="horizontal"
android:paddingTop="5dp"
@ -28,10 +28,12 @@
android:layout_height="match_parent"
android:layout_gravity="bottom"
android:layout_marginEnd="5dp"
android:layout_marginBottom="-15dp"
android:gravity="center_vertical|center_horizontal|center"
android:text="---"
android:textColor="#FFFFFF"
android:textSize="24sp" />
android:textColor="@color/white"
android:textSize="22sp"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/sgv"
@ -40,8 +42,9 @@
android:layout_gravity="center_horizontal"
android:gravity="center_horizontal"
android:text="---"
android:textColor="#FFFFFF"
android:textSize="45sp" />
android:textColor="@color/white"
android:textSize="42sp"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/avgdelta"
@ -49,10 +52,12 @@
android:layout_height="match_parent"
android:layout_gravity="center_horizontal"
android:layout_marginStart="5dp"
android:layout_marginBottom="-15dp"
android:gravity="center_vertical|center_horizontal|center"
android:text=" ---"
android:textColor="#FFFFFF"
android:textSize="26sp" />
android:textColor="@color/white"
android:textSize="22sp"
tools:ignore="HardcodedText" />
</LinearLayout>
@ -69,19 +74,12 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:text="No Loop Status"
android:paddingBottom="2dp"
android:text="@string/no_loop_status"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textColor="@color/white"
android:textSize="21sp" />
<View
android:id="@+id/dummy2"
android:layout_width="match_parent"
android:layout_height="2dp"
android:layout_gravity="bottom"
android:layout_weight="0"
android:gravity="center_horizontal" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@ -95,10 +93,10 @@
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginEnd="6dp"
android:text="23:24"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="45sp" />
android:textColor="@color/white"
android:textSize="43sp"
tools:text="23:24" />
<TextView
android:id="@+id/timestamp"
@ -107,10 +105,10 @@
android:layout_gravity="center_vertical|center_horizontal"
android:text="--'"
android:textAlignment="center"
android:textColor="#FFFFFF"
android:textSize="24sp" />
</LinearLayout>
android:textColor="@color/white"
android:textSize="24sp"
tools:ignore="HardcodedText" />
</LinearLayout>
</RelativeLayout>
</LinearLayout>

View file

@ -5,7 +5,8 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".watchfaces.SteampunkWatchface"
tools:deviceIds="wear_round">
tools:deviceIds="wear_round"
tools:ignore="MissingDefaultResource">
<LinearLayout
android:layout_width="match_parent"
@ -18,6 +19,7 @@
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:importantForAccessibility="no"
android:src="@drawable/steampunk_dial_mgdl" />
</LinearLayout>
@ -57,13 +59,11 @@
android:orientation="vertical"
android:weightSum="1">
<LinearLayout
<View
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_gravity="center"
android:layout_weight="0.05"
android:gravity="center"
android:orientation="horizontal" />
tools:ignore="NestedWeights" />
<LinearLayout
android:layout_width="match_parent"
@ -97,7 +97,7 @@
android:gravity="center"
android:paddingTop="7dp"
android:rotation="-28"
android:text="--g"
android:text="@string/no_cob_g"
android:textAlignment="center"
android:textColor="@color/black_86p"
android:textSize="13sp"
@ -119,7 +119,7 @@
android:gravity="center"
android:paddingBottom="14dp"
android:rotation="0"
android:text="-.--U/h"
android:text="@string/no_tmp_basal_u_h"
android:textAlignment="center"
android:textColor="@color/black_86p"
android:textSize="13sp"
@ -141,7 +141,7 @@
android:gravity="center"
android:paddingTop="6dp"
android:rotation="28"
android:text="0.00U"
android:text="@string/no_iob_u"
android:textAlignment="center"
android:textColor="@color/black_86p"
android:textSize="13sp"
@ -170,11 +170,11 @@
android:orientation="horizontal"
android:weightSum="1">
<LinearLayout
<View
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.25"
android:orientation="horizontal" />
tools:ignore="NestedWeights" />
<lecho.lib.hellocharts.view.LineChartView
android:id="@+id/chart"
@ -182,7 +182,7 @@
android:layout_height="match_parent"
android:layout_weight="0.5" />
<LinearLayout
<View
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.25"
@ -190,11 +190,10 @@
</LinearLayout>
<LinearLayout
<View
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.03"
android:orientation="vertical" />
android:layout_weight="0.03" />
</LinearLayout>
@ -207,26 +206,26 @@
android:orientation="vertical"
android:weightSum="1">
<LinearLayout
<View
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.15"
android:orientation="horizontal" />
android:layout_weight="0.15" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_gravity="center"
android:layout_weight="0.21"
android:baselineAligned="false"
android:gravity="center"
android:orientation="horizontal"
android:weightSum="1">
<LinearLayout
<View
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.32"
android:orientation="horizontal" />
tools:ignore="NestedWeights" />
<LinearLayout
android:layout_width="0px"
@ -240,14 +239,16 @@
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:paddingEnd="8dp"
android:paddingStart="0dp"
android:paddingTop="8dp"
android:paddingEnd="8dp"
android:rotation="-24"
android:text="-'"
android:textAlignment="center"
android:textColor="@color/black_86p"
android:textSize="12sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:ignore="HardcodedText" />
</LinearLayout>
@ -270,7 +271,8 @@
android:textColor="@color/black_86p"
android:textSize="12sp"
android:textStyle="bold"
android:visibility="gone" />
android:visibility="gone"
tools:ignore="HardcodedText" />
<TextView
android:id="@+id/uploader_battery"
@ -282,7 +284,8 @@
android:textAlignment="center"
android:textColor="@color/black_86p"
android:textSize="12sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:ignore="HardcodedText" />
</LinearLayout>
@ -300,28 +303,28 @@
android:gravity="center"
android:paddingStart="10dp"
android:paddingTop="8dp"
android:paddingEnd="0dp"
android:rotation="24"
android:text="-'"
android:textAlignment="center"
android:textColor="@color/black_86p"
android:textSize="12sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:ignore="HardcodedText" />
</LinearLayout>
<LinearLayout
<View
android:layout_width="0px"
android:layout_height="match_parent"
android:layout_weight="0.32"
android:orientation="horizontal" />
android:layout_weight="0.32" />
</LinearLayout>
<LinearLayout
<View
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.64"
android:orientation="horizontal" />
android:layout_weight="0.64" />
</LinearLayout>
@ -330,8 +333,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/steampunk_cover_plate"
android:orientation="vertical">
</LinearLayout>
android:orientation="vertical" />
<LinearLayout
android:layout_width="match_parent"
@ -370,10 +372,10 @@
</LinearLayout>
<TextView
<View
android:id="@+id/AAPSv2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"/>
android:visibility="gone" />
</RelativeLayout>

View file

@ -12,9 +12,9 @@
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_marginStart="10dp"
android:importantForAccessibility="no"
android:src="@drawable/circle" />
<TextView
@ -24,14 +24,13 @@
android:layout_centerVertical="true"
android:layout_marginStart="10dp"
android:layout_toEndOf="@+id/menuItemIcon"
android:layout_toRightOf="@+id/menuItemIcon"
android:autoSizeMaxTextSize="32sp"
android:autoSizeMinTextSize="12sp"
android:autoSizeStepGranularity="2sp"
android:autoSizeTextType="uniform"
android:text="action item"
android:textColor="@color/dark_statusView"
android:textSize="20sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:text="action item" />
</RelativeLayout>

View file

@ -1,10 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:orientation="horizontal"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
@ -15,12 +11,12 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="10sp"
android:background="@drawable/circle"
android:backgroundTint="#ffffff"
android:src="@drawable/ic_confirm"
android:tint="#ffffff"
android:backgroundTint="@color/white"
android:contentDescription="@string/action_confirm"
android:padding="25sp"
android:layout_margin="10sp"/>
android:src="@drawable/ic_confirm"
app:tint="@color/white" />
</LinearLayout>
</RelativeLayout>
</LinearLayout>

View file

@ -1,5 +1,6 @@
<androidx.wear.widget.BoxInsetLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
@ -11,18 +12,21 @@
<androidx.core.widget.NestedScrollView
android:id="@+id/message_scroll"
android:focusable="true"
android:focusableInTouchMode="true"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:focusable="true"
android:focusableInTouchMode="true">
<TextView
android:id="@+id/message"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="message"
android:textAppearance="@style/TextAppearance.Wearable.Small"
android:textColor="@color/white" />
android:textColor="@color/white"
tools:text="message" />
</androidx.core.widget.NestedScrollView>
</FrameLayout>
</androidx.wear.widget.BoxInsetLayout>

View file

@ -1,14 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:orientation="horizontal"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center">
android:gravity="center"
android:orientation="horizontal">
<ImageView
android:id="@+id/minusbutton"
@ -16,15 +13,16 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@drawable/circle"
android:backgroundTint="#ffffff"
android:backgroundTint="@color/white"
android:contentDescription="@string/decrement"
android:src="@drawable/ic_action_minus"
android:tint="#ffffff" />
android:tint="@color/white" />
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center">
android:layout_gravity="center"
android:orientation="vertical">
<EditText
android:id="@+id/amountfield"
@ -36,9 +34,9 @@
android:inputType="numberDecimal"
android:minWidth="50dp"
android:padding="10dp"
android:text="112"
android:textColor="@color/white"
android:textSize="45sp" />
android:textSize="45sp"
tools:text="112" />
<TextView
android:id="@+id/label"
@ -46,21 +44,25 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:text="label"
android:labelFor="@+id/amountfield"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/white"
android:textSize="25sp" />
android:textSize="25sp"
tools:ignore="LabelFor"
tools:text="label" />
</LinearLayout>
<ImageView
android:id="@+id/plusbutton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@drawable/circle"
android:backgroundTint="#ffffff"
android:backgroundTint="@color/white"
android:contentDescription="@string/increment"
android:src="@drawable/ic_action_add"
android:tint="#ffffff" />
android:tint="@color/white" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>

View file

@ -1,14 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:orientation="horizontal"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center">
android:gravity="center"
android:orientation="horizontal">
<ImageView
android:id="@+id/plusbutton"
@ -16,16 +13,17 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@drawable/circle"
android:backgroundTint="#ffffff"
android:backgroundTint="@color/white"
android:contentDescription="@string/increment"
android:src="@drawable/ic_action_add"
android:tint="#ffffff" />
android:tint="@color/white" />
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center">
android:gravity="center"
android:orientation="vertical">
<EditText
android:id="@+id/amountfield"
@ -37,9 +35,9 @@
android:inputType="numberDecimal"
android:minWidth="100dp"
android:paddingTop="10dp"
android:text="112"
android:textColor="@color/white"
android:textSize="45sp" />
android:textSize="45sp"
tools:text="112" />
<TextView
android:id="@+id/label"
@ -47,10 +45,12 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:text="label"
android:labelFor="@+id/amountfield"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/white"
android:textSize="25sp" />
android:textSize="25sp"
tools:ignore="LabelFor"
tools:text="label" />
<ImageView
android:id="@+id/minusbutton"
@ -58,12 +58,11 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@drawable/circle"
android:backgroundTint="#ffffff"
android:backgroundTint="@color/white"
android:contentDescription="@string/decrement"
android:src="@drawable/ic_action_minus"
android:tint="#ffffff" />
android:tint="@color/white" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>
</LinearLayout>

View file

@ -1,21 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:orientation="horizontal"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center">
android:gravity="center"
android:orientation="horizontal">
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center">
android:gravity="center"
android:orientation="vertical">
<EditText
android:id="@+id/amountfield"
@ -27,9 +24,9 @@
android:inputType="numberDecimal"
android:minWidth="100dp"
android:paddingTop="10dp"
android:text="112"
android:textColor="@color/white"
android:textSize="45sp" />
android:textSize="45sp"
tools:text="112" />
<TextView
android:id="@+id/label"
@ -37,10 +34,12 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:text="label"
android:labelFor="@+id/amountfield"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/white"
android:textSize="25sp" />
android:textSize="25sp"
tools:ignore="LabelFor"
tools:text="label" />
<ImageView
android:id="@+id/minusbutton"
@ -48,9 +47,10 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@drawable/circle"
android:backgroundTint="#ffffff"
android:backgroundTint="@color/white"
android:contentDescription="@string/decrement"
android:src="@drawable/ic_action_minus"
android:tint="#ffffff" />
android:tint="@color/white" />
</LinearLayout>
@ -60,10 +60,9 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@drawable/circle"
android:backgroundTint="#ffffff"
android:backgroundTint="@color/white"
android:contentDescription="@string/increment"
android:src="@drawable/ic_action_add"
android:tint="#ffffff" />
android:tint="@color/white" />
</LinearLayout>
</RelativeLayout>
</LinearLayout>

View file

@ -1,36 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:weightSum="1">
android:orientation="horizontal">
<TextView
android:id="@+id/label"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="left|center_vertical"
android:layout_gravity="start|center_vertical"
android:gravity="center"
android:labelFor="@+id/amountfield"
android:rotation="90"
android:text="labelx"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/white"
android:textSize="25sp" />
android:textSize="25sp"
tools:ignore="LabelFor"
tools:text="labelx" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="left|center_vertical|center_horizontal"
android:layout_gravity="start|center_vertical|center_horizontal"
android:orientation="vertical">
<ImageView
@ -38,9 +30,10 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|center_horizontal"
android:backgroundTint="#ffffff"
android:backgroundTint="@color/white"
android:contentDescription="@string/increment"
android:src="@drawable/ic_action_add"
android:tint="#ffffff" />
android:tint="@color/white" />
<EditText
android:id="@+id/amountfield"
@ -53,19 +46,22 @@
android:inputType="numberDecimal"
android:minWidth="50dp"
android:padding="10dp"
android:text="112"
android:textColor="@color/white"
android:textSize="45sp" />
android:textSize="45sp"
tools:text="112" />
<ImageView
android:id="@+id/minusbutton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|center_horizontal"
android:backgroundTint="#ffffff"
android:backgroundTint="@color/white"
android:contentDescription="@string/decrement"
android:src="@drawable/ic_action_minus"
android:tint="#ffffff" />
android:tint="@color/white" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
</LinearLayout>

View file

@ -1,9 +1,9 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.wear.widget.WearableRecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
<androidx.wear.widget.WearableRecyclerView
android:id="@+id/action_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
@ -26,16 +26,17 @@
android:autoSizeMinTextSize="12sp"
android:autoSizeTextType="uniform"
android:gravity="center"
android:text="Title"
android:textSize="18sp" />
android:textSize="18sp"
tools:text="Title" />
</LinearLayout>
<androidx.wear.widget.CurvedTextView
android:id="@+id/title_curved"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Title"
android:textSize="18sp"
android:visibility="gone" />
android:visibility="gone"
tools:text="Title" />
</FrameLayout>

View file

@ -1,53 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_vertical|center_horizontal"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_alignParentStart="true">
android:gravity="center_vertical|center_horizontal"
android:orientation="vertical">
<TextView android:id="@+id/agoString"
<TextView
android:id="@+id/agoString"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="18sp"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:text="99'"
android:layout_gravity="center"
android:layout_marginBottom="-5dp" />
android:layout_marginBottom="-5dp"
android:textSize="18sp"
tools:text="99'" />
<TextView android:id="@+id/sgvString"
<TextView
android:id="@+id/sgvString"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:textSize="55sp"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:text="999"
android:layout_gravity="center" />
tools:text="999" />
<TextView android:id="@+id/statusString"
<TextView
android:id="@+id/statusString"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="18sp"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_gravity="center"
android:layout_marginTop="-5dp"
android:text="@string/activity_no_status"
android:layout_gravity="center"
android:layout_marginTop="-5dp" />
android:textSize="18sp" />
<TextView android:id="@+id/deltaString"
<TextView
android:id="@+id/deltaString"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="18sp"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:text="+99"
android:layout_gravity="center"
android:layout_marginTop="-5dp" />
android:layout_marginTop="-5dp"
android:textSize="18sp"
tools:text="+99" />
</LinearLayout>
</RelativeLayout>
</LinearLayout>

View file

@ -1,16 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
android:layout_height="match_parent">
<androidx.wear.widget.CurvedTextView
android:id="@+id/title_curved"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Title"
android:textSize="18sp"
android:visibility="gone" />
android:visibility="gone"
tools:text="Title" />
<TextView
android:id="@+id/title"
@ -20,8 +21,8 @@
android:autoSizeMinTextSize="12sp"
android:autoSizeTextType="uniform"
android:gravity="center"
android:text="Title"
android:textSize="18sp" />
android:textSize="18sp"
tools:text="Title" />
<android.support.wearable.view.GridViewPager
android:id="@+id/pager"
@ -34,6 +35,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal|bottom"
app:dotFadeOutDelay="100000"/>
app:dotFadeOutDelay="100000" />
</FrameLayout>

View file

@ -11,10 +11,9 @@
android:id="@+id/menuItemIcon"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_marginStart="10dp"
android:importantForAccessibility="no"
android:src="@drawable/circle" />
<TextView
@ -24,10 +23,9 @@
android:layout_centerVertical="true"
android:layout_marginStart="10dp"
android:layout_toEndOf="@+id/menuItemIcon"
android:layout_toRightOf="@+id/menuItemIcon"
android:text="action item"
android:textColor="@color/dark_statusView"
android:textSize="20sp"
android:textStyle="bold" />
android:textStyle="bold"
tools:text="action item" />
</RelativeLayout>

View file

@ -168,4 +168,20 @@
<string name="tile_no_config">No hay configuración disponible</string>
<string name="wear_control_not_enabled">Controles Wear desactivados</string>
<string name="wear_control_no_data">No hay datos disponibles</string>
<string name="increment">incremento</string>
<string name="decrement">decremento</string>
<string name="first_char_high">A</string>
<string name="first_char_low">B</string>
<string name="abbreviation_average">media</string>
<string name="no_iob_u">--U</string>
<string name="no_cob_g">--g</string>
<string name="no_tmp_basal_u_h">-.--U/h</string>
<string name="uploader_na">Subido: ---%</string>
<string name="no_status">S: sin estado</string>
<string name="time_stamp_na_min_ago">-- minutos atrás</string>
<string name="delta_na">--- mg/dl</string>
<string name="no_loop_status">Sin estado del lazo</string>
<string name="cob_000g">000g</string>
<string name="svg_00_0">00,0</string>
<string name="iob_0_00u">0,00U</string>
</resources>

View file

@ -2,6 +2,15 @@
<resources>
<string name="app_name">AAPS</string>
<string name="label_actions_activity">AAPS</string>
<string name="label_watchface">AAPS</string>
<string name="label_watchface_large">AAPS (Большой)</string>
<string name="label_watchface_big_chart">AAPS (Крупный график)</string>
<string name="label_watchface_no_chart">AAPS (Без графика)</string>
<string name="label_watchface_circle">AAPS (круглый)</string>
<string name="label_watchface_v2">AAPS(v2)</string>
<string name="label_watchface_cockpit">AAPS (кабина пилота)</string>
<string name="label_watchface_steampunk">AAPS (Стимпанк)</string>
<string name="label_watchface_digital_style">AAPS (ЦифровойСтиль)</string>
<string name="label_actions_tile">AAPS (Действия)</string>
<string name="label_temp_target_tile">AAPS(ВремЦель)</string>
<string name="label_quick_wizard_tile">AAPS(Мастер)</string>
@ -55,11 +64,13 @@
<string name="pref_complication_tap_action">Действия при нажатии кнопки расширений</string>
<string name="pref_unicode_in_complications">Юникод в репликации</string>
<string name="pref_version">Версия:</string>
<string name="pref_moreWatchfaceSettings">Еще настройки циферблатов</string>
<string name="pref_lookInYourWatchfaceConfiguration">Смотрите конфигурацию циферблата.</string>
<string name="menu_tempt">ВремЦ</string>
<string name="menu_wizard">Калькулятор</string>
<string name="menu_wizard_short">Кальк</string>
<string name="menu_treatment">Терапия</string>
<string name="menu_treatment_short">Терап</string>
<string name="menu_bolus">Болюс</string>
<string name="menu_carb">Углеводы</string>
<string name="menu_ecarb">растянутые углеводы eCarbs </string>
@ -70,18 +81,38 @@
<string name="menu_none">Не показывать</string>
<string name="menu_default">По умолчанию</string>
<string name="menu_menu">Menu</string>
<string name="quick_wizard_short">XL</string>
<string name="action_duration">Длительность</string>
<string name="action_tempt_confirmation">Запрошена временная цель</string>
<string name="action_quick_wizard_confirmation">Запрошен мастер настройки</string>
<string name="action_treatment_confirmation">Запрошена терапия</string>
<string name="action_bolus_confirmation">Запрошен Болюс</string>
<string name="action_wizard_confirmation">Расчет запрошен</string>
<string name="action_fill_confirmation">Заполнение запрошено</string>
<string name="action_ecarb_confirmation">Углеводы запрошены</string>
<string name="action_profile_switch_confirmation">Запрос на смену профиля</string>
<string name="action_target" comment="In temp target menu, single target value">Цель</string>
<string name="action_low" comment="In temp target menu, lower value from range">Низкое значение</string>
<string name="action_high" comment="In temp target menu, higher value from range">Высокое значение</string>
<string name="action_carbs">Углеводы</string>
<string name="action_ecarbs">растянутые углеводы eCarbs </string>
<string name="action_percentage">Процент</string>
<string name="action_start_min">Начало [min]</string>
<string name="action_duration_h">Продолжительность [h]</string>
<string name="action_insulin">Инсулин</string>
<string name="action_preset_1">Предустановка 1</string>
<string name="action_preset_2">Предустановка 2</string>
<string name="action_preset_3">Предустановка 3</string>
<string name="action_free_amount" comment="In prime/fill menu, allows to enter any amount to be used for priming/filling">Произвольное количество</string>
<string name="action_confirm">ПОДТВЕРДИТЬ</string>
<string name="action_timeshift">сдвиг по времени</string>
<string name="action_bolus">Болюс</string>
<string name="bolus_progress">Подается болюс</string>
<string name="press_to_cancel">нажмите для отмены</string>
<string name="cancel_bolus">ОТМЕНИТЬ БОЛЮС</string>
<string name="status_pump">Помпа</string>
<string name="status_loop">Замкнутый цикл</string>
<string name="status_profile_switch">Смена профиля</string>
<string name="status_tdd">TDD/общая суточная доза</string>
<string name="activity_carb">Углеводы</string>
<string name="activity_IOB">IOB</string>
@ -128,4 +159,13 @@
<string name="simple_ui_charging">Во время зарядки</string>
<string name="simple_ui_always_on">Режим: всегда вкл</string>
<string name="simple_ui_always_on_charging">Режим: всегда вкл при зарядке</string>
<string name="temp_target_eating_soon">Прием пищи</string>
<string name="temp_target_hypo">Гипо</string>
<string name="temp_target_activity">Нагрузка</string>
<string name="temp_target_manual">Вручную</string>
<string name="temp_target_cancel">Отмена</string>
<string name="tile_none">Отсутствует</string>
<string name="tile_no_config">Нет доступной конфигурации</string>
<string name="wear_control_not_enabled">Функция управления Wear выключена</string>
<string name="wear_control_no_data">Нет данных</string>
</resources>

View file

@ -2,6 +2,15 @@
<resources>
<string name="app_name">AAPS</string>
<string name="label_actions_activity">AAPS</string>
<string name="label_watchface">AAPS</string>
<string name="label_watchface_large">AAPS(大)</string>
<string name="label_watchface_big_chart">AAPS(大图)</string>
<string name="label_watchface_no_chart">AAPS(无图)</string>
<string name="label_watchface_circle">AAPS(圆形)</string>
<string name="label_watchface_v2">AAPS(v2)</string>
<string name="label_watchface_cockpit">AAPS(驾驶)</string>
<string name="label_watchface_steampunk">AAPS(机械)</string>
<string name="label_watchface_digital_style">AAPS(数字风格)</string>
<string name="label_actions_tile">AAPS(操作)</string>
<string name="label_temp_target_tile">AAPS(临时目标)</string>
<string name="label_quick_wizard_tile">AAPS(快速向导)</string>
@ -55,6 +64,7 @@
<string name="pref_complication_tap_action">折叠Tap操作</string>
<string name="pref_unicode_in_complications">折叠中的代码</string>
<string name="pref_version">版本</string>
<string name="pref_moreWatchfaceSettings">更多手表表盘设置</string>
<string name="pref_lookInYourWatchfaceConfiguration">请查看手表表盘配置。</string>
<string name="menu_tempt">临时目标</string>
<string name="menu_wizard">计算器</string>
@ -80,6 +90,7 @@
<string name="action_wizard_confirmation">计算请求</string>
<string name="action_fill_confirmation">Fill 充盈请求</string>
<string name="action_ecarb_confirmation">碳水化合物请求</string>
<string name="action_profile_switch_confirmation">请求配置文件切换</string>
<string name="action_target" comment="In temp target menu, single target value">目标</string>
<string name="action_low" comment="In temp target menu, lower value from range"></string>
<string name="action_high" comment="In temp target menu, higher value from range"></string>
@ -101,6 +112,7 @@
<string name="cancel_bolus">取消大剂量</string>
<string name="status_pump">胰岛素泵</string>
<string name="status_loop">闭环</string>
<string name="status_profile_switch">切换配置文件</string>
<string name="status_tdd">日总量</string>
<string name="activity_carb">碳水化合物</string>
<string name="activity_IOB">活性胰岛素</string>

Some files were not shown because too many files have changed in this diff Show more