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