Go to Post Actually there are several Wayne Cokeleys circulating around. We cloned him in 2001. This is his evil twin Mordechai responding.....-WC 3 - Wayne C. [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
  #4   Spotlight this post!  
Unread 14-01-2017, 02:50
GavinL GavinL is offline
intensely stares at program
FRC #5726 (RhumBotz)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2016
Location: San Antonio, Texas
Posts: 42
GavinL is a splendid one to beholdGavinL is a splendid one to beholdGavinL is a splendid one to beholdGavinL is a splendid one to beholdGavinL is a splendid one to beholdGavinL is a splendid one to beholdGavinL is a splendid one to behold
Re: Will this work?

Quote:
Originally Posted by bob.wolff68 View Post
Gavin,
First ... feel free to use the "["CODE"]" and "["/CODE"]" markers (without the double-quotes) around anything that you want NOT formatted (smiles etc) - works like a champ.
Code:
int i=25;
Now for TankDrive, this is the drive mechanism where you (usually) want two joysticks - one is all about the left wheels and the other is all about the right wheels. Right? If that's indeed what you're looking for, then only the Y-Axis would be looked at for each of the joysticks. As such, TankDrive() would have inputs from two different sticks like:

BTW - I'm not familiar with your Robot:: class so I'm going to use my own 'Joystick' instances - if you have your own already, feel free to substitute...

Found somewhere like RobotInit()...
Code:
JoyStick leftStick(0);
JoyStick rightStick(1);
Code:
TankDrive(leftStick.GetY(), rightStick.GetY());
This is the gist of it. Does that make sense? Let me know if not.

roboBob
Yes it makes sense. Its just that we are using a logitech f310 so I have to use one port. Also last year we had it set up with the if statement, worked pretty well. Just didn't know if we should keep doing that or go to the TankDrive().
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 13:31.

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