mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 16:55:36 +03:00
Fixed detection of existing log files when logging to SDCard.
This commit is contained in:
parent
ad8201173c
commit
2cc4eea6de
1 changed files with 2 additions and 2 deletions
|
@ -734,8 +734,8 @@ static bool blackboxSDCardBeginLog()
|
|||
while (afatfs_findNext(blackboxSDCard.logDirectory, &blackboxSDCard.logDirectoryFinder, &directoryEntry) == AFATFS_OPERATION_SUCCESS) {
|
||||
if (directoryEntry && !fat_isDirectoryEntryTerminator(directoryEntry)) {
|
||||
// If this is a log file, parse the log number from the filename
|
||||
if (strncmp(directoryEntry->filename, LOGFILE_PREFIX, strlen(LOGFILE_PREFIX))
|
||||
&& strncmp(directoryEntry->filename + 8, LOGFILE_SUFFIX, strlen(LOGFILE_SUFFIX))) {
|
||||
if (strncmp(directoryEntry->filename, LOGFILE_PREFIX, strlen(LOGFILE_PREFIX)) == 0
|
||||
&& strncmp(directoryEntry->filename + 8, LOGFILE_SUFFIX, strlen(LOGFILE_SUFFIX)) == 0) {
|
||||
char logSequenceNumberString[6];
|
||||
|
||||
memcpy(logSequenceNumberString, directoryEntry->filename + 3, 5);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue