Skip to content

Merge branch '2.9' - #4759

Open
grandixximo wants to merge 51 commits into
LinuxCNC:masterfrom
grandixximo:merge-2.9-nov
Open

grandixximo wants to merge 51 commits into
LinuxCNC:masterfrom
grandixximo:merge-2.9-nov

Conversation

@grandixximo

@grandixximo grandixximo commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Merge 2.9 into master. Brings the commits pending since the last merge-up:

One conflict, emctaskmain.cc: enum spelling only, resolved with master's scoped names (EMC_TASK_EXEC::DONE, RCS_STATUS::DONE).

Verified the #2492 repro on the merged tree: a canon missing get_external_length_units raises AttributeError: get_external_length_units, and a raising callback surfaces its own ValueError with the original message.

Second merge adds the 2.9 follow-up #4760 (gremlin, qt5_graphics: catch KeyboardInterrupt on a stopped parse). On top, tests/gcode-renderer: parse_failing catches KeyboardInterrupt too, since a stopped parse now raises it instead of RuntimeError. gcode-renderer and glcanon/interp suites pass locally.

grandixximo and others added 30 commits April 28, 2026 07:37
Auto mode cleared the read-ahead wait on execState==DONE alone, so a
G38 issued just before an emcMotionUpdate snapshot could let the next
read fire while motion.traj.queue was still non-zero, tripping
NCE_QUEUE_IS_NOT_EMPTY_AFTER_PROBING. Add the queue==0 + io.status
==DONE conjuncts already used by mdi_execute_hook.

Closes LinuxCNC#3650, LinuxCNC#662, LinuxCNC#263.
When a Python callback invoked during parse_file raises (for example a canon object missing get_external_length_units), the error exit replaced the pending exception with RuntimeError("parse_file interp_error"), so AXIS and friends could only report that generic message instead of the actual error. The exception is already on the indicator; keep it.

Fixes LinuxCNC#2492.
The conditional tested whether the string "pkg-config libtirpc" is empty, which it never is, so the fallback block ran unconditionally. Use $PKG_CONFIG --exists as intended, and route the block's other pkg-config calls through $PKG_CONFIG too so a cross pkg-config is honored. Behavior is unchanged in practice: without libtirpc.pc the block is now skipped and configure fails later with the same explicit error. Refs LinuxCNC#652.
…empty-probe-2.9

[2.9] task: tighten AUTO read-ahead wait-clear to match MDI
…2-2.9

gcodemodule: report the actual exception from failed canon callbacks
configure: fix libtirpc pkg-config detection
if step was bigger then minimum speed, the math would set the speed
higher not stay at minimum.

Still an issue if minimuim is set to 0, next press will start the spindle
 at default speed.

