Commit Graph

290 Commits

Author SHA1 Message Date
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
Terje Io
43d694917c Added basic core support for toolsetter probe, changes $6 (probe input inversion) and $19
(probe input pullup disable) settings from boolean to bitfield when driver support is available.
Added a few default values for settings in config.h, overridable from the compiler command line.
Added core support for per axis pulloff distance, needs plugin for configuring them.
Added HAL flags for disabling settings for MCU input pins pullup disable, may be set by
drivers/boards that has buffered (optocoupled) inputs that is not possible to change.
2024-11-13 17:32:36 +01:00
Terje Io
1444c08997 Added generic passthru support for programming external MCU via USB > UART bridge.
Requires driver support if to be used. Adds $PTRGH system command when available.
2024-11-10 11:39:21 +01:00
Terje Io
7054af825b Updated changelog 2024-11-07 21:04:25 +01:00
Terje Io
81fe93adb8 Removed deprecated stream flags, added stream event for line state (RTS, DTR) changes - initially for USB streams. 2024-11-07 20:44:16 +01:00
Terje Io
f35d14a901 Added init call for new ESP-AT plugin. 2024-10-30 13:34:44 +07: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
99681254f1 Merge pull request #615 from dresco/neopixel
Shift neopixel bit pattern
2024-10-25 20:55:27 +07:00
Jon Escombe
15a4e2ab24 Shift neopixel bit pattern
On some processors, MOSI can be driven to the output level before
the clock is enabled. If the first bit is a 1, this can result in
a longer pulse that is interpreted as a high level by neopixels.

This fix maintains the same inter-bit timings, but ensures the
first bit is always 0. (The last bit is already always zero due
to padding for reset timing requirements).
2024-10-25 12:08:16 +01: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
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
Terje Io
5d6a99c583 Merge pull request #587 from skasti/master
Enable parameter substitution in MSG comments
2024-09-25 20:05:43 +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
c8c77c35e0 Added some new plugin init calls and setting ids.
Added defaults for RGB strip lengths.
2024-09-04 18:27:41 +07:00
Terje Io
7725fab5b8 Simplified keypad and MPG symbol handling. 2024-08-17 22:04:58 +02: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
01142dc30d Merge pull request #565 from Holoratte/master
Bugfix mc_arc multi turns clockwise in motion_control.c
2024-08-05 21:55:35 +02:00
Chris
4e73d9f211 Update motion_control.c
changed to ternary
2024-08-05 20:53:44 +02:00
Chris
277fb75b31 Update motion_control.c
Bugfix mc_arc multi turns clockwise
2024-08-04 18:15:12 +02:00
Terje Io
d2c476deaf Added option bit for enabling realtime reporting while homing to $10, Status report options. Ref. issue #551. 2024-08-01 19:24:00 +02:00
Terje Io
1c1519dfb2 Updated changelog 2024-07-21 22:27:06 +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
5cff12e660 Added printf style debug output function and corresponding macro.
Added grbl.on_report_ngc_parameters event.
Fixed silly mistakes in CAN code.
2024-07-09 19:34:31 +02:00
Terje Io
eb7610cd39 Added soft limits check for corexy kinematics, ref. discussion #536.
Added high level CANbus API for plugin use. Ref. issue #179.
2024-07-07 06:55:24 +02:00
Terje Io
d4c9d21ab2 Some minor changes to better support keypad macro and networking plugins. 2024-06-24 14:29:29 +02:00
Terje Io
9a060d7ea0 Renamed grbl.on_probe_fixture event to grbl.on_probe_toolsetter and added pointer to toolsetter coordinates as an additional parameter.
Increased backlash parameters precision to 5 decimals. Ref issue #452.
Some bug fixes in NGC parameters and flow control handling.
2024-06-19 20:37:30 +02:00
Terje Io
0a86e57ddc Fixed incorrect implementation of EXISTS function. Ref. issue #527.
Added missing clear of parser tool change state when cycle start signal is asserted.
Affects tool change mode 'Normal' ($341=0).
2024-06-04 12:57:17 +07:00
Terje Io
f8e0150c77 Fixed typo/bug in expression precedence handling. Ref. issue #527. 2024-06-02 08:09:46 +07: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
Terje Io
1de8d7b7f0 Fix for homing setting regression. Ref. issue #512 2024-05-13 14:40:26 +07:00
Terje Io
951d5e5bf4 Updated changelog. 2024-05-09 23:23:58 +02:00
Terje Io
4f14f1acf6 Fix for stream regression, improved MPG stream handling. Ref. issue #509.
Added NGC parameter 5599, debug output enabled status.
2024-05-09 22:40:54 +02:00
Terje Io
fed76cf596 Fix for incorrect handling of some flow control statements when nested. Ref. issue #504.
Fixed defaults and added sanity checks for spindle linearization parameters settings.
2024-05-06 12:00:01 +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
Terje Io
a579f71d8b Fix for compiler warning. 2024-04-19 21:39:49 +02:00
Terje Io
258be47dcb Fix for random feed hold/cycle start sequence failures. Ref. issue #491. 2024-04-16 10:19:55 +02:00