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.4.tar.gz
.
File metadata
- Download URL: dcs_bios_connector-1.4.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 | be0646a3f72037990bdabbf9dd6dce140a9c89b6f7e659a60dfe8395a2a0c586 |
|
MD5 | 8acbf91b36a5cc191603c6f06f784e6e |
|
BLAKE2b-256 | 6efb21145ad60714cb97dcc2cec03e4b24dd64b5e9e73e61c92c659c8316ec9a |
File details
Details for the file dcs_bios_connector-1.4-py3-none-any.whl
.
File metadata
- Download URL: dcs_bios_connector-1.4-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 | c0a1dab369a3b1ece528d1b699f3bc753ba583d91bd81435150c69f11a335543 |
|
MD5 | 66c977c8c32a72f9dc5f8dc8fad8b1ff |
|
BLAKE2b-256 | 857d7551f64b0f5c87022750cd95c20a2ceb82305aa7cb9eaabb1ee2dd9b0718 |