Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/ble/adapters/garmin.dart
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,9 @@ class GarminAdapter extends BandAdapter {
}
final handle = gfdiHandle;
if (decoded is GarminMlrData && handle != null && decoded.handle == handle) {
// Byte 0 is the routing byte; the COBS/GFDI stream starts after it.
for (final frame in cobs.feed(decoded.payload.sublist(1))) {
// protocol's garminDecodeMlr already strips the routing byte
// (protocol#70) — decoded.payload IS the COBS/GFDI stream.
for (final frame in cobs.feed(decoded.payload)) {
archived.add(frame);
final gfdi = garminParseGfdiFrame(frame);
if (gfdi != null) unawaited(ackAndDispatch(gfdi));
Expand Down
2 changes: 2 additions & 0 deletions lib/ble/adapters/host.dart
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ class BandHost {
List<Sample?> samples,
String? trimTokenHex, {
List<ArchiveRecord>? archives,
List<EcgRawPacket>? ecgRawPackets,
String? deviceFamily,
}) async {
try {
Expand All @@ -375,6 +376,7 @@ class BandHost {
samples,
trimToken: trimTokenHex,
archives: archives,
ecgRawPackets: ecgRawPackets,
deviceFamily: deviceFamily,
deviceId: deviceId,
onCheckpoint: onLog,
Expand Down
Loading
Loading