Go to Post Don't trust everything you read on Chief Delphi. - Peter Matteson [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 Rating: Thread Rating: 4 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #7   Spotlight this post!  
Unread 11-11-2014, 22:51
lamk lamk is offline
Ken Lam
FRC #4719
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2014
Location: Calgary
Posts: 69
lamk is just really nicelamk is just really nicelamk is just really nicelamk is just really nice
Re: Logitech F310 Control Scheme Help

Quote:
Originally Posted by JamieKilburn View Post
Hi! For our controllers, we use the left stick to control forward/backward, and right stick to control left/right movement. Is this something similar to what you want? A sample implementation of this could be something along the lines of
Code:
 leftSpeed = y-x; 
rightSpeed = y+x; 
//y = Y axis of left joystick
//x = X axis of right joystick
If you have any other questions, please ask away!
Mr. Lim (Mentor of Jamie's team) called it the Kaj Drive.
"Kaj refers to Kajeevan, a long-standing and well-decorated former driver for 188 who pushed hard for this drive layout as a grade 9 driver, and used it to great effect ever since."
Here's the code written by one of his student.
Note how Mr. Lim's student decrease the midstick sensitivivty by using x^5:
Code:
//DRIVETRAIN--------------------------------------------------------------------------------------------
            
            //kaj drive (max forward and back = 90%)
            //          (max left and right = 75%)
            jagLeft.setX(-0.9 * (driverStick.getRawAxis(6) * driverStick.getRawAxis(6) * driverStick.getRawAxis(6) * driverStick.getRawAxis(6) * driverStick.getRawAxis(6))
                                 + 0.75 * (driverStick.getRawAxis(3) * driverStick.getRawAxis(3) * driverStick.getRawAxis(3) * driverStick.getRawAxis(3) * driverStick.getRawAxis(3)));
            jagRight.setX(-0.9 * (driverStick.getRawAxis(6)* driverStick.getRawAxis(6) * driverStick.getRawAxis(6) * driverStick.getRawAxis(6) * driverStick.getRawAxis(6))
                                 - 0.75 * (driverStick.getRawAxis(3) * driverStick.getRawAxis(3) * driverStick.getRawAxis(3)* driverStick.getRawAxis(3) * driverStick.getRawAxis(3)));
https://code.google.com/p/crescent-c...svn644&r=64 4
__________________

Last edited by lamk : 11-11-2014 at 22:57.
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:46.

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