配置 Kivy > y 轴的反转输入

Config Kivy > Invert input for y axis

我正在尝试在 Raspberry Pi3 上设置一个 "off-brand" 触摸屏,当我 运行 我的 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 <gl>
[INFO   ] [GL          ] OpenGL version <OpenGL ES 2.0>
[INFO   ] [GL          ] OpenGL vendor <Broadcom>
[INFO   ] [GL          ] OpenGL renderer <VideoCore IV HW>
[INFO   ] [GL          ] OpenGL parsed version: 2, 0
[INFO   ] [GL          ] Shading version <OpenGL ES GLSL ES 1.00>
[INFO   ] [GL          ] Texture max size <2048>
[INFO   ] [GL          ] Texture max units <8>
[INFO   ] [Shader      ] fragment shader: <Compiled>
[INFO   ] [Shader      ] vertex shader: <Compiled>
[INFO   ] [Window      ] virtual keyboard not allowed, single mode, not docked
[INFO   ] [OSC         ] using <multiprocessing> for socket
[INFO   ] [ProbeSysfs  ] device match: /dev/input/event0
[INFO   ] [HIDInput    ] Read event from </dev/input/event0>
[INFO   ] [ProbeSysfs  ] device match: /dev/input/event1
[INFO   ] [HIDInput    ] Read event from </dev/input/event1>
[INFO   ] [ProbeSysfs  ] device match: /dev/input/event2
[INFO   ] [HIDInput    ] Read event from </dev/input/event2>
[INFO   ] [HIDInput    ] Read event from </dev/input/event0>
[INFO   ] [HIDInput    ] Set custom invert_y to 0
[INFO   ] [Base        ] Start application main loop

所以问题是如何反转 kivy 配置文件中输入的 Y 轴。我也看了this,我不是很了解,可能是我太笨了。

抱歉,如果这个 post 不好。这是我的第一个 post,英语不是我的母语。

我终于开始工作了。

我更改了 hidinput.py 下的第 417 行:

/usr/local/lib/python2.7/dist-packages/kivy/input/providers/hidinput.py

来源:

并设置配置:

~/.kivy/config.ini

在[输入]下

ADS7846 = hidinput,/dev/input/event2,invert_y=0