On Mon, 11 Jan 2021 at 16:51, Andreas Linnarsson <andreas.linnars...@gmail.com> wrote: > > I do understand it's really hard to bugfix without the real hardware.
Try this. case 'I': // index + position. p = current_position; if (homed){ if ( old_index != sense(1) ) if (motor_fwd && sense(1)){ p += 1; if (p > inst_pockets) p -= inst_pockets; } if (inst_dir == 2 && motor_rev && sense(1)) { p -= 1; if (p < 1) p += inst_pockets; } // special case for single-dir latching turrets falling // off the pulse during the latch if (inst_dir == 1 && ! motor_fwd && ! sense(1)){ p -= 1; } } old_index = sense(1); } break; -- atp "A motorcycle is a bicycle with a pandemonium attachment and is designed for the especial use of mechanical geniuses, daredevils and lunatics." — George Fitch, Atlanta Constitution Newspaper, 1912 _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users