mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-07-17 02:44:04 +02:00
Amazfit Bip: Attempt fixing GPS tracks recorded with latest firmware
This commit is contained in:
parent
10b982f0ea
commit
3f062e5732
|
@ -124,6 +124,9 @@ public class ActivityDetailsParser {
|
||||||
case TYPE_GPS_SPEED6:
|
case TYPE_GPS_SPEED6:
|
||||||
i += consumeSpeed6(bytes, i);
|
i += consumeSpeed6(bytes, i);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
LOG.warn("unknown packet type" + type);
|
||||||
|
i+=6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (IndexOutOfBoundsException ex) {
|
} catch (IndexOutOfBoundsException ex) {
|
||||||
|
|
|
@ -167,7 +167,8 @@ public class FetchSportsSummaryOperation extends AbstractFetchOperation {
|
||||||
BaseActivitySummary summary = new BaseActivitySummary();
|
BaseActivitySummary summary = new BaseActivitySummary();
|
||||||
ByteBuffer buffer = ByteBuffer.wrap(stream.toByteArray()).order(ByteOrder.LITTLE_ENDIAN);
|
ByteBuffer buffer = ByteBuffer.wrap(stream.toByteArray()).order(ByteOrder.LITTLE_ENDIAN);
|
||||||
// summary.setVersion(BLETypeConversions.toUnsigned(buffer.getShort()));
|
// summary.setVersion(BLETypeConversions.toUnsigned(buffer.getShort()));
|
||||||
buffer.getShort(); // version
|
short version = buffer.getShort(); // version
|
||||||
|
LOG.debug("Got verison " + version);
|
||||||
int activityKind = ActivityKind.TYPE_UNKNOWN;
|
int activityKind = ActivityKind.TYPE_UNKNOWN;
|
||||||
try {
|
try {
|
||||||
int rawKind = BLETypeConversions.toUnsigned(buffer.getShort());
|
int rawKind = BLETypeConversions.toUnsigned(buffer.getShort());
|
||||||
|
|
Loading…
Reference in New Issue
Block a user