Skip to content

Commit

Permalink
updated arm
Browse files Browse the repository at this point in the history
  • Loading branch information
Lu-han-wang committed Jan 26, 2024
2 parents d0db4cf + f58057b commit 5df5816
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 5 deletions.
8 changes: 7 additions & 1 deletion src/main/java/org/jmhsrobotics/frc2024/Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import edu.wpi.first.wpilibj2.command.Command;
import edu.wpi.first.wpilibj2.command.CommandScheduler;
import monologue.Logged;
import monologue.Monologue;

public class Robot extends TimedRobot {
public class Robot extends TimedRobot implements Logged {
private Command autonomousCommand;

private RobotContainer m_robotContainer;
Expand All @@ -48,10 +50,14 @@ public void setupLogs() {
DriverStation.startDataLog(DataLogManager.getLog());
BuildDataLogger.LogToNetworkTables(BuildConstants.class);
BuildDataLogger.LogToWpiLib(DataLogManager.getLog(), BuildConstants.class);
boolean fileOnly = false;
boolean lazyLogging = false;
Monologue.setupMonologue(this, "Robot", fileOnly, lazyLogging);
}

@Override
public void robotPeriodic() {
Monologue.updateAll();
CommandScheduler.getInstance().run();
}

Expand Down
3 changes: 2 additions & 1 deletion src/main/java/org/jmhsrobotics/frc2024/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@
import edu.wpi.first.wpilibj2.command.CommandScheduler;
import edu.wpi.first.wpilibj2.command.Commands;
import edu.wpi.first.wpilibj2.command.WaitCommand;
import monologue.Logged;

public class RobotContainer {
public class RobotContainer implements Logged {

private ControlBoard control = new CompControl();
// Subsystems
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public double rotationalInput() {
return this.driver.getRightX();
}

<<<<<<< HEAD
public double pitchInput() {
// TODO Auto-generated method stub
return this.driver.getRightY();
Expand All @@ -54,6 +55,23 @@ public Trigger presetHigh() {
public Trigger presetLow() {
// TODO Auto-generated method stub
return this.driver.a();
=======
@Override
public Trigger brake() {
// TODO Auto-generated method stub
return this.driver.leftBumper();
}

@Override
public Trigger setZeroHeading() {
// TODO Auto-generated method stub
return this.driver.rightBumper();
}

public Trigger presetHigh() {
// TODO Auto-generated method stub
return this.operator.y();
>>>>>>> f58057b4b042247b59d7b200035cb9fab3045a00
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ public interface ControlBoard {
// =============Operator Controls=============

public Trigger presetHigh();
<<<<<<< HEAD
public Trigger presetLow();
=======
>>>>>>> f58057b4b042247b59d7b200035cb9fab3045a00

// =============Driver Controls=============
public Trigger brake();
Expand All @@ -19,7 +22,10 @@ public interface ControlBoard {
public double yInput();

public double rotationalInput();
<<<<<<< HEAD

public double pitchInput();
=======
>>>>>>> f58057b4b042247b59d7b200035cb9fab3045a00

}
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
import edu.wpi.first.wpilibj.RobotBase;
import edu.wpi.first.wpilibj.simulation.AddressableLEDSim;
import edu.wpi.first.wpilibj2.command.SubsystemBase;
import monologue.Logged;

public class LEDSubsystem extends SubsystemBase {
public class LEDSubsystem extends SubsystemBase implements Logged {
private AddressableLED led;
private AddressableLEDBuffer ledBuffer;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@
import edu.wpi.first.math.kinematics.SwerveModulePosition;
import edu.wpi.first.math.kinematics.SwerveModuleState;
import edu.wpi.first.wpilibj2.command.SubsystemBase;
import monologue.Logged;
import monologue.Annotations.Log;

public class DriveSubsystem extends SubsystemBase {
public class DriveSubsystem extends SubsystemBase implements Logged {
// Create MAXSwerveModules
// Test
private ISwerveModule m_frontLeft;
Expand All @@ -39,6 +41,8 @@ public class DriveSubsystem extends SubsystemBase {

// Create RevSwerveDrive
private final RevSwerveDrive swerveDrive;
@Log.File
private Pose2d pose2d = new Pose2d();

/** Creates a new DriveSubsystem. */
public DriveSubsystem() {
Expand Down Expand Up @@ -73,6 +77,7 @@ public DriveSubsystem() {
public void periodic() {
// Update the odometry in the periodic block
swerveDrive.updateOdometry();
pose2d = swerveDrive.getPose();
}

public void drive(ChassisSpeeds chassisSpeeds) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@
import edu.wpi.first.wpilibj.Filesystem;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import edu.wpi.first.wpilibj2.command.SubsystemBase;
import monologue.Logged;

public class VisionSubsystem extends SubsystemBase {
public class VisionSubsystem extends SubsystemBase implements Logged {
// load the apriltag field layout
AprilTagFieldLayout layout;

Expand Down

0 comments on commit 5df5816

Please sign in to comment.