Our (error-free) code looks like this --
Code:
public class TurnLeft extends CommandBase {
private double m_timeout;
private double m_speed;
public TurnLeft(double speed, double timeout) {
m_timeout = timeout;
m_speed = speed;
// Use requires() here to declare subsystem dependencies
// eg. requires(chassis);
requires(drivetrain);
}
Do you have any other code? Because I'm assuming you want to do the same thing that our code does, that is, turn left for the period of time put inside the parentheses when you call the command. To do that you need to make "timeout" a parameter in the TurnLeft method by using putting "double timeout" inside the parentheses. You also want to make m_timeout a variable inside the class, so make sure to put "private double m_timeout;" somewhere.
If you want you can just copy/paste my code in (remove the "speed" stuff) and see if it works.