Xplane Teensy 3.5 Issue

BenDanville

Active member
Hi everyone,

I am have issues with the Teensy 3.5 communicating with Xplane.
I'm using code on the Teensy 3.5 which I had previously used on the T2++ and T3.2 and using the serial monitor i can see my code for the buttons and encoders are working but as soon as I run Xplane the serial monitor stops receiving and nothing is transmitted to the Xplane teensy plugin readout. I can see it say it has detected the Teensy and if I remove it says disconnected as expected. When I run the code on an LC/3.2/2++ it works, annoyingly I have made PCBs with the layouts for the T3.5 :(

I am using arduino 1.06 on windows because I had strange bugs with the newer versions.

Thanks for your help!
Ben
 
Forum rule: if you want help, post your code in a way that whomever willing to help might copy/paste it into their Arduino to reproduce the problem, please. If it's about communication with external components, add schematics and a picture of your setup.
 
...
I am using arduino 1.06 on windows because I had strange bugs with the newer versions.

Would also be better to document/publish the newer IDE 'strange bugs' to get them resolved to have IDE 1.82 and TD_1.36 work. They may actually point to the problem where an issue just happens to work ... except with the T_3.5.
 
Hi sorry guys for my poor documentation/explanations I am very much a hobby programmer (for better or worse). I am now going to test the below on a newer version of the IDE and see if the issue persists after IDE 1.06. (The strange bugs I was referancing was to do with library conflicts relevant to my projects if I remember correctly).

I've adapted some of the example Teensy FlightSim code to demonstrate the issue of FlightSimFloats not working correctly, but working when I declare them as FlightSimInteger - according to the documentation the relevant data is specified as a float: heading_dial_deg_mag_pilot float 900+ yes degrees_magnetic

(when the below code is used the Xplane Teensy plugin communication window registers the Teensy connecting, displays the data updating to the teensy for the first time then the code stops looping)

#include <Bounce.h>

Bounce TESTbttn = Bounce(3, 20);
FlightSimFloat hdgDataref; //float in relevant
//FlightSimInteger hdgDataref;

void setup() {
Serial.begin(9600);

pinMode(3, INPUT_PULLUP);

hdgDataref = XPlaneRef("sim/cockpit2/autopilot/heading_dial_deg_mag_pilot");
}

void loop() {
FlightSim.update();

TESTbttn.update();
if (TESTbttn.fallingEdge()) {
Serial.println("TESTbttn");
hdgDataref = hdgDataref + 10;
}
}

UPDATE: I have confirmed the same issue with IDE 1.81 and 1.82 with the Teensy 3.5 and Teensyduino 1.36
I checked a previous backup of my Arduino folder before I updated and I noticed in Arduino\hardware\teensy\avr\cores\teensy3\usb_flightsim.cpp on line 224 used to say:
(*(void(*)(long,void*))change_callback)(val,callbackInfo);
and now says:
(*(void(*)(float,void*))change_callback)(val,callbackInfo);
I tried changing that but nothing changed so I have changed it back.
 
Last edited:
Back
Top