issue report (LinuxCNC#4688) and code from Martin-HC on github
A Tk scale's set widget command defers the scale's -command until the widget is drawn. axis initialized the max velocity slider and the feed, rapid and spindle override sliders with set, while the window is still withdrawn, and only maps it after the POSTGUI_HALFILE has run. The deferred commands then re-sent the INI max velocity and 100% overrides after postgui, overriding anything halui had been told there, e.g. halui.max-velocity.counts or halui.feed-override.counts set or connected in the postgui file. Later changes of those pins worked because halui only sends on a change.

Set the slider variables instead, which never invoke -command, and send the max velocity explicitly next to the override commands that are already sent at startup. What axis sends at startup is unchanged, it is only sent before the postgui file instead of after it.

Fixes LinuxCNC#4690
axis: send the startup slider values before the POSTGUI_HALFILE runs
Since LinuxCNC#4636 the gcodemodule lets the callback's own exception propagate instead of masking it as RuntimeError. An (AXIS,stop) program raises KeyboardInterrupt, which escaped these Exception-only handlers on file load. AXIS already catches it. Refs LinuxCNC#2492.
gremlin, qt5_graphics: a stopped parse now raises KeyboardInterrupt
Modernize deleted copy constructor and copy assignment.
Mark cppcheck detected duplicate inherited update() method as fine.

Cherry-pick: Only take WHB changes
… no side-effects can occur.

Fix missing dereference in clearing pin reference.
Cherry-Pick: Only WHB
Fixes step 5/10 enable/disable
Changing mode from auto to manual would require the program to stop and just gives unneccesary warnings when trying it anyway
This is not an md file but a hal file
Note: isProgramRunning can not be used due to this is false when paused
* Update pendant.cc

fixed old issue LinuxCNC#987 that wasn't fully patched few versions back
some xhc-whb04b-x pendants send different key for one switch

* Update pendant.h

fixed old issue LinuxCNC#987 that wasn't fully patched few versions back
some xhc-whb04b-x pendants send different key for one switch
Tested by overwriting incoming 0x1c codes by 0x9b in usb.cc
XhcWhb04b6Component should not even include libusb
hdiethelm and others added 17 commits November 1, 2026 18:40
As sugested by Finngineering
The 2.9 merge 2511cf1 took the 2.9 SITEPY line, which falls back
to a hardcoded /usr/lib/python3/dist-packages when neither the
deb_system nor the rpm_prefix scheme exists. On Gentoo that path is
not on sys.path, so the linuxcnc module is not found. Master used to
fall back to the interpreter's default scheme; restore that.

Reported by Alec Ari (NTULINUX).

Fixes LinuxCNC#4717
configure: fall back to the default scheme for SITEPY (2.9 branch)
keyboard_forward() sends key events from an embedded GladeVCP panel to AXIS with python-xlib send_event(), which only queues the request in the client's output buffer. Nothing flushes it until the next round trip, the get_geometry() of the next forwarded key event. A KeyRelease therefore stays queued until another key is pressed, and an AXIS keyboard jog started with focus in the panel keeps running after the key is released.

Flush after each send_event().

The fix was found by Jan (+Jan+ on the LinuxCNC forum).

Fixes LinuxCNC#4839
Raising the Manual tab focuses ".", and the first jog then focuses its axis button. Tk reports that as a FocusOut on "." with detail NotifyInferior, which the binding took for the window losing the focus, so jog_off_all() stopped the jog a fraction of a millimeter in. Ignore NotifyInferior; losing the focus to another application still stops the jogs.
The example on_abort sub labelled reason 5 "machine on", 6 "machine off" and 7 "estopped". Task sends 5 on E-stop reset, 6 on an E-stop request and 7 when the machine is no longer on.

Say that OFF and E-stop requests call on_abort even when the machine is already off or in E-stop, that a machine which was on gets a second call with reason 7, and which reasons an error that stops a program or MDI gives. The example now has a branch per reason saying what it means, and a second example shows a sub that skips the state requests and still cleans up when the machine goes off.

Fixes LinuxCNC#4874
The error for a probe already in the target state said "G38.2 or G38.3" and "G38.4 or G38.5", but only G38.2 and G38.4 get it. G38.3 and G38.5 skip the check, trip at once at the start point and set #5070 to 1. The message made users think the no-error variants abort too.
motion: probe start errors name only the G38 code that gets them
docs: say when on_abort is called and with which reason
axis: the first jog after the MDI tab no longer stops at once
…e-flush

gladevcp: flush forwarded key events to AXIS
…ackport-2.9

xhc-whb04b-6 fixes backport to 2.9
@grandixximo
grandixximo force-pushed the merge-2.9-nov branch 2 times, most recently from d6210dd to 5f59c94 Compare November 24, 2026 07:45
hansfbaier and others added 4 commits November 24, 2026 18:29
sendDisplayData() sent each display block with a timeout of 0, which libusb
reads as "wait as long as it takes". That call runs on the thread that pumps
libusb events, so a receiver that stops completing the transfer freezes the
whole component - jog dial included - while whb.pendant.is-connected stays
TRUE until the receiver is unplugged.

Bound the transfer to 1 s and report the failure through transferFailed, the
flag Usb::process() already watches: it closes the device, sets mDoReconnect,
and the component's outer loop re-enumerates.

The second half is needed. The error branch only set mDoReconnect, which is
read in Usb::init(), and init() is reached only after process() returns, which
needs isDeviceOpen() - that is, deviceHandle - to be null. Nothing on the
display path cleared it, so the loop retried the stalled write once per pass
with the connection still reported healthy. A timed-out IN transfer is an idle
tick and never sets transferFailed either, so a receiver that stops answering
the HID control pipe produced no failure at all.

Checked without hardware, against a stub libusb reporting a phantom receiver
that times the IN transfer out every 750 ms like an idle pendant and returns
LIBUSB_ERROR_TIMEOUT from the control transfer after 40 calls: with the
timeout alone the log is 47 "transmission failed, try to reconnect ..." lines
in 12 s and nothing else; with transferFailed it goes to "connection lost,
cleaning up", the 3 s pause, re-enumeration, claiming the interface and
"enabling reception ... ok". Field test on hardware is still outstanding.
…reconnect

xhc-whb04b-6: bound the display control transfer timeout
# Conflicts:
#	docs/src/remap/remap.adoc
#	src/emc/task/emctaskmain.cc
#	src/emc/usr_intf/gremlin/gremlin.py
#	src/hal/user_comps/xhc-whb04b-6/hal.cc
#	src/hal/user_comps/xhc-whb04b-6/usb.cc
The 2.9 gcodemodule fix in this merge lets the callback's own exception propagate instead of masking it as RuntimeError. parse_failing caught only Exception, which let KeyboardInterrupt escape the stopped-parse tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gcodemodule error reporting broken

7 participants