Commit Graph

99 Commits

Author SHA1 Message Date
Dietz0r
c4969f1dc0 missed 2 variable names 2024-12-10 22:24:39 +01:00
Dietz0r
e504964dae moved acceleration factor to plan_block_t structure, moved lookup function to plan_data_init, renamed lookup fuction and adjusted the acceleration limit functions to new structure 2024-12-10 22:15:25 +01:00
Dietz0r
075d5cec57 Merge branch 'master' into master 2024-12-10 21:28:16 +01:00
Terje Io
acfd473fce Changed deprecated calls to isinff() and isnanf() to new (C99) versions. 2024-12-04 09:29:23 +01:00
Terje Io
8fee2930f5 Added (or rather repurposed) field for build date to settings structure in preparation for coming changes.
Added code guards in order to free some memory for STM32F103 variants with 128K flash.
Changed Stop (0x19) real-time command behaviour, active tool offset and coordinate system will now be kept. Ref. issue #610.
2024-11-29 18:17:26 +01:00
Terje Io
7e40bf2402 A bit of refactoring related to spindles as a first step for a coming settings structure revision, "hardened" some code. 2024-11-20 19:03:27 +01:00
Terje Io
0b8bce16c6 Added support for named o-sub/o-call to flow control, for calling gcode subroutines stored on SD card or in littlefs.
Sub name matches filename with extension .macro.
Added core event for handling special gcode comments used by expressions and flow control: DEBUG, PRINT and ABORT.
Added overrideable default $-setting values for second PWM spindle to grbl/config.c.
2024-11-16 22:02:00 +01:00
Dietz0r
b7d54d75ee added acceleration profiles to gc_state, adjusted g187 and m2/30 handling accordingly 2024-10-31 21:22:09 +01:00
Terje Io
9a98243fd3 Changed _vminor named parameter to contain build date in YYMMDD format, previously value was 0.
Added support for LinuxCNC style (ABORT,<msg>) comment, requires expressions enabled. Terminates gcode program, outputs message and returns error 253.
Added PRM[<setting>] and PRM[<setting>,<bit>] functions to expressions, returns $-setting value or value of bit in integer type setting.
"hardened" flow control code, fixed bug in repeat...continue handling.
Changed signature of grbl.on_gcode_comment event, now returns status code.
2024-10-27 07:27:25 +07:00
Terje Io
ee8eb2c1eb Fixed some odd bugs in NGC flow control, prepared for file based named O-call subroutines.
Fixed incorrect comment string passed to passed to grbl.on_gcode_comment event.
Added generic redirector for temporarily changing input stream to read from a file. Supports nesting.
2024-10-23 20:18:34 +07:00
Terje Io
c07d63198e Moved message substitution code from gcode.c to ngc_expr.c. 2024-10-19 18:45:13 +07:00
Terje Io
236a40c100 Improved parameter handling some more, now allows indirected O-calls and line numbers with O-word.
Fix for issue #609, homing may cause a controller crash.
2024-10-16 14:13:04 +07:00
Terje Io
a7b82c8041 Removed misplaced code guard 2024-10-14 20:09:56 +07:00
Terje Io
f0eac9d0aa Improved expression and parameter handling, simplified gcode parser related to this. Fixed typo in OR statement decode.
Added clear of return value on CALL statement and added optional return value expression support to ENDSUB.
Improved handling of multiple simultaneous spindles. Still work in progress.
For developers: moved user M-code entry point hooks from the HAL structure to the core handlers and changed signature of the check() function to better support valueless words (letters) when parameter support is enabled. Removed deprecated parameter from the validate() call signature.
2024-10-14 19:02:30 +07:00
Terje Io
5825b36ef6 Fix for M62 - M68 regression. Ref. issue #600.
Fixed incorrect handling of G65 call parameters, axis words had offsets added. Ref. issue #594.
Refactored handling of multiple spindles. There are still some limitations but should work better now. Disabled override delays for now, needs investigation. Ref. issue #598.
NOTE: Please report any erratic behaviour after installing this version since it is a rather major change.
2024-10-06 20:24:34 +07:00
Dietz0r
e17d78293f Merge branch 'grblHAL:master' into master 2024-09-29 21:03:31 +02:00
Terje Io
323dd84b79 Added (PRINT, <msg>) support and parameter formatting for DEBUG and PRINT commands.
Added named parameters for getting absolute (G53) position: _abs_x, abs_y, ...
Available when expression support is enabled.

