-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from GreenBlitz/auto-aling
Yoav - Auto align
- Loading branch information
Showing
7 changed files
with
71 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
TeamCode/src/main/java/org/firstinspires/ftc/teamcode/gamelayout/FieldConstants.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package org.firstinspires.ftc.teamcode.gamelayout; | ||
|
||
import com.arcrobotics.ftclib.geometry.Rotation2d; | ||
import org.firstinspires.ftc.teamcode.Alliance; | ||
import org.firstinspires.ftc.teamcode.Robot; | ||
|
||
public class FieldConstants { | ||
|
||
private static final Rotation2d BOARD_ANGLE = Rotation2d.fromDegrees(90); | ||
|
||
public static Rotation2d getBoardAngle() { | ||
return Robot.getInstance().getAlliance() == Alliance.RED ? BOARD_ANGLE.unaryMinus() : BOARD_ANGLE; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
...ode/src/main/java/org/firstinspires/ftc/teamcode/subsystems/chassis/ChassisConstants.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,15 @@ | ||
package org.firstinspires.ftc.teamcode.subsystems.chassis; | ||
|
||
import com.arcrobotics.ftclib.controller.PIDController; | ||
|
||
public class ChassisConstants { | ||
|
||
public static final String FRONT_LEFT_ID = "fl"; | ||
public static final String FRONT_RIGHT_ID = "fr"; | ||
public static final String BACK_LEFT_ID = "bl"; | ||
public static final String BACK_RIGHT_ID = "br"; | ||
|
||
protected static final double ANGLE_TOLERANCE = 5; | ||
protected static final PIDController PID_CONTROLLER = new PIDController(0.01, 0, 0); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...rstinspires/ftc/teamcode/ControlMode.java → ...c/teamcode/systemcontrol/ControlMode.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters