Skip to content

Commit 3ee1e99

Browse files
authored
Merge pull request #534 from bitcraze/Aris/GlobalVariables
Removed some global variables
2 parents eb22acc + b42a989 commit 3ee1e99

File tree

3 files changed

+1
-4
lines changed

3 files changed

+1
-4
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/asynchronizedSwarm.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ def arm(scf):
7474

7575

7676
def position_callback(uri, data):
77-
global pos1, pos2
7877
if uri == URI1:
7978
pos1[0] = data['stateEstimate.x']
8079
pos1[1] = data['stateEstimate.y']

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)