测试指南
测试环境
硬件
带触屏功能的屏幕
带RTP接口的开发板
USB Type-C数据线,用于给开发板供电、烧写
USB 转串口的线,用于连接开发板的调试串口
手写笔,可以更方便精准的点击RTP
软件
PC端的串口终端软件,用于PC和开发板进行串口通信
test_rtp_draw测试程序
软件配置
test_rtp_draw 配置
在 Luban-Lite 根目录下执行 scons --menuconfig,进入menuconfig的功能配置界面,按如下选择:
Drivers options --->
Drivers examples --->
[*] Enable RTP driver test command
1
2
3
2
3
!小技巧
当使用lvgl时会占用RTP设备,导致执行 test_rtp_draw 会上报 Failed to open aic-rtp device,需关闭lvgl配置
Application options --->
[ ] ArtInChip LVGL demo ---> # 关闭LVGL demo
1
2
2
RTOS环境
test_rtp_draw 测试
在打开test_rtp_draw的编译后,板子上可直接运行test_rtp_draw命令:
aic /> test_rtp_draw -h
Usage: test_rtp_draw [options]:
-c, --calibrate Platform the screen calibration
-p, --points Set the points for drawing, defalut is 1000
-d, --draw Draw the shape
-h, --help
Example: test_rtp_draw -c
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
RTP校准测试
RTP校准测试可以使用shell命令 test_rtp_draw -c
aic /> test_rtp_draw -c
Top left : X = 50 Y = 50
Calibration: X = 958, Y = 90
Top right : X = 974 Y = 50
Calibration: X = 69, Y = 86
Bot right : X = 974 Y = 550
Calibration: X = 61, Y = 526
Bot left : X = 50 Y = 550
Calibration: X = 876, Y = 535
Center : X = 512 Y = 300
Calibration: X = 522, Y = 303
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
RTP画点测试
RTP画点测试可以使用shell命令 test_rtp_draw -d
aic /> test_rtp_draw -d
Event type : down, Press : 617 # Event type事件类型(down:按压事件,up:抬起事件),Press压感值
0: X 240/3299, Y 325/2924 # 画点序数: X 坐标/ADC值, Y 坐标/ADC值
Event type : down, Press : 653
1: X 232/3324, Y 333/2963
Event type : down, Press : 670
2: X 254/3256, Y 328/2933
Event type : down, Press : 706
3: X 245/3282, Y 319/2899
Event type : up, Press : 0
Event type : up, Press: too light # 按压力度过轻,力度小于所配置压
感过滤力度,请重新按压
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
裸机环境
test_rtp_draw 测试
RTP校准测试可以使用shell命令 test_rtp_draw
aic # test_rtp_draw
Compile time: Jun 3 2024 09:33:21
Usage: test_rtp_draw [options]
test_rtp_draw calibrate : Platform the screen calibration
test_rtp_draw set <points_number> : Set the points for drawing, defalut is 1000
test_rtp_draw draw : Draw the shape
test_rtp_draw help : Get this help
Example: test_rtp_draw set 100
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
RTP校准测试
RTP校准测试可以使用shell命令 test_rtp_draw calibrate
aic /> test_rtp_draw calibrate
Top left : X = 50 Y = 50
Calibration: X = 958, Y = 90
Top right : X = 974 Y = 50
Calibration: X = 69, Y = 86
Bot right : X = 974 Y = 550
Calibration: X = 61, Y = 526
Bot left : X = 50 Y = 550
Calibration: X = 876, Y = 535
Center : X = 512 Y = 300
Calibration: X = 522, Y = 303
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
RTP画点测试
RTP画点测试可以使用shell命令 test_rtp_draw draw
aic # test_rtp_draw draw
[I] test_get_fb_info()83 Screen width: 1024, height: 600
[I] rtp_draw()419 Try to read 1000 points from RTP ...
Event type : down, Press 54 # Event type事件类型(down:按压事件,up:抬起事件
0: X 598/1702, Y 268/2263 # 画点序数: X 坐标/ADC值, Y 坐标/ADC值 Press压感值
Event type : down, Press : 94
1: X 584/1759, Y 156/3028
Event type : up, Press : 0 # 事件类型:抬起
Event type : up, Press: too light # 按压力度过轻,力度小于所配置压感过滤力度,请重新按压
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9