grblHAL / core

grblHAL core code and master Wiki
Other
304 stars 73 forks source link

Bug with probing 4 axes in motion control.c #470

Closed andrewmarles closed 3 months ago

andrewmarles commented 3 months ago

I think there is small typo here:

https://github.com/grblHAL/core/blob/7cf86877f0a35f7881eb971d495acdc29103660d/motion_control.c#L1019

It looks to me like idx is being decremented twice? So if N_AXIS=4 eventually target[-1] is referenced.

This seems to cause a hardfault with even numbered axis configs. Pretty small fix so not sure it was worth making a whole PR.

Apologies if I am mistaken.

andrewmarles commented 3 months ago

Thanks very much for the fix.