Thread: c debugger
View Single Post
  #15   Spotlight this post!  
Unread 09-12-2004, 13:12
Dave Flowerday Dave Flowerday is offline
Software Engineer
VRC #0111 (Wildstang)
Team Role: Engineer
 
Join Date: Feb 2002
Rookie Year: 1995
Location: North Barrington, IL
Posts: 1,366
Dave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond repute
Re: c debugger

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.