View Single Post
  #8   Spotlight this post!  
Unread 02-02-2004, 11:15
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,563
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Programming joysticks

Quote:
Originally Posted by Astronouth7303
So the bit masks are:
Code:
const unsigned char Hat_None = 0x2C;
const unsigned char Hat_Up = 0xFC;
const unsigned char Hat_Left = 0x60;
const unsigned char Hat_Right = 0xC0;
const unsigned char Hat_Down = 0x94;

//Unless values are off, Combos aren't OR'ed
const unsigned char Hat_Up_Left = 0xFC;
const unsigned char Hat_Up_Right = 0xFC;
const unsigned char Hat_Down_Left = 0xA4;
const unsigned char Hat_Down_Right = 0xD4;
Why not #define them, instead of taking up memory?