Factory reset at startup
This commit is contained in:
parent
4cb94db0bd
commit
254076834e
|
|
@ -455,7 +455,6 @@ void setup(){
|
||||||
delay(1000);
|
delay(1000);
|
||||||
if(digitalRead(BUTTON)==LOW){
|
if(digitalRead(BUTTON)==LOW){
|
||||||
clear_preferences = 2;
|
clear_preferences = 2;
|
||||||
preferences.clear();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -491,7 +490,14 @@ void setup(){
|
||||||
#ifdef ENABLE_PREFERENCES
|
#ifdef ENABLE_PREFERENCES
|
||||||
if (clear_preferences == 2){
|
if (clear_preferences == 2){
|
||||||
writedisplaytext("LoRa-APRS","","","Factory reset!!","","",0);
|
writedisplaytext("LoRa-APRS","","","Factory reset!!","","",0);
|
||||||
delay(3000);
|
delay(1000);
|
||||||
|
if(digitalRead(BUTTON)==LOW){
|
||||||
|
clear_preferences = 3;
|
||||||
|
preferences.clear();
|
||||||
|
writedisplaytext("LoRa-APRS","","Factory reset","OK","","",0);
|
||||||
|
delay(2000);
|
||||||
|
|
||||||
|
}
|
||||||
ESP.restart();
|
ESP.restart();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue