View Single Post
  #1   Spotlight this post!  
Unread 17-09-2014, 09:22
Ken P. Ken P. is offline
Registered User
FRC #1189
 
Join Date: Jan 2014
Location: Grosse Pointe Farms
Posts: 11
Ken P. is an unknown quantity at this point
C++ Robot Builder question

The way that RobotBuilder sets up it references is not what I am used to using. I expected to be able to use refer to a RobotDrive method "ArcadeDrive". I typed in "robotDrive41" - the pointer to the instance of RobotDrive and expected to see the methods etc. Instead it complains that it does not know anything about robotDrive41 despite its reference earlier in the file. Any suggestions are appreciated. Here is the code:

#include "DriveTrain.h"
#include "../Robotmap.h"
#include "../Commands/ArcadeDrive.h"


DriveTrain:riveTrain() : Subsystem("DriveTrain") {
// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DECLARATIONS
cANJaguar1 = RobotMap::driveTrainCANJaguar1;
cANJaguar2 = RobotMap::driveTrainCANJaguar2;
cANJaguar3 = RobotMap::driveTrainCANJaguar3;
cANJaguar4 = RobotMap::driveTrainCANJaguar4;
robotDrive41 = RobotMap::driveTrainRobotDrive41;
// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DECLARATIONS
}

void DriveTrain::InitDefaultCommand() {
// Set the default command for a subsystem here.
//SetDefaultCommand(new MySpecialCommand());
// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DEFAULT_COMMAND
SetDefaultCommand(new ArcadeDrive());
// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DEFAULT_COMMAND
}
// Put methods for controlling this subsystem
// here. Call these from Commands.
void DriveTrain::arcadeDrive(Joystick stick) {
robotDrive41
}
Reply With Quote