一个简单易用的软件包,利用多功能显示器上的油门的X52和X52专业。

x52的Python项目详细描述


X52型

build

一个易于使用的软件包,利用了X52和X52 Pro的节流阀上的MFD,具有显示文本、浏览内容页面和回调等功能。在

包可在PyPi上找到

使用示例

fromsysimportexit# import necessary items from the x52 packagefromx52importX52,X52Page# Setup callback functions for later usedefcallback_func_1():print('hello from callback_func_1')defcallback_func_2():print('hello from callback_func_2')defcallback_func_3():print('hello from callback_func_3')# instantiate an X52 Object and initialize it# if the X52 Object gets garbage collected it gets# deinitializedx52=X52()x52.init()x52Devices=x52.get_x52devices()# Exit if there is no X52 connectedifnotx52Devices:exit(-1)# Select the first detected devicex52Device=x52Devices[0]# Create pages using the X52Page Constructorpage1=X52Page(('This is Item1',callback_func_1),('This is Item2',callback_func_2),('This is Item3',callback_func_3),True)page2=X52Page(('This is a non',None),('non interactive',None),('Page, with cycling text',None),False)# Add pages to the MFDx52Device.page_add(page1)x52Device.page_add(page2)# Endless loop, else program exitswhileTrue:pass

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
插入表达式以完成JAVA语句块时出现语法错误   在linkedlist中的特定节点后插入java   java如何将参数传递给安卓 junit测试(参数化测试)   java在运行时将数据添加到片段中的RecyclerView,在该片段中,数据是在单独的片段中创建的   java apache CsrfPreventionFilter和404错误   java Ask是安卓 6.0的多重权限   java将字符串解析为Time并插入mysqldatabase   java扩展MyBatis映射器接口可能导致异常   java SparkSql不支持日期格式   在java中剪切字符串的一部分   将Java lambda的结果分配给字段   在Java中解析OCL?   java解析json到安卓中活动中的对象   用于时区转换的JavaAPI   在Oracle上建立与ESRI geodatabase直接连接的java在未处于调试模式时挂起   拆分文件时出错。使用Java8的xml文件   java eclipse jsp无颜色、代码完成和错误检测   java spring kafka侦听器在错误的位置查找ContainerProperty   java Springboot应用程序@EnableConfigServer无法在Eclipse中解析   当尝试使用ConstraintLayout将java视图添加到同一行时,java视图会被截断