mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
[commands] Add GetName to Subsystem, use in Scheduler tracer epochs (#5836)
This commit is contained in:
@@ -18,11 +18,6 @@
|
||||
|
||||
namespace frc2 {
|
||||
|
||||
template <typename T>
|
||||
std::string GetTypeName(const T& type) {
|
||||
return wpi::Demangle(typeid(type).name());
|
||||
}
|
||||
|
||||
/**
|
||||
* A state machine representing a complete action to be performed by the robot.
|
||||
* Commands are run by the CommandScheduler, and can be composed into
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include <concepts>
|
||||
#include <functional>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
#include <wpi/FunctionExtras.h>
|
||||
@@ -59,6 +60,13 @@ class Subsystem {
|
||||
*/
|
||||
virtual void SimulationPeriodic();
|
||||
|
||||
/**
|
||||
* Gets the name of this Subsystem.
|
||||
*
|
||||
* @return Name
|
||||
*/
|
||||
virtual std::string GetName() const;
|
||||
|
||||
/**
|
||||
* Sets the default Command of the subsystem. The default command will be
|
||||
* automatically scheduled when no other commands are scheduled that require
|
||||
|
||||
@@ -30,7 +30,7 @@ class SubsystemBase : public Subsystem,
|
||||
*
|
||||
* @return Name
|
||||
*/
|
||||
std::string GetName() const;
|
||||
std::string GetName() const override;
|
||||
|
||||
/**
|
||||
* Sets the name of this Subsystem.
|
||||
|
||||
Reference in New Issue
Block a user