chore(script): generate C array with more paras to avoid conflicts (#4890)

Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
This commit is contained in:
Neo Xu 2023-11-29 00:40:31 +08:00 committed by GitHub
parent f0988b8cf8
commit 0cf71065cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -526,6 +526,10 @@ class LVGLImage:
varname = path.basename(filename).split('.')[0]
varname = varname.replace("-", "_")
varname += f"_{self.cf.name.lower()}"
if self.stride != (self.w * self.cf.bpp + 7) // 8:
varname += f"_stride{self.stride}"
header = f'''
#if defined(LV_LVGL_H_INCLUDE_SIMPLE)
#include "lvgl.h"