add comment for stopping the simulation

This commit is contained in:
Göktuğ Karakaşlı
2019-12-14 14:44:01 +03:00
parent 25cffd70d2
commit 9ca7d8f148
53 changed files with 54 additions and 0 deletions

View File

@@ -23,6 +23,7 @@ class Quadrotor():
if self.show_animation:
plt.ion()
fig = plt.figure()
# for stopping simulation with the esc key.
fig.canvas.mpl_connect('key_release_event',
lambda event: [exit(0) if event.key == 'escape' else None])

View File

@@ -567,6 +567,7 @@ def plot_animation(X, U): # pragma: no cover
fig = plt.figure()
ax = fig.gca(projection='3d')
# for stopping simulation with the esc key.
fig.canvas.mpl_connect('key_release_event',
lambda event: [exit(0) if event.key == 'escape' else None])