|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Re: Hello from Team 11999!
Quote:
/*** * * waitForTick implements a periodic delay. However, this acts like a metronome with a regular * periodic tick. This is used to compensate for varying processing times for each cycle. * The function looks at the elapsed cycle time, and sleeps for the remaining time interval. * * @param periodMs Length of wait cycle in mSec. */ public void waitForTick(long periodMs) { long remaining = periodMs - (long)period.milliseconds(); // sleep for the remaining portion of the regular cycle period. if (remaining > 0) { try { Thread.sleep(remaining); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } } // Reset the cycle clock for the next pass. period.reset(); } |
|
#2
|
|||
|
|||
|
Re: Hello from Team 11999!
Awesome! Thank you.
|
|
#3
|
||||
|
||||
|
Re: Hello from Team 11999!
I got so confused for a second because I was in FRC thinking mode and was like, 11999????? WAY too many numbers there! And then I stopped to think, and yah. I haven't slept very much lately.
![]() |
|
#4
|
|||
|
|||
|
Re: Hello from Team 11999!
Yeah we are FTC, and this is my first year in the robotics world. So far it has been exciting and fun.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|