From 42b5f11d3c1de37e7fe00de73e1ae54acce31890 Mon Sep 17 00:00:00 2001 From: cosmicpsyop Date: Wed, 29 May 2024 15:39:53 -0700 Subject: [PATCH] t-hmi touchhandler class opt out build --- src/TouchHandler.cpp | 5 ++++- src/TouchHandler.h | 4 ++-- src/drivers/displays/t_hmiDisplayDriver.cpp | 3 ++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/TouchHandler.cpp b/src/TouchHandler.cpp index b45f141..c5d73f5 100644 --- a/src/TouchHandler.cpp +++ b/src/TouchHandler.cpp @@ -1,4 +1,6 @@ -#include "drivers/displays/display.h" + +#include "drivers/devices/device.h" +#ifdef TOUCH_ENABLE #include "TouchHandler.h" // Global variable declaration @@ -64,3 +66,4 @@ bool TouchHandler::debounce() { } return false; } +#endif \ No newline at end of file diff --git a/src/TouchHandler.h b/src/TouchHandler.h index 4d3821c..00e209c 100644 --- a/src/TouchHandler.h +++ b/src/TouchHandler.h @@ -1,6 +1,6 @@ #ifndef _TOUCHHANDLER_H_ #define _TOUCHHANDLER_H_ - +#ifdef TOUCH_ENABLE #include // TFT display library #include // https://github.com/liangyingy/arduino_xpt2046_library @@ -25,6 +25,6 @@ private: // unsigned int lower_switch; void (*screenSwitchCallback)(); }; - +#endif #endif \ No newline at end of file diff --git a/src/drivers/displays/t_hmiDisplayDriver.cpp b/src/drivers/displays/t_hmiDisplayDriver.cpp index c10f1f5..1d5e1f1 100644 --- a/src/drivers/displays/t_hmiDisplayDriver.cpp +++ b/src/drivers/displays/t_hmiDisplayDriver.cpp @@ -12,8 +12,9 @@ #include "version.h" #include "monitor.h" #include "OpenFontRender.h" +#ifdef TOUCH_ENABLE #include "TouchHandler.h" - +#endif #include #include