mirror of
https://github.com/TimeCrafters/UltimateGoal.git
synced 2025-12-16 14:02:34 +00:00
Extra last-minute bit for Caden
This commit is contained in:
@@ -0,0 +1,22 @@
|
|||||||
|
package org.timecrafters.javaClass.aubrey;
|
||||||
|
|
||||||
|
import org.cyberarm.engine.V2.CyberarmState;
|
||||||
|
import org.timecrafters.javaClass.samples.SampleRobot;
|
||||||
|
|
||||||
|
public class CadenFirstState extends CyberarmState {
|
||||||
|
|
||||||
|
//here, you'll find some of your variables. you can add more as you need them.
|
||||||
|
private SampleRobot robot;
|
||||||
|
|
||||||
|
//This is the constructor. It lets other code bits run use the code you put here
|
||||||
|
public CadenFirstState(SampleRobot robot) {
|
||||||
|
this.robot = robot;
|
||||||
|
}
|
||||||
|
|
||||||
|
//This is a method. methods are bits of code that can be run elsewhere.
|
||||||
|
//This one is set up to repeat every few milliseconds
|
||||||
|
@Override
|
||||||
|
public void exec() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package org.timecrafters.javaClass.samples;
|
||||||
|
|
||||||
|
import com.qualcomm.robotcore.eventloop.opmode.Autonomous;
|
||||||
|
|
||||||
|
import org.cyberarm.engine.V2.CyberarmEngine;
|
||||||
|
import org.timecrafters.UltimateGoal.Competition.Robot;
|
||||||
|
import org.timecrafters.javaClass.spencer.SpencerFirstState;
|
||||||
|
|
||||||
|
@Autonomous (name = "Caden: First Program", group = "caden")
|
||||||
|
public class CadenrFirstEngine extends CyberarmEngine {
|
||||||
|
|
||||||
|
SampleRobot robot;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void init() {
|
||||||
|
robot = new SampleRobot(hardwareMap);
|
||||||
|
robot.initHardware();
|
||||||
|
robot.wobbleGrabServo.setPosition(Robot.WOBBLE_SERVO_CLOSED);
|
||||||
|
super.init();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setup() {
|
||||||
|
addState(new SpencerFirstState(robot));
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user