View Single Post
  #2   Spotlight this post!  
Unread 17-02-2006, 06:37
aaronm_k aaronm_k is offline
Registered User
no team
 
Join Date: Jan 2006
Rookie Year: 2006
Location:  
Posts: 10
aaronm_k is on a distinguished road
Re: Digital inputs in autonomous mode?

Quote:
Originally Posted by Calvin
I've noticed that we have pwm and relay set to 127 and 0... but nothing set for digital, will digital inputs work during the autonomous?

I mean can I go ahead and say:

if(!rc_dig_in12)
{
DestoryPlanetEarth();
}

Also, one more question: I don't have a switch box built for the Competition port... yet... Is there a way I can enable the autonomous mode through a button on a joystick?

Thank you for your help in advance!
Digital controller inputs (such as rc_dig_in12) will work in autonomous mode, as they are plugged directly into the RC. Digital OI inputs, on the other hand, will not work as the OI is disabled during autonomous mode.

If you want to simulate autonomous mode using a joystick button, open main.c and change line 52 to:
Code:
if (autonomous_mode || p2_sw_top)
and open user_routines_fast.c and change line 105 to:
Code:
while (autonomous_mode || p2_sw_top)
where p2_sw_top is the joystick button you want to use.