diff --git a/uCNC/src/core/motion_control.c b/uCNC/src/core/motion_control.c index 321c2f1a6..2d14bddca 100644 --- a/uCNC/src/core/motion_control.c +++ b/uCNC/src/core/motion_control.c @@ -1008,8 +1008,10 @@ uint8_t mc_incremental_jog(float *target_offset, motion_data_t *block_data) new_target[i] += target_offset[i]; } +#if TOOL_COUNT > 0 block_data->motion_flags.reg = g_planner_state.state_flags.reg; block_data->spindle = g_planner_state.spindle_speed; +#endif uint8_t error = mc_line(new_target, block_data); diff --git a/uCNC/src/hal/tools/tool.c b/uCNC/src/hal/tools/tool.c index cec7d684a..05a0ec092 100644 --- a/uCNC/src/hal/tools/tool.c +++ b/uCNC/src/hal/tools/tool.c @@ -27,9 +27,13 @@ #if TOOL_COUNT == 1 #define tool_current TOOL1 #else +#if TOOL_COUNT > 0 static tool_t tool_current; #endif +#endif +#if TOOL_COUNT > 0 static int16_t tool_current_speed; +#endif #ifdef TOOL1 DECL_TOOL(TOOL1);