From 5e5b3b4e5254b6d24454c8eda8125a0ef6c4cdb3 Mon Sep 17 00:00:00 2001 From: Paciente8159 Date: Sat, 11 Nov 2023 22:32:39 +0000 Subject: [PATCH] Apply PR#562 --- CHANGELOG.md | 12 ++++++++++++ uCNC/src/core/parser.c | 9 +++------ uCNC/src/core/planner.c | 4 ++-- uCNC/src/core/planner.h | 2 +- 4 files changed, 18 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 60e58eb75..9ce79adc4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,18 @@ # Changelog +## [1.7.x-bugfix] + +### Changed + +- modified UART ISR name to be seamless between Uno and Mega (#556) + +### Fixed +- fixed software bound checking with option SET_ORIGIN_AT_HOME_POS enabled (#541) +- fixed system menu variable incorrect types for some settings (#539) +- fixed coolant planner mask update control and removed deprecated coolant pin assert (#562) + + ## [1.7.6] - 17-10-2023 ### Changed diff --git a/uCNC/src/core/parser.c b/uCNC/src/core/parser.c index 7da559690..1bdd70fff 100644 --- a/uCNC/src/core/parser.c +++ b/uCNC/src/core/parser.c @@ -2340,20 +2340,17 @@ static uint8_t parser_mcode_word(uint8_t code, uint8_t mantissa, parser_state_t case 6: new_group |= GCODE_GROUP_TOOLCHANGE; break; -#if ASSERT_PIN(COOLANT_MIST) case 7: -#endif -#ifdef M7_SAME_AS_M8 - case 7: -#endif case 8: +#ifdef ENABLE_COOLANT cmd->groups |= GCODE_GROUP_COOLANT; // word overlapping allowed -#if ASSERT_PIN(COOLANT_MIST) +#ifndef M7_SAME_AS_M8 new_state->groups.coolant |= ((code == 8) ? M8 : M7); #else new_state->groups.coolant |= M8; #endif return STATUS_OK; +#endif case 9: cmd->groups |= GCODE_GROUP_COOLANT; new_state->groups.coolant = M9; diff --git a/uCNC/src/core/planner.c b/uCNC/src/core/planner.c index 3387506ac..628fe4fc7 100644 --- a/uCNC/src/core/planner.c +++ b/uCNC/src/core/planner.c @@ -509,8 +509,8 @@ void planner_sync_tools(motion_data_t *block_data) { #if TOOL_COUNT > 0 g_planner_state.spindle_speed = block_data->spindle; - g_planner_state.state_flags.reg &= ~STATE_COPY_FLAG_MASK; - g_planner_state.state_flags.reg |= (block_data->motion_flags.reg & STATE_COPY_FLAG_MASK); + g_planner_state.state_flags.reg &= ~TOOL_STATE_COPY_FLAG_MASK; + g_planner_state.state_flags.reg |= (block_data->motion_flags.reg & TOOL_STATE_COPY_FLAG_MASK); #endif } diff --git a/uCNC/src/core/planner.h b/uCNC/src/core/planner.h index fddb81d45..6e181705f 100644 --- a/uCNC/src/core/planner.h +++ b/uCNC/src/core/planner.h @@ -37,7 +37,7 @@ extern "C" #define PLANNER_MOTION_EXACT_STOP 64 #define PLANNER_MOTION_CONTINUOUS 128 -#define STATE_COPY_FLAG_MASK 0x1F +#define TOOL_STATE_COPY_FLAG_MASK 0x78 typedef motion_flags_t planner_flags_t; typedef struct planner_block_