Navigation

    全志在线开发者论坛

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • 在线文档
    • 社区主页

    D1H的触摸屏坐标数值怎么解析?

    D1系列-RISC-V
    2
    5
    56
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      lgkgkfg LV 6 last edited by

      D1H插入一个USB鼠标设备,调用getevent回返回左边,但是这串HEX的X Y坐标怎么看?

      /dev/input/event1: 0000 0000 00000000
      poll 5, returned 1
      /dev/input/event1: 0003 0000 0000044a
      poll 5, returned 1
      /dev/input/event1: 0003 0001 000009e3
      poll 5, returned 1
      /dev/input/event1: 0000 0000 00000000
      poll 5, returned 1
      /dev/input/event1: 0003 0000 0000045b
      poll 5, returned 1
      /dev/input/event1: 0003 0001 000009e9
      poll 5, returned 1
      /dev/input/event1: 0000 0000 00000000
      poll 5, returned 1
      /dev/input/event1: 0003 0000 00000468
      poll 5, returned 1
      /dev/input/event1: 0003 0001 000009ed
      poll 5, returned 1
      /dev/input/event1: 0000 0000 00000000
      poll 5, returned 1
      /dev/input/event1: 0004 0004 00090001
      poll 5, returned 1
      /dev/input/event1: 0001 0110 00000000
      poll 5, returned 1
      /dev/input/event1: 0000 0000 00000000
      
      1 Reply Last reply Reply Quote Share 0
      • W
        whycan晕哥 LV 9 last edited by

        用evtest:
        https://elinux.org/images/9/93/Evtest.c

        L 1 Reply Last reply Reply Quote Share 0
        • L
          lgkgkfg LV 6 @whycan last edited by

          @whycan 能不能在设备树直接缩放鼠标坐标,设备传来的横纵坐标太大了,还是只能应用层处理?

          W 1 Reply Last reply Reply Quote Share 0
          • W
            whycan晕哥 LV 9 @lgkgkfg last edited by

            @lgkgkfg
            鼠标传的是相对上次的位移吧,除以显示屏分辨率即可。

            L 1 Reply Last reply Reply Quote Share 0
            • L
              lgkgkfg LV 6 @whycan last edited by

              @whycan 有资料参考学习下吗

              1 Reply Last reply Reply Quote Share 0
              • 1 / 1
              • First post
                Last post

              Copyright © 2022 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

              行为准则 | 用户协议 | 隐私权政策