1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-27 20:36:51 +01:00

Amazfit Bip: Attempt fixing GPS tracks recorded with latest firmware

This commit is contained in:
Andreas Shimokawa 2018-11-08 17:13:00 +01:00
parent 10b982f0ea
commit 3f062e5732
2 changed files with 5 additions and 1 deletions

View File

@ -124,6 +124,9 @@ public class ActivityDetailsParser {
case TYPE_GPS_SPEED6:
i += consumeSpeed6(bytes, i);
break;
default:
LOG.warn("unknown packet type" + type);
i+=6;
}
}
} catch (IndexOutOfBoundsException ex) {

View File

@ -167,7 +167,8 @@ public class FetchSportsSummaryOperation extends AbstractFetchOperation {
BaseActivitySummary summary = new BaseActivitySummary();
ByteBuffer buffer = ByteBuffer.wrap(stream.toByteArray()).order(ByteOrder.LITTLE_ENDIAN);
// summary.setVersion(BLETypeConversions.toUnsigned(buffer.getShort()));
buffer.getShort(); // version
short version = buffer.getShort(); // version
LOG.debug("Got verison " + version);
int activityKind = ActivityKind.TYPE_UNKNOWN;
try {
int rawKind = BLETypeConversions.toUnsigned(buffer.getShort());