Commit Graph

17 Commits

Author SHA1 Message Date
Terje Io
adba5d031c Refactored M70-M73 modal state handling, should now be fully compatible with LinuxCNC behaviour.
Added ADC/DAC resolution to $pinstate command, changed reported values to integer for ADC/DAC devices and float formatted for PWM devices.
Numeric settings can now be set via G65P1Q<n>S<value>, <n> is the setting number, <value> is the new value.
Changed alarm code for Modbus exceptions (communication errors) from 14 to 19.
Refactored MPG stream code to allow plugins to hook into MPG streams (via event handler).
Added _free memory system parameter, returns value in KBytes or -1 if not available from driver.
Changed basic stream data type from char to uint8_t, added HAL function and core API for releasing/closing UART streams.
2025-11-08 07:52:01 +01: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
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
efe4245a06 "hardened" task deregistration code and changed signature of setting available and ioport_find_free() calls.
Some low-level ioport improvements, added definition for virtual pins/ports.
Deprecated direct access to number of the different ioport ports in hal.port struct, use ioports_unclaimed() instead.
2025-01-14 17:13:56 +01:00
Terje Io
b80cd2f3f8 Changed error code reported when file not found for G65 macro or named O-sub calls from 39 to 84.
Removed IDLE state requirement for executing G65 macros, an error will no longer be returned and the macro will be run.
Added event handler for outputting welcome message on "native" USB connect for drivers that provides the linestate changed event.
2025-01-05 08:18:52 +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
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
acaea365cd Added setting $486 that allows locking G59.1 - G59.3 coordinate system offsets against accidental changes. 2023-09-17 09:51:58 +02:00
Terje Io
ce7c3592b4 Added experimental support for program flow control, mainly available for use in G65 macros stored on SD card or in littlefs. 2023-05-29 00:46:05 +02:00
Terje Io
c652eee852 Now allows some $-commands while critical events are active or in sleep mode.
Added work envelope data to global sys struct, used by soft limits and jog limit handling.
2023-04-29 15:53:46 +02: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
b0d9e9e78a Fix for issue #209, incorrect handling of homing of more than one auto squared axis in each pass.
Error 55 will now be returned.
2022-10-23 07:27:20 +02:00
Terje Io
26fa15a990 Added authentication related error codes and messages. Added reboot required per settings to various reports. 2022-07-26 17:43:16 +02:00
Terje Io
f88b154b96 See changelog for details. 2021-11-28 16:52:00 +01:00
Terje Io
fc0f9ecf75 Fixed silly typedef mistake in setting struct, added settings $392 and $393 for spindle and coolant startup delays on safety door open. 2021-11-22 10:26:56 +01:00
Terje Io
71dc5ac333 Changed safety door/parking handling to be compliant with legacy Grbl.
Added $384 setting for controlling G92 offset persistence.
Improved $help command output and handling.
Moved the optional tool table in non-volatile storage.
Added gcode parameter support and optional expression support.
2021-09-29 10:22:47 +02:00
Terje Io
415886e53b Improved HAL/core stream handling etc. 2021-09-09 19:19:09 +02:00