Commit Graph

57 Commits

Author SHA1 Message Date
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
ed2a392dd7 Added _probe2_state system parameter, returns -1 if probe 2 is not available, 1 if triggered and 0 if not.
Fix for hang when G65 sub call level is > 2.
Fix for crash when selecting a tool (with the T command) outside the tool table range.
2025-10-18 20:28:02 +02:00
Terje Io
1d0d7b41a4 Added preprocessor code and symbols to allow easy assignment of unused/unclaimed limit inputs as auxiliary inputs. 2025-10-12 20:24:35 +02:00
Terje Io
8cf50c2140 Added initial support for TMC2440 in SPI mode.
Thanks to @jebanon for donating drivers for testing.
2025-06-09 22:20:20 +02:00
Terje Io
fc7ec7e219 Completed core support for additional probes (toolsetter, probe 2).
Switched to universal use of aux I/O for many signals, includes reset/ESTop, feed hold and cycle start.
2025-05-29 13:02:10 +02:00
Terje Io
6948b0e117 Added initial/enhanced support for toolsetter and second probe input.
Moved inbuilt G65 macros to the core and added macro G65P5Q<n> for selecting probe.
Added probe id to real time report: |P:<n> will be reported on probe select when more than one probe is available.
Fix for WCO and Ov real time status report elements not beeing reported as they should in some circumstances.
2025-05-15 06:23:17 +02:00
Terje Io
95011b570b Added new ioport capabilities.
Added registration scheme for 3rd party I/O expander plugins.
Fixed minor bug in ioport numbering (P<n>/E<n>) for plugin based ioports.
2025-04-09 11:49:10 +02:00
Terje Io
2d54e34339 Refactored I2C interface definitions, added capabilities flags for run time discovery. 2025-02-28 23:38:55 +01:00
Terje Io
9ed8d488f8 Added vfs_chmod() to VFS (Virtual File System), for setting basic file attributes.
Changed signature of vfs.on_mount() event.
Added grbl.on_cycle_start() event, fired on cycle start signal asserted or on cycle start real time command received.
2025-02-25 20:55:59 +01:00
Terje Io
22a8a08a95 Fixed inconsistent handling of auxiliary port numbers when claiming from plugins.
New API call added related to this.
2025-01-09 12:17:25 +01:00
Terje Io
2952a3eeb9 Added directory (mounts) listing capabilities to the default root file system when no real root file system (SD card) is mounted. 2024-12-19 11:34:11 +01:00
Terje Io
50a7507f6f Added preprocessor support for moving coolant outputs to auxiliary pool. Some minor bug fixes and code cleanup.
Those who have custom board maps must update pin assignments accordingly when updating to this or later versions.
2024-12-17 16:10:20 +01:00
Terje Io
a41790dada Revised core setting structures, changed from 8-bit to 16-bit CRC checksums for improved detection of corruption/version mismatches.
Added option to homing enable setting ($22) for per axis homing feedrates.

