mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
33 lines
873 B
C++
33 lines
873 B
C++
// 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.
|
|
|
|
#pragma once
|
|
|
|
#include <optional>
|
|
|
|
#include <frc/TimedRobot.h>
|
|
#include <frc2/command/Command.h>
|
|
|
|
#include "RobotContainer.h"
|
|
|
|
class Robot : public frc::TimedRobot {
|
|
public:
|
|
Robot();
|
|
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.
|
|
std::optional<frc2::CommandPtr> m_autonomousCommand;
|
|
|
|
RobotContainer m_container;
|
|
};
|