View Single Post
  #2   Spotlight this post!  
Unread 11-02-2013, 08:14
kenfox kenfox is offline
Registered User
FRC #3322 (Eagle Imperium)
Team Role: Mentor
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Ann Arbor, MI
Posts: 51
kenfox is a glorious beacon of lightkenfox is a glorious beacon of lightkenfox is a glorious beacon of lightkenfox is a glorious beacon of lightkenfox is a glorious beacon of light
Re: Help With Command Based Programming

Quote:
Originally Posted by zackd97 View Post
This is my first year doing FRC and I've been given the task of programming. I don't have a lot of experience, but I've managed to put together a program in RobotBuilder.
You're doing really well so far! Just keep asking here if you get stuck.

Quote:
I've managed to put together a code that builds, but it doesn't do anything.
For teleop driving, you need to set the default command on your Chasis subsystem. This command runs when no other command wants to do something with the chassis drivetrain. DriveWithJoystick will work fine as the default Chasis command. Set that in robot builder and regenerate C++ code. (Make sure you have the 2nd mid-season C++ update)

The file Subsystems/Chasis.cpp won't compile after you add the default command because C++ doesn't know where to find the definition of DriveWithJoystick.

To fix that, near the top of Chasis.cpp, after all the other #include commands, add this:

Code:
#include "../Commands/DriveWithJoystick.h"
Now it should compile and you can control the motors with the right joystick's X and Y axes.

Quote:
The code can be found here- https://github.com/zackd97/RobotProject3
Put your code directly into github without zipping it up first. This lets you track changes on individual files. Here's one of our robot tests so you have an example of how it will look in github: https://github.com/FRC3322/ShooterFeederTest
Reply With Quote