View Single Post
  #4   Spotlight this post!  
Unread 13-03-2007, 21:14
aegeon aegeon is offline
Registered User
FRC #0818
 
Join Date: Mar 2007
Location: Sterling Heights
Posts: 1
aegeon is an unknown quantity at this point
Re: Code to Read the Binary Inputs on Analog Buttons

now correct me if im wrong but isnt your use of the ? operator the same as the ! operator

im pretty sure that

p1_sw_5 = !(p1_aux&1<<7);
will do the same as
p1_sw_5=(p1_aux&1<<7)?0:1;

Last edited by aegeon : 14-03-2007 at 21:06.
Reply With Quote