View Single Post
  #7   Spotlight this post!  
Unread 04-03-2004, 15:17
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,851
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Why doesn't this work??!??!!?!!!?!?

Here are a couple of corrections.
Code:
 
void User_Autonomous_Code(void)
{
	while (autonomous_mode)
	{
		if (statusflag.NEW_SPI_DATA)
		{
			Getdata(&rxdata); // bad things will happen if you move or delete this
 
			// Autonomous code goes here.
//		 digital_io_1 = 1; /* Belongs in User_Initialization */
			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); // even more bad things will happen if you mess with this
		}
	}
}
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 04-03-2004 at 15:20.