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