File tree Expand file tree Collapse file tree
Software/Microcontroller/Firmware/AsgardADC Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -691,8 +691,8 @@ endread:
691691 // --------------------------------------------------
692692 // #11 - LCS - LOG_CURRENTFILE_SET --> Reply LCA - LOG_CURRENTFILE_ASSERT
693693 // --------------------------------------------------
694- // Set the current log file to the LOG.CSV
695- // $LCS,LOG1 .CSV
694+ // Set the current log file to the LOG-01 .CSV
695+ // $LCS,LOG-01 .CSV
696696
697697 if (!strcmp (command, " $LCS" ))
698698 {
@@ -930,8 +930,11 @@ endread:
930930 {
931931 strcpy (Answer, " $FMA,DEL" );
932932 if (!isSDCardPresent) goto endeval;
933- if (strcmp (param, AirDataComputer._logfile )) { // The file must not be the default log file
934- SD.remove (param);
933+ if (!strcmp (param, AirDataComputer._logfile ) && (sendtosd_freq == 0 )) { // current file
934+ dataFile.close (); // Close the current file (if is not recording)
935+ }
936+ if ((!strcmp (param, AirDataComputer._logfile ) && (sendtosd_freq == 0 )) || strcmp (param, AirDataComputer._logfile )) {
937+ SD.remove (param); // Delete the file
935938 if (!(SD.exists (param)))
936939 {
937940 strcat (Answer, SEPARATOR);
You can’t perform that action at this time.
0 commit comments