Change GPIO_NUM_MAX for esp8266

This commit is contained in:
fvanroie 2021-04-10 17:54:27 +02:00
parent 79294a2e85
commit d8a16faabe

View File

@ -82,7 +82,7 @@ bool Esp8266Device::get_backlight_power()
void Esp8266Device::update_backlight()
{
if(_backlight_pin < GPIO_NUM_MAX) {
if(_backlight_pin < 17) {
uint32_t duty = _backlight_power ? map(_backlight_level, 0, 255, 0, 1023) : 0;
if(_backlight_invert) duty = 1023 - duty;
analogWrite(_backlight_pin, duty);