mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
log raw activity data from mi band, closes #341
Hopefully aids in deciphering activity kinds.
This commit is contained in:
+5
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user