diff --git a/app/src/main/assets/revoked_certs.txt b/app/src/main/assets/revoked_certs.txt
index 59a55d9e42..41177d5667 100644
--- a/app/src/main/assets/revoked_certs.txt
+++ b/app/src/main/assets/revoked_certs.txt
@@ -1,2 +1,4 @@
#Demo certificate
-51:6D:12:67:4C:27:F4:9B:9F:E5:42:9B:01:B3:98:E4:66:2B:85:B7:A8:DD:70:32:B7:6A:D7:97:9A:0D:97:10
\ No newline at end of file
+51:6D:12:67:4C:27:F4:9B:9F:E5:42:9B:01:B3:98:E4:66:2B:85:B7:A8:DD:70:32:B7:6A:D7:97:9A:0D:97:10
+#Leaked
+55:5D:70:C9:BE:10:41:7E:4B:01:A9:C4:C6:44:4A:F8:69:71:35:25:ED:95:23:16:C7:15:E8:EB:C6:08:FC:B1
diff --git a/app/src/main/java/info/nightscout/androidaps/dialogs/CarbsDialog.kt b/app/src/main/java/info/nightscout/androidaps/dialogs/CarbsDialog.kt
index 87b1cbae8a..d0295eeccb 100644
--- a/app/src/main/java/info/nightscout/androidaps/dialogs/CarbsDialog.kt
+++ b/app/src/main/java/info/nightscout/androidaps/dialogs/CarbsDialog.kt
@@ -164,7 +164,8 @@ class CarbsDialog : DialogFragmentWithDate() {
actions.add(resourceHelper.gs(R.string.temptargetshort) + ": " + "" + DecimalFormatter.to1Decimal(hypoTT) + " " + unitLabel + " (" + hypoTTDuration + " " + resourceHelper.gs(R.string.unit_minute_short) + ")")
val timeOffset = overview_carbs_time.value.toInt()
- val time = DateUtil.now() + timeOffset * 1000 * 60
+ eventTime -= eventTime % 1000
+ val time = eventTime + timeOffset * 1000 * 60
if (timeOffset != 0)
actions.add(resourceHelper.gs(R.string.time) + ": " + DateUtil.dateAndTimeString(time))
val duration = overview_carbs_duration.value.toInt()
@@ -179,6 +180,9 @@ class CarbsDialog : DialogFragmentWithDate() {
if (notes.isNotEmpty())
actions.add(resourceHelper.gs(R.string.careportal_newnstreatment_notes_label) + ": " + notes)
+ if (eventTimeChanged)
+ actions.add(resourceHelper.gs(R.string.time) + ": " + DateUtil.dateAndTimeString(eventTime))
+
if (carbsAfterConstraints > 0 || activitySelected || eatingSoonSelected || hypoSelected) {
activity?.let { activity ->
OKDialog.showConfirmation(activity, resourceHelper.gs(R.string.carbs), HtmlHelper.fromHtml(Joiner.on("
").join(actions)), Runnable {
diff --git a/app/src/main/java/info/nightscout/androidaps/dialogs/CareDialog.kt b/app/src/main/java/info/nightscout/androidaps/dialogs/CareDialog.kt
index 1dc801b358..b001d792bd 100644
--- a/app/src/main/java/info/nightscout/androidaps/dialogs/CareDialog.kt
+++ b/app/src/main/java/info/nightscout/androidaps/dialogs/CareDialog.kt
@@ -13,6 +13,7 @@ import info.nightscout.androidaps.MainApp
import info.nightscout.androidaps.R
import info.nightscout.androidaps.data.Profile
import info.nightscout.androidaps.db.CareportalEvent
+import info.nightscout.androidaps.db.Source
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunction
import info.nightscout.androidaps.plugins.general.nsclient.NSUpload
import info.nightscout.androidaps.plugins.iob.iobCobCalculator.GlucoseStatus
@@ -130,10 +131,13 @@ class CareDialog : DialogFragmentWithDate() {
actions.add(resourceHelper.gs(R.string.careportal_newnstreatment_notes_label) + ": " + notes)
json.put("notes", notes)
}
+ eventTime -= eventTime % 1000
+
if (eventTimeChanged)
actions.add(resourceHelper.gs(R.string.time) + ": " + DateUtil.dateAndTimeString(eventTime))
json.put("created_at", DateUtil.toISOString(eventTime))
+ json.put("mills", eventTime)
json.put("eventType", when (options) {
EventType.BGCHECK -> CareportalEvent.BGCHECK
EventType.SENSOR_INSERT -> CareportalEvent.SENSORCHANGE
@@ -145,7 +149,16 @@ class CareDialog : DialogFragmentWithDate() {
activity?.let { activity ->
OKDialog.showConfirmation(activity, resourceHelper.gs(event), HtmlHelper.fromHtml(Joiner.on("
").join(actions)), Runnable {
- MainApp.getDbHelper().createCareportalEventFromJsonIfNotExists(json)
+ val careportalEvent = CareportalEvent()
+ careportalEvent.date = eventTime
+ careportalEvent.source = Source.USER
+ careportalEvent.eventType = when (options) {
+ EventType.BGCHECK -> CareportalEvent.BGCHECK
+ EventType.SENSOR_INSERT -> CareportalEvent.SENSORCHANGE
+ EventType.BATTERY_CHANGE -> CareportalEvent.PUMPBATTERYCHANGE
+ }
+ careportalEvent.json = json.toString()
+ MainApp.getDbHelper().createOrUpdate(careportalEvent)
NSUpload.uploadCareportalEntryToNS(json)
}, null)
}
diff --git a/app/src/main/java/info/nightscout/androidaps/dialogs/FillDialog.kt b/app/src/main/java/info/nightscout/androidaps/dialogs/FillDialog.kt
index 16c13a6dfc..864a7e8ee3 100644
--- a/app/src/main/java/info/nightscout/androidaps/dialogs/FillDialog.kt
+++ b/app/src/main/java/info/nightscout/androidaps/dialogs/FillDialog.kt
@@ -26,6 +26,8 @@ import info.nightscout.androidaps.utils.resources.ResourceHelper
import kotlinx.android.synthetic.main.dialog_fill.*
import kotlinx.android.synthetic.main.notes.*
import kotlinx.android.synthetic.main.okcancel.*
+import org.json.JSONException
+import org.json.JSONObject
import java.util.*
import javax.inject.Inject
import kotlin.math.abs
@@ -102,6 +104,8 @@ class FillDialog : DialogFragmentWithDate() {
val notes = notes.text.toString()
if (notes.isNotEmpty())
actions.add(resourceHelper.gs(R.string.careportal_newnstreatment_notes_label) + ": " + notes)
+ eventTime -= eventTime % 1000
+
if (eventTimeChanged)
actions.add(resourceHelper.gs(R.string.time) + ": " + DateUtil.dateAndTimeString(eventTime))
@@ -128,8 +132,21 @@ class FillDialog : DialogFragmentWithDate() {
}
})
}
- if (siteChange) NSUpload.uploadEvent(CareportalEvent.SITECHANGE, eventTime, notes)
- if (insulinChange) NSUpload.uploadEvent(CareportalEvent.INSULINCHANGE, eventTime + 1000, notes)
+ val careportalEvent = CareportalEvent()
+ careportalEvent.date = eventTime
+ careportalEvent.source = Source.USER
+ if (siteChange) {
+ careportalEvent.json = generateJson(CareportalEvent.SITECHANGE, eventTime, notes).toString()
+ careportalEvent.eventType = CareportalEvent.SITECHANGE
+ NSUpload.uploadEvent(CareportalEvent.SITECHANGE, eventTime, notes)
+ }
+ if (insulinChange) {
+ // add a second for case of both checked
+ careportalEvent.json = generateJson(CareportalEvent.INSULINCHANGE, eventTime + 1000, notes).toString()
+ careportalEvent.eventType = CareportalEvent.INSULINCHANGE
+ NSUpload.uploadEvent(CareportalEvent.INSULINCHANGE, eventTime + 1000, notes)
+ }
+ MainApp.getDbHelper().createOrUpdate(careportalEvent)
}, null)
}
} else {
@@ -140,4 +157,18 @@ class FillDialog : DialogFragmentWithDate() {
dismiss()
return true
}
+
+ fun generateJson(careportalEvent: String, time: Long, notes: String): JSONObject {
+ val data = JSONObject()
+ try {
+ data.put("eventType", careportalEvent)
+ data.put("created_at", DateUtil.toISOString(time))
+ data.put("mills", time)
+ data.put("enteredBy", sp.getString("careportal_enteredby", resourceHelper.gs(R.string.app_name)))
+ if (notes.isNotEmpty()) data.put("notes", notes)
+ } catch (ignored: JSONException) {
+ }
+ return data
+ }
+
}
\ No newline at end of file
diff --git a/app/src/main/res/layout/dialog_carbs.xml b/app/src/main/res/layout/dialog_carbs.xml
index 9a95d19144..fdf83cff5b 100644
--- a/app/src/main/res/layout/dialog_carbs.xml
+++ b/app/src/main/res/layout/dialog_carbs.xml
@@ -204,6 +204,8 @@
+
+
diff --git a/app/src/main/res/layout/overview_fragment_smallheight.xml b/app/src/main/res/layout/overview_fragment_smallheight.xml
index 55ca13a291..e892e565cd 100644
--- a/app/src/main/res/layout/overview_fragment_smallheight.xml
+++ b/app/src/main/res/layout/overview_fragment_smallheight.xml
@@ -105,7 +105,7 @@
android:orientation="horizontal">
@@ -120,9 +120,9 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
- android:layout_marginStart="6dp"
+ android:layout_marginStart="2dp"
android:text="00.0"
- android:textSize="42sp"
+ android:textSize="28sp"
android:textStyle="bold" />
@@ -152,7 +152,7 @@
android:id="@+id/overview_timeago"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginStart="8dp"
+ android:layout_marginStart="6dp"
android:layout_marginTop="-2dp"
android:paddingStart="2dp"
android:layout_weight="0.5"
@@ -166,7 +166,7 @@
android:layout_marginTop="-2dp"
android:paddingStart="2dp"
android:layout_weight="0.5"
- android:textSize="14sp" />
+ android:textSize="12sp" />
@@ -193,24 +193,24 @@
+ android:textSize="14sp" />
+ android:textSize="14sp" />
@@ -222,7 +222,7 @@
@@ -231,15 +231,15 @@
android:layout_width="5dp"
android:layout_height="wrap_content"
android:text=":"
- android:textSize="16sp" />
+ android:textSize="14sp" />
@@ -252,24 +252,24 @@
+ android:textSize="14sp" />
+ android:textSize="14sp" />
@@ -281,24 +281,24 @@
+ android:textSize="14sp" />
+ android:textSize="14sp" />
diff --git a/app/src/main/res/values-fr-rFR/strings.xml b/app/src/main/res/values-fr-rFR/strings.xml
index 138c0b9984..ce65634dd9 100644
--- a/app/src/main/res/values-fr-rFR/strings.xml
+++ b/app/src/main/res/values-fr-rFR/strings.xml
@@ -1002,7 +1002,7 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
Pas de données d\'Autosens disponibles
Paramètres journal
Réinitialiser les valeurs par défaut
- Dysfonctionnement du NSClient. Considérerez une réinitialisation de NS et de NSClient.
+ Dysfonctionnement NSClient. Faites une réinitialisation de NS et de NSClient.
AS
Version %1$s disponible
Décalage horaire
@@ -1197,13 +1197,13 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
Début du profil %1$d%%
existe
n\'existe pas
- Temp cible %1$s
+ Cible Temp. %1$s
SSID WiFi %1$s %2$s
Autosens %1$s %2$s %%
Autosens %
%3$s %1$s %2$s
- Différence de glycémies
- Différence Glycémie [%1$s]
+ Delta de glycémies
+ Delta Glyc. [%1$s]
Localisation actuelle
Localisation
Lat :
@@ -1364,8 +1364,8 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
Remplacer le profil par
Remplacer le profil par %1$s
Dernière connexion à la pompe
- Dernière connexion de pompe [minutes]
- Dernière connexion à la pompe %1$s il y a %2$s min
+ Dernière connexion [min]
+ Dernière connexion pompe %1$s il y a %2$s min
Envoyer SMS : %1$s
Envoyer SMS à tous les numéros
Envoyer SMS avec du texte
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
index 6e11ebcf80..2ebd12c7a5 100644
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -14,7 +14,7 @@
#d3f166
#FFFFFF00
#FFFF00FF
- #A4ECEA
+ #00FF00
#FF0000
#FFFF00
#FFFF00
diff --git a/wear/src/main/res/values-de-rDE/strings.xml b/wear/src/main/res/values-de-rDE/strings.xml
index e2c73ab174..79f1d5a568 100644
--- a/wear/src/main/res/values-de-rDE/strings.xml
+++ b/wear/src/main/res/values-de-rDE/strings.xml
@@ -51,6 +51,7 @@
Niedrig
Mittel
Hoch
+ Auto
Große Zahlen
Ring BZ-Historie
Ring BZ-Historie light
diff --git a/wear/src/main/res/values-it-rIT/strings.xml b/wear/src/main/res/values-it-rIT/strings.xml
index f06b29fcd5..5247ee0674 100644
--- a/wear/src/main/res/values-it-rIT/strings.xml
+++ b/wear/src/main/res/values-it-rIT/strings.xml
@@ -51,6 +51,7 @@
Basso
Medio
Alto
+ Auto
Numeri grandi
Storico Ring
Storico Light Ring
diff --git a/wear/src/main/res/values-pt-rBR/strings.xml b/wear/src/main/res/values-pt-rBR/strings.xml
index 4659b21c65..29e4e9741b 100644
--- a/wear/src/main/res/values-pt-rBR/strings.xml
+++ b/wear/src/main/res/values-pt-rBR/strings.xml
@@ -8,10 +8,102 @@
AAPS(GrafGrande)
AAPS(SemGraf)
AAPS(Círculo)
+ AAPSv2
+ AAPS(Cockpit)
+ AAPS(Steampunk)
Sem dados!
Dados antigos!
Desde %1$s
Sincronizar com AAPS!
Nenhum dado recebido desde %1$s! Confira se o AAPS no telefone envia dados para o relógio
Dados AAPS são %1$s antigos! Verifique sensor, xDrip+, NS, configuração AAPS ou outra!
+ Lig.
+ Desl.
+ Vibrar no Bólus
+ Unidades para Acções
+ Mostrar Data
+ Mostrar IOB
+ Mostrar COB
+ Mostrar Delta
+ Mostrar MedDelta
+ Mostrar Bateria Telefone
+ Mostrar Bateria Equipamento
+ Mostrar Taxa Basal
+ Mostrar Estado Loop
+ Mostrar Glic.
+ Mostrar Seta Direcção
+ Mostrar Atrás
+ Escuro
+ Destacar Basais
+ Divisor correspondente
+ Cronograma do Gráfico
+ 1 hora
+ 2 horas
+ 3 horas
+ 4 horas
+ 5 horas
+ Design de Entrada
+ Padrão
+ Rápido Direito
+ Rápido Esquerdo
+ Moderno Esparso
+ Delta Granularidade (Steampunk)
+ Baixo
+ Médio
+ Alto
+ Números Grandes
+ Anel Histórico
+ Anel Suave Histórico
+ Animações
+ Assistente no Menu
+ Purgar no Menu
+ Alvo Único
+ Assistente Percentagem
+ Complicação de Toque
+ Unicode em Complicações
+ Versão:
+ AlvoT
+ Assistente
+ Bólus
+ eCarb
+ Definições
+ Estado
+ Purgar/Preencher
+ Nenhum
+ Padrão
+ Menu
+ duração
+ alvo
+ hipo
+ hiper
+ hidratos
+ percentagem
+ iniciar [min]
+ duração [h]
+ insulina
+ Predefinição 1
+ Predefinição 2
+ Predefinição 3
+ Valor livre
+ CONFIRMAR
+ ESTADO BOMBA
+ ESTADO LOOP
+ alteração turno
+ TDD ponderada
+ bólus
+ Bomba
+ Loop
+ CPP
+ TDD
+ Hidratos
+ IOB
+ sem estado
+ mg/dL
+ mmol/L
+ g
+ U
+ U/h
+ h
+ d
+ s
diff --git a/wear/src/main/res/values-pt-rPT/strings.xml b/wear/src/main/res/values-pt-rPT/strings.xml
index 29e4e9741b..32261260b4 100644
--- a/wear/src/main/res/values-pt-rPT/strings.xml
+++ b/wear/src/main/res/values-pt-rPT/strings.xml
@@ -51,6 +51,7 @@
Baixo
Médio
Alto
+ Auto
Números Grandes
Anel Histórico
Anel Suave Histórico
diff --git a/wear/src/main/res/values-ru-rRU/strings.xml b/wear/src/main/res/values-ru-rRU/strings.xml
index 7bcb008d57..0cd5c49d54 100644
--- a/wear/src/main/res/values-ru-rRU/strings.xml
+++ b/wear/src/main/res/values-ru-rRU/strings.xml
@@ -51,6 +51,7 @@
Низкий
Средний
Высокий
+ Авто
Цифры крупно
Показывать историю в кольце
Показывать историю в кольце менее подробно
diff --git a/wear/src/main/res/values-sv-rSE/strings.xml b/wear/src/main/res/values-sv-rSE/strings.xml
index 8324bbc64f..ff8d4c8c1a 100644
--- a/wear/src/main/res/values-sv-rSE/strings.xml
+++ b/wear/src/main/res/values-sv-rSE/strings.xml
@@ -51,6 +51,7 @@
Låg
Mellan
Hög
+ Auto
Stora siffror
Ringhistorik
Ljus ringhistorik