formatting

main
Zynh0722 2024-03-27 14:04:30 -07:00
parent 2cbc02c3bb
commit 11be5085b5
8 changed files with 17 additions and 21 deletions

View File

@ -16,9 +16,7 @@ void Robot::RobotInit() {}
* <p> 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<Robot>();
}
int main() { return frc::StartRobot<Robot>(); }
#endif

View File

@ -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<frc2::CommandPtr> m_autonomousCommand;

View File

@ -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};

View File

@ -12,5 +12,5 @@ namespace autos {
/**
* Example static factory for an autonomous command.
*/
frc2::CommandPtr ExampleAuto(ExampleSubsystem* subsystem);
frc2::CommandPtr ExampleAuto(ExampleSubsystem *subsystem);
} // namespace autos

View File

@ -18,14 +18,14 @@
*/
class ExampleCommand
: public frc2::CommandHelper<frc2::Command, ExampleCommand> {
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;
};

View File

@ -7,7 +7,7 @@
#include <frc2/command/SubsystemBase.h>
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.
};

View File

@ -8,7 +8,7 @@
#include <frc2/command/SubsystemBase.h>
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.
};