Delay between Xplane and Teensy

Status
Not open for further replies.

aitor11

New member
Hi!,

Lately I've been working on learning how to connect real 737 parts to my Mac and X-plane. I've been pretty successful and I have a group of buttons, gauges and annunciators working. The question I have and I'm not sure why is happening, is that I get a delay of approximately three seconds between the moment an annunciator dataref changes from 1 to 0 (integer) and when the teensy turn off the light (the same is true with only a led or in the final circuit connected to a relay). It only happens to turn it off, the other way around from 0 to 1, to turn it on, works without any problem. What I may be missing?

Thanks in advance!

Aitor
 
Well, it could be almost anything. Maybe something in your code? Maybe using the wrong dataref?

I can tell you there's no 3 second delay anywhere in this system, unless a plugin on the X-plane side is added it, or unless you're unintentionally adding the delay on the Teensy side.

Perhaps the Show Communication window can help you to see if X-Plane really is sending the dataref update to Teensy when you expect. Perhaps very simple code which only reads the dataref and prints to the Arduino Serial Monitor (run X-plane in a window, not fullscreen) can help you to diagnose the problem?
 
Thank you for the reply, I checked and the communication is working ok. I can see the change at the same time in the dataref editor and in the teensy communication window. I also checked for a delay in the code but I did not find one. Maybe something else is wrong in the way I wrote it as this is my first time doing it.
 
Maybe try a brand new, minimal-size program that only listens for that 1 dataref and immediately prints it to the serial monitor.

If this is a problem within Teensyduino (which is unlikely), you'll need to post such an minimal-size program here to demonstrate the problem. If it's a problem in something else you're doing, at least a minimal program will give you a confirmation everything else works, and perhaps put you on the path to discovering the trouble.
 
Last edited:
Sure, why not. I've updated the web page with a link to the source on github. Not sure how much that's going to help most X-Plane users who don't have a software dev environment set up to compile it.... but the link is there.
 
The "target" folder of the Github repository holds a fully compiled binary for all architectures (Windows, Linux and OSX, all in 32 and 64 bits). X-Plane calls this a "fat plugin", it's a specific directory structure with 5 files.

Also, I have zipped these files in a single archive.

So, no need to compile...

(I had posted this earlier already, but somehow I managed to delete that post, so here it is again...)
 
Status
Not open for further replies.
Back
Top