Skip to content

gscreen startup crash; joints at rest before entering joint mode - #4968

Open
rene-dev wants to merge 2 commits into
LinuxCNC:masterfrom
rene-dev:motion-rest-gscreen-fix
Open

rene-dev wants to merge 2 commits into
LinuxCNC:masterfrom
rene-dev:motion-rest-gscreen-fix

Conversation

@rene-dev

@rene-dev rene-dev commented Dec 5, 2026

Copy link
Copy Markdown
Member

Two small fixes split out of #4832, as asked in review there. Neither depends on the rest of that work.

  1. gscreen: fix startup crash, use self.inifile for maplinearunits
    units = inifile.maplinearunits(...) in the constructor uses the module-level inifile, which __main__ only assigns after Gscreen() returns, so gscreen fails to start with a NameError. It is self.inifile.
  2. motion: wait for the joints to come to rest before entering joint mode
    In-position is the planner's, but the joints follow it through the cubic interpolators and arrive a few cycles later. Since mode changes are deferred rather than dropped, the change to joint mode took place on the first in-position cycle and took pos_cmd mid-spline. As found in review on task: halui's pins in task #4832, a joint mode request sent during an MDI G0 left the joint short by up to 0.004 mm every time, on master too; an MDI move started from joint mode ended up to 0.0003 mm off in about 1 run in 100. Motion now also waits until the last four points of each joint's cubic agree. A moving external offset never rests, so it doesn't hold the change up.

In position is the planner's. The joints follow it through the cubic
interpolators and arrive a few cycles later. Since mode changes are
deferred instead of dropped, the change to joint mode happened on the
first in-position cycle and took pos_cmd mid-spline, so an MDI move from
joint mode ended up to 0.0003 mm off its target in about 1 run in 100.

Wait until the last four points of each joint's cubic are the same. A
moving external offset never rests, so it does not hold the change up.
@rene-dev
rene-dev force-pushed the motion-rest-gscreen-fix branch from d81ba6b to e1ebb2a Compare December 6, 2026 12:52
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.

1 participant