From 11be5085b57fbf2e03201b9f6b1e95340f3d66c8 Mon Sep 17 00:00:00 2001 From: Zynh0722 Date: Wed, 27 Mar 2024 14:04:30 -0700 Subject: [PATCH] formatting --- src/main/cpp/Robot.cpp | 8 ++------ src/main/include/Constants.h | 2 +- src/main/include/Robot.h | 4 ++-- src/main/include/RobotContainer.h | 4 ++-- src/main/include/commands/Autos.h | 4 ++-- src/main/include/commands/ExampleCommand.h | 8 ++++---- src/main/include/subsystems/Drivebase.h | 4 ++-- src/main/include/subsystems/ExampleSubsystem.h | 4 ++-- 8 files changed, 17 insertions(+), 21 deletions(-) diff --git a/src/main/cpp/Robot.cpp b/src/main/cpp/Robot.cpp index c1c1ae6..62ce066 100644 --- a/src/main/cpp/Robot.cpp +++ b/src/main/cpp/Robot.cpp @@ -16,9 +16,7 @@ void Robot::RobotInit() {} *

This runs after the mode specific periodic functions, but before * LiveWindow and SmartDashboard integrated updating. */ -void Robot::RobotPeriodic() { - frc2::CommandScheduler::GetInstance().Run(); -} +void Robot::RobotPeriodic() { frc2::CommandScheduler::GetInstance().Run(); } /** * This function is called once each time the robot enters Disabled mode. You @@ -74,7 +72,5 @@ void Robot::SimulationInit() {} void Robot::SimulationPeriodic() {} #ifndef RUNNING_FRC_TESTS -int main() { - return frc::StartRobot(); -} +int main() { return frc::StartRobot(); } #endif diff --git a/src/main/include/Constants.h b/src/main/include/Constants.h index 87dd5b9..7d374ec 100644 --- a/src/main/include/Constants.h +++ b/src/main/include/Constants.h @@ -18,4 +18,4 @@ namespace OperatorConstants { inline constexpr int kDriverControllerPort = 0; -} // namespace OperatorConstants +} // namespace OperatorConstants diff --git a/src/main/include/Robot.h b/src/main/include/Robot.h index e9d45e7..7dc387f 100644 --- a/src/main/include/Robot.h +++ b/src/main/include/Robot.h @@ -12,7 +12,7 @@ #include "RobotContainer.h" class Robot : public frc::TimedRobot { - public: +public: void RobotInit() override; void RobotPeriodic() override; void DisabledInit() override; @@ -25,7 +25,7 @@ class Robot : public frc::TimedRobot { void SimulationInit() override; void SimulationPeriodic() override; - private: +private: // Have it empty by default so that if testing teleop it // doesn't have undefined behavior and potentially crash. std::optional m_autonomousCommand; diff --git a/src/main/include/RobotContainer.h b/src/main/include/RobotContainer.h index 697b9a2..ce4236d 100644 --- a/src/main/include/RobotContainer.h +++ b/src/main/include/RobotContainer.h @@ -18,12 +18,12 @@ * commands, and trigger mappings) should be declared here. */ class RobotContainer { - public: +public: RobotContainer(); frc2::CommandPtr GetAutonomousCommand(); - private: +private: // Replace with CommandPS4Controller or CommandJoystick if needed frc2::CommandXboxController m_driverController{ OperatorConstants::kDriverControllerPort}; diff --git a/src/main/include/commands/Autos.h b/src/main/include/commands/Autos.h index 62e2b56..9eb0e0c 100644 --- a/src/main/include/commands/Autos.h +++ b/src/main/include/commands/Autos.h @@ -12,5 +12,5 @@ namespace autos { /** * Example static factory for an autonomous command. */ -frc2::CommandPtr ExampleAuto(ExampleSubsystem* subsystem); -} // namespace autos +frc2::CommandPtr ExampleAuto(ExampleSubsystem *subsystem); +} // namespace autos diff --git a/src/main/include/commands/ExampleCommand.h b/src/main/include/commands/ExampleCommand.h index 9426538..dccdfaf 100644 --- a/src/main/include/commands/ExampleCommand.h +++ b/src/main/include/commands/ExampleCommand.h @@ -18,14 +18,14 @@ */ class ExampleCommand : public frc2::CommandHelper { - public: +public: /** * Creates a new ExampleCommand. * * @param subsystem The subsystem used by this command. */ - explicit ExampleCommand(ExampleSubsystem* subsystem); + explicit ExampleCommand(ExampleSubsystem *subsystem); - private: - ExampleSubsystem* m_subsystem; +private: + ExampleSubsystem *m_subsystem; }; diff --git a/src/main/include/subsystems/Drivebase.h b/src/main/include/subsystems/Drivebase.h index 1fdef08..aad28a6 100644 --- a/src/main/include/subsystems/Drivebase.h +++ b/src/main/include/subsystems/Drivebase.h @@ -7,7 +7,7 @@ #include class Drivebase : public frc2::SubsystemBase { - public: +public: Drivebase(); /** @@ -15,7 +15,7 @@ class Drivebase : public frc2::SubsystemBase { */ void Periodic() override; - private: +private: // Components (e.g. motor controllers and sensors) should generally be // declared private and exposed only through public methods. }; diff --git a/src/main/include/subsystems/ExampleSubsystem.h b/src/main/include/subsystems/ExampleSubsystem.h index 669f2ed..50ca864 100644 --- a/src/main/include/subsystems/ExampleSubsystem.h +++ b/src/main/include/subsystems/ExampleSubsystem.h @@ -8,7 +8,7 @@ #include class ExampleSubsystem : public frc2::SubsystemBase { - public: +public: ExampleSubsystem(); /** @@ -35,7 +35,7 @@ class ExampleSubsystem : public frc2::SubsystemBase { */ void SimulationPeriodic() override; - private: +private: // Components (e.g. motor controllers and sensors) should generally be // declared private and exposed only through public methods. };