Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import wpilib
- from helpers import *
- from magicbot.magic_tunable import tunable
- from magicbot import magic_motion_profile_drivetrain
- from common import ir
- class Drive(magic_motion_profile_drivetrain):
- robot_drive = wpilib.RobotDrive
- left_drive_motor = wpilib.Spark
- right_drive_motor = wpilib.Spark
- rotation_speed = resetsTo(0)
- forwards_speed = resetsTo(0)
- def __init__(self):
- self.set_profile_forwards(max_feet_per_second=8, acceleration_seconds=1.5, deceleration_seconds=1)
- self.set_profile_rotation(max_degrees_per_second=90, acceleration_seconds=0.5, deceleration_seconds=0.5)
- def execute(self):
- self.robot_drive.arcadeDrive(self.forwards, self.rotation)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement