搜索
bottom↓
回复: 0

请问电阻触摸屏,点击按钮有时会触发两次的问题

[复制链接]

出0入0汤圆

发表于 2021-11-23 17:00:13 | 显示全部楼层 |阅读模式
参考正点原子imx6ull移植了QT5.12和tslib,屏幕触摸屏用8寸电阻屏,跑QT的APP点击按钮有时会连续触发两次,可能是哪里的问题呢请教各位大神。

设备树配置如下

  1.          tsc2046 {
  2.   compatible = "ti,tsc2046";
  3.   reg = <0>;
  4.   spi-max-frequency = <1000000>;
  5.   pinctrl-names ="default";
  6.   pinctrl-0 = <&pinctrl_tsc2046_pendown>;
  7.   interrupt-parent = <&gpio1>;
  8.   interrupts = <9 0>;
  9.   pendown-gpio = <&gpio1 9 0>;
  10.   ti,x-min = /bits/ 16 <0>;
  11.   ti,x-max = /bits/ 16 <0>;
  12.   ti,y-min = /bits/ 16 <0>;
  13.   ti,y-max = /bits/ 16 <0>;

  14.   ti,pressure-max = /bits/ 16 <0>;
  15.   ti,x-plat-ohms = /bits/ 16 <0>;


  16.         ti,debounce-max = /bits/ 16 <50>; /*消抖采样次数最大值,采样消抖超过该值,忽略本次 */
  17.         ti,debounce-tol = /bits/ 16 <50>; /*正负误差范围 */
  18.         ti,debounce-rep = /bits/ 16 <0>;

  19.         /*ti,pendown-gpio-debounce = /bits/ 32 <10>;*/

  20.    /*ti,swap-xy;*/
  21.   linux,wakeup;
  22. };
复制代码


ts.conf配置如下
  1. # Access plugins
  2. ################

  3. # Uncomment if you wish to use the linux input layer event interface
  4. module_raw input

  5. # For other driver modules, see the ts.conf man page


  6. # Filter plugins
  7. ################

  8. # Uncomment if first or last samples are unreliable
  9. module skip nhead=0 ntail=2

  10. # Uncomment if needed for devices that measure pressure
  11. #module pthres pmin=1

  12. # Uncomment if needed
  13. module debounce drop_threshold=2

  14. # Uncomment if needed to filter spikes
  15. #module median depth=3

  16. # Uncomment to enable smoothing of fraction N/D
  17. # module iir N=6 D=10

  18. # Uncomment if needed
  19. module lowpass factor=0.4 threshold=1

  20. # Uncomment if needed to filter noise samples
  21. module dejitter delta=100

  22. # Uncomment to define threshold in number of events from device
  23. #module evthres N=5

  24. # Uncomment and adjust if you need to invert an axis or both
  25. # module invert x0=800 y0=480

  26. # Uncomment to use ts_calibrate's settings
  27. module linear
复制代码

回帖提示: 反政府言论将被立即封锁ID 在按“提交”前,请自问一下:我这样表达会给举报吗,会给自己惹麻烦吗? 另外:尽量不要使用Mark、顶等没有意义的回复。不得大量使用大字体和彩色字。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|Archiver|amobbs.com 阿莫电子论坛 ( 公安交互式论坛备案:44190002001997 粤ICP备09047143号 )

GMT+8, 2022-6-30 11:57

© Since 2004 www.amobbs.com, 原www.ourdev.cn, 原www.ouravr.com

快速回复 返回顶部 返回列表