本文介绍了带有 Android 设备的 Raspberry Pi 3 上的屏幕方向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚购买了带有 7 英寸显示屏和外壳的 Raspberry Pi 3.

I've just bought a Raspberry Pi 3 with a 7" Display touch screen and a casing.

不幸的是,外壳不能让我手动旋转屏幕,所以我的应用程序运行颠倒.

Unfortunately, the casing can't allow me to rotate manually the screen so my apps are running upside down.

我尝试使用以下 adb 命令从控制台执行此操作,但没有成功:

I've tried to do it from the console using the following adb commands but with no luck:

adb shell content insert --uri content://settings/system --bind name:s:accelerometer_rotation --bind value:i:0

然后

adb shell content insert --uri content://settings/system --bind name:s:user_rotation --bind value:i:1

adb shell content insert --uri content://settings/system --bind name:s:user_rotation --bind value:i:3

有什么办法可以直接从配置标志中做到从启动开始处理屏幕方向吗?

Is there any way to do it from a config flag directly that screen orientation is handled from boot ?

推荐答案

我终于找到了如何实现它.

I find out finally how to achieve it.

在那里找到的解决方案:带有 Rasp3 7 英寸触摸屏的 Android Things

Solution found there : Android Things with Rasp3 7 inch touchscreen

您必须从笔记本电脑上的 sdcard 挂载启动分区并编辑 /boot/config.txt 文件并添加以下行:

You have to mount the boot partition from the sdcard on your laptop and edit the /boot/config.txt file and add the following line:

lcd_rotate=2

display_rotate=2 相比,通过添加这条线,显示器和触摸屏都将旋转,只有显示器旋转,触摸屏保持颠倒.

By adding this line both display and touchscreen will be rotated, compared to display_rotate=2 where only display is rotated and touchscreen remains upside down.

这篇关于带有 Android 设备的 Raspberry Pi 3 上的屏幕方向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-31 09:58