Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions lib/python/qtvcp/qt_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions src/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/emc/rs274ngc/gcodemodule.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
12 changes: 8 additions & 4 deletions src/emc/usr_intf/axis/scripts/axis.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions src/emc/usr_intf/gremlin/gremlin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 3 additions & 1 deletion src/emc/usr_intf/gremlin/qt5_graphics.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion tests/gcode-renderer/canon.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading