wpilib的driverstation类的一个小python端口
DSInterface的Python项目详细描述
数据接口
wpilib的driverstation类的一个小python端口
安装
dsinterface可以使用以下命令从pip安装:
python3 -m pip install DSInterface
接下来,将其导入到项目中:
importDSInterfaceasDSI
用法
为了访问来自fms或driverstation的任何数据,必须初始化DriverStation
类。
ds=DSI.DriverStation()
从fms中提取数据
以下是DriverStation
:
Method | What it Does |
---|---|
^{ | Returns a ^{ |
^{ | Returns an int from 1 to 3 that matches with your assigned station for the following match |
^{ | Returns an int that represents the match type |
^{ | Returns the raw FMS control data |
^{ | Returns the replay number |
^{ | Returns the match number |
^{ | Returns the event name as a string |
^{ | Returns the game specific message as an uppercase string |