This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
NewerOlder