Is there a way to determine what version of Teensyduino is used when building a project, through a defined constant or something similar?
I'm looking both for ways to just raise an #error if it's an incompatible version, or even have separate bits of code to handle differences between versions. One example is usbMIDI.sendPitchBend(), where any version "works the same" (as in it compiles and runs), but the actual parameter value is treated differently depending on if you're before or after Teensyduino 1.4.0.
If there was some defined constant to look at it would be trivial to handle, but I haven't found anything looking obvious through the library code. Now we have to tell users to change a constant in the code to handle this if they're on an old version. Sometimes it's feasible to require users to upgrade and sometimes not, but even then it would be helpful to be able to detect the version difference.
I'm looking both for ways to just raise an #error if it's an incompatible version, or even have separate bits of code to handle differences between versions. One example is usbMIDI.sendPitchBend(), where any version "works the same" (as in it compiles and runs), but the actual parameter value is treated differently depending on if you're before or after Teensyduino 1.4.0.
If there was some defined constant to look at it would be trivial to handle, but I haven't found anything looking obvious through the library code. Now we have to tell users to change a constant in the code to handle this if they're on an old version. Sometimes it's feasible to require users to upgrade and sometimes not, but even then it would be helpful to be able to detect the version difference.