zlgopen / awtk-linux-fb

awtk port for linux framebuffer
108 stars 49 forks source link

5寸触摸屏显示不匹配问题 #41

Closed unflypig closed 4 years ago

unflypig commented 4 years ago

我建立了一个480x800的窗体(相当于手机的竖屏),在windows下生成可执行文件显示正常的竖屏,形状大致如下:

---------------
|1           2|
|             |
|             |
|      3      |        
|             |
|             |
|4           6|
----------------

但是程序运行到嵌入式开发板上的5寸触摸屏时却成了这个模样

------------------------------------------
|1                    2                  |
|                                        |
|                                        |
|           3                            |
------------------------------------------

请问是哪个参数配置错了?

xianjimli commented 4 years ago

应该是LCD参数不匹配

unflypig commented 4 years ago

应该是LCD参数不匹配

不能够啊,我这触摸屏就是800x480的分辨率呀,能具体说说什么参数不匹配吗?

xianjimli commented 4 years ago

Linux系统吗?Log显示什么

unflypig commented 4 years ago

Linux系统吗?Log显示什么

root@npi:/ztbin# ./release/bin/demo try /ztbin try /ztbin/release/bin app_root=/ztbin/release input_engine_create:113 data != NULL fb_info_t: /dev/fb0 xres=800 yres=480 xres_virtual=800 yres_virtual=480 bits_per_pixel=16 line_length=1600 fb_info_t: red(11 5) green(5 6) blue(0 5) xpanstep=0 ywrapstep=1 fb_size=768000 fb_total_size=33554432 fb_nr=1 smem_len=33554432 fb_open clear fb_open ok ratio=1.000000 800 480 input_run:221: open mouse successful, fd=6, filename=/dev/input/event2 input_run:313: open keyboard successful, fd=5, filename=/dev/input/event1 !!!Asset [name=system_bar/system_bar type=ui] not exist!!! ui_loader_load_widget:38 ui != NULL !!!Asset [name=system_bar_b/system_bar_b type=ui] not exist!!! ui_loader_load_widget:38 ui != NULL locale_info_tr:62 locale_info->strs != NULL locale_info_tr:62 locale_info->strs != NULL locale_info_tr:62 locale_info->strs != NULL locale_info_tr:62 locale_info->strs != NULL used: 0 bytes 207 blocks window home_page open

xianjimli commented 4 years ago

你设计时按800x480设计呢?显示正常吗

unflypig commented 4 years ago

800x480是正常的,我发现了一个叫WITH_LCD_LANDSCAPE的宏,把他打开之后,竖屏就正常啦