Fix "always yellow" in watch

This commit is contained in:
Philoul 2020-06-20 14:54:54 +02:00
parent c66084d3ab
commit 7f32881e10

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;
}