mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-27 19:15:50 +01:00
Colmi: Use standard fake sleep sample intensity
This commit is contained in:
parent
05c707bdfb
commit
8348c5349e
@ -216,16 +216,16 @@ public abstract class AbstractActivityChartFragment<D extends ChartsData> extend
|
|||||||
switch (type) {
|
switch (type) {
|
||||||
case SLEEP_ANY:
|
case SLEEP_ANY:
|
||||||
case AWAKE_SLEEP:
|
case AWAKE_SLEEP:
|
||||||
value = 0.50f;
|
value = 0.25f;
|
||||||
break;
|
break;
|
||||||
case DEEP_SLEEP:
|
case DEEP_SLEEP:
|
||||||
value = 0.20f;
|
value = 0.10f;
|
||||||
break;
|
break;
|
||||||
case LIGHT_SLEEP:
|
case LIGHT_SLEEP:
|
||||||
value = 0.30f;
|
value = 0.15f;
|
||||||
break;
|
break;
|
||||||
case REM_SLEEP:
|
case REM_SLEEP:
|
||||||
value = 0.40f;
|
value = 0.20f;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
value = Y_VALUE_DEEP_SLEEP;
|
value = Y_VALUE_DEEP_SLEEP;
|
||||||
|
@ -39,6 +39,7 @@ import nodomain.freeyourgadget.gadgetbridge.entities.ColmiSleepStageSample;
|
|||||||
import nodomain.freeyourgadget.gadgetbridge.entities.DaoSession;
|
import nodomain.freeyourgadget.gadgetbridge.entities.DaoSession;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
||||||
import nodomain.freeyourgadget.gadgetbridge.model.ActivityKind;
|
import nodomain.freeyourgadget.gadgetbridge.model.ActivityKind;
|
||||||
|
import nodomain.freeyourgadget.gadgetbridge.model.ActivitySample;
|
||||||
|
|
||||||
public class ColmiActivitySampleProvider extends AbstractSampleProvider<ColmiActivitySample> {
|
public class ColmiActivitySampleProvider extends AbstractSampleProvider<ColmiActivitySample> {
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(ColmiActivitySampleProvider.class);
|
private static final Logger LOG = LoggerFactory.getLogger(ColmiActivitySampleProvider.class);
|
||||||
@ -169,15 +170,7 @@ public class ColmiActivitySampleProvider extends AbstractSampleProvider<ColmiAct
|
|||||||
sampleByTs.put(i, sample);
|
sampleByTs.put(i, sample);
|
||||||
}
|
}
|
||||||
sample.setRawKind(sleepRawKind.getCode());
|
sample.setRawKind(sleepRawKind.getCode());
|
||||||
|
sample.setRawIntensity(ActivitySample.NOT_MEASURED);
|
||||||
switch (sleepRawKind) {
|
|
||||||
case LIGHT_SLEEP:
|
|
||||||
sample.setRawIntensity(1400);
|
|
||||||
break;
|
|
||||||
case DEEP_SLEEP:
|
|
||||||
sample.setRawIntensity(700);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user