Quote:
Originally Posted by ShotgunNinja
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.