mirror of
https://github.com/Team4388/2026KPopRobotHunters.git
synced 2026-06-09 00:38:03 -06:00
Intake Finished
This commit is contained in:
@@ -179,7 +179,8 @@ public class RobotContainer {
|
|||||||
.whileTrue(new RunCommand(
|
.whileTrue(new RunCommand(
|
||||||
() -> {
|
() -> {
|
||||||
m_robotSwerveDrive.driveIntake(
|
m_robotSwerveDrive.driveIntake(
|
||||||
getDeadbandedDriverController().getLeft()
|
getDeadbandedDriverController().getLeft(),
|
||||||
|
false
|
||||||
);
|
);
|
||||||
}, m_robotSwerveDrive))
|
}, m_robotSwerveDrive))
|
||||||
.onFalse(new InstantCommand(() -> m_robotSwerveDrive.softStop(), m_robotSwerveDrive));
|
.onFalse(new InstantCommand(() -> m_robotSwerveDrive.softStop(), m_robotSwerveDrive));
|
||||||
|
|||||||
@@ -7,12 +7,12 @@ public final class BuildConstants {
|
|||||||
public static final String MAVEN_GROUP = "";
|
public static final String MAVEN_GROUP = "";
|
||||||
public static final String MAVEN_NAME = "2026KPopRobotHunters";
|
public static final String MAVEN_NAME = "2026KPopRobotHunters";
|
||||||
public static final String VERSION = "unspecified";
|
public static final String VERSION = "unspecified";
|
||||||
public static final int GIT_REVISION = 31;
|
public static final int GIT_REVISION = 32;
|
||||||
public static final String GIT_SHA = "9fcc5ffe9f52bb7c311e0cb573061158ec2794ce";
|
public static final String GIT_SHA = "7b46b7a1a30820e2e754c8b8335bd4207dcddf77";
|
||||||
public static final String GIT_DATE = "2026-02-02 19:46:18 MST";
|
public static final String GIT_DATE = "2026-02-03 17:36:09 MST";
|
||||||
public static final String GIT_BRANCH = "Subsystem-Boilerplate";
|
public static final String GIT_BRANCH = "Subsystem-Boilerplate";
|
||||||
public static final String BUILD_DATE = "2026-02-03 17:30:18 MST";
|
public static final String BUILD_DATE = "2026-02-03 18:04:39 MST";
|
||||||
public static final long BUILD_UNIX_TIME = 1770165018277L;
|
public static final long BUILD_UNIX_TIME = 1770167079826L;
|
||||||
public static final int DIRTY = 1;
|
public static final int DIRTY = 1;
|
||||||
|
|
||||||
private BuildConstants(){}
|
private BuildConstants(){}
|
||||||
|
|||||||
@@ -288,7 +288,7 @@ public class SwerveDrive extends SubsystemBase implements Queryable {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void driveIntake(Translation2d leftStick){
|
public void driveIntake(Translation2d leftStick, boolean invertRotation){
|
||||||
// if (invert){
|
// if (invert){
|
||||||
// Translation2d stick = new Translation2d(-leftStick.getX(), -leftStick.getY());
|
// Translation2d stick = new Translation2d(-leftStick.getX(), -leftStick.getY());
|
||||||
// driveFieldAngle(stick, heading);
|
// driveFieldAngle(stick, heading);
|
||||||
@@ -298,11 +298,22 @@ public class SwerveDrive extends SubsystemBase implements Queryable {
|
|||||||
// }
|
// }
|
||||||
double speed = leftStick.getNorm();
|
double speed = leftStick.getNorm();
|
||||||
|
|
||||||
Rotation2d heading = leftStick.getAngle();
|
if(speed < 0.3) {
|
||||||
|
driveWithInput(leftStick, new Translation2d(), true);
|
||||||
|
} else {
|
||||||
|
|
||||||
// Only drive forward in robot direction (no strafe)
|
|
||||||
Translation2d forwardOnly = new Translation2d(speed, 0.0);
|
|
||||||
driveFieldAngle(forwardOnly, heading);
|
Rotation2d heading = new Rotation2d(leftStick.getX(), -leftStick.getY());//.r otateBy(Rotation2d.fromDegrees(90));
|
||||||
|
|
||||||
|
// if (invertRotation){
|
||||||
|
heading = heading.rotateBy(Rotation2d.fromDegrees(270));
|
||||||
|
// }
|
||||||
|
|
||||||
|
// Only drive forward in robot direction (no strafe)
|
||||||
|
// Translation2d forwardOnly = new Translation2d(speed, 0.0);
|
||||||
|
driveFieldAngle(leftStick, heading);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user