stephmak
09-02-2013, 12:29
Hello everyone,
I am trying to take a value from a variable that I have transfered from the usual "Joystick.getY();" command and input it into the speed controllers but I am getting the following error: "cannot find symbol symbol: method leftSpeedController(double)" from this line in my code: "leftSpeedController(dJ1Y);".
Here is a bigger segment the bigger picture of what I am trying to do.
public class DriveSubsystem extends Subsystem {
// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DECLARATIONS
SpeedController leftSpeedController = RobotMap.driveSubsystemLeftSpeedController;
SpeedController rightSpeedController = RobotMap.driveSubsystemRightSpeedController;
// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DECLARATIONS
// Put methods for controlling this subsystem
// here. Call these from Commands.
public void initDefaultCommand() {
double dJ1Y; //Variable that will house the y-axis number of
//driverJoystick1.
double dJ2Y; //Variable that will house the y-axis number of
//driverJoystick1
// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DEFAULT_COMMAND
// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DEFAULT_COMMAND
// Set the default command for a subsystem here.
//setDefaultCommand(new MySpecialCommand());
//leftSpeedController = Robot.oi.driverJoystick1.getY(); //gets the position of
//driverJoystick1 and puts it into the variable dJ1Y.
dJ1Y = (Robot.oi.driverJoystick1.getY());//gets the position of
//driverJoystick2 and puts it into the variable DJ2Y.
leftSpeedController(dJ1Y);
}
}
I know there has go to be some common sense answer to this problem that I am missing, but I can't figure it out. Any help would be greatly appreciated.
Thanks!!
I am trying to take a value from a variable that I have transfered from the usual "Joystick.getY();" command and input it into the speed controllers but I am getting the following error: "cannot find symbol symbol: method leftSpeedController(double)" from this line in my code: "leftSpeedController(dJ1Y);".
Here is a bigger segment the bigger picture of what I am trying to do.
public class DriveSubsystem extends Subsystem {
// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DECLARATIONS
SpeedController leftSpeedController = RobotMap.driveSubsystemLeftSpeedController;
SpeedController rightSpeedController = RobotMap.driveSubsystemRightSpeedController;
// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DECLARATIONS
// Put methods for controlling this subsystem
// here. Call these from Commands.
public void initDefaultCommand() {
double dJ1Y; //Variable that will house the y-axis number of
//driverJoystick1.
double dJ2Y; //Variable that will house the y-axis number of
//driverJoystick1
// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DEFAULT_COMMAND
// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DEFAULT_COMMAND
// Set the default command for a subsystem here.
//setDefaultCommand(new MySpecialCommand());
//leftSpeedController = Robot.oi.driverJoystick1.getY(); //gets the position of
//driverJoystick1 and puts it into the variable dJ1Y.
dJ1Y = (Robot.oi.driverJoystick1.getY());//gets the position of
//driverJoystick2 and puts it into the variable DJ2Y.
leftSpeedController(dJ1Y);
}
}
I know there has go to be some common sense answer to this problem that I am missing, but I can't figure it out. Any help would be greatly appreciated.
Thanks!!