From 9cddcc8433e113d6e19577386d89894675a5e774 Mon Sep 17 00:00:00 2001 From: JamOrHam Date: Sat, 1 Jun 2024 17:12:36 +0100 Subject: [PATCH 1/9] New translations strings.xml (Spanish) --- app/src/main/res/values-es/strings-es.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values-es/strings-es.xml b/app/src/main/res/values-es/strings-es.xml index ded9affe86..a06788ea01 100644 --- a/app/src/main/res/values-es/strings-es.xml +++ b/app/src/main/res/values-es/strings-es.xml @@ -601,7 +601,7 @@ Encender Bluetooth Resetear Bluetooth apagándolo y encendiéndolo si no hay comunicación en 20 minutos Vigilante Bluetooth - Resetear Bluetooth apagándolo y encendiéndolo para intentar que G5 siga funcionando. Sin esto el colector de G5 puede fallar. + Reinicializar Bluetooth apagándolo y encendiéndolo para intentar que G5 siga funcionando. Sin esto, el colector de G5 puede fallar. Vigilante Dex Bluetooth Si el vigilante del Bluetooth se activa frecuentemente puede intentar desactivar esta opción para ver si ayuda Wakelocks Bluetooth más antiguos que pueden consumir más batería pero que pueden ser necesarios para la recepción Bluetooth From 0e46b5a02856017bcee9c44ce1136ea1857cab30 Mon Sep 17 00:00:00 2001 From: JamOrHam Date: Sat, 1 Jun 2024 17:12:51 +0100 Subject: [PATCH 2/9] New translations strings.xml (Russian) --- app/src/main/res/values-ru/strings-ru.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/main/res/values-ru/strings-ru.xml b/app/src/main/res/values-ru/strings-ru.xml index 125e7123d6..95b2bb7f54 100644 --- a/app/src/main/res/values-ru/strings-ru.xml +++ b/app/src/main/res/values-ru/strings-ru.xml @@ -601,7 +601,7 @@ Включить Bluetooth Перезапускать Bluetooth при отсутствии данных более 20 минут Мониторинг состояния Bluetooth - Требуется перезапустить Bluetooth (выключить и включить снова) в целях сохранения работоспособности источника данных G5. В противном случае, устройство сбора данных G5 может перестать работать. + Перезагружать Bluetooth, выключая и включая его, чтобы обеспечить работу источника данных G5. Без этого коллектор G5 может перестать работать. Мониторинг состояния G5 Bluetooth Если Bluetooth watchdog часто активируется, вы можете попробовать отключить эту настройку, чтобы посмотреть, поможет ли это Старые блокировки сна Bluetooth, которые могут тратить больше батареи, но могут быть необходимы для приема Bluetooth @@ -655,7 +655,7 @@ Отображать суммарное количество инсулина для введённых пользователем значений Суммарное количество инсулина Процент полученных показаний сенсора - Процент данных, полученных с датчика в режиме реального времени (т.е. без использования метода \'обратного заполнения\'). Используется ТОЛЬКО в нативном режиме G5 + Процент полученных в реальном времени показаний сенсора (не восстановленных из памяти). ТОЛЬКО нативный режим G5 Процент захвата пакетов Процент захвата пакетов в реальном времени Показать точность калибровки за последние 3 дня @@ -699,9 +699,9 @@ Продвинутые настройки G5 для редких ситуаций Настройки отладки G5/G6 Некоторые устройства работают лучше когда постоянное сканирование включено, другие наоборот. Если опция отключена и показания с сенсора поступают стабильно, заряд батареи расходуется медленее. Рекомендуется включать эту опцию в случае проблем со стабильностью получения показаний - Постоянный поиск G5 + Искать G5 постоянно Важный параметр для правильного подключения на некоторых Android устройствах, но может привести к пропускам считанных показаний в случае возникновения других ресурсоемких операций с пользовательским интерфейсом. - Приоритезация G5 сервиса + Принудительно G5 в поток UI Аутентификация G5 перед каждым считыванием Приложение будет пытаться произвести полную аутентификацию перед каждым считыванием. Необходимо для новых прошивок G5. Отвязать G5 перед каждым считыванием @@ -1183,7 +1183,7 @@ Загружать пользовательские значения Отобразить уведомление и подать звуковой сигнал, если загрузка данных в Nightscout не удалась. Оповещение о сбоях - Для G5 - отправляет в Nightscout данные об используемой службе сбора данных (например, OB1) и статус \'обратного заполнения\' данных (для нативного режима) + Для G5 отправляет тип коллектора (напр. OB1) и состояние заполнения показания из истории (для нативного) в Nigthscout. Добавлять информацию об источнике к имени устройства Нажмите, чтобы отправить данные истории в Nightscout Отправить историю @@ -1341,7 +1341,7 @@ Разрешить отвязку OB1 Служба сбора данных OB1 может инициировать подключение. Разрешить OB1 сопряжение - Настройки старой версии службы сбора данных G5 + Настройки старого коллектора G5 Настройки батареи G5/G6 Настройки предупреждений о состоянии батареи Функции и дополнения From 71d402f954efe05321a110700c94a139d8d74bde Mon Sep 17 00:00:00 2001 From: JamOrHam Date: Sun, 2 Jun 2024 17:21:25 +0100 Subject: [PATCH 3/9] New translations strings.xml (Norwegian Bokmal) --- app/src/main/res/values-nb/strings-nb.xml | 40 +++++++++++------------ 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/app/src/main/res/values-nb/strings-nb.xml b/app/src/main/res/values-nb/strings-nb.xml index 07b4f1c0ed..f3ac589ed1 100644 --- a/app/src/main/res/values-nb/strings-nb.xml +++ b/app/src/main/res/values-nb/strings-nb.xml @@ -286,7 +286,7 @@ Eldre unødvendige wakelocks som kan tappe batteriet ekstra, men kan være nødvendig for Nightwatch eller Android Wear Bruk Overdreven Wakelocks Taleavlesninger - Ekstra Statuslinje + Ekstra statuslinje Opplasting til Dexcom Share-server Laste opp data til Dexcoms servere slik at du kan bruke dine data med Dexcom sine apper Administrer følgere @@ -601,7 +601,7 @@ Skru på Bluetooth Tilbakestill Bluetooth ved å slå den av og på hvis vi ikke får noe innen 20 minutter Bluetooth Watchdog - Tilbakestill bluetooth ved å skru det av og på er en måte å sørge for at G5 datakilde fungerer. Uten dette kan G5 innsamlingstjenesten feile. + Tilbakestill bluetooth ved å skru det av og på er en måte å sørge for at datakilden fungerer. Uten dette kan innsamlingstjenesten feile. Dex Bluetooth vakthund Hvis Bluetooth vakthund ofte blir aktivert kan du prøve å huke bort dette valget for å se om det hjelper Eldre bluetoothvekkere kan tømme batteriet raskere, men kan være nødvendig for at Bluetooth skal virke @@ -641,7 +641,7 @@ Tillat ending av usikre innstillinger som kan ødelegge alt! Lagre databasen daglig Tillager den daglige intensjonstjenesten å lagre databasen før den tømmer - Alternativ for ekstra linje + Alternativ for ekstra statuslinje Dagens gjennomsnittlige verdi. A1c-estimat i DCCT format (%) A1c estimat i IFCC format (mmol/mol) @@ -655,12 +655,12 @@ Vis totalt behandlingsinsulin Totalt insulin Prosentandel av sensoravlesninger mottatt - Prosentdel av sensoravlesninger mottatt i sanntid (ikke tilbakefylt). KUN G6 Native mode + Prosentdel av sensoravlesninger mottatt i sanntid (ikke tilbakefylt). KUN Native mode Pakkefangstprosent Pakkefangstprosent i sanntid Vis evaluering av kalibreringsnøyaktighet for siste 3 dager Evaluering av kalibreringsnøyaktighet - Vis også ekstra statuslinje i modul + Vis også ekstra statuslinje i widget Vis kurve og skjæringspunkt i langt format. Vis kurve og skjæringspunkt i kort form. Vis kurve- og glukosedata fra den aktive plugin-modulen @@ -697,11 +697,11 @@ Lavnivå diagnose/prototype verdi ID for din Dexcom-sender, f.eks. 123ABC Avanserte innstillinger for Dexcom - G5/G6/G7/Dex1 feilsøkingsinnstillinger + Dexcom feilsøkingsinnstillinger Noen enheter virker bedre når de blir skannet hele tiden, andre ikke. Hvis avlesningene er stabile når denne innstillingen ikke er valgt, bør du oppleve forbedret batteribruk. Normalt er det best å beholde denne deaktivert - Skan kontinuerling for G5 + Skan kontinuerling Dette er viktig for noen Androidenheter for å koble til skikkelig, men kan føre til manglende avlesninger når andre UI intense aktiviteter er i bruk. - Tving G5 til UI-tråd + Tving Dexcom til UI-tråd Autentiser før hver avlesning Dette vil forsøke en full autentisering før hvert leseforsøk. Trengs for nyere G5 fastvare versioner. Frigjør G5 før hver avlesning @@ -1034,7 +1034,7 @@ Skann før du kobler til xBridge og Libre Bluetooth Bruk skanning Bruk og stol på Android Bluetooth sin funksjon for automatisk tilkobling - Stol på Auto-Tilkobling + Stol på auto-tilkobling Eksperimentell støtte for xBridge+ polling-funksjon xBridge+ polling-modus Undersøk Bluetooth-tjenester på hver tilkobling @@ -1046,7 +1046,7 @@ Skriv batteriinformasjonen for ytterligere analyse i en fil. Vennligst bruk dette bare hvis du blir spurt av en utvikler! Batterilogg Velg å vise brobatterinivået - Glukostilbakeholdelse + Glukoseretensjon Slett data som er eldre enn så mange dager. 0 = ikke slett noe Andre diverse alternativer tillatt testing med død sensor @@ -1178,12 +1178,12 @@ Send brobatterinivået ditt til Nightscout. Fjern avhukning hvis batterisensoren er ødelagt. Last opp brobatteri Send Dexcom-sender batteristatistikk til Nightscout. Dette inkluderer alle data som vises i statusskjerm for datakilde. - Last opp OB1G5/G6/G7/1 sender-batteri + Last opp Dexcom sender-batteri Send behandlingsdata til Nightscout. Fjern avhukning hvis helseportalen din er ødelagt. Last opp behandlinger Vis og avgi et varsel hvis Nightscout-opplastingen mislykkes. Varsling om feil - For G5, sender innsamlertype (f.eks. OB1) og lesing av tilbakefyllingsstatus (for native) til Nightscout. + For Dexcom, sender innsamlertype (f.eks. OB1) og avlesning sin tilbakefyllingsstatus (for native) til Nightscout. Legg til kildeinformasjon til enhetsnavnet Trykk for å sende historiske data til Nightscout Tilbakefyll data @@ -1284,7 +1284,7 @@ Vis finn telefon / slumre Vis MAC-adresse Bruk løsninger for å unngå ikke-standard Android-adferd for enkelte telefoner. Uten dette klarer innsamlere vanligvis ikke å få data. - Alternative løsninger for vekking + Alternativ løsning for vekking Bruk senderkalibrering i stedet for xDrip som primær Medtrum Native Hex diagnostisk testverdi @@ -1322,7 +1322,7 @@ Last ned måltider fra CareLink Notifikasjoner Last ned notifikasjoner fra CareLink - OB1 G5/G6/G7 innsamlerinnstillinger + OB1 Dexcom innsamlerinnstillinger Fullstendig omskriving, skal fungere på Android 4.4 - 9, støtter native-modus og mer Bruk OB1-innsamler Bruk senderens interne algoritme for å beregne glukoseverdier når det er mulig. @@ -1337,14 +1337,14 @@ Falle tilbake til xDrip Bruk heuristikk for å minimere Bluetooth-skanning + spare strøm Minimer skanning - Jeg bruker en G6, G7 eller Dexcom 1 sensor - G6/G7/Dex1-støtte + Jeg bruker en G6, G7 Dexcom 1 eller One+ sensor + G6/G7/Dex1/One+-støtte OB1-innsamleren kan frigjøre seg hvis den tror krypteringen har mislyktes. Hvis du får problemer med å oppheve sammenkoblingen, deaktiver dette alternativet. Hvis du da mister forbindelsen helt, sørg for at dette er aktivert. Tillat OB1-frakobling OB1-innsamler kan starte binding. Tillat OB1 å starte binding - Gammel G5-innsamler innstillinger - G5/G6/Dex1 batterialternativer + Gamle Dexcom-innsamler innstillinger + G6/Dex1 batterialternativer Juster batterivarselnivået Plugins og funksjoner Pulsmåler @@ -1635,8 +1635,8 @@ Vil du koble xDrip med denne sensoren? Dette vil stoppe Libre-leseren og LibreLink fra å motta varsler. Trykk ja og skann igjen for å koble til (velg ikke koble til hvis du vil kjøre xDrip med den patchede appen) Kobler Libre-sensor til Bluetooth Uten kameratillatelse kan vi ikke skanne en strekkode - Lag filtrert data ved behov - Lag manglende filtrert + Lager en ekstra grafkurve som viser filtrert eller utjevnet plott + Lag manglende filtrert plott Skjul grafen på widgets (vises ved neste avlesing) Skjul widgetgraf Vis data mottatt eksternt (kun diagnostikk) From fa9486f2d25942cf62982b7c3f447b18bddad00e Mon Sep 17 00:00:00 2001 From: Tzachi Dar Date: Mon, 3 Jun 2024 11:08:29 +0300 Subject: [PATCH 4/9] Add one more libre sn: 0xc60931 --- .../com/eveningoutpost/dexdrip/models/LibreOOPAlgorithm.java | 1 + .../com/eveningoutpost/dexdrip/models/LibreOOPAlgorithm.java | 1 + 2 files changed, 2 insertions(+) diff --git a/app/src/main/java/com/eveningoutpost/dexdrip/models/LibreOOPAlgorithm.java b/app/src/main/java/com/eveningoutpost/dexdrip/models/LibreOOPAlgorithm.java index c6ed86d0fa..f5d51c8cab 100644 --- a/app/src/main/java/com/eveningoutpost/dexdrip/models/LibreOOPAlgorithm.java +++ b/app/src/main/java/com/eveningoutpost/dexdrip/models/LibreOOPAlgorithm.java @@ -303,6 +303,7 @@ public static SensorType getSensorType(byte[] SensorInfo) { return SensorType.LibreUS14Day; case 0x9d0830: case 0xc50930: + case 0xc60931: return SensorType.Libre2; case 0x700010: return SensorType.LibreProH; diff --git a/wear/src/main/java/com/eveningoutpost/dexdrip/models/LibreOOPAlgorithm.java b/wear/src/main/java/com/eveningoutpost/dexdrip/models/LibreOOPAlgorithm.java index 7dd3210cea..8be8e11265 100644 --- a/wear/src/main/java/com/eveningoutpost/dexdrip/models/LibreOOPAlgorithm.java +++ b/wear/src/main/java/com/eveningoutpost/dexdrip/models/LibreOOPAlgorithm.java @@ -303,6 +303,7 @@ public static SensorType getSensorType(byte[] SensorInfo) { return SensorType.LibreUS14Day; case 0x9d0830: case 0xc50930: + case 0xc60931: return SensorType.Libre2; case 0x700010: return SensorType.LibreProH; From 4c1c5dc4bd3a3ec42265dca7b7cca0e1f8e42ba9 Mon Sep 17 00:00:00 2001 From: tolot27 Date: Thu, 6 Jun 2024 22:11:07 +0200 Subject: [PATCH 5/9] ProGuard rule to ignore kotlinx.serialization.Serializable missing class warning --- app/proguard-rules.pro | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index ebbec48de7..58b0e325fe 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -64,6 +64,16 @@ -keep class android.support.v7.widget.SearchView { *; } -keep class kotlinx.serialization.Serializable { *; } +# As long as we only deserialize (from a JSON string into an `NSDeviceStatus` +# object in the class `AAPSStatusHandler`) we can simply ignore warnings related +# to kotlinx serialization. +# These rule should not cause problems: if a project actually relies on +# serialization, then much more than just this class will be required, +# so telling Proguard not to worry if this is missing will not prevent it +# from emitting errors for code that does use serialization but somehow forgot +# to depend on it. +-dontwarn kotlinx.serialization.Serializable + -dontwarn java.util.concurrent.** -keep class rx.schedulers.Schedulers { From 2cd66671ea5c909e6a24910e36e5ed38540e5e69 Mon Sep 17 00:00:00 2001 From: Navid Date: Sat, 8 Jun 2024 22:33:45 -0400 Subject: [PATCH 6/9] Session stop notification for G7 --- .../dexdrip/services/Ob1G5CollectionService.java | 11 +++++++++++ .../dexdrip/utilitymodels/Constants.java | 1 + 2 files changed, 12 insertions(+) diff --git a/app/src/main/java/com/eveningoutpost/dexdrip/services/Ob1G5CollectionService.java b/app/src/main/java/com/eveningoutpost/dexdrip/services/Ob1G5CollectionService.java index 70a6702cd9..2db2a32586 100644 --- a/app/src/main/java/com/eveningoutpost/dexdrip/services/Ob1G5CollectionService.java +++ b/app/src/main/java/com/eveningoutpost/dexdrip/services/Ob1G5CollectionService.java @@ -20,6 +20,7 @@ import static com.eveningoutpost.dexdrip.models.JoH.joinBytes; import static com.eveningoutpost.dexdrip.models.JoH.msSince; import static com.eveningoutpost.dexdrip.models.JoH.niceTimeScalar; +import static com.eveningoutpost.dexdrip.models.JoH.niceTimeScalarNatural; import static com.eveningoutpost.dexdrip.models.JoH.tolerantHexStringToByteArray; import static com.eveningoutpost.dexdrip.models.JoH.tsl; import static com.eveningoutpost.dexdrip.models.JoH.upForAtLeastMins; @@ -39,6 +40,7 @@ import static com.eveningoutpost.dexdrip.utilitymodels.Constants.G5_SENSOR_FAILED; import static com.eveningoutpost.dexdrip.utilitymodels.Constants.G5_SENSOR_RESTARTED; import static com.eveningoutpost.dexdrip.utilitymodels.Constants.G5_SENSOR_STARTED; +import static com.eveningoutpost.dexdrip.utilitymodels.Constants.G7_SESSION_EXPIRED; import static com.eveningoutpost.dexdrip.utilitymodels.Constants.HOUR_IN_MS; import static com.eveningoutpost.dexdrip.utilitymodels.Constants.MINUTE_IN_MS; import static com.eveningoutpost.dexdrip.utilitymodels.Constants.SECOND_IN_MS; @@ -47,6 +49,7 @@ import static com.eveningoutpost.dexdrip.utilitymodels.StatusItem.Highlight.NORMAL; import static com.eveningoutpost.dexdrip.utilitymodels.StatusItem.Highlight.NOTICE; import static com.eveningoutpost.dexdrip.utils.DexCollectionType.DexcomG5; +import static com.eveningoutpost.dexdrip.utils.DexCollectionType.getBestCollectorHardwareName; import static com.eveningoutpost.dexdrip.utils.bt.Subscription.addErrorHandler; import static com.eveningoutpost.dexdrip.watch.thinjam.BlueJayEntry.isNative; import static com.eveningoutpost.dexdrip.xdrip.gs; @@ -91,6 +94,7 @@ import com.eveningoutpost.dexdrip.g5model.FirmwareCapability; import com.eveningoutpost.dexdrip.g5model.Ob1DexTransmitterBattery; import com.eveningoutpost.dexdrip.g5model.Ob1G5StateMachine; +import com.eveningoutpost.dexdrip.g5model.SensorDays; import com.eveningoutpost.dexdrip.g5model.TransmitterStatus; import com.eveningoutpost.dexdrip.g5model.VersionRequest1RxMessage; import com.eveningoutpost.dexdrip.g5model.VersionRequest2RxMessage; @@ -1931,6 +1935,13 @@ public static void processCalibrationState(final CalibrationState state) { JoH.showNotification(state.getText(), "Sensor FAILED", pi, G5_SENSOR_FAILED, true, true, false); UserError.Log.ueh(TAG, "Native Sensor is now marked FAILED: " + state.getExtendedText()); } + + if (is_started && getBestCollectorHardwareName().equals("G7") && SensorDays.get().getRemainingSensorPeriodInMs() == 0) { // If we have an active G7 session and sensor has expired + Sensor.stopSensor(); // We might as well stop the xDrip session + final PendingIntent pi = PendingIntent.getActivity(xdrip.getAppContext(), G7_SESSION_EXPIRED, JoH.getStartActivityIntent(Home.class), PendingIntent.FLAG_UPDATE_CURRENT); + JoH.showNotification(state.getText(), "Session ended", pi, G7_SESSION_EXPIRED, true, true, false); // Let's notify the user that the session has ended. + UserError.Log.ueh(TAG, "Native Session has now ended: " + state.getExtendedText()); + } // we can't easily auto-cancel a failed notice as auto-restart may mean the user is not aware of it? diff --git a/app/src/main/java/com/eveningoutpost/dexdrip/utilitymodels/Constants.java b/app/src/main/java/com/eveningoutpost/dexdrip/utilitymodels/Constants.java index 160d9e8346..56f0686aac 100644 --- a/app/src/main/java/com/eveningoutpost/dexdrip/utilitymodels/Constants.java +++ b/app/src/main/java/com/eveningoutpost/dexdrip/utilitymodels/Constants.java @@ -55,6 +55,7 @@ public class Constants { public static final int WEBFOLLOW_SERVICE_FAILOVER_ID = 1028; public static final int BACKUP_ACTIVITY_ID = 1029; public static final int CARELINK_SERVICE_FAILOVER_ID = 1030; + public static final int G7_SESSION_EXPIRED = 1031; static final int NIGHTSCOUT_ERROR_NOTIFICATION_ID = 2001; public static final int HEALTH_CONNECT_RESPONSE_ID = 2002; From bfd025a33acf3fdcf61a5933d7f85270ea8676cc Mon Sep 17 00:00:00 2001 From: Navid Date: Sat, 8 Jun 2024 23:22:07 -0400 Subject: [PATCH 7/9] Cleanup --- .../eveningoutpost/dexdrip/services/Ob1G5CollectionService.java | 1 - 1 file changed, 1 deletion(-) diff --git a/app/src/main/java/com/eveningoutpost/dexdrip/services/Ob1G5CollectionService.java b/app/src/main/java/com/eveningoutpost/dexdrip/services/Ob1G5CollectionService.java index 2db2a32586..e7ba537f92 100644 --- a/app/src/main/java/com/eveningoutpost/dexdrip/services/Ob1G5CollectionService.java +++ b/app/src/main/java/com/eveningoutpost/dexdrip/services/Ob1G5CollectionService.java @@ -20,7 +20,6 @@ import static com.eveningoutpost.dexdrip.models.JoH.joinBytes; import static com.eveningoutpost.dexdrip.models.JoH.msSince; import static com.eveningoutpost.dexdrip.models.JoH.niceTimeScalar; -import static com.eveningoutpost.dexdrip.models.JoH.niceTimeScalarNatural; import static com.eveningoutpost.dexdrip.models.JoH.tolerantHexStringToByteArray; import static com.eveningoutpost.dexdrip.models.JoH.tsl; import static com.eveningoutpost.dexdrip.models.JoH.upForAtLeastMins; From 39e1c5e6f61463a56ffcfa4b6050af7b533f15b0 Mon Sep 17 00:00:00 2001 From: Navid Date: Sun, 9 Jun 2024 13:22:30 -0400 Subject: [PATCH 8/9] Expired is also stopped --- .../dexdrip/g5model/CalibrationState.java | 2 +- .../dexdrip/services/Ob1G5CollectionService.java | 12 +----------- .../dexdrip/utilitymodels/Constants.java | 1 - 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/app/src/main/java/com/eveningoutpost/dexdrip/g5model/CalibrationState.java b/app/src/main/java/com/eveningoutpost/dexdrip/g5model/CalibrationState.java index fb5a960f5b..15a125edf1 100644 --- a/app/src/main/java/com/eveningoutpost/dexdrip/g5model/CalibrationState.java +++ b/app/src/main/java/com/eveningoutpost/dexdrip/g5model/CalibrationState.java @@ -58,7 +58,7 @@ public enum CalibrationState { private static final SparseArray lookup = new SparseArray<>(); private static final ImmutableSet failed = ImmutableSet.of(SensorFailed, SensorFailed2, SensorFailed3, SensorFailed4, SensorFailed5, SensorFailed6, SensorFailedStart); - private static final ImmutableSet stopped = ImmutableSet.of(Stopped, Ended, SensorFailed, SensorFailed2, SensorFailed3, SensorFailed4, SensorFailed5, SensorFailed6, SensorFailedStart, SensorStopped); + private static final ImmutableSet stopped = ImmutableSet.of(Stopped, Ended, SensorExpired, SensorFailed, SensorFailed2, SensorFailed3, SensorFailed4, SensorFailed5, SensorFailed6, SensorFailedStart, SensorStopped); private static final ImmutableSet transitional = ImmutableSet.of(WarmingUp, SensorStarted, SensorStopped, CalibrationSent); diff --git a/app/src/main/java/com/eveningoutpost/dexdrip/services/Ob1G5CollectionService.java b/app/src/main/java/com/eveningoutpost/dexdrip/services/Ob1G5CollectionService.java index e7ba537f92..2c843592e4 100644 --- a/app/src/main/java/com/eveningoutpost/dexdrip/services/Ob1G5CollectionService.java +++ b/app/src/main/java/com/eveningoutpost/dexdrip/services/Ob1G5CollectionService.java @@ -39,7 +39,6 @@ import static com.eveningoutpost.dexdrip.utilitymodels.Constants.G5_SENSOR_FAILED; import static com.eveningoutpost.dexdrip.utilitymodels.Constants.G5_SENSOR_RESTARTED; import static com.eveningoutpost.dexdrip.utilitymodels.Constants.G5_SENSOR_STARTED; -import static com.eveningoutpost.dexdrip.utilitymodels.Constants.G7_SESSION_EXPIRED; import static com.eveningoutpost.dexdrip.utilitymodels.Constants.HOUR_IN_MS; import static com.eveningoutpost.dexdrip.utilitymodels.Constants.MINUTE_IN_MS; import static com.eveningoutpost.dexdrip.utilitymodels.Constants.SECOND_IN_MS; @@ -48,7 +47,6 @@ import static com.eveningoutpost.dexdrip.utilitymodels.StatusItem.Highlight.NORMAL; import static com.eveningoutpost.dexdrip.utilitymodels.StatusItem.Highlight.NOTICE; import static com.eveningoutpost.dexdrip.utils.DexCollectionType.DexcomG5; -import static com.eveningoutpost.dexdrip.utils.DexCollectionType.getBestCollectorHardwareName; import static com.eveningoutpost.dexdrip.utils.bt.Subscription.addErrorHandler; import static com.eveningoutpost.dexdrip.watch.thinjam.BlueJayEntry.isNative; import static com.eveningoutpost.dexdrip.xdrip.gs; @@ -93,7 +91,6 @@ import com.eveningoutpost.dexdrip.g5model.FirmwareCapability; import com.eveningoutpost.dexdrip.g5model.Ob1DexTransmitterBattery; import com.eveningoutpost.dexdrip.g5model.Ob1G5StateMachine; -import com.eveningoutpost.dexdrip.g5model.SensorDays; import com.eveningoutpost.dexdrip.g5model.TransmitterStatus; import com.eveningoutpost.dexdrip.g5model.VersionRequest1RxMessage; import com.eveningoutpost.dexdrip.g5model.VersionRequest2RxMessage; @@ -1156,7 +1153,7 @@ public int onStartCommand(Intent intent, int flags, int startId) { } minimize_scanning = Pref.getBooleanDefaultFalse("ob1_minimize_scanning"); - // allow_scan_by_mac = Build.VERSION.SDK_INT >= 32 && shortTxId(); + // allow_scan_by_mac = Build.VERSION.SDK_INT >= 32 && shortTxId(); automata(); // sequence logic UserError.Log.d(TAG, "Releasing service start"); @@ -1934,13 +1931,6 @@ public static void processCalibrationState(final CalibrationState state) { JoH.showNotification(state.getText(), "Sensor FAILED", pi, G5_SENSOR_FAILED, true, true, false); UserError.Log.ueh(TAG, "Native Sensor is now marked FAILED: " + state.getExtendedText()); } - - if (is_started && getBestCollectorHardwareName().equals("G7") && SensorDays.get().getRemainingSensorPeriodInMs() == 0) { // If we have an active G7 session and sensor has expired - Sensor.stopSensor(); // We might as well stop the xDrip session - final PendingIntent pi = PendingIntent.getActivity(xdrip.getAppContext(), G7_SESSION_EXPIRED, JoH.getStartActivityIntent(Home.class), PendingIntent.FLAG_UPDATE_CURRENT); - JoH.showNotification(state.getText(), "Session ended", pi, G7_SESSION_EXPIRED, true, true, false); // Let's notify the user that the session has ended. - UserError.Log.ueh(TAG, "Native Session has now ended: " + state.getExtendedText()); - } // we can't easily auto-cancel a failed notice as auto-restart may mean the user is not aware of it? diff --git a/app/src/main/java/com/eveningoutpost/dexdrip/utilitymodels/Constants.java b/app/src/main/java/com/eveningoutpost/dexdrip/utilitymodels/Constants.java index 56f0686aac..160d9e8346 100644 --- a/app/src/main/java/com/eveningoutpost/dexdrip/utilitymodels/Constants.java +++ b/app/src/main/java/com/eveningoutpost/dexdrip/utilitymodels/Constants.java @@ -55,7 +55,6 @@ public class Constants { public static final int WEBFOLLOW_SERVICE_FAILOVER_ID = 1028; public static final int BACKUP_ACTIVITY_ID = 1029; public static final int CARELINK_SERVICE_FAILOVER_ID = 1030; - public static final int G7_SESSION_EXPIRED = 1031; static final int NIGHTSCOUT_ERROR_NOTIFICATION_ID = 2001; public static final int HEALTH_CONNECT_RESPONSE_ID = 2002; From 8309dae06c18df8a6c7baca8bf04aff9d9d9a00c Mon Sep 17 00:00:00 2001 From: Navid <51497406+Navid200@users.noreply.github.com> Date: Tue, 11 Jun 2024 12:43:24 -0400 Subject: [PATCH 9/9] Sensor expiry note on home screen wrap (#3499) * Sensor expiry note on home screen wrap * Replaced 0dp with wrap_content and removed weight --------- Co-authored-by: Navid --- app/src/main/res/layout/activity_home.xml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/src/main/res/layout/activity_home.xml b/app/src/main/res/layout/activity_home.xml index db62d1e60b..6a91459da7 100644 --- a/app/src/main/res/layout/activity_home.xml +++ b/app/src/main/res/layout/activity_home.xml @@ -540,21 +540,19 @@