mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +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,8 +4,8 @@
|
||||
|
||||
#include "frc/motorcontrol/NidecBrushless.h"
|
||||
|
||||
#include <fmt/format.h>
|
||||
#include <hal/FRCUsageReporting.h>
|
||||
#include <wpi/raw_ostream.h>
|
||||
|
||||
#include "frc/smartdashboard/SendableBuilder.h"
|
||||
#include "frc/smartdashboard/SendableRegistry.h"
|
||||
@@ -64,8 +64,8 @@ void NidecBrushless::StopMotor() {
|
||||
m_pwm.SetDisabled();
|
||||
}
|
||||
|
||||
void NidecBrushless::GetDescription(wpi::raw_ostream& desc) const {
|
||||
desc << "Nidec " << GetChannel();
|
||||
std::string NidecBrushless::GetDescription() const {
|
||||
return fmt::format("Nidec {}", GetChannel());
|
||||
}
|
||||
|
||||
int NidecBrushless::GetChannel() const {
|
||||
|
||||
Reference in New Issue
Block a user