From abb69ce5dd800212c8efad9d1550f6ea70e5b799 Mon Sep 17 00:00:00 2001 From: fvanroie <15969459+fvanroie@users.noreply.github.com> Date: Tue, 23 Feb 2021 23:14:25 +0100 Subject: [PATCH] Check if TFT_BCKL is defined before using --- src/dev/esp32/esp32.h | 6 +++++- src/dev/esp8266/esp8266.h | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/dev/esp32/esp32.h b/src/dev/esp32/esp32.h index 44be6a6b..90f7485a 100644 --- a/src/dev/esp32/esp32.h +++ b/src/dev/esp32/esp32.h @@ -16,9 +16,13 @@ class Esp32Device : public BaseDevice { Esp32Device() { _hostname = "plate"; - _backlight_pin = TFT_BCKL; _backlight_power = 1; _backlight_level = 100; +#ifdef TFT_BCKL + _backlight_pin = TFT_BCKL; +#else + _backlight_pin = -1; +#endif } void reboot() override; void show_info() override; diff --git a/src/dev/esp8266/esp8266.h b/src/dev/esp8266/esp8266.h index cdd6526d..458add99 100644 --- a/src/dev/esp8266/esp8266.h +++ b/src/dev/esp8266/esp8266.h @@ -17,9 +17,13 @@ class Esp8266Device : public BaseDevice { Esp8266Device() { _hostname = "plate"; - _backlight_pin = TFT_BCKL; _backlight_power = 1; _backlight_level = 100; +#ifdef TFT_BCKL + _backlight_pin = TFT_BCKL; +#else + _backlight_pin = -1; +#endif } void reboot() override;