Is FlightsimControls working with TeensyControls 1.51?

Status
Not open for further replies.

drnicolas

Active member
Recently a project using FlightsimControls stopped working.

The Teensy plugin inside shows only "Teensy removed" and "Teensy detected" as soon as I compile and upload one of the examples - nothing else.
And this does my own project also.

It worked already with an earlier version.

Did something change?
 
I have TeensyControls 1.51 working on a Teensy 4.0 with Arduino 1.8.12.
Windows worked first time, but I had a few problems with Ubuntu caused by not reading the instructions....
cheers Bob
 
Still no solution.

My own solution (compiled under VSSTudioCode/PlatformIO) and also one of the official examples compiled under Arduino IDE do not communicate with X-Plane at al.
I only see removed/detected messages - that's it.
 
Sorry, I have never tried any of this stuff, but might help localize this down if you mentioned things like which Teensy you are building for on what platform...

I know that T4 support was added with the commit/merge on Feb 5th.
https://github.com/KurtE/cores/commit/e0945a6719a505b526850e1c748eb0bdd893c793

And it looks like maybe a minor change in T3.x? During that same time frame. Including copyright dates on files and remove a couple of lines. at about line 428 in the usb_flig... file

Code:
			} else if (type == 2) {
					FlightSimFloat *item = FlightSimFloat::find(id);
					if (!item) break;
					[COLOR="#FF0000"]#ifdef KINETISK 
					data.f = *(float *)(p + 6);
					#else[/COLOR]
					data.b[0] = p[6];
					data.b[1] = p[7];
					data.b[2] = p[8];
					data.b[3] = p[9];
					[COLOR="#FF0000"]#endif[/COLOR]

It removed those RED lines... Not sure if that is your issue or not... You might look at the deltas...
 
Sorry, I have never tried any of this stuff, but might help localize this down if you mentioned things like which Teensy you are building for on what platform...

I know that T4 support was added with the commit/merge on Feb 5th.
https://github.com/KurtE/cores/commit/e0945a6719a505b526850e1c748eb0bdd893c793

And it looks like maybe a minor change in T3.x? During that same time frame. Including copyright dates on files and remove a couple of lines. at about line 428 in the usb_flig... file

Code:
			} else if (type == 2) {
					FlightSimFloat *item = FlightSimFloat::find(id);
					if (!item) break;
					[COLOR="#FF0000"]#ifdef KINETISK 
					data.f = *(float *)(p + 6);
					#else[/COLOR]
					data.b[0] = p[6];
					data.b[1] = p[7];
					data.b[2] = p[8];
					data.b[3] = p[9];
					[COLOR="#FF0000"]#endif[/COLOR]

It removed those RED lines... Not sure if that is your issue or not... You might look at the deltas...

According to your and the other comment, it sounds that Teensy 4.0 support is working now, but not necessary Teensy 3.6

Can I go back to something 1.50 or 1.49 ?
But, I also need support for VSStudioCode/PlatformIO!

there seem not to be many people around using FlightSimControls
 
According to your and the other comment, it sounds that Teensy 4.0 support is working now, but not necessary Teensy 3.6

Can I go back to something 1.50 or 1.49 ?
But, I also need support for VSStudioCode/PlatformIO!

there seem not to be many people around using FlightSimControls

Did you try adding back the lines I showed in RED to your copy of the code and see if that resolved the issue? That might be the first thing to try.

Again I have not seen very many changes in those files for awhile. You might also try contacting the developer of it and see if they have any ideas on what is going on.
 
I found 3 occurences
You have shown the change only in the "float" part.
Do I need to change this on other locations, too?
 
Seems that after correcting the lines in the Teensy3 branch, usb_flightsim.cpp not even gets compiles - but why?

Code:
Processing teensy36 (platform: teensy; board: teensy36; framework: arduino)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/teensy/teensy36.html
PLATFORM: Teensy 4.8.0 > Teensy 3.6
HARDWARE: MK66FX1M0 180MHz, 256KB RAM, 1MB Flash
DEBUG: Current (jlink) External (jlink)
PACKAGES:
 - framework-arduinoteensy 1.151.0 (1.51)
 - toolchain-gccarmnoneeabi 1.50401.190816 (5.4.1)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 94 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <i2c_t3>
|-- <FlexiTimer2> 1.1.0
Building in release mode
Compiling .pio\build\teensy36\src\MCP23017_fncs.cpp.o
Compiling .pio\build\teensy36\src\TeensyPanel.cpp.o
Compiling .pio\build\teensy36\src\hardware.cpp.o
Compiling .pio\build\teensy36\lib8e9\i2c_t3\i2c_t3.cpp.o
Compiling .pio\build\teensy36\libced\FlexiTimer2\FlexiTimer2.cpp.o
Compiling .pio\build\teensy36\FrameworkArduino\AudioStream.cpp.o
Compiling .pio\build\teensy36\FrameworkArduino\DMAChannel.cpp.o
Compiling .pio\build\teensy36\FrameworkArduino\EventResponder.cpp.o
Compiling .pio\build\teensy36\FrameworkArduino\HardwareSerial1.cpp.o
Compiling .pio\build\teensy36\FrameworkArduino\HardwareSerial2.cpp.o
Compiling .pio\build\teensy36\FrameworkArduino\HardwareSerial3.cpp.o
Compiling .pio\build\teensy36\FrameworkArduino\HardwareSerial4.cpp.o
Compiling .pio\build\teensy36\FrameworkArduino\HardwareSerial5.cpp.o
Compiling .pio\build\teensy36\FrameworkArduino\HardwareSerial6.cpp.o
Compiling .pio\build\teensy36\FrameworkArduino\IPAddress.cpp.o
Compiling .pio\build\teensy36\FrameworkArduino\IntervalTimer.cpp.o
Compiling .pio\build\teensy36\FrameworkArduino\Print.cpp.o
Archiving .pio\build\teensy36\libced\libFlexiTimer2.a
Compiling .pio\build\teensy36\FrameworkArduino\Stream.cpp.o
Compiling .pio\build\teensy36\FrameworkArduino\Tone.cpp.o
Compiling .pio\build\teensy36\FrameworkArduino\WMath.cpp.o
Compiling .pio\build\teensy36\FrameworkArduino\WString.cpp.o
Compiling .pio\build\teensy36\FrameworkArduino\analog.c.o
Compiling .pio\build\teensy36\FrameworkArduino\avr_emulation.cpp.o
Compiling .pio\build\teensy36\FrameworkArduino\eeprom.c.o
Compiling .pio\build\teensy36\FrameworkArduino\keylayouts.c.o
Compiling .pio\build\teensy36\FrameworkArduino\main.cpp.o
Compiling .pio\build\teensy36\FrameworkArduino\math_helper.c.o
Compiling .pio\build\teensy36\FrameworkArduino\memcpy-armv7m.S.o
Compiling .pio\build\teensy36\FrameworkArduino\memset.S.o
Compiling .pio\build\teensy36\FrameworkArduino\mk20dx128.c.o
Compiling .pio\build\teensy36\FrameworkArduino\new.cpp.o
Compiling .pio\build\teensy36\FrameworkArduino\nonstd.c.o
Archiving .pio\build\teensy36\lib8e9\libi2c_t3.a
Compiling .pio\build\teensy36\FrameworkArduino\pins_teensy.c.o
Compiling .pio\build\teensy36\FrameworkArduino\ser_print.c.o
Compiling .pio\build\teensy36\FrameworkArduino\serial1.c.o
Compiling .pio\build\teensy36\FrameworkArduino\serial2.c.o
Compiling .pio\build\teensy36\FrameworkArduino\serial3.c.o
Compiling .pio\build\teensy36\FrameworkArduino\serial4.c.o
Compiling .pio\build\teensy36\FrameworkArduino\serial5.c.o
Compiling .pio\build\teensy36\FrameworkArduino\serial6.c.o
Compiling .pio\build\teensy36\FrameworkArduino\serial6_lpuart.c.o
Compiling .pio\build\teensy36\FrameworkArduino\touch.c.o
Compiling .pio\build\teensy36\FrameworkArduino\usb_audio.cpp.o
Compiling .pio\build\teensy36\FrameworkArduino\usb_desc.c.o
Compiling .pio\build\teensy36\FrameworkArduino\usb_dev.c.o
Compiling .pio\build\teensy36\FrameworkArduino\usb_inst.cpp.o
Compiling .pio\build\teensy36\FrameworkArduino\usb_joystick.c.o
Compiling .pio\build\teensy36\FrameworkArduino\usb_keyboard.c.o
Compiling .pio\build\teensy36\FrameworkArduino\usb_mem.c.o
Compiling .pio\build\teensy36\FrameworkArduino\usb_midi.c.o
Compiling .pio\build\teensy36\FrameworkArduino\usb_mouse.c.o
Compiling .pio\build\teensy36\FrameworkArduino\usb_mtp.c.o
Compiling .pio\build\teensy36\FrameworkArduino\usb_rawhid.c.o
Compiling .pio\build\teensy36\FrameworkArduino\usb_seremu.c.o
Compiling .pio\build\teensy36\FrameworkArduino\usb_serial.c.o
Compiling .pio\build\teensy36\FrameworkArduino\usb_touch.c.o
Compiling .pio\build\teensy36\FrameworkArduino\yield.cpp.o
Archiving .pio\build\teensy36\libFrameworkArduino.a
Linking .pio\build\teensy36\firmware.elf
.pio\build\teensy36\src\TeensyPanel.cpp.o: In function `setup':
TeensyPanel.cpp:(.text.setup+0x174): undefined reference to `FlightSimClass::update()'
TeensyPanel.cpp:(.text.setup+0x18e): undefined reference to `FlightSimInteger::identify()'
TeensyPanel.cpp:(.text.setup+0x1a4): undefined reference to `FlightSimInteger::identify()'
TeensyPanel.cpp:(.text.setup+0x1b6): undefined reference to `FlightSimFloat::identify()'
TeensyPanel.cpp:(.text.setup+0x1c8): undefined reference to `FlightSimFloat::identify()'
TeensyPanel.cpp:(.text.setup+0x1da): undefined reference to `FlightSimFloat::identify()'
TeensyPanel.cpp:(.text.setup+0x1ea): undefined reference to `FlightSimInteger::identify()'
TeensyPanel.cpp:(.text.setup+0x1fa): undefined reference to `FlightSimInteger::identify()'
TeensyPanel.cpp:(.text.setup+0x20c): undefined reference to `FlightSimInteger::identify()'
TeensyPanel.cpp:(.text.setup+0x21c): undefined reference to `FlightSimInteger::identify()'
TeensyPanel.cpp:(.text.setup+0x22c): undefined reference to `FlightSimInteger::identify()'
.pio\build\teensy36\src\TeensyPanel.cpp.o:TeensyPanel.cpp:(.text.setup+0x23e): more undefined references to `FlightSimInteger::identify()' follow
.pio\build\teensy36\src\TeensyPanel.cpp.o: In function `setup':
TeensyPanel.cpp:(.text.setup+0x2cc): undefined reference to `FlightSimClass::enabled'
.pio\build\teensy36\src\TeensyPanel.cpp.o: In function `Get_GearHandle(unsigned short)':
TeensyPanel.cpp:(.text._Z14Get_GearHandlet+0x28): undefined reference to `FlightSimInteger::write(long)'
TeensyPanel.cpp:(.text._Z14Get_GearHandlet+0x36): undefined reference to `FlightSimInteger::write(long)'
.pio\build\teensy36\src\TeensyPanel.cpp.o: In function `Get_Switches()':
TeensyPanel.cpp:(.text._Z12Get_Switchesv+0x38): undefined reference to `FlightSimInteger::write(long)'
TeensyPanel.cpp:(.text._Z12Get_Switchesv+0x46): undefined reference to `FlightSimInteger::write(long)'
TeensyPanel.cpp:(.text._Z12Get_Switchesv+0x54): undefined reference to `FlightSimInteger::write(long)'
.pio\build\teensy36\src\TeensyPanel.cpp.o:TeensyPanel.cpp:(.text._Z12Get_Switchesv+0x64): more undefined references to `FlightSimInteger::write(long)' follow
.pio\build\teensy36\src\TeensyPanel.cpp.o: In function `loop':
TeensyPanel.cpp:(.text.loop+0x2): undefined reference to `FlightSimClass::isEnabled()'
TeensyPanel.cpp:(.text.loop+0x10): undefined reference to `FlightSimClass::isEnabled()'
TeensyPanel.cpp:(.text.loop+0x4a): undefined reference to `FlightSimClass::update()'
TeensyPanel.cpp:(.text.loop+0x84): undefined reference to `FlightSimClass::isEnabled()'
.pio\build\teensy36\src\TeensyPanel.cpp.o: In function `_GLOBAL__sub_I_GearStatus':
TeensyPanel.cpp:(.text.startup._GLOBAL__sub_I_GearStatus+0x4): undefined reference to `FlightSimInteger::FlightSimInteger()'
TeensyPanel.cpp:(.text.startup._GLOBAL__sub_I_GearStatus+0xa): undefined reference to `FlightSimInteger::FlightSimInteger()'
TeensyPanel.cpp:(.text.startup._GLOBAL__sub_I_GearStatus+0x10): undefined reference to `FlightSimFloat::FlightSimFloat()'
TeensyPanel.cpp:(.text.startup._GLOBAL__sub_I_GearStatus+0x16): undefined reference to `FlightSimFloat::FlightSimFloat()'
TeensyPanel.cpp:(.text.startup._GLOBAL__sub_I_GearStatus+0x1c): undefined reference to `FlightSimFloat::FlightSimFloat()'
TeensyPanel.cpp:(.text.startup._GLOBAL__sub_I_GearStatus+0x22): undefined reference to `FlightSimInteger::FlightSimInteger()'
TeensyPanel.cpp:(.text.startup._GLOBAL__sub_I_GearStatus+0x28): undefined reference to `FlightSimInteger::FlightSimInteger()'
TeensyPanel.cpp:(.text.startup._GLOBAL__sub_I_GearStatus+0x2e): undefined reference to `FlightSimInteger::FlightSimInteger()'
TeensyPanel.cpp:(.text.startup._GLOBAL__sub_I_GearStatus+0x34): undefined reference to `FlightSimInteger::FlightSimInteger()'
TeensyPanel.cpp:(.text.startup._GLOBAL__sub_I_GearStatus+0x3a): undefined reference to `FlightSimInteger::FlightSimInteger()'
.pio\build\teensy36\src\TeensyPanel.cpp.o:TeensyPanel.cpp:(.text.startup._GLOBAL__sub_I_GearStatus+0x40): more undefined references to `FlightSimInteger::FlightSimInteger()' follow
.pio\build\teensy36\libFrameworkArduino.a(usb_dev.c.o): In function `usb_isr':
usb_dev.c:(.text.usb_isr+0xd4): undefined reference to `usb_flightsim_flush_callback'
.pio\build\teensy36\libFrameworkArduino.a(usb_inst.cpp.o): In function `_GLOBAL__sub_I_FlightSim':
usb_inst.cpp:(.text.startup._GLOBAL__sub_I_FlightSim+0x2): undefined reference to `FlightSimClass::FlightSimClass()'

What now?

Code:
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[env:teensy36]
platform = teensy
board = teensy36
framework = arduino

;build_flags = -D USB_EVERYTHING
build_flags = -DUSB_FLIGHTSIM 

; Custom Serial Monitor port
; ppmonitor_port = COM3

; Custom Serial Monitor speed (baud rate)
monitor_speed = 9600
Here is my platform.ini
 
And under Adruino-Studio, the project still compiles,but no change.
It simply does not work.
Can I revert to an older Teensyduino-version?
 
Sorry as I mentioned, I don't use this nor have done anything. All I am suggesting is to either try to grab sources from previous version and/or try to undo some of the last few changes and see if you can figure out which one might be the one causing you issues, at which point probably should try to contact the developer of it and see if they have an idea of what is going on.

You can probably either simply grab the flightsim source files from a previous version of Teensyduino or you can probably get github generate you a previous version of the file.
 
Status
Not open for further replies.
Back
Top