L160¶
1 file(s) copied, then 4 change(s) in 1 file(s), 5 line(s) of code to write.
Copies¶
lessons/L160HeadingHoldOpMode.javatomytry/L160HeadingHoldOpMode.java
L160HeadingHoldOpMode¶
TeamCode/src/main/java/org/firstinspires/ftc/teamcode/mytry/L160HeadingHoldOpMode.java
A change¶
Delete 0 lines, write 1 line.
--- before this change
+++ after it
@@ -8,6 +8,7 @@
import org.firstinspires.ftc.teamcode.base.CorbelsMecanum;
import org.firstinspires.ftc.teamcode.base.CorbelsTeleOp;
+import org.firstinspires.ftc.teamcode.base.HeadingHold;
import org.firstinspires.ftc.teamcode.base.Tracker;
/**
A change¶
Delete 0 lines, write 1 line.
--- before this change
+++ after it
@@ -10,6 +10,7 @@
import org.firstinspires.ftc.teamcode.base.CorbelsTeleOp;
import org.firstinspires.ftc.teamcode.base.HeadingHold;
import org.firstinspires.ftc.teamcode.base.Tracker;
+import org.firstinspires.ftc.teamcode.pedro.Constants;
/**
* L160: hold the heading the driver left. Let go of the turn stick and the
A change¶
Delete 0 lines, write 1 line.
--- before this change
+++ after it
@@ -36,6 +36,7 @@
boolean previousButtonA;
CorbelsMecanum drivetrain;
+ HeadingHold hold = new HeadingHold(Constants.foresightConfig.headingFeedback.get());
// 'public' to match the parent class. 'public' allows access from any code.
@Override
A change¶
Delete 0 lines, write 2 lines.
--- before this change
+++ after it
@@ -86,6 +86,8 @@
// When on L160S040, see
// https://msb-stitt.github.io/ftc31459-26-27-biobuzz/guide/tasks/l160.html#l160s040
// for what to do here.
+ turn = hold.turn(follower, turn);
+ Tracker.publish("heading/holding", hold.target() != null);
double strafe = deadband(-leftStickX, band);
strafe = signedSquared(strafe);