56 Commits

Author SHA1 Message Date
Terje Io
b435b48ec1 Changed real time reporting to allow per connection status for which report elements to output.
Added pragmas to shut up warning from the ESP32 compiler.
2026-02-04 11:28:20 +01:00
Terje Io
64c35930c7 Refactored offset handling, for improved readability and in preparation for rotation support.
Added experimental support for G66 (modal macro call) and G67 (end modal macro call).
Made axis letter to axis/motor assignment for axes ABCUVW freely changeable at compile time.
Fix for some G65 arguments being incorrectly validated for normal use (sign, range).
Added repeat support to G65 macro call via the optional L parameter word.
Changed default setting for ABC-axes to rotary.
Changed defaults for jerk settings to 10x acceleration settings.
Disabled jerk for jog, probe and spindle synchronized motion.
Added _active_probe system parameter, returns -1 if no probe inputs available.
Minor bug fix, G5.1 and G33.1 motion commands were not coverted to the correct string equivalent in $G output.
2026-01-25 07:51:44 +01:00
terjeio
6c59a548ae Final fix for handling of $680 stepper enable delay. 2025-12-07 16:47:19 +07:00
terjeio
13145a4a46 Updated to allow Bluetooth serial streams to be used for MPG/pendants.
Parking mode improvements.
Removed requirement for external encoder for spindle sync if stepper spindle is enabled.
Improved handling of $680 stepper enable delay.
2025-12-01 17:55:53 +07:00
Terje Io
8c3d44bfca Added helper code for plugins claiming auxiliary ports to make plugin coding easier and behaviour consistent.
Some minor bug fixes such as incorrect error code returned for unknown $-commands and temporary incorrect position reporting on in-flight G92 offset changes.
2025-10-11 18:28:21 +02:00
Terje Io
b829928674 Fix for crash when multiple G95 mode motions are commanded. 2025-09-28 07:53:18 +02:00
Terje Io
17a4648a1d Updated motion in units per revolution mode (G95) to handle spindle RPM changes.
Changed initial wait for two index pulses to check RPM > 0 before starting such motion.
2025-09-26 09:57:05 +02:00
Terje Io
24d802e573 Fix for bug preventing disabling of AMASS, changed the ADAPTIVE_MULTI_AXIS_STEP_SMOOTHING symbol so it can be overridden via compiler argument.
For developers: added output function parameter to signature of report_realtime_status() call to allow routing output to a given stream (or streams).
2025-09-04 08:36:48 +02:00
Terje Io
02b45f86e5 Fix for corrupted tool table entries not beeing reset. This may happen on resizing the tool table.
Added system parameter _tool_table_size, 0 if a tool table is not enabled.
Removed dependency on safety door input for parking settings: $41, $42, $56-$59, $392 and $393.
Removed strict dependency on spindle encoder input for spindle synced motion,
allows the use of the stepper spindle which has an implicit encoder.
2025-07-31 08:19:07 +02:00
Terje Io
5dae16ad83 "hardened" code related to ioports claiming and PWM2 spindle configuration.
Added API call and expanded one.
2025-07-16 10:58:31 +02:00
Terje Io
b10b3317d2 Fix for custom M-code commands claiming all axis words even when not using any.
Added setting $680 for configuring delay from stepper enable to first dir/step pulse.
Adds to fixed ~2ms delay provided by most drivers.
2025-05-18 08:03:51 +02:00
Terje Io
b41018543b Moved part of the driver based spindle sync code to the core.
Spindle sync now has to be enabled in grbl/config.h.
2025-04-24 22:38:55 +02:00
Terje Io
790cff7036 Increased max number of digital ioports to 24, added some crossbar capabilities (external, async, entry point for setting pin function). 2025-04-07 19:36:50 +02:00
Terje Io
55a9f6a197 "Hardened" new optimized code to ensure initial motion is going in the correct direction.
Fix for feedhold during G33 and G76 synchronized motion not beeing delayed until motion completed.
2025-03-29 09:29:31 +01:00
Terje Io
b737687743 Reduced default step pulse length to 5 microseconds.
Added HAL parameter for minimum step pulse length set by driver, used for validation of $0 setting.
Changed HAL API signature for outputting step pulses, optimized to allow drivers to only change direction outputs when there is an actual direction change.
Improved handling of overrides at end of program when all motion is buffered. Possible fix for issue #714.
Some optimizations to allow higher step rates.
2025-03-28 18:02:56 +01:00
Terje Io
472012e137 Changed $65 setting to flags for allowing feed rate overrides during probing and limiting probe motion to be within machine workspace.
Improved handling of stop realtime command (0x19) for faster motion halt without losing position.
Optimized RAM usage. Fixed regression related to losing current coordinate system and tool offset over a stop.
2025-02-20 10:46:04 +01:00
Terje Io
525a7d322a Fixed issue where aux output commands syncronized with motion was sometimes lost.
Added spindle capability flag for plasma torch and disable of spindle spin up/down delay if set.
2025-02-01 21:50:06 +01:00
Terje Io
0462c97dc9 Changed core tool change routine to play nice with plugins subscribing to probe event. 2025-01-26 07:13:37 +01:00
Dietz0r
ae70c6cbe3 improved deceleration ramp behaviour - cleaned up code a bit
Thanks to @Engigneer, @fpq473 for helping figuring this out!
2025-01-08 09:06:00 +01:00
Dietz0r
5312946d7c small update to mm_to_rampend calc 2025-01-07 18:38:30 +01:00
Dietz0r
ca82c9a1e1 moved last_segment_accel to static so values dont get lost between stepper loops, adjusted jerk ramps to grblhal calculations in mm instead of time based calculations. now works with low and very low jerk values.
known issue: decel ramp does not hit 0 speed at end.
2025-01-05 23:57:55 +01:00
Terje Io
e8a0aeea26 Fix for laser incorrectly enabled in laser mode when M3S<n> commanded in G0 and G80 modal states. Ref. issue #644.
Added optional support for 3rd order acceleration (jerk) and G187 gcode. Ref. pull request #593.
2024-12-31 08:48:33 +01:00
Dietz0r
c47e6a356e Debugging and Compiling 2024-12-27 02:45:34 +01: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
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
258be47dcb Fix for random feed hold/cycle start sequence failures. Ref. issue #491. 2024-04-16 10:19:55 +02:00
Dietz0r
fa6d5089ac Merge branch 'grblHAL:master' into master 2024-02-25 15:05:45 +01:00
Terje Io
a912ce47c7 This build has moved the probe input to the ioPorts pool of inputs and will be allocated from it when configured.
The change is major and potentially dangerous, it may damage your probe, so please verify correct operation after installing.

