We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f95b705 commit baec561Copy full SHA for baec561
lib/pbio/src/lightgrid.c
@@ -83,7 +83,7 @@ pbio_error_t pbio_lightgrid_set_pixel(pbio_lightgrid_t *lightgrid, uint8_t row,
83
}
84
85
// Scale brightness quadratically from 0 to UINT16_MAX
86
- int32_t duty = ((int32_t)brightness) * brightness * UINT16_MAX / 10000;
+ int32_t duty = brightness * brightness * UINT16_MAX / 10000;
87
88
return pbdrv_pwm_set_duty(lightgrid->pwm, lightgrid->data->channels[row * size + col], duty);
89
0 commit comments