Update main.cpp

This commit is contained in:
Siwat Sirichai 2024-01-14 14:14:27 +07:00
parent b16b6902d7
commit 8a19674b0e

View file

@ -107,16 +107,16 @@ void setup()
Serial.print("boot_state.txt=\"Core Initializing . . .\""); Serial.print("boot_state.txt=\"Core Initializing . . .\"");
sendStopBytes(); sendStopBytes();
espmega.begin(); espmega.begin();
if (clear_fram) // if (clear_fram)
{ // {
Serial.print("boot_state.txt=\"Factory Resetting . . .\""); // Serial.print("boot_state.txt=\"Factory Resetting . . .\"");
sendStopBytes(); // sendStopBytes();
for (uint16_t i = 0; i < 32768; i++) // for (uint16_t i = 0; i < 32768; i++)
{ // {
espmega.fram.write8(i, 0); // espmega.fram.write8(i, 0);
} // }
esp_restart(); // esp_restart();
} // }
Serial.print("boot_state.txt=\"IoT Initializing . . .\""); Serial.print("boot_state.txt=\"IoT Initializing . . .\"");
sendStopBytes(); sendStopBytes();
espmega.enableIotModule(); espmega.enableIotModule();