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();
|
||||
for (int i = 0; i < samples; i++) {
|
||||
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);
|
||||
int steps = misfitSamples[i].getSteps();
|
||||
totalSteps += steps;
|
||||
|
|
|
@ -114,7 +114,7 @@ public class AppMessageHandlerMorpheuz extends AppMessageHandler {
|
|||
Long userId = DBHelper.getUser(db.getDaoSession()).getId();
|
||||
Long deviceId = DBHelper.getDevice(getDevice(), db.getDaoSession()).getId();
|
||||
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);
|
||||
sampleProvider.addGBActivitySample(sample);
|
||||
} catch (Exception e) {
|
||||
|
|
|
@ -86,7 +86,7 @@ public class DatalogSessionHealthSteps extends DatalogSessionPebbleHealth {
|
|||
StepsRecord stepsRecord = stepsRecords[j];
|
||||
samples[j] = new PebbleHealthActivitySample(
|
||||
stepsRecord.timestamp,
|
||||
userId, deviceId,
|
||||
deviceId, userId,
|
||||
stepsRecord.getRawData(),
|
||||
stepsRecord.intensity,
|
||||
stepsRecord.steps
|
||||
|
|
Loading…
Reference in New Issue