Skip to content

Commit ed72c00

Browse files
committed
fix(example): Update comments
1 parent 6bb3431 commit ed72c00

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

libraries/ESP32/examples/AnalogOut/LEDCGammaFade/LEDCGammaFade.ino

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ uint8_t fade_ended = 0; // status of LED gamma fade
3939
bool fade_in = true;
4040

4141
#ifdef USE_GAMMA_LUT
42-
// Custom Gamma LUT demonstration with only 10 steps (the default built-in Gamma lut is 101 steps)
43-
// Brightness 0 - 100% gamma correction look up table (gamma = 2.6)
42+
// Custom Gamma LUT demonstration with 101 steps (Brightness 0 - 100% gamma correction look up table (gamma = 2.6))
4443
// Y = B ^ 2.6 - Pre-computed LUT to save runtime computation
4544
static const float ledcGammaLUT[101] = {
4645
0.000000, 0.000006, 0.000038, 0.000110, 0.000232, 0.000414, 0.000666, 0.000994, 0.001406, 0.001910,
@@ -74,7 +73,7 @@ void setup() {
7473
#if USE_GAMMA_LUT // Use default gamma LUT for better performance
7574
ledcSetGammaTable(ledcGammaLUT, 101);
7675
#else // Use mathematical gamma correction (default, more flexible)
77-
ledcSetGammaFactor(LEDC_GAMMA_FACTOR); // default gamma factor is 2.8
76+
ledcSetGammaFactor(LEDC_GAMMA_FACTOR); // This is optional to set custom gamma factor (default is 2.8)
7877
#endif
7978

8079
// Setup and start gamma curve fade on led (duty from 0 to 4095)

0 commit comments

Comments
 (0)