|
Re: Roborio CPU what is resonable
So a robot program with nothing running causes about 30% cpu usage by default. This is inherent to the driver station thread, and slow IPC calls on arm linux, which are used to get the driver station values and joysticks. We are currently working on some fixes for this, but for the 2017 season the slow calls all happen on a separate thread, so other threads should be free to do as they please.
I would have to see your code, but depending on how the joystick code is written, and some other things, it is really easy for code usage to get out of hand really quick. One of the big things currently is a call to any of the Driver Station status checks (IsOperatorControl(), IsAutonomous() etc..) or accessing any joystick properties other then axes, povs or buttons will be a fairly slow call (relatively, 100-200us vs the expected 1us or so) and can cause the RoboRIO to show excess CPU usage when in reality it is probably OK.
__________________
All statements made are my own and not the feelings of any of my affiliated teams.
Teams 1510 and 2898 - Student 2010-2012
Team 4488 - Mentor 2013-2016
Co-developer of RobotDotNet, a .NET port of the WPILib.
|