log raw activity data from mi band, closes #341
Hopefully aids in deciphering activity kinds.
This commit is contained in:
parent
f0da25c49b
commit
f65afa64d9
|
@ -312,7 +312,7 @@ public class FetchActivityOperation extends AbstractMiBandOperation {
|
|||
try {
|
||||
int timestampInSeconds = (int) (activityStruct.activityDataTimestampProgress.getTimeInMillis() / 1000);
|
||||
if ((activityStruct.activityDataHolderProgress % bpm) != 0) {
|
||||
throw new IllegalStateException("Unexpected data, progress should be mutiple of " + bpm + ": " + activityStruct.activityDataHolderProgress);
|
||||
throw new IllegalStateException("Unexpected data, progress should be multiple of " + bpm + ": " + activityStruct.activityDataHolderProgress);
|
||||
}
|
||||
int numSamples = activityStruct.activityDataHolderProgress / bpm;
|
||||
MiBandActivitySample[] samples = new MiBandActivitySample[numSamples];
|
||||
|
@ -337,6 +337,10 @@ public class FetchActivityOperation extends AbstractMiBandOperation {
|
|||
heartrate & 0xff);
|
||||
// samples[minutes].setProvider(dbHandler);
|
||||
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("sample: " + samples[minutes]);
|
||||
}
|
||||
|
||||
// next minute
|
||||
minutes++;
|
||||
timestampInSeconds += 60;
|
||||
|
|
Loading…
Reference in New Issue