3

I'm running Kivy with the pygame backend on a Raspberry Pi SPI display. Everything works, except the y-axis of the touch input is inverted. How can I change this?

sonium
  • 918
  • 1
  • 11
  • 25

2 Answers2

3

I managed to solve the problem as follows:

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

line 417

invert_y = int(bool(drs('invert_y', 1)))

for

invert_y = int(bool(drs('invert_y', 0)))
Jeferson Rivera
  • 494
  • 6
  • 4
0

For anyone trying to do this, I have a Hyperpixel square and rPi 0W and the following worked for me:

Navigate to the hidden folder /.kivy, open config.ini. There should be some inputs there. Comment them out and then uncomment one by one, each time saving the file then running your app. Whichever one you still get some form of control on when it's uncommented is the one you need for below.

Now add below the input section [postproc:calibration] (mtdev) = xoffset=1,yoffset=1,xratio=-1,yratio=-1

where mtdev might be a different service