mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[wpilibc] Add FRC_ReportWarning (#6681)
This commit is contained in:
@@ -73,9 +73,9 @@ static std::string MakeLogDir(std::string_view dir) {
|
||||
return "/u/logs";
|
||||
}
|
||||
if (RobotBase::GetRuntimeType() == kRoboRIO) {
|
||||
FRC_ReportError(warn::Warning,
|
||||
"DataLogManager: Logging to RoboRIO 1 internal storage is "
|
||||
"not recommended! Plug in a FAT32 formatted flash drive!");
|
||||
FRC_ReportWarning(
|
||||
"DataLogManager: Logging to RoboRIO 1 internal storage is "
|
||||
"not recommended! Plug in a FAT32 formatted flash drive!");
|
||||
}
|
||||
fs::create_directory("/home/lvuser/logs", ec);
|
||||
return "/home/lvuser/logs";
|
||||
@@ -151,8 +151,8 @@ void Thread::Main() {
|
||||
}
|
||||
auto size = entry.file_size();
|
||||
if (fs::remove(entry.path(), ec)) {
|
||||
FRC_ReportError(warn::Warning, "DataLogManager: Deleted {}",
|
||||
entry.path().string());
|
||||
FRC_ReportWarning("DataLogManager: Deleted {}",
|
||||
entry.path().string());
|
||||
freeSpace += size;
|
||||
if (freeSpace >= kFreeSpaceThreshold) {
|
||||
break;
|
||||
|
||||
@@ -19,10 +19,10 @@ I2C::I2C(Port port, int deviceAddress)
|
||||
int32_t status = 0;
|
||||
|
||||
if (port == I2C::Port::kOnboard) {
|
||||
FRC_ReportError(warn::Warning,
|
||||
"Onboard I2C port is subject to system lockups. See Known "
|
||||
"Issues page for "
|
||||
"details");
|
||||
FRC_ReportWarning(
|
||||
"Onboard I2C port is subject to system lockups. See Known "
|
||||
"Issues page for "
|
||||
"details");
|
||||
}
|
||||
|
||||
HAL_InitializeI2C(m_port, &status);
|
||||
|
||||
@@ -36,7 +36,7 @@ void Tracer::PrintEpochs() {
|
||||
wpi::raw_svector_ostream os(buf);
|
||||
PrintEpochs(os);
|
||||
if (!buf.empty()) {
|
||||
FRC_ReportError(warn::Warning, "{}", buf.c_str());
|
||||
FRC_ReportWarning("{}", buf.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -113,8 +113,8 @@ void Watchdog::Impl::Main() {
|
||||
if (now - watchdog->m_lastTimeoutPrintTime > kMinPrintPeriod) {
|
||||
watchdog->m_lastTimeoutPrintTime = now;
|
||||
if (!watchdog->m_suppressTimeoutMessage) {
|
||||
FRC_ReportError(warn::Warning, "Watchdog not fed within {:.6f}s",
|
||||
watchdog->m_timeout.value());
|
||||
FRC_ReportWarning("Watchdog not fed within {:.6f}s",
|
||||
watchdog->m_timeout.value());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user