Skip to content
Open
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/main/java/org/team5924/frc2026/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ public final class IntakePivot {
new TalonFXConfiguration()
.withCurrentLimits(
new CurrentLimitsConfigs()
.withSupplyCurrentLimit(120)
.withStatorCurrentLimit(120)
.withSupplyCurrentLimit(60)
.withStatorCurrentLimit(60)
.withSupplyCurrentLimitEnable(true)
.withStatorCurrentLimitEnable(true))
.withMotorOutput(
Expand All @@ -168,8 +168,8 @@ public final class IntakePivot {
new SoftwareLimitSwitchConfigs()
.withReverseSoftLimitThreshold(MIN_POSITION_ROTATIONS)
.withForwardSoftLimitThreshold(MAX_POSITION_ROTATIONS)
.withForwardSoftLimitEnable(true)
.withReverseSoftLimitEnable(true);
.withForwardSoftLimitEnable(false)
.withReverseSoftLimitEnable(false);

public static final FeedbackConfigs FEEDBACK_CONFIGS =
new FeedbackConfigs()
Expand Down Expand Up @@ -220,7 +220,7 @@ public final class GeneralShooterHood {
public static final double CANCODER_TO_MECHANISM = CANCODER_TO_SPUR * SPUR_TO_MECHANISM;
public static final double MOTOR_TO_MECHANISM = MOTOR_TO_CANCODER * CANCODER_TO_SPUR * SPUR_TO_MECHANISM;

public static final double EPSILON_RADS = Units.degreesToRadians(2.0);
public static final double EPSILON_RADS = Units.degreesToRadians(0.5);
public static final double STATE_TIMEOUT = 5.0;
public static final boolean ENABLE_TIMEOUT = false;

Expand Down Expand Up @@ -421,14 +421,14 @@ public final class ShooterHoodRight {
}

public final class FlywheelLeaderRight {
public static final int CAN_ID = 32;
public static final int CAN_ID = 33;
public static final int BEAM_BREAK_PORT = 0; // TODO: update later

public static final TalonFXConfiguration CONFIG = GeneralFlywheel.GENERAL_CONFIG;
}

public final class FlywheelFollowerRight {
public static final int CAN_ID = 33;
public static final int CAN_ID = 32;

public static final TalonFXConfiguration CONFIG =
GeneralFlywheel.GENERAL_CONFIG
Expand Down
16 changes: 10 additions & 6 deletions src/main/java/org/team5924/frc2026/Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import org.littletonrobotics.junction.wpilog.WPILOGWriter;
import org.team5924.frc2026.generated.TunerConstants;
import org.team5924.frc2026.util.Elastic;
import org.team5924.frc2026.util.LaunchCalculator;

public class Robot extends LoggedRobot {
private static final double LOW_BATTERY_VOLTAGE = 11.0;
Expand Down Expand Up @@ -125,6 +126,12 @@ public Robot() {
// Reset alert timers
disabledTimer.restart();

// Low battery alert
if (DriverStation.isEnabled()) {
disabledTimer.reset();
lowBatteryAlert.set(false);
}
Comment thread
arcadeArchitect marked this conversation as resolved.
Outdated

// Instantiate our RobotContainer. This will perform all our button bindings,
// and put our autonomous chooser on the dashboard.
robotContainer = new RobotContainer();
Expand All @@ -147,11 +154,6 @@ public void robotPeriodic() {
// Return to non-RT thread priority (do not modify the first argument)
// Threads.setCurrentThreadPriority(false, 10);

// Low battery alert
if (DriverStation.isEnabled()) {
disabledTimer.reset();
lowBatteryAlert.set(false);
}
double batteryVoltage = RobotController.getBatteryVoltage();
if (batteryVoltage > 0.0
&& batteryVoltage <= LOW_BATTERY_VOLTAGE
Expand Down Expand Up @@ -208,7 +210,9 @@ public void teleopInit() {

/** This function is called periodically during operator control. */
@Override
public void teleopPeriodic() {}
public void teleopPeriodic() {
LaunchCalculator.getInstance().clearLaunchingParameters();
}

/** This function is called once when test mode is enabled. */
@Override
Expand Down
Loading
Loading