Skip to content

Commit

Permalink
Chnaged remaining PWM_RANGE to LIGHT_PWM_RANGE
Browse files Browse the repository at this point in the history
  • Loading branch information
twomugs committed Apr 27, 2017
1 parent 9b2d7d1 commit 0a46e20
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/espurna/light.ino
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,9 @@ unsigned int _intensity2pwm(unsigned int intensity) {
unsigned int pwm;

#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
// 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
pwm = intensity * ( (LIGHT_PWM_RANGE+1) / (LIGHT_MAX_VALUE+1) );
#endif
Expand Down

0 comments on commit 0a46e20

Please sign in to comment.