View Single Post
  #1   Spotlight this post!  
Unread 14-04-2006, 00:11
kiettyyyy's Avatar
kiettyyyy kiettyyyy is offline
Registered User
FRC #1538 (The Holy Cows)
Team Role: Engineer
 
Join Date: Mar 2006
Rookie Year: 2005
Location: San Diego, CA
Posts: 181
kiettyyyy has a reputation beyond reputekiettyyyy has a reputation beyond reputekiettyyyy has a reputation beyond reputekiettyyyy has a reputation beyond reputekiettyyyy has a reputation beyond reputekiettyyyy has a reputation beyond reputekiettyyyy has a reputation beyond reputekiettyyyy has a reputation beyond reputekiettyyyy has a reputation beyond reputekiettyyyy has a reputation beyond reputekiettyyyy has a reputation beyond repute
Send a message via AIM to kiettyyyy
Can't get auto mode to run with OI switches

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;
}
else if(currentauto > 50 | currentauto < 60)
{
newautoselect = 2;
}
else if(currentauto > 100 | currentauto < 120)
{
newautoselect = 3;
}
else if(currentauto > 130 | currentauto < 150)
{
newautoselect = 4;
}
else if(currentauto > 160 | currentauto < 190)
{
newautoselect = 5;
}
else if(currentauto > 200 | currentauto < 250)
{
newautoselect = 6;
}

why doesnt auto mode pick this up?
__________________
-Kiet Chau

2004-2008 - Software Developer/Driver on Team #968
2008-2011 - Software Developer/Coach/Mentor/"Engineer" on Team #968
2011-Present - Mentor & Engineer on Team #1538
www.team1538.com