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
@@ -8,6 +8,7 @@
|
||||
#include "HAL/Relay.h"
|
||||
|
||||
#include "HAL/handles/IndexedHandleResource.h"
|
||||
#include "HALInitializer.h"
|
||||
#include "MockData/RelayDataInternal.h"
|
||||
#include "PortsInternal.h"
|
||||
|
||||
@@ -37,6 +38,7 @@ void InitializeRelay() {
|
||||
extern "C" {
|
||||
HAL_RelayHandle HAL_InitializeRelayPort(HAL_PortHandle portHandle, HAL_Bool fwd,
|
||||
int32_t* status) {
|
||||
hal::init::CheckInit();
|
||||
if (*status != 0) return HAL_kInvalidHandle;
|
||||
|
||||
int16_t channel = getPortHandleChannel(portHandle);
|
||||
|
||||
Reference in New Issue
Block a user