Fang-Robotics-MCB
Fang Robotics Team Codebase
Loading...
Searching...
No Matches
fang::DriversSingleton Class Reference

#include <drivers_singleton.hpp>

Static Public Member Functions

static DriversgetDrivers ()
 

Detailed Description

Class that allows one to construct a Drivers instance because of frienship with the Drivers class.

Member Function Documentation

◆ getDrivers()

Drivers & fang::DriversSingleton::getDrivers ( )
static
Returns
The singleton instance of the Drivers class. This is the only instance of the Drivers class that should be created anywhere in the non-unit test framework.
Note
I don't like unecessary pointers. Derferencing the drivers pointer and passing it as a reference twice will cause a crash for some reason. It is likely that you will never have to use this. There are only two files you should be calling this function from – main.cpp and *_control.cpp, either to run I/O stuff and to add a Drivers pointer to an instance of a Subsystem or Command.

The documentation for this class was generated from the following files: