diff --git a/hal/src/main/native/athena/HAL.cpp b/hal/src/main/native/athena/HAL.cpp index f8acb3322cd..f239391b360 100644 --- a/hal/src/main/native/athena/HAL.cpp +++ b/hal/src/main/native/athena/HAL.cpp @@ -83,6 +83,7 @@ void InitializeHAL() { InitializeFRCDriverStation(); InitializeI2C(); InitializeInterrupts(); + InitializeLEDs(); InitializeMain(); InitializeNotifier(); InitializeCTREPDP(); diff --git a/hal/src/main/native/athena/HALInitializer.h b/hal/src/main/native/athena/HALInitializer.h index 182ab5b9738..20b9a8bff08 100644 --- a/hal/src/main/native/athena/HALInitializer.h +++ b/hal/src/main/native/athena/HALInitializer.h @@ -40,6 +40,7 @@ extern void InitializeFRCDriverStation(); extern void InitializeHAL(); extern void InitializeI2C(); extern void InitializeInterrupts(); +extern void InitializeLEDs(); extern void InitializeMain(); extern void InitializeNotifier(); extern void InitializeCTREPDP(); diff --git a/hal/src/main/native/athena/LEDs.cpp b/hal/src/main/native/athena/LEDs.cpp index 104da0a2313..3e8f0064878 100644 --- a/hal/src/main/native/athena/LEDs.cpp +++ b/hal/src/main/native/athena/LEDs.cpp @@ -11,6 +11,14 @@ #include "hal/Errors.h" #include "hal/LEDS.h" +namespace hal::init { + +void InitializeLEDs() { + int32_t status = 0; + HAL_SetRadioLEDState(HAL_RadioLED_kOff, &status); +} +} // namespace hal::init + static const fs::path radioLEDGreenFilePath = "/sys/class/leds/nilrt:wifi:primary/brightness"; static const fs::path radioLEDRedFilePath = diff --git a/hal/src/main/native/include/hal/HAL.h b/hal/src/main/native/include/hal/HAL.h index 0d6023729bb..84bee9f75ad 100644 --- a/hal/src/main/native/include/hal/HAL.h +++ b/hal/src/main/native/include/hal/HAL.h @@ -25,6 +25,7 @@ #include "hal/HALBase.h" #include "hal/I2C.h" #include "hal/Interrupts.h" +#include "hal/LEDs.h" #include "hal/Main.h" #include "hal/Notifier.h" #include "hal/PWM.h" diff --git a/hal/src/main/native/sim/LEDs.cpp b/hal/src/main/native/sim/LEDs.cpp index 2ca220ddb9e..c31619839df 100644 --- a/hal/src/main/native/sim/LEDs.cpp +++ b/hal/src/main/native/sim/LEDs.cpp @@ -6,6 +6,10 @@ #include "hal/simulation/RoboRioData.h" +namespace hal::init { +void InitializeLEDs() {} +} // namespace hal::init + void HAL_SetRadioLEDState(HAL_RadioLEDState state, int32_t* status) { HALSIM_SetRoboRioRadioLEDState(state); }