|
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
|