LinuxCNC / linuxcnc

LinuxCNC controls CNC machines. It can drive milling machines, lathes, 3d printers, laser cutters, plasma cutters, robot arms, hexapods, and more.
http://linuxcnc.org/
GNU General Public License v2.0
1.79k stars 1.15k forks source link

limit_axis - Don't check range if not enabled #2863

Closed satiowadahc closed 7 months ago

satiowadahc commented 8 months ago

Enable check inside of an error check means if its disabled it'll only disable when there is an error

satiowadahc commented 8 months ago

This is the first I've used this since it was converted to a .comp file.

petterreinholdtsen commented 8 months ago

Do you have a test setup for tests/ to demonstrate the bug and ensure it is fixed?

andypugh commented 8 months ago

I think that this looks deliberate. Is the intention to mask the error before (for example) homing?

satiowadahc commented 8 months ago

The original intent for the enable is regions like tool changers, only allowing the gantry to run into it, if you are actively doing a tool change

andypugh commented 8 months ago

Maybe I am missing something, but this doesn't appear to change any behaviour. It might save a little CPU, I suppose.

satiowadahc commented 8 months ago

If the range is disabled and there is not an error, the range currently will not disable.

Max<min is a sanity check that disables the range if it is mistyped.

Enable allows ranges to be turned on/off