mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-25 01:41:43 +00:00
[hal, wpilib] Fix LED key and byte order (#8110)
This commit is contained in:
@@ -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
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user