mirror of
https://github.com/Team4388/2026KPopRobotHunters.git
synced 2026-06-08 16:28:05 -06:00
Merge branch 'DrivingTryouts' of https://github.com/Team4388/2026KPopRobotHunters into DrivingTryouts
This commit is contained in:
@@ -7,13 +7,13 @@ public final class BuildConstants {
|
||||
public static final String MAVEN_GROUP = "";
|
||||
public static final String MAVEN_NAME = "2026KPopRobotHunters";
|
||||
public static final String VERSION = "unspecified";
|
||||
public static final int GIT_REVISION = 7;
|
||||
public static final String GIT_SHA = "24fdd610c9256b4599b7d29ebb1a3acd14cc38b7";
|
||||
public static final String GIT_DATE = "2026-01-13 18:19:47 MST";
|
||||
public static final String GIT_BRANCH = "master";
|
||||
public static final String BUILD_DATE = "2026-01-13 18:58:23 MST";
|
||||
public static final long BUILD_UNIX_TIME = 1768355903336L;
|
||||
public static final int DIRTY = 1;
|
||||
public static final int GIT_REVISION = 8;
|
||||
public static final String GIT_SHA = "a27cde3f84484e652e5dcc1fd2f432871a2f0245";
|
||||
public static final String GIT_DATE = "2026-01-13 19:41:42 MST";
|
||||
public static final String GIT_BRANCH = "DrivingTryouts";
|
||||
public static final String BUILD_DATE = "2026-02-17 17:25:18 MST";
|
||||
public static final long BUILD_UNIX_TIME = 1771374318460L;
|
||||
public static final int DIRTY = 0;
|
||||
|
||||
private BuildConstants(){}
|
||||
}
|
||||
|
||||
@@ -275,6 +275,31 @@ public class SwerveDrive extends SubsystemBase implements Queryable {
|
||||
io.setControl(ctrl);
|
||||
}
|
||||
|
||||
public void driveIntakeOrientation(Translation2d leftStick, Translation2d rightStick){
|
||||
// if (invert){
|
||||
// Translation2d stick = new Translation2d(-leftStick.getX(), -leftStick.getY());
|
||||
// driveFieldAngle(stick, heading);
|
||||
|
||||
// } else{
|
||||
// driveFieldAngle(leftStick, heading);
|
||||
// }
|
||||
double speed = rightStick.getNorm();
|
||||
|
||||
if(speed < 0.3) {
|
||||
driveWithInput(leftStick, new Translation2d(), true);
|
||||
} else {
|
||||
|
||||
|
||||
|
||||
Rotation2d heading = new Rotation2d(rightStick.getX(), rightStick.getY());//.r otateBy(Rotation2d.fromDegrees(90));
|
||||
|
||||
heading = heading.rotateBy(Rotation2d.fromDegrees(90));
|
||||
rotTarget = heading.getDegrees();
|
||||
|
||||
driveFieldAngle(leftStick, heading);
|
||||
}
|
||||
}
|
||||
|
||||
public void driveFieldAngle(Translation2d leftStick, Rotation2d heading) {
|
||||
if (leftStick.getNorm() < 0.05) // if no imput and the swerve drive is still going:
|
||||
stopModules(); // stop the swerve
|
||||
|
||||
Reference in New Issue
Block a user