EastEriq / LAST_CelestronFocusMotor

Matlab hardware driver for the Celestron Focus Motor
GNU Lesser General Public License v3.0
0 stars 0 forks source link

RXTX fhs_lock() Error: opening lock file #2

Open EastEriq opened 2 years ago

EastEriq commented 2 years ago

When more than one serial device is present on a host, and some serial ports have been connected to, in inst.CelestronFocuser.connect(), fopen() causes a warning like RXTX fhs_lock() Error: opening lock file: /var/lock/LCK..ttyACM0: File exists to be written on stderr, for every OTHER serial port of the system which is already in use, i.e. not for the specific port which we are opening. Possibly this it is a bug of the deprecated serial object, which might be resolved by the newly recommended serialport. I'm a little wary of transitioning the code (there is not much to do, but no fopen(), delete() instead of fclose(), read()/write() instead of fprintf()/freadf()), because serialport has been introduced only in v2019b and I'm not sure whether to force the dependency on a most recent version of Matlab only. Anyway, as for a bug this looks at the moment innocuous.