|
use delta_t or packet_num for more stable counting...
Posted by Joe Johnson at 1/31/2001 10:21 PM EST
Engineer on team #47, Chief Delphi, from Pontiac Central High School and Delphi Automotive Systems.
In Reply to: Re: HELP!!! PBasic and I just don't get along!!!
Posted by Nick on 1/31/2001 8:58 PM EST:
My only improvement on the code given by Nick is to use
the packet_num or delta_t to increment the counter.
By using this method you can have relatively stable
timing even if your program goes insane or your radio
signal gets very noise. In those cases, it can take a
LONG time to get through a loop. But you still get
relatively stable timing because delta_t and packet_num
have the information that let you keep track of
approximately how long it took to get through the loop.
BOTTOM LINE:
set the config's to used Delta_t
change Nick's count increment line to:
coun = coun + 1 + Delta_t
Joe J.
__________________
This message was archived from an earlier forum system. Some information may have been left out. Start new discussion in the current forums, and refer back to these threads when necessary.
|