zoukankan      html  css  js  c++  java
  • 【树莓派】显示屏(触摸屏)设置

    版权声明:本文为博主原创文章,转载请注明出处。 https://www.cnblogs.com/YaoYing/p/12105771.html

    显示屏(触摸屏)设置

    屏幕旋转

    修改/boot/config.txt文件

    sudo vim /boot/config.txt
    

    根据需求在文件最后一行添加其中一条语句

    display_rotate=0 旋转0度

    display_rotate=1 旋转90度

    display_rotate=2 旋转180度

    display_rotate=3 旋转270度

    最后重启设备即可

    触摸旋转

    如果显示屏是触摸屏,那么显示旋转的同时也需对触摸功能进行旋转,否则会导致触摸位置不正确。

    安装libinput

    sudo apt-get install xserver-xorg-input-libinput
    

    /etc/X11/下创建xorg.conf.d目录 (如果该目录存在,直接跳过该操作)

    sudo mkdir /etc/X11/xorg.conf.d
    

    复制/usr/share/X11/xorg.conf.d/40-libinput.conf文件到刚刚创建的目录下

    sudo cp /usr/share/X11/xorg.conf.d/40-libinput.conf /etc/X11/xorg.conf.d/
    

    修改touchscreen部分,根据需求在最后一行添加其中一条语句

    90 度旋转: Option "CalibrationMatrix" "0 1 0 -1 0 1 0 0 1"

    180度旋转: Option "CalibrationMatrix" "-1 0 1 0 -1 1 0 0 1"

    270度旋转: Option "CalibrationMatrix" "0 -1 1 1 0 0 0 0 1"

    最后重启设备即可

    更新日期20191227
    如有错误之处,请评论或者私信指出,非常感谢!

  • 相关阅读:
    eclipse tomcat插件
    eclipse.ini
    iBatis杂记
    oracle 10g express 下载网址
    免费ftp客户端 winscp
    maven web app 发布到Tomcat
    sqlserver获取本月最后一天
    ArrayCollection和ComboBox
    flex框架 Cairngorm
    HDU3420 Bus Fair
  • 原文地址:https://www.cnblogs.com/YaoYing/p/12105771.html
Copyright © 2011-2022 走看看