Garmin: fixup use developer device setting for keeping data on device

Logic was inverted
This commit is contained in:
Daniele Gobbetti 2024-04-25 14:37:26 +02:00
parent 60c3834e0b
commit 39aea72ef7
1 changed files with 2 additions and 2 deletions

View File

@ -254,7 +254,7 @@ public class GarminSupport extends AbstractBTLEDeviceSupport implements ICommuni
} else if (deviceEvent instanceof FileDownloadedDeviceEvent) {
LOG.debug("FILE DOWNLOAD COMPLETE {}", ((FileDownloadedDeviceEvent) deviceEvent).directoryEntry.getFileName());
if (getKeepActivityDataOnDevice()) // delete file from watch upon successful download
if (!getKeepActivityDataOnDevice()) // delete file from watch upon successful download
sendOutgoingMessage(new SetFileFlagsMessage(((FileDownloadedDeviceEvent) deviceEvent).directoryEntry.getFileIndex(), SetFileFlagsMessage.FileFlags.ARCHIVE));
}
@ -447,7 +447,7 @@ public class GarminSupport extends AbstractBTLEDeviceSupport implements ICommuni
FileTransferHandler.DirectoryEntry directoryEntry = filesToDownload.remove();
while (checkFileExists(directoryEntry.getFileName())) {
LOG.debug("File: {} already downloaded, not downloading again.", directoryEntry.getFileName());
if (getKeepActivityDataOnDevice()) // delete file from watch if already downloaded
if (!getKeepActivityDataOnDevice()) // delete file from watch if already downloaded
sendOutgoingMessage(new SetFileFlagsMessage(directoryEntry.getFileIndex(), SetFileFlagsMessage.FileFlags.ARCHIVE));
directoryEntry = filesToDownload.remove();
}