Skip to content

gladevcp: fix velocity DRO row position on non-lathes - #4444

Open
grandixximo wants to merge 1 commit into
LinuxCNC:masterfrom
grandixximo:fix/hal-gremlin-is-lathe
Open

gladevcp: fix velocity DRO row position on non-lathes#4444
grandixximo wants to merge 1 commit into
LinuxCNC:masterfrom
grandixximo:fix/hal-gremlin-is-lathe

Conversation

@grandixximo

Copy link
Copy Markdown
Contributor

hal_gremlin's dro_format computes where to insert the Vel row in the DRO offsets column, and the lathe test guarding that index referenced the bound method rather than calling it:

if self.is_lathe:
    pos +=1

A bound method is always truthy, so every machine got the lathe offset. On a mill the Vel row was inserted one slot too low, below the blank separator that precedes the G5x offset block, instead of directly under the axis rows.

XYZ mill, before:

      X:    1.000
      Y:    1.000
      Z:    1.000

    Vel:   12.500
  G53 X:    0.000  G92 X:    0.000

after:

      X:    1.000
      Y:    1.000
      Z:    1.000
    Vel:   12.500

  G53 X:    0.000  G92 X:    0.000

Lathe output is unchanged. There the blanked X slot plus the inserted Rad/Dia row is exactly what the extra +1 accounts for, so the index lands in the same place before and after.

I checked the rest of the tree for the same pattern; this was the only paren-less self.is_lathe reference.

The lathe test guarding the insertion index in hal_gremlin's dro_format referenced the bound method instead of calling it, so it was always truthy and every machine got the lathe offset. On a mill the Vel row was inserted one slot too low, below the blank separator that precedes the G5x offset block, instead of directly under the axis rows. Lathe output is unchanged, since there the extra offset is what the inserted Rad/Dia row calls for.
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