View Single Post
  #7   Spotlight this post!  
Unread 10-02-2002, 16:25
Joe Johnson's Avatar Unsung FIRST Hero
Joe Johnson Joe Johnson is offline
Engineer at Medrobotics
AKA: Dr. Joe
FRC #0088 (TJ2)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1996
Location: Raynham, MA
Posts: 2,644
Joe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond repute
A trick to see Delta_t easily...

The following code has the lights up just on LED at a time on the OI. For me, it is easier to see.

Joe J.


Quote:
PacketsMissed VAR delta_t


' put the following just after the serin command
PacketsMissed = delta_t +1

'I know the above is sort of "unclean" code because it is not obvious that a variable on the right side of the equation is also on the left, but for me it tells me that I have changed the definition of delta_t to something more to my liking. After I have incremented delta_t, I never refer to delta_t any more, only PacketsMissed


OUTS.lowbyte = 1 << PacketsMissed

'continue with code...