Skip to content

Commit d1e65d8

Browse files
committed
fixed effect color
1 parent 36a7b8b commit d1e65d8

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/PPUC.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -474,11 +474,14 @@ bool PPUC::Connect() {
474474
(uint8_t)CONFIG_TOPIC_LED_EFFECT, index++,
475475
(uint8_t)CONFIG_TOPIC_LED_SEGMENT,
476476
n_led_effect["segment"].as<uint32_t>()));
477+
uint32_t color;
478+
std::stringstream ss;
479+
ss << std::hex << n_led_effect["color"].as<std::string>();
480+
ss >> color;
477481
m_pRS485Comm->SendConfigEvent(
478482
new ConfigEvent(n_ledStripe["board"].as<uint8_t>(),
479483
(uint8_t)CONFIG_TOPIC_LED_EFFECT, index++,
480-
(uint8_t)CONFIG_TOPIC_COLOR,
481-
n_led_effect["color"].as<uint32_t>()));
484+
(uint8_t)CONFIG_TOPIC_COLOR, color));
482485
m_pRS485Comm->SendConfigEvent(
483486
new ConfigEvent(n_ledStripe["board"].as<uint8_t>(),
484487
(uint8_t)CONFIG_TOPIC_LED_EFFECT, index++,

0 commit comments

Comments
 (0)