@@ -648,6 +648,8 @@ void createSettingsString(char* newSettings)
648648 }
649649 stringRecord (newSettings, " espnowBroadcast" , settings.espnowBroadcast );
650650
651+ stringRecord (newSettings, " logFileName" , logFileName);
652+
651653 // Add ECEF and Geodetic station data
652654 for (int index = 0 ; index < COMMON_COORDINATES_MAX_STATIONS ; index++) // Arbitrary 50 station limit
653655 {
@@ -1007,7 +1009,16 @@ void updateSettingWithValue(const char *settingName, const char* settingValueStr
10071009 else if (strcmp (settingName, " startNewLog" ) == 0 )
10081010 {
10091011 if (settings.enableLogging == true && online.logging == true )
1010- endSD (false , true ); // Close down file. A new one will be created at the next calling of updateLogs().
1012+ {
1013+ endLogging (false , true ); // (gotSemaphore, releaseSemaphore) Close file. Reset parser stats.
1014+ beginLogging (); // Create new file based on current RTC.
1015+ setLoggingType (); // Determine if we are standard, PPP, or custom. Changes logging icon accordingly.
1016+
1017+ char newFileNameCSV[sizeof (" logFileName," ) + sizeof (logFileName) + 1 ];
1018+ snprintf (newFileNameCSV, sizeof (newFileNameCSV), " logFileName,%s," , logFileName);
1019+
1020+ websocket->textAll (newFileNameCSV); // Tell the config page the name of the file we just created
1021+ }
10111022 }
10121023 else if (strcmp (settingName, " checkNewFirmware" ) == 0 )
10131024 {
0 commit comments