SubZero Common
Common library components for an FRC CommandRobot
Loading...
Searching...
No Matches
AutoFactory.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <frc/DriverStation.h>
4
#include <frc/Filesystem.h>
5
#include <frc2/command/CommandPtr.h>
6
#include <frc2/command/WaitCommand.h>
7
#include <pathplanner/lib/commands/PathPlannerAuto.h>
8
#include <wpi/MemoryBuffer.h>
9
10
#include <filesystem>
11
#include <functional>
12
#include <map>
13
#include <memory>
14
#include <string>
15
#include <vector>
16
17
#include "
subzero/frc2/command/EmptyCommand.h
"
18
#include "
subzero/logging/ConsoleLogger.h
"
19
20
namespace
subzero
{
21
29
template
<
typename
T>
class
AutoFactory
{
30
public
:
31
explicit
AutoFactory
(
const
std::map<T, std::string> &autos)
32
: m_autos{autos} {}
33
34
private
:
35
const
std::map<T, std::string> &m_autos;
36
37
bool
AutoFileExists(
const
std::string fileName);
38
39
frc2::CommandPtr PathPlannerPathFromName(
const
std::string autoName);
40
41
public
:
48
frc2::CommandPtr
GetAuto
(T type);
49
};
50
51
}
// namespace subzero
ConsoleLogger.h
EmptyCommand.h
subzero::AutoFactory::GetAuto
frc2::CommandPtr GetAuto(T type)
Get the auto command specified by the key.
subzero::AutoFactory::AutoFactory
AutoFactory(const std::map< T, std::string > &autos)
Definition
AutoFactory.h:31
subzero
Definition
AutoFactory.h:20
include
subzero
autonomous
AutoFactory.h
Generated by
1.13.2