Valkyrie 2026
Loading...
Searching...
No Matches
Robot.h
1#pragma once
2#include <unordered_map>
3
4#include <frc/TimedRobot.h>
5
6namespace valor {
7
8class Robot : public frc::TimedRobot {
9 public:
15 explicit Robot(units::second_t period = kDefaultPeriod);
16
22 inline explicit Robot(units::hertz_t frequency) : Robot{1 / frequency} {}
23
24 inline ~Robot() override { robot = nullptr; }
25
31 static Robot& GetRobot();
32
38 static inline bool HasRobot() { return robot; }
39
40 private:
41 static Robot* robot;
42};
43
44} // namespace valor
Definition Robot.h:8
Robot(units::hertz_t frequency)
Definition Robot.h:22
static Robot & GetRobot()
static bool HasRobot()
Definition Robot.h:38
Robot(units::second_t period=kDefaultPeriod)