When did USBmidi.sendPitchBend change from taking 0-16383 to -8192-+8191?

Status
Not open for further replies.

gatheround

Well-known member
I recompiled some older code (2013!) that used USBmidi.sendPitchBend and my device didn't work the way it used to.

I tracked down the problem to the function expecting a signed integer between -8192 and +8191, but my 2013 program was written for the function that expected an unsigned int 0-16383!

It's an easy change to fix, don't get me wrong. I'm just wondering when it changed, but also now wondering about problems like this in the future. If I need to reflash some firmware on something that I've written years ago, I'm not guaranteed that it will be exact as before since the new computer I'm compiling it on would have updated libraries.

Is there a way I could have avoided this by compiling the original firmware in 2013 to a .hex file and then just updated with that somehow?
 
It changed when Teensyduino was updated from version 1.40 to version 1.41.
See bottom of this page. Here is the actual commit on Github.

As far as I know, the option you proposed [saving .hex file and uploading with Teensy Loader] is working. See this page.

Paul
 
Thanks Paul, that makes sense - glad I know I'm not losing my mind! I also saved the new .hex file and will make a point of doing that on all of my projects once they are done.
 
Status
Not open for further replies.
Back
Top