From 1738aea4de91a7f04ab6009bb8e457d19dede069 Mon Sep 17 00:00:00 2001 From: AdrianLxM Date: Fri, 16 Mar 2018 23:57:58 +0100 Subject: [PATCH] Don't overlap time ticks with current time --- .../info/nightscout/androidaps/watchfaces/BgGraphBuilder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wear/src/main/java/info/nightscout/androidaps/watchfaces/BgGraphBuilder.java b/wear/src/main/java/info/nightscout/androidaps/watchfaces/BgGraphBuilder.java index 9cc7615096..7d50d7ff4c 100644 --- a/wear/src/main/java/info/nightscout/androidaps/watchfaces/BgGraphBuilder.java +++ b/wear/src/main/java/info/nightscout/androidaps/watchfaces/BgGraphBuilder.java @@ -452,7 +452,7 @@ public class BgGraphBuilder { // add all full hours within the timeframe while (hourTick < end_time){ - if(Math.abs(hourTick - timeNow) > (1000 * 60 * 8 * timespan)){ + if(Math.abs(hourTick - timeNow) > (8 * (end_time-start_time)/60)){ xAxisValues.add(new AxisValue(fuzz(hourTick)).setLabel(timeFormat.format(hourTick))); } else { //don't print hour label if too close to now to avoid overlaps