mirror of https://github.com/SQ9MDD/ESP32IGate.git
Add BOOT key for begin set Default Config
This commit is contained in:
parent
4c68ffc6e2
commit
af10ce3427
|
|
@ -10,7 +10,7 @@
|
|||
#ifndef MAIN_H
|
||||
#define MAIN_H
|
||||
|
||||
#define VERSION "0.1"
|
||||
#define VERSION "0.2"
|
||||
|
||||
#define DEBUG
|
||||
//#define DEBUG_IS
|
||||
|
|
|
|||
|
|
@ -444,13 +444,19 @@ void setup()
|
|||
|
||||
Serial.println();
|
||||
Serial.println("Start ESP32IGate V" + String(VERSION));
|
||||
Serial.println("Push BOOT for Factory Default config.");
|
||||
|
||||
if (!EEPROM.begin(EEPROM_SIZE))
|
||||
{
|
||||
Serial.println(F("failed to initialise EEPROM")); // delay(100000);
|
||||
}
|
||||
|
||||
delay(500);
|
||||
delay(3000);
|
||||
if (digitalRead(0) == LOW) {
|
||||
defaultConfig();
|
||||
Serial.println("Manual Default configure!");
|
||||
delay(3000);
|
||||
}
|
||||
|
||||
//ตรวจสอบคอนฟิกซ์ผิดพลาด
|
||||
ptr = (byte *)&config;
|
||||
|
|
|
|||
Loading…
Reference in New Issue