Skip to content
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

Bug in homing when an axis uses a pin between 8 and 15 for as step pin #61

Open
mstrens opened this issue Nov 17, 2018 · 2 comments
Open

Comments

@mstrens
Copy link

mstrens commented Nov 17, 2018

When I ask for a homing, Z and Y axis are moving but not the X axis
After looking to the code, I founded a bug.
In my setup, . I use pin 10 as step pin for X axis.
But in file limit.c, in function void limits_go_home(), there is a definition : uint8_t step_pin[N_AXIS];
and after you have : step_pin[idx] = step_pin_mask[idx];
The issue is that step_pin_mask is an array of uint16_t instead of uint__t.
In order to let code works for several cpu, best is ti change the delaration with:
PORTPINDEF step_pin[N_AXIS];
because PORTPINDEF is already uint8_t or uint16_t depending on cpu.

@mstrens
Copy link
Author

mstrens commented Nov 17, 2018

I just tested the solution proposed above but it is not enough.
2 more changes are required:

  • in the same function you must declare
    PORTPINDEF axislock ;
    instead of uint8_t

  • in file system.h, you must declare
    PORTPINDEF homing_axis_lock;
    instead of uint8_t homing_axis_lock;

Then I tested it and it works.

@robomechs
Copy link

ok! I'll add it in 4axis branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants