View Single Post
  #1   Spotlight this post!  
Unread 09-02-2013, 12:29
stephmak stephmak is offline
High King of Code--Lead Programmer
FRC #4621
 
Join Date: Jan 2013
Rookie Year: 2011
Location: Georgia
Posts: 15
stephmak is an unknown quantity at this point
Drive System--Variable to Speed Controller

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!!
__________________
FTC
2011-2012 Bowled Over: Team #5165 Star Cygnus X-1

FRC
2013-2014 Ultimate Ascent: Team #4621 Yotta Robota
Reply With Quote