New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When switching jog units from in/mm, convert feed rate and step size units too #1010
Comments
@winder the changes I've made may not have been optimal and I need your input on how to proceed. I thought that it would be a good idea to have the controller return coordinates in any unit it liked and then have the GUI convert it to the user preferences. I think that this is working pretty well in my tests:
As far as for the coordinates I think this works. But with the feed rate there is no gcode state telling me the unit for the speed. I can think of one way to solve this by having a special data type for speeds that also includes the unit "mm/min" or "inch/min". Then the controller implementation should be responsible for setting these unit types when returning the speed (In GRBL we could use the setting $13 and in TinyG it's reported in the status report). I did notice a bug in the visualiser for the machine boundaries (soft limits) when changing the $13 to inches. To fix this the coordinates sent to the visualiser module needs what units they are in. I'll look into this later. |
Lots of people have wanted this feature for a long time, I've always left it to the Controller and pretty much ignored the problem in UGS (as you're finding).
These all sound good to me, exactly what I would hope. I think it limits any assumptions the UI needs to make about the controller. I didn't realize that GRBL uses I'm not sure we need a special type for this one since it should change so rarely. The Visualizer doesn't do anything with the feeds other than scaling them up/down by a percentage, so there shouldn't be anything to worry about there. Maybe a speedUnits field could be added to |
The jog command needs to be splitted in the tinyg-implementation according to synthetos/g2#374 |
So it turns out that if you have the Z axis step size set to 5mm, then press the UI button to set units to "inches", then jog Z+ one step, you get a 5 INCH jog.
Flipping that switch should also convert the jog sizes and feed rates so that actual jog travel/rate remains constant after a units switch.
The text was updated successfully, but these errors were encountered: