mirror of
https://github.com/TimeCrafters/CenterStage
synced 2025-12-15 16:52:35 +00:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -1,4 +1,27 @@
|
||||
package org.timecrafters.CenterStage.Autonomous.Engines;
|
||||
|
||||
public class AutoEngineSample {
|
||||
import com.qualcomm.robotcore.eventloop.opmode.Autonomous;
|
||||
import com.qualcomm.robotcore.eventloop.opmode.Disabled;
|
||||
|
||||
import org.timecrafters.CenterStage.Common.PrototypeRobot;
|
||||
|
||||
import dev.cyberarm.engine.V2.CyberarmEngine;
|
||||
|
||||
@Disabled
|
||||
@Autonomous(name = "Sample", group = "Sample", preselectTeleOp = "TeleOp")
|
||||
|
||||
public class AutoEngineSample extends CyberarmEngine {
|
||||
|
||||
PrototypeRobot robot;
|
||||
@Override
|
||||
public void setup() {
|
||||
robot = new PrototypeRobot("Hello World");
|
||||
|
||||
setupFromConfig(
|
||||
robot.configuration,
|
||||
"org.timecrafters.Autonomous.States",
|
||||
robot,
|
||||
PrototypeRobot.class,
|
||||
"Sample Auto");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,28 @@
|
||||
package org.timecrafters.CenterStage.Autonomous.States;
|
||||
|
||||
public class AutoStateSample {
|
||||
import org.timecrafters.CenterStage.Common.PrototypeRobot;
|
||||
|
||||
import dev.cyberarm.engine.V2.CyberarmState;
|
||||
|
||||
public class AutoStateSample extends CyberarmState {
|
||||
|
||||
private final boolean stateDisabled;
|
||||
PrototypeRobot robot;
|
||||
public AutoStateSample(PrototypeRobot robot, String groupName, String actionName) {
|
||||
this.robot = robot;
|
||||
this.stateDisabled = !robot.configuration.action(groupName, actionName).enabled;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void start() {
|
||||
//add variables that need to be reinitillized
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exec() {
|
||||
// do stuff
|
||||
// -------------
|
||||
// end:
|
||||
setHasFinished(true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ import dev.cyberarm.engine.V2.CyberarmEngine;
|
||||
|
||||
public class PrototypeRobot extends Robot {
|
||||
public double servoWaitTime;
|
||||
public double servoSecPerDeg = 0.14/60;;
|
||||
public double servoSecPerDeg = 0.14/60;
|
||||
public float ELBOW_COLLECT;
|
||||
public float ELBOW_DEPOSIT;
|
||||
public float SHOULDER_COLLECT;
|
||||
@@ -38,6 +38,8 @@ public class PrototypeRobot extends Robot {
|
||||
public TimeCraftersConfiguration configuration;
|
||||
|
||||
public PrototypeRobot(String string) {
|
||||
this.engine = engine;
|
||||
setup();
|
||||
this.string = string;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user