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:
@@ -8,8 +8,6 @@
|
||||
#include <utility>
|
||||
|
||||
#include <wpi/SmallPtrSet.h>
|
||||
#include <wpi/SmallString.h>
|
||||
#include <wpi/raw_ostream.h>
|
||||
|
||||
#include "frc/DriverStation.h"
|
||||
#include "frc/Errors.h"
|
||||
@@ -90,11 +88,8 @@ void MotorSafety::Check() {
|
||||
}
|
||||
|
||||
if (stopTime < Timer::GetFPGATimestamp()) {
|
||||
wpi::SmallString<128> buf;
|
||||
wpi::raw_svector_ostream desc(buf);
|
||||
GetDescription(desc);
|
||||
FRC_ReportError(err::Timeout, "{}... Output not updated often enough",
|
||||
desc.str());
|
||||
GetDescription());
|
||||
StopMotor();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user