Discussion:
Joystick setup
Kristin
2005-06-18 09:04:41 UTC
Permalink
I have a CH flightstick Pro with a gameport interface,
I downloaded the Fgsetup-0.9.8a file and it only has
support for USB CH joysticks. Anyone know how to mod
the file or have a copy of a config file to work with
this device? The program seems to be working on my
win98 machine, just need to get the joystick working.

I also can boot to slackware Linux but cannot figure
out how to install or run in Linux??? as I have the
Linux version of FG also.

I tried this a few months ago and between getting
Linux going and FG gave up. I am running Slax v5.05 or
can go to RedHat 9 version whichever would work
better.

I would be just a happy to keep running win version
though, if I could get or get directions to modify or
make the joystick config file.


Getting tired of crash and burn since the stick will
not control the aircraft!
Thanks

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Laurie Bradshaw
2005-06-18 11:14:06 UTC
Permalink
Post by Kristin
I also can boot to slackware Linux but cannot figure
out how to install or run in Linux??? as I have the
Linux version of FG also.
I tried this a few months ago and between getting
Linux going and FG gave up. I am running Slax v5.05 or
can go to RedHat 9 version whichever would work
better.
Possibly worth noting that they're both very old distributions now, Slackware
is at 10.1, and RedHat discontinued their branded free distribution after 9,
and collaborated with the Fedora project to produce Fedora Core (currently at
version 4). I personally like Fedora, but it is a case of finding the
distribution that requires the least tweaking to get it to run how you want
it to, Mandrake is often cited as being good for newbies, but I haven't tried
it myself...

Windoze or Linux, gameport joysticks require manual setup (win - install
driver, linux - modprobe appropriate modules).

I have however, had an ancient 2 button gameport joystick working with
flightgear under linux (as well as my new usb one - after a few false
starts), so may be able to help there.

Assuming you have a linux distro installed, I can try and help you get
flightgear up and running on it, although I'd reccomend installing a newer
distro than rh9 or slax5.

I haven't done any coding further than scripting languages since I fully
switched to linux a few years ago (mostly because I find that someone else
already wrote it, and it's open source :), but I might have a go at throwing
together some sort of joystick xml writer gui for flightgear (patch for
fgrun?).

--
Laurie Bradshaw
Kristin
2005-06-18 22:14:17 UTC
Permalink
Perhaps I misspoke my version of Linux it is from
http://slax.linux-live.org/download.php V5.05 I think
the kernel is 2.6.11.7. May 2005 release.

Is there a JStest for windows? It seems modprobe does
not detect my gameport joystick in Linux. I never was
very well versed in Linux even though I used a version
called Linx about 10 years ago while at the USPS as a
tech on the mail sorting machines built by Martin
Marrieta.

The CH Joystick I have has a trigger, three buttons,
and a small "hat" four way switch, additonaly it has
trimmers for r-l and for-back and a third that works
as a throttle on my early version of MS- flight.

I know most of the FG forum is Linux oriented but I
would like to stick with win 98 as I have some other
hardware issues with switching OS's (mouse from ps2 to
ser port, modem does not work etc...) I also have
little or no $$$ to spend. My CH stick was $2 at a
thrift store, can't afford to go to Walmart and spring
$$ for a USB one. So I need to get this one working. I
probably do not need a full blown joystick file just
some information as to how to modify one of the files
already existing. Perhaps add the lines for added
buttons from a 2 or 3 button gameport stick already in
the distribution for windows.






