2015-10-21 16:11:16 +02:00
|
|
|
package nodomain.freeyourgadget.gadgetbridge.devices.pebble;
|
|
|
|
|
|
|
|
import nodomain.freeyourgadget.gadgetbridge.devices.SampleProvider;
|
|
|
|
|
|
|
|
public class MisfitSampleProvider implements SampleProvider {
|
|
|
|
|
2015-11-23 23:04:46 +01:00
|
|
|
protected final float movementDivisor = 300f;
|
2015-10-21 16:11:16 +02:00
|
|
|
|
|
|
|
@Override
|
2016-02-29 20:54:39 +01:00
|
|
|
public int normalizeType(int rawType) {
|
2015-10-21 16:11:16 +02:00
|
|
|
return (int) rawType;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2016-02-29 20:54:39 +01:00
|
|
|
public int toRawActivityKind(int activityKind) {
|
2015-10-21 16:11:16 +02:00
|
|
|
return (byte) activityKind;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
2016-02-29 20:54:39 +01:00
|
|
|
public float normalizeIntensity(int rawIntensity) {
|
2015-10-21 16:11:16 +02:00
|
|
|
return rawIntensity / movementDivisor;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
2016-02-29 20:54:39 +01:00
|
|
|
public int getID() {
|
2015-10-21 16:11:16 +02:00
|
|
|
return SampleProvider.PROVIDER_PEBBLE_MISFIT;
|
|
|
|
}
|
|
|
|
}
|