Skip to content

Commit 6a84c7a

Browse files
committed
neopx2
1 parent 72c1ec3 commit 6a84c7a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/shelly_statusled.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,13 @@ Status StatusLED::SetState(bool on, const char *source) {
6666
struct rgb color = on ? colorOn : colorOff;
6767

6868
for (int i = 0; i < num_pixel_; i++) {
69+
if (i > 0) {
70+
mgos_neopixel_clear(pixel_);
71+
}
6972
mgos_neopixel_set(pixel_, i, color.r, color.g, color.b);
73+
mgos_neopixel_show(pixel_);
7074
}
71-
mgos_neopixel_show(pixel_);
75+
7276
return Status::OK();
7377
}
7478

0 commit comments

Comments
 (0)