Skip to content

Commit

Permalink
Initialize to Off
Browse files Browse the repository at this point in the history
  • Loading branch information
rzblue committed Dec 21, 2023
1 parent 5d0c542 commit 3d865a1
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions hal/src/main/native/athena/HAL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ void InitializeHAL() {
InitializeFRCDriverStation();
InitializeI2C();
InitializeInterrupts();
InitializeLEDs();
InitializeMain();
InitializeNotifier();
InitializeCTREPDP();
Expand Down
1 change: 1 addition & 0 deletions hal/src/main/native/athena/HALInitializer.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
8 changes: 8 additions & 0 deletions hal/src/main/native/athena/LEDs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
1 change: 1 addition & 0 deletions hal/src/main/native/include/hal/HAL.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 4 additions & 0 deletions hal/src/main/native/sim/LEDs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

0 comments on commit 3d865a1

Please sign in to comment.