Go to Post DEKA is right next to the river, and when i got there this morning they wouldn't let us into the building, but apparently there is and standing water on the first floor. The ironic thing is that i work on the water project and we can't deal with a bit of water on the floor - Greg Needel [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
  #2   Spotlight this post!  
Unread 16-02-2016, 11:31
pblankenbaker pblankenbaker is offline
Registered User
FRC #0868
 
Join Date: Feb 2012
Location: Carmel, IN, USA
Posts: 103
pblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of light
Re: PLZ Fix error

You are attempting to construct your Talon and Joystick objects too many times. Try constructing them just once in robotInit().

Code:
Joystick mXboxController; // this will drive the robot
Joystick controlStick; // this will be for function of the robot such as toggle the conveyor belt and etc.

Talon frontLeft;
Talon frontRight;
Talon rearRight;
Talon rearLeft;

public void robotInit() {	// this code will be ran each time we power on the robot

  // Construct joysticks here
  mXboxController = new Joystick(0); // depends on the usb connected to computer
  controlStick = new Joystick(1);

  // Construct Talons here
  frontLeft = new Talon(3);
  frontRight = new Talon(2);
  rearLeft = new Talon(0);
  rearRight = new Talon(1);
}
Hope that helps.
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:05.

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