From ec3b8dc39a4b4dde7a8ffbee9e3d30f11e57b5ed Mon Sep 17 00:00:00 2001 From: Pierre L Date: Fri, 5 May 2023 22:06:20 +0200 Subject: [PATCH] add the arrow in datafield --- iAPSGarminDataField/example.json | 9 +- .../resources/drawables/DoubleDown.svg | 10 ++ .../resources/drawables/DoubleUp.svg | 10 ++ .../resources/drawables/Flat.svg | 7 ++ .../resources/drawables/FortyFiveDown.svg | 7 ++ .../resources/drawables/FortyFiveUp.svg | 7 ++ .../resources/drawables/SingleDown.svg | 7 ++ .../resources/drawables/SingleUp.svg | 7 ++ .../resources/drawables/Unknown.svg | 10 ++ .../resources/drawables/drawables.xml | 102 +++++++++++++++++ .../resources/drawables/heart.svg | 1 + .../resources/drawables/right-arrow.svg | 8 ++ .../resources/drawables/steps.svg | 8 ++ .../resources/layouts/layouts.xml | 5 + .../source/iAPSBGServiceDelegate.mc | 2 - .../source/iAPSDataFieldView.mc | 106 +++++++++++++++++- 16 files changed, 298 insertions(+), 8 deletions(-) create mode 100644 iAPSGarminDataField/resources/drawables/DoubleDown.svg create mode 100644 iAPSGarminDataField/resources/drawables/DoubleUp.svg create mode 100644 iAPSGarminDataField/resources/drawables/Flat.svg create mode 100644 iAPSGarminDataField/resources/drawables/FortyFiveDown.svg create mode 100644 iAPSGarminDataField/resources/drawables/FortyFiveUp.svg create mode 100644 iAPSGarminDataField/resources/drawables/SingleDown.svg create mode 100644 iAPSGarminDataField/resources/drawables/SingleUp.svg create mode 100644 iAPSGarminDataField/resources/drawables/Unknown.svg create mode 100644 iAPSGarminDataField/resources/drawables/heart.svg create mode 100644 iAPSGarminDataField/resources/drawables/right-arrow.svg create mode 100644 iAPSGarminDataField/resources/drawables/steps.svg diff --git a/iAPSGarminDataField/example.json b/iAPSGarminDataField/example.json index 8ffc8eb..8730bec 100644 --- a/iAPSGarminDataField/example.json +++ b/iAPSGarminDataField/example.json @@ -1,8 +1,9 @@ { - "glucose": "210", - "lastLoopDateInterval": 1683299799, - "delta": "-2", + "glucose": "60", + "lastLoopDateInterval": 1683316189, + "delta": "-20", "iob": "2.42", "cob": "70.2", - "eventualBGRaw": "100" + "eventualBGRaw": "100", + "trendRaw":"FortyFiveDown" } diff --git a/iAPSGarminDataField/resources/drawables/DoubleDown.svg b/iAPSGarminDataField/resources/drawables/DoubleDown.svg new file mode 100644 index 0000000..8bbf04d --- /dev/null +++ b/iAPSGarminDataField/resources/drawables/DoubleDown.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/iAPSGarminDataField/resources/drawables/DoubleUp.svg b/iAPSGarminDataField/resources/drawables/DoubleUp.svg new file mode 100644 index 0000000..f70cd25 --- /dev/null +++ b/iAPSGarminDataField/resources/drawables/DoubleUp.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/iAPSGarminDataField/resources/drawables/Flat.svg b/iAPSGarminDataField/resources/drawables/Flat.svg new file mode 100644 index 0000000..67f99cf --- /dev/null +++ b/iAPSGarminDataField/resources/drawables/Flat.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/iAPSGarminDataField/resources/drawables/FortyFiveDown.svg b/iAPSGarminDataField/resources/drawables/FortyFiveDown.svg new file mode 100644 index 0000000..d9d426e --- /dev/null +++ b/iAPSGarminDataField/resources/drawables/FortyFiveDown.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/iAPSGarminDataField/resources/drawables/FortyFiveUp.svg b/iAPSGarminDataField/resources/drawables/FortyFiveUp.svg new file mode 100644 index 0000000..1d83be3 --- /dev/null +++ b/iAPSGarminDataField/resources/drawables/FortyFiveUp.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/iAPSGarminDataField/resources/drawables/SingleDown.svg b/iAPSGarminDataField/resources/drawables/SingleDown.svg new file mode 100644 index 0000000..0fa933e --- /dev/null +++ b/iAPSGarminDataField/resources/drawables/SingleDown.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/iAPSGarminDataField/resources/drawables/SingleUp.svg b/iAPSGarminDataField/resources/drawables/SingleUp.svg new file mode 100644 index 0000000..9bae8cf --- /dev/null +++ b/iAPSGarminDataField/resources/drawables/SingleUp.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/iAPSGarminDataField/resources/drawables/Unknown.svg b/iAPSGarminDataField/resources/drawables/Unknown.svg new file mode 100644 index 0000000..72f2c3c --- /dev/null +++ b/iAPSGarminDataField/resources/drawables/Unknown.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/iAPSGarminDataField/resources/drawables/drawables.xml b/iAPSGarminDataField/resources/drawables/drawables.xml index 7760750..fb340ac 100644 --- a/iAPSGarminDataField/resources/drawables/drawables.xml +++ b/iAPSGarminDataField/resources/drawables/drawables.xml @@ -1,3 +1,105 @@ + + + + + + FFFFFF + + + + + + FFFFFF + + + + + + FFFFFF + + + + + + FFFFFF + + + + + + FFFFFF + + + + + + FFFFFF + + + + + + FFFFFF + + + + + + FFFFFF + + + + + + + + 000000 + + + + + + 000000 + + + + + + 000000 + + + + + + 000000 + + + + + + 000000 + + + + + + 000000 + + + + + + 000000 + + + + + + 000000 + + + + diff --git a/iAPSGarminDataField/resources/drawables/heart.svg b/iAPSGarminDataField/resources/drawables/heart.svg new file mode 100644 index 0000000..d4d03fa --- /dev/null +++ b/iAPSGarminDataField/resources/drawables/heart.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/iAPSGarminDataField/resources/drawables/right-arrow.svg b/iAPSGarminDataField/resources/drawables/right-arrow.svg new file mode 100644 index 0000000..73e560d --- /dev/null +++ b/iAPSGarminDataField/resources/drawables/right-arrow.svg @@ -0,0 +1,8 @@ + + + + + diff --git a/iAPSGarminDataField/resources/drawables/steps.svg b/iAPSGarminDataField/resources/drawables/steps.svg new file mode 100644 index 0000000..59e3a0a --- /dev/null +++ b/iAPSGarminDataField/resources/drawables/steps.svg @@ -0,0 +1,8 @@ + \ No newline at end of file diff --git a/iAPSGarminDataField/resources/layouts/layouts.xml b/iAPSGarminDataField/resources/layouts/layouts.xml index fee7354..1566609 100644 --- a/iAPSGarminDataField/resources/layouts/layouts.xml +++ b/iAPSGarminDataField/resources/layouts/layouts.xml @@ -6,6 +6,11 @@