Skip to content

Commit c9578f9

Browse files
fixing test auto drive
1 parent 97e71b3 commit c9578f9

File tree

1 file changed

+12
-10
lines changed
  • TeamCode/src/main/java/org/firstinspires/ftc/teamcode/opmode

1 file changed

+12
-10
lines changed

TeamCode/src/main/java/org/firstinspires/ftc/teamcode/opmode/TestAuto.java

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,14 @@ public void runOpMode() throws InterruptedException {
9797
.lineTo(new Vector2d(10, -36))
9898
.turn(Math.toRadians(90))
9999

100-
101-
.waitSeconds(10)
102-
.splineToSplineHeading(new Pose2d(11, -36, Math.toRadians(180)), Math.toRadians(180))
103-
.addDisplacementMarker(()->{
100+
.addTemporalMarker(() ->{
104101
//ARM DROPS PIXEL
105-
android.util.Log.i("DROP", "seconddDrop");
102+
android.util.Log.i("DROP", "Drop");
103+
106104
})
105+
106+
.splineToSplineHeading(new Pose2d(11, -36, Math.toRadians(180)), Math.toRadians(180))
107+
107108
.turn(Math.toRadians(180))
108109

109110
.splineToSplineHeading(new Pose2d(3 * 12 + 5, -3 * 12, 0), 0)
@@ -115,19 +116,19 @@ public void runOpMode() throws InterruptedException {
115116
traj = drive.trajectorySequenceBuilder(startPose)
116117
.lineTo(new Vector2d(16, -36))
117118
.turn(Math.toRadians(-90))
118-
.addDisplacementMarker(() ->{
119+
.addTemporalMarker(() ->{
119120
//ARM DROPS PIXEL
120121
android.util.Log.i("DROP", "drop");
121122
})
122-
123+
.lineTo(new Vector2d(startPose.getX(), startPose.getY()))
123124
.splineToSplineHeading(new Pose2d(3 * 12 + 5, -3 * 12, 0), 0)
124125
.build();
125126
break;
126127
case CENTER:
127128

128129
traj = drive.trajectorySequenceBuilder(startPose)
129130
.lineTo(new Vector2d(16, -36))
130-
.addDisplacementMarker(() -> {
131+
.addTemporalMarker(() -> {
131132
//ARM DROPS PIXEL
132133
android.util.Log.i("DROP", "drop");
133134

@@ -146,7 +147,7 @@ public void runOpMode() throws InterruptedException {
146147

147148
.turn(Math.toRadians(90))
148149

149-
.addDisplacementMarker(() -> {
150+
.addTemporalMarker(() -> {
150151
//PIXEL DROP
151152

152153
android.util.Log.i("DROP", "drop");
@@ -169,6 +170,7 @@ public void runOpMode() throws InterruptedException {
169170
//PIXEL DROP
170171
android.util.Log.i("DROP", "drop");
171172
})
173+
.lineTo(new Vector2d(startPose.getX(), startPose.getY()))
172174
//.splineToSplineHeading(new Pose2d(3*12 + 5, -3*12, 0), 0)
173175
.lineToSplineHeading(new Pose2d(2 * 12, -3 * 12 + 2, Math.toRadians(90)))
174176
.lineToSplineHeading(new Pose2d(3 * 12 + 5, -3 * 12 + 2, 0))
@@ -177,7 +179,7 @@ public void runOpMode() throws InterruptedException {
177179
case CENTER:
178180
traj = drive.trajectorySequenceBuilder(startPose)
179181
.lineTo(new Vector2d(startPose.getX(), -3 * 12 + 2)) // drive forward to prevent the spline from cutting through the poles
180-
.addDisplacementMarker(() -> {
182+
.addTemporalMarker(() -> {
181183
//PIXEL DROP
182184
android.util.Log.i("DROP", "drop");
183185
})

0 commit comments

Comments
 (0)