Skip to content

Commit f278434

Browse files
committed
bug fix when type of wifi = NO_WIFI
1 parent 95cba7f commit f278434

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

config.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33

44
#include "TFT_eSPI_ms/TFT_eSPI.h"
55

6-
#define ESP32_VERSION "v1.0.v"
6+
#define ESP32_VERSION "v1.0.w"
77

88
// decide if you will use Wifi or not (and how)
9-
#define WIFI ESP32_ACT_AS_STATION // select between NO_WIFI, ESP32_ACT_AS_STATION, ESP32_ACT_AS_AP
9+
#define WIFI ESP32_ACT_AS_STATION // select between NO_WIFI, ESP32_ACT_AS_STATION, ESP32_ACT_AS_AP
1010

1111
// If wifi is used, set the parameter to identify the access point (= the router when ESP32_ACT_AS_STATION or the ESP32 when ESP32_ACT_AS_AP)
1212
#define MY_SSID "bbox2-58c4" // replace by the name of your access point (when act as station) or the name you assign to your device (when act as acces point)

grbl_controller_esp32.ino

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,10 @@ void setup() {
188188
updateFullPage = true ;
189189
// en principe les données pour les buttons sont initialisés automatiquement à 0
190190
//drawFullPage( ) ;
191-
//#if defined ( ESP32_ACT_AS_STATION ) || defined (ESP32_ACT_AS_AP)
192191
initWifi() ;
193-
telnetInit() ;
194-
//#endif
195-
192+
if ( (wifiType == ESP32_ACT_AS_STATION ) || (wifiType == ESP32_ACT_AS_AP ) ) {
193+
telnetInit() ;
194+
}
196195
while ( Serial2.available() ) Serial2.read() ; // clear input buffer which can contains messages sent by GRBL in reply to noise captured before Serial port was initialised.
197196
Serial2.write(0x18) ; // send a soft reset
198197
delay(100);

0 commit comments

Comments
 (0)