mirror of
https://github.com/Team4388/2026KPopRobotHunters.git
synced 2026-06-09 00:38:03 -06:00
Fix error
This commit is contained in:
@@ -245,13 +245,11 @@ public class RobotContainer {
|
|||||||
|
|
||||||
// IF the driver is holding the aim button, aim the robot towards the hub and shooter ready
|
// IF the driver is holding the aim button, aim the robot towards the hub and shooter ready
|
||||||
new Trigger(() -> getDeadbandedDriverController().getRightTriggerAxis() >= 0.5)
|
new Trigger(() -> getDeadbandedDriverController().getRightTriggerAxis() >= 0.5)
|
||||||
.onTrue(new InstantCommand(
|
.whileTrue(new RunCommand(() -> m_robotSwerveDrive.driveFacingPosition(
|
||||||
() -> m_robotSwerveDrive.driveFacingPosition(
|
|
||||||
getDeadbandedDriverController().getLeft(),
|
getDeadbandedDriverController().getLeft(),
|
||||||
FieldPositions.HUB_POSITION,
|
FieldPositions.HUB_POSITION,
|
||||||
ShooterConstants.AIM_LEAD_TIME.get()
|
ShooterConstants.AIM_LEAD_TIME.get()
|
||||||
), m_robotSwerveDrive)
|
), m_robotSwerveDrive)
|
||||||
// }, m_robotSwerveDrive)
|
|
||||||
// () -> {
|
// () -> {
|
||||||
// m_robotSwerveDrive.driveFacingVelocity(
|
// m_robotSwerveDrive.driveFacingVelocity(
|
||||||
// getDeadbandedDriverController().getLeft(),
|
// getDeadbandedDriverController().getLeft(),
|
||||||
|
|||||||
@@ -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 = 155;
|
public static final int GIT_REVISION = 156;
|
||||||
public static final String GIT_SHA = "af3646ff4378382f3bfcce6ab7828823bb76be21";
|
public static final String GIT_SHA = "0d98232f30a0663939bef0d21533e1603090c7cd";
|
||||||
public static final String GIT_DATE = "2026-03-12 18:06:12 MDT";
|
public static final String GIT_DATE = "2026-03-12 18:13:33 MDT";
|
||||||
public static final String GIT_BRANCH = "MiraOrg";
|
public static final String GIT_BRANCH = "MiraOrg";
|
||||||
public static final String BUILD_DATE = "2026-03-12 18:11:48 MDT";
|
public static final String BUILD_DATE = "2026-03-12 18:30:13 MDT";
|
||||||
public static final long BUILD_UNIX_TIME = 1773360708923L;
|
public static final long BUILD_UNIX_TIME = 1773361813662L;
|
||||||
public static final int DIRTY = 1;
|
public static final int DIRTY = 1;
|
||||||
|
|
||||||
private BuildConstants(){}
|
private BuildConstants(){}
|
||||||
|
|||||||
@@ -78,6 +78,19 @@ public class SimpleSwerveSim implements SwerveIO {
|
|||||||
return 0.0;
|
return 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public synchronized void pointAtXY(double x, double y) {
|
||||||
|
Translation2d target = new Translation2d(x, y);
|
||||||
|
Translation2d toTarget = target.minus(pose.getTranslation());
|
||||||
|
if (toTarget.getNorm() < 1e-9) return;
|
||||||
|
Rotation2d desired = toTarget.getAngle();
|
||||||
|
pose = new Pose2d(pose.getTranslation(), desired);
|
||||||
|
lastPose = pose;
|
||||||
|
vx = 0.0;
|
||||||
|
vy = 0.0;
|
||||||
|
omega = 0.0;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public synchronized void updateInputs(SwerveState state) {
|
public synchronized void updateInputs(SwerveState state) {
|
||||||
if (state == null) return;
|
if (state == null) return;
|
||||||
|
|||||||
Reference in New Issue
Block a user