Skip to content

Commit

Permalink
Merge pull request pimoroni#555 from MichaelBell/fix-ltp305-brightness
Browse files Browse the repository at this point in the history
Fix setting the LTP305 brightness
  • Loading branch information
helgibbons authored Nov 8, 2022
2 parents 55821d2 + b0d7f4c commit be1c39e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/ltp305/ltp305.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ namespace pimoroni {
return i2c->get_scl();
}

void LTP305::set_brightness(uint8_t brightness, bool update) {
brightness = std::min((uint8_t)MAX_BRIGHTNESS, brightness);
void LTP305::set_brightness(uint8_t brightness_, bool update) {
brightness = std::min((uint8_t)MAX_BRIGHTNESS, brightness_);
if(update)
i2c->reg_write_uint8(address, CMD_BRIGHTNESS, brightness);
}
Expand Down

0 comments on commit be1c39e

Please sign in to comment.