mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +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:
@@ -6,12 +6,12 @@
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include <fmt/format.h>
|
||||
#include <hal/FRCUsageReporting.h>
|
||||
#include <hal/HALBase.h>
|
||||
#include <hal/Ports.h>
|
||||
#include <hal/Relay.h>
|
||||
#include <wpi/StackTrace.h>
|
||||
#include <wpi/raw_ostream.h>
|
||||
|
||||
#include "frc/Errors.h"
|
||||
#include "frc/SensorUtil.h"
|
||||
@@ -168,8 +168,8 @@ void Relay::StopMotor() {
|
||||
Set(kOff);
|
||||
}
|
||||
|
||||
void Relay::GetDescription(wpi::raw_ostream& desc) const {
|
||||
desc << "Relay " << GetChannel();
|
||||
std::string Relay::GetDescription() const {
|
||||
return fmt::format("Relay {}", GetChannel());
|
||||
}
|
||||
|
||||
void Relay::InitSendable(SendableBuilder& builder) {
|
||||
|
||||
Reference in New Issue
Block a user