Update formatting to clang-format 16 (#5370)

This commit is contained in:
Tyler Veness
2023-05-31 22:10:53 -07:00
committed by GitHub
parent a94a998002
commit 5fac18ff4a
48 changed files with 654 additions and 434 deletions

View File

@@ -25,8 +25,9 @@ class Drive : public frc2::SubsystemBase {
* @param fwd the commanded forward movement
* @param rot the commanded rotation
*/
[[nodiscard]] frc2::CommandPtr ArcadeDriveCommand(
std::function<double()> fwd, std::function<double()> rot);
[[nodiscard]]
frc2::CommandPtr ArcadeDriveCommand(std::function<double()> fwd,
std::function<double()> rot);
/**
* Returns a command that drives the robot forward a specified distance at a
@@ -35,8 +36,8 @@ class Drive : public frc2::SubsystemBase {
* @param distance The distance to drive forward in meters
* @param speed The fraction of max speed at which to drive
*/
[[nodiscard]] frc2::CommandPtr DriveDistanceCommand(units::meter_t distance,
double speed);
[[nodiscard]]
frc2::CommandPtr DriveDistanceCommand(units::meter_t distance, double speed);
private:
frc::PWMSparkMax m_leftLeader{DriveConstants::kLeftMotor1Port};

View File

@@ -19,10 +19,12 @@ class Intake : public frc2::SubsystemBase {
/** Returns a command that deploys the intake, and then runs the intake motor
* indefinitely. */
[[nodiscard]] frc2::CommandPtr IntakeCommand();
[[nodiscard]]
frc2::CommandPtr IntakeCommand();
/** Returns a command that turns off and retracts the intake. */
[[nodiscard]] frc2::CommandPtr RetractCommand();
[[nodiscard]]
frc2::CommandPtr RetractCommand();
private:
frc::PWMSparkMax m_motor{IntakeConstants::kMotorPort};

View File

@@ -28,8 +28,8 @@ class Shooter : public frc2::SubsystemBase {
*
* @param setpointRotationsPerSecond The desired shooter velocity
*/
[[nodiscard]] frc2::CommandPtr ShootCommand(
units::turns_per_second_t setpoint);
[[nodiscard]]
frc2::CommandPtr ShootCommand(units::turns_per_second_t setpoint);
private:
frc::PWMSparkMax m_shooterMotor{ShooterConstants::kShooterMotorPort};

View File

@@ -15,7 +15,8 @@ class Storage : frc2::SubsystemBase {
public:
Storage();
/** Returns a command that runs the storage motor indefinitely. */
[[nodiscard]] frc2::CommandPtr RunCommand();
[[nodiscard]]
frc2::CommandPtr RunCommand();
/** Whether the ball storage is full. */
bool IsFull() const;