修改了一些逻辑

This commit is contained in:
2021-08-16 12:33:10 +08:00
parent 0aa303e132
commit 398d16f69f
11 changed files with 6948 additions and 6267 deletions
+12
View File
@@ -138,6 +138,18 @@ void TP_Server()
}
}
//直接读取
char TP_XY(int *x,int *y)
{
if(TPEN==0) //如果有触摸
{
TP_Read_XY2(&t0.adc_x,&t0.adc_y); //先读取ad值
*x=(t0.adc_x/tconfig.x_acc)-tconfig.x_offset;//转换为像素坐标
*y=(t0.adc_y/tconfig.y_acc)-tconfig.y_offset;
return 1;
}
return 0;
}
//校准用,画一个目标坐标
//r=坐标半径,显示特效用
void TP_DrwaTrage(int x,int y,int r)