diff --git a/lib/python/qtvcp/qt_action.py b/lib/python/qtvcp/qt_action.py index 1ef2912d51b..766b081a422 100644 --- a/lib/python/qtvcp/qt_action.py +++ b/lib/python/qtvcp/qt_action.py @@ -580,11 +580,14 @@ def SET_SPINDLE_SLOWER(self, number=0): dir = 1 else: dir = -1 - if abs(cur - (INFO.SPINDLE_INCREMENT * dir)) <= INFO['MIN_SPINDLE_{}_SPEED'.format(i)]: - self.cmd.spindle(dir, INFO['MIN_SPINDLE_{}_SPEED'.format(i)], i) - continue - else: - self.cmd.spindle(dir, abs(cur - (INFO.SPINDLE_INCREMENT * dir)), i) + + min_speed = INFO['MIN_SPINDLE_{}_SPEED'.format(i)] + next_speed = abs(cur) - INFO.SPINDLE_INCREMENT + + if next_speed <= min_speed: + next_speed = min_speed + + self.cmd.spindle(dir, next_speed, i) def SET_SPINDLE_STOP(self, number=0): self.cmd.spindle(linuxcnc.SPINDLE_OFF, number) diff --git a/src/configure.ac b/src/configure.ac index ab8b4a08f53..28bbb825318 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -86,15 +86,15 @@ fi # check for rpc/rpc.h # AC_CHECK_HEADER([rpc/rpc.h],[], [ - if ! test -z "$PKG_CONFIG libtirpc"; then + if $PKG_CONFIG --exists libtirpc; then - LIBTIRPC_CFLAGS=`pkg-config libtirpc --cflags` + LIBTIRPC_CFLAGS=`$PKG_CONFIG libtirpc --cflags` AC_SUBST([LIBTIRPC_CFLAGS]) - LIBTIRPC_LIBS=`pkg-config libtirpc --libs` + LIBTIRPC_LIBS=`$PKG_CONFIG libtirpc --libs` AC_SUBST([LIBTIRPC_LIBS]) - CFLAGS="${CFLAGS:+$CFLAGS }$(pkg-config libtirpc --cflags)" + CFLAGS="${CFLAGS:+$CFLAGS }$($PKG_CONFIG libtirpc --cflags)" fi # Update path diff --git a/src/emc/rs274ngc/gcodemodule.cc b/src/emc/rs274ngc/gcodemodule.cc index f725a708dff..d67c0c554c1 100644 --- a/src/emc/rs274ngc/gcodemodule.cc +++ b/src/emc/rs274ngc/gcodemodule.cc @@ -1091,9 +1091,9 @@ static py::object parse_file(const char *f, py::handle canon, PyErr_Format(PyExc_RuntimeError, "interp_error > 0 but no Python exception set"); } else { - // seems a PyErr_Ocurred(), but no exception was set ? - // so return error info that can be caught and handled - PyErr_Format(PyExc_RuntimeError,"parse_file interp_error"); + // Keep the exception that the failing callback set: overwriting + // it here with a generic RuntimeError hides the actual error + // from the caller (#2492). fprintf(stderr,"!!!%s: parse_file() f=%s\n" "!!!interp_error=%d result=%d last_sequence_number=%d\n", __FILE__,f,parse_state.interp_error,result, diff --git a/src/emc/usr_intf/axis/scripts/axis.py b/src/emc/usr_intf/axis/scripts/axis.py index 1c00b3db1e6..b91d8a03c46 100755 --- a/src/emc/usr_intf/axis/scripts/axis.py +++ b/src/emc/usr_intf/axis/scripts/axis.py @@ -3603,7 +3603,7 @@ def bind_axis(a, b, d): root_window.tk.eval("${pane_top}.jogspeed.s set [setval $jog_speed $max_speed]") root_window.tk.eval("${pane_top}.ajogspeed.s set [setval $jog_aspeed $max_aspeed]") -root_window.tk.eval("${pane_top}.maxvel.s set [setval $maxvel_speed $max_maxvel]") +root_window.tk.eval("set maxvel_slider_val [setval $maxvel_speed $max_maxvel]") widgets.feedoverride.configure(to=max_feed_override) widgets.rapidoverride.configure(to=100) widgets.spinoverride.configure(to=max_spindle_override) @@ -4370,12 +4370,16 @@ def balance_ja(): else: widgets.view_y2.pack_forget() -widgets.feedoverride.set(100) +# Set the slider variables, not the scales: a scale's set defers its +# -command until the window is mapped, after the POSTGUI_HALFILE ran, +# and would override what halui was told there. +vars.feedrate.set(100) commands.set_feedrate(100) -widgets.rapidoverride.set(100) +vars.rapidrate.set(100) commands.set_rapidrate(100) -widgets.spinoverride.set(100) +vars.spindlerate.set(100) commands.set_spindlerate(100) +root_window.tk.eval("update_maxvel_slider_vel $maxvel_slider_val") def forget(widget, *pins): if "AXIS_NO_AUTOCONFIGURE" in os.environ: return diff --git a/src/emc/usr_intf/gremlin/gremlin.py b/src/emc/usr_intf/gremlin/gremlin.py index 84d31c7b5d7..442cf1f5293 100755 --- a/src/emc/usr_intf/gremlin/gremlin.py +++ b/src/emc/usr_intf/gremlin/gremlin.py @@ -373,8 +373,9 @@ def load(self,filename = None): if result > gcode.MIN_ERROR: self.report_gcode_error(result, seq, filename) self.calculate_gcode_properties(canon) - - except Exception as e: + except (Exception, KeyboardInterrupt) as e: + # (AXIS,stop) raises KeyboardInterrupt out of the parse, and it + # is no longer masked as RuntimeError (#2492). print (e) self.gcode_properties = None diff --git a/src/emc/usr_intf/gremlin/qt5_graphics.py b/src/emc/usr_intf/gremlin/qt5_graphics.py index ff129882d8e..c082c1049a2 100644 --- a/src/emc/usr_intf/gremlin/qt5_graphics.py +++ b/src/emc/usr_intf/gremlin/qt5_graphics.py @@ -508,7 +508,9 @@ def load(self,filename = None): self.logger.set_depth(self.from_internal_linear_unit(self.get_foam_z()), self.from_internal_linear_unit(self.get_foam_w())) self.calculate_gcode_properties(canon) - except Exception as e: + except (Exception, KeyboardInterrupt) as e: + # (AXIS,stop) raises KeyboardInterrupt out of the parse, and it + # is no longer masked as RuntimeError (#2492). print (e) self.gcode_properties = None load_result = False diff --git a/tests/gcode-renderer/canon.py b/tests/gcode-renderer/canon.py index 8e20be946fe..5f609bd15bc 100644 --- a/tests/gcode-renderer/canon.py +++ b/tests/gcode-renderer/canon.py @@ -208,7 +208,10 @@ def parse_failing(text, geometry="XYZ", cls=None, limits=None, **kw): canon.parameter_file = var.name try: result = gcode.parse(path, canon, "", "") - except Exception: + except (Exception, KeyboardInterrupt): + # The parse now propagates the callback's own exception + # (#2492); a stopped parse raises KeyboardInterrupt, which + # is not an Exception subclass. pass finally: os.unlink(path)