2020-12-26 14:12:05 -08:00
|
|
|
// 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.
|
2019-11-21 19:52:56 -08:00
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2023-12-04 00:39:29 -05:00
|
|
|
#include <optional>
|
|
|
|
|
|
2019-11-21 19:52:56 -08:00
|
|
|
#include <frc/TimedRobot.h>
|
|
|
|
|
#include <frc2/command/Command.h>
|
|
|
|
|
|
|
|
|
|
#include "RobotContainer.h"
|
|
|
|
|
|
|
|
|
|
class Robot : public frc::TimedRobot {
|
|
|
|
|
public:
|
2024-07-17 11:22:39 +08:00
|
|
|
Robot();
|
2019-11-21 19:52:56 -08:00
|
|
|
void RobotPeriodic() override;
|
|
|
|
|
void DisabledInit() override;
|
|
|
|
|
void DisabledPeriodic() override;
|
|
|
|
|
void AutonomousInit() override;
|
|
|
|
|
void AutonomousPeriodic() override;
|
|
|
|
|
void TeleopInit() override;
|
|
|
|
|
void TeleopPeriodic() override;
|
|
|
|
|
void TestPeriodic() override;
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
// Have it null by default so that if testing teleop it
|
|
|
|
|
// doesn't have undefined behavior and potentially crash.
|
2023-12-04 00:39:29 -05:00
|
|
|
std::optional<frc2::CommandPtr> m_autonomousCommand;
|
2019-11-21 19:52:56 -08:00
|
|
|
|
|
|
|
|
RobotContainer m_container;
|
|
|
|
|
};
|