Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/emc/motion/axis.c
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ void axis_handle_jogwheels(bool motion_teleop_flag, bool motion_enable_flag, boo
aaccel_limit = ajog_accel_fraction * axis->acc_limit;
}

new_ajog_counts = hal_get_si32(axis_data->ajog_counts);
new_ajog_counts = hal_get_sint(axis_data->ajog_counts);
delta = new_ajog_counts - axis->old_ajog_counts;
axis->old_ajog_counts = new_ajog_counts;
if ( first_pass ) { continue; }
Expand Down
21 changes: 21 additions & 0 deletions tests/motion/jogwheel-axis/test-ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,23 @@ def jog_axis(axis_letter, counts=1, scale=0.001):
sys.exit(1)


def preset_counts(axis_letter, counts):
# with jog-enable off motion takes the new counts without moving
h['axis-%c-jog-enable' % axis_letter] = 0
h['axis-%c-jog-counts' % axis_letter] = counts

timeout = 5.0
start_time = time.time()
s.poll()
start_beat = s.heartbeat
while s.heartbeat - start_beat < 2:
if time.time() - start_time > timeout:
print("motion heartbeat did not advance")
sys.exit(1)
time.sleep(0.010)
s.poll()


#
# set up pins
# shell out to halcmd to make nets to halui and motion
Expand Down Expand Up @@ -115,5 +132,9 @@ def jog_axis(axis_letter, counts=1, scale=0.001):
jog_axis('y', counts=10, scale=-0.025)
jog_axis('z', counts=-100, scale=0.100)

# counts crossing 2^31 jog by the count difference
preset_counts('x', 2**31 - 2)
jog_axis('x', counts=4, scale=0.001)

sys.exit(0)

Loading