
02-27-2016, 04:56 PM
|
 |
Cat Expert
AKA: Tristan Thompson
 FRC #2635 (Lake Monsters)
Team Role: Programmer
|
|
Join Date: Jan 2014
Rookie Year: 2012
Location: Lake Oswego, OR
Posts: 15
|
|
|
Re: Will this code successfully run my robot as a tank drive also a single forward ca
Some notes: - It would be better in the future if you wrap your code in CODE tags (# symbol in the post editor), in order for your code to be more readable.
- You initialized your drive motors to 0,1,2,3, but you initialized your talons to 1,2,3,4. I would either initialize the talons and then use them in the RobotDrive initializer, or make constants to represent each channel of each talon.
- Not sure what the point is of setting each motor to 0.5 in robotInit(). If you want to make sure they're enabled, you can use the enable() member function. The motors shouldn't even run in the init functions, but I haven't tested this.
- Your camera code is almost complete, but I believe you need to send it to the SmartDashboard with
Code:
CameraServer.getInstance().setImage(NIVision.IMAQdxGrab(sessionFront, frame, 1));
Its possible I'm wrong and LiveWindow.run() sends it somehow, but I'm guessing not. - Currently, your code will not run an intake. You need to initialize how ever many talons your intake uses and check the state of the POV to decide whether or not to run the motors.
|