Skip to content

Instantly share code, notes, and snippets.

View kudkudak's full-sized avatar
😃

Stanislaw Jastrzebski kudkudak

😃
View GitHub Profile
def act(self):
if len(self.command_queue) == 0:
if self.state == Rotator.STATE_ROTATE:
self.command_queue.append([TURN, \
self.state_helper * int((0.5*pi)/ TICK_ROTATE )]) # Rotate by 90 deegres
self.state_helper *= -1
return self.command_queue.pop(0)
def act(self):
if len(self.command_queue) == 0:
if self.state == Rotator.STATE_ROTATE:
self.command_queue.append([TURN, \
self.state_helper * int((0.5*pi)/ TICK_ROTATE )]) # Rotate by 90 deegres
self.state_helper *= -1
return self.command_queue.pop(0)