Skip to content

Commit

Permalink
cleaned up code, deleted comments
Browse files Browse the repository at this point in the history
  • Loading branch information
GrinfiWasSlain committed Sep 21, 2023
1 parent 9c6b28a commit 59b2321
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 21 deletions.
16 changes: 2 additions & 14 deletions src/main/java/frc/robot/Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,7 @@ public void autonomousInit() {

/** This function is called periodically during autonomous. */
@Override
public void autonomousPeriodic() {
// DO ultrasonid
// SmartDashboard.putNumber("Auto Sensor", getRangeInches(ultrasonic1));
}
public void autonomousPeriodic() {}

@Override
public void teleopInit() {
Expand Down Expand Up @@ -139,16 +136,7 @@ public void teleopInit() {

/** This function is called periodically during operator control. */
@Override
public void teleopPeriodic() {
// System.out.println(
// "Ultrasonic Distance In Inches: " + m_robotContainer.getUltrasonic1().DistanceIn());
// TODO: add dashboard stuff
// SmartDashboard.putNumber("Ultrasonic Sensor Distance", getRangeInches(ultrasonic1));
// SmartDashboard.putNumber("Ultrasonic Top Sensor Distance", getRangeInches(ultrasonic2));
// SmartDashboard.putNumber("Throttle", m_robotContainer.getStick().getThrottle());
// SmartDashboard.putNumber("Gyro Rate", m_robotContainer.getGyro().getRate());
// SmartDashboard.putNumber("Gyro angle", m_robotContainer.getGyro().getAngle());
}
public void teleopPeriodic() {}

@Override
public void testInit() {
Expand Down
7 changes: 1 addition & 6 deletions src/main/java/frc/robot/RobotContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

package frc.robot;

import com.pathplanner.lib.PathPlanner;
import com.pathplanner.lib.PathPlannerTrajectory;
import com.pathplanner.lib.auto.PIDConstants;
import com.pathplanner.lib.auto.RamseteAutoBuilder;
Expand All @@ -13,7 +14,6 @@
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import edu.wpi.first.wpilibj2.command.Command;
import edu.wpi.first.wpilibj2.command.InstantCommand;
import edu.wpi.first.wpilibj2.command.SequentialCommandGroup;
import edu.wpi.first.wpilibj2.command.button.CommandXboxController;
import edu.wpi.first.wpilibj2.command.button.JoystickButton;
import edu.wpi.first.wpilibj2.command.button.Trigger;
Expand Down Expand Up @@ -202,15 +202,10 @@ public Joystick getFlightStick() {
* @return the command to run in autonomous
*/
public Command getAutonomousCommand() {
/*
pathGroup =
PathPlanner.loadPathGroup(
autoDashboardChooser.getSelected(), DriveConstants.autoPathConstraints);
// Generate the auto command from the auto builder using the routine selected in the dashboard.
return autoBuilder.fullAuto(pathGroup);
*/
// drive forward for 3 seconds.
return new SequentialCommandGroup(
new DefaultDrive(m_driveSubsystem, () -> 0.33, () -> 0.33).withTimeout(3));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public double DistanceCM() {
@Override
public void periodic() {
// This method will be called once per scheduler run

// SmartDashboard.putNumber("Ultrasonic Sensor Distance", getRangeInches(ultrasonic1));
// Calculate what percentage of 5 Volts we are actually at
voltageScaleFactor = 5 / RobotController.getVoltage5V();
}
Expand Down

0 comments on commit 59b2321

Please sign in to comment.