Does anyone know if there is a built-in function to get the current tick rate of a specific mode (auto, teleop, robot etc.). I’ve noticed that they are never quite similar or consistent and we need to do some time-based code. We use Java.
Can you clarify what you mean by “tick rate”? Also would be helpful to know what language you’re working in.
Sry, our comp is tmrw so I am kind of rushed. The rate I mentioned is how often the robot runs code in a specific mode such as auto in milliseconds. We use a timed-based robot and code in Java.
If your Robot class is inheriting from TimedRobot (extends TimedRobot
), then you have (fairly) consistently timed iterations. The main loop will execute the *Periodic()
methods on each iteration of a 50Hz (20ms) loop. This is the same frequency that the driver station is sending data to the robot.
Can you expand on why you believe it’s inconsistent?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.