Fix setting the LTP305 brightness

pull/555/head
Mike Bell 2022-10-30 20:29:22 +00:00
rodzic 69d5afb5c5
commit b0d7f4c611
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -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);
}