Skip to content

Commit

Permalink
added self to buoy_positions
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniParr committed Feb 20, 2024
1 parent 7fdb80e commit 93ae59c
Showing 1 changed file with 15 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,19 @@


class StartSignal(SubjuGatorMission):
buoy_positions = [[5, 10, 3], [6, 8, 5], [3, 12, 10]] # x, y, z displacements
async def run(self, args):
for i in len(buoy_positions):
self.send_feedback(f'Travelling to Buoy {i}')
await self.go(self.move().right(buoy_positions[i][0]).up(buoy_positions[i][1].forward(buoy_positions[i][2])))
self.send_feedback(f'Back to Origin')
await self.go(self.move().right(-buoy_positions[i][0]).up(-buoy_positions[i][1].forward(-buoy_positions[i][2])))


buoy_positions = [[5, 10, 3], [6, 8, 5], [3, 12, 10]] # x, y, z displacements

async def run(self, args):
for i in len(self.buoy_positions):
self.send_feedback(f"Travelling to Buoy {i}")
await self.go(
self.move()
.right(self.buoy_positions[i][0])
.up(self.buoy_positions[i][1].forward(self.buoy_positions[i][2])),
)
self.send_feedback("Back to Origin")
await self.go(
self.move()
.right(-self.buoy_positions[i][0])
.up(-self.buoy_positions[i][1].forward(-self.buoy_positions[i][2])),
)

0 comments on commit 93ae59c

Please sign in to comment.