!! Backup and restore settings over an update is recommended since all settings will be reset to default. Any odometer data will also be lost.
2024-12-09 19:24:20 +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
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
7725fab5b8 Simplified keypad and MPG symbol handling. 2024-08-17 22:04:58 +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
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
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
e5d088eda7 Added core support for new MPG mode that claims one serial stream and uses the 0x8B real-time command character for switching mode.
Moved RGB API definitions to separate file and added some utilities for drivers and plugins. Fixed minor bug.
stream_open_instance(), signature change - added optional description string.
2024-02-05 23:39:27 +01:00
Terje Io
4a7090d70a Fixed regression mainly affecting WebUI enabled builds. Some internal changes. 2024-01-27 20:17:42 +01:00
Terje Io
6afe6d1a7c Fix for issue #426, decreasing the $30 setting value (max spindle RPM) causes incorrect PWM output.
Implemented handling of single block, block delete and optional stop disable control signal events.
Added help for $S (single block), $B (block delete) and $O (optional stop disable) commands.
Added optional HAL entry point for outputting WRGB values to lights such as neopixels.
Improved $-commands registration to make it easier to add help text.
2024-01-12 13:49:36 +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
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
Terje Io
257093b2a1 Fixed some typos that may cause compiler warnings.
Added initial secondary stepper driver code to be used for plasma THC and possibly later for stepper driven spindles.
2023-10-02 10:22:18 +02:00
Terje Io
70ffca3c0a Hardened" serial stream registration, now allows empty descriptor.
Now returns no data for alarm and error enums when firmware is compiled for 128K versions of the STM32F1xx MCU.
This frees up some flash space for plugins etc.
2023-09-26 09:54:10 +02:00
Terje Io
be9f7db33e Moved kinematics implementations to separate folder and added initial implementation of delta and polar kinematics.
NOTE: Delta and polar kinematics is WIP (work in progress) and incomplete.
Feedback is required as I do not have machines at hand for testing.
Ref. issue #341 and #346.
2023-08-18 18:02:31 +02:00
Terje Io
0c6f3f6dd7 Added support for traversing directory structure across file system mounts. Allows access to littlefs mount via ftp.
Fixed inconsistent (random) real-time reporting of cycle start signal by adding a latch to ensure it is reported at least once.
2023-07-16 13:03:22 +02:00
Terje Io
8c7f841840 Added virtual Modbus API. Some internal settings handling improvements. 2023-06-13 19:47:02 +02:00
Terje Io
882f4f1c53 Added preprosessor symbol handling for embroidery plugin. 2023-03-16 14:33:49 +01:00
Terje Io
b55386cbf6 added default network setting values for wifi station mode 2023-03-03 19:27:30 +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
d77f2fa7d3 Minor bug fix, preprocessor tuning. 2022-10-28 20:06:52 +02:00
Terje Io
893f0de66a Fix for issue #191, allow homing of rotary axes with infinite rotation (max travel = 0)
Added spindle type property to HAL, "hardened" code.
Added new setting $346 for action to take after tool change: either return controlled point (tool tip) back to the same position as before the M6 command (default) or move spindle to Z home.
2022-10-21 11:50:00 +02:00
Terje Io
6e22a074c8 Added optional string pointers to HAL for driver and board URLs. If present they are announced by the SSDP protocol. 2022-10-07 10:17:07 +02:00
Terje Io
229db6418b Minor options preprocessor change for littlefs, "hardened" VFS code. Core build date not changed. 2022-09-11 20:37:47 +02:00
Terje Io
f3363816c2 Tuning, VFS improvements. 2022-09-03 21:51:01 +02:00
Terje Io
0db09ab6e9 Deprecated setting $7 (can be set as before but is no longer reported). Added setting $9 for PWM spindle options. 2022-07-04 14:10:39 +02:00
Terje Io
4ff8f1c5e7 Added a MPG mode option for using input pin for mode switching when enabled together with keypad plugin.
Added pin descriptions for UART pins used for MPG.
2022-02-17 09:01:02 +01:00
Terje Io
27a3d3e1fe See the changelog for details. 2022-01-23 11:10:30 +01:00
Terje Io
e9a5e9cbde clear homed status for axis that has max travel changed 2022-01-14 21:09:00 +01:00
Terje Io
22e0fcba1c Added optional spindle select event to core events, for dual spindle enabled configurations (VFD + PWM spindle).
Attempted fix for weird issue with VFD spindle when spindle at speed tolerance is set > 0 with $340.
2022-01-09 22:11:57 +01:00
Terje Io
0aeb53883b Moved and enhanced handling of pendant serial stream (MPG) to core. Added some new stream handling functions.
Added real time command character 0x8B for toggling MPG stream on/off.
Fix for issue #104
2022-01-05 20:13:41 +01:00
Terje Io
dcdc3ef1ed Added function for connecting via specified serial port.
Changed internals to allow further VFD spindle drivers to be added.
2021-12-23 13:21:41 +01:00
Terje Io
f88b154b96 See changelog for details. 2021-11-28 16:52:00 +01:00
Terje Io
0c47a688b5 Enhanced ioports API, fix for issue #87 ++ 2021-11-17 07:22:35 +01:00
Terje Io
f306bfa598 Renamed default hostnames and device names, added some HAL extensions and hardened code a bit. 2021-11-09 15:24:52 +01:00
Terje Io
82d42f4fa4 Fixed variable name typo, renamed hal.stream.disable to hal.stream.disable_rx 2021-11-01 08:40:55 +01:00