Skip to content

Commit 9585b1d

Browse files
committed
Do not reuse last log if reset reason was a software restart
When we exit WiFi Config we issue a ESP.restart. This is ESP_RST_SW. If we restart due to ESP_RST_SW, go ahead and start a new log.
1 parent ad7a965 commit 9585b1d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Firmware/RTK_Surveyor/Begin.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ void beginBoard()
219219

220220
//For all boards, check reset reason. If reset was due to wdt or panic, append last log
221221
loadSettingsPartial(); //Loads settings from LFS
222-
if (esp_reset_reason() == ESP_RST_POWERON)
222+
if (esp_reset_reason() == ESP_RST_POWERON || esp_reset_reason() == ESP_RST_SW)
223223
{
224224
reuseLastLog = false; //Start new log
225225

0 commit comments

Comments
 (0)