Added support for MPG real time command character stream switching for RX only streams.

This commit is contained in:
Terje Io
2026-07-09 21:05:29 +02:00
parent f6bc9ef0b8
commit 2bdfeb12dc
6 changed files with 32 additions and 10 deletions
+12
View File
@@ -1,5 +1,17 @@
## grblHAL changelog ## grblHAL changelog
<a name="20260709">Build 20260709
Core:
* Added support for MPG real time command character stream switching for RX only streams.
Drivers:
* RP2040: added support for optional third PIO based UART port. Added tentative map for Bolangsk board.
---
<a name="20260626">20260626 <a name="20260626">20260626
Core: Core:
+10
View File
@@ -139,6 +139,16 @@ axes_signals_t xbar_fn_to_axismask (pin_function_t fn)
return mask; return mask;
} }
bool xbar_fn_for_secondary_motor (pin_function_t fn)
{
return fn == Input_LimitX_2 ||
fn == Input_LimitY_2 ||
fn == Input_LimitZ_2 ||
fn == Input_MotorFaultX2 ||
fn == Input_MotorFaultY2 ||
fn == Input_MotorFaultZ2;
}
// Sets limit signals used by homing when home signals are not available. // Sets limit signals used by homing when home signals are not available.
// For internal use, called by settings.c when homing direction mask is changed. // For internal use, called by settings.c when homing direction mask is changed.
void xbar_set_homing_source (void) void xbar_set_homing_source (void)
+1
View File
@@ -970,6 +970,7 @@ void xbar_set_homing_source (void);
limit_signals_t xbar_get_homing_source (void); limit_signals_t xbar_get_homing_source (void);
limit_signals_t xbar_get_homing_source_from_cycle (axes_signals_t homing_cycle); limit_signals_t xbar_get_homing_source_from_cycle (axes_signals_t homing_cycle);
axes_signals_t xbar_fn_to_axismask (pin_function_t id); axes_signals_t xbar_fn_to_axismask (pin_function_t id);
bool xbar_fn_for_secondary_motor (pin_function_t fn);
const char *xbar_fn_to_pinname (pin_function_t id); const char *xbar_fn_to_pinname (pin_function_t id);
const char *xbar_group_to_description ( pin_group_t group); const char *xbar_group_to_description ( pin_group_t group);
const char *xbar_resolution_to_string (pin_cap_t cap); const char *xbar_resolution_to_string (pin_cap_t cap);
+5 -9
View File
@@ -3051,14 +3051,10 @@ status_code_t gc_execute_block (char *block)
if((axis_words.mask || gc_block.modal.motion == MotionMode_CwArc || gc_block.modal.motion == MotionMode_CcwArc) && axis_command != AxisCommand_ToolLengthOffset) { // TLO block any axis command. if((axis_words.mask || gc_block.modal.motion == MotionMode_CwArc || gc_block.modal.motion == MotionMode_CcwArc) && axis_command != AxisCommand_ToolLengthOffset) { // TLO block any axis command.
#ifdef ROTATION_ENABLE #ifdef ROTATION_ENABLE
axes_signals_t r_axes, r_around; axes_signals_t r_axes = {0}, r_around;
uint_fast8_t idx_0, idx_1; uint_fast8_t idx_0 = 0, idx_1 = 0;
r_axes.mask = 0; // keep defined when the transform is bypassed (jog / G53)
// G53 (absolute machine override) must ignore the active WCS entirely - rotation AND offset. Without if(!(gc_parser_flags.jog_motion || gc_block.non_modal_command == NonModal_AbsoluteOverride) && (r_axes.mask = (gc_block.modal.g5x_offset.data.rotation == 0.0f ? 0 : (axis_words.mask & (r_around.mask = rotate_axes[gc_block.modal.plane_select].mask))))) {
// the AbsoluteOverride guard this block adds the g5x offset to the plane axes, so e.g. "G53 G0 X0 Y0"
// goes to the work origin instead of machine 0,0 (and false soft-limits when that lands out of travel).
// A near-zero garbage rotation (stale NVS after enabling ROTATION_ENABLE) is enough to arm it.
if(!gc_parser_flags.jog_motion && gc_block.non_modal_command != NonModal_AbsoluteOverride && (r_axes.mask = (gc_block.modal.g5x_offset.data.rotation == 0.0f ? 0 : (axis_words.mask & (r_around.mask = rotate_axes[gc_block.modal.plane_select].mask))))) {
if(r_axes.mask != r_around.mask) { if(r_axes.mask != r_around.mask) {
point_3d_t pos; point_3d_t pos;
@@ -3898,7 +3894,7 @@ status_code_t gc_execute_block (char *block)
if(!check_mode) { if(!check_mode) {
bool set_current; bool set_current;
tool_data_t *tool = tool_get_pending(gc_state.tool_pending, NULL); tool_data_t *tool = tool_get_pending(gc_state.tool_pending, NULL);
// If M6 not available or M61 commanded set new tool immediately // If M6 not available or M61 commanded set new tool immediately
+1 -1
View File
@@ -42,7 +42,7 @@
#else #else
#define GRBL_VERSION "1.1f" #define GRBL_VERSION "1.1f"
#endif #endif
#define GRBL_BUILD 20260622 #define GRBL_BUILD 20260709
#define GRBL_URL "https://github.com/grblHAL" #define GRBL_URL "https://github.com/grblHAL"
+3
View File
@@ -664,6 +664,9 @@ FLASHMEM bool stream_mpg_register (const io_stream_t *stream, bool rx_only, stre
if(grbl.on_mpg_registered) if(grbl.on_mpg_registered)
grbl.on_mpg_registered(&mpg.stream, false); grbl.on_mpg_registered(&mpg.stream, false);
if(mpg.write_char)
mpg.stream.set_enqueue_rt_handler(mpg.write_char);
return true; return true;
} }