Go to Post Remember to drive it like you stole it but be sure that it is in OVERDRIVE. - Steve W [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
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
  #1   Spotlight this post!  
Unread 21-03-2013, 07:24
austpet1230's Avatar
austpet1230 austpet1230 is offline
Registered User
FRC #4459 (Leotechs)
Team Role: Leadership
 
Join Date: Mar 2013
Rookie Year: 2011
Location: United States
Posts: 9
austpet1230 is an unknown quantity at this point
A few questions about C++

Hello everyone,

I am part of a rookie (well not anymore) team and in the 2014 FRC Competition, we plan on using C++ to program the robot.

My first question is C++ or Java better to program in?

My second question is that is this code appropriate to initialize two joysticks?
Code:
#include "WPILib.h"

class RobotDemo : public SimpleRobot
{
	RobotDrive myRobot; // robot drive system
	Joystick stick1, stick2; // only joystick

public:
	RobotDemo(void):
		myRobot(1, 2),	// these must be initialized in the same order
		stick1(1),		// as they are declared above.
		stick2(2)
	{
		myRobot.SetExpiration(0.1);
	}
Thank you to everyone and anyone who answers my question.

Austin P. //Programming Captain | The Leotechs FRC#4459
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 18:04.

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