____________________________________________________
Yahoo! Sports
Rekindle the Rivalries. Sign up for Fantasy Football
http://football.fantasysports.yahoo.com
Jeremy Johnson
2005-06-18 19:45:50 UTC
Permalink
Post by Kristin
Perhaps I misspoke my version of Linux it is from
http://slax.linux-live.org/download.php V5.05 I think
the kernel is 2.6.11.7. May 2005 release.
Is there a JStest for windows? It seems modprobe does
not detect my gameport joystick in Linux. I never was
very well versed in Linux even though I used a version
called Linx about 10 years ago while at the USPS as a
tech on the mail sorting machines built by Martin
Marrieta.
If you have a serial gameport modem you need the gameport module.
#modprobe -l | grep input
If you don't have the gameport module, check to see if it was compiled into
kernel. You might be able to look at /proc/config.gz or try
#grep GAMEPORT /usr/src/linux/.config
Once you've got serial gameport driver, check your dmesg.
Once you've got all that working, then check your device permissions.
If slax uses udev look at
#ls -l /dev/input/*
Make sure you have a line in /etc/udev/rules.d/50-udev.rules like
KERNEL="js?", NAME="input/%k", SYMLINK="gameport_joystick"
Replace "js?" with "js0" or "js1" or whatever is appropriate.
Once you've got all that working try KDE's joystick test program
Click on "Wrench-icon"->"Peripherals"->"Joystick"
Post by Kristin
The CH Joystick I have has a trigger, three buttons,
and a small "hat" four way switch, additonaly it has
trimmers for r-l and for-back and a third that works
as a throttle on my early version of MS- flight.
I know most of the FG forum is Linux oriented but I
would like to stick with win 98 as I have some other
hardware issues with switching OS's (mouse from ps2 to
ser port, modem does not work etc...)
Serial mice work just fine with linux, so do PS/2 mice.
Some fancy wireless usb keyboard/mice might not, but normal
usb keyboard/mouse work just fine (just remember you need
module usbhid (either compile it into kernel or modprobe usbhid)
Some winmodems do work with linux -- google for linmodem.
Post by Kristin
I also have
little or no $$$ to spend. My CH stick was $2 at a
thrift store, can't afford to go to Walmart and spring
$$ for a USB one. So I need to get this one working. I
probably do not need a full blown joystick file just
some information as to how to modify one of the files
already existing. Perhaps add the lines for added
buttons from a 2 or 3 button gameport stick already in
the distribution for windows.
Laurie Bradshaw
2005-06-20 11:59:35 UTC
Permalink
Post by Kristin
Perhaps I misspoke my version of Linux it is from
http://slax.linux-live.org/download.php V5.05 I think
the kernel is 2.6.11.7. May 2005 release.
Sorry, assumed (wrongly) that slax was an abbreviation. Problem with live cd's
is if they don't automagically support your hardware, you're going to have to
configure it every boot (or modify the cd before burning). If you let me know
what hardware you have, I can tell you any caveats I know about specific to
it.
eg. you probably need to load the module for your soundcards gameport _before_
loading the module for the joystick, but I'd need to know what soundcard you
have (if any, maybe the gameport is on the motherboard?) to tell you which
module to load.
Post by Kristin
Is there a JStest for windows? It seems modprobe does
not detect my gameport joystick in Linux. I never was
very well versed in Linux even though I used a version
called Linx about 10 years ago while at the USPS as a
tech on the mail sorting machines built by Martin
Marrieta.
Not per se (at least as far as I know - short of setting up cygwin), but if I
remember rightly, there is a joystick test gui buried in the control panel
somewhere.
Linux has come a long way since 10 years ago, but legacy hardware still tends
to require manual configuration; I'm not having a go, I was using an ancient
2 button gameport joystick for years, until I fell across my current one on
ebay for £9 (inc. p&p :).
Post by Kristin
The CH Joystick I have has a trigger, three buttons,
and a small "hat" four way switch, additonaly it has
trimmers for r-l and for-back and a third that works
as a throttle on my early version of MS- flight.
You need to know how the os you're using sees them; whether they're axis or
buttons, and what number the os has assigned them (not necessarily the same
as labelled on the stick)
Post by Kristin
I know most of the FG forum is Linux oriented but I
would like to stick with win 98 as I have some other
hardware issues with switching OS's (mouse from ps2 to
ser port, modem does not work etc...) I also have
little or no $$$ to spend. My CH stick was $2 at a
thrift store, can't afford to go to Walmart and spring
$$ for a USB one. So I need to get this one working. I
probably do not need a full blown joystick file just
some information as to how to modify one of the files
already existing. Perhaps add the lines for added
buttons from a 2 or 3 button gameport stick already in
the distribution for windows.
Once you've worked out how the os you're using sees your joystick (name,
button & axis numbers), you can simply copy an existing joystick xml, open it
in a text editor, change the <name></name> tag to match your joystick, and
configure the buttons and axis as required (copy and paste from existing
files, change the button/axis numbers to suit). Once you're happy with it,
make sure to add a <js-named include="Input/Joysticks/CH/name_of_your.xml"/>
to joysticks.xml in the flightgear root.

--
Laurie Bradshaw
Melchior FRANZ
2005-06-20 12:29:16 UTC
Permalink
Post by Laurie Bradshaw
Once you've worked out how the os you're using sees your joystick (name,
button & axis numbers), you can simply copy an existing joystick xml, open it
in a text editor, change the <name></name> tag to match your joystick, and
configure the buttons and axis as required (copy and paste from existing
files, change the button/axis numbers to suit).
Exactly, whereby the name can be obtained by running "js_demo(.exe)".
However ...
Post by Laurie Bradshaw
Once you're happy with it,
make sure to add a <js-named include="Input/Joysticks/CH/name_of_your.xml"/>
to joysticks.xml in the flightgear root.
... this isn't necessary/possible in the upcoming v0.9.9 (or cvs/head).
Here saving the file somewhere in $FG_ROOT/Input/Joysticks/ is enough for
fgfs to pick it up. Consider to submit configs for which we don't have
a driver yet.

Also, there's no default js on a fixed position in the next version.
Rather: the joystick driver with <name>default</name> is used as default.
(Could be changed if this turns out to be problematic for some reason.
But nobody complained yet. :-)

