delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/05/26/20:49:24

From: "Gregorio Hankiewicz" <gregorio AT jet DOT es>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: analog joystick (allegro)
Date: 26 May 1997 19:08:42 GMT
Organization: Unisource Espana NEWS SERVER
Lines: 21
Message-ID: <01bc6a09$147827c0$fdb4e0c2@pentium-120>
References: <199705260725 DOT JAA20044 AT gil DOT physik DOT rwth-aachen DOT de>
NNTP-Posting-Host: info253.jet.es
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

> Coordinates jump randomly in a +20/-20 units range of the
> total +255 - 256 full scale range.
> 
> Can one do anything about it in hardware? Like shielding ?
> I might filter this out by masking off the four least significant
> bits of the coordinate values but I'd hate to do this.

Make sure you calibrate it, and then divide the output number by the number
of pixels or 'steps' you would like to check.
This means: if you want to make the ship/graphic/guy/beautiful
woman/whatever move at 3 different speeds, divide the output by 3 ant there
you are. The you check, if result==0 then don't do anything, if result==1
then move slowly, etc.
Email me if you want to get a source code using this method of 'steps'

-- 

Have a nice day :)
        G.A. Hankiewicz
        gregorio AT jet DOT es, http://web.jet.es/gregorio

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019