Skip to content
This repository has been archived by the owner on Oct 7, 2022. It is now read-only.

Commit

Permalink
Totally remove arm module
Browse files Browse the repository at this point in the history
  • Loading branch information
jonahsnider committed Aug 30, 2022
1 parent 6693218 commit b291087
Show file tree
Hide file tree
Showing 15 changed files with 8 additions and 525 deletions.
9 changes: 1 addition & 8 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import frc.robot.match_metadata.*;
import frc.robot.misc.exceptions.UnknownTargetRobotException;
import frc.robot.superstructure.SuperstructureSubsystem;
import frc.robot.superstructure.arm.*;
import frc.robot.superstructure.commands.ArmDownAndShootCommand;
import frc.robot.superstructure.commands.ArmDownAndSnarfCommand;
import frc.robot.superstructure.commands.ArmUpAndShootCommand;
Expand Down Expand Up @@ -51,7 +50,6 @@ public class RobotContainer {
private final UpperHubVisionSubsystem upperVisionSubsystem;
private final CargoVisionSubsystem cargoVisionSubsystem;
private final Swiffer swiffer;
private final Arm arm;
private final SuperstructureSubsystem superstructureSubsystem;
private final Lights lights;
private final Localization localization;
Expand All @@ -72,7 +70,6 @@ public RobotContainer() {
if (Constants.getMode() == Constants.Mode.REPLAY) {
matchMetadataSubsystem = new MatchMetadataSubsystem(new MatchMetadataIOReplay());
lights = new Lights(new LightsIOReplay());
arm = new Arm(new ArmIOReplay(), lights);
swiffer = new Swiffer(new SwifferIOReplay(), lights);
imuSubsystem = new ImuSubsystem(new ImuIOReplay());
upperVisionSubsystem = new UpperHubVisionSubsystem(new UpperHubVisionIOReplay());
Expand All @@ -90,7 +87,6 @@ public RobotContainer() {
case COMP_BOT:
matchMetadataSubsystem = new MatchMetadataSubsystem(new MatchMetadataIOFms());
lights = new Lights(new LightsIOReplay());
arm = new Arm(new ArmIONeos(), lights);
swiffer = new Swiffer(new SwifferIOFalcon500(), lights);
imuSubsystem = new ImuSubsystem(new ImuIOAdis16470());
upperVisionSubsystem = new UpperHubVisionSubsystem(new UpperHubVisionIOReplay());
Expand All @@ -107,7 +103,6 @@ public RobotContainer() {
case TEST_2020_BOT:
matchMetadataSubsystem = new MatchMetadataSubsystem(new MatchMetadataIOFms());
lights = new Lights(new LightsIORoborio());
arm = new Arm(new ArmIOReplay(), lights);
swiffer = new Swiffer(new SwifferIOReplay(), lights);
imuSubsystem = new ImuSubsystem(new ImuIOReplay());
upperVisionSubsystem = new UpperHubVisionSubsystem(new UpperHubVisionIOReplay());
Expand All @@ -124,7 +119,6 @@ public RobotContainer() {
case SIM_BOT:
matchMetadataSubsystem = new MatchMetadataSubsystem(new MatchMetadataIOSim());
lights = new Lights(new LightsIOSim());
arm = new Arm(new ArmIOSimNeos(), lights);
swiffer = new Swiffer(new SwifferIOSimFalcon500(), lights);
imuSubsystem = new ImuSubsystem(new ImuIOSim());
upperVisionSubsystem = new UpperHubVisionSubsystem(new UpperHubVisionIOSim());
Expand All @@ -143,7 +137,7 @@ public RobotContainer() {
}
}

superstructureSubsystem = new SuperstructureSubsystem(swiffer, arm, lights);
superstructureSubsystem = new SuperstructureSubsystem(swiffer, lights);
localization = new Localization(driveSubsystem, cargoVisionSubsystem, imuSubsystem);

autonomousChooser =
Expand All @@ -165,7 +159,6 @@ private void initLogging() {
SmartDashboard.putData(upperVisionSubsystem);
SmartDashboard.putData(cargoVisionSubsystem);
SmartDashboard.putData(swiffer);
SmartDashboard.putData(arm);
SmartDashboard.putData(superstructureSubsystem);
SmartDashboard.putData(lights);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,17 @@
package frc.robot.superstructure;

import edu.wpi.first.wpilibj2.command.SubsystemBase;
import frc.robot.superstructure.arm.Arm;
import frc.robot.superstructure.commands.ArmUpAndStopCommand;
import frc.robot.superstructure.lights.Lights;
import frc.robot.superstructure.swiffer.Swiffer;

public class SuperstructureSubsystem extends SubsystemBase {
public final Swiffer swiffer;
public final Arm arm;
public final Lights lights;

/** Creates a new SuperstructureSubsystem. */
public SuperstructureSubsystem(Swiffer swiffer, Arm arm, Lights lights) {
public SuperstructureSubsystem(Swiffer swiffer, Lights lights) {
this.swiffer = swiffer;
this.arm = arm;
this.lights = lights;

setDefaultCommand(
Expand All @@ -30,6 +27,5 @@ public SuperstructureSubsystem(Swiffer swiffer, Arm arm, Lights lights) {
@Override
public void periodic() {
swiffer.periodic();
arm.periodic();
}
}
112 changes: 0 additions & 112 deletions src/main/java/frc/robot/superstructure/arm/Arm.java

This file was deleted.

51 changes: 0 additions & 51 deletions src/main/java/frc/robot/superstructure/arm/ArmIO.java

This file was deleted.

85 changes: 0 additions & 85 deletions src/main/java/frc/robot/superstructure/arm/ArmIONeos.java

This file was deleted.

17 changes: 0 additions & 17 deletions src/main/java/frc/robot/superstructure/arm/ArmIOReplay.java

This file was deleted.

Loading

0 comments on commit b291087

Please sign in to comment.