616 Commits
Author SHA1 Message Date
Terje Io 546c6f9f5f Updated changelog. 2026-08-14 10:06:40 +02:00
Terje Io 553c501f35 Added option to setting $63 to set spindle RPM to minimum (typically 0) on feed hold. Ref. issue #991.
Fixed reset (abort) not turning off laser in some circumstances.
2026-08-13 18:47:32 +02:00
Terje Io 29b7471fe5 Fixed typo in last commit 2026-08-11 08:25:35 +02:00
Terje Io 6523e08de8 Moved compile time option ROTARY_FIX to setting $701 with option for
reverting imperial to metric conversion for angular moves.
Ref. PR#979 and discussion #241.
Added hooks for future G33.1 rigid tapping cycle implementation.
Added lathe tool parameters front angle, back angle and orientation
to tool data when lathe UVW option is enabled. Currently unused.
2026-08-11 08:15:08 +02:00
Terje Io 5848a84179 Removed include path element. 2026-08-05 08:38:41 +02:00
Terje Io b34eabe28f Moved RAM filing system from networking plugin here, added support for more operations.
Added hooks for future G70-G72 lathe cycles implementation.
ome general improvements.
2026-08-05 08:13:26 +02:00
Terje IoandGitHub 306bf68d52 Merge pull request #999 from ScottW514/fix-null-on-settings-changed
gcode: guard NULL chained on_settings_changed in onSettingsChanged
2026-08-04 06:36:24 +02:00
ScottW514andScottW514 0f333a60bf gcode: guard NULL chained on_settings_changed in onSettingsChanged
gc_init subscribes to grbl.on_settings_changed by capturing the previous
handler to chain it. When no plugin or driver has subscribed before the
first gc_init, the captured pointer is NULL and the chained call in
onSettingsChanged dereferences it - every runtime $-setting write then
crashes on drivers with no other subscriber (observed live with the
Simulator). The core dispatcher already NULL-checks its own pointer;
this adds the same guard to the chained tail.
2026-08-03 06:05:03 -04:00
Terje Io beea3fe8e2 Updated changelog. 2026-07-29 13:15:46 +02:00
Terje Io 644c605b3d Forgot to update build date, "hardened" code. 2026-07-26 20:22:35 +02:00
Terje Io 35431d1bd3 Fix for M3 enabled laser turned off on feed hold when $63 option Disable laser during hold is off. Ref. issue #991.
Improved handling of some VFS file system actions (unlink, mkdirv and rmdir), added support for truncate.
Changed some kinematics API function signatures for readability/debugability.
The ioports implementation has been changed to allow for consecutive pin numbers for external (expander based) I/O. See changelog for details.
2026-07-26 08:21:33 +02:00
Terje IoandGitHub 8913dd41e7 Merge pull request #994 from engigeer/PR_report_overrides_on_reset
Fix for reporting of updated overrides on reset
2026-07-26 07:47:43 +02:00
Mitchell Grams f1db0ce705 Fix for reporting of updated overrides on reset 2026-07-23 13:59:51 -06:00
Terje IoandGitHub b9a05f146b Merge pull request #990 from 94xhn/fix/vfs-fs-stat-buffer-overflow
Fix stack buffer overflow in vfs.c fs_stat()
2026-07-21 21:23:27 +02:00
yi chen 77027abbb9 Fix stack buffer overflow in vfs.c fs_stat()
fs_stat() builds the path it looks up with strcat(strcpy(path, "/"),
filename) into a fixed char path[64] on the stack, with no check that
"/" + filename actually fits. Any filename of 63 bytes or more (very
easy to hit with a normal nested SD/LittleFS path, or over FTP/WebDAV/
the WebUI file browser once a network plugin is enabled) overflows the
stack buffer.

