The online racing simulator
Searching in All forums
(3 results)
emtark
S2 licensed
Looks promising I will keep you all updated.
Steering rack position
emtark
S2 licensed
Hello all,

I am developing my own force feedback steering wheel and wish to ask some questions regarding the output of the LFS outsim structure.

After looking through all the documentation, I haven't been able to find a value for the current position of the steering wheel. If anyone knows of the location for this value please let me know!

Alternatively, can we deduce the angle of the steering wheel in relation to the angle of the car proportionate to which direction the car is travelling, or using the G forces available from outsim.

I have angular velocity, orientation, acceleration, position and velocity from the outsim example I am using, my mathmatics skills are not great but I am working on possibly getting some form of force feedback value from these..

Any ideas/suggestions?

Tim.
Flags (bitwise comparision)
emtark
S2 licensed
Quote from Reese :Hello
I'm new to VB and I've just started a little OutGauge project with LFS External.
But now I've a problem with the "Flags" packet.

Example:

Select Case CInt(og.Flags)
Case Is = 49152
LBL_OG_Local.Text = "Local = Metric"
LBL_OG_Handbrake.Text = "Handbrake = Off"
LBL_OG_Shiftlight.Text = "Shiftlight = Off"
Case Is = 49156
LBL_OG_Local.Text = "Local = Metric"
LBL_OG_Handbrake.Text = "Handbrake = On"
LBL_OG_Shiftlight.Text = "Shiftlight = Off"
Case Is = 49157
LBL_OG_Local.Text = "Local = Metric"
LBL_OG_Handbrake.Text = "Handbrake = On"
LBL_OG_Shiftlight.Text = "Shiftlight = On"
Case Is = 49153
LBL_OG_Local.Text = "Local = Metric"
LBL_OG_Handbrake.Text = "Handbrake = Off"
LBL_OG_Shiftlight.Text = "Shiftlight = On"
Case Is = 0
LBL_OG_Local.Text = "Local = Imperial"
LBL_OG_Handbrake.Text = "Handbrake = Off"
LBL_OG_Shiftlight.Text = "Shiftlight = Off"
Case Is = 4
LBL_OG_Local.Text = "Local = Imperial"
LBL_OG_Handbrake.Text = "Handbrake = On"
LBL_OG_Shiftlight.Text = "Shiftlight = Off"
Case Is = 5
LBL_OG_Local.Text = "Local = Imperial"
LBL_OG_Handbrake.Text = "Handbrake = On"
LBL_OG_Shiftlight.Text = "Shiftlight = On"
Case Is = 1
LBL_OG_Local.Text = "Local = Imperial"
LBL_OG_Handbrake.Text = "Handbrake = Off"
LBL_OG_Shiftlight.Text = "Shiftlight = On"
End Select

This works but if I do this for ALL Flags it becomes very very long, so I think there must be something shorter, am i right?
Please help me

EDIT: Nobody can help me? Please I just don't get it^^

MfG Reese

Hi MfgReese,

I have dug up this which I found recently which explains comparing bits in bytes, as this is how the flags work (as i understand..)

http://stackoverflow.com/quest ... how-to-check-my-byte-flag

Basically if you compare the flag you want (say OG_SHIFTLIGHT) or whatever it is, with the OG_FLAGS, you will get either a 0 or 1 result (true or false).


If OG_FLAGS AND OG_SHIFTLIGHT = TRUE THEN
'do something because the shiftlight is on
Else
'shift light is off
End If

Sorry my reply isn't earlier but I've only started reading this thread tonight.. and it's 4am at the moment so if the syntax in the code is wrong I apologise as well

Tim.
FGED GREDG RDFGDR GSFDG