View Single Post
  #1   Spotlight this post!  
Unread 22-03-2004, 10:02
omega's Avatar
omega omega is offline
Registered User
#1352
 
Join Date: Mar 2004
Location: Stratford Northwestern
Posts: 11
omega is an unknown quantity at this point
how are we going to do this

This is what we have for our automous code but we want to go from the Navigate(); to what is beneath it when both of the sensors see nothing becuase we don't want to risk loseing all of that time.



void User_Autonomous_Code(void)
{
while (autonomous_mode) /* DO NOT CHANGE! */
{
if (statusflag.NEW_SPI_DATA) /* 26.2ms loop area */
{
Getdata(&rxdata); /* DO NOT DELETE, or you will be stuck here forever! */

/* Add your own autonomous code here. */

Navigate();

if(rc_dig_in01 ==1 )
{
pwm13 = 137;
pwm14=100;
}
else
{
pwm13 = pwm14 = 140;
}
if(rc_dig_in02 == 1)
{
pwm13 = 100;
pwm14 = 137;
}
else
{
pwm13 = pwm14 = 140;
}

Generate_Pwms(pwm13,pwm14,pwm15,pwm16);

Putdata(&txdata); /* DO NOT DELETE, or you will get no PWM outputs! */
}
}
}