/// <summary> /// This function is run when the robot is first started up and should be /// used for any initialization code. /// </summary> public override void RobotInit() { chooser = new SendableChooser(); chooser.AddDefault("Default Auto", defaultAuto); chooser.AddObject("My Auto", customAuto); SmartDashboard.PutData("Chooser", chooser); //create joystick and robotdrive objects for joystick input and motor control stick = new Joystick(0); drive = new RobotDrive(0, 1, 2, 3); }
public drivingControl() { motorFrontLeft.SafetyEnabled = false; motorFrontRight.SafetyEnabled = false; motorRearLeft.SafetyEnabled = false; motorRearRight.SafetyEnabled = false; motorFrontLeft = new VictorSP(RobotMap.motorFrontLeft); motorFrontRight = new VictorSP(RobotMap.motorFrontRight); motorRearLeft = new VictorSP(RobotMap.motorRearLeft); motorRearRight = new VictorSP(RobotMap.motorRearRight); drive.SafetyEnabled = false; drive = new RobotDrive(motorFrontLeft, motorRearLeft, motorFrontRight, motorRearRight); }
public void bindMotors() { motor = new VictorSP[] { new VictorSP(RobotMap.motorOnChassis[0]), new VictorSP(RobotMap.motorOnChassis[1]), new VictorSP(RobotMap.motorOnChassis[2]), new VictorSP(RobotMap.motorOnChassis[3]) }; drive = new RobotDrive(motor[0], motor[1], motor[2], motor[3]); for (int i = 0; i < motor.Length; i++) { motor[i].SafetyEnabled = false; //motor[i].Inverted=true; } drive.SafetyEnabled = false; initTables(); }
/// <summary> /// This function is run when the robot is first started up and should be /// used for any initialization code. /// </summary> public override void RobotInit() { chooser = new SendableChooser(); chooser.AddDefault("Default Auto", defaultAuto); chooser.AddObject("My Auto", straightAuto); chooser.AddObject("Left Auto", leftAuto); SmartDashboard.PutData("Chooser", chooser); //start cameras? CameraServer.Instance.StartAutomaticCapture(0); CameraServer.Instance.StartAutomaticCapture(1); //create joystick and robotdrive objects for joystick input and motor control stick = new Joystick(0); drive = new RobotDrive(0, 1, 2, 3); climber = new VictorSP(4); getRope = new VictorSP(5); flag = '\0'; testTime = new System.Timers.Timer(50); elapsed = true; elapsedTimes = 0; testTime.AutoReset = false; testTime.Elapsed += TimeAlert; }
public Drive() { drive = new RobotDrive(leftMotorA, leftMotorB, rightMotorA, rightMotorB); }