我试图在Raspberry Pi3上设置一个“非品牌”触摸屏,当我运行我的

python / kivy程序时遇到一些麻烦,视觉上一切都很好,但每当我需要移动滑块,按下按钮或其他任何东西.输入的y轴是反转的,请注意,当我在我的

Windows机器上运行它时,它工作正常

我已经尝试在(在我的例子中)(.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,我并没有真正理解它,也许我只是愚蠢.

对不起,如果这篇文章不好.它的第一篇文章和英语不是我的母语.

最佳答案 我终于让它上班了.

我更改了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

python y轴倒转_python – Config Kivy y轴的反转输入相关推荐

  1. python散点图坐标刻度_python – 散点图中的轴范围

    我一直在使用下面的代码来绘制运行4个函数所花费的时间. x轴表示执行次数,而y轴表示花费的时间 运行一个功能. 我想知道你是否可以帮我完成以下任务: 1)设置x轴的极限,以便仅显示正值(x表示 每个函 ...

  2. python开发桌面时钟_python基于Kivy写一个图形桌面时钟程序

    Kivy 是一个开源的 Python 第三方库,可以用来快速开发应用程序. 它有如下三个特点: 跨平台 Kivy 编写的程序可在 Linux,Windows,OS X,Android,iOS 和 Ra ...

  3. python时间序列折线图_Python Pandas 时间序列双轴折线图

    时间序列pv-gmv双轴折线图 import numpy as np import pandas as pd import matplotlib.pyplot as plt n = 12 date_s ...

  4. python模拟键盘打字_python模拟鼠标点击和键盘输入的操作

    所有代码都是网上百度出来的,通过个人实践找到适合自己的. 采用的python 库是 pymouse.pykeyboard 安装时直接pip安装的,pip install PyUserInput 实现了 ...

  5. python处理回显_Python中getpass模块无回显输入源码解析

    本文主要讨论了python中getpass模块的相关内容,具体如下. getpass模块 昨天跟学弟吹牛b安利Python标准库官方文档的时候偶然发现了这个模块.仔细一看内容挺少的,只有两个主要api ...

  6. python弹出输入框_Python实现使用tkinter弹出输入框输入数字, 具有确定输入和清除功能...

    Python3.6中用tkinter, 弹出可以输入数字的输入框. # Copyright (c) 2017-7-21 ZhengPeng All rights reserved. def pop_u ...

  7. python的mapl画图y轴排_Python三维绘图之Matplotlib库的使用方法

    前言 在遇到三维数据时,三维图像能给我们对数据带来更加深入地理解.python的matplotlib库就包含了丰富的三维绘图工具. 1.创建三维坐标轴对象Axes3D 创建Axes3D主要有两种方式, ...

  8. python绘制多条不同x轴曲线_Python matplotlib 绘制双Y轴曲线图的示例代码

    Matplotlib简介 Matplotlib是非常强大的python画图工具 Matplotlib可以画图线图.散点图.等高线图.条形图.柱形图.3D图形.图形动画等. Matplotlib安装 p ...

  9. python多轴图_python中用Matplotlib做多个纵轴 (多y轴)

    Matlab里做多给轴的函数很直接,双轴是plotyy, 三轴是plotyyy, 四轴是plot4y,更多应该是multiplotyyy. 而matplotlib似乎可以用figure.add_axe ...

最新文章

  1. 谷歌浏览器打不开设置等页面
  2. C#.NET 连接 Access操作类
  3. 评估指标:ROC,AUC,Precision、Recall、F1-score
  4. 实训项目1-熟练使用VMware安装Windows server 2012
  5. 在 MySQL 中查找含有目标字段的表
  6. arm clz指令c语言,协处理器及其他指令之:零计数指令CLZ-嵌入式系统-与非网
  7. spring和CXF集成来实现webservices
  8. BS的data-toggle/data-target
  9. 函数计算镜像加速:从分钟到秒的跨越
  10. nodejs和Vue和Idea
  11. 解决github clone慢的问题
  12. 网易2018校园招聘编程题真题 合唱
  13. MongoDB双机热备份
  14. iris流程图_IRIS项目管理流程
  15. 美丽中国 纪录片 高频词 GRE 托福词汇
  16. excel中常用函数index、match、row、column的用法
  17. windows控制台命令: 快捷键大集合
  18. Waymo无人车报告:通往自动驾驶之路
  19. 基于MATLAB的特殊函数积分
  20. mapboxGL和高德API结合实现路径规划

热门文章

  1. JavaScript事件处理程序的3种方式
  2. jdk1.5、1.6、1.7新特性详细介绍(整理)
  3. Unity3d之求物体体积
  4. Sharepoint 2007 用户信息管理总结(1) - 用户组和用户
  5. 在填写表单中输入全角数字的解决方案
  6. 常用的色彩名、色彩值的对照表
  7. MFC 强大功能函数
  8. snmp服务没有安全设置项
  9. Policy-Based Reinforcement Learning
  10. 阅读bulid to win感想