fix(draw): make tests work with non default LV_DRAW_BUF_ALIGN

This commit is contained in:
Gabor Kiss-Vamosi
2023-11-14 14:52:51 +01:00
parent 7ea8192208
commit f9c98905b9
6 changed files with 18 additions and 15 deletions
+2 -2
View File
@@ -195,9 +195,9 @@ void lv_mem_monitor_core(lv_mem_monitor_t * mon_p)
lv_tlsf_walk_pool(*pool_p, lv_mem_walker, mon_p);
}
mon_p->used_pct = 100 - (100U * mon_p->free_size) / mon_p->total_size;
mon_p->used_pct = 100 - (uint64_t)100U * mon_p->free_size / mon_p->total_size;
if(mon_p->free_size > 0) {
mon_p->frag_pct = mon_p->free_biggest_size * 100U / mon_p->free_size;
mon_p->frag_pct = (uint64_t)mon_p->free_biggest_size * 100U / mon_p->free_size;
mon_p->frag_pct = 100 - mon_p->frag_pct;
}
else {