Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 2 of 2

Thread: VSCode/PlatformIO Teensyduino HOWTO?

  1. #1
    Junior Member
    Join Date
    Jun 2019

    VSCode/PlatformIO Teensyduino HOWTO?

    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: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?

  2. #2
    Senior Member
    Join Date
    Jul 2014
    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)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts