Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/frc5024/dsinterface
A tiny python port of WPILib's driverstation class
https://github.com/frc5024/dsinterface
fms frc networktables python3 wpilib-driverstation
Last synced: 1 day ago
JSON representation
A tiny python port of WPILib's driverstation class
- Host: GitHub
- URL: https://github.com/frc5024/dsinterface
- Owner: frc5024
- License: mit
- Created: 2018-11-07T14:32:03.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2018-11-08T14:07:41.000Z (almost 6 years ago)
- Last Synced: 2024-09-25T17:26:31.889Z (1 day ago)
- Topics: fms, frc, networktables, python3, wpilib-driverstation
- Language: Python
- Size: 4.88 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DSInterface
A tiny python port of WPILib's driverstation class## Installation
DSInterface can be installed from pip using the command:
```
python3 -m pip install DSInterface
```Next, import it in your project:
```python
import DSInterface as DSI
```## Usage
In order to acces any data from FMS or the DriverStation, the `DriverStation` class must be initalized.
```python
ds = DSI.DriverStation()
```### Pulling data from FMS
These are the avalible methods for `DriverStation`:| Method | What it Does |
| ------ | ------------ |
| `getAlliance()` | Returns a `DSI.alliances` enum to represent the alliance |
| `getStation()` | Returns an int from 1 to 3 that matches with your assigned station for the following match |
| `getMatchType()` | Returns an int that represents the match type |
| `getFMSControlData()` | Returns the raw FMS control data |
| `getReplayNumber()` | Returns the replay number |
| `getMatchNumber()` | Returns the match number |
| `getEventName()` | Returns the event name as a string |
| `getGSM()` | Returns the game specific message as an uppercase string |