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

问题描述

我刚刚购买了带有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

您必须从笔记本电脑上的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.

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

09-03 15:41