WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 12-29-2009, 02:43 PM
moneim230 moneim230 is offline
Member
 
Join Date: Oct 2009
Posts: 18
Question 2 sliders from 1 joystick (Logitech G25)

Hello all,

i'm using Logitech G25 steering wheel in my code and i have a problem.
i have all the signals from it except the clutch pedal

when i use "vizjoy.getSliderCount()" it returns 2 which mean i have 2 sliders
but when i print the value of the slider i get postive values from the gas pedal and negative values from the breaks pedal...Does this mean that the gas and the breaks pedal are one slider ??? (+ve for breaks , -ve for gas)

if that is right...how to get the 2nd slider value ?
Reply With Quote
  #2  
Old 12-29-2009, 04:47 PM
moneim230 moneim230 is offline
Member
 
Join Date: Oct 2009
Posts: 18
Post signals

here is a code i created to get signals from the G25 steering wheel:
Code:
import viz
import vizjoy
viz.go()
G25=vizjoy.add()

def button(state):
	state = G25.getButtonState()
	print 'Button State = ',state

def joymove(x):
	x=G25.getPosition()
	print 'Position = ',x

def twistvalue(x):
	x=G25.getTwist()
	print 'Twist = ',x

def slidervalue(x):
	x=G25.getSlider()
	print 'Slider =',x

def hatangle(x):
	x=G25.getHat()
	print 'Hat=',x

print 'Joystick name = ',G25.getName()
print 'Slider count = ',G25.getSliderCount()
print 'Button count = ',G25.getButtonCount()
print 'Hat count = ',G25.getHatCount()

viz.callback(vizjoy.BUTTONDOWN_EVENT,button)
viz.callback(vizjoy.MOVE_EVENT,joymove)
viz.callback(vizjoy.TWIST_EVENT,twistvalue)
viz.callback(vizjoy.SLIDER_EVENT,slidervalue)
viz.callback(vizjoy.HAT_EVENT,hatangle)

Last edited by moneim230; 12-29-2009 at 04:51 PM.
Reply With Quote
  #3  
Old 01-04-2010, 11:56 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
If you use the clutch pedal do you notice a change in the Z value when you print the position?
Code:
def showJoyPosition():
	print 'position:  ',joy.getPosition()
	
vizact.ontimer(0.1, showJoyPosition)
Reply With Quote
  #4  
Old 01-07-2010, 11:47 AM
moneim230 moneim230 is offline
Member
 
Join Date: Oct 2009
Posts: 18
Quote:
Originally Posted by Jeff View Post
If you use the clutch pedal do you notice a change in the Z value when you print the position?
Code:
def showJoyPosition():
	print 'position:  ',joy.getPosition()
	
vizact.ontimer(0.1, showJoyPosition)
no Z value does not change
Only the value of X changes (+ve for steering right , -ve for steering left)
Y & Z are always zero
Reply With Quote
  #5  
Old 01-11-2010, 02:56 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
Are there different modes that you can put the G25 steering wheel in?
Reply With Quote
  #6  
Old 01-14-2010, 04:01 AM
moneim230 moneim230 is offline
Member
 
Join Date: Oct 2009
Posts: 18
Quote:
Originally Posted by Jeff View Post
Are there different modes that you can put the G25 steering wheel in?
it works in 2 modes:
the first is manual gearing (6 speeds + reverse)
the second is sequential (step up , step down)

i use the first one but this has nothing to do with the clutch signal
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
changing the gain of a joystick during a program Saz Vizard 4 06-25-2009 03:49 AM
writing joystick position to a data file Saz Vizard 3 12-17-2008 05:18 AM
Joystick Navigation Vinicius Lima Vizard 7 10-23-2007 10:42 AM
Facetracking and Immersion Joystick Vygreif Vizard 1 01-25-2006 10:56 AM
Basic Joystick Navigation Question Plasma Vizard 2 01-29-2004 07:08 PM


All times are GMT -7. The time now is 02:03 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC