Make the HAL self initialize when ever any initialization function is called (#1012)

This commit is contained in:
Thad House
2018-05-13 22:02:47 -07:00
committed by Peter Johnson
parent 59a8e9da57
commit e21a246a4d
50 changed files with 149 additions and 2 deletions

View File

@@ -9,6 +9,7 @@
#include "HAL/Errors.h"
#include "HAL/Solenoid.h"
#include "HALInitializer.h"
#include "PortsInternal.h"
namespace hal {
@@ -24,6 +25,7 @@ void InitializePCMInternal() {
} // namespace init
void initializePCM(int32_t module, int32_t* status) {
hal::init::CheckInit();
if (!HAL_CheckSolenoidModule(module)) {
*status = RESOURCE_OUT_OF_RANGE;
return;