-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into 121-enable-linter-to-be-run-manually
- Loading branch information
Showing
7 changed files
with
93 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
src/main/java/frc/robot/command/tests/testCommands/TurnTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// Copyright (c) FIRST and other WPILib contributors. | ||
// Open Source Software; you can modify and/or share it under the terms of | ||
// the WPILib BSD license file in the root directory of this project. | ||
|
||
package frc.robot.command.tests.testCommands; | ||
|
||
import java.util.function.DoubleSupplier; | ||
|
||
import com.ctre.phoenix6.mechanisms.swerve.SwerveRequest; | ||
|
||
import edu.wpi.first.wpilibj2.command.Command; | ||
import frc.robot.subsystems.Swerve; | ||
|
||
public class TurnTest extends Command { | ||
|
||
private Swerve drivetrain; | ||
private DoubleSupplier speed; | ||
|
||
/** | ||
* System test command for testing azimuth motors | ||
* @param drivetrain swerve subsystem | ||
* @param speed rotational rate | ||
*/ | ||
public TurnTest(Swerve drivetrain, DoubleSupplier speed) { | ||
this.drivetrain = drivetrain; | ||
this.speed = speed; | ||
|
||
addRequirements(drivetrain); | ||
} | ||
|
||
@Override | ||
public void initialize() {} | ||
|
||
@Override | ||
public void execute() { | ||
drivetrain.setControl(new SwerveRequest.RobotCentric().withVelocityX(0).withVelocityY(0).withRotationalRate(speed.getAsDouble())); | ||
} | ||
|
||
@Override | ||
public void end(boolean interrupted) { | ||
drivetrain.setControl(new SwerveRequest.RobotCentric().withVelocityX(0).withVelocityY(0).withRotationalRate(0)); | ||
} | ||
|
||
@Override | ||
public boolean isFinished() { | ||
return false; | ||
} | ||
} |
Submodule thunder
updated
3 files
+2 −2 | testing/SystemTest.java | |
+49 −0 | testing/SystemTestCommand.java | |
+31 −0 | testing/SystemTestCommandGroup.java |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters