|
Victor controls
I'm attempting to make drive code for our robot currently. We are planning to have our main drive run on a tank control, and our side drive mechanism run on the x-axis of the right hand stick after the right hand stick's trigger has been activated.
We're planning to use a victor for the side drive (a single motor). Would you use the Set method to run it or can you even control a victor via control if it's not a RobotDrive declaration? Relevant current code below.
TY in advance.
Code:
class RobotDemo : public SimpleRobot
{
RobotDrive maindrive; // main drive system
Victor crab; // sideways drive system
Joystick stickone; // right joystick
Joystick sticktwo; // left joystick
public:
RobotDemo(void):
// These must be initialized in the same order
// as they are declared above.
maindrive(1, 2),
crab(3),
stickone(1),
sticktwo(2)
if (stickone.GetTrigger())
{
crab.Set(stickone.GetX);
}
__________________
Team Resume
562 "S.P.A.R.K." - Student Programmer 2008-2011, Field Coach 2011
3623 "Terror Bots" - Technical Mentor, Field Coach 2012 - Present
Volunteer Resume:
BattleCry@WPI 12, 13, 15, 16 - Queuing
BattleCry@WPI 14 - Field Reset
Granite State District Event 2014 - Team Queueing
NEFIRST District Championships '14,'15,'16 - Team Queuing
|