From b0d7f4c6114dc02f5f39a1b0510c05cdfdba4140 Mon Sep 17 00:00:00 2001 From: Mike Bell Date: Sun, 30 Oct 2022 20:29:22 +0000 Subject: [PATCH] Fix setting the LTP305 brightness --- drivers/ltp305/ltp305.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/ltp305/ltp305.cpp b/drivers/ltp305/ltp305.cpp index d0016daa..ef136220 100644 --- a/drivers/ltp305/ltp305.cpp +++ b/drivers/ltp305/ltp305.cpp @@ -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); }