Skip to content

Commit 75d2d04

Browse files
committed
Added configuration option for WebDAV protocol to my_machine.h++
1 parent a5e6006 commit 75d2d04

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

Inc/my_machine.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
//#define VFD_ENABLE 1 // Set to 1 or 2 for Huanyang VFD spindle. More here https://github.com/grblHAL/Plugins_spindle
4343
//#define MODBUS_ENABLE 1 // Set to 1 for auto direction, 2 for direction signal on auxillary output pin.
4444
//#define WEBUI_ENABLE 1 // Enable ESP3D-WEBUI plugin along with networking and SD card plugins.
45+
//#define WEBUI_AUTH_ENABLE 1 // Enable ESP3D-WEBUI authentication.
4546
//#define WEBUI_INFLASH 1 // Store WebUI files in flash instead of on SD card.
4647
//#define ETHERNET_ENABLE 1 // Ethernet streaming. Uses networking plugin.
4748
//#define BLUETOOTH_ENABLE 1 // Set to 1 for HC-05 module. Uses Bluetooth plugin.
@@ -81,6 +82,7 @@
8182
#ifdef SDCARD_ENABLE
8283
#define FTP_ENABLE 1 // Ftp daemon - requires SD card enabled.
8384
//#define HTTP_ENABLE 1 // http daemon - requires SD card enabled.
85+
//#define WEBDAV_ENABLE 1 // webdav protocol - requires http daemon and SD card enabled.
8486
#endif
8587
// The following symbols have the default values as shown, uncomment and change as needed.
8688
//#define NETWORK_HOSTNAME "GRBL"

Src/enet.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ static network_settings_t ethernet, network;
5151
static on_report_options_ptr on_report_options;
5252
static on_execute_realtime_ptr on_execute_realtime;
5353
static on_stream_changed_ptr on_stream_changed;
54-
static char netservices[30] = ""; // must be large enough to hold all service names
54+
static char netservices[NETWORK_SERVICES_LEN] = "";
5555

5656
static void report_options (bool newopt)
5757
{
@@ -62,6 +62,10 @@ static void report_options (bool newopt)
6262
#if FTP_ENABLE
6363
if(services.ftp)
6464
hal.stream.write(",FTP");
65+
#endif
66+
#if WEBDAV_ENABLE
67+
if(services.webdav)
68+
hal.stream.write(",WebDAV");
6569
#endif
6670
} else {
6771
hal.stream.write("[IP:");
@@ -140,8 +144,13 @@ static void netif_status_callback (struct netif *netif)
140144
#endif
141145

142146
#if HTTP_ENABLE
143-
if(network.services.http && !services.http)
147+
if(network.services.http && !services.http) {
144148
services.http = httpd_init(network.http_port == 0 ? NETWORK_HTTP_PORT : network.http_port);
149+
#if WEBDAV_ENABLE
150+
if(network.services.webdav && !services.webdav)
151+
services.webdav = webdav_init();
152+
#endif
153+
}
145154
#endif
146155

147156
#if WEBSOCKET_ENABLE

Src/serial.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ static enqueue_realtime_command_ptr enqueue_realtime_command = protocol_enqueue_
3636
#ifdef SERIAL2_MOD
3737
static stream_rx_buffer_t rxbuf2 = {0};
3838
static stream_tx_buffer_t txbuf2 = {0};
39-
static enqueue_realtime_command_ptr enqueue_realtime_command2 = stream_buffer_all;
39+
static enqueue_realtime_command_ptr enqueue_realtime_command2 = protocol_enqueue_realtime_command;
4040
#endif
4141

4242
#ifndef SERIAL_MOD

0 commit comments

Comments
 (0)