diff --git a/README.md b/README.md index ec1e946..7b39ac5 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ It has been written to complement grblHAL and has features such as proper keyboa --- -Latest build date is 20220729, see the [changelog](changelog.md) for details. +Latest build date is 20220731, 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. diff --git a/changelog.md b/changelog.md index b1e087e..427119f 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,19 @@ ## grblHAL changelog +20220731: + +Core: + +* Added core event `on_homing_completed`, some sanity checks on MPG stream registration. + +Drivers: + +* ESP32: Added IP address to "WIFI STA ACTIVE" message published on startup when IP address has been assigned. + +* STM32Fxx: Fixed _Release_ build settings, added _.bin_ output. + +--- + 20220729: Core: @@ -13,7 +27,7 @@ Plugins: Drivers: * ESP32: Switched to plugin code for WebUI login and SD card handling. Still WIP. -__NOTE:__ Settings for WebUI passwords has been moved to the WebUI plugin, this will trigger a reset of the network settings. +__NOTE:__ Settings for WebUI passwords has been moved to the WebUI plugin, this will trigger a reset of the network settings! * SAM3X8E: Fix for issue [#11](https://github.com/grblHAL/SAM3X8E/issues/11). diff --git a/core_handlers.h b/core_handlers.h index ec7c65d..ca0a5e3 100644 --- a/core_handlers.h +++ b/core_handlers.h @@ -80,6 +80,7 @@ typedef void (*on_unknown_feedback_message_ptr)(stream_write_ptr stream_write); typedef void (*on_stream_changed_ptr)(stream_type_t type); typedef bool (*on_laser_ppi_enable_ptr)(uint_fast16_t ppi, uint_fast16_t pulse_length); typedef void (*on_homing_rate_set_ptr)(axes_signals_t axes, float rate, bool pulloff); +typedef void (*on_homing_completed_ptr)(void); typedef bool (*on_probe_fixture_ptr)(tool_data_t *tool, bool at_g59_3, bool on); typedef bool (*on_probe_start_ptr)(axes_signals_t axes, float *target, plan_line_data_t *pl_data); typedef void (*on_probe_completed_ptr)(void); @@ -114,6 +115,7 @@ typedef struct { on_user_command_ptr on_user_command; on_stream_changed_ptr on_stream_changed; on_homing_rate_set_ptr on_homing_rate_set; + on_homing_completed_ptr on_homing_completed; on_probe_fixture_ptr on_probe_fixture; on_probe_start_ptr on_probe_start; on_probe_completed_ptr on_probe_completed; diff --git a/grbl.h b/grbl.h index 29b6b77..f9aed67 100644 --- a/grbl.h +++ b/grbl.h @@ -34,7 +34,7 @@ #else #define GRBL_VERSION "1.1f" #endif -#define GRBL_BUILD 20220729 +#define GRBL_BUILD 20220731 // The following symbols are set here if not already set by the compiler or in config.h // Do NOT change here! diff --git a/motion_control.c b/motion_control.c index 022bae1..aba138a 100644 --- a/motion_control.c +++ b/motion_control.c @@ -934,9 +934,14 @@ status_code_t mc_homing_cycle (axes_signals_t cycle) sys.report.homed = On; - return settings.limits.flags.hard_enabled && settings.limits.flags.check_at_init && limit_signals_merge(hal.limits.get_state()).value - ? Status_LimitsEngaged - : Status_OK; + status_code_t status = settings.limits.flags.hard_enabled && settings.limits.flags.check_at_init && limit_signals_merge(hal.limits.get_state()).value + ? Status_LimitsEngaged + : Status_OK; + + if(status == Status_OK && grbl.on_homing_completed) + grbl.on_homing_completed(); + + return status; } // Perform tool length probe cycle. Requires probe switch. diff --git a/nvs_buffer.c b/nvs_buffer.c index 69a0935..eb71490 100644 --- a/nvs_buffer.c +++ b/nvs_buffer.c @@ -3,7 +3,7 @@ Part of grblHAL - Copyright (c) 2017-2021 Terje Io + Copyright (c) 2017-2022 Terje Io Copyright (c) 2012-2016 Sungeun K. Jeon for Gnea Research LLC Copyright (c) 2009-2011 Simen Svale Skogsrud @@ -360,8 +360,9 @@ void nvs_buffer_sync_physical (void) settings_dirty.build_info; } else if(physical_nvs.memcpy_to_flash) { - physical_nvs.memcpy_to_flash(nvsbuffer); - settings_dirty.is_dirty = false; + if(!physical_nvs.memcpy_to_flash(nvsbuffer)) + report_message("Settings write failed!", Message_Warning); + memset(&settings_dirty, 0, sizeof(settings_dirty_t)); } } diff --git a/stream.c b/stream.c index f753765..4a62e80 100644 --- a/stream.c +++ b/stream.c @@ -359,7 +359,7 @@ io_stream_t const *stream_open_instance (uint8_t instance, uint32_t baud_rate, s bool stream_mpg_register (const io_stream_t *stream, bool rx_only, stream_write_char_ptr write_char) { - if(stream == NULL) + if(stream == NULL || stream->type != StreamType_Serial || stream->disable_rx == NULL) return false; base.flags.is_up = On;