diff --git a/README.md b/README.md index b96c69f..fca5fa9 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ It has been written to complement grblHAL and has features such as proper keyboa --- -Latest build date is 20220928, see the [changelog](changelog.md) for details. +Latest build date is 20221005, see the [changelog](changelog.md) for details. __NOTE:__ A settings reset will be performed on an update for versions earlier than 20211122. Backup and restore of settings is recommended. __IMPORTANT!__ A new setting has been introduced for ganged axes motors in version 20211121. I have only bench tested this for a couple of drivers, correct function should be verified after updating by those who have more than three motors configured. @@ -86,4 +86,4 @@ List of Supported G-Codes: Some [plugins](https://github.com/grblHAL/plugins) implements additional M-codes. --- -2022-09-29 +2022-10-07 diff --git a/changelog.md b/changelog.md index 8ad7063..a4c8fed 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,35 @@ ## grblHAL changelog ->Build 20220928: +Build 20221005 + +Core: + +* Added optional string pointers to HAL for driver and board URLs. If present they are announced by the SSDP protocol. + +Plugins: + +* Networking: Added mDNS and SSDP protocol support. +__Note:__ Some drivers require manual patching before enabling. + +* WebUI: Fix for bugs affection settings handling. [Issue #5](https://github.com/grblHAL/Plugin_WebUI/issues/5) and [issue #6](https://github.com/grblHAL/Plugin_WebUI/issues/6). +__Note:__ Issue 6 was about incorrect handling spaces in string settings, these are not permitted in hostnames according to [RFC1123](https://www.rfc-editor.org/rfc/rfc1123) and I may add validation later. + +Drivers: + +* iMXRT1062, RP2040, ESP32, STM32F7xx and MSP432E401Y: Added options for enabling mDNS and/or SSDP protocols. +__Note:__ iMXRT1062 and RP2040 require manual patching before enabling. + +* STM32F1xx: Added two alternatives for spindle PWM pin assignment. + +* STM32F7xx: Updated for latest STM32CubeIDE device driver HAL. + +Templates: + +* my_plugin/hpgl: Added tentative support for most HP7475A `ESC . ...` device control sequences. _Testing required!_ + +--- + +Build 20220928: Core: diff --git a/driver_opts.h b/driver_opts.h index 00abb05..89dd10d 100644 --- a/driver_opts.h +++ b/driver_opts.h @@ -316,6 +316,12 @@ #undef FTP_ENABLE #define FTP_ENABLE 0 #endif +#ifndef MDNS_ENABLE +#define MDNS_ENABLE 0 +#endif +#ifndef SSDP_ENABLE +#define SSDP_ENABLE 0 +#endif #if ETHERNET_ENABLE || WIFI_ENABLE #ifndef NETWORK_HOSTNAME @@ -357,25 +363,25 @@ #endif #if WIFI_SOFTAP > 0 #ifndef NETWORK_AP_SSID -#define NETWORK_AP_SSID "grblHAL_AP" +#define NETWORK_AP_SSID "grblHAL_AP" #endif #ifndef NETWORK_AP_PASSWORD -#define NETWORK_AP_PASSWORD "grblHAL" +#define NETWORK_AP_PASSWORD "grblHAL" #endif #ifndef NETWORK_AP_HOSTNAME -#define NETWORK_AP_HOSTNAME "grblHAL_AP" +#define NETWORK_AP_HOSTNAME "grblHAL_AP" #endif #ifndef NETWORK_AP_IPMODE -#define NETWORK_AP_IPMODE 0 // 0 = static, 1 = DHCP, 2 = AutoIP +#define NETWORK_AP_IPMODE 0 // 0 = static, 1 = DHCP, 2 = AutoIP #endif #ifndef NETWORK_AP_IP -#define NETWORK_AP_IP "192.168.5.1" +#define NETWORK_AP_IP "192.168.5.1" #endif #ifndef NETWORK_AP_GATEWAYs -#define NETWORK_AP_GATEWAY "192.168.5.1" +#define NETWORK_AP_GATEWAY "192.168.5.1" #endif #ifndef NETWORK_AP_MASK -#define NETWORK_AP_MASK "255.255.255.0" +#define NETWORK_AP_MASK "255.255.255.0" #endif #endif #endif diff --git a/grbl.h b/grbl.h index 4f4f48f..cd3e662 100644 --- a/grbl.h +++ b/grbl.h @@ -34,7 +34,9 @@ #else #define GRBL_VERSION "1.1f" #endif -#define GRBL_BUILD 20220928 +#define GRBL_BUILD 20221005 + +#define GRBL_URL "https://github.com/grblHAL" // The following symbols are set here if not already set by the compiler or in config.h // Do NOT change here! diff --git a/hal.h b/hal.h index a6776d4..839a91f 100644 --- a/hal.h +++ b/hal.h @@ -517,7 +517,9 @@ typedef struct { char *info; //!< Pointer to driver info string, typically name of processor/platform. char *driver_version; //!< Pointer to driver version date string in YYMMDD format. char *driver_options; //!< Pointer to optional comma separated string with driver options. + char *driver_url; //!< Pointer to optional URL for the driver. char *board; //!< Pointer to optional board name string. + char *board_url; //!< Pointer to optional URL for the board. uint32_t f_step_timer; //!< Frequency of main stepper timer in Hz. uint32_t f_mcu; //!< Frequency of MCU in MHz. uint32_t rx_buffer_size; //!< Input stream buffer size in bytes. diff --git a/stream.c b/stream.c index 6961ed4..6e7586c 100644 --- a/stream.c +++ b/stream.c @@ -300,6 +300,25 @@ const io_stream_t *stream_get_base (void) return base.stream; } +io_stream_flags_t stream_get_flags (io_stream_t stream) +{ + io_stream_flags_t flags = {0}; + io_stream_details_t *details = streams; + + while(details) { + uint_fast8_t idx; + for(idx = 0; idx < details->n_streams; idx++) { + if(stream.type == details->streams[idx].type && stream.instance == details->streams[idx].instance) { + flags = details->streams[idx].flags; + break; + } + } + details = details->next; + }; + + return flags; +} + bool stream_connect (const io_stream_t *stream) { bool ok = hal.stream_select ? hal.stream_select(stream) : stream_select(stream, true); diff --git a/stream.h b/stream.h index 0c90d1b..dab00db 100644 --- a/stream.h +++ b/stream.h @@ -32,6 +32,7 @@ Helper functions for saving away and restoring a stream input buffer. _Not refer #define ASCII_STX 0x02 #define ASCII_ETX 0x03 #define ASCII_EOT 0x04 +#define ASCII_ENQ 0x05 #define ASCII_ACK 0x06 #define ASCII_BS 0x08 #define ASCII_TAB 0x09 @@ -333,6 +334,8 @@ void stream_disconnect (const io_stream_t *stream); const io_stream_t *stream_get_base (void); +io_stream_flags_t stream_get_flags (io_stream_t stream); + const io_stream_t *stream_null_init (uint32_t baud_rate); io_stream_t const *stream_open_instance (uint8_t instance, uint32_t baud_rate, stream_write_char_ptr rx_handler);