m.
Laurie Bradshaw
2005-06-20 13:37:44 UTC
Permalink
Post by Melchior FRANZ
Post by Laurie Bradshaw
Once you've worked out how the os you're using sees your joystick (name,
button & axis numbers), you can simply copy an existing joystick xml,
open it in a text editor, change the <name></name> tag to match your
joystick, and configure the buttons and axis as required (copy and paste
from existing files, change the button/axis numbers to suit).
Exactly, whereby the name can be obtained by running "js_demo(.exe)".
Just out of curiosity, what is fgjs for? I can't work out what to do with the
output.. old method of doing things? Could I modify it to produce xml output
instead?
Post by Melchior FRANZ
Post by Laurie Bradshaw
Once you're happy with it,
make sure to add a <js-named
include="Input/Joysticks/CH/name_of_your.xml"/> to joysticks.xml in the
flightgear root.
... this isn't necessary/possible in the upcoming v0.9.9 (or cvs/head).
Here saving the file somewhere in $FG_ROOT/Input/Joysticks/ is enough for
fgfs to pick it up. Consider to submit configs for which we don't have
a driver yet.
Cool, took me about 10 mins to work out I needed to edit joysticks.xml first
time.. much easier that way :)

--
Laurie Bradshaw
Melchior FRANZ
2005-06-21 13:26:40 UTC
Permalink
Post by Laurie Bradshaw
Just out of curiosity, what is fgjs for? I can't work out what to do with the
output.. old method of doing things?
You can use the output on the command line, or better: in a ~/.fgfsrc file,
line by line. Should be explained in $FG_ROOT/Docs/README.joystick.html
The XML method is preferred for joysticks nowadays. The --prop:/ command
is still very useful for other settings.
Post by Laurie Bradshaw
Could I modify it to produce xml output instead?
Who could stop you? ;-) Yes, that's probably a good idea, maybe have both
ways and a switch to select (--xml or --prop or something).

m.
Laurie Bradshaw
2005-06-22 23:49:00 UTC
Permalink
Post by Melchior FRANZ
Post by Laurie Bradshaw
Just out of curiosity, what is fgjs for? I can't work out what to do with
the output.. old method of doing things?
You can use the output on the command line, or better: in a ~/.fgfsrc file,
line by line. Should be explained in $FG_ROOT/Docs/README.joystick.html
Yep, I do usually rtfm first :)
Post by Melchior FRANZ
The XML method is preferred for joysticks nowadays. The --prop:/ command
is still very useful for other settings.
Post by Laurie Bradshaw
Could I modify it to produce xml output instead?
Who could stop you? ;-) Yes, that's probably a good idea, maybe have both
ways and a switch to select (--xml or --prop or something).
OK, I have an fgjs.cxx producing working --xml & --prop outputs (and the
obligatory --help).
I also added a --deadband <float> option, as simply breathing on my joystick
seems to count as moving an axis without it, also confirmation for each
control that it was the control you wished to move/press, on the basis that
starting over is more annoying that pressing 'y' 16 times.
I tweaked the available controls a bit too (mainly added some).
Any preferences for submission?

--
Laurie Bradshaw
Melchior FRANZ
2005-06-23 06:42:55 UTC
Permalink
Post by Laurie Bradshaw
OK, I have an fgjs.cxx producing working --xml & --prop outputs (and the
obligatory --help). [...] I also added a --deadband <float> option, [...]
I tweaked the available controls a bit too (mainly added some).
Sounds great!
Post by Laurie Bradshaw
Any preferences for submission?
Either send the while file(s) with a description to Curt, or a unified diff
against CVS/HEAD to one of the other developers. (Erik is always happy about
post. ;-) You can also send the diff to the developers list (if it isn't too
long, otherwise a link to it somewhere on the net).

$ cvs diff -pu fgjs.cxx > fgjs.diff

m.
Erik Hofman
2005-06-23 08:00:18 UTC
Permalink
Post by Melchior FRANZ
against CVS/HEAD to one of the other developers. (Erik is always happy about
post. ;-) You can also send the diff to the developers list (if it isn't too
Bah :-)

Erik
Laurie Bradshaw
2005-06-23 15:13:46 UTC
Permalink
Post by Melchior FRANZ
Post by Laurie Bradshaw
Any preferences for submission?
Either send the while file(s) with a description to Curt, or a unified diff
against CVS/HEAD to one of the other developers. (Erik is always happy
about post. ;-) You can also send the diff to the developers list (if it
isn't too long, otherwise a link to it somewhere on the net).
Sent the file to Curt, I had done a diff against 0.9.8, but it was larger than
the modified file itself..

I've been thinking about the chicken/egg problem with terrasync.. I think it
could be solved (on startup at least) with something like a 'terrainit'
command that accepts --lat, --lon, --airport, --vor, --ndb, --fix & a switch
to silently drop switches it doesn't understand, and fetches the required
scenery, called from a wrapper shell script/batch file, like:

terrainit --ignore-unknown $*
fgfs $*

I could see a '--fetch-airports' switch being useful for fgrun users too..
Any thoughts?

--
Laurie Bradshaw

Loading...