Skip to content

Commit

Permalink
Change rounding for backlight
Browse files Browse the repository at this point in the history
  • Loading branch information
awawa-dev committed Oct 21, 2024
1 parent 838663d commit 542afda
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sources/led-strip/ColorSpaceCalibration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,8 @@ void ColorSpaceCalibration::applyBacklight(uint8_t& red, uint8_t& green, uint8_t
}
else
{
int avVal = (std::min(int(red), std::min(int(green), int(blue))) +
std::max(int(red), std::max(int(green), int(blue)))) / 2;
int avVal = (1 + std::min(red, std::min(green, blue)) +
std::max(red, std::max(green, blue))) / 2;
if (avVal < int(_sumBrightnessRGBLow))
{
red = _sumBrightnessRGBLow;
Expand Down

0 comments on commit 542afda

Please sign in to comment.