mirror of
https://github.com/trc492/FtcTemplate.git
synced 2025-07-03 05:51:24 -07:00
Sync'd with FRC.
This commit is contained in:
@ -46,7 +46,6 @@ import trclib.timer.TrcTimer;
|
|||||||
public class Robot
|
public class Robot
|
||||||
{
|
{
|
||||||
private static final String moduleName = Robot.class.getSimpleName();
|
private static final String moduleName = Robot.class.getSimpleName();
|
||||||
private static final double STATUS_UPDATE_INTERVAL = 0.1; // 100 msec
|
|
||||||
// Global objects.
|
// Global objects.
|
||||||
public final FtcOpMode opMode;
|
public final FtcOpMode opMode;
|
||||||
public final TrcDbgTrace globalTracer;
|
public final TrcDbgTrace globalTracer;
|
||||||
@ -255,11 +254,11 @@ public class Robot
|
|||||||
*/
|
*/
|
||||||
public void updateStatus()
|
public void updateStatus()
|
||||||
{
|
{
|
||||||
if (TrcTimer.getCurrentTime() > nextStatusUpdateTime)
|
double currTime = TrcTimer.getCurrentTime();
|
||||||
|
if (currTime > nextStatusUpdateTime)
|
||||||
{
|
{
|
||||||
int lineNum = 2;
|
int lineNum = 2;
|
||||||
|
nextStatusUpdateTime = currTime + RobotParams.Robot.DASHBOARD_UPDATE_INTERVAL;
|
||||||
nextStatusUpdateTime += STATUS_UPDATE_INTERVAL;
|
|
||||||
if (robotDrive != null)
|
if (robotDrive != null)
|
||||||
{
|
{
|
||||||
dashboard.displayPrintf(lineNum++, "DriveBase: Pose=%s", robotDrive.driveBase.getFieldPosition());
|
dashboard.displayPrintf(lineNum++, "DriveBase: Pose=%s", robotDrive.driveBase.getFieldPosition());
|
||||||
|
Reference in New Issue
Block a user