Garmin: Fix file transfer data offset

Despite working for most devices, some will send the same chunk over and
over again (#5353). Btsnoops from multiple devices confirm that this is
expected to be the next data offset.
This commit is contained in:
José Rebelo
2025-09-14 14:57:34 +01:00
parent 6222fe9538
commit bd2bac38f0
@@ -19,7 +19,12 @@ public class FileTransferDataMessage extends GFDIMessage {
this.crc = crc;
this.message = message;
this.statusMessage = new FileTransferDataStatusMessage(GarminMessage.FILE_TRANSFER_DATA, Status.ACK, FileTransferDataStatusMessage.TransferStatus.OK, dataOffset);
this.statusMessage = new FileTransferDataStatusMessage(
GarminMessage.FILE_TRANSFER_DATA,
Status.ACK,
FileTransferDataStatusMessage.TransferStatus.OK,
dataOffset + message.length
);
this.sendOutgoing = sendOutgoing;
}