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.78k stars 1.14k forks source link

If abort homing in limit, then machine on the machine will rehoming itself #2629

Closed yuyue2013 closed 11 months ago

yuyue2013 commented 1 year ago

Here are the steps I follow to reproduce the issue:

  1. in ini file i had setting the home all have sequence, and the limit sensor also use for home
  2. home all, and when have axis in limit then i press esc button to abort homing, then the machine will in limit
  3. check on the override limit, then put on machine. the machine will do home again it self...

This is what I expected to happen:

I want after homing abort in limit, if i override limit and machine on, the machine don't do home itself

It worked properly before this:

This issue present on 2.10

My solution:

in homing.c file have the function: static void base_do_cancel_homing(int jno) i change it to:

  static void base_do_cancel_homing(int jno) {
      if (H[jno].homing) {
          H[jno].home_state = HOME_ABORT;
      }else if(H[jno].joint_in_sequence){
          H[jno].home_state = HOME_ABORT;
      }
  }

then fixed.

andypugh commented 1 year ago

Is this the same as https://github.com/LinuxCNC/linuxcnc/issues/2388 ?

yuyue2013 commented 1 year ago

yes, looks like same

andypugh commented 11 months ago

Thanks for the fix. I will trust you that it works (it looks right)