Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleaned up code, deleted comments #13

Merged
merged 1 commit into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
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
Loading