Changed stepper enable HAL signature to allow current reduction when idle.
Added reference id to spindle registration in order to allow configuring default spindle, and possibly additional spindles, at compile time.
2024-09-29 12:38:49 +07:00
skasti
94d15b45d0 Put functionality in NGC_EXPRESSIONS_ENABLE block 2024-09-25 10:54:01 +02:00
skasti
9d6f09bf72 Extract substitution code to a function 2024-09-25 06:58:08 +02:00
skasti
6a042107af Respect NGC_PARAMETERS_ENABLE 2024-09-25 06:36:53 +02:00
skasti
d480ccaf51 Add ability to insert parameters in MSG comments 2024-09-25 06:31:34 +02:00
Terje Io
3ef6763cec Build 20240921
Added generic HAL timer API and function for getting which G65 parameter words were supplied.
2024-09-21 18:25:00 +07:00
Terje Io
fabec73d0e Added some RGB LED strip properties, improved handling of single meaning G-code words claimed by user M-codes. 2024-09-07 18:44:45 +07:00
Terje Io
7ade244a78 Improved handling of extended M commands (plugin based) command words.
Fixes issues for programs containing extended M-codes using single meaning words (which they as a rule should not do).
Added core support for spindle encoder binding to spindles.
Added sorting of spindle report: enabled spindles are sorted first in order of spindle number, disabled by type then spindle id.
Changed realtime report to report spindle number instead of spindle id on changes in the |S: element.
2024-08-12 15:46:58 +02:00
Terje Io
8b9b7859ee Limited tool change probe moves to be within machine limits. Ref. issue #542.
Added setting $358 to enable experimental functionality for fast rotary 'rewind' to stored G28 position.
Return move should complete in half a rotation or less.
For developers: added option to redirect debug via driver provided function when DEBUGOUT is set to -1 in config.h. Ref. issue #545.
2024-07-19 09:49:46 +02:00
Terje Io
21329cd03f "Hardened" NGC parameter name case swapping.
Changed to use float precision according to metric/inches setting for parameter reporting.
2024-05-27 13:39:30 +07:00
Terje Io
299eab7f27 Added experimental support for M70-M73, save and restore of modal state.
Added experimental support of LinuxCNC style subroutines.
Available for gcode run from local filesystem such as on a SD card or in littlefs.
Improved handling of G92 when G92 offset is changed while motion is ongoing. Ref. issue #241.
Fix for issue #521, crash when running G65 macro on ESP32.
"Hardened" stream switching code, likely fix for discussion #456.
2024-05-26 17:12:08 +07:00
Dietz0r
0b69f6fb40 Merge branch 'grblHAL:master' into master 2024-05-23 13:41:43 +02:00
Terje Io
c6aeef14cf Added config to enable NGC parameter reporting, default on. 2024-04-27 23:33:33 +02:00
Terje Io
3a7a65ea7c Now reports WCO along with radius/diameter mode changes. Ref. issue #500. 2024-04-25 20:49:03 +02:00
Terje Io
e192ec566b Fix for bug/compiler warning. Ref. discussion #492.
Fix for broken initialization of wall plotter machine properties.
2024-04-20 11:51:54 +02:00
Dietz0r
2ec344e750 Merge branch 'grblHAL:master' into master 2024-04-02 16:50:35 +02:00
Terje Io
5afac36157 Added capability flags to HAL for all coolant outputs.
Hide related settings when no spindle and/or coolant outputs are available. From PR #479.
Fixed typo related to Modbus direction signal. Ref. issue #478.
Fixed typo in handling of aux output port settings. Ref issue #476.
2024-03-30 21:08:48 +01:00
Terje Io
d9ed1bd89c Added missing null spindle handler for ESP32, issue #473.
Fix for unable to set $484 to 0, issue #466.
Added setting $673 for setting coolant on delay after feedhold. Available when safety door handling is not enabled.
Fixed obscure bug carried over from legacy Grbl related to this. Issue #467.
Enabled setting $394 for spindle on delay after feedhold. Available when safety door handling is not enabled.
2024-03-28 14:55:05 +01:00
Terje Io
7cf86877f0 Changed signature of grbl.on_homing complete event to include the cycle flags.
Added definitions for up to four additional digital aux I/O ports.
Added real time report of selected spindle in multi spindle configurations. Reported on changes only.
Removed limits override input invert config, for safety reasons it is always active low.
Added HAL entry points for second RGB channel, renamed first from hal.rgb to hal.rgb0.
Added option to setting $22 to force use of limit switches for homing when homing inputs are available in the driver/board combo.
Improved handling of aux I/O pins when claimed for core functions.
Added flag to $9 for disabling laser mode capability for primary PWM spindle. Allows leaving laser mode enabled when a secondary PWM spindle is available and this is used to control a laser.
Added some generic setting definitions for stepper drivers, currently used by the motors plugin.
2024-03-19 20:32:40 +01:00
Terje Io
06f442643a Tentative fix for lathe CSS/feed per rev modes (G96/G95), ref discussion #450.
Fixed incorrect reporting of feed rate modes in $G response.
Added some ioPorts call wrappers, full support for reconfiguring output auxillary pins for PWM output.
2024-02-28 17:36:17 +01:00
Terje Io
8fa4535444 Fixed typo preventing lathe mode UVW builds.
Added initial support for using auxillary output pin pool for spindle and coolant pins.
2024-02-26 21:11:48 +01:00
Dietz0r
fa6d5089ac Merge branch 'grblHAL:master' into master 2024-02-25 15:05:45 +01:00
Terje Io
068e6d37b1 Fixed compiler warning for compatibility level > 1, added some "just in case" assertions. 2024-02-02 14:03:27 +01:00
Terje Io
b200199612 Internal changes that may affect developers, see the changelog for details. 2024-01-26 11:14:39 +01:00
Terje Io
f0ef77435e Enhanced RGB and ioports APIs.
Allowed use of unused (by the core) axis words (ABCUVW) in M-code commands implemented by plugin code.
Added $PINSTATE command, for outputting auxillary pin states, modes and capabilities. Machine readable formatting.
2024-01-24 18:38:08 +01:00
Dietz0r
f6bf39c52c Updated AccelerationProfile implementation to not alter settingsvalues 2024-01-10 23:27:45 +01:00
Dietz0r
9f95af13a2 Encapsulated G-Code Function with compiletime option 2024-01-04 00:33:10 +01:00
Dietz0r
4cc7aaf171 Added compiletime check for added acceleration profile code 2024-01-04 00:30:18 +01:00
andrew_marles
dec93aa379 Fixed some typos and syntax errors. 2024-01-02 09:38:02 -08:00
Dietz0r
299a7cd1aa Calculation adjustment for G187 2024-01-02 16:20:59 +01:00
Dietz0r
554812d5f1 Unittype and Brackets Hotfix for G187 2024-01-02 15:45:05 +01:00
Dietz0r
4c28e42078 Implemented preliminary G187 support for up to 5 Profiles 2024-01-02 15:35:18 +01:00
Terje Io
57243a0fc2 Fixed regression that prevented builds with compatibiliy level set > 1.
Added [SIGNALS:xxx] element to the $I output.
2023-12-29 19:33:27 +01:00
Terje Io
5bd4835b69 Refactored canned cycles to better match how LinuxCNC actually implements them. Ref. ioSender issue 348.
NOTE: The implementation may still be incorrect - use with care!
2023-12-16 16:11:46 +01:00