diff --git a/TeamCode/src/main/java/teamcode/Robot.java b/TeamCode/src/main/java/teamcode/Robot.java index 95db4a1..b19c07e 100644 --- a/TeamCode/src/main/java/teamcode/Robot.java +++ b/TeamCode/src/main/java/teamcode/Robot.java @@ -46,7 +46,6 @@ import trclib.timer.TrcTimer; public class Robot { private static final String moduleName = Robot.class.getSimpleName(); - private static final double STATUS_UPDATE_INTERVAL = 0.1; // 100 msec // Global objects. public final FtcOpMode opMode; public final TrcDbgTrace globalTracer; @@ -255,11 +254,11 @@ public class Robot */ public void updateStatus() { - if (TrcTimer.getCurrentTime() > nextStatusUpdateTime) + double currTime = TrcTimer.getCurrentTime(); + if (currTime > nextStatusUpdateTime) { int lineNum = 2; - - nextStatusUpdateTime += STATUS_UPDATE_INTERVAL; + nextStatusUpdateTime = currTime + RobotParams.Robot.DASHBOARD_UPDATE_INTERVAL; if (robotDrive != null) { dashboard.displayPrintf(lineNum++, "DriveBase: Pose=%s", robotDrive.driveBase.getFieldPosition());