Go to Post FIRST rocks, thats for sure. - Dan Richardson [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Spotlight this post!  
Unread 19-01-2016, 19:28
otherguy's Avatar
otherguy otherguy is offline
sparkE
AKA: James
FRC #2168 (The Aluminum Falcons)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: CT
Posts: 432
otherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to behold
Re: Robot Scan Time

The time elapsed is going to be approximately 20ms, but it will fluctuate depending on network latencies.

Just perform the calculation each time through the loop.

Code:
currentTime = Timer.getFPGATimestamp(); //time in seconds
elapsedTime = currentTime - lastTime;

//do your math

lastTime = currentTime;
More info on what the getFPGATimestamp method does here: http://team2168.org/javadoc/edu/wpi/...PGATimestamp--
__________________
http://team2168.org

Last edited by otherguy : 19-01-2016 at 19:31.
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 01:02.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi