diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/GBActivitySample.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/GBActivitySample.java index d97f3849..e1f17dfa 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/GBActivitySample.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/GBActivitySample.java @@ -4,8 +4,18 @@ public class GBActivitySample { public static final byte PROVIDER_MIBAND = 0; public static final byte PROVIDER_PEBBLE_MORPHEUZ = 1; - public static final byte TYPE_DEEP_SLEEP = 4; - public static final byte TYPE_LIGHT_SLEEP = 5; +// public static final byte TYPE_CHARGING = 6; +// public static final byte TYPE_NONWEAR = 3; +// public static final byte TYPE_NREM = 5; // DEEP SLEEP +// public static final byte TYPE_ONBED = 7; +// public static final byte TYPE_REM = 4; // LIGHT SLEEP +// public static final byte TYPE_RUNNING = 2; +// public static final byte TYPE_SLIENT = 0; +// public static final byte TYPE_USER = 100; +// public static final byte TYPE_WALKING = 1; + + public static final byte TYPE_DEEP_SLEEP = 5; + public static final byte TYPE_LIGHT_SLEEP = 4; public static final byte TYPE_UNKNOWN = -1; // add more here diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/SleepChartActivity.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/SleepChartActivity.java index c46f6a1e..e4a77590 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/SleepChartActivity.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/SleepChartActivity.java @@ -273,13 +273,13 @@ public class SleepChartActivity extends Activity { if (type == GBActivitySample.TYPE_DEEP_SLEEP) { // value = Y_VALUE_DEEP_SLEEP; value = ((float) movement) / movement_divisor; -// value += Y_VALUE_DEEP_SLEEP; + value += Y_VALUE_DEEP_SLEEP; activityEntries.add(createEntry(value, i)); colors.add(akDeepSleep.color); } else { if (type == GBActivitySample.TYPE_LIGHT_SLEEP) { value = ((float) movement) / movement_divisor; - value += Y_VALUE_LIGHT_SLEEP; +// value += Y_VALUE_LIGHT_SLEEP; // value = Math.min(1.0f, Y_VALUE_LIGHT_SLEEP); activityEntries.add(createEntry(value, i)); colors.add(akLightSleep.color); @@ -305,10 +305,16 @@ public class SleepChartActivity extends Activity { if (isSleep(last_type) && !isSleep(type)) { // woken up LimitLine line = new LimitLine(i, dateString); + line.enableDashedLine(8, 8, 0); + line.setTextColor(Color.WHITE); + line.setTextSize(15); mChart.getXAxis().addLimitLine(line); } else if (!isSleep(last_type) && isSleep(type)) { // fallen asleep LimitLine line = new LimitLine(i, dateString); + line.enableDashedLine(8, 8, 0); + line.setTextSize(15); + line.setTextColor(Color.WHITE); mChart.getXAxis().addLimitLine(line); } }