Skip to content

Commit

Permalink
Merge pull request #549 from IMRCLab/fix-issue-544
Browse files Browse the repository at this point in the history
fix bug multiple trajectory upload
  • Loading branch information
knmcguire authored Jul 24, 2024
2 parents ae8fb49 + bebe313 commit 5d0efc4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crazyflie/scripts/crazyflie_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,7 @@ def _upload_trajectory_callback(self, request, response, uri="all"):
upload_success_all = True
for link_uri in self.uris:
trajectory_mem = self.swarm._cfs[link_uri].cf.mem.get_mems(
MemoryElement.TYPE_TRAJ)[id]
MemoryElement.TYPE_TRAJ)[0]
trajectory_mem.trajectory = trajectory
upload_result = trajectory_mem.write_data_sync()
if not upload_result:
Expand All @@ -905,7 +905,7 @@ def _upload_trajectory_callback(self, request, response, uri="all"):
return response
else:
trajectory_mem = self.swarm._cfs[uri].cf.mem.get_mems(
MemoryElement.TYPE_TRAJ)[id]
MemoryElement.TYPE_TRAJ)[0]
trajectory_mem.trajectory = trajectory
upload_result = trajectory_mem.write_data_sync()
if not upload_result:
Expand Down

0 comments on commit 5d0efc4

Please sign in to comment.