Browse Source

Chnaged remaining PWM_RANGE to LIGHT_PWM_RANGE

fastled
Chris Ward 7 years ago
parent
commit
0a46e20de4
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      code/espurna/light.ino

+ 2
- 2
code/espurna/light.ino View File

@ -142,9 +142,9 @@ unsigned int _intensity2pwm(unsigned int intensity) {
unsigned int pwm; unsigned int pwm;
#if ENABLE_GAMMA_CORRECTION #if ENABLE_GAMMA_CORRECTION
pwm = (intensity < GAMMA_TABLE_SIZE) ? gamma_table[intensity] : PWM_RANGE;
pwm = (intensity < GAMMA_TABLE_SIZE) ? gamma_table[intensity] : LIGHT_PWM_RANGE;
#else #else
// Support integer multiples of 256 (-1) for the PWM_RANGE
// Support integer multiples of 256 (-1) for the LIGHT_PWM_RANGE
// The divide should happen at compile time // The divide should happen at compile time
pwm = intensity * ( (LIGHT_PWM_RANGE+1) / (LIGHT_MAX_VALUE+1) ); pwm = intensity * ( (LIGHT_PWM_RANGE+1) / (LIGHT_MAX_VALUE+1) );
#endif #endif


Loading…
Cancel
Save