mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-24 11:46:34 +00:00
Change GPIO_NUM_MAX for esp8266
This commit is contained in:
parent
79294a2e85
commit
d8a16faabe
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user