示例#1
0
 def move(self):
     """Makes Myro calls to move the robot according to the current mode.
     Called when the mode is begun and whenever the program is resumed."""
     ModeProgram.move(self)
     if self.mode == 0 or self.mode == 'halt':
         myro.stop()
     if self.mode == 'drive':
         myro.forward(self.speed)
     if self.mode == 'rotate':
         myro.rotate(self.rot_dir * self.speed)
示例#2
0
 def move(self):
     """Makes Myro calls to move the robot according to the current mode.
     Called when the mode is begun and whenever the program is resumed."""
     ModeProgram.move(self)
     if self.mode == 0 or self.mode == 'halt':
         myro.stop()
     if self.mode == 'drive':
         myro.forward(self.speed)
     if self.mode == 'rotate':
         myro.rotate(self.rot_dir * self.speed)
示例#3
0
 def move(self):
     ModeProgram.move(self)
     direction = self.mode_direction()
     if direction == 'fwd':
         myro.forward(self.speed)
     if direction == 'bwd':
         myro.backward(self.speed)
     if direction == 'ccw':
         myro.rotate(self.around_mult * self.speed)
     if direction == 'cw':
         myro.rotate(self.around_mult * -self.speed)
示例#4
0
 def move(self):
     ModeProgram.move(self)
     direction = self.mode_direction()
     if direction == 'fwd':
         myro.forward(self.speed)
     if direction == 'bwd':
         myro.backward(self.speed)
     if direction == 'ccw':
         myro.rotate(self.around_mult * self.speed)
     if direction == 'cw':
         myro.rotate(self.around_mult * -self.speed)