MT6577平台,屏旋转90度横屏显示后,TP没有反映
high_byte = data[3+6*i];
high_byte <<= 8;
high_byte &= 0x0f00;
low_byte = data[3+6*i + 1];
//cinfo->x = high_byte |low_byte;
cinfo->y = high_byte |low_byte;
//cinfo->x = cinfo->x * 480 >> 11; //calibra
/*get the Y coordinate, 2 bytes*/
high_byte = data[3+6*i+2];
high_byte <<= 8;
high_byte &= 0x0f00;
low_byte = data[3+6*i+3];
cinfo->y = high_byte |low_byte;
cinfo->x = high_byte |low_byte;
通过ADB打印出来的值
4>[ 95.554326] (0)[53:mtk-tpd]mtk-tpd: cinfo->x[0] = 853, cinfo->y[0] = 428, cinfo->p[0] = 2
<4>[ 95.554354] (0)[53:mtk-tpd]mtk-tpd: cinfo->x[1] = -572351440, cinfo->y[1] = -1068288880, cinfo->p[1] = 0
<4>[ 95.554369] (0)[53:mtk-tpd]mtk-tpd: cinfo->x[2]= -1069853196, cinfo->y[2]= -1068279452, cinfo->p[2] = -1068288328
<4>[ 95.571173] (0)[53:mtk-tpd]mtk-tpd: cinfo->x[0] = 853, cinfo->y[0] = 427, cinfo->p[0] = 2
<4>[ 95.571192] (0)[53:mtk-tpd]mtk-tpd: cinfo->x[1] = -572351440, cinfo->y[1] = -1068288880, cinfo->p[1] = 0
<4>[ 95.571207] (0)[53:mtk-tpd]mtk-tpd: cinfo->x[2]= -1069853196, cinfo->y[2]= -1068279452, cinfo->p[2] = -1068288328
<4>[ 95.588277] (0)[53:mtk-tpd]mtk-tpd: cinfo->x[0] = 853, cinfo->y[0] = 424, cinfo->p[0] = 2
<4>[ 95.588302] (0)[53:mtk-tpd]mtk-tpd: cinfo->x[1] = -572351440, cinfo->y[1] = -1068288880, cinfo->p[1] = 0
<4>[ 95.588317] (0)[53:mtk-tpd]mtk-tpd: cinfo->x[2]= -1069853196, cinfo->y[2]= -1068279452, cinfo->p[2] = -1068288328
<4>[ 95.604603] (0)[53:mtk-tpd]mtk-tpd: cinfo->x[0] = 853, cinfo->y[0] = 421, cinfo->p[0] = 2
<4>[ 95.604624] (0)[53:mtk-tpd]mtk-tpd: cinfo->x[1] = -572351440, cinfo->y[1] = -1068288880, cinfo->p[1] = 0
<4>[ 95.604638] (0)[53:mtk-tpd]mtk-tpd: cinfo->x[2]= -1069853196, cinfo->y[2]= -1068279452, cinfo->p[2] = -1068288328
<4>[ 95.621147] (0)[53:mtk-tpd]mtk-tpd: cinfo->x[0] = 853, cinfo->y[0] = 415, cinfo->p[0] = 2
<4>[ 95.621166] (0)[53:mtk-tpd]mtk-tpd: cinfo->x[1] = -572351440, cinfo->y[1] = -1068288880, cinfo->p[1] = 0
<4>[ 95.621182] (0)[53:mtk-tpd]mtk-tpd: cinfo->x[2]= -1069853196, cinfo->y[2]= -1068279452, cinfo->p[2] = -1068288328
<4>[ 95.637853] (0)[53:mtk-tpd]mtk-tpd: cinfo->x[0] = 853, cinfo->y[0] = 410, cinfo->p[0] = 2
<4>[ 95.637872] (0)[53:mtk-tpd]mtk-tpd: cinfo->x[1] = -572351440, cinfo->y[1] = -1068288880, cinfo->p[1] = 0
<4>[ 95.637887] (0)[53:mtk-tpd]mtk-tpd: cinfo->x[2]= -1069853196, cinfo->y[2]= -1068279452, cinfo->p[2] = -1068288328
<4>[ 95.654682] (0)[53:mtk-tpd]mtk-tpd: cinfo->x[0] = 853, cinfo->y[0] = 405, cinfo->p[0] = 2
<4>[ 95.654701] (0)[53:mtk-tpd]mtk-tpd: cinfo->x[1] = -572351440, cinfo->y[1] = -1068288880, cinfo->p[1] = 0
<4>[ 95.654716] (0)[53:mtk-tpd]mtk-tpd: cinfo->x[2]= -1069853196, cinfo->y[2]= -1068279452, cinfo->p[2] = -1068288328
竖屏显示的时候触摸各项坐标都正常,请高手帮忙分析一下,谢谢!
你点一个座标比较小的地方看看。
就是X<Y的地方。
我刚刚试了下,点了一下X<Y的坐标,发现也没有发应,但是从坐标和机器的物理原点来看,好像还是按照竖屏的坐标来定的,而不是横屏的坐标来算的,
<7>[ 250.822377] (0)[1129:AppStartMonitor]binder: 20504: call from 1064:1129 (doujia.phoenix2) to 278:0 (system_server) node 1133 handle 1 (activity) size 76:0 code(decimal) 60 start 250.782749
<7>[ 250.959686] (0)[73:kworker/0:2]WQ_WARN: cpu:0, proc:kworker/0:2, [thermal_zone_device_check+0x0/0x18]dur: 309947692 > 15ms
<4>[ 251.329618] (0)[53:mtk-tpd]mtk-tpd: cinfo->x[0] = 52, cinfo->y[0] = 91, cinfo->p[0] = 0
<4>[ 251.329637] (0)[53:mtk-tpd]mtk-tpd: cinfo->x[1] = -572351440, cinfo->y[1] = -1068288880, cinfo->p[1] = 0
<4>[ 251.329652] (0)[53:mtk-tpd]mtk-tpd: cinfo->x[2]= -1069853196, cinfo->y[2]= -1068279452, cinfo->p[2] = -1068288328
<4>[ 251.363204] (0)[53:mtk-tpd]mtk-tpd: cinfo->x[0] = 52, cinfo->y[0] = 91, cinfo->p[0] = 2
<4>[ 251.363221] (0)[53:mtk-tpd]mtk-tpd: cinfo->x[1] = -572351440, cinfo->y[1] = -1068288880, cinfo->p[1] = 0
<4>[ 251.363236] (0)[53:mtk-tpd]mtk-tpd: cinfo->x[2]= -1069853196, cinfo->y[2]= -1068279452, cinfo->p[2] = -1068288328
<7>[ 252.269690] (0)[73:kworker/0:2]WQ_WARN: cpu:0, proc:kworker/0:2, [thermal_zone_device_check+0x0/0x18]dur: 310014846 > 15ms
<7>[ 252.374605] (0)[889:diatek.mdlogger]binder: 20512: call from 889:889 (diatek.mdlogger) to 278:0 (system_server) node 1632 handle 9 (mount) size 64:0 code(decimal) 10 start 252.335012
<7>[ 252.491271] (0)[719:Thread-54]binder: 20516: call from 693:719 (ActivityNetwork) to 278:0 (system_server) node 1632 handle 9 (mount) size 64:0 code(decimal) 10 start 252.451653
找FAE将模组的参数修改一下,看看
我去了FAE那边两次,他们就说只要TP在我们竖屏能正常用,横屏的就不管了,就要自己调坐标,调了半天了,没效果,真郁闷!不过如果我旋转过来后,如果不改 cinfo->y[i] = high_byte |low_byte和cinfo->x[i] = high_byte |low_byte对调的话,横屏情况下,我向上滑动,界面向左走,向下滑动,界面向右走,横向滑动是没有效果的
temp = cinfo->y
cinfo->y= cinfo->x * Y_RES / X_RES;
cinfo->x= temp * X_RES / Y_RES
你最好的down函数里面对调,或者在tpd.c里面对调
谢谢了,已经搞定了,x,y对调了以后,x坐标加了工判断,就好了
high_byte = data[3+6*i];
high_byte <<= 8;
high_byte &= 0x0f00;
low_byte = data[3+6*i + 1];
cinfo->y[i] = high_byte |low_byte;
//cinfo->x[i] = cinfo->x[i] * 480 >> 11; //calibra
/*get the Y coordinate, 2 bytes*/
high_byte = data[3+6*i+2];
high_byte <<= 8;
high_byte &= 0x0f00;
low_byte = data[3+6*i+3];
cinfo->x[i] = high_byte |low_byte;
if(cinfo->x[i] < 854)
{
cinfo->x[i] = 853 - cinfo->x[i];
}
其实有一种方法X/Y不对调也可以的,
什么方法呢,还请哥们指教
学习了,受益。