mirror of
https://github.com/TimeCrafters/UltimateGoal.git
synced 2025-12-15 05:52:35 +00:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -8,6 +8,7 @@ public class CaydenFirstState extends CyberarmState {
|
||||
|
||||
//here, you'll find some of your variables. you can add more as you need them.
|
||||
private Robot robot;
|
||||
private double variable=1;
|
||||
|
||||
//This is the constructor. It lets other code bits run use the code you put here
|
||||
public CaydenFirstState(Robot robot) {
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
package org.timecrafters.javaClass.cayden;
|
||||
|
||||
import org.cyberarm.engine.V2.CyberarmState;
|
||||
import org.timecrafters.UltimateGoal.Competition.Robot;
|
||||
|
||||
public class Cayden_Autonomous extends CyberarmState {
|
||||
private Robot robot;
|
||||
private double variable=.5;
|
||||
|
||||
|
||||
|
||||
|
||||
public Cayden_Autonomous(Robot robot) {
|
||||
this.robot = robot;
|
||||
}
|
||||
@Override
|
||||
public void exec() {
|
||||
|
||||
robot.driveFrontRight.setPower(variable);
|
||||
robot.driveBackRight.setPower(variable);
|
||||
robot.driveFrontLeft.setPower(variable);
|
||||
robot.driveBackLeft.setPower(variable);
|
||||
|
||||
if (robot.encoderLeft.getCurrentPosition()>=300){
|
||||
variable=0;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user