Skip to content

Commit

Permalink
[#475] - cleaned up the code a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
HeeistHo committed Mar 21, 2024
1 parent c271468 commit 7889811
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions src/main/java/frc/robot/command/ChasePieces.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package frc.robot.command;

import java.sql.Driver;

import edu.wpi.first.math.controller.PIDController;
import edu.wpi.first.util.datalog.DataLog;
import edu.wpi.first.wpilibj.DataLogManager;
Expand Down Expand Up @@ -81,13 +83,12 @@ public ChasePieces(Swerve drivetrain, Collector collector, Indexer indexer, Pivo

if (DriverStation.isAutonomous()) {
this.drivePower = 1.5d;
this.rotPower = 1.5d; // TODO: get real >:)
this.maxCollectPower = 0.8d;
} else {
this.maxCollectPower = 0.65d;
this.drivePower = 3d;
this.rotPower = 1.5d; // TODO: get real >:)
}
this.rotPower = 1.5d;

addRequirements(drivetrain, collector, indexer, flywheel);

Expand All @@ -96,7 +97,12 @@ public ChasePieces(Swerve drivetrain, Collector collector, Indexer indexer, Pivo

@Override
public void initialize() {
System.out.println("AUTO - Chase pieces INIT");

if (DriverStation.isAutonomous()){
System.out.println("AUTO - Chase pieces INIT");
} else {
System.out.println("TELEOP - Chase pieces INIT");
}

headingController.setTolerance(VisionConstants.ALIGNMENT_TOLERANCE);
collectPower = 0d;
Expand Down Expand Up @@ -218,7 +224,10 @@ public void end(boolean interrupted) {
collectPower = 0d;
smartCollect.end(interrupted);
// drivetrain.stop();
System.out.println("AUTO - Chase pieces END");
if (DriverStation.isAutonomous())
System.out.println("AUTO - Chase pieces END");
else
System.out.println("TELEOP - Chase pieces END");
}

/**
Expand Down

0 comments on commit 7889811

Please sign in to comment.