This is the exact same class of bug just fixed elsewhere in this file
(PR #986 / commit c84cda0, "correctly handle long working directory
paths") for parse_path() and vfs_chdir(), but fs_stat() itself wasn't
touched by that change and still has the raw fixed-size buffer.

Fix it the same way the recent VFS work handles long names elsewhere:
keep the 64-byte stack buffer for the common short-path case, and fall
back to a heap allocation sized to the actual path when it doesn't fit,
instead of silently overflowing.

Verified with a standalone harness that reproduces fs_stat()'s buffer
layout: filenames up to 62 bytes behave unchanged, 63+ bytes overflow
adjacent stack memory in the original code and eventually crash the
process for larger inputs, and no longer touch anything past the
buffer with the fix (heap path used exactly when the stack buffer
would not fit, freed exactly once, no leaks).
2026-07-21 00:08:54 +08:00
Terje Io c84cda0430 Updated VFS to correctly handle long working directory paths that would otherwise lead to buffer overflows.
Ref. PR#986 which is a partial fix.
Updated named O calls to allow name lengths only limited by available heap.
Ref. PR#989 which likely would return an error on overly long names and would potentially execute incorrect code if not.
2026-07-19 22:48:45 +02:00
Terje IoandGitHub 70ae0c1f50 Merge pull request #984 from stevenrwood/fix/g54-rotation-second-axis-double-offset
gcode: fix ROTATION_ENABLE 2nd-axis offset double-applied on rotated G54 moves
2026-07-18 22:18:26 +02:00
Terje IoandGitHub dd2131e4ae Merge pull request #985 from gcormier/fix-modbus-adu-bounds
Validate Modbus frame size before writing the ADU buffer
2026-07-18 20:34:52 +02:00
Terje Io b9f96d66ea Changes to VFS API signatures to aid improved handling of file system formatting.
Now turns off spindle(s) on spindle related settings changes.
2026-07-18 11:14:47 +02:00
Greg Cormier ee71df957a Validate Modbus frame size before writing the ADU buffer
modbus_message wrote register values into the fixed-size adu[] buffer
before any length validation; the only size check runs later in
modbus_send_rtu. A register count above MODBUS_MAX_REGISTERS overran
both the caller's values[] array and adu[], and even a multi-register
write within the register limit could exceed MODBUS_MAX_ADU_SIZE and
write past the buffer.

Reject requests exceeding MODBUS_MAX_REGISTERS, and reject multi-register
write frames larger than MODBUS_MAX_ADU_SIZE, before any adu[] write.
Single-register reads and writes are unaffected.
2026-07-13 19:22:26 +00:00
stevenrwoodandClaude Opus 4.8 209228086f gcode: fix ROTATION_ENABLE 2nd-axis offset double-applied on rotated G54 XY moves
In the both-rotation-axes branch, bit_false(r_around.mask, bit(idx)) used the stale
outer loop variable idx instead of idx_0. When idx != idx_0, idx_1 (the second
rotation-plane axis) came out wrong, so in the final offset loop that axis was not
recognized as a rotation axis and its WCS offset was applied a second time. Result:
a rotated G54 move with both X and Y present targeted (work + 2x offset) on the second
axis -> false soft-limit (Alarm:2). Reproduced on hardware; only a nonzero WCS rotation
+ a full-plane G54 move triggers it. Fix: clear bit(idx_0).

Upstream grblHAL bug - PR-worthy.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-13 10:58:59 -07:00
Terje Io 09f8ba597a Updated build date for PR#983 2026-07-12 18:16:10 +02:00
Terje IoandGitHub d382892625 Merge pull request #983 from gcormier/bugfix/y2homing
Re-enable both motors after auto squaring offset pull-off
2026-07-12 18:02:30 +02:00
Greg Cormier 321f69c99e Re-enable both motors after auto squaring offset pull-off
Commit 41abd8c dropped the disable_motors() call that restores
SquaringMode_Both after the dual axis offset pull-off move at the end
of homing.

When an auto squared axis has a non-zero $17n offset, homing masks off
one of the two motors for the compensation move and never unmasks it.
The motor stays step-disabled for all subsequent motion until a soft
reset, so the axis moves on one motor only while jogging or running a
program. A negative offset strands the second motor, a positive one
strands the first.

Restore the call so both motors are re-enabled once the pull-off
completes.
2026-07-12 11:35:50 -04:00
Terje Io 2bdfeb12dc Added support for MPG real time command character stream switching for RX only streams. 2026-07-09 21:05:29 +02:00
Terje IoandGitHub f6bc9ef0b8 Merge pull request #977 from stevenrwood/fix/g53-ignore-wcs-rotation
G53 moves incorrectly apply the active WCS rotation/offset (when ROTATION_ENABLE=1)
2026-07-02 08:47:49 +02:00
stevenrwood add866cadc gcode: G53 must ignore the active WCS rotation/offset (when ROTATION_ENABLE=1)
Only affects builds with ROTATION_ENABLE defined; the offending code is inside
#ifdef ROTATION_ENABLE, so default builds are unaffected.

The rotation-transform block was entered for any axis-word motion without
excluding NonModal_AbsoluteOverride, so G53 (absolute machine override) moves
had the active WCS offset added to the plane axes (and were rotated). Per
RS274/NGC a G53 target is in machine coordinates and must ignore all offsets
and rotation.

Symptom: with a non-zero WCS rotation active (e.g. set by G10 L2 R / G68), G53
drives to the rotated work origin instead of the machine target, false-
triggering a soft-limit alarm when that lands outside the machine envelope.

Guard the transform with `non_modal_command != NonModal_AbsoluteOverride`, and
initialise r_axes.mask = 0 so it stays defined when the block is bypassed.
2026-07-01 03:51:13 -07:00
Terje IoandGitHub 26d44fe733 Merge pull request #976 from moustakimhamza/fix/autosquare-abs-truncation
fix: use labs() instead of abs() for int32_t delta in auto-squaring check
2026-06-28 23:45:12 +02:00
Hamza Moustakim 20d69bca3e fix: use labs() instead of abs() for int32_t delta in auto-squaring check 2026-06-28 20:27:17 +01:00
Terje Io 4521e88c0f Fix for asymmetric axis kinematics triggering soft limits when enabled. 2026-06-26 07:27:59 +02:00
Terje Io 03a7dd9572 PR#974 applied.
Added preprocessor logic for handling potentially bad spindle definitions.
2026-06-22 23:05:19 +02:00
Terje IoandGitHub e66e01b8e2 Merge pull request #974 from yevheniisukhominskiy/fix-limit-pins-invert-5
Fix copy-paste bug for Setting_LimitPinsInvertMask ($5)
2026-06-21 07:11:17 +02:00
Yevhenii Sukhominskiy df43e3061a Fix copy-paste bug for Setting_LimitPinsInvertMask ($5) 2026-06-20 20:04:57 +03:00
Terje Io fe7632bb7d Made named O-call LinuxCNC compliant by changing name to lowercase.
Fix for parking motion using `$32` laser mode setting when it should use the current spindle mode.
For developers: changed signature of `hal.stream.on_linestate_changed()` to include stream properties.
2026-06-19 20:56:58 +02:00
Terje Io 41abd8c84d Added kinematics for asymmetric (differing step/mm) ganged or auto squared axis,
claims the highest number axis > Z for the second motor.
2026-06-18 09:17:43 +02:00
Terje IoandGitHub 4fcdbaee11 Merge pull request #962 from gcormier/interlock
Spindle interlock plugin header
2026-06-08 15:38:57 +02:00
Greg Cormier 719dbc542c add spindle interlock plugin 2026-06-05 09:06:59 -04:00
Terje Io b9d79a34c2 Fix for regression affecting step injection code. 2026-06-02 23:46:03 +02:00
Terje IoandGitHub 58e1a60807 Merge pull request #956 from gcormier/newplugins
Add two new plugins
2026-06-02 18:53:15 +02:00
Terje Io 266f0db62d Minor change to shut up some compilers incorrectly warning about a potentially uninitialized variable. Ref. issue #959. 2026-05-28 16:26:34 +02:00
Terje Io 2c67781d8f Update for Web Builder 2026-05-26 09:46:23 +02:00
Terje Io 87033967a0 Allow full circle arcs without axis words. Ref. issue #958. 2026-05-25 07:01:48 +02:00
Terje Io 336a26cbdb Fixed typos that may affect STM32 drivers assignment priority of interrupt capable pins. 2026-05-20 16:07:09 +02:00
Greg Cormier 210501af9c Add two new plugins 2026-05-18 09:24:16 -04:00
Terje Io 26633c9107 fixed copy/paste error... 2026-05-18 12:42:27 +02:00
Terje Io 7c8488d4d5 Reworked feed mode handling (G93-G95), now keeps current feed rate over spindle synced motion. Ref. issue #954.
Added P-word option to G38.x probe commands, use to temporarily switch the probe input when multiple probes are available.
Fixed PWM spindle ramping, did not hit the target RPM.
2026-05-18 11:48:04 +02:00
Terje Io 1c03e111a9 Updated changelog. 2026-05-11 10:26:47 +02:00
Terje Io 728b9c91a2 Setting NGC_PARAMETERS_ENABLE to Off results compiling errors, ref. issue #919.
Changes to allow stepper spindle to use per degree settings, ref. issue 926.
Changes for improved line number reporting for subroutines and branching gcode.
2026-05-06 07:37:13 +02:00
Terje Io d77ef1d3a7 Updated changelog. 2026-04-18 11:11:53 +02:00
Terje Io e56fc8006e Formalized SPI API, added init call for 74HC595 I/O expander.
Fix for G30 not cleared on $RST, added code for syncing parser state on offsets clear. Ref. issue #940.
2026-04-16 09:39:47 +02:00