[wpilibc] Errors: Use fmtlib

This commit is contained in:
Peter Johnson
2021-05-23 19:33:33 -07:00
parent 87603e400d
commit 831c10bdfc
55 changed files with 551 additions and 533 deletions

View File

@@ -48,7 +48,7 @@ class Watchdog::Impl {
Watchdog::Impl::Impl() {
int32_t status = 0;
m_notifier = HAL_InitializeNotifier(&status);
FRC_CheckErrorStatus(status, "starting watchdog notifier");
FRC_CheckErrorStatus(status, "{}", "starting watchdog notifier");
HAL_SetNotifierName(m_notifier, "Watchdog", &status);
m_thread = std::thread([=] { Main(); });
@@ -59,7 +59,7 @@ Watchdog::Impl::~Impl() {
// atomically set handle to 0, then clean
HAL_NotifierHandle handle = m_notifier.exchange(0);
HAL_StopNotifier(handle, &status);
FRC_ReportError(status, "stopping watchdog notifier");
FRC_ReportError(status, "{}", "stopping watchdog notifier");
// Join the thread to ensure the handler has exited.
if (m_thread.joinable()) {
@@ -85,7 +85,7 @@ void Watchdog::Impl::UpdateAlarm() {
1e6),
&status);
}
FRC_CheckErrorStatus(status, "updating watchdog notifier alarm");
FRC_CheckErrorStatus(status, "{}", "updating watchdog notifier alarm");
}
void Watchdog::Impl::Main() {