View Single Post
  #6   Spotlight this post!  
Unread 03-02-2008, 19:22
lukevanoort lukevanoort is offline
in between teams
AKA: Luke Van Oort
no team
 
Join Date: Oct 2005
Rookie Year: 2005
Location: Waterloo, ON, Canada
Posts: 1,873
lukevanoort has a reputation beyond reputelukevanoort has a reputation beyond reputelukevanoort has a reputation beyond reputelukevanoort has a reputation beyond reputelukevanoort has a reputation beyond reputelukevanoort has a reputation beyond reputelukevanoort has a reputation beyond reputelukevanoort has a reputation beyond reputelukevanoort has a reputation beyond reputelukevanoort has a reputation beyond reputelukevanoort has a reputation beyond repute
Send a message via AIM to lukevanoort
Re: Programing joystick buttons

Quote:
Originally Posted by ShotgunNinja View Post
In EasyC, you could do it in about 6 lines of code.
I'm surprised it takes that much. In MPLAB, it is just four:
Code:
if(p1_sw_top)
   pwm01 = 254;
else
   pwm01 = 127;
or five:

Code:
if(p1_sw_top){
   pwm01 = 254;
} else {
   pwm01 = 127;
}
depending on your coding styles.

p1_sw_top is the top button on CH flightsticks and, I believe, one of the buttons on the top of the AVB Top Shots. I think the thumb button is either another trigger or top button... the wiring in those AVB sticks is darn confusing.
__________________
Team 1219: 2009 - Mentor
Team 587: 2005 - Animator, 2006-2008 - Team Captain