Skip to content

Commit 4aeaff4

Browse files
authored
Change Follower constructor to the one in Pedro 1.0.9
1 parent 187be71 commit 4aeaff4

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

user-guide/opmodes/pedropathing.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,7 @@ To do this, we will override the `onInit()` function.
254254

255255
```kotlin
256256
override fun onInit() {
257-
Constants.setConstants(FConstants::class.java, LConstants::class.java)
258-
follower = Follower(hardwareMap)
257+
follower = Follower(hardwareMap, FConstants::class.java, LConstants::class.java)
259258
follower.setStartingPose(startingPose)
260259
buildPaths()
261260
}
@@ -266,8 +265,7 @@ override fun onInit() {
266265
```java
267266
@Override
268267
public void onInit() {
269-
Constants.setConstants(FConstants.class, LConstants.class);
270-
follower = new Follower(hardwareMap);
268+
follower = new Follower(hardwareMap, FConstants.class, LConstants.class);
271269
follower.setStartingPose(startingPose);
272270
buildPaths();
273271
}
@@ -343,8 +341,7 @@ class AutonomousProgram: PedroOpMode(Claw, Lift) {
343341
)
344342

345343
override fun onInit() {
346-
Constants.setConstants(FConstants::class.java, LConstants::class.java)
347-
follower = Follower(hardwareMap)
344+
follower = Follower(hardwareMap, FConstants::class.java, LConstants::class.java)
348345
follower.setStartingPose(startingPose)
349346
buildPaths()
350347
}
@@ -393,8 +390,7 @@ public class AutonomousProgram extends PedroOpMode {
393390

394391
@Override
395392
public void onInit() {
396-
Constants.setConstants(FConstants.class, LConstants.class);
397-
follower = new Follower(hardwareMap);
393+
follower = new Follower(hardwareMap, FConstants.class, LConstants.class);
398394
follower.setStartingPose(startingPose);
399395
buildPaths();
400396
}

0 commit comments

Comments
 (0)