Jump to content

DCS-BIOS 'no data yet' Is it the same as null?


Recommended Posts

Posted

I want to stop the operation of OLED and LED in 'no data yet' state.

 

I wrote a code using if and null in Arduino, but it did not work, and OLED and LED continue to express the last data value.

 

What IF statement can Arduino determine when the output data of DCS-BIOS is 'no data yet'?

 

  • 2 months later...
Posted

Here is how I did it:

 

void loop() {
  DcsBios::loop();

//watchdog timer... clears displays when MetadataEnd/_UPDATE_COUNTER stops changing for more than 2 seconds
unsigned long currentMillis = millis();
  if (currentMillis - previousMillis >= interval) {
  previousMillis = currentMillis;
    if (ticklast  == tick) {
        lc.clearDisplay(0);
        lc.clearDisplay(1);
        } 
    tick=ticklast;
  }

} //end loop
void onUpdateCounterChange(unsigned int newValue) {
   tick=newValue;
}
DcsBios::IntegerBuffer UpdateCounterBuffer(0xfffe, 0x00ff, 0, onUpdateCounterChange);

 

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...