Merge pull request #2747 from Philoul/Fix_Color_Watch_mmol

Fix "always yellow" in watch even if within range (mmol unit)
This commit is contained in:
Milos Kozak 2020-06-22 21:06:30 +02:00 committed by GitHub
commit 63bf758636
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -303,9 +303,9 @@ public class WatchUpdaterService extends WearableListenerService implements Goog
double highLine = defaultValueHelper.determineHighLine();
long sgvLevel = 0L;
if (lastBG.value > highLine) {
if (lastBG.valueToUnits(units) > highLine) {
sgvLevel = 1;
} else if (lastBG.value < lowLine) {
} else if (lastBG.valueToUnits(units) < lowLine) {
sgvLevel = -1;
}