Skip to content

Commit

Permalink
Changes requested per code review.
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Winslow authored and Robert Winslow committed Jul 20, 2020
1 parent 391f6e8 commit 9f01d2c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ platforms = [
],
'LINKFLAGS' : [
"-lrt",
"-lm",
"-lm",
],
},
],
Expand Down
4 changes: 2 additions & 2 deletions ws2811.c
Original file line number Diff line number Diff line change
Expand Up @@ -1284,7 +1284,7 @@ const char * ws2811_get_return_t_str(const ws2811_return_t state)
}


void setCustomGammaFactor(ws2811_t *ws2811, double gammaFactor)
void ws2811_set_custom_gamma_factor(ws2811_t *ws2811, double gamma_factor)
{
for (int chan = 0; chan < RPI_PWM_CHANNELS; chan++)
{
Expand All @@ -1295,7 +1295,7 @@ void setCustomGammaFactor(ws2811_t *ws2811, double gammaFactor)
for(int counter = 0; counter < 256; counter++)
{

channel->gamma[counter] = (gammaFactor > 0)? (int)(pow((float)counter / (float)255.00, gammaFactor) * 255.00 + 0.5) : counter;
channel->gamma[counter] = (gamma_factor > 0)? (int)(pow((float)counter / (float)255.00, gamma_factor) * 255.00 + 0.5) : counter;

}
}
Expand Down
2 changes: 1 addition & 1 deletion ws2811.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ void ws2811_fini(ws2811_t *ws2811); //< Tear
ws2811_return_t ws2811_render(ws2811_t *ws2811); //< Send LEDs off to hardware
ws2811_return_t ws2811_wait(ws2811_t *ws2811); //< Wait for DMA completion
const char * ws2811_get_return_t_str(const ws2811_return_t state); //< Get string representation of the given return state
void setCustomGammaFactor(ws2811_t *ws2811, double gammaFactor); //Set a custom Gamma correction array based on a gamma correction factor
void ws2811_set_custom_gamma_factor(ws2811_t *ws2811, double gamma_factor); //< Set a custom Gamma correction array based on a gamma correction factor

#ifdef __cplusplus
}
Expand Down

0 comments on commit 9f01d2c

Please sign in to comment.