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:
Thad House
2019-11-08 22:53:20 -08:00
committed by Peter Johnson
parent 326aecc9a0
commit 9bcff37b93
84 changed files with 421 additions and 377 deletions

View File

@@ -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();