mirror of
https://github.com/Team4388/2025RidgeScape.git
synced 2026-06-09 00:38:02 -06:00
Add codes
This commit is contained in:
@@ -78,6 +78,8 @@ public class GotoLastApril extends Command {
|
||||
youtput *= Math.abs(yerr) < AutoConstants.XY_TOLERANCE ? 0 : 1;
|
||||
rotoutput *= Math.abs(roterr) < AutoConstants.ROT_TOLERANCE ? 0 : 1;
|
||||
|
||||
// System.out.println(xerr + ", " + yerr + ", " + roterr + ", " + rotoutput);
|
||||
|
||||
Translation2d leftStick = new Translation2d(
|
||||
Math.max(Math.min(-youtput, 1), -1),
|
||||
Math.max(Math.min(-xoutput, 1), -1)
|
||||
|
||||
@@ -39,7 +39,7 @@ public class LidarAlign extends Command {
|
||||
this.currentFinderTick = 0;
|
||||
this.speed = 0.4; // TODO: find good speed for this
|
||||
this.foundReef = false;
|
||||
this.headedRight = !(GotoLastApril.tagRelativeXError < 0);
|
||||
this.headedRight = (GotoLastApril.tagRelativeXError < 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ public class LidarAlign extends Command {
|
||||
return;
|
||||
}
|
||||
|
||||
if (currentFinderTick > 100) { //arbutrary threshhold for now.
|
||||
if (currentFinderTick > 40) { //arbutrary threshhold for now.
|
||||
headedRight = !headedRight;
|
||||
currentFinderTick *= -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user