mirror of
https://github.com/trc492/FtcTemplate.git
synced 2025-07-01 13:01:24 -07:00
Minor cleanup.
This commit is contained in:
@ -103,17 +103,18 @@ public class CmdAuto implements TrcRobot.RobotCommand
|
||||
|
||||
if (state == null)
|
||||
{
|
||||
robot.dashboard.displayPrintf(8, "State: disabled or waiting (nextState=%s)...", sm.getNextState());
|
||||
robot.dashboard.displayPrintf(8, "State: disabled or waiting (nextState=" + sm.getNextState() + ")...");
|
||||
}
|
||||
else
|
||||
{
|
||||
robot.dashboard.displayPrintf(8, "State: %s", state);
|
||||
|
||||
robot.dashboard.displayPrintf(8, "State: " + state);
|
||||
robot.globalTracer.tracePreStateInfo(sm.toString(), state);
|
||||
switch (state)
|
||||
{
|
||||
case START:
|
||||
if (autoChoices.delay > 0.0)
|
||||
{
|
||||
robot.globalTracer.traceInfo(moduleName, "***** Do delay " + autoChoices.delay + "s.");
|
||||
timer.set(autoChoices.delay, event);
|
||||
sm.waitForSingleEvent(event, State.DONE);
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ public class TaskAuto extends TrcAutoTask<TaskAuto.State>
|
||||
*/
|
||||
public void autoAssist(TrcEvent completionEvent)
|
||||
{
|
||||
tracer.traceInfo(moduleName, "event=%s", completionEvent);
|
||||
tracer.traceInfo(moduleName, "event=" + completionEvent);
|
||||
startAutoTask(State.START, new TaskParams(), completionEvent);
|
||||
} //autoAssist
|
||||
|
||||
@ -113,8 +113,9 @@ public class TaskAuto extends TrcAutoTask<TaskAuto.State>
|
||||
{
|
||||
TrcOwnershipMgr ownershipMgr = TrcOwnershipMgr.getInstance();
|
||||
tracer.traceWarn(
|
||||
moduleName, "Failed to acquire subsystem ownership (currOwner=%s, robotDrive=%s).",
|
||||
currOwner, ownershipMgr.getOwner(robot.robotDrive.driveBase));
|
||||
moduleName,
|
||||
"Failed to acquire subsystem ownership (currOwner=" + currOwner +
|
||||
", robotDrive=" + ownershipMgr.getOwner(robot.robotDrive.driveBase) + ").");
|
||||
releaseSubsystemsOwnership();
|
||||
}
|
||||
|
||||
@ -132,8 +133,9 @@ public class TaskAuto extends TrcAutoTask<TaskAuto.State>
|
||||
{
|
||||
TrcOwnershipMgr ownershipMgr = TrcOwnershipMgr.getInstance();
|
||||
tracer.traceInfo(
|
||||
moduleName, "Releasing subsystem ownership (currOwner=%s, robotDrive=%s).",
|
||||
currOwner, ownershipMgr.getOwner(robot.robotDrive.driveBase));
|
||||
moduleName,
|
||||
"Releasing subsystem ownership (currOwner=" + currOwner +
|
||||
", robotDrive=" + ownershipMgr.getOwner(robot.robotDrive.driveBase) + ").");
|
||||
robot.robotDrive.driveBase.releaseExclusiveAccess(currOwner);
|
||||
currOwner = null;
|
||||
}
|
||||
@ -163,7 +165,7 @@ public class TaskAuto extends TrcAutoTask<TaskAuto.State>
|
||||
protected void runTaskState(
|
||||
Object params, State state, TrcTaskMgr.TaskType taskType, TrcRobot.RunMode runMode, boolean slowPeriodicLoop)
|
||||
{
|
||||
TaskParams taskParams = (TaskParams) params;
|
||||
TaskParams taskParams = (TaskParams) params;
|
||||
|
||||
switch (state)
|
||||
{
|
||||
|
Reference in New Issue
Block a user