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.
308 current_time = datetime.now()
309 delta = current_time - current_start_time
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.
251 current_time = datetime.now()
252 delta = current_time - current_start_time
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.
216 current_time = datetime.now()
217 delta = current_time - current_start_time
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.
184 current_time = datetime.now()
185 delta = current_time - current_start_time
141 comp_lines = [comp_ax1.plot([], [], label=label)[0] for label in ["gps_compass", "pose_compass"]]
142 gps_pose_lines = [gps_ax1.plot([], [], [], "b.", label="gps")[0], pose_ax1.plot([], [], [], label="pose")[0]]
143
144 def animate_fps(i):145 # Get the time elapsed in the video in ms and add that onto the start datetime.
146 current_time = datetime.now()
147 delta = current_time - current_start_time
An unused argument can lead to confusions. It should be removed. If this variable is necessary, name the variable _
or start the name with unused
or _unused
.
def square(x, y=1):
return x * x
class MySubClass(MyClass):
def __init__(self, number):
self.value = 42 # argument `number` remains unused
def square(x):
return x * x
class MySubClass(MyClass):
def __init__(self, _):
self.value = 42