mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Adds HAL_Initialize to ErrorBase constructor, and makes HAL_Initialize properly reentrant (#668)
Partial fix to #663, and most likely the best we are going to be able to get.
This commit is contained in:
committed by
Peter Johnson
parent
ee20747255
commit
434d60592c
@@ -13,6 +13,8 @@
|
||||
#include <iomanip>
|
||||
#include <sstream>
|
||||
|
||||
#include <HAL/HAL.h>
|
||||
|
||||
#define WPI_ERRORS_DEFINE_STRINGS
|
||||
#include "WPIErrors.h"
|
||||
#include "llvm/SmallString.h"
|
||||
@@ -23,6 +25,8 @@ using namespace frc;
|
||||
std::mutex ErrorBase::_globalErrorMutex;
|
||||
Error ErrorBase::_globalError;
|
||||
|
||||
ErrorBase::ErrorBase() { HAL_Initialize(500, 0); }
|
||||
|
||||
/**
|
||||
* @brief Retrieve the current error.
|
||||
* Get the current error information associated with this sensor.
|
||||
|
||||
Reference in New Issue
Block a user