322
323 return drive_bars
324
325 drive_power_ani = FuncAnimation(drive_fig, animate_drive_powers, interval=plot_delay_fps, frames=plot_total_frames, blit=True)326
327 # Adjust layout and show the plots
328 fps_ax1.set_title("Threading Performance")
301
302 return gps_pose_lines
303
304 gps_pose_ani = FuncAnimation(gps_pose_fig, animate_gps_pose, interval=plot_delay_fps, frames=plot_total_frames, blit=True)305
306 def animate_drive_powers(i):
307 # Get the time elapsed in the video in ms and add that onto the start datetime.
244
245 return comp_lines
246
247 compass_ani = FuncAnimation(compass_fig, animate_compass, interval=plot_delay_fps, frames=plot_total_frames, blit=True)248
249 def animate_gps_pose(i):
250 # Get the time elapsed in the video in ms and add that onto the start datetime.
209
210 return acc_lines
211
212 accuracy_ani = FuncAnimation(accuracy_fig, animate_accuracy, interval=plot_delay_fps, frames=plot_total_frames, blit=True)213
214 def animate_compass(i):
215 # Get the time elapsed in the video in ms and add that onto the start datetime.
177
178 return fps_lines
179
180 fps_ani = FuncAnimation(fps_fig, animate_fps, interval=plot_delay_fps, frames=plot_total_frames, blit=True)181
182 def animate_accuracy(i):
183 # Get the time elapsed in the video in ms and add that onto the start datetime.
An unused variable takes up space in the code, and can lead to confusion, and it should be removed. If this variable is necessary, name the variable _
to indicate that it will be unused, or start the name with unused
or _unused
.
def update():
for i in range(10): # Usused variable `i`
time.sleep(0.01)
display_result()
def update():
for _ in range(10):
time.sleep(0.01)
display_result()