Skip to content

Commit c0f380c

Browse files
committed
need to adjust point count earlier
1 parent f70970d commit c0f380c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

resources/external_control.urscript

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1196,16 +1196,16 @@ while control_mode > MODE_STOPPED:
11961196
elif params_mult[2] == TRAJECTORY_MODE_CANCEL:
11971197
textmsg("cancel received")
11981198
kill thread_trajectory
1199-
request_trajectory_cleanup()
1200-
stopj(STOPJ_ACCELERATION)
1201-
wait_for_trajectory_cleanup()
12021199
# The streaming session, if any, has been forcibly ended; clear
12031200
# the flag so a subsequent stray STREAM_END is a no-op.
12041201
if trajectory_streaming:
12051202
# In streaming mode, a cancel should come with the total count, just like a STREAM_END.
12061203
trajectory_points_left = params_mult[3] - (STREAMING_SENTINEL - trajectory_points_left)
12071204
trajectory_streaming = False
12081205
end
1206+
request_trajectory_cleanup()
1207+
stopj(STOPJ_ACCELERATION)
1208+
wait_for_trajectory_cleanup()
12091209
socket_send_int(TRAJECTORY_RESULT_CANCELED, "trajectory_socket")
12101210
end
12111211
elif control_mode == MODE_SPEEDL:

0 commit comments

Comments
 (0)