From aed6f7112937df0747cd2691c5332a57a42f6cb8 Mon Sep 17 00:00:00 2001 From: Terje Io Date: Fri, 10 Jan 2025 07:34:10 +0100 Subject: [PATCH] Non-functional changes: some configuration warnings suppressed in Web Builder builds, delta kinematics updated to not use deprecated functionality. --- changelog.md | 18 +++++++++++- driver_opts2.h | 6 +++- kinematics/delta.c | 69 +++++++++++++++++----------------------------- 3 files changed, 47 insertions(+), 46 deletions(-) diff --git a/changelog.md b/changelog.md index 621f2a2..a87b551 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,21 @@ ## grblHAL changelog +20250110 + +Core: + +* Non-functional changes: some configuration warnings suppressed in Web Builder builds, delta kinematics updated to not use deprecated functionality. + +Drivers: + +* ESP32: fixed typos and incorrect preprocessor code in some untested board maps. + +Plugins: + +* SD card, YModem protocol: changed to use local input buffer due to not working when Laserburn cluster plugin was enabled. Ref. [ioSender issue #443](https://github.com/terjeio/ioSender/issues/433). + +--- + Build 20250109 Core: @@ -16,7 +32,7 @@ Drivers: Plugins: -* Bluetooth, Embroidery and Keypad, macros: updated to use new core functionality for claiming auxiliary pins. +* Bluetooth, Embroidery, Spindle, PWM and Keypad, macros: updated to use new core functionality for claiming auxiliary pins. --- diff --git a/driver_opts2.h b/driver_opts2.h index c81c114..5cf18fd 100644 --- a/driver_opts2.h +++ b/driver_opts2.h @@ -25,6 +25,8 @@ // NOTE: do NOT change options here - edit the driver specific my_machine.h instead! // +#ifndef WEB_BUILD + #if (DRIVER_SPINDLE_ENABLE & SPINDLE_ENA) && !defined(SPINDLE_ENABLE_PIN) #warning "Selected spindle is not supported!" #endif @@ -41,6 +43,8 @@ #warning "Selected spindle 1 is not supported!" #endif +#endif + #if MPG_ENABLE == 1 && !defined(MPG_MODE_PIN) #error "MPG_MODE_PIN must be defined!" #endif @@ -48,7 +52,7 @@ #if KEYPAD_ENABLE == 1 && !defined(I2C_STROBE_PORT) #error Keypad plugin not supported! #elif I2C_STROBE_ENABLE && !defined(I2C_STROBE_PORT) -#error I2C strobe not supported! +#error "I2C strobe not supported!" #endif #if EEPROM_ENABLE == 0 diff --git a/kinematics/delta.c b/kinematics/delta.c index 44221c3..7bbbad1 100644 --- a/kinematics/delta.c +++ b/kinematics/delta.c @@ -91,7 +91,6 @@ static delta_properties_t machine = {0}; static homing_mode_t homing_mode; static on_report_options_ptr on_report_options; static on_homing_completed_ptr on_homing_completed; -static on_report_command_help_ptr on_report_command_help; static on_set_axis_setting_unit_ptr on_set_axis_setting_unit; static on_setting_get_description_ptr on_setting_get_description; static on_realtime_report_ptr on_realtime_report; @@ -824,21 +823,6 @@ static void delta_settings_load (void) } } -static setting_details_t setting_details = { - .groups = kinematics_groups, - .n_groups = sizeof(kinematics_groups) / sizeof(setting_group_detail_t), - .settings = kinematics_settings, - .n_settings = sizeof(kinematics_settings) / sizeof(setting_detail_t), -#ifndef NO_SETTINGS_DESCRIPTIONS - .descriptions = kinematics_settings_descr, - .n_descriptions = sizeof(kinematics_settings_descr) / sizeof(setting_descr_t), -#endif - .load = delta_settings_load, - .restore = delta_settings_restore, - .save = delta_settings_save, - .on_changed = delta_settings_changed -}; - static void report_options (bool newopt) { on_report_options(newopt); @@ -895,31 +879,33 @@ static const char *delta_setting_get_description (setting_id_t id) : (on_setting_get_description ? on_setting_get_description(id) : NULL); } -static void delta_command_help (void) -{ - hal.stream.write("$DELTA - show info about delta robot parameters" ASCII_EOL); - - if(on_report_command_help) - on_report_command_help(); -} - -const sys_command_t delta_command_list[] = { - {"DELTA", delta_info, { .noargs = On } }, -}; - -static sys_commands_t delta_commands = { - .n_commands = sizeof(delta_command_list) / sizeof(sys_command_t), - .commands = delta_command_list -}; - -sys_commands_t *delta_get_commands() -{ - return &delta_commands; -} - // Initialize API pointers for Delta robot kinematics void delta_robot_init (void) { + static setting_details_t setting_details = { + .groups = kinematics_groups, + .n_groups = sizeof(kinematics_groups) / sizeof(setting_group_detail_t), + .settings = kinematics_settings, + .n_settings = sizeof(kinematics_settings) / sizeof(setting_detail_t), + #ifndef NO_SETTINGS_DESCRIPTIONS + .descriptions = kinematics_settings_descr, + .n_descriptions = sizeof(kinematics_settings_descr) / sizeof(setting_descr_t), + #endif + .load = delta_settings_load, + .restore = delta_settings_restore, + .save = delta_settings_save, + .on_changed = delta_settings_changed + }; + + static const sys_command_t delta_command_list[] = { + {"DELTA", delta_info, { .noargs = On }, { .str = "output info about delta robot parameters" } }, + }; + + static sys_commands_t delta_commands = { + .n_commands = sizeof(delta_command_list) / sizeof(sys_command_t), + .commands = delta_command_list + }; + if((nvs_address = nvs_alloc(sizeof(delta_settings_t)))) { kinematics.limits_set_target_pos = delta_limits_set_target_pos; @@ -945,12 +931,6 @@ void delta_robot_init (void) on_report_options = grbl.on_report_options; grbl.on_report_options = report_options; - delta_commands.on_get_commands = grbl.on_get_commands; - grbl.on_get_commands = delta_get_commands; - - on_report_command_help = grbl.on_report_command_help; - grbl.on_report_command_help = delta_command_help; - on_realtime_report = grbl.on_realtime_report; grbl.on_realtime_report = delta_real_time_report; @@ -964,6 +944,7 @@ void delta_robot_init (void) grbl.on_setting_get_description = delta_setting_get_description; settings_register(&setting_details); + system_register_commands(&delta_commands); } }