Fix for STM32F4xx issue 161, Ethernet connection unresponsive if USB port not powered.

Enhanced ioPorts interface: New debounce option for input pins that are interrupt capable, currently only possible to enable via plugin code - later to be made available via a $-setting.
Added some wrapper functions for simpler plugin code++

Added simple task scheduler to the core, allows interrupt routines to dispatch jobs to the foreground process, delayed tasks and repeating tasks attached to the 1 ms system timer.
Some drivers and plugins now uses the scheduler for input pin debouncing, regular polling etc. The core uses it for stepper disabling and sleep monitoring.
2024-02-23 22:54:00 +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
Dietz0r
2bef5f7071 adjusted last_segment_accel handling at end of accel ramps 2024-01-11 14:52:30 +01:00
Dietz0r
e645ddbdd9 Added compile time option for jerk controlled motion 2024-01-07 20:58:26 +01:00
Dietz0r
a268962258 Merge branch 'grblHAL:master' into master 2023-12-18 23:42:11 +01:00
Dietz0r
92e750dc05 adjusted end of accel calculation 2023-12-18 23:30:26 +01:00
Terje Io
2c58f0de09 Spindle handling refactoring for improved management and configuration of multiple spindles.
NOTE: this is a relatively large change and may have introduced bugs and/or unintended side-effects. Please report any issues!

Added setting $519 for binding spindle encoder to given spindle in multi spindle configurations.

Added machine readable spindle enumeration report, $SPINDLESH.

Increased default value for setting $398 (number of planner blocs) from 35 to 100 for faster laser engraving.
NOTE: the $398 setting value will not change on an upgrade!
NOTE: STM32F103 builds for the 128K flash variants does not have enough free RAM and will keep 35 as the default value.

Increased allowed number of decimal places from 3 to 5 for $10x stepper step/mm settings. Ref. ioSender issue 346.

Added setting $650 for filing system options. Ref. issue 397.
Currently the following bits are available (depending on the configuration):
0 - Auto mount SD card on startup (1).
1 - Do not add littlefs files when listing the root directory (2).

Added build option for lathe UVW mode.
When enabled UVW words can be used to command relative moves for XYZ without switching to relative mode with G91.
NOTE: This permanently sets lathe mode and disables the $32 mode setting.

There are signature changes to some spindle, ioports enumeration and VFS filing system mount functions.

Added events to allow plugin code to handle tool table data, possibly stored on a SD card.
2023-12-12 09:51:59 +01:00
Dietz0r
418e063b35 Decel Ramp Calculations Updated 2023-10-30 22:08:46 +01:00
Dietz0r
699e94391d Update stepper.c
First experimental checkin for constant jerk motions
2023-10-30 11:38:25 +01:00
Terje Io
d361ef1c9d Delta kinematics improvements. Added setting for base > floor distance, $DELTA command for work envelope info. Still WIP.
Changed signature of grbl.on_homing_completed event.
2023-08-20 19:02:24 +02:00
Terje Io
9e2d7b46b2 Fixed regression related to CSS (Constant Surface Speed for lathes) mode.
Improved stream handling for native USB streams.
2023-06-06 12:45:14 +02:00
Terje Io
750f60ce74 Fixed typos and added grbl.on_gcode_comment event. 2023-05-01 12:01:57 +02:00
Terje Io
71aa2a426c Fix for issue #264, stepper motors not disabled when entering sleep mode.
Fix for recent regression that disabled G7/G8 handling in lathe mode.
2023-03-11 07:56:13 +01:00
Terje Io
0c6233d709 See the changelog for details, changes are relevant for developers only. 2023-02-22 09:19:49 +01:00
Terje Io
04ce2c5c8c Large spindle handling refactoring and enhancement++, see the changelog for more. 2023-02-13 22:14:48 +01:00
Terje Io
fb60b493b5 Added settings, updated settings version to 22. See changelog for details.
Merged defaults.h with config.h, deleted defaults.h and harmonized settings defines.
2023-01-25 21:11:21 +01:00
Terje Io
7f53b2115b Improved handling of laser mode M4 for jogging and motion complete events.
Bug fixes + expanded step/dir map to 8 axes.
2022-09-22 18:45:33 +02:00
luz paz
90fd6ca410 Fix various typos
Found via`codespell -q 3 -L iterm,nd`
2022-08-07 18:56:52 -04:00
Terje Io
dae7d56ab5 Changed spindle handling to allow dynamic spindle registration and support for multiple spindles selectable at run-time.
See the changelog for more info.
2022-03-25 23:01:56 +01:00
Terje Io
27a3d3e1fe See the changelog for details. 2022-01-23 11:10:30 +01:00