mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-08-24 16:21:16 +02:00
add some constants to GBActivitySample
This commit is contained in:
parent
41207516b1
commit
603d31a59e
@ -1,6 +1,12 @@
|
||||
package nodomain.freeyourgadget.gadgetbridge;
|
||||
|
||||
public class GBActivitySample {
|
||||
public static final byte PROVIDER_MIBAND = 0;
|
||||
public static final byte PROVIDER_PEBBLE_MORPHEUZ = 1;
|
||||
|
||||
public static final byte TYPE_SLEEP = 0; //FIXME: we could just adapt to Mi Band (Dont know the correct values)
|
||||
// add more here
|
||||
|
||||
private final int timestamp;
|
||||
private final byte provider;
|
||||
private final short intensity;
|
||||
|
@ -11,6 +11,7 @@ import java.util.SimpleTimeZone;
|
||||
import java.util.TimeZone;
|
||||
import java.util.UUID;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.GBActivitySample;
|
||||
import nodomain.freeyourgadget.gadgetbridge.GBApplication;
|
||||
import nodomain.freeyourgadget.gadgetbridge.protocol.GBDeviceCommand;
|
||||
import nodomain.freeyourgadget.gadgetbridge.protocol.GBDeviceCommandSendBytes;
|
||||
@ -100,7 +101,7 @@ public class MorpheuzSupport {
|
||||
short data = (short) ((int) pair.second & 0xffff);
|
||||
LOG.info("got point:" + index + " " + data);
|
||||
if (index >= 0 && index < 54) {
|
||||
GBApplication.getActivityDatabaseHandler().addGBActivitySample(recording_base_timestamp + index * 600, (byte) 1, data, (byte) 0, (byte) 0);
|
||||
GBApplication.getActivityDatabaseHandler().addGBActivitySample(recording_base_timestamp + index * 600, GBActivitySample.PROVIDER_PEBBLE_MORPHEUZ, data, (byte) 0, GBActivitySample.TYPE_SLEEP);
|
||||
}
|
||||
|
||||
ctrl_message = MorpheuzSupport.CTRL_VERSION_DONE | MorpheuzSupport.CTRL_SET_LAST_SENT | MorpheuzSupport.CTRL_DO_NEXT;
|
||||
|
Loading…
Reference in New Issue
Block a user