OCCRA
Go to Post May we always remember those who have shaped our lives for through us they shape those around us. - mechanicalbrain [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 12-05-2018, 01:18 PM
imariio imariio is offline
Registered User
FRC #7475 (WIRED)
Team Role: Programmer
 
Join Date: Jan 2018
Rookie Year: 2018
Location: Canada
Posts: 33
imariio is an unknown quantity at this point
How to make own java code/libraries?

This is my second year as programmer(java), and I'm ready to up my game. As part of this, I want to try driving with a Logitech g27 steering wheel. I'm guessing I'll have to make my own libraries for this so I'm curious as to how I would even start on this.. any resources anyone can point me to?
Reply With Quote
  #2   Spotlight this post!  
Unread 12-05-2018, 01:22 PM
tjf tjf is online now
Registered User
AKA: Tim Flynn
FRC #1257 (Parallel Universe), #1228 (RoboTribe)
Team Role: Mentor
 
Join Date: Jun 2016
Rookie Year: 2016
Location: Union County
Posts: 429
tjf has a reputation beyond reputetjf has a reputation beyond reputetjf has a reputation beyond reputetjf has a reputation beyond reputetjf has a reputation beyond reputetjf has a reputation beyond reputetjf has a reputation beyond reputetjf has a reputation beyond reputetjf has a reputation beyond reputetjf has a reputation beyond reputetjf has a reputation beyond repute
Re: How to make own java code/libraries?

Most USB steering wheels show up as regular ol' XInput controllers to make it easier on game developers. if it shows up in the driver station, you don't need anything fancy for basic input. It'll just be an axis most likely, and you can access in code the same way you could an axis on any other controller.
__________________

1257 (2016) - Student
1257 (2017-Present) - Overactive Alumnus | 1228 (2017-Present) - I do stuff
KD2KRT
Papers: Encyclopedia Robotica v2 | An FRC Anthology
Reply With Quote
  #3   Spotlight this post!  
Unread 12-05-2018, 01:26 PM
firecrafty's Avatar
firecrafty firecrafty is offline
Autonomous Driver
AKA: Ryan Blue
FRC #1018 (Pike RoboDevils)
Team Role: Programmer
 
Join Date: Feb 2017
Rookie Year: 2016
Location: Indianapolis
Posts: 203
firecrafty has a reputation beyond reputefirecrafty has a reputation beyond reputefirecrafty has a reputation beyond reputefirecrafty has a reputation beyond reputefirecrafty has a reputation beyond reputefirecrafty has a reputation beyond reputefirecrafty has a reputation beyond reputefirecrafty has a reputation beyond reputefirecrafty has a reputation beyond reputefirecrafty has a reputation beyond reputefirecrafty has a reputation beyond repute
Re: How to make own java code/libraries?

Quote:
Originally Posted by imariio View Post
This is my second year as programmer(java), and I'm ready to up my game. As part of this, I want to try driving with a Logitech g27 steering wheel. I'm guessing I'll have to make my own libraries for this so I'm curious as to how I would even start on this.. any resources anyone can point me to?
The steering wheel is an HID game controller, so you can use it like any joystick. You'll have to determine which joystick axis each physical axis is assigned to, which you can do with the driver station or the Windows game controller setup tool. From there you can do the following to get the value from each axis:

Code:
joystick.getRawAxis(axis);
__________________
"Programming is a science. Writing beautiful code is an art."
Any views I express are my own and do not necessarily reflect those of my team.
Reply With Quote
Reply


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 01:13 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi