mirror of
https://github.com/trc492/FtcTemplate.git
synced 2025-07-01 04:51:23 -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;
|
||||
|
||||
case Y:
|
||||
if (driverAltFunc && pressed)
|
||||
if (pressed)
|
||||
{
|
||||
robot.globalTracer.traceInfo(moduleName, ">>>>> Cancel all.");
|
||||
robot.cancelAll();
|
||||
if (driverAltFunc)
|
||||
{
|
||||
robot.globalTracer.traceInfo(moduleName, ">>>>> Cancel all.");
|
||||
robot.cancelAll();
|
||||
}
|
||||
else
|
||||
{
|
||||
robot.globalTracer.traceInfo(moduleName, ">>>>> Turtle mode.");
|
||||
robot.turtle();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -40,6 +40,7 @@ import trclib.robotcore.TrcDbgTrace;
|
||||
import trclib.robotcore.TrcEvent;
|
||||
import trclib.robotcore.TrcRobot;
|
||||
import trclib.sensor.TrcDigitalInput;
|
||||
import trclib.subsystem.TrcSubsystem;
|
||||
import trclib.timer.TrcTimer;
|
||||
|
||||
/**
|
||||
@ -280,6 +281,7 @@ public class Robot
|
||||
globalTracer.traceInfo(moduleName, "Cancel all operations.");
|
||||
// Cancel subsystems.
|
||||
if (robotDrive != null) robotDrive.cancel();
|
||||
TrcSubsystem.cancelAll();
|
||||
// Cancel auto tasks.
|
||||
} //cancelAll
|
||||
|
||||
@ -291,8 +293,19 @@ public class Robot
|
||||
*/
|
||||
public void zeroCalibrate(String owner, TrcEvent event)
|
||||
{
|
||||
globalTracer.traceInfo(moduleName, "Zero calibrate all subsystems.");
|
||||
TrcSubsystem.zeroCalibrateAll(owner, event);
|
||||
} //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.
|
||||
*
|
||||
|
Submodule TeamCode/src/main/java/trclib updated: 1d053febdd...fa7d1591a2
Reference in New Issue
Block a user