[hal, wpilib] Fix LED key and byte order (#8110)

This commit is contained in:
Thad House
2025-07-22 17:45:10 -07:00
committed by GitHub
parent 60098b0685
commit cd0e7fb7d7
6 changed files with 23 additions and 23 deletions

View File

@@ -12,9 +12,9 @@
/** structure for holding one LED's color data. */
struct HAL_AddressableLEDData {
uint8_t b; ///< blue value
uint8_t g; ///< green value
uint8_t r; ///< red value
uint8_t g; ///< green value
uint8_t b; ///< blue value
};
/**

View File

@@ -26,15 +26,15 @@
using namespace hal;
#define LEDS_PREFIX "/leds/"
#define IO_PREFIX "/io/"
namespace {
constexpr const char* kRawKey = LEDS_PREFIX "raw";
constexpr const char* kLedsKey = IO_PREFIX "leds";
struct AddressableLEDs {
explicit AddressableLEDs(nt::NetworkTableInstance inst)
: rawPub{inst.GetRawTopic(kRawKey).Publish(
: rawPub{inst.GetRawTopic(kLedsKey).Publish(
"raw", {.periodic = 0.005, .sendAll = true})} {}
nt::RawPublisher rawPub;