View Single Post
  #8   Spotlight this post!  
Unread 20-01-2003, 09:24
virusmirusne virusmirusne is offline
Registered User
#1083 (The Crew)
 
Join Date: Jan 2003
Location: Orlando, Florida
Posts: 23
virusmirusne is an unknown quantity at this point
Send a message via AIM to virusmirusne
In regards to the flightstick... have you guys noticed your joysticks behaving backwards?

PWM1 = (((2000 + p1_y - p1_x + 127) Min 2000 Max 2254) - 2000)
PWM2 = (((2000 + p1_y + p1_x - 127) Min 2000 Max 2254) - 2000)

The thing is, though... that formula won't work when calculating with theoretical values... But when plugged into the program it works like a charm... We did one of these:

relay1_fwd = off
if p1_x< 200 then dumb
relay1_fwd = on
dumb:

relay1_rev = off
if p1_x> 100 then dumber
relay1_rev = on
dumber:


And sure enough, the joystick reads for values less than 100 when you push to the right and greater than 200 when you push to the left.