View Single Post
  #6   Spotlight this post!  
Unread 22-09-2005, 06:37
Ryan M. Ryan M. is offline
Programming User
FRC #1317 (Digital Fusion)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Ohio
Posts: 1,508
Ryan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud of
Re: Array problems( i think....)

The reason (as someone sort of mentioned) that you're getting the code error is because it never calls the master_up function. (Sorry, don't remember the exact name.) If the master processor doesn't hear from your code (through that function) at least every 26 ms, it stops running the code and alerts you to a problem with the code error light.

Code:
pwm01,pwm02=127
Just to clear this up, the comma operator is valid C, however, all it does it does is create a sort of "soft" semicolon that allows you to put in a new command, but not actually end the current one. It's a little confusing, but the context you see it most often in is for loops. IE:
Code:
for(i = 0, j = 2; i < someArray[j]; i++, j++)
{
}
Overall, you don't need to use it. As a couple people said,
Code:
pwm0 = pwm02 = 127;
is what you actually want.

Good luck on this!

--EDIT--
Sorry, that was the best explaination for the comma operator I could come up with on the fly. Computer science majors, don't shoot me!
__________________


Last edited by Ryan M. : 22-09-2005 at 06:40.