Skip to content

Commit 71c9af7

Browse files
committed
Removed lists from being global
1 parent eb22acc commit 71c9af7

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

examples/step-by-step/sbs_motion_commander.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ def take_off_simple(scf):
9191

9292
def log_pos_callback(timestamp, data, logconf):
9393
print(data)
94-
global position_estimate
9594
position_estimate[0] = data['stateEstimate.x']
9695
position_estimate[1] = data['stateEstimate.y']
9796

examples/swarm/leader-follower.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,7 @@ def pos_to_vel(x1, y1, x2, y2, dist):
106106

107107

108108
def position_callback(uri, data):
109-
global yaw1
110-
global x1, y1, z1, x2, y2, z2, d
109+
global d
111110
if uri == URI1: # Follower
112111
x1.append(data['stateEstimate.x'])
113112
y1.append(data['stateEstimate.y'])

0 commit comments

Comments
 (0)