Skip to content

Commit

Permalink
fix: if no RGB config then LEDs should be off
Browse files Browse the repository at this point in the history
  • Loading branch information
JonnyHaystack committed Mar 10, 2024
1 parent f2b400c commit bbd5f59
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions HAL/pico/include/comms/NeoPixelBackend.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,9 @@ template <uint8_t data_pin, int led_count> class NeoPixelBackend : public Commun
}

virtual void SendReport() {
if (_config == nullptr) {
return;
}
for (int i = 0; i < led_count; i++) {
Button button = this->_button_mappings[i];
_leds[i] = _button_colors[max(0, button - 1)];
_leds[i] = _config != nullptr ? _button_colors[max(0, button - 1)] : 0;
}
FastLED.setBrightness(_brightness);
FastLED.show();
Expand Down

0 comments on commit bbd5f59

Please sign in to comment.