Skip to content

Commit

Permalink
Merge pull request #236 from CyberCoyotes/event-ready
Browse files Browse the repository at this point in the history
Tweaks to auton with a micro wait to Start pose 2
  • Loading branch information
JediScoy authored Mar 14, 2024
2 parents fb79bac + 6fc0ede commit c0f8170
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 10 deletions.
6 changes: 6 additions & 0 deletions src/main/deploy/pathplanner/autos/Start2.0-2-1-3.auto
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
"type": "sequential",
"data": {
"commands": [
{
"type": "wait",
"data": {
"waitTime": 0.01
}
},
{
"type": "named",
"data": {
Expand Down
6 changes: 6 additions & 0 deletions src/main/deploy/pathplanner/autos/Start2.0-2-1.auto
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
"type": "sequential",
"data": {
"commands": [
{
"type": "wait",
"data": {
"waitTime": 0.01
}
},
{
"type": "named",
"data": {
Expand Down
6 changes: 6 additions & 0 deletions src/main/deploy/pathplanner/autos/Start2.0-2.auto
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
"type": "sequential",
"data": {
"commands": [
{
"type": "wait",
"data": {
"waitTime": 0.0
}
},
{
"type": "named",
"data": {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public static class ArmConstants {
public static final double ARM_MID_POSE = 20;
public static final double ARM_HIGH_POSE = 55;
public static final double ARM_AMP_POSE = 90;
public static final int ARM_FWD_LIMIT = 91;
public static final int ARM_FWD_LIMIT = 100; // Previous event 91

public static final int ARM_MAX_ACCEL = 100;
public static final int ARM_MAX_VEL = 200;
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ public RobotContainer() {
* Unintended side effect is this will create EVERY auton file from the RIO deploy folder.
* FTP into the the RIO to delete old auton options */
autoChooser = AutoBuilder.buildAutoChooser();
// SmartDashboard.putData("Auto Chooser", autoChooser);
Shuffleboard.getTab("Auton").add("Auto Chooser", autoChooser);
SmartDashboard.putData("Auto Chooser", autoChooser);
// Shuffleboard.getTab("Auton").add("Auto Chooser", autoChooser);

shooter = new ShooterSubsystemVelocity();

Expand Down Expand Up @@ -170,7 +170,7 @@ public void DebugMethodSingle() {

// Less useful logs that we still need to see for testing.

var driverDiagnostics = Shuffleboard.getTab("Diagnostics");
// var driverDiagnostics = Shuffleboard.getTab("Diagnostics");

// driverDiagnostics.addDouble("Arm Rot", () -> arm.GetArmPos().getValueAsDouble());
// driverDiagnostics.addDouble("Arm Rot Deg", () -> arm.GetPositionDegrees());
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/frc/robot/subsystems/ArmSubsystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,11 @@
import com.ctre.phoenix6.configs.Slot1Configs;
import com.ctre.phoenix6.configs.SoftwareLimitSwitchConfigs;
import com.ctre.phoenix6.configs.TalonFXConfiguration;
import com.ctre.phoenix6.controls.DutyCycleOut;
import com.ctre.phoenix6.controls.MotionMagicVoltage;
import com.ctre.phoenix6.controls.PositionDutyCycle;
import com.ctre.phoenix6.controls.VoltageOut;
import com.ctre.phoenix6.hardware.TalonFX;
import com.ctre.phoenix6.signals.GravityTypeValue;

import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard;
import edu.wpi.first.wpilibj2.command.SubsystemBase;
import frc.robot.Constants;

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/frc/robot/subsystems/LedSubsystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ CANdle requires the Phoenix (v5) vendordep
import edu.wpi.first.wpilibj2.command.SubsystemBase;
import frc.robot.Constants;

@SuppressWarnings("unused")

public class LedSubsystem extends SubsystemBase {
private final CANdle m_candle = new CANdle(Constants.CANIDs.CANDLE_ID);

Expand Down
3 changes: 1 addition & 2 deletions src/main/java/frc/robot/subsystems/NoteSensorSubsystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import edu.wpi.first.wpilibj.DriverStation;
import edu.wpi.first.wpilibj.DriverStation.Alliance;
import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard;

/* Subsystem class to primarily use a Time of Flight sensor from 'Playing with Fusion'.
* It will read the distance from the sensor to the 'note' and determine if the note is in a load position.
Expand Down Expand Up @@ -101,7 +100,7 @@ public void periodic() {

// Only needed for diagnostics
// Shuffleboard.getTab("Note").add("Note Distance", noteDistance.getRange());
// FIXME: This is not working as expected. Code crashes saying .add title is already in use, probably because it's being called periodically.
// This is not working as expected. Code crashes saying .add title is already in use, probably because it's being called periodically.
// Shuffleboard.getTab("Sensors").add("Note Loaded 2", isNoteLoaded());

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@
import com.ctre.phoenix6.signals.NeutralModeValue;

import edu.wpi.first.networktables.GenericEntry;
import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard;
import edu.wpi.first.wpilibj2.command.SubsystemBase;
import frc.robot.Constants;

@SuppressWarnings("unused")

/**
* Serves as a base for any flywheel system driven by 2 motors. Fire and forget,
* enabling and diabling will be done by singular calls.
Expand Down

0 comments on commit c0f8170

Please sign in to comment.