machinekit / QtQuickVcp

A Virtual Control Panel for Machinekit written in Qt/C++/QML
Other
129 stars 75 forks source link

Distance scale not required when printing slider values #69

Closed dkhughes closed 8 years ago

dkhughes commented 8 years ago

The values from the sliders are already in the correct units, no need to scale according to their ratio with mm.

machinekoder commented 8 years ago

@dkhughes Do you use inch or mm as machine units?

dkhughes commented 8 years ago

I'm using inches.

Edit: Well, I use both actually, but the inch version is where I've hit some minor bugs.

machinekoder commented 8 years ago

Okay, I have not tested QtQuickVcp with inches as machine units so far. It would be great if you could try out the various combinations (machine units + G20/G21 active).

dkhughes commented 8 years ago

Good point. I'm not sure how linuxcnc publishes units when changing G20/G21, but I bet we will have to look at the mode, and the underlying machine units to figure out conversions at the gui.

I will test this out soon and report back hopefully with working patches.

machinekoder commented 8 years ago

Machinekit reports units in two places:

Machine units are defined in the INI file, program units by the interpreter when executing G20/G21.

I have tested QtQuickVcp with using mm as machine units.

dkhughes commented 8 years ago

The addition of machine units to the helper coupled with the current interpreter units seems to fix this issue. I will clean up a branch that will merge and resubmit a new PR.