Quote:
Originally Posted by BigJ
Another alternative would be to check the difference of the system time between the start and end of each Periodic method. We use Command-based architecture in Java (System.currentTimeMillis() is available), so I'm not sure if running the Command-based Scheduler happens in a separate thread (which would make this solution incorrect).
|
The command scheduler does not run in a different thread, so this is a good approach.
Quote:
Originally Posted by BigJ
We are also not sure what kind of times would indicate a bad difference in performance. The FMS whitepaper and DS Log guide indicate that a trip time above 20ms is undesirable. If we were able to log the loop time in code, assuming we haven't changed any settings about how fast the periodic loop runs, what would be an acceptable range of computation time?
|
The 20ms time is because that is how often the driver station sends new data. If your code takes longer then 20ms to run, it will miss packets from the driver station.