mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-28 19:45:50 +01:00
Add a divisor and divide the rawintensity to normalize it. It would be better to scale the divisor based on all steps of the day or something like that.
This commit is contained in:
parent
99bdb4a30a
commit
e54930788b
@ -13,6 +13,7 @@ import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
|||||||
|
|
||||||
public class ZeTimeSampleProvider extends AbstractSampleProvider<ZeTimeActivitySample> {
|
public class ZeTimeSampleProvider extends AbstractSampleProvider<ZeTimeActivitySample> {
|
||||||
|
|
||||||
|
private final float movementDivisor = 6000.0f;
|
||||||
private GBDevice mDevice;
|
private GBDevice mDevice;
|
||||||
private DaoSession mSession;
|
private DaoSession mSession;
|
||||||
|
|
||||||
@ -35,7 +36,7 @@ public class ZeTimeSampleProvider extends AbstractSampleProvider<ZeTimeActivityS
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float normalizeIntensity(int rawIntensity) {
|
public float normalizeIntensity(int rawIntensity) {
|
||||||
return rawIntensity;
|
return rawIntensity/movementDivisor;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user