Quote:
|
Originally Posted by Mark McLeod
Just as an example, you could combine the checks on the neutral condition to make sure they don't override any other button push, e.g.,
Code:
if (p1_sw_trig == 0 & p2_sw_trig == 0) {
|
I think you want that to be:
Code:
if (p1_sw_trig == 0 && p2_sw_trig == 0) {
Generally it's best to use a logical AND (&&) and not a bitwise AND (&) when you're checking two expressions which evaluate to either true or false.