Advertisement
Guest User

Untitled

a guest
Mar 27th, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. import wpilib
  2.  
  3. from helpers import *
  4. from magicbot.magic_tunable import tunable
  5. from magicbot import magic_motion_profile_drivetrain
  6. from common import ir
  7.  
  8.  
  9. class Drive(magic_motion_profile_drivetrain):
  10. robot_drive = wpilib.RobotDrive
  11.  
  12. left_drive_motor = wpilib.Spark
  13. right_drive_motor = wpilib.Spark
  14.  
  15. rotation_speed = resetsTo(0)
  16. forwards_speed = resetsTo(0)
  17.  
  18. def __init__(self):
  19. self.set_profile_forwards(max_feet_per_second=8, acceleration_seconds=1.5, deceleration_seconds=1)
  20. self.set_profile_rotation(max_degrees_per_second=90, acceleration_seconds=0.5, deceleration_seconds=0.5)
  21.  
  22. def execute(self):
  23. self.robot_drive.arcadeDrive(self.forwards, self.rotation)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement