View Single Post
  #9   Spotlight this post!  
Unread 14-04-2006, 09:16
Imajie Imajie is offline
Registered User
AKA: James Letendre
FRC #0195 (Cyber Knights)
Team Role: Electrical
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Southington
Posts: 114
Imajie has much to be proud ofImajie has much to be proud ofImajie has much to be proud ofImajie has much to be proud ofImajie has much to be proud ofImajie has much to be proud ofImajie has much to be proud ofImajie has much to be proud of
Send a message via AIM to Imajie
Re: Can't get auto mode to run with OI switches

Quote:
Originally Posted by kiettyyyy
Hey all..

I have a potentiometer with detents that is mounted on the oi controller.

I have no idea whats going on.. I set up a static int newautoselect inside user_control.h,

int currentauto;

unsigned int autopos;
unsigned int temp_autopos;
int autocount;
autopos = p2_wheel;

autocount ++;

if(autocount >= 26)
{
autopos = currentauto;
}

if(currentauto > 20 | currentauto < 40)
{
newautoselect = 1;
}

why doesnt auto mode pick this up?
Wouldn't you want to use AND not OR because it would always evaluate as true with OR since it is either greater than 20 OR less than 40.