Skip to content

Commit 425af35

Browse files
authored
Carousel.comp - added debounce for jog
Hello, I have machine with ATC encoder without trigger signal. In the past carousel.comp did not work well for my machine. Andy helped me and made debounce for positioning. f6e8d08 Now I am making jog ATC. I solved the encoder reading problem for jog just like Andy solved for positioning.
1 parent 1fd27d0 commit 425af35

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/hal/components/carousel.comp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,12 @@ FUNCTION(_){
471471
old_index = (sense(0) && sense(1));
472472
break; // So that we don't see the tool1 pulse twice
473473
case 20: //jogging fwd/rev
474-
if (current_position != target) return;
474+
if (current_position != target){
475+
deb = debounce;
476+
return;
477+
} else if (deb-- >0) {
478+
return;
479+
}
475480
if (align_dc != 0 && ! align_pin) return;
476481
motor_fwd = 0;
477482
motor_rev = 0;

0 commit comments

Comments
 (0)