Go to Post It’s impossible to know who’s life you will change forever. Don’t miss an opportunity. I’m an optimist. Have a great season. This is the year. - Rich Kressly [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
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
  #3   Spotlight this post!  
Unread 27-02-2016, 16:56
lakecat's Avatar
lakecat lakecat is offline
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
lakecat is an unknown quantity at this point
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.
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 09:34.

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