mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-28 13:46:36 +00:00
Add TODo to events
This commit is contained in:
parent
7713f4afab
commit
321a505f9a
@ -35,23 +35,38 @@
|
|||||||
extern uint8_t hasp_sleep_state;
|
extern uint8_t hasp_sleep_state;
|
||||||
static uint8_t drv_touch_rotation;
|
static uint8_t drv_touch_rotation;
|
||||||
|
|
||||||
|
bool touch_rotate = false;
|
||||||
|
bool touch_invert_x = false;
|
||||||
|
bool touch_invert_y = false;
|
||||||
|
|
||||||
void drv_touch_init(uint8_t rotation)
|
void drv_touch_init(uint8_t rotation)
|
||||||
{
|
{
|
||||||
drv_touch_rotation = rotation;
|
drv_touch_rotation = rotation;
|
||||||
|
|
||||||
|
switch(rotation) {
|
||||||
|
case 1:
|
||||||
|
case 3:
|
||||||
|
case 5:
|
||||||
|
case 7:
|
||||||
|
// touch_rotate = true;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
touch_rotate = false;
|
||||||
|
}
|
||||||
|
|
||||||
#if TOUCH_DRIVER == 2046 // XPT2046 Resistive touch panel driver
|
#if TOUCH_DRIVER == 2046 // XPT2046 Resistive touch panel driver
|
||||||
#if defined(USE_FSMC)
|
#if defined(USE_FSMC)
|
||||||
xpt2046_init(rotation);
|
xpt2046_init(rotation);
|
||||||
#else
|
#else
|
||||||
// The display driver takes care of all initializations
|
// The display driver takes care of all initializations
|
||||||
// tft_espi_init(rotation);
|
// tft_espi_init(rotation);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#elif TOUCH_DRIVER == 911
|
#elif TOUCH_DRIVER == 911
|
||||||
GT911_init();
|
GT911_init();
|
||||||
|
|
||||||
#elif TOUCH_DRIVER == 0xADC // Analog Digital Touch Conroller
|
#elif TOUCH_DRIVER == 0xADC // Analog Digital Touch Conroller
|
||||||
// Touch_init();
|
// Touch_init();
|
||||||
|
|
||||||
#elif TOUCH_DRIVER == 5206
|
#elif TOUCH_DRIVER == 5206
|
||||||
FT5206_init();
|
FT5206_init();
|
||||||
@ -63,9 +78,9 @@ void drv_touch_init(uint8_t rotation)
|
|||||||
STMPE610_init();
|
STMPE610_init();
|
||||||
|
|
||||||
#else
|
#else
|
||||||
// xpt2046_alt_drv_read(indev_driver, data);
|
// xpt2046_alt_drv_read(indev_driver, data);
|
||||||
// xpt2046_read(indev_driver, data);
|
// xpt2046_read(indev_driver, data);
|
||||||
// if(data->state && guiSleeping != HASP_SLEEP_OFF) guiCheckSleep();
|
// if(data->state && guiSleeping != HASP_SLEEP_OFF) guiCheckSleep();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -159,10 +174,6 @@ static inline bool drv_touchpad_getXY(int16_t* touchX, int16_t* touchY)
|
|||||||
return touched;
|
return touched;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool touch_rotate = false;
|
|
||||||
bool touch_invert_x = false;
|
|
||||||
bool touch_invert_y = false;
|
|
||||||
|
|
||||||
bool drv_touch_read(lv_indev_drv_t* indev_driver, lv_indev_data_t* data)
|
bool drv_touch_read(lv_indev_drv_t* indev_driver, lv_indev_data_t* data)
|
||||||
{
|
{
|
||||||
#if TOUCH_DRIVER > 0
|
#if TOUCH_DRIVER > 0
|
||||||
|
@ -11,6 +11,15 @@
|
|||||||
* - Objects need to send consistent events encapsulated between `up`and `down` events
|
* - Objects need to send consistent events encapsulated between `up`and `down` events
|
||||||
* - Where appropriate include the current value of the object
|
* - Where appropriate include the current value of the object
|
||||||
*
|
*
|
||||||
|
* TODO:
|
||||||
|
* - Swiping an open dropdown list activates a gesture (lvgl bug)
|
||||||
|
* - Rolling a roller object sends the events out-of-order (down > up > changed)
|
||||||
|
* - Long pressing a colorpicker (to change the mode) does not send an up event:
|
||||||
|
* static void indev_proc_release(lv_indev_proc_t* proc)
|
||||||
|
* {
|
||||||
|
* if(proc->wait_until_release != 0) {
|
||||||
|
* lv_event_send(proc->types.pointer.act_obj, LV_EVENT_RELEASED, NULL); // Add this line for HASP
|
||||||
|
*
|
||||||
******************************************************************************************** */
|
******************************************************************************************** */
|
||||||
|
|
||||||
#include "hasp_conf.h"
|
#include "hasp_conf.h"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user