Как я могу инвертировать KIVY сенсорный экран? - PullRequest
0 голосов
/ 16 ноября 2018

Я повернул малину на 270 градусов, используя матрицу преобразования.

Теперь, когда я использую kivy, касание все еще работает как 0 градусов (касание не синхронизировано), пытались откалибровать егоно я не в состоянии.файл регистратора выглядит следующим образом:

[INFO   ] Logger: Record log in /home/pi/.kivy/logs/kivy_18-11-16_2.txt
[INFO   ] Kivy: v1.11.0.dev0, git-687c973, 20181027
[INFO   ] Python: v2.7.13 (default, Nov 24 2017, 17:33:09)
[GCC 6.3.0 20170516]
[INFO   ] Factory: 184 symbols loaded
[INFO   ] Image: Providers: img_tex, img_dds, img_sdl2, img_pil, img_gif (img_ffpyplayer ignored)
[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   ] Window: virtual keyboard not allowed, single mode, not docked
[INFO   ] Text: Provider: sdl2
[INFO   ] GL: NPOT texture support is available
[INFO   ] Clipboard: Provider: xclip
[INFO   ] CutBuffer: cut buffer support enabled
[WARNING] Lang: The file /home/pi/motormind/main.kv is loaded multiples times, you might have unwanted behaviors.
[INFO   ] ProbeSysfs: device match: /dev/input/event5
[INFO   ] MTD: Read event from </dev/input/event5>
[INFO   ] ProbeSysfs: device match: /dev/input/event3
[INFO   ] MTD: Read event from </dev/input/event3>
[INFO   ] ProbeSysfs: device match: /dev/input/event1
[INFO   ] MTD: Read event from </dev/input/event1>
[INFO   ] ProbeSysfs: device match: /dev/input/event4
[INFO   ] MTD: Read event from </dev/input/event4>
[INFO   ] ProbeSysfs: device match: /dev/input/event2
[INFO   ] MTD: Read event from </dev/input/event2>
[INFO   ] ProbeSysfs: device match: /dev/input/event0
[INFO   ] MTD: Read event from </dev/input/event0>
[INFO   ] ProbeSysfs: device match: /dev/input/event5
[INFO   ] HIDInput: Read event from </dev/input/event5>
[INFO   ] ProbeSysfs: device match: /dev/input/event3
[INFO   ] HIDInput: Read event from </dev/input/event3>
[INFO   ] ProbeSysfs: device match: /dev/input/event1
[INFO   ] HIDInput: Read event from </dev/input/event1>
[INFO   ] ProbeSysfs: device match: /dev/input/event4
[INFO   ] HIDInput: Read event from </dev/input/event4>
[INFO   ] ProbeSysfs: device match: /dev/input/event2
[INFO   ] HIDInput: Read event from </dev/input/event2>
[INFO   ] ProbeSysfs: device match: /dev/input/event0
[INFO   ] HIDInput: Read event from </dev/input/event0>
[INFO   ] Base: Start application main loop
[INFO   ] MTD: </dev/input/event5> range position X is 0 - 4095
[INFO   ] MTD: </dev/input/event3> range position X is 0 - 0
[INFO   ] MTD: </dev/input/event5> range position Y is 0 - 4095
[INFO   ] MTD: </dev/input/event1> range position X is 0 - 0
[INFO   ] MTD: </dev/input/event3> range position Y is 0 - 0
[INFO   ] MTD: </dev/input/event5> range touch major is 0 - 0
[INFO   ] MTD: </dev/input/event1> range position Y is 0 - 0
[INFO   ] MTD: </dev/input/event3> range touch major is 0 - 0
[INFO   ] MTD: </dev/input/event5> range touch minor is 0 - 0
[INFO   ] MTD: </dev/input/event1> range touch major is 0 - 0
[INFO   ] MTD: </dev/input/event3> range touch minor is 0 - 0
[INFO   ] MTD: </dev/input/event2> range position X is 0 - 0
[INFO   ] MTD: </dev/input/event5> range pressure is 0 - 255
[INFO   ] MTD: </dev/input/event1> range touch minor is 0 - 0
[INFO   ] MTD: </dev/input/event4> range position X is 0 - 16384
[INFO   ] HIDMotionEvent: using <ADS7846 Touchscreen^@>
[INFO   ] MTD: </dev/input/event0> range position X is 1 - 16384
[INFO   ] HIDMotionEvent: using <Genius Optical Mouse^@>
[INFO   ] MTD: </dev/input/event3> range pressure is 0 - 255
[INFO   ] HIDMotionEvent: using <Lite-On Technology Corp. USB Keyboard^@>
[INFO   ] HIDMotionEvent: using <Lite-On Technology Corp. USB Keyboard^@>
[INFO   ] MTD: </dev/input/event2> range position Y is 0 - 0
[INFO   ] MTD: </dev/input/event5> axes invertion: X is 0, Y is 0
[INFO   ] HIDMotionEvent: using <ILITEK Multi-Touch-V3000^@>
[INFO   ] MTD: </dev/input/event1> range pressure is 0 - 255
[INFO   ] HIDMotionEvent: using <ILITEK Multi-Touch-V3000^@>
[INFO   ] HIDMotionEvent: <ADS7846 Touchscreen^@> range ABS X position is 0 - 4095
[INFO   ] MTD: </dev/input/event4> range position Y is 0 - 9600
[INFO   ] MTD: </dev/input/event3> axes invertion: X is 0, Y is 0
[INFO   ] MTD: </dev/input/event0> range position Y is 1 - 9600
[INFO   ] MTD: </dev/input/event2> range touch major is 0 - 0
[INFO   ] MTD: </dev/input/event5> rotation set to 0
[INFO   ] HIDMotionEvent: <ILITEK Multi-Touch-V3000^@> range ABS X position is 0 - 16384
[INFO   ] MTD: </dev/input/event1> axes invertion: X is 0, Y is 0
[INFO   ] HIDMotionEvent: <ILITEK Multi-Touch-V3000^@> range ABS X position is 1 - 16384
[INFO   ] HIDMotionEvent: <ADS7846 Touchscreen^@> range ABS Y position is 0 - 4095
[INFO   ] MTD: </dev/input/event4> range touch major is 0 - 0
[INFO   ] MTD: </dev/input/event3> rotation set to 0
[INFO   ] MTD: </dev/input/event0> range touch major is 0 - 0
[INFO   ] MTD: </dev/input/event2> range touch minor is 0 - 0
[INFO   ] HIDMotionEvent: <ILITEK Multi-Touch-V3000^@> range ABS Y position is 0 - 9600
[INFO   ] MTD: </dev/input/event1> rotation set to 0
[INFO   ] HIDMotionEvent: <ILITEK Multi-Touch-V3000^@> range ABS Y position is 1 - 9600
[INFO   ] MTD: </dev/input/event4> range touch minor is 0 - 0
[INFO   ] HIDMotionEvent: <ADS7846 Touchscreen^@> range ABS pressure is 0 - 65535
[INFO   ] MTD: </dev/input/event0> range touch minor is 0 - 0
[INFO   ] MTD: </dev/input/event2> range pressure is 0 - 255
[INFO   ] HIDMotionEvent: <ILITEK Multi-Touch-V3000^@> range position X is 0 - 16384
[INFO   ] MTD: </dev/input/event4> range pressure is 0 - 255
[INFO   ] MTD: </dev/input/event0> range pressure is 0 - 255
[INFO   ] MTD: </dev/input/event2> axes invertion: X is 0, Y is 0
[INFO   ] HIDMotionEvent: <ILITEK Multi-Touch-V3000^@> range position Y is 0 - 9600
[INFO   ] MTD: </dev/input/event4> axes invertion: X is 0, Y is 0
[INFO   ] MTD: </dev/input/event0> axes invertion: X is 0, Y is 0
[INFO   ] MTD: </dev/input/event0> rotation set to 0
[INFO   ] MTD: </dev/input/event4> rotation set to 0
[INFO   ] MTD: </dev/input/event2> rotation set to 0
[WARNING] stderr: Exception: FBO Initialization failed: Incomplete attachment (36054)
[WARNING] stderr: Exception Exception: Exception('FBO Initialization failed: Incomplete attachment (36054)',) in 'kivy.graphics.fbo.$
[WARNING] stderr: Exception: FBO Initialization failed: Incomplete attachment (36054)
[WARNING] stderr: Exception Exception: Exception('FBO Initialization failed: Incomplete attachment (36054)',) in 'kivy.graphics.fbo.$
[INFO   ] Base: Leaving application in progress...

Мой файл .kivy / config.ini уже имеет сенсорное изображение, определенное, как указано ниже, и поэтому я не уверен, как добавить в него больше строк .:

[input]
mouse = mouse
mtdev_%(name)s = probesysfs,provider=mtdev
hid_%(name)s = probesysfs,provider=hidinput

Я уже попробовал следующие изменения в файлах конфигурации:

[input]
mouse = mouse
mtdev_%(name)s = probesysfs,provider=mtdev
hid_%(name)s=probesysfs,provider=hidinput,params=invert_y=0
...