2015-10-21 16:11:16 +02:00
|
|
|
package nodomain.freeyourgadget.gadgetbridge.devices.pebble;
|
|
|
|
|
2016-07-25 22:19:39 +02:00
|
|
|
import java.util.List;
|
|
|
|
|
2015-10-21 16:11:16 +02:00
|
|
|
import nodomain.freeyourgadget.gadgetbridge.devices.SampleProvider;
|
2016-07-25 22:19:39 +02:00
|
|
|
import nodomain.freeyourgadget.gadgetbridge.entities.AbstractActivitySample;
|
2016-05-08 23:14:58 +02:00
|
|
|
import nodomain.freeyourgadget.gadgetbridge.entities.DaoSession;
|
2016-06-27 20:41:20 +02:00
|
|
|
import nodomain.freeyourgadget.gadgetbridge.impl.GBDevice;
|
2015-10-21 16:11:16 +02:00
|
|
|
|
2016-07-25 22:19:39 +02:00
|
|
|
public class MisfitSampleProvider implements SampleProvider {
|
2015-10-21 16:11:16 +02:00
|
|
|
|
2015-11-23 23:04:46 +01:00
|
|
|
protected final float movementDivisor = 300f;
|
2015-10-21 16:11:16 +02:00
|
|
|
|
2016-06-27 20:41:20 +02:00
|
|
|
public MisfitSampleProvider(GBDevice device, DaoSession session) {
|
2016-07-25 22:19:39 +02:00
|
|
|
|
2016-05-08 23:14:58 +02:00
|
|
|
}
|
|
|
|
|
2015-10-21 16:11:16 +02:00
|
|
|
@Override
|
2016-02-29 20:54:39 +01:00
|
|
|
public int normalizeType(int rawType) {
|
2016-06-14 23:10:35 +02:00
|
|
|
return rawType;
|
2015-10-21 16:11:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@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;
|
|
|
|
}
|
|
|
|
|
2016-07-25 22:19:39 +02:00
|
|
|
@Override
|
|
|
|
public List getAllActivitySamples(int timestamp_from, int timestamp_to) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public List getActivitySamples(int timestamp_from, int timestamp_to) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public List getSleepSamples(int timestamp_from, int timestamp_to) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void changeStoredSamplesType(int timestampFrom, int timestampTo, int kind) {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void changeStoredSamplesType(int timestampFrom, int timestampTo, int fromKind, int toKind) {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int fetchLatestTimestamp() {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void addGBActivitySample(AbstractActivitySample activitySample) {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void addGBActivitySamples(AbstractActivitySample[] activitySamples) {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public AbstractActivitySample createActivitySample() {
|
|
|
|
return null;
|
|
|
|
}
|
2015-10-21 16:11:16 +02:00
|
|
|
|
|
|
|
@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;
|
|
|
|
}
|
|
|
|
}
|