Go to Post We're not behind, the rest of the world is ahead! Yeah. Thats it. - Curtis Williams [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
  #4   Spotlight this post!  
Unread 27-06-2014, 14:05
ccresta1386's Avatar
ccresta1386 ccresta1386 is offline
Registered User
AKA: Collin Cresta
FRC #4954 (Palindrome Robotics)
Team Role: Driver
 
Join Date: Feb 2014
Rookie Year: 2014
Location: Middletown, DE
Posts: 24
ccresta1386 is an unknown quantity at this point
Re: First Year with Java, Help Requested

We are also in our first year and need help with programming. Our forward/backward and rotation works but strafing does not work.
Code:
 
    drive = new RobotDrive(1, 3, 2, 4); 
    driverStick = new Joystick(1);
    shooterStick = new Joystick(2);
    robotHeadingGyro = new Gyro(1);


double rotation = driverStick.getZ()*-1 / 2;                                                if (driverStick.getRawButton(3)){
rotation += .4;
 }else if(driverStick.getRawButton(4)){
rotation += -.4;
      }
               
drive.mecanumDrive_Cartesian(driverStick.getX(),
rotation,
driverStick.getY()*-1,
0);// we plan on putting a gyro in when the strafe works
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 17:58.

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