View Single Post
  #1   Spotlight this post!  
Unread 06-10-2005, 21:58
CmptrGk's Avatar
CmptrGk CmptrGk is offline
Programming Mentor
AKA: Dillon
FRC #0716 (Who'sCTEKS)
Team Role: College Student
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Kent,CT
Posts: 212
CmptrGk has much to be proud ofCmptrGk has much to be proud ofCmptrGk has much to be proud ofCmptrGk has much to be proud ofCmptrGk has much to be proud ofCmptrGk has much to be proud ofCmptrGk has much to be proud ofCmptrGk has much to be proud of
on the fly vex autonomus mode

i just got the vex program module today. I'm using the code from http://www.vexlabs.com because I'm already using similar code on the FRC controller.

i would like to use rc_dig_in16 to enable and disable the autonomous mode. I've tried
Code:
 if(rc_dig_in16 == 1)
  {
	autonomous_mode = 1;
  }
  else if(rc_dig_in16 == 0)
  {
	autonomous_mode = 0;
  }
in both main.c and user_routines_fast.c

i think that my problem lies in the fact that autonomus is enabled differnetly on the vex controller because of the following code:
Code:
#if ENABLE_AUTONOMOUS_MODE
	txdata.user_cmd = 0x02;	   /* Tell master you want to be in auton mode. */
#endif
i bet i could get this to work if i knew the "code" for normal user mode i could do something like this:
Code:
if (rc_dig_in16 == 1)
{
	 txdata.user_cmd = 0x02;
}
else
{
	txdata.user_cmd = whatever is the user mode;
}
if anybody knows whether this will work or not, please help.
__________________
#14


"Great autonomous mode Dillon."," It hasn't been written yet"
after an Archimedes match


Reply With Quote