Hey Andy from Team 3871 here, this year will be our first year using java and we curently are using macanum wheels... just wonder how to program them... dont quit understan the how to state the joystick axis..
PHP Code:
drive.mecanumDrive_Cartesian(leftStick.getDirectionDegrees(), leftStick.getMagnitude(), rightStick.gyroAngle();
Am i on the right track, and how do i go about wachdog...
missing something?
Here is everything i have so far...
PHP Code:
package edu.wpi.first.wpilibj.templates;
import edu.wpi.first.wpilibj.SimpleRobot;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.Timer;
public class Team3871Robot extends SimpleRobot {
RobotDrive drive = new RobotDrive (1, 2);
Joystick leftStick = new Joystick(1);
Joystick rightStick = new Joystick(2);
public void autonomous() {
}
public void operatorControl() {
while (isOperatorControl() && isEnabled())
{
drive.mecanumDrive_Cartesian(leftStick.getDirectionDegrees(), leftStick.getMagnitude(), rightStick.gyroAngle();
}
Timer.delay(0.005);
}
}
Thanks