animation_lib: Return landing points removing

This commit is contained in:
Arthur Golubtsov
2019-11-12 07:18:55 +00:00
parent 68dbf57a79
commit 39c6a4c76a

View File

@@ -144,11 +144,11 @@ def correct_animation(frames, frame_delay=0.1, min_takeoff_height=0.5, move_delt
if abs(corrected_frames[i-1]['z'] - corrected_frames[i]['z']) < move_delta:
break
del corrected_frames[i]
#for i in range(len(corrected_frames)-1,0,-1):
# if (abs(corrected_frames[i-1]['x'] - corrected_frames[i]['x']) > move_delta or
# abs(corrected_frames[i-1]['y'] - corrected_frames[i]['y']) > move_delta):
# break
# del corrected_frames[i]
for i in range(len(corrected_frames)-1,0,-1):
if (abs(corrected_frames[i-1]['x'] - corrected_frames[i]['x']) > move_delta or
abs(corrected_frames[i-1]['y'] - corrected_frames[i]['y']) > move_delta):
break
del corrected_frames[i]
return corrected_frames, start_action, start_delay
# Needs for test