View Single Post
  #30   Spotlight this post!  
Unread 31-01-2013, 13:39
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,125
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Velocity PID Programming: Terms dependent on time

Quote:
Originally Posted by kenfox View Post
WPILib uses these routines outside of critical regions, so I assume they are either lock-free or have their own independent locks.
My concern was along the following lines. If any of the layers has code like this (pardon the X86speak):

Code:
INCORRECT!!
cli   // disable interrupts
/* do something uninterruptable here */
sti   // enable interrupts
... instead of this:

Code:
CORRECT:
pushf // save interrupt state
cli   // disable interrupts
/* do something uninterruptable here */
popf  // restore saved interrupt state
.. then you can't reliably use cli in your application code.


Quote:
It looks like the FPGA clock is preferred since the other ways of grabbing a timestamp aren't used by WPILib except in Vision.
What the overhead of accessing the FPGA, compared to reading the PPC clock?

Quote:
Testing may be the best way to answer these questions ... I'll collect some data on our cRIOs tomorrow.
Excellent !