Set correct refresh times for lvgl (#488)
This commit is contained in:
parent
a07b6382ae
commit
7133287b76
|
@ -43,6 +43,8 @@
|
||||||
#include "displayapp/screens/settings/SettingDisplay.h"
|
#include "displayapp/screens/settings/SettingDisplay.h"
|
||||||
#include "displayapp/screens/settings/SettingSteps.h"
|
#include "displayapp/screens/settings/SettingSteps.h"
|
||||||
|
|
||||||
|
#include "libs/lv_conf.h"
|
||||||
|
|
||||||
using namespace Pinetime::Applications;
|
using namespace Pinetime::Applications;
|
||||||
using namespace Pinetime::Applications::Display;
|
using namespace Pinetime::Applications::Display;
|
||||||
|
|
||||||
|
@ -123,10 +125,10 @@ void DisplayApp::Refresh() {
|
||||||
case States::Running:
|
case States::Running:
|
||||||
RunningState();
|
RunningState();
|
||||||
delta = xTaskGetTickCount() - lastWakeTime;
|
delta = xTaskGetTickCount() - lastWakeTime;
|
||||||
if (delta > 20) {
|
if (delta > LV_DISP_DEF_REFR_PERIOD) {
|
||||||
delta = 20;
|
delta = LV_DISP_DEF_REFR_PERIOD;
|
||||||
}
|
}
|
||||||
queueTimeout = 20 - delta;
|
queueTimeout = LV_DISP_DEF_REFR_PERIOD - delta;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
queueTimeout = portMAX_DELAY;
|
queueTimeout = portMAX_DELAY;
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
|
|
||||||
/* Default display refresh period.
|
/* Default display refresh period.
|
||||||
* Can be changed in the display driver (`lv_disp_drv_t`).*/
|
* Can be changed in the display driver (`lv_disp_drv_t`).*/
|
||||||
#define LV_DISP_DEF_REFR_PERIOD 30 /*[ms]*/
|
#define LV_DISP_DEF_REFR_PERIOD 20 /*[ms]*/
|
||||||
|
|
||||||
/* Dot Per Inch: used to initialize default sizes.
|
/* Dot Per Inch: used to initialize default sizes.
|
||||||
* E.g. a button with width = LV_DPI / 2 -> half inch wide
|
* E.g. a button with width = LV_DPI / 2 -> half inch wide
|
||||||
|
@ -112,7 +112,7 @@ typedef int16_t lv_coord_t;
|
||||||
* Can be changed in the Input device driver (`lv_indev_drv_t`)*/
|
* Can be changed in the Input device driver (`lv_indev_drv_t`)*/
|
||||||
|
|
||||||
/* Input device read period in milliseconds */
|
/* Input device read period in milliseconds */
|
||||||
#define LV_INDEV_DEF_READ_PERIOD 30
|
#define LV_INDEV_DEF_READ_PERIOD 20
|
||||||
|
|
||||||
/* Drag threshold in pixels */
|
/* Drag threshold in pixels */
|
||||||
#define LV_INDEV_DEF_DRAG_LIMIT 10
|
#define LV_INDEV_DEF_DRAG_LIMIT 10
|
||||||
|
@ -128,7 +128,6 @@ typedef int16_t lv_coord_t;
|
||||||
* Time between `LV_EVENT_LONG_PRESSED_REPEAT */
|
* Time between `LV_EVENT_LONG_PRESSED_REPEAT */
|
||||||
#define LV_INDEV_DEF_LONG_PRESS_REP_TIME 100
|
#define LV_INDEV_DEF_LONG_PRESS_REP_TIME 100
|
||||||
|
|
||||||
|
|
||||||
/* Gesture threshold in pixels */
|
/* Gesture threshold in pixels */
|
||||||
#define LV_INDEV_DEF_GESTURE_LIMIT 50
|
#define LV_INDEV_DEF_GESTURE_LIMIT 50
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue