Skip to content

Commit

Permalink
animation_lib: Return landing points removing
Browse files Browse the repository at this point in the history
  • Loading branch information
goldarte committed Nov 12, 2019
1 parent 68dbf57 commit 39c6a4c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Drone/animation_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 39c6a4c

Please sign in to comment.