Skip to content

Commit ffbb091

Browse files
authored
Merge pull request #2451 from zz912/patch-16
Carousel.comp - added debounce for jog
2 parents 1fd27d0 + 425af35 commit ffbb091

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)