[wpilibc] DriverStation: Remove ReportError and ReportWarning

Change use cases to directly call FRC_ReportError.
This commit is contained in:
Peter Johnson
2021-05-24 23:36:26 -07:00
parent 831c10bdfc
commit a04d1b4f97
26 changed files with 169 additions and 146 deletions

View File

@@ -7,7 +7,7 @@
#include "frc/AnalogInput.h"
#include "frc/Base.h"
#include "frc/Counter.h"
#include "frc/DriverStation.h"
#include "frc/Errors.h"
#include "frc/smartdashboard/SendableBuilder.h"
using namespace frc;
@@ -72,7 +72,8 @@ units::turn_t AnalogEncoder::Get() const {
}
}
frc::DriverStation::GetInstance().ReportWarning(
FRC_ReportError(
warn::Warning, "{}",
"Failed to read Analog Encoder. Potential Speed Overrun. Returning last "
"value");
return m_lastPosition;