Closed grooverut closed 7 years ago
Brightness will go to 235 but won't go to 255. It is because of the default step of 25+235>255.
Here is my patched code:
uint8_t Arilux::increaseBrightness(void) { if (!m_state) return false; if ((m_brightness+ARILUX_BRIGHTNESS_STEP) >= ARILUX_PWM_RANGE) return setBrightness(ARILUX_PWM_RANGE); if (m_brightness < (ARILUX_PWM_RANGE - ARILUX_BRIGHTNESS_STEP)) return setBrightness(m_brightness + ARILUX_BRIGHTNESS_STEP); return false; }
Hi @grooverut, Thanks for your input. The bug is now corrected.
Sam
Brightness will go to 235 but won't go to 255. It is because of the default step of 25+235>255.
Here is my patched code: