mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Make the HAL self initialize when ever any initialization function is called (#1012)
This commit is contained in:
committed by
Peter Johnson
parent
59a8e9da57
commit
e21a246a4d
@@ -16,6 +16,7 @@
|
||||
#include "HAL/HAL.h"
|
||||
#include "HAL/cpp/fpga_clock.h"
|
||||
#include "HAL/handles/UnlimitedHandleResource.h"
|
||||
#include "HALInitializer.h"
|
||||
|
||||
namespace {
|
||||
struct Notifier {
|
||||
@@ -60,6 +61,7 @@ void InitializeNotifier() {
|
||||
extern "C" {
|
||||
|
||||
HAL_NotifierHandle HAL_InitializeNotifier(int32_t* status) {
|
||||
hal::init::CheckInit();
|
||||
std::shared_ptr<Notifier> notifier = std::make_shared<Notifier>();
|
||||
HAL_NotifierHandle handle = notifierHandles->Allocate(notifier);
|
||||
if (handle == HAL_kInvalidHandle) {
|
||||
|
||||
Reference in New Issue
Block a user