Allows easy access to dcs bios state and sending of commands
Project description
DCS Bios Connector [Python Library]
This is a python library that allows you to listen to DCS Bios events. This can be imported into any python and used for projects.
This library uses DCS Bios Skunkworks
A helpful tool is DCS Bort to see button/switch names for each piece of data for a given aircraft. In the Usage
section below, I am using the FLAPS_SW
for the F/A-18_Hornet
. Bort helps you see the name in DCS Bios for every piece of data, it also shows the values in realtime to help debug and see what data you are looking for.
Installation
pip install dcs-bios-connector
Usage
from dcs_bios_connector import DcsBiosConnector
bios = DcsBiosConnector()
bios.connect()
# ============= Example: Detect when flap switch changes and its new value =====================
def handle_flaps_change(value, controlInformation, dataInformation):
print("Flaps have been changed to: ", value)
bios.on("FLAP_SW", handle_flaps_change)
# ============= Example: Callback method to run when flaps are set to 2 =====================
def handle_flaps_lowered():
print("That flaps have been lowered! Yeah")
bios.on("FLAP_SW:0", handle_flaps_lowered)
# ================= Example: Setting flap switch to position 2 (Flaps to auto) ==========================
bios.send("FLAP_SW 2")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file dcs_bios_connector-1.3.tar.gz
.
File metadata
- Download URL: dcs_bios_connector-1.3.tar.gz
- Upload date:
- Size: 1.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1f7718cddb340f3cb19c414368ac634fcbd52a863b8fefaeaeb410cdaf5e19c |
|
MD5 | 0972ecb46e30fae02eb23843616de570 |
|
BLAKE2b-256 | 709aa0a3987388483f826d1d15b3ec818b849ba6efd04fbe367084c4356be441 |
File details
Details for the file dcs_bios_connector-1.3-py3-none-any.whl
.
File metadata
- Download URL: dcs_bios_connector-1.3-py3-none-any.whl
- Upload date:
- Size: 1.5 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37ee768ac8370023baea0611d3506115f2ad73469fee9bd8c3339d40a7cf4c88 |
|
MD5 | 37a1d27b926e179a71f8e8a55a763e7a |
|
BLAKE2b-256 | 7784a9790223e01c174f5e6d187c64959159bbaedede103b326095ad59608c91 |