t-hmi touchhandler class opt out build

This commit is contained in:
cosmicpsyop 2024-05-29 15:39:53 -07:00
parent e8c2db5642
commit 42b5f11d3c
3 changed files with 8 additions and 4 deletions

View File

@ -1,4 +1,6 @@
#include "drivers/displays/display.h"
#include "drivers/devices/device.h"
#ifdef TOUCH_ENABLE
#include "TouchHandler.h" #include "TouchHandler.h"
// Global variable declaration // Global variable declaration
@ -64,3 +66,4 @@ bool TouchHandler::debounce() {
} }
return false; return false;
} }
#endif

View File

@ -1,6 +1,6 @@
#ifndef _TOUCHHANDLER_H_ #ifndef _TOUCHHANDLER_H_
#define _TOUCHHANDLER_H_ #define _TOUCHHANDLER_H_
#ifdef TOUCH_ENABLE
#include <TFT_eSPI.h> // TFT display library #include <TFT_eSPI.h> // TFT display library
#include <xpt2046.h> // https://github.com/liangyingy/arduino_xpt2046_library #include <xpt2046.h> // https://github.com/liangyingy/arduino_xpt2046_library
@ -25,6 +25,6 @@ private:
// unsigned int lower_switch; // unsigned int lower_switch;
void (*screenSwitchCallback)(); void (*screenSwitchCallback)();
}; };
#endif
#endif #endif

View File

@ -12,8 +12,9 @@
#include "version.h" #include "version.h"
#include "monitor.h" #include "monitor.h"
#include "OpenFontRender.h" #include "OpenFontRender.h"
#ifdef TOUCH_ENABLE
#include "TouchHandler.h" #include "TouchHandler.h"
#endif
#include <Arduino.h> #include <Arduino.h>
#include <esp_adc_cal.h> #include <esp_adc_cal.h>