mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-24 01:31:46 +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
@@ -18,6 +18,7 @@
|
||||
#include <wpi/raw_ostream.h>
|
||||
|
||||
#include "HAL/DriverStation.h"
|
||||
#include "HALInitializer.h"
|
||||
|
||||
static_assert(sizeof(int32_t) >= sizeof(int),
|
||||
"FRC_NetworkComm status variable is larger than 32 bits");
|
||||
@@ -380,6 +381,7 @@ static void newDataOccur(uint32_t refNum) {
|
||||
* that interfaces with LabVIEW.
|
||||
*/
|
||||
void HAL_InitializeDriverStation(void) {
|
||||
hal::init::CheckInit();
|
||||
static std::atomic_bool initialized{false};
|
||||
static wpi::mutex initializeMutex;
|
||||
// Initial check, as if it's true initialization has finished
|
||||
|
||||
Reference in New Issue
Block a user