mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Add HAL specific version of wpi_setError (#2055)
Cleans up error writing, and allows fewer headers to be included in many of the wpilibc cpp files. This removes all usages of the hal/HAL.h header.
This commit is contained in:
committed by
Peter Johnson
parent
326aecc9a0
commit
9bcff37b93
@@ -14,7 +14,8 @@
|
||||
#include <cstdio>
|
||||
|
||||
#include <cameraserver/CameraServerShared.h>
|
||||
#include <hal/HAL.h>
|
||||
#include <hal/FRCUsageReporting.h>
|
||||
#include <hal/HALBase.h>
|
||||
#include <networktables/NetworkTableInstance.h>
|
||||
|
||||
#include "WPILibVersion.h"
|
||||
@@ -117,11 +118,6 @@ bool RobotBase::IsNewDataAvailable() const { return m_ds.IsNewControlData(); }
|
||||
std::thread::id RobotBase::GetThreadId() { return m_threadId; }
|
||||
|
||||
RobotBase::RobotBase() : m_ds(DriverStation::GetInstance()) {
|
||||
if (!HAL_Initialize(500, 0)) {
|
||||
wpi::errs() << "FATAL ERROR: HAL could not be initialized\n";
|
||||
wpi::errs().flush();
|
||||
std::terminate();
|
||||
}
|
||||
m_threadId = std::this_thread::get_id();
|
||||
|
||||
SetupCameraServerShared();
|
||||
|
||||
Reference in New Issue
Block a user