我试图在Raspberry Pi3上设置一个“非品牌”触摸屏,当我运行我的
python / kivy程序时遇到一些麻烦,视觉上一切都很好,但每当我需要移动滑块,按下按钮或其他任何东西.输入的y轴是反转的,请注意,当我在我的
Windows机器上运行它时,它工作正常
As you can see the input for the buttons are inverted on the y axis
我已经尝试在(在我的例子中)(.kivy / config.ini)下的配置文件中修复它,正如你所看到的那样,它读取了invert_y选项,但没有同时使用1和0作为其值.
root@raspberrypi:/media/pi/64D933A55CDD560F/PrinterSoftware# python MC.py
[INFO ] [Logger ] Record log in /root/.kivy/logs/kivy_17-02-06_10.txt
[INFO ] [Kivy ] v1.9.2.dev0, git-57d41c9, 20170206
[INFO ] [Python ] v2.7.9 (default, Mar 8 2015, 00:52:26)
[GCC 4.9.2]
[INFO ] [Factory ] 193 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_pil, img_gif (img_ffpyplayer ignored)
[INFO ] [Text ] Provider: sdl2
[INFO ] [Window ] Provider: egl_rpi
[INFO ] [GL ] Using the "OpenGL ES 2" graphics system
[INFO ] [GL ] Backend used
[INFO ] [GL ] OpenGL version
[INFO ] [GL ] OpenGL vendor
[INFO ] [GL ] OpenGL renderer
[INFO ] [GL ] OpenGL parsed version: 2, 0
[INFO ] [GL ] Shading version
[INFO ] [GL ] Texture max size <2048>
[INFO ] [GL ] Texture max units <8>
[INFO ] [Shader ] fragment shader:
[INFO ] [Shader ] vertex shader:
[INFO ] [Window ] virtual keyboard not allowed, single mode, not docked
[INFO ] [OSC ] using for socket
[INFO ] [ProbeSysfs ] device match: /dev/input/event0
[INFO ] [HIDInput ] Read event from
[INFO ] [ProbeSysfs ] device match: /dev/input/event1
[INFO ] [HIDInput ] Read event from
[INFO ] [ProbeSysfs ] device match: /dev/input/event2
[INFO ] [HIDInput ] Read event from
[INFO ] [HIDInput ] Read event from
[INFO ] [HIDInput ] Set custom invert_y to 0
[INFO ] [Base ] Start application main loop
所以问题是如何在kivy配置文件中反转输入的Y轴.我也看过this,我并没有真正理解它,也许我只是愚蠢.
对不起,如果这篇文章不好.它的第一篇文章和英语不是我的母语.