mirror of
https://github.com/bdring/Grbl_Esp32.git
synced 2025-09-03 03:13:25 +02:00
Merge pull request #327 from luc-github/PR-UDPerror
Fix WiFi upd error when in BT
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
*/
|
||||
|
||||
#include "grbl.h"
|
||||
#include "WiFi.h"
|
||||
|
||||
// Declare system global variable structure
|
||||
system_t sys;
|
||||
@@ -36,6 +37,11 @@ volatile uint8_t sys_rt_exec_accessory_override; // Global realtime executor bit
|
||||
|
||||
|
||||
void setup() {
|
||||
WiFi.persistent(false);
|
||||
WiFi.disconnect(true);
|
||||
WiFi.enableSTA (false);
|
||||
WiFi.enableAP (false);
|
||||
WiFi.mode (WIFI_OFF);
|
||||
|
||||
serial_init(); // Setup serial baud rate and interrupts
|
||||
|
||||
|
@@ -44,7 +44,7 @@ Some features should not be changed. See notes below.
|
||||
// The CPU map is the main definition of the machine/controller you want to use
|
||||
// These are typically found in the cpu_map.h file.
|
||||
// See Github repo wiki for more details
|
||||
#define CPU_MAP_ESP32 // these are defined in cpu_map.h
|
||||
#define CPU_MAP_TEST_DRIVE // these are defined in cpu_map.h
|
||||
|
||||
#define N_AXIS 3 // Number of axes defined (valid range: 3 to 6)
|
||||
|
||||
|
@@ -20,7 +20,7 @@
|
||||
|
||||
// Grbl versioning system
|
||||
#define GRBL_VERSION "1.1f"
|
||||
#define GRBL_VERSION_BUILD "20200207"
|
||||
#define GRBL_VERSION_BUILD "20200208"
|
||||
|
||||
//#include <sdkconfig.h>
|
||||
#include <Arduino.h>
|
||||
|
@@ -176,7 +176,7 @@ bool Web_Server::begin(){
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_CAPTIVE_PORTAL
|
||||
if(WiFi.getMode() != WIFI_STA){
|
||||
if(WiFi.getMode() == WIFI_AP){
|
||||
// if DNSServer is started with "*" for domain name, it will reply with
|
||||
// provided IP to all DNS request
|
||||
dnsServer.start(DNS_PORT, "*", WiFi.softAPIP());
|
||||
@@ -341,7 +341,7 @@ void Web_Server:: handle_not_found()
|
||||
|
||||
if (page_not_found ) {
|
||||
#ifdef ENABLE_CAPTIVE_PORTAL
|
||||
if (WiFi.getMode()!=WIFI_STA ) {
|
||||
if(WiFi.getMode() == WIFI_AP) {
|
||||
String contentType= PAGE_CAPTIVE;
|
||||
String stmp = WiFi.softAPIP().toString();
|
||||
//Web address = ip + port
|
||||
@@ -1630,7 +1630,7 @@ void Web_Server::handle(){
|
||||
static uint32_t timeout = millis();
|
||||
COMMANDS::wait(0);
|
||||
#ifdef ENABLE_CAPTIVE_PORTAL
|
||||
if(WiFi.getMode() != WIFI_STA){
|
||||
if(WiFi.getMode() == WIFI_AP){
|
||||
dnsServer.processNextRequest();
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user