ofSerial v0.61

I found a bug in the v0.61 with the ofSerial function setup(int deviceNumber, int baud).

ofSerial.cpp, line 274 :

  
if( str.substr(0,3) == "cu." || str.substr(0,3) == "tty" || str.substr(0,3) == "rfc" ){  

tr.substr(0,3) == “tty” matches all the pseudo terminal devices of the dev folder (ttyxx) where it should only find the tty.something real physical devices (at least on osx). And the enumerateDevices() function doesn’t look for tty string but only for cu., so the device list it returns don’t match with the setup function.

The code should be tr.substr(0,4) == “tty.” or only str.substr(0,3) == “cu.” like in of V0.60

In the mean time, to setup a serial port by it’s deviceNumber I have to find it’s index manually (eg 134 for my Arduino board).

best,

Guillaume