VSCode/PlatformIO Teensyduino HOWTO?

Status
Not open for further replies.

drnicolas

Active member
I just converted a project from ArduinoIDE to PlatformIO running on VSCode.

To use Teenyduino (controlling Xplane) I hda to as the build_flags = -D USB_FLIGHTSIM

Now, the project still brings 5 errors:

I have some variables like this:
FlightSimInteger GearHandle;

Especially GearHandle.onChange(<function>) brings compilation problems.

note: initializing argument 1 of 'void FlightSimInteger::eek:nChange(void (*)(long int))'
void onChange(void (*fptr)(long)) {
^
src\TeensyPanel.cpp:144:37: warning: invalid conversion from 'void (*)()' to 'void (*)(long int)' [-fpermissive]


WHat is the problem?
 
does it compile on ArduinoIDE?
if yes, then check the .cpp file created by AruinoIDE (found in temp directory, as seen using verbose)
Most likely you are missing some include files or are not following C/C++ language rules.
(As you know ArduinoIDE allows non-orthodox C++ files using .ino extension)
 
Status
Not open for further replies.
Back
Top