[ create a new paste ] login | about

Link: http://codepad.org/xbagqM7N    [ raw code | fork ]

Plain Text, pasted on Aug 20:
    def home_all_axes(event=None):
        if not manual_ok(): return
        ensure_mode(linuxcnc.MODE_MANUAL)
        isHomed=True
        for i,h in enumerate(s.homed):
            if s.axis_mask & (1<<i):
                isHomed=isHomed and h
        doHoming=True
        if isHomed:
            doHoming=prompt_areyousure(_("Warning"),_("Axis is already homed, are you sure you want to re-home?"))
        if doHoming:
            c.home(-1)
            isHomed=True
            for i,h in enumerate(s.homed):
                if s.axis_mask & (1<<i):
                    isHomed=isHomed and h
            if isHomed:
                c.wait_complete()
                # clear G54 offset
                commands.clear_offset(1)
                # clear G55 offset
                commands.clear_offset(2)


Create a new paste based on this one


Comments: