The online racing simulator
Searching in All forums
(124 results)
Kada_CZ
S2 licensed
Hi all, please try GI version for Z25. gi_nick.zip is Nick's modified version, gi.zip is the original.

I did not response earlier because the forum software did not notify me about new post by email as usual (I don't know why...).

EDIT: In case of problems with the gi.zip version, try to add line
Use_InSim 0

to your config.txt.
Last edited by Kada_CZ, .
Kada_CZ
S2 licensed
G25 doesn't have FF support in the Linux kernel yet (thus it can't work in wine). AFAIK the support for G25 is under development.
Kada_CZ
S2 licensed
Try to upgrade wine to the latest version. For me, the color buttons don't appear until I pres Ctrl. For me everything works, clicking codepage, symbol table, color buttons. Also I can change color by pressing Ctrl-<number>.
Kada_CZ
S2 licensed
It works for me, Ubuntu 8.04, wine-1.0-rc1. Wine used to have problems with modifier keys (alt, ctrl, shift) when specific keyboard layout switching was used. If you use more keyboard layouts, try disable all of them but english. Or try to change switching method (e.g. alt+shift instead both shifts....).
Kada_CZ
S2 licensed
Your LPT port is weird, do you use an external card for the port? On standard PC, it should be:
LPT1 0x378
LPT2 0x278
LPT3 0x3bc

Kada_CZ
S2 licensed
Replace "inpout32.dll" from the GI's directory (folder) by inpoutx64.dll from the x64 directory. I.e. remove inpout32.dll, copy inpoutx64.dll to GI's dir, rename to inpout32.dll. I can't test it, though.
Last edited by Kada_CZ, .
Kada_CZ
S2 licensed
Hi, I just updated the info about Vista on the GI page. Sorry for the late update, I've been notified about it several times.
Last edited by Kada_CZ, .
Kada_CZ
S2 licensed
Quote from Dygear :the else statement in the code is a good start for beginners to look at. Indeed, most people who will be looking at this code will be beginners. I don't disagree that the style you brought up is good, but people might not get it right away, where as the if else style kinda lends it self to a more obvious flow.

Simply put, it's easier for noobs to understand.

It's not, from my point of view, because the code with indent level 10 is unreadable.

Quote from the_angry_angel :I totally agree, the reason for the crappy styling is due to the fact it was mostly ripped out from the publically available versions of luaLFS (), and to make it a bit more obvious what's happening - you'd be surprised how many people have a brain fart when they see a "continue;" statement.

I teach beginners here at university. So I know, that some of them has problems to discover, how to use 'break' and 'continue' (and 'return') correctly. But they should learn these statements from the beginning, I think. A beginner should see the right coding style in a tutorial.

I rewrite the_angry_angel's code according to my notions, see the attachement. Warning: I did not test the code!
Last edited by Kada_CZ, . Reason : a typo
Kada_CZ
S2 licensed
Thank you very much! I have some remarks:
- What is the licence of your code? I bet, that it's public domain, but it should be mentioned somewhere.
- There is a nice c++ sockets library (under GPL, _not_ LGPL though), so no need to do TCP buffering job in a real project. I understand, that for tutorial application is better to have all the code in one file.
- Some flowchart could be helpful, if you would spare time to create it :-).

/*the rest of the text can be safely ignored*/
I have also pedantic comment to the coding style used in the tutorial (and in many program sources here). The 'else' keyword is used very often and unsuitable. It causes the indentation of the code to grow over 10th level.. E.g.:
while (ok > 0) {
if (test() == FAILED) {
ok = -1;
} else {
<a very long program on indent level #2>
if (some_other_test() == FAILED) {
ok = -1;
} else {
<a very long program on indent level #3>
....
}
}
}

Compare it with the following:
while (ok > 0) {
if (test() == FAILED) {
ok = -1;
continue;
}
<a very long program on indent level #1>
if (some_other_test() == FAILED) {
ok = -1;
continue;
}
<a very long program still on indent level #1>
}

Actually, there are only a few cases in a real program, that require the 'else' keyword. In my example, I should use the 'break' keyword instead of 'continue', because the loop breaks at the point. But the test '(ok > 0)' could be more complicated.

Thank you again for your effort , please don't bother too much about my coding style pedantry .
Last edited by Kada_CZ, .
Kada_CZ
S2 licensed
Quote from niall09 :There are currently 969 licenced racers from the Slovak republic

No, the number represents registered racers, including demo racers.
Kada_CZ
S2 licensed
Hi Kalle,
consider also other option, with some microchip able to communicate over USB. E.g. this by MMos (the rsc site is down at the moment), it's based on pic18f4550. It's more complicated to build it, but you whould have a lot of on/off pins as well as PWM outputs for tacho, speedo, etc... There is support for LFS and the MMos's hardware.

I'm not sure, if multiplexing wouldn't be too slow. I mean, you would notice "lags" between e.g. tacho in LFS and you hardware.
Kada_CZ
S2 licensed
Hi, thanks for comments. The nlp server has HW problem, tommorow it should be ok.
Kada_CZ
S2 licensed
PWILLARD: With COM port, one needs additional hardware -- some controller able to handle with rs232. If you decide to go this direction, I would recommend to choose controller able to work with USB and use USB. There are some examples over internet, how to create DYI USB HID device.

fifasxxi: it works with RBR. I don't have the GPL licence, maybe in the future....

I also work on a new GI version initialized by InSim, so it'll work with other InSim addons like LFS relax.
Kada_CZ
S2 licensed
Do you have set OutGauge Mode 1 in cfg.txt? If you use Vista, you need the different version of inpout32.dll. Go to the Win32 folder and run InstallDriver.exe. I'll add a notice about it to the GI page soon.

Maybe you need to set a different LPT port in GI's config.txt, the number (default 0x378) can be found in Windows Device Manager. Look for the card and click "Properties".
Kada_CZ
S2 licensed
Quote from the_angry_angel :Whats up?

Segfault in the lua code. The stack is garbled, so it's difficult to discover, what's wrong.
Kada_CZ
S2 licensed
the_angry_angel: Is the version from this post the latest one? I'm playing with it under Ubuntu, but with no success ATM. Could you always edit the first post and add the up to date link there? Thanks :-).
Kada_CZ
S2 licensed
It works with PCI expansion card like this. You can find much cheaper ones on ebay.
Kada_CZ
S2 licensed
You could use Xvfb "fake" X server, if X needed. Here is a script, that I use, the wine is set to use X11 graphics driver.
#!/bin/bash
Xvfb :1 &
pid=$!
export DISPLAY=:1
cd </lfs/directory>
WINEDEBUG=-all wine ./LFS.exe /cfg=setup.cfg "$@"
kill $pid

I know, that this is not an option for you the_angry_angel :-). As written above, always use the most up to date version of wine available.
Kada_CZ
S2 licensed
It was added in X10.
Kada_CZ
S2 licensed
Quote from [RCG]Boosted :the problem is that under linux LFS completely locks up and its very hard to kill it (without restarting X).

Ctrl+Alt+F1, log in, $killall LFS.exe (or the hard way: killall -9 LFS.exe), log off (type 'exit' or press Ctrl+D), Alt-F7. Ctrl+Alt+<plus sign on numeric keypad> or Ctrl+Alt+<minus sign on numeric keypad> changes your desktop resolution back to normal. There are simpler solutions (without switching between X and text console), but they depends on a window manager you use.

Quote from the_angry_angel :WineHQ: 0.9.46

Quote from [RCG]Boosted :atm i do nothing...once gutsy is done (official date is 18 oct) ill just upgrade and then ill get the newest wine as well

Add WineHQ APT Repositories as described, this allows you to have the official up to date package on Feisty.
Last edited by Kada_CZ, .
Kada_CZ
S2 licensed
Maybe this helps. Search for Section 6: "Passing and Returning User-Defined Types". (Disclaimer: I have never programmed in VB, so I can be completely wrong ).
Kada_CZ
S2 licensed
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".
Kada_CZ
S2 licensed
Quote from dougie-lampkin :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 :-(.
Kada_CZ
S2 licensed
Quote from freddybob :Sorry, what I meant was how do I allow this user_agent when it comes from the 65.54.xxx.yyy IP range but disallow it when it comes from any other IP?

SetEnvIf User-Agent ^MSNPTC/1\.0 BAD_MS_ROBOT
<Directory /docroot>
Order Deny,Allow
Allow from 65.54.0.0/255.255.0.0
Deny from env=BAD_MS_ROBOT
</Directory>

I did not tested it, just a guess, no warranty :-). Notice also Ian.H's post about a new IP range.....
Last edited by Kada_CZ, .
Kada_CZ
S2 licensed
BBO@BSR: It's not that easy, http://en.wikipedia.org/wiki/Computer_Misuse_Act_1990
SamH: I would never use the term "well defined", when talking about the law .
FGED GREDG RDFGDR GSFDG