Pebble: fix mixup of userId and deviceId in contructor for Misfit and Morpheuz samples
This commit is contained in:
parent
e1927733ba
commit
9c2e40ecc0
|
@ -83,7 +83,7 @@ public class AppMessageHandlerMisfit extends AppMessageHandler {
|
||||||
Long deviceId = DBHelper.getDevice(getDevice(), db.getDaoSession()).getId();
|
Long deviceId = DBHelper.getDevice(getDevice(), db.getDaoSession()).getId();
|
||||||
for (int i = 0; i < samples; i++) {
|
for (int i = 0; i < samples; i++) {
|
||||||
short sample = buf.getShort();
|
short sample = buf.getShort();
|
||||||
misfitSamples[i] = new PebbleMisfitSample(timestamp + i * 60, userId, deviceId, sample & 0xffff);
|
misfitSamples[i] = new PebbleMisfitSample(timestamp + i * 60, deviceId, userId, sample & 0xffff);
|
||||||
misfitSamples[i].setProvider(sampleProvider);
|
misfitSamples[i].setProvider(sampleProvider);
|
||||||
int steps = misfitSamples[i].getSteps();
|
int steps = misfitSamples[i].getSteps();
|
||||||
totalSteps += steps;
|
totalSteps += steps;
|
||||||
|
|
|
@ -114,7 +114,7 @@ public class AppMessageHandlerMorpheuz extends AppMessageHandler {
|
||||||
Long userId = DBHelper.getUser(db.getDaoSession()).getId();
|
Long userId = DBHelper.getUser(db.getDaoSession()).getId();
|
||||||
Long deviceId = DBHelper.getDevice(getDevice(), db.getDaoSession()).getId();
|
Long deviceId = DBHelper.getDevice(getDevice(), db.getDaoSession()).getId();
|
||||||
PebbleMorpheuzSampleProvider sampleProvider = new PebbleMorpheuzSampleProvider(getDevice(), db.getDaoSession());
|
PebbleMorpheuzSampleProvider sampleProvider = new PebbleMorpheuzSampleProvider(getDevice(), db.getDaoSession());
|
||||||
PebbleMorpheuzSample sample = new PebbleMorpheuzSample(recording_base_timestamp + index * 600, userId, deviceId, intensity);
|
PebbleMorpheuzSample sample = new PebbleMorpheuzSample(recording_base_timestamp + index * 600, deviceId, userId, intensity);
|
||||||
sample.setProvider(sampleProvider);
|
sample.setProvider(sampleProvider);
|
||||||
sampleProvider.addGBActivitySample(sample);
|
sampleProvider.addGBActivitySample(sample);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
|
@ -86,7 +86,7 @@ public class DatalogSessionHealthSteps extends DatalogSessionPebbleHealth {
|
||||||
StepsRecord stepsRecord = stepsRecords[j];
|
StepsRecord stepsRecord = stepsRecords[j];
|
||||||
samples[j] = new PebbleHealthActivitySample(
|
samples[j] = new PebbleHealthActivitySample(
|
||||||
stepsRecord.timestamp,
|
stepsRecord.timestamp,
|
||||||
userId, deviceId,
|
deviceId, userId,
|
||||||
stepsRecord.getRawData(),
|
stepsRecord.getRawData(),
|
||||||
stepsRecord.intensity,
|
stepsRecord.intensity,
|
||||||
stepsRecord.steps
|
stepsRecord.steps
|
||||||
|
|
Loading…
Reference in New Issue