DCS-Skunkworks / dcs-bios-arduino-library

A library designed to run on Arduinos and similar microcontrollers and communicate with DCS-BIOS.
MIT License
60 stars 22 forks source link

Question: How to check DCS BIOS Connection state (up/down) #67

Open LeandreArnaud opened 2 weeks ago

LeandreArnaud commented 2 weeks ago

Hello guys ! Thanks you for your work here 👍 I would like to know if there is a way to check if DCS BIOS connection is up or down ? (up = currently live with the plane's data) I need it in one of my script to do something like this:

if (DcsBios::connectionIsUp() {
  // do whatever
} else {
  // whatever else
}

Sorry if it is already in the docs, I didn't find it.

LeandreArnaud commented 1 week ago

if you are using DCSBIOS_DEFAULT_SERIAL (witch is my case) I found a way to do it :

// when dcs bios is up
if (Serial.available()) {
  // do whatever
}

Does somebody have a solution for those who use DCSBIOS_IRQ_SERIAL ?