Removed the touch_panel_feedback_cb callback function which vibrated the screen every time the touch screen was used
This commit is contained in:
parent
5deafc767d
commit
0bb9c1fe7e
@ -54,25 +54,6 @@ static void touch_panel_isr(void *arg)
|
|||||||
_indev_touched = true;
|
_indev_touched = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void touch_panel_feedback_cb(struct _lv_indev_drv_t *lv_indev_drv, uint8_t lv_event_code)
|
|
||||||
{
|
|
||||||
(void)lv_indev_drv;
|
|
||||||
|
|
||||||
uint16_t vibration_strength = persistency_get_settings()->display.display_vibrate_on_touch_strength*32;
|
|
||||||
uint32_t vibration_duration_ms = 0;
|
|
||||||
if(persistency_get_settings()->display.display_vibrate_on_touch_duration)
|
|
||||||
vibration_duration_ms = persistency_get_settings()->display.display_vibrate_on_touch_duration*50 + 50;
|
|
||||||
|
|
||||||
switch(lv_event_code)
|
|
||||||
{
|
|
||||||
case LV_EVENT_LONG_PRESSED:
|
|
||||||
watch_peripherals_vibrate(255, vibration_duration_ms);
|
|
||||||
break;
|
|
||||||
case LV_EVENT_PRESSED:
|
|
||||||
watch_peripherals_vibrate(vibration_strength > 255 ? 255 : vibration_strength, vibration_duration_ms);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/**********************
|
/**********************
|
||||||
* GLOBAL FUNCTIONS
|
* GLOBAL FUNCTIONS
|
||||||
**********************/
|
**********************/
|
||||||
@ -111,7 +92,6 @@ void lv_port_indev_init(void)
|
|||||||
indev_drv.type = LV_INDEV_TYPE_POINTER;
|
indev_drv.type = LV_INDEV_TYPE_POINTER;
|
||||||
indev_drv.read_cb = touchpad_read;
|
indev_drv.read_cb = touchpad_read;
|
||||||
indev_drv.user_data = &CST816D_Touch_Data;
|
indev_drv.user_data = &CST816D_Touch_Data;
|
||||||
indev_drv.feedback_cb = &(touch_panel_feedback_cb);
|
|
||||||
indev_touchpad = lv_indev_drv_register(&indev_drv);
|
indev_touchpad = lv_indev_drv_register(&indev_drv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user