-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(benchmark): use the correct subject for performance data #6237
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zjanosy
approved these changes
May 17, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
PGNetHun
previously approved these changes
May 19, 2024
liamHowatt
reviewed
May 23, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update users of lv_global_t::sysmon_perf
diff --git a/demos/benchmark/lv_demo_benchmark.c b/demos/benchmark/lv_demo_benchmark.c
index 884378656..cd5b4bb12 100644
--- a/demos/benchmark/lv_demo_benchmark.c
+++ b/demos/benchmark/lv_demo_benchmark.c
@@ -418,8 +418,6 @@ static scene_dsc_t scenes[] = {
{.name = "", .create_cb = NULL}
};
-#define sysmon_perf LV_GLOBAL_DEFAULT()->sysmon_perf
-
static uint32_t scene_act;
static uint32_t rnd_act;
diff --git a/demos/music/lv_demo_music.c b/demos/music/lv_demo_music.c
index ab5ba6211..2f839d393 100644
--- a/demos/music/lv_demo_music.c
+++ b/demos/music/lv_demo_music.c
@@ -13,6 +13,9 @@
#include "lv_demo_music_main.h"
#include "lv_demo_music_list.h"
#include "../../src/core/lv_global.h"
+#if LV_DEMO_MUSIC_AUTO_PLAY && LV_USE_PERF_MONITOR
+ #include "../../src/display/lv_display_private.h"
+#endif
/*********************
* DEFINES
@@ -104,10 +107,6 @@ static const uint32_t time_list[] = {
2 * 60 + 19,
};
-#if LV_USE_PERF_MONITOR || LV_DEMO_MUSIC_AUTO_PLAY
- #define sysmon_perf LV_GLOBAL_DEFAULT()->sysmon_perf
-#endif
-
/**********************
* MACROS
**********************/
@@ -230,7 +229,8 @@ static void auto_step_cb(lv_timer_t * t)
lv_obj_t * num = lv_label_create(bg);
lv_obj_set_style_text_font(num, font_large, 0);
#if LV_USE_PERF_MONITOR
- const lv_sysmon_perf_info_t * info = lv_subject_get_pointer(&sysmon_perf.subject);
+ lv_display_t * disp = lv_display_get_default();
+ const lv_sysmon_perf_info_t * info = lv_subject_get_pointer(&disp->perf_sysmon_backend.subject);
lv_label_set_text_fmt(num, "%" LV_PRIu32, info->calculated.fps_avg_total);
#endif
lv_obj_align(num, LV_ALIGN_TOP_MID, 0, 120);
Great catch! Updated. |
liamHowatt
approved these changes
May 24, 2024
XuNeo
approved these changes
May 27, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the feature or fix
Now each display has it's own subject.
Notes
lv_conf_template.h
run lv_conf_internal_gen.py and update Kconfig.scripts/code-format.py
(astyle version v3.4.12 needs to be installed) and follow the Code Conventions.