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?