mirror of
https://github.com/trc492/FtcTemplate.git
synced 2025-07-01 13:01:24 -07:00
Updated trclib, ftclib.
Added code to zeroCalibrate, cancelAll and added turtle.
This commit is contained in:
Submodule TeamCode/src/main/java/ftclib updated: 6358a7e46b...8f2ae308ba
@ -326,10 +326,18 @@ public class FtcTeleOp extends FtcOpMode
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case Y:
|
case Y:
|
||||||
if (driverAltFunc && pressed)
|
if (pressed)
|
||||||
{
|
{
|
||||||
robot.globalTracer.traceInfo(moduleName, ">>>>> Cancel all.");
|
if (driverAltFunc)
|
||||||
robot.cancelAll();
|
{
|
||||||
|
robot.globalTracer.traceInfo(moduleName, ">>>>> Cancel all.");
|
||||||
|
robot.cancelAll();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
robot.globalTracer.traceInfo(moduleName, ">>>>> Turtle mode.");
|
||||||
|
robot.turtle();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -40,6 +40,7 @@ import trclib.robotcore.TrcDbgTrace;
|
|||||||
import trclib.robotcore.TrcEvent;
|
import trclib.robotcore.TrcEvent;
|
||||||
import trclib.robotcore.TrcRobot;
|
import trclib.robotcore.TrcRobot;
|
||||||
import trclib.sensor.TrcDigitalInput;
|
import trclib.sensor.TrcDigitalInput;
|
||||||
|
import trclib.subsystem.TrcSubsystem;
|
||||||
import trclib.timer.TrcTimer;
|
import trclib.timer.TrcTimer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -280,6 +281,7 @@ public class Robot
|
|||||||
globalTracer.traceInfo(moduleName, "Cancel all operations.");
|
globalTracer.traceInfo(moduleName, "Cancel all operations.");
|
||||||
// Cancel subsystems.
|
// Cancel subsystems.
|
||||||
if (robotDrive != null) robotDrive.cancel();
|
if (robotDrive != null) robotDrive.cancel();
|
||||||
|
TrcSubsystem.cancelAll();
|
||||||
// Cancel auto tasks.
|
// Cancel auto tasks.
|
||||||
} //cancelAll
|
} //cancelAll
|
||||||
|
|
||||||
@ -291,8 +293,19 @@ public class Robot
|
|||||||
*/
|
*/
|
||||||
public void zeroCalibrate(String owner, TrcEvent event)
|
public void zeroCalibrate(String owner, TrcEvent event)
|
||||||
{
|
{
|
||||||
|
globalTracer.traceInfo(moduleName, "Zero calibrate all subsystems.");
|
||||||
|
TrcSubsystem.zeroCalibrateAll(owner, event);
|
||||||
} //zeroCalibrate
|
} //zeroCalibrate
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method retracts all appendages for robot high speed travelling.
|
||||||
|
*/
|
||||||
|
public void turtle()
|
||||||
|
{
|
||||||
|
globalTracer.traceInfo(moduleName, "Turtle mode.");
|
||||||
|
TrcSubsystem.resetStateAll();
|
||||||
|
} //turtle
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method sets the robot's starting position according to the autonomous choices.
|
* This method sets the robot's starting position according to the autonomous choices.
|
||||||
*
|
*
|
||||||
|
Submodule TeamCode/src/main/java/trclib updated: 1d053febdd...fa7d1591a2
Reference in New Issue
Block a user