mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-26 20:56:37 +00:00
Check if TFT_BCKL is defined before using
This commit is contained in:
parent
301af99dd6
commit
abb69ce5dd
@ -16,9 +16,13 @@ class Esp32Device : public BaseDevice {
|
|||||||
Esp32Device()
|
Esp32Device()
|
||||||
{
|
{
|
||||||
_hostname = "plate";
|
_hostname = "plate";
|
||||||
_backlight_pin = TFT_BCKL;
|
|
||||||
_backlight_power = 1;
|
_backlight_power = 1;
|
||||||
_backlight_level = 100;
|
_backlight_level = 100;
|
||||||
|
#ifdef TFT_BCKL
|
||||||
|
_backlight_pin = TFT_BCKL;
|
||||||
|
#else
|
||||||
|
_backlight_pin = -1;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
void reboot() override;
|
void reboot() override;
|
||||||
void show_info() override;
|
void show_info() override;
|
||||||
|
@ -17,9 +17,13 @@ class Esp8266Device : public BaseDevice {
|
|||||||
Esp8266Device()
|
Esp8266Device()
|
||||||
{
|
{
|
||||||
_hostname = "plate";
|
_hostname = "plate";
|
||||||
_backlight_pin = TFT_BCKL;
|
|
||||||
_backlight_power = 1;
|
_backlight_power = 1;
|
||||||
_backlight_level = 100;
|
_backlight_level = 100;
|
||||||
|
#ifdef TFT_BCKL
|
||||||
|
_backlight_pin = TFT_BCKL;
|
||||||
|
#else
|
||||||
|
_backlight_pin = -1;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void reboot() override;
|
void reboot() override;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user