File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -84,12 +84,21 @@ void setup() {
84
84
if (breset_config)
85
85
{
86
86
// update EEPROM with default settings
87
+ Serial.begin (9600 );
88
+ delay (2000 );
89
+ Serial.println (" M117 Reset requested" );
87
90
CONFIG::reset_config ();
88
91
delay (1000 );
89
- // use default baud rate and ports
90
- baud_rate=DEFAULT_BAUD_RATE;
91
- wifi_config.iweb_port =DEFAULT_WEB_PORT;
92
- wifi_config.idata_port =DEFAULT_DATA_PORT;
92
+ // put some default value to a void some exception at first start
93
+ WiFi.mode (WIFI_AP);
94
+ wifi_set_phy_mode (PHY_MODE_11G);
95
+ Serial.flush ();
96
+ delay (500 );
97
+ Serial.swap ();
98
+ delay (100 );
99
+ // restart once reset config is done
100
+ ESP.restart ();
101
+ while (1 ){delay (1 );};
93
102
}
94
103
// setup serial
95
104
Serial.begin (baud_rate);
You can’t perform that action at this time.
0 commit comments