Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Commit

Permalink
Map maximum to PWMRANGE, so the maximum brightness of the PWM LEDs is…
Browse files Browse the repository at this point in the history
… used
  • Loading branch information
SciLor committed Nov 23, 2016
1 parent c73e048 commit 0591659
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions HyperionRGB/WrapperLedControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ void WrapperLedControl::begin() {

void WrapperLedControl::show(void) {
#if defined CONFIG_LED_PWM
analogWrite(CONFIG_LED_PWM_RED, leds[0].red);
analogWrite(CONFIG_LED_PWM_GREEN, leds[0].green);
analogWrite(CONFIG_LED_PWM_BLUE, leds[0].blue);
analogWrite(CONFIG_LED_PWM_RED, map(leds[0].red, 0, 255, 0, PWMRANGE));
analogWrite(CONFIG_LED_PWM_GREEN, map(leds[0].green, 0, 255, 0, PWMRANGE));
analogWrite(CONFIG_LED_PWM_BLUE, map(leds[0].blue, 0, 255, 0, PWMRANGE));
#else
FastLED.show();
#endif
Expand Down

0 comments on commit 0591659

Please sign in to comment.