View Single Post
  #2   Spotlight this post!  
Unread 23-02-2007, 12:35
kaszeta's Avatar
kaszeta kaszeta is offline
Registered User
FRC #0095 (Grasshoppers)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Lebanon, NH
Posts: 334
kaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of light
Re: Inverting a joystick axis in arcade mode

Quote:
Originally Posted by gabrielse View Post
The only way I know how to work around this problem is to rewrite the arcade function (using the default MPLab 1-joystick drive code as a model). Our rookie programmer won't have time to do that.
Not quite. None of the modes for the Chicklet use the "aux" analog input for a real axis, they use them for encoding buttons. So, if no buttons are pressed p1_aux (or whatever port you're using) should be larger than 127 all the time if you are using the chicklet. So do a check for that, and if p1_aux is significantly greater than 127, switch the X axis.

I've considered something similar to make sure nothing goes weird if our chicklet is malfunctioning.

Not that unless you're in your fix-it window, you shouldn't be coding right now, however.