View Single Post
  #3   Spotlight this post!  
Unread 08-03-2008, 11:25
Lakeeffect1674 Lakeeffect1674 is offline
Registered User
FRC #1674
 
Join Date: Jan 2007
Location: Onekama, Michigan
Posts: 18
Lakeeffect1674 is an unknown quantity at this point
Re: Code error with while loops??

what function do I put that code under?
I tried puting it in the same place as my while loop, but it didn't do anything.
timer = 0;
while (autonomous_mode) /* DO NOT CHANGE! */
{
if (statusflag.NEW_SPI_DATA) /* 26.2ms loop area */
{
timer++;
Getdata(&rxdata); /* DO NOT DELETE, or you will be stuck here forever! */
//Put your code here
if (timer < 900){
pwm13 = pwm14 = pwm15 = pwm16 = 255;
}
else {
pwm13 = pwm14 = pwm15 = pwm16 = 127;
}
//ect.

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