Go to Post Billfred = genius - rsisk [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 12:08.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi