What do you want to achieve?
I have a working SLS project and have just created a new one but now find that LV_TICK_CUSTOM
has changed in lv_conf.h
It used to be:
uint32_t custom_tick_get(void);
#define LV_TICK_CUSTOM 1
#if LV_TICK_CUSTOM
#define LV_TICK_CUSTOM_INCLUDE <stdint.h> /Header for the system time function/
#define LV_TICK_CUSTOM_SYS_TIME_EXPR (custom_tick_get()) /Expression evaluating to current system time in ms/
Now it is:
#define LV_TICK_CUSTOM 1
#if LV_TICK_CUSTOM
#define LV_TICK_CUSTOM_INCLUDE "Arduino.h" /*Header for the system time function*/ #define LV_TICK_CUSTOM_SYS_TIME_EXPR (millis()) /*Expression evaluating to current system time in ms*/
#endif /LV_TICK_CUSTOM/
Why has this changed ?
In my original code (which the new project code is based on), I have:
/**
A callback function that LVGL uses for timing.
See LV_TICK_CUSTOM_SYS_TIME_EXPR in lv_conf.h.
@return The tick value.
*/
uint32_t custom_tick_get(void)
{
static uint64_t start_ms = 0; if( start_ms == 0 ) { struct timeval tv_start; gettimeofday( &tv_start, NULL ); start_ms = ( tv_start.tv_sec * 1000000 + tv_start.tv_usec ) / 1000; } struct timeval tv_now; gettimeofday( &tv_now, NULL ); uint64_t now_ms; now_ms = ( tv_now.tv_sec * 1000000 + tv_now.tv_usec ) / 1000; uint32_t time_ms = now_ms - start_ms; return time_ms;
}
But now when I run the project I get the following messages appear every second.
[Warn] (0.000, +0) lv_timer_handler: It seems lv_tick_inc() is not called. (in lv_timer.c line #94)
What have you tried so far?
N/A
Screenshot or video
N/A
Others
-
SquareLine Studio version:
1.0.5 -
Operating system:
Windows 10 x64 -
Target hardware:
Raspberry Pi 4
Andy