The online racing simulator
Car gear
(7 posts, started )
Car gear
Hey, is there any way to know in which gear is the car ? (gear n / gear 1 / gear r)

Thank you Thumbs up
You can do it using OutGauge, it reports a lot of info about car status, including the current gear. See the last section docs/InSim.txt in your LFS folder.


struct OutGaugePack
{
unsigned Time; // time in milliseconds (to check order)

char Car[4]; // Car name
word Flags; // Info (see OG_x below)
byte Gear; // Reverse:0, Neutral:1, First:2...
byte PLID; // Unique ID of viewed player (0 = none)
float Speed; // M/S
float RPM; // RPM
float Turbo; // BAR
float EngTemp; // C
float Fuel; // 0 to 1
float OilPressure; // BAR
float OilTemp; // C
unsigned DashLights; // Dash lights available (see DL_x below)
unsigned ShowLights; // Dash lights currently switched on
float Throttle; // 0 to 1
float Brake; // 0 to 1
float Clutch; // 0 to 1
char Display1[16]; // Usually Fuel
char Display2[16]; // Usually Settings

int ID; // optional - only if OutGauge ID is specified
};

It's not possible with InSim, though.
That's what I'm looking but I never worked with OutGauge.
I must connect to game like InSim ?
OutGauge will only work for the players car I believe, if not the players car it will be the car that is being spectated and in the in-car cameras. It is similar to using InSim but a bit different in that you set the OutGauge ip and port in the configuration file then LFS starts throwing OutGauge messages whenever possible.
I solved the problem, thank you guys Smile
I have one more question...how to know if abs is on or is switched off ?
OutGaugePack structure has bits for the dashboard lights:
DL_ABS, // bit 10 - ABS active or switched off

/edit
better:
In struct IS_NPL are flags SetF for the setup:

#define SETF_TC_ENABLE 2
#define SETF_ABS_ENABLE 4

You mean to use InSim packet IS_NPL to receive informations at OutGauge ?
Sorry for my bad english...

Car gear
(7 posts, started )
FGED GREDG RDFGDR GSFDG