PDA

View Full Version : OutGauge - now available in T6


Scawen
28th April 2006, 18:11
If anyone could give it a test that would be great!

This can be controlled by 5 lines in the cfg.txt file :

OutGauge Mode 0 :0-off 1-driving 2-driving+replay
OutGauge Delay 1 :minimum delay between packets (100ths of a sec)
OutGauge IP 0.0.0.0 :IP address to send the UDP packet
OutGauge Port 0 :IP port
OutGauge ID 0 :if not zero, adds an identifier to the packet

Each update sends the following UDP packet :

unsigned int Time; // time in milliseconds (to check order)
char Car[4]; // Car name
word Flags; // Combination of OG_FLAGS, see below
byte Gear; // Reverse:0, Neutral:1, First:2...
byte SpareB;
float Speed; // M/S
float RPM; // RPM
float Turbo; // BAR
float EngTemp; // C
float Fuel; // 0 to 1
float OilPress; // BAR
float Spare1;
float Spare2;
float Spare3;
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 ID - if specified in cfg.txt)

#define OG_SHIFTLIGHT 1
#define OG_FULLBEAM 2
#define OG_HANDBRAKE 4
#define OG_PITSPEED 8
#define OG_TC 16
#define OG_HEADLIGHTS 32
#define OG_SIGNAL_L 64
#define OG_SIGNAL_R 128
#define OG_REDLINE 256
#define OG_OILWARN 512
#define OG_1 1024
#define OG_2 2048
#define OG_3 4096
#define OG_4 8192
#define OG_KM 16384
#define OG_BAR 32768

Scawen
28th April 2006, 18:16
Note : you can also initialise OutGauge from InSim. That way, you don't need to edit the cfg.txt file (but in that case you need an InSim program already set up).

With no InSim program, you can get OutGauge to start sending info just by editing cfg.txt as described in the above post.

Dygear
29th April 2006, 00:10
Oh dude, that's sweet! Gotta try this one out. Oh man, could you image the F1 Style overlays that are now possiable! I really must finash that F1 Overlay PSD file :). I just hope that one one else around here will code for it ... I don't have that much skill.

Tube
29th April 2006, 00:51
now if you give me some hints on how/where to start building a cockpit which communicates with lfs, I'll owe you one :)

Stuff
29th April 2006, 02:05
For the VB6 programmers on the forum, here is a working test of OutGauge!
Only thing it does for now is output the speed and RPM to a label on the form, nothing special, just testing. Included is my little okSocket, which might be hard to understand if you go through the slightly hackish code :razz: so if you have any questions, I will be happy to help.

Have fun! :)

Dygear
29th April 2006, 02:30
You rock ray :) Now if only I could get myself to install VB we'd be in buissness :).

GeForz
29th April 2006, 16:50
If anyone could give it a test that would be great!
Tested!

http://www.kamelstall.de/G15OutGauge.wmv

BBO@BSR
29th April 2006, 17:21
Tested!

http://www.kamelstall.de/G15OutGauge.wmv

looks awesome :thumb:

dawesdust_12
29th April 2006, 17:35
That looks neat, but first, what is the bottom bar showing and also, will you release the plugin for the keyboard to allow that to work? (assuming its the logi keyboard?)

mkinnov8
29th April 2006, 17:36
Tested!

http://www.kamelstall.de/G15OutGauge.wmv

WOW! oh and er... how?!:thumb:

GeForz
29th April 2006, 17:48
That looks neat, but first, what is the bottom bar showing and also, will you release the plugin for the keyboard to allow that to work? (assuming its the logi keyboard?)
It's fuel.

I'm currently thinking about what I want to display on the lcs, because rpm and gear... well you can see them on screen very well ;)

(and yes, G15)

dawesdust_12
29th April 2006, 18:18
now to get the 125$ for the G15 :)

sdether
29th April 2006, 18:35
Been looking for good sources for LCD that could then be mounted in the steering wheel motec style. The one i got from crystalfontz is the ideal form factor, but not being much of a hardware guy, figuring out how to hook it up has been a bit of a challenge.

Found a place that has USB/Serial graphic LCDs, so I might give these a try:

http://www.matrixorbital.com/product_info.php?pName=glk1223225wbl&cName=lcd-graphic-lcds

Anyone know any other sources for graphic LCDs that come with a serial, parallel or USB interface?

cheers,
sdether

Nitemare
29th April 2006, 19:59
just FYI..
here is an example, how to connect an LCD to parallel port.. http://www.beyondlogic.org/parlcd/parlcd.htm
edit: this image might help...
http://nitemare.misto.cz/lpt_lcd_schema_s.gif

but for my dashboard, i'm planning to use a bigger display, 40x4 lines...
http://www.bonafide.com.hk/catalog/MC4004-01.pdf
...this display costs around $25

this is a datasheet for a KS066U LCDcontroller http://nitemare.misto.cz/KS0066U_datasheet.pdf

this display has two of these controller chips (see first datasheet for wiring), so we need to enable one chip, send data for a half of the display, then enable other one, and send the rest of the data... so we need 8 data wires, one for read/write, and two for enable1/enable2 (or one wire for enable and one NOT gate), but the problem is we have only 8 data pins on LPT... pins 10 - 17 are for various control signal, but i'm not yet sure if they are usable for this.. ie. can they be set to any value via drivers??
if not, i might have to add some additional logic.. (a multiplexer maybe?)

in any case an external +5V power source wil be needed, as display's backlight will eat up to 1200mA of power .. this power can be taken from inside of a steering wheel, as display will be mounted on it anyway...

JogDive
29th April 2006, 20:00
Been looking for good sources for LCD that could then be mounted in the steering wheel motec style. The one i got from crystalfontz is the ideal form factor, but not being much of a hardware guy, figuring out how to hook it up has been a bit of a challenge.

Found a place that has USB/Serial graphic LCDs, so I might give these a try:

http://www.matrixorbital.com/product_info.php?pName=glk1223225wbl&cName=lcd-graphic-lcds

Anyone know any other sources for graphic LCDs that come with a serial, parallel or USB interface?

cheers,
sdether

Great idea sdether :thumb:

Ewee
29th April 2006, 20:06
@ GeForz: I've sent you a private message ;)

Bob Smith
29th April 2006, 20:09
Cheers RayOK. :)

Nitemare
29th April 2006, 20:29
#define OG_OILWARN 512
Engine oil warning light?

Does it mean, that we'll get some engine failures soon? :scratchch

Bob Smith
29th April 2006, 21:47
We have engine temperature (gauges)... would be a bit pointless dial if there were no consequences.

KeiichiRX7
29th April 2006, 22:09
Does this mean i can have my phidgets program now?

Scawen
29th April 2006, 22:28
Tested!

http://www.kamelstall.de/G15OutGauge.wmv:up: :nod: :D

dawesdust_12
30th April 2006, 01:49
Scavier? Impressed what people do with your little coding addins. This is the reason I'm buying that keyboard, it seems so awesomely useless, it could be useful :D

GeForz
30th April 2006, 19:59
I'm somehow missing a max_rpm value :(

Janni1687
1st May 2006, 08:46
I'm somehow missing a max_rpm value :(

#define OG_REDLINE 256 :thumb:

hackerx
1st May 2006, 09:10
#define OG_KM 16384
#define OG_BAR 32768

What are these two for?

TheCondor
1st May 2006, 09:50
I'm somehow missing a max_rpm value :(

Lolz, why you can see the max in de graph bar on thop ;)

I think Less is more on an lcd, too much information on such small device makes it
unusable.

Scawen
1st May 2006, 09:58
OG_REDLINE : comes on when you exceed the redline
OG_KM : user prefers to see KM/H instead of MPH
OG_BAR : user prefers to see BAR instead of PSI

TheCondor : I think GeForz just wants to know the maximum value, so he knows how to draw the RPM scale on the tachometer.

GeForz : I suggest you could set your max_rpm depending on either the car name, or set it dynamically, when the redline is reached.

Primoz
1st May 2006, 10:23
For LCDs, if you can get your hands on a broken Nokia 3310 with a good display, you can hook it up to paralel IIRC :) Have one sitting on the shelf next to me.

Tweaker
1st May 2006, 10:39
Scawen, or anyone here that is willing to help....

A friend of mine is quite good with fooling around with LCDs and programming them on the computer (via serial port or whatever), and he really wants to try this. The only thing is, he does not know where to start. It isn't very helpful to show such a cool feature for external hardware, but not make it very easy for beginners or people that have the equipment, but lack the knowledge (or at least have the knowledge, but don't have concrete steps to read).

If someone is willing to writeup maybe some steps on what you need to do too output this data to an LCD or something similar, that would be helpful I think. Because I think there are people that can be quite stumped with where to start trying. Because even I would like to try this, like maybe for a shiftlight on my wheel or something, but how???

Frankmd
1st May 2006, 10:46
What exactly is he capable of doing? If it is just the connection to LFS and reading the packets, I think there are enough people here who know some C variant to help him out (assuming he also uses that to write to the lcd).

Tweaker
1st May 2006, 11:09
All I can remember is that he was in need of something that can take UDP packets and connect with some other form to connect properly with his LCD. I could ask him. I told him to post here in this thread, but he figured he would wait for someone to make some program or something to make it less of a pain for people trying to figure this all out. :shrug:

GeForz
1st May 2006, 11:54
TheCondor : I think GeForz just wants to know the maximum value, so he knows how to draw the RPM scale on the tachometer.

GeForz : I suggest you could set your max_rpm depending on either the car name, or set it dynamically, when the redline is reached.
exactly. currently I'm just saving the highest rpm reached.

But my outgauge experimenting got a big hit when I discovered that you don't get any outgauge pacets from other cars in multiplayer (not even speed/rpm);
so no f1 style overlay which works pretty well in single player or your own car in mp ( http://www.kamelstall.de/f1overlay.wmv ) :x

sdether
1st May 2006, 20:07
All I can remember is that he was in need of something that can take UDP packets and connect with some other form to connect properly with his LCD. I could ask him. I told him to post here in this thread, but he figured he would wait for someone to make some program or something to make it less of a pain for people trying to figure this all out. :shrug:

I got my OutGauge object working yesterday, but i still need to do some clean-up before I'll release the next rev of my lib. With it, all you have to do is create an instance with the port to listen on and subscribe to the Gauge event. Every time LFS sends a new packet, a Gauge object with all the data exposed as named members (like obj.Speed, etc.) is provided to your event handler. That code in turn could write out selected pieces of that information to a serial port in whatever format your friend needs.

I'm at exactly the opposite end of the problem. I can talk to Serial, USB, Parallel and I can do whatever munging of the data I receive, but building the circuit board that interfaces one of those lovely cheap LCDs to serial/usb/parallel, is beyond me. Have your friend contact me, maybe we can completement each other's skills.

Scawen
1st May 2006, 21:17
But my outgauge experimenting got a big hit when I discovered that you don't get any outgauge pacets from other cars in multiplayer (not even speed/rpm);Hmm yes. It follows the same rules as OutSim - which was designed for motion machines, where you really don't want multiplayer cars making the platform move as it would be jerky. But I've made a note on my request sheet, to make OutGuage work on remote cars (in a future patch).

Scawen
1st May 2006, 21:19
Scawen, or anyone here that is willing to help....Just to mention, I don't have a clue, so that's why I won't be answering. Other guys here seem to know what they are doing. Good luck :)

Dygear
1st May 2006, 21:37
exactly. currently I'm just saving the highest rpm reached.

But my outgauge experimenting got a big hit when I discovered that you don't get any outgauge pacets from other cars in multiplayer (not even speed/rpm);
so no f1 style overlay which works pretty well in single player or your own car in mp ( http://www.kamelstall.de/f1overlay.wmv ) :x


DUDE, THAT IS AWSOME! How long do ya think untill you could get that into a more offical F1 look? If you would like, I could help you with the art. I have done a bunch of stuff with LFS : F1 overlays for adobe premiere. If I could take all of that crap out of post production, that would save me so much time :). Fell like taking on the job? I am so, excited about this, it looks so cool. I have so many questions. I think you should start a REAL F1 Overlay thread so we can build on the idea. :).

GeForz
1st May 2006, 21:40
DUDE, THAT IS AWSOME! How long do ya think untill you could get that into a more offical F1 look?

Choose your favorite:
- When I get the permission from Ecclestone to let it look like the official.
- When Scawen releases the next patch. It's imo pretty useless to have an overlay which only works in singleplayer... ;)

Dygear
1st May 2006, 22:07
Choose your favorite:
- When I get the permission from Ecclestone to let it look like the official.
- When Scawen releases the next patch. It's imo pretty useless to have an overlay which only works in singleplayer... ;)

Ah, screw Ecclestone, the likey hood of him sueing you is zero to none. I really don't think you could be held accountable for using the likeness. As for the next patch idea, yea, you could do that ... but don't ya just want to get a jump on it? Get some of the more basic things out of the way? Like the top eight overlay aka TEO, some of the stuff that does not require OutGauge at all, just some basic insim stuff. Also, mind shareing the source code. I for one would love to see how you did it! I could learn from it.

Highsider9
2nd May 2006, 12:09
Would somekind of Pitradio be possible? I am thinking of Blue/Yellow Flag Warnings because currently you don't notice them when driving with shift+f.

GeForz
2nd May 2006, 14:49
Ah, screw Ecclestone, the likey hood of him sueing you is zero to none. I really don't think you could be held accountable for using the likeness. As for the next patch idea, yea, you could do that ... but don't ya just want to get a jump on it? Get some of the more basic things out of the way? Like the top eight overlay aka TEO, some of the stuff that does not require OutGauge at all, just some basic insim stuff. Also, mind shareing the source code. I for one would love to see how you did it! I could learn from it.
I'm currently writing something else. That overlay was just an experiment.
Which Source code do you want?
The Overlay's or the one for insim?

Would somekind of Pitradio be possible? I am thinking of Blue/Yellow Flag Warnings because currently you don't notice them when driving with shift+f.
afaik there is no way of getting the flags out of lfs

Dygear
2nd May 2006, 15:15
I'm currently writing something else. That overlay was just an experiment.
Which Source code do you want?
The Overlay's or the one for insim?


afaik there is no way of getting the flags out of lfs

Overlay and InSim :) They both work hand in hand do they not?

dawesdust_12
3rd May 2006, 02:55
That'd be funny, a flag mod that had real flags attached to servos and when you recieved one, it'd fly beside you or drop in front of your screen (small little toothpick style flag) Just for fun :)

Dygear
3rd May 2006, 03:08
That'd be funny, a flag mod that had real flags attached to servos and when you recieved one, it'd fly beside you or drop in front of your screen (small little toothpick style flag) Just for fun :)

Yep, then you know you have to much time on your hands. I think I might try that :) :P.

inCogNito
3rd May 2006, 06:41
afaik there is no way of getting the flags out of lfs

maybe this could be added to outgauge as well.
some cars have warning lights for flags in RL (at least they have in GTR, and the cockpits are quite realistic)

sdether
3rd May 2006, 13:43
maybe this could be added to outgauge as well.
some cars have warning lights for flags in RL (at least they have in GTR, and the cockpits are quite realistic)

That is a good question. Do race status messages like that belong in OutGauge or InSim, since insim does race tracking already. I see it fitting both in a way.

eindewege
3rd May 2006, 20:55
I've got a clutch pedal, and I always disliked the fact that LFS doesnt have stalling engines. So I put together this crappy program.

It uses Outgauge to monitor the engine, and when the rpm drops to low for that car, it presses 'I' (turn of engine). Of course this is if you don't press the clutch.

I know it works pretty ok on my computer, if anyone wants to give it a try, please tell me if it worked ok.

Tested with patch U
Be sure to enable Outgauge in cfg.txt, use port 7000 on 127.0.0.1

AJS
4th May 2006, 07:17
I've got a clutch pedal, and I always disliked the fact that LFS doesnt have stalling engines. So I put together this crappy program.

It uses Outgauge to monitor the engine, and when the rpm drops to low for that car, it presses 'I' (turn of engine). Of course this is if you don't press the clutch.

I know it works pretty ok on my computer, if anyone wants to give it a try, please tell me if it worked ok.

Tested with patch U
Be sure to enable Outgauge in cfg.txt, use port 7000 on 127.0.0.1

I did something similar and now ive got a nice rev limiter for perfect starts but it might be considered cheating so i wont use it.

Well ok it doesnt really matter because you can overrev the engine pretty badly and nothing happens and you still get almost the same times with spinning tires.

TheCondor
4th May 2006, 08:20
exactly. currently I'm just saving the highest rpm reached.

But my outgauge experimenting got a big hit when I discovered that you don't get any outgauge pacets from other cars in multiplayer (not even speed/rpm);
so no f1 style overlay which works pretty well in single player or your own car in mp ( http://www.kamelstall.de/f1overlay.wmv ) :x

Aahh damn, I type faster then I think :x.

But nice work GeForz :thumb:

Tweaker
4th May 2006, 08:23
but building the circuit board that interfaces one of those lovely cheap LCDs to serial/usb/parallel, is beyond me. Have your friend contact me, maybe we can completement each other's skills.
Last I can remember, he got some 'kit' that game with a circuit board and some really simple stuff to get it working via serial or whatever. I'll try and find out what it was, maybe he'll stop by in this thread again to see if he could help. It is pretty cool what he has done with his lcd(s), got the ones with a backlight to work, etc etc. If only he could get it working in unison with LFS, then he'd be set ;)

HiTTeR
4th May 2006, 08:27
Hello, can u guys explain how to install it? http://www.kamelstall.de/f1overlay.wmv
I see it and now i cant sleep :shrug: when i have money i go to made a cockpit. I think go to buy the pieces to japan (shipping) but first need too much money free. Or buy ecci wheel trackstar 6000 whit clutch kit :P

Too much thanks :) Best game, Best community, Best controllers?:scratchch

GeForz
4th May 2006, 12:53
You cannot install it as it's only in an ascii file on my computer ;p
And no, currently there is no release planned.

paXton
4th May 2006, 16:38
Hi GeForz!

http://www.kamelstall.de/f1overlay.wmv (http://www.kamelstall.de/f1overlay.wmv)Nice work.

Which Source code do you want?
The Overlay's or the one for insim?
The source code, particularly of the overlay, would make me happy, too.
I searched for this many times on google, but never found anything, that could work with lfs.

paXton

GeForz
4th May 2006, 16:54
ah sorry must have overread this

overlay code is taken from the c# example found here: http://nexe.gamedev.net/directKnowledge/
for insim/outgauge wait for sdether to release the next version of his library

well i included the code snippets in the attached text file as i don't have a running version right now (as it was just an experiment)

hope it helps :)

paXton
4th May 2006, 21:33
overlay code is taken from the c# example found here: http://nexe.gamedev.net/directKnowledge/thx, this seems to be helpfull.
Must I look at the the Direct3D hooking or the DirectDraw overlay sample, or need I both technics to display an overlay on the lfs in fullscreen mode?

paXton

kwijibo
5th May 2006, 11:56
wow this is cool. I'm getting one of those G15 keyboards :)

I have an old 3310 laying around if anyone works out how to hook that up!

CrazyICE
17th May 2006, 12:39
can a mod or admin make this thread sticky :D

highbridge
26th May 2006, 03:37
I made control program for "Noritake GU-3101" by OutGauge.
http://www.noritake-elec.com/3000_series.htm

You can watch test movie! :thumb:
http://58.158.161.236/~whrt/cgi-bin/index.cgi?type=dl&no=3&file=./upfile/3.wmv

Have fun.

[WHRT] WorkaHolic Racing Team
HighBridge

sdether
26th May 2006, 06:53
I made control program for "Noritake GU-3101" by OutGauge.


That rocks. How much do those screens run and are they simple RS-232 connectors or do you have to build a board to connect the display?

Also, did you build the LED rev indicator yourself or where did you find that board?

highbridge
26th May 2006, 08:53
That rocks. How much do those screens run and are they simple RS-232 connectors or do you have to build a board to connect the display?

Also, did you build the LED rev indicator yourself or where did you find that board?

I did not build board.
It can connect to PC with RS232C or USB interfaces.
Very easily. :)

I made LED indicator board.
But very simple.
This display has digital I/O interface.
I connect to those ports and control by VisualC++ program.

[WHRT] WorkaHolic Racing Team
HighBridge

Doso
26th May 2006, 18:16
thats very very cool, i want to do this for my cockpit

i would love too see a right up detailing how you did this (if you could :-) )

also how much does that screen cost?, i have been trying to do this with an old LCD screen (LIS lcd panel) without much luck

thanks!

highbridge
26th May 2006, 18:53
thats very very cool, i want to do this for my cockpit

i would love too see a right up detailing how you did this (if you could :-) )

also how much does that screen cost?, i have been trying to do this with an old LCD screen (LIS lcd panel) without much luck

thanks!

I bought screen about $180US(20000yen).
And LED indicator is using junk parts.
Broken parts are LAN Hub and any...

Here is photo :nod:

http://www.vesta.dti.ne.jp/~ktaka/DSCN0499.JPG
http://www.vesta.dti.ne.jp/~ktaka/DSCN0500.JPG
http://www.vesta.dti.ne.jp/~ktaka/DSCN0501.JPG
http://www.vesta.dti.ne.jp/~ktaka/DSCN0502.JPG
http://www.vesta.dti.ne.jp/~ktaka/DSCN0505.JPG

[WHRT] WorkaHolic Racing Team
HighBridge

eindewege
28th May 2006, 18:16
Here's my latest outgauge project, finally I can read the numbers on the tacho :P

(Video is kinda crappy, try driving and shifting with one hand)

GhostVE
28th May 2006, 20:56
Here's my latest outgauge project, finally I can read the numbers on the tacho :P

(Video is kinda crappy, try driving and shifting with one hand)

Nice one :thumb:. What controller are you using for the tacho, and if homemade can you post some details ?

eindewege
28th May 2006, 21:04
Well atm, its very basic, I bypassed a lot of the tachometer stuff, in the end, its just a voltmeter (sort of). Im (ab)using the LPT-port, connected via a small transistor circuit. With a bit of pulse width modulation, you get this effect.

Its not perfect, there are only 40-80 'rpm-levels' I can use, so Im gonna try a real 5V output from a microcontroller or something (Think Im gonna abuse an old FFB-joystick, and steal its motor output).

BTW, any updates for FFShifter soon? Really like the program :)

GhostVE
28th May 2006, 21:25
Well atm, its very basic, I bypassed a lot of the tachometer stuff, in the end, its just a voltmeter (sort of). Im (ab)using the LPT-port, connected via a small transistor circuit. With a bit of pulse width modulation, you get this effect.

Its not perfect, there are only 40-80 'rpm-levels' I can use, so Im gonna try a real 5V output from a microcontroller or something (Think Im gonna abuse an old FFB-joystick, and steal its motor output).

BTW, any updates for FFShifter soon? Really like the program :)

Thanks. Well whatever the results would love to see them. The reason I am asking, is because I plan to add to FFShifter a plugin system for reading telemetry info from LFS, rFactor, NS2003 and probably Racer, and then having various output options like graphical window with gauges (so it can be displayed on a small lcd screen), a couple of real lcd screens, real gauge clusters from cars (I'll contact LBodnar to see whether he plans to have a controller for sale http://forum.rscnet.org/showthread.php?t=249774) and the last thing would be stand alone gauges like the tacho you are using.
Right now I working (whenever I find some free time) on the features for Beta 0.4. Don't want to give an estimate (again) because most likely it will be way off, so just watch the space of the FFShifter thread.

Edit : Forgot to mention and a USB Phidgets output for driving gauges with servos.

KeiichiRX7
29th May 2006, 10:19
Ghost Ve, you my friend are a god for realizing the potential of Phidgets.
think we could get support for a Text 8/8/8 too? (for those of use who wanna build a proper digital dash)

GhostVE
29th May 2006, 11:01
Ghost Ve, you my friend are a god for realizing the potential of Phidgets.
think we could get support for a Text 8/8/8 too? (for those of use who wanna build a proper digital dash)

I'll see whether I can interface to LcdStudio and from there on, you could use all the supported lcds.

Shotglass
3rd June 2006, 04:02
a variable for rpm at the driveshaft directly behind the gearbox would be nice for more realistically behaving speedos

highbridge
5th June 2006, 19:00
I bought screen about $180US(20000yen).
And LED indicator is using junk parts.
Broken parts are LAN Hub and any...

[WHRT] WorkaHolic Racing Team
HighBridge

Here is my source code :)
http://whrt.web.infoseek.co.jp/software/OutGaugeTest.zip

But it is uncompletely and this is only source code.
If you have same display unit,
Please let me know question.

[WHRT] WorkaHolic Racing Team
HighBridge

Scawen
26th June 2006, 23:17
Choose your favorite:
- When I get the permission from Ecclestone to let it look like the official.
- When Scawen releases the next patch. It's imo pretty useless to have an overlay which only works in singleplayer... ;)GeForz, please can you try Test Patch U9 and see if it does output OutGuage data when you want it to (remote cars, replays, external views, should all be ok now).

http://www.lfsforum.net/showthread.php?t=9472

Note : It was too restricted before because it used the same restrictions as OutSim - which was designed for motion simulators, which must have smooth motion. But OutGauge does not need to be so restricted.

Yaamboo
27th June 2006, 09:02
If you test it, I can make official-looking graphics, if you want ;)

Something like this:
http://www.lfsforum.net/showthread.php?p=138443#post138443

Edit: I actually made it.
http://www.lfsforum.net/showthread.php?p=156534#post156534

Dygear
28th June 2006, 01:48
D3D or photoshop?
Anyway, your colors are off, and I can help with that.

Yaamboo
28th June 2006, 07:51
Photoshop.

Ah, the SimFIA man. ;) The colors are the way I see them on my captures, which is supposedly not what it should be in real life. Do you have the official color codes or are yours also assumptions?

KeiichiRX7
28th June 2006, 17:16
Any word on LCD studio yet GhostVE?

Dygear
29th June 2006, 03:07
Photoshop.

Ah, the SimFIA man. ;) The colors are the way I see them on my captures, which is supposedly not what it should be in real life. Do you have the official color codes or are yours also assumptions?

I think my colors are correct. They are based on the color that I have found from online videos. I've then made small assumptions on how they would use the colors, based on what I know about the color comming from TVs. I would have to say that I think (and you can look for your self) that they are VERY close, if not the exact color they do use. You can also see the release I've made called F1SS, or F1 Style Stats. It can be found on this vary forum.

Yaamboo
29th June 2006, 09:15
Yup, you are supposedly correct, but I like my colours more :D

I'll test how much there is a difference later.

MagicFr
28th September 2006, 14:28
Hi,

Could it be possible to add current engine torque in OutGauge ?
Also would be great to have current resistive torque into engine? wich is the torque that come from drive train and go to engine

cheers,

Mladen[CROtm]
9th October 2006, 20:02
Hello. I saw few examples of analouge real gauges... I have an idea of building one of my own... on the first page of this topic is vb6 program which should copy current speed and rpm of a car in two labels. I have changed the cnfg file and set up port on 55, and outgauge mode on 1, but still i didn't get it to work... can enybody help me? If I get it to work i know how to move on... Tell me how to get it to work or please tell me where I can find program writen in c or visual basic. I just need speed and rpm in real time. Thanx!

Stuff
10th October 2006, 00:54
Hrm.. only thing I can think of is to double check your cfg file (like below) and know that OutGauge only works for the car you're in and in your car in replays (if mode is 2).. Have it match this:

OutGauge Mode 2
OutGauge Delay 1
OutGauge IP 127.0.0.1
OutGauge Port 55
OutGauge ID 0

The port can be different of course as long as it matches the port in the .ConnectTo line.

If nothing else works I will be happy to help more if I can.. :)

Mladen[CROtm]
10th October 2006, 05:27
Thank you! It works! Thank you for your help AND for your quick answer. I need it in kph but i know how to change it. Thank you very much!!!:thumb:

MonkOnHotTinRoof
19th October 2006, 17:26
What is the purpose of these bolded flags ? They never raise... Not implemented yet ?

#define OG_SHIFTLIGHT 1
#define OG_FULLBEAM 2
#define OG_HANDBRAKE 4
#define OG_PITSPEED 8
#define OG_TC 16
#define OG_HEADLIGHTS 32
#define OG_SIGNAL_L 64
#define OG_SIGNAL_R 128
#define OG_REDLINE 256
#define OG_OILWARN 512
#define OG_1 1024
#define OG_2 2048
#define OG_3 4096
#define OG_4 8192
#define OG_KM 16384
#define OG_BAR 32768

real_firefly
5th November 2006, 23:47
What is the purpose of these bolded flags ? They never raise... Not implemented yet ?

#define OG_SHIFTLIGHT 1
#define OG_FULLBEAM 2
#define OG_HANDBRAKE 4
#define OG_PITSPEED 8
#define OG_TC 16
#define OG_HEADLIGHTS 32
#define OG_SIGNAL_L 64
#define OG_SIGNAL_R 128
#define OG_REDLINE 256
#define OG_OILWARN 512
#define OG_1 1024
#define OG_2 2048
#define OG_3 4096
#define OG_4 8192
#define OG_KM 16384
#define OG_BAR 32768
The shiftlight tells you when to shift, only works with manual gearbox.



I've made a simple led dash, with speedo, rpm, gear, headlight indicator, reverse indicator and handbrake indicator. Basic parts are:
1x basic stamp 2 from Parallax (not really recommended, but works)
9x 7 segment display
9x cmos 4511 bcd to 7 segment decoders
+/- 70 resistors
3 leds for indicators
A small application (i've made a simple Java app) to read the outguage packet and send usefull stuff to the basicstamp

the video: http://video.google.nl/videoplay?docid=4067208290069665126

Mc21
22nd November 2006, 17:02
The shiftlight tells you when to shift, only works with manual gearbox.



I've made a simple led dash, with speedo, rpm, gear, headlight indicator, reverse indicator and handbrake indicator. Basic parts are:
1x basic stamp 2 from Parallax (not really recommended, but works)
9x 7 segment display
9x cmos 4511 bcd to 7 segment decoders
+/- 70 resistors
3 leds for indicators
A small application (i've made a simple Java app) to read the outguage packet and send usefull stuff to the basicstamp

the video: http://video.google.nl/videoplay?docid=4067208290069665126

Looks good. :)

Mladen[CROtm]
23rd November 2006, 16:55
I finished my real tachometer. well you just need few resistors that you conect with lpt and then output rpm on lpt. i will make spedoometer too, but i am thinking of digital speedo...

But still i didn't finshed 100% of tachometer. I still need to make shiftlight to work. But I see that it isn't packet. So i don't know how to get value (0 or 1). Please help. I will post movie later because I didn't buy voltmeter yet. (I tested it on digital multymeter)

the_angry_angel
23rd November 2006, 17:06
Its set in the flags. i.e. in C you'd do something like this (a bitwise and operation checks to see if the shiftlight bit is set):
if ((flags & OG_SHIFTLIGHT) > 0)
{
// turn shiftlight on
}
else
{
// turn shiftlight off
}

Mladen[CROtm]
23rd November 2006, 21:50
I am working in vb but it helped! I didn't realize that it was flags. I just wrote the code:
Label1.Caption = Format(Packet.Flags(0))
And that's it!
Thnx!
Ofcourse i will output it on lpt for my LED.
Thanx again!

Mladen[CROtm]
7th December 2006, 04:53
Well atm, its very basic, I bypassed a lot of the tachometer stuff, in the end, its just a voltmeter (sort of). Im (ab)using the LPT-port, connected via a small transistor circuit.

Where did you find a 5V voltmeter? I am searching fri it about a month... I made a similar solution - I made my own DAC and it works (tested with multimeter)- now I just need to find 5v voltmeter. Help?

KeiichiRX7
7th December 2006, 09:19
www.phidgetsusa.com (http://www.phidgetsusa.com)

they make several ready to use interfaces, just gotta program them using thier provided libraries.

i tried to program for an 8/8/8 text lcd but didnt get anywhere, im just not a code crafter

Demon68
8th December 2006, 07:52
Maybe a stupid question, but is het possible to use outgauge for a multi monitor setup.
Send info to a second computer (with LFS running) so I can have a different view there?

Dragon_Reborn
8th December 2006, 08:16
ULP moep, did you know that this threat has over 7000 views in under 30minutes. harcore right :D

Mladen[CROtm]
23rd January 2007, 07:03
Hello! Can somebody help me? I am about to connect shiftlight on a COM port... I had it connected to LPT but now i want to attach something else on lpt- tachometer... I dont know which pins are for input, and which are for output on a COM port. In short i don't know anything about com port so link on schematichs would be usefull... I just hope that programming in vb for COMport i similar to lpt programming... Thnx!

MonkOnHotTinRoof
23rd January 2007, 10:24
;320170']Hello! Can somebody help me? I am about to connect shiftlight on a COM port... I had it connected to LPT but now i want to attach something else on lpt- tachometer... I dont know which pins are for input, and which are for output on a COM port. In short i don't know anything about com port so link on schematichs would be usefull... I just hope that programming in vb for COMport i similar to lpt programming... Thnx!

Serial port is completely different animal than LPT. You can control(read) LPT pins directly, but with serial port you need a controller (com port only has 1 line for reading (Rx) and one for writing (Tx) (actually it has other lines, but are pretty much useless), so controller must deal with assembling those bits together, put bytes into fifo queue, synchronizing all the stuff, generate irqs, etc... There are ICs that do that for you, but it still may prove to be little more annoying than you think it is...

If you only need one signal line you can get away with it easily: just use one of the control signals such as DTR... (beware: you are dealing with 12V here)

Mladen[CROtm]
24th January 2007, 09:40
Yes i need just one signal- gfor shift light. 12V i can reduce with resistors...
What is DTR? I want to write signal output in vb...

Thnx

W1ldPort75
2nd February 2007, 18:02
Ok , super work on the Logitech G15 :thumb: . My question is >>> is there such a prog or mod that i can download that shows the same thing but only on a TFT CRT Monitor ??? I have been looking for something like this for a long time but ................. :shrug: the G15 is too small for my taste :really:

MonkOnHotTinRoof
2nd February 2007, 18:38
;320961']Yes i need just one signal- gfor shift light. 12V i can reduce with resistors...
What is DTR? I want to write signal output in vb...


pins on your port on PC :

1 2 3 4 5
6 7 8 9

pin 4 is DTR output
pin 5 is GND

(check docs on net if this is correct)

You can use following windows API to change DTR signal (you have to open serial port first with CreateFile API):

BOOL EscapeCommFunction( HANDLE hFile, DWORD dwFunc);

where dwFunc is CLRDTR or SETDTR to lower/raise signal and hFile is handle to a file (serial port actually)

W1ldPort75
3rd February 2007, 10:43
Ok i gues not :( . If someone has any idea where i can get such a prog please let me know :schwitz:

M.Mos
25th February 2007, 23:57
I have played some more with Outgauge and USB. This is what i've came up with. Note i misuse the Oilpressure gauge to display Turbo boost :-)

Video (http://www.youtube.com/watch?v=WkO1FR8JPAo)

stevewhite
27th March 2007, 02:22
That is seriously impressive. I have only just begain to pratice with outgauge. Now im trying to see what is lying around i can use. So far nothing. But im wondering what possibilities my graphing calculators screen may have. Too bad it was so expensive, id probably have it taken apart already.

radweld
13th April 2007, 16:27
Surely there is money to be made here, all you need is a clip on LCD which plugs into a USB port and some code to drive it. If someone builds one, I will buy it lol.

the_angry_angel
13th April 2007, 16:39
People have been planning ventures..

KeiichiRX7
14th April 2007, 10:21
i think he means me.... j/k

Dygear
14th April 2007, 12:42
i think he means me.... j/k

Yeah, I think he means you too.

KeiichiRX7
14th April 2007, 12:45
hey, i want this stuff for myself too, but develpment costs cash.

Dygear
14th April 2007, 12:54
hey, i want this stuff for myself too, but develpment costs cash.

I've got some extra cash right now, think I might pick up the phidgets (http://www.phidgets.com/) thing and program for it in C or C++ (Or even SmallC). I'll let you know how it goes.

KeiichiRX7
14th April 2007, 13:23
still gonna go ahead with my own development. develop a ready to use dash and software kit so those building cockpits can use them.

su3_zero
20th April 2007, 20:23
hi folks.... I had a 16x2 parallel LCD... how can i use it as a gauge??? it's possible???
is there any program that i can download and configure???

ps: i'm a noob in gauges... :thumb:

Dalek0220
28th April 2007, 16:44
How does it work?

AlfaLover
30th April 2007, 01:11
Scawen, i think out gauge could send lfs version with data, this would be very useful to detect posible future diferences in outgauge packets between LFS versions.

Mladen[CROtm]
11th July 2007, 15:52
hi folks.... I had a 16x2 parallel LCD... how can i use it as a gauge??? it's possible???
is there any program that i can download and configure???

ps: i'm a noob in gauges... :thumb:

I think that you have to buy PIC micro controller, and that you will have to buy programmer, and write a program in micro c, or similar program... coding is not hard. I had a chance to see micro c and saw that commands are very similar to c...

dougie-lampkin
17th September 2007, 20:21
sorry to bump such an old thread, but someone mentioned using an old 3310 as an lcd display. How would I go about setting it up? Also, how do I implement outgage into the cfg.txt file? It just resets everytime I run LFS.

Kada_CZ
18th September 2007, 10:19
Also, how do I implement outgage into the cfg.txt file? It just resets everytime I run LFS.You probably use Insim to communicate with some Insim program. When you set /insim <port>, the 'OutGauge Mode' is set to 0 (and overwritten in the cfg file). So you cannot use Insim and Outgauge in paralel :-(.

dougie-lampkin
18th September 2007, 17:09
You probably use Insim to communicate with some Insim program. When you set /insim <port>, the 'OutGauge Mode' is set to 0 (and overwritten in the cfg file). So you cannot use Insim and Outgauge in paralel :-(.

I don't think I use insim. That is, I havnt set it up to run with any external program. Unless LFS does that by default.

Kada_CZ
18th September 2007, 17:16
LFS doesn't use insim by default. Maybe you have it in script/autoexec.lfs. Anyway, it can be checked by typing: /insim (with no parameters). It should give you: "Insim not initialised".

dougie-lampkin
18th September 2007, 18:07
Anyway, it can be checked by typing: /insim (with no parameters). It should give you: "Insim not initialised".

It does say that. Now how do I stop cfg.txt from reseting when editing it?

mikey_G
18th September 2007, 18:22
From my experience that only happens when an insim app starts to communicate with lfs, or when I edit cfg.txt while running lfs.
I would advise to enable outgauge via insim though, because it is 10 times more reliable

dougie-lampkin
18th September 2007, 18:27
I would advise to enable outgauge via insim though, because it is 10 times more reliable

How do I do that? (im pretty much a n00b when it comes to the tech side of LFS!!!)

mikey_G
18th September 2007, 18:49
First of all, you need to begin a insim connection to your lfs. You can search documentation for that in lfs>docs>insim.txt

secondly you should send a packet to lfs containing this:
// DASHBOARD PACKETS (Initialising OutGauge from InSim - See "OutGauge" below)
// =================

// To request Dashboard Packets from the currently viewed car, send this IS_SMALL :

// ReqI : 0
// SubT : SMALL_SSG (Start Sending Gauges)
// UVal : interval (time between updates - zero means stop sending)

// The SSG packet makes LFS start sending UDP packets if in game, using the OutGauge
// system as documented near the end of this text file.

// You do not need to set any OutGauge values in LFS cfg.txt - OutGauge is fully
// initialised by the SSG packet.

// The OutGauge packets will be sent to the UDP port specified in the InSimInit packet.
that's it i think, of course you need to do something with the outgauge packets. Easiest way to get this going is with sdether's lfsLib insim library

dougie-lampkin
2nd October 2007, 20:07
OK i solved the problem of the disapearing cfg.txt text, but i don't know what i did!!! Anyway, im thinking of biulding a small program in C++ or yabasic (preferably yabasic) to communicate with outgage. How can i set my program to listen on an outgage port?

the_angry_angel
2nd October 2007, 20:47
You setup a socket to listen on the port, of your choosing. How you do this depends on which language you choose. For YABasic, I suggest consulting the YABasic manual.

Edit: a very brief googling (less than 2 minutes) suggests that there is no socket support in YABasic, which means that you either need to modify it, or use something else.

Edit 2: This post appears to confirm my results, and proposes a ridculously stupid solution.
http://yab.beosmax.org/viewtopic.php?t=66

dougie-lampkin
2nd October 2007, 20:57
You setup a socket to listen on the port, of your choosing. How you do this depends on which language you choose. For YABasic, I suggest consulting the YABasic manual.

Edit: a very brief googling (less than 2 minutes) suggests that there is no socket support in YABasic, which means that you either need to modify it, or use something else.

Edit 2: This post appears to confirm my results, and proposes a ridculously stupid solution.
http://yab.beosmax.org/viewtopic.php?t=66

Thanks, but my browser wont display the link!

EDIT: also, do you have a link for doing this in C++? cant find much on google, but im not sure what to look up!

the_angry_angel
2nd October 2007, 21:25
If you go down the route of editing the config file, then the following will apply.

This (http://64.233.183.104/search?q=cache:Gfs0IZmUeYkJ:www.geocities.com/siliconvalley/2072/sockprog.htm+winsock+UDP+sockets+example&hl=en&ct=clnk&cd=1&gl=uk&client=firefox-a) is a start. It explains how to use Winsock under C and C++, and half way down as "a UDP server program", which is effectively what you'll be making to get Outgauge packets. Its not perfect though, and will need modification.

There's a number of C++ wrappers for the socket functions which might make your life easier (so you don't have to deal with all the sa_addr stuff). I can't recommend any particular one though.

However, if you go down the route of initialising Outgauge through Insim (as mikey_G suggests).. well that's a whole different kettle of fish...

yankman
2nd October 2007, 21:57
q 'n' d way.

// socket handling
WSADATA wsaData;
SOCKET ogSocket;
int iResult = WSAStartup(MAKEWORD(2,2), &wsaData);
if (iResult != NO_ERROR)
{
cout << "Error at WSAStartup()" << endl;
return 0;
}
ogSocket = socket(AF_INET,SOCK_DGRAM,IPPROTO_UDP);
if(ogSocket == INVALID_SOCKET)
{
cout << "Error at socket(): " << WSAGetLastError() << endl;;
WSACleanup();
return 0;
}
sockaddr_in service;
service.sin_family = AF_INET;
service.sin_addr.s_addr = inet_addr("127.0.0.1");
service.sin_port = htons(27015);
if (bind( ogSocket, (SOCKADDR*) &service, sizeof(service)) == SOCKET_ERROR)
{
cout << "bind() failed." << endl;
closesocket(ogSocket);
WSACleanup();
return 0;
}

Gegry1992
8th December 2007, 08:31
How to get rpm and more? :(
unit init;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, IdUDPServer, IdBaseComponent, IdComponent, IdUDPBase,
IdUDPClient, IdSocketHandle;

type
THead = record
Size: Byte;
ISP_: Byte;
Reql: Byte;
Data: Byte;
end;
TInit = record
Size: Byte;
ISP_: Byte;
ReqI: Byte;
Data: Byte;
UDPPort: Word ;
Flags: Word;
Sp0: Byte;
Prefix: Byte;
Interval: Byte;
Admin: array[0..15] of char;
PName: array[0..15] of char;
end;
TVer = record
Version: array[0..7] of char;
Product: array[0..5] of char;
InSimVer: Word;
end;
TForm1 = class(TForm)
IdUDPClient1: TIdUDPClient;
IdUDPServer1: TIdUDPServer;
Button1: TButton;
Button2: TButton;
Memo1: TMemo;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure IdUDPServer1UDPRead(Sender: TObject; AData: TStream; ABinding: TIdSocketHandle);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;
Head: THead;
Ver: TVer;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var Init: TInit;
begin
Init.Size:=44;
Init.ISP_:=1;
Init.ReqI:=1;
Init.Data:=0;
Init.UDPPort:=30000;
Init.Flags:=0;
Init.Sp0:=0;
Init.Prefix:=0;
Init.Interval:=1;
Init.Admin:='';
Init.PName:=' aaaaaaa';
IdUDPClient1.SendBuffer(Init, SizeOf(Init));
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
Head.Size:=4;
Head.ISP_:=3;
Head.Reql:=0;
Head.Data:=2;
IdUDPClient1.SendBuffer(Head, SizeOf(Head));
end;

procedure TForm1.IdUDPServer1UDPRead(Sender: TObject; AData: TStream;
ABinding: TIdSocketHandle);
var init:tinit;
begin
Application.ProcessMessages;
Adata.Read(Head, sizeof(Head));
if (Head.Size = Adata.Size) and (Head.ISP_ = 3) and (Head.Data = 0) then
begin
Head.Size:=4;
Head.ISP_:=3;
Head.Reql:=0;
Head.Data:=0;
IdUDPClient1.SendBuffer(Head, SizeOf(Head));
end;
if (Head.Size = Adata.Size) and (Head.ISP_ = 2) and (Head.Data = 0) then
begin
Adata.Read(Ver, sizeof(Ver));
Memo1.Lines.Add('Version: '+Ver.Version);
Memo1.Lines.Add('Product: '+Ver.Product);
Memo1.Lines.Add('InSimVer: '+init.PName);

end;
end;

end.

Help me!

mikey_G
10th June 2008, 17:55
Seeing as this is kinda the official OutGauge thread:

Would it be possible to put the clutch temperature in the outgauge struct?
There already are EngTemp and OilPressure, but since those don't have a place in LFS (yet) I can't help wonder why the clutch temp isn't there.

blackbird04217
10th June 2008, 20:23
Maybe because engine temperature and oil pressure are viewable on gauges, whereas you can't look at one for clutch temperature?

gru
10th June 2008, 21:14
Maybe because engine temperature and oil pressure are viewable on gauges...
throttle, brake, clutch indicators aren't :scratchch

OG was made some time ago (before clutch changes), i guess Scawen had no time to add it
i agree it would be nice to have OutGauge updated

shiny_red_cobra
10th June 2008, 22:44
Would it be possible to put the clutch temperature in the outgauge struct?

I actually asked (http://www.lfsforum.net/showthread.php?p=638865#post638865) Scawen for this feature twice in the test patch threads just before patch Y was released. He never responded to the request.

Almadiel
11th June 2008, 00:03
I think its pretty important to have max rpm, and perhaps top speed information from outgauge. The way it is now we have to either let the user imput them manually, or have the program guess. Guessing isn't reliable for a few reasons: not all styles of driving or car/track combinations have the player going to max RPM (when using a clutch pedal particularly), and going by the shift light won't work because it doesn't necessarily come on at the same RPM for every gear. It makes for a much better user experience if the gauges we program just work, showing the correct range of values as soon as you get in the car. Right now there is no way to do this.

mikey_G
11th June 2008, 00:39
I think its pretty important to have max rpm, and perhaps top speed information from outgauge. The way it is now we have to either let the user imput them manually, or have the program guess. Guessing isn't reliable for a few reasons: not all styles of driving or car/track combinations have the player going to max RPM (when using a clutch pedal particularly), and going by the shift light won't work because it doesn't necessarily come on at the same RPM for every gear. It makes for a much better user experience if the gauges we program just work, showing the correct range of values as soon as you get in the car. Right now there is no way to do this.
Dude, you can just program all that yourself. With all the rev bar hardware I made (be it over parallel, serial or usb port) I always made sure my program was recording the max rpm's for each individual gear, and tbh, writing and debugging such an algorithm only takes 20 minutes.
And recording top speed from outgauge? Have you ever programmed with outgauge (or programmed at all)?

KeiichiRX7
11th June 2008, 01:37
i thought that monkey looked familiar...

as far as finding out the max RPM of each vehicle its pretty easy once you have an outguage program displaying RPM numerically. put car in neutral and pin the throttle, record max RPM,

Almadiel
11th June 2008, 08:22
What I am talking about is a way to do this with zero user intervention. Where the ranges of the gauges are always and instantly identical to those in the ingame dashboard, and don't fluctuate as you drive (or, say, switch around in spectator mode) while the program tries to figure out how the car is performing. Hence the "as soon as you get in the car." I suggest you read more carefully before replying in the future if you are going to patronize me.

the_angry_angel
11th June 2008, 08:46
Forgive me for not understanding, but if you've making physical gauges, why do they have to match exactly in the real world?

With regards to a "solution" - considering that you can init Outgauge over InSim, and considering that you can use InSim to detect what vehicle you are currently sitting in, you can then use a simple lookup database from which you can check to see what the max you should setup to go to. If the LFS vehicles change spec all you need to do is update and distribute that database to your users. That fills all your boxes.

I can't see Outgauge getting the additional information you want (i.e. max revs) though, as it would wipe out the few remaining spare bytes (which I'm sure are reserved for other things), which would mean that Outgauge would need to be altered, which in turn would break any existing tools - which is something Scawen has shown in the past a great dislike for doing.

gru
11th June 2008, 08:51
What I am talking about is a way to do this with zero user intervention
i get Your point, but i dont think its really important to have this values in OG
is that really a problem to check gauges range during development?
we dont have new cars every month, so U could just release patch when its needed

as for revs, there is no realistic max rpm at this point of LFS development
there are OG_SHIFTLIGHT and OG_REDLINE flags, but if U shift down to 1st gear at high speed, your XFG will reach 15k rpm :D

morpha
11th June 2008, 09:06
Here's my RPM-range data, should be pretty accurate:
uf1 = 6983
xfg = 7978
xrg = 6980
lx4 = 8974
lx6 = 8975
rb4 = 7480
fxo = 7482
xrt = 7480
rac = 6985
fz5 = 7971
ufr = 8978
xfr = 7979
fxr = 7492
xrr = 7492
fzr = 8474
mrt = 12917
fbm = 9179
fox = 7481
fo8 = 9476
bf1 = 19912

€: and the turbo pressure:rb4 = 0.731382
fxo = 0.733507
xrt = 0.830510
rac = 0.482715
fxr = 1.759917
xrr = 1.759917
mrt = 0.138831

Almadiel
11th June 2008, 09:58
I suppose the lookup table approach would work, and I see your point about the fixed data structure size. And if this information were to be reported I suppose InSim would be a more logical place to put it, since max rpm isn't something that changes continuously. I still think there should be some way to get this information directly from the sim, however. After all there will be an S3 eventually, and there could always be balance tweaks.

gru
11th June 2008, 10:06
I still think there should be some way to get this information directly from the sim, however.
yes, but not by OG
since this is constant data, it would be waste to send it several times per second

mikey_G
11th June 2008, 10:07
:really:

I still don't understand why the sims has to bother givin you that information. Just throw those max rpm values in a few #define's and you're set. And for recording the amount of rpm's for each individual gear when you hit the shiftpoint, you just make a program that figures it out. I can even post the c# code i have for it.

Please don't make outgauge more complicated because it wasn't supposed to be.

dougie-lampkin
11th June 2008, 12:25
You don't even need to find the car through InSim. OutGuage has the car name ;)

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

char Car[4]; // Car name
word Flags; // OG_FLAGS (see below)
byte Gear; // Reverse:0, Neutral:1, First:2...
byte SpareB;
float Speed; // M/S
float RPM; // RPM
float Turbo; // BAR
float EngTemp; // C
float Fuel; // 0 to 1
float OilPress; // BAR
float Spare1;
float Spare2;
float Spare3;
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 GameID is specified
};It's very easy to find the max RPM for each car. Just get in and floor it. The max RPM won't change no matter what gear you're in. If someone downshifts too early and overrevs, then let it spin off the gauge, like it does in LFS. You can then (very easily) make a switch that changes the max RPM depending on what car is being used. Easy-peasy ;)

What I'd like to see in OutGauge is wheel angle. There's a few situations where it would be very useful to have. Or maybe have it in OutSim. It would be very handy to have it there, even if it's rarely used :shrug: Oh, and I'm also waiting (patiently ;)) for engine temp and oil pressure to be hooked up :thumb:

the_angry_angel
11th June 2008, 13:10
You don't even need to find the car through InSim. OutGuage has the car name ;)Touché :) Shows last time I used OG was some time ago ;)

byte1
10th July 2008, 12:58
I have a (stupid) question about OutGauge.. I'm kinda first day writing C# (.NET). I got it receiving LFS OutGauge UDP packets but now I don't know how to read the needed values (speed/RPM etc). I saved one packet into a text file - here it is:d XRG Ą !ĖmD ? g˛I= Fuel 50.0% Brake Bal Fr 74%

There aren't examples for C#, that's why I'm askin.

PWILLARD
11th July 2008, 15:43
I normally hate seeing these kinds of responses but I know feel compelled to finally write one.

If it is your first day with C# and you do not understand the LFS examples shown so far... then you have more lessons to study before trying any Outgauge coding.

Even generic C examples, such as those by Vladimir Kadlec with his Gear Indicator will show you how to read the packet in way that you should understand and apply to C#.

Maybe by studying the Gear Indicator project code you will gain the skills you need. Until then, you are the Grasshopper that cannot yet snatch the pebble from the Master's hand.

Basically, at this stage, anything we say in trying to assist you will likely come out in SIMLISH.

http://en.wikipedia.org/wiki/Simlish

byte1
13th July 2008, 22:06
RC1 of my app, LFSTach. It's kinda useless :D just wanted to do something with outgauge. Anyway, I hope It's ok to use AnalogGauges graphics. Half of the credit goes to the author of these bad-ass gauges. :)

PS: PWILLARD, managed to read the data byte-by-byte. No libraries or anything. Just System.Net.Sockets.

WARNING: App is *completely* untested. Crashes if LFS isn't running or no race/replay isn't running at the moment - reason: UDP packets aren't coming but I use timer control (1ms delay) to receive data. If no data is sent by LFS, app crashes..

MDQ Racer ARG
3rd September 2008, 22:05
hola,alguien que hable español me puede ayudar?

Made by me:

PIC microcontroller RS232

http://www.youtube.com/watch?v=dP9Z2DK91rg

http://www.youtube.com/watch?v=4uDY7B_e_FA

:)

But I have problems with the interfaz usb :(
Not almost at all of vb6

Afterwards(Later) I upload my vb codes in order that they help me

gracias .thanks

Nadeo4441
4th September 2008, 15:38
Very nice , and i like you other videos , too :)

MDQ Racer ARG
5th September 2008, 01:44
hi,i am solved the problem ,in several days up my new video :thumb:

my first preview :)

http://www.youtube.com/watch?v=cMpklR4rMGQ

MDQ Racer ARG
11th September 2008, 14:14
hi,i am solved the problem ,in several days up my new video :thumb:

my first preview :)

http://www.youtube.com/watch?v=cMpklR4rMGQ


Now I am S2, gain(earn) the license in a championship demo :)

MDQ Racer ARG
16th September 2008, 18:42
new video :)

http://www.youtube.com/watch?v=T1xYy8-DNb8

Loko VEN
16th September 2008, 19:43
WOW!!! Very nice man! :thumb:

Good job!

Dygear
18th September 2008, 22:25
Nice job! Looks really slick and smooth!

MDQ Racer ARG
23rd September 2008, 13:55
the sound is a bit delayed in the video

darkinertia
21st November 2008, 03:05
http://www.youtube.com/watch?v=tB-h-...eature=related (http://www.youtube.com/watch?v=tB-h-63i_2I&feature=related)


hey can anyone make something like this? im trying to get my laptop used for gauges, is it possible or is there anyway i can do this without tons of programming knowledge like most of you guys have? :P

Napalm Candy
6th December 2008, 14:22
Hi, i'm new in VB6, but i'm making a simple program to recieve data from outgauge.

I see Speed, RPM, turbo.. etc. But I don't know how to use "flags". I want to make visible or invisilbe an image when shiftlight goes on. The code that I use is..

If OG_SHIFTLIGHT = 1 Then LEDShiftLigth.Visible = True
If OG_SHIFTLIGHT = 0 Then LEDShiftLigth.Visible = False

The problem is OG_Shiftlight is a constant not a variable and ever is 1. ¿How I can do?

Scawen
6th December 2008, 14:45
You need to use an AND operator. I don't know how it look in VB6 but in C it would be like this :

if (Flags & OG_SHIFTLIGHT)
{
// shift light is on - do something
}

The OG_ numbers represent individual bits in the flags value. The AND operator is used to detect if that bit is set.

AndroidXP
6th December 2008, 14:57
Here's (http://www.nerdymusings.com/LPMArticle.asp?ID=17) a site I found where you can read up on bit flags in VB6, in case you are interested how they work. But yeah, as Scawen said, to read it you'd have to write:

If (Flags And OG_SHIFTLIGHT) > 0 Then
...

Napalm Candy
6th December 2008, 16:36
I'm trying but i can't to do :( I don't have sufficient skills in programming

If I put the line:

If (Packet.Flags And OG_SHIFTLIGHT) > 0 Then LEDShiftLigth.Visible = True

I have an error. "compile error: Type mismatch"

and VB6 underlines the word AND, if I put & I have the same error

AndroidXP
6th December 2008, 16:40
Packet.Flags and OG_SHIFTLIGHT must be of the same data type. Both should be Integer, I reckon.

Napalm Candy
6th December 2008, 17:07
Option Explicit

'This can be controlled by 5 lines in the cfg.txt file :
'OutGauge Mode 0 :0-off 1-driving 2-driving+replay
'OutGauge Delay 1 :minimum delay between packets (100ths of a sec)
'OutGauge IP 0.0.0.0 :IP address to send the UDP packet
'OutGauge Port 0 :IP port
'OutGauge ID 0 :if not zero, adds an identifier to the packet

'Each update sends the following UDP packet :
Private Type OutGaugePacket
Time(0 To 3) As Byte 'unsigned int Time; // time in milliseconds (to check order)
Car(0 To 3) As Byte 'char Car[4]; // Car name
Flags(0 To 1) As Byte 'word Flags; // Combination of OG_FLAGS, see below
Gear As Byte 'byte Gear; // Reverse:0, Neutral:1, First:2...
SpareB As Byte 'byte SpareB;
Speed As Single 'float Speed; // M/S
RPM As Single 'float RPM; // RPM
Turbo As Single 'float Turbo; // BAR
EngTemp As Single 'float EngTemp; // C
Fuel As Single 'float Fuel; // 0 to 1
OilPress As Single 'float OilPress; // BAR
Spare1 As Single 'float Spare1;
Spare2 As Single 'float Spare2;
Spare3 As Single 'float Spare3;
Throttle As Single 'float Throttle; // 0 to 1
Brake As Single 'float Brake; // 0 to 1
Clutch As Single 'float Clutch; // 0 to 1
Display1(0 To 15) As Byte 'char Display1[16]; // Usually Fuel
Display2(0 To 15) As Byte 'char Display2[16]; // Usually Settings
ID As Long 'int ID; // (optional ID - if specified in cfg.txt)
End Type

Private Const OG_SHIFTLIGHT As Long = 1 '#define OG_SHIFTLIGHT 1
Private Const OG_FULLBEAM As Long = 2 '#define OG_FULLBEAM 2
Private Const OG_HANDBRAKE As Long = 4 '#define OG_HANDBRAKE 4
Private Const OG_PITSPEED As Long = 8 '#define OG_PITSPEED 8
Private Const OG_TC As Long = 16 '#define OG_TC 16
Private Const OG_HEADLIGHTS As Long = 32 '#define OG_HEADLIGHTS 32
Private Const OG_SIGNAL_L As Long = 64 '#define OG_SIGNAL_L 64
Private Const OG_SIGNAL_R As Long = 128 '#define OG_SIGNAL_R 128
Private Const OG_REDLINE As Long = 256 '#define OG_REDLINE 256
Private Const OG_OILWARN As Long = 512 '#define OG_OILWARN 512
Private Const OG_1 As Long = 1024 '#define OG_1 1024
Private Const OG_2 As Long = 2048 '#define OG_2 2048
Private Const OG_3 As Long = 4096 '#define OG_3 4096
Private Const OG_4 As Long = 8192 '#define OG_4 8192
Private Const OG_KM As Long = 16384 '#define OG_KM 16384
Private Const OG_BAR As Long = 32768 '#define OG_BAR 32768

Private lngTheSocket As Long

Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (pDst As Any, pSrc As Any, ByVal ByteLen As Long)

Private Sub Form_Load()
If theSocket.Initilize("MrOutGauge") Then
lngTheSocket = theSocket.ListenTo("UDP", 55)

Print "Listening on port 55"
Else
Print "Could not initlize winsock!?"
End If
End Sub


Private Sub theSocket_Received(lngSocket As Long, Data() As Byte)
If lngSocket = lngTheSocket Then
Dim Packet As OutGaugePacket
Dim Display1 As String
Dim Display2 As String

CopyMemory Packet, Data(0), LenB(Packet)

lblSpeed.Caption = Format(Packet.Speed * 3.6, "##0.0") 'Valor de velocidad
lblFuel.Caption = Format(Packet.Fuel * 100, "#0.#0") & " %" 'Valor de Fuel en %
lblRPM.Caption = Format(Packet.RPM, "####0") 'Valor de RPM
lblTurbo.Caption = Format(Packet.Turbo, "#0.##0") & " BAR" 'Indicador de Turbo

Display1 = Chr(Packet.Display1(0))
Display1 = Display1 & Chr(Packet.Display1(1))
Display1 = Display1 & Chr(Packet.Display1(2))
Display1 = Display1 & Chr(Packet.Display1(3))
Display1 = Display1 & Chr(Packet.Display1(4))
Display1 = Display1 & Chr(Packet.Display1(5))
Display1 = Display1 & Chr(Packet.Display1(6))
Display1 = Display1 & Chr(Packet.Display1(7))
Display1 = Display1 & Chr(Packet.Display1(8))
Display1 = Display1 & Chr(Packet.Display1(9))
Display1 = Display1 & Chr(Packet.Display1(10))
Display1 = Display1 & Chr(Packet.Display1(11))
Display1 = Display1 & Chr(Packet.Display1(12))
Display1 = Display1 & Chr(Packet.Display1(13))
Display1 = Display1 & Chr(Packet.Display1(14))
Display1 = Display1 & Chr(Packet.Display1(15))
lblDisplay1.Caption = Display1 ' Muestra el Display 1

Display2 = Chr(Packet.Display2(0))
Display2 = Display2 & Chr(Packet.Display2(1))
Display2 = Display2 & Chr(Packet.Display2(2))
Display2 = Display2 & Chr(Packet.Display2(3))
Display2 = Display2 & Chr(Packet.Display2(4))
Display2 = Display2 & Chr(Packet.Display2(5))
Display2 = Display2 & Chr(Packet.Display2(6))
Display2 = Display2 & Chr(Packet.Display2(7))
Display2 = Display2 & Chr(Packet.Display2(8))
Display2 = Display2 & Chr(Packet.Display2(9))
Display2 = Display2 & Chr(Packet.Display2(10))
Display2 = Display2 & Chr(Packet.Display2(11))
Display2 = Display2 & Chr(Packet.Display2(12))
Display2 = Display2 & Chr(Packet.Display2(13))
Display2 = Display2 & Chr(Packet.Display2(14))
Display2 = Display2 & Chr(Packet.Display2(15))
lblDisplay2.Caption = Display2 'Muestra el display2

'Indicador de marcha
If Packet.Gear = 0 Then lblGear.Caption = Format("R")
If Packet.Gear = 1 Then lblGear.Caption = Format("N")
If Packet.Gear = 2 Then lblGear.Caption = 1
If Packet.Gear = 3 Then lblGear.Caption = 2
If Packet.Gear = 4 Then lblGear.Caption = 3
If Packet.Gear = 5 Then lblGear.Caption = 4
If Packet.Gear = 6 Then lblGear.Caption = 5
If Packet.Gear = 7 Then lblGear.Caption = 6
If Packet.Gear = 8 Then lblGear.Caption = 7
If Packet.Gear = 9 Then lblGear.Caption = 8

If (Packet.Flags And OG_SHIFTLIGHT) > 0 Then LEDShiftLigth.Visible = True

End If
End Sub


I use the example of Stuff in first page of this thread.

I have tried to change the lines..
Flags(0 To 1) As Byte

to

Flags(0 To 1) As Integer

...AND...

Private Const OG_SHIFTLIGHT As Long = 1

to

Private Const OG_SHIFTLIGHT As Integer = 1

And I have the same error message

AndroidXP
6th December 2008, 17:28
That's because Flags is of type word, which is two bytes. Now originally you had defined Flags as a byte array of length 2, which is correct for reading the data, but you can't do bitwise operations with arrays. Instead you have to define Flags as Integer, which in VB6 is also two bytes and therefore what you want.

The only error you have now is that you actually defined an Integer array instead of just an Integer.

So instead of thisFlags(0 To 1) As Integer

it needs to be thisFlags As Integer

Napalm Candy
6th December 2008, 18:23
Thank you man, now works fine :)

Only I see a little problem, I can't put Integer for OG_BAR, but becouse I don't know the utility of this flag, I think that I don't use
Private Const OG_BAR As Long = 32768

AndroidXP
6th December 2008, 23:47
Oh that's true, VB doesn't have unsigned Integers, so I guess you'd have to take a Long field for OG_BAR then. I think it should be able to make a bitwise AND with Integer and Long fields, the initial problem was just trying to do the operation on the array. Or use the value -32768 for the OG_BAR constant, which should give the same result.

Napalm Candy
7th December 2008, 18:48
Two questions, what is mean "FullBeam"? I don't know what is this signal. And what is the utility for OG_KM and OG_BAR?

And second question, I cant to work with OG_HEADLIGHTS, don't want to run. But VB6 don't say any error, simply no appear the image.

'Traction Control
Dim TractionControl As Byte
Select Case Packet.Flags And OG_TC
Case 16
TractionControl = True
Case 0
TractionControl = False
End Select
picTC.Visible = TractionControl

'Headlights
Dim HeadLights As Byte
Select Case Packet.Flags And OG_HEADLIGHTS
Case 32
HeadLights = True
Case 0
HeadLights = False
End Select
PicHEADLIGHTS.Visible = HeadLightsFirst example of TC works fine, and with all other signals, but with Headlights no... what i'm doing wrong?

dougie-lampkin
7th December 2008, 18:55
I can't remember which, but either FullBeam or Headlights doesn't work at the moment (presumably it was put in along with oil pressure and engine temperature to prepare for future patches). Try using FullBeam instead of Headlights, I think FullBeam is the one for flashing the lights, not too sure though :)

Napalm Candy
7th December 2008, 19:06
Neither works fullbeam, I have asigned another picture. And OG_BAR and OG_KM what is they function?

Stuff
25th April 2010, 22:25
Hello!? Bumping this old thread to post an updated OutGauge VB6 example for some. It's just like the one in my first post except for patch Z+, I think, or whenever it was updated.. works in Z28 anyway.

DavidTiger
26th April 2010, 19:04
Hey, Any chance you could update this to VB.NET 2008 ??
I could do it easily but I don't have VB6 :shrug:

Thanks if you do!
-David

MDQ Racer ARG
27th April 2010, 01:54
Hello!? Bumping this old thread to post an updated OutGauge VB6 example for some. It's just like the one in my first post except for patch Z+, I think, or whenever it was updated.. works in Z28 anyway.

Thank you, it he was having problems with the Z version :thumb:

Whiskey
27th April 2010, 19:13
... or whenever it was updated.. works in Z28 anyway.

It was updated in Z25 :thumb:

fermevc
30th September 2010, 19:27
As much as I try to understand this bitwise stuff and try to learn about flags in VB, i can`t manage to see shift light. Looking at LFS virtual gauges, I can see "shift up" sign when over revving but red square below gear label won`t appear.
Tried all the combinations for variables, even made a separate labels for each flag, followed all the examples and posts, still no success.
Someone mentioned that shift light will only work for manual shifting but I tried to change (G25 shifter configured) but again only paddles work for gear change.
Maybe I`m asking stupid questions, but I would like if someone will point me into right direction.
Thanks in advance!

Shotglass
30th September 2010, 19:48
have you made sure youre testing with a car that still has a shift light? its been removed from most of the cars relatively recently (on the geological timescale that were on with lfs right now) and presumably also from the flags if youre in one of them

larrybh
11th November 2010, 11:33
Thanks very much for VB6 source code. I have been trying to get your "outgauge Test" to run on my Xp OS but no luck so far.
If I do a test run from VB6 I recieve an error 6 from it (Stack Overflow) It seems linked tothe "IsBitSet'" function. I can get the rest to work -RPM Speed - by disabling that function and 'remarking' out any reference to it. But I desperately would like to get the dashlights etc. working so I can build up my own Dash. Has anyone overcome this problem or know how to? (Please note - LFS noob and VB6 self taught - but willing to learn)
I am using LFS version 0.5Z28, so the it looks like I have the latest outgauge version - eg. DL_Handbrake not OG_Handbrake.
[Have exhasted my search on google for workable answer] Please help if u can.