mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-29 02:21:44 +00:00
[wpilibc] MotorSafety::GetDescription(): Return std::string (#3390)
This is only called in an error condition, so it's not necessary to over optimize it.
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "frc/DigitalOutput.h"
|
||||
#include "frc/MotorSafety.h"
|
||||
#include "frc/PWM.h"
|
||||
@@ -74,7 +76,7 @@ class NidecBrushless : public MotorController,
|
||||
|
||||
// MotorSafety interface
|
||||
void StopMotor() override;
|
||||
void GetDescription(wpi::raw_ostream& desc) const override;
|
||||
std::string GetDescription() const override;
|
||||
|
||||
/**
|
||||
* Gets the channel number associated with the object.
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <wpi/Twine.h>
|
||||
|
||||
#include "frc/MotorSafety.h"
|
||||
@@ -12,10 +14,6 @@
|
||||
#include "frc/smartdashboard/Sendable.h"
|
||||
#include "frc/smartdashboard/SendableHelper.h"
|
||||
|
||||
namespace wpi {
|
||||
class raw_ostream;
|
||||
} // namespace wpi
|
||||
|
||||
namespace frc {
|
||||
|
||||
/**
|
||||
@@ -56,7 +54,7 @@ class PWMMotorController : public MotorController,
|
||||
|
||||
// MotorSafety interface
|
||||
void StopMotor() override;
|
||||
void GetDescription(wpi::raw_ostream& desc) const override;
|
||||
std::string GetDescription() const override;
|
||||
|
||||
int GetChannel() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user