1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-26 10:35:50 +01:00

Colmi: Use standard fake sleep sample intensity

This commit is contained in:
José Rebelo 2024-09-27 20:54:17 +01:00
parent 05c707bdfb
commit 8348c5349e
2 changed files with 6 additions and 13 deletions

View File

@ -216,16 +216,16 @@ public abstract class AbstractActivityChartFragment<D extends ChartsData> extend
switch (type) {
case SLEEP_ANY:
case AWAKE_SLEEP:
value = 0.50f;
value = 0.25f;
break;
case DEEP_SLEEP:
value = 0.20f;
value = 0.10f;
break;
case LIGHT_SLEEP:
value = 0.30f;
value = 0.15f;
break;
case REM_SLEEP:
value = 0.40f;
value = 0.20f;
break;
default:
value = Y_VALUE_DEEP_SLEEP;

View File

@ -39,6 +39,7 @@ import nodomain.freeyourgadget.gadgetbridge.entities.ColmiSleepStageSample;
import nodomain.freeyourgadget.gadgetbridge.entities.DaoSession;
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
import nodomain.freeyourgadget.gadgetbridge.model.ActivityKind;
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
public class ColmiActivitySampleProvider extends AbstractSampleProvider<ColmiActivitySample> {
private static final Logger LOG = LoggerFactory.getLogger(ColmiActivitySampleProvider.class);
@ -169,15 +170,7 @@ public class ColmiActivitySampleProvider extends AbstractSampleProvider<ColmiAct
sampleByTs.put(i, sample);
}
sample.setRawKind(sleepRawKind.getCode());
switch (sleepRawKind) {
case LIGHT_SLEEP:
sample.setRawIntensity(1400);
break;
case DEEP_SLEEP:
sample.setRawIntensity(700);
break;
}
sample.setRawIntensity(ActivitySample.NOT_MEASURED